From 29a40862033a9cd80888f4b1d6681461288d3031 Mon Sep 17 00:00:00 2001 From: ColinLee Date: Tue, 7 Jul 2026 17:37:59 +0800 Subject: [PATCH 1/5] add zstd,lzma2 and some ending type. --- cpp/CMakeLists.txt | 17 + cpp/build.sh | 20 +- cpp/pom.xml | 4 + cpp/src/CMakeLists.txt | 26 + cpp/src/common/db_common.h | 14 +- cpp/src/common/global.cc | 17 +- cpp/src/common/global.h | 41 +- cpp/src/compress/CMakeLists.txt | 12 +- cpp/src/compress/compressor_factory.h | 23 +- cpp/src/compress/lzma2_compressor.cc | 164 + cpp/src/compress/lzma2_compressor.h | 54 + cpp/src/compress/zstd_compressor.cc | 132 + cpp/src/compress/zstd_compressor.h | 54 + cpp/src/cwrapper/tsfile_cwrapper.h | 18 +- cpp/src/encoding/bit_packing_utils.h | 183 + cpp/src/encoding/camel_decoder.h | 352 + cpp/src/encoding/camel_encoder.h | 444 + cpp/src/encoding/chimp_decoder.h | 270 + cpp/src/encoding/chimp_encoder.h | 314 + cpp/src/encoding/decoder_factory.h | 44 + cpp/src/encoding/encoder_factory.h | 47 + cpp/src/encoding/rlbe_decoder.h | 234 + cpp/src/encoding/rlbe_encoder.h | 260 + cpp/test/CMakeLists.txt | 18 + cpp/test/common/tsfile_common_test.cc | 33 + cpp/test/compress/lzma2_compressor_test.cc | 82 + cpp/test/compress/zstd_compressor_test.cc | 82 + cpp/test/cwrapper/cwrapper_test.cc | 31 + cpp/test/encoding/camel_codec_test.cc | 123 + cpp/test/encoding/chimp_codec_test.cc | 151 + cpp/test/encoding/rlbe_codec_test.cc | 160 + cpp/test/tools/output_format_test.cc | 5 + cpp/third_party/CMakeLists.txt | 42 +- cpp/third_party/xz-5.8.3/ABOUT-NLS | 1 + cpp/third_party/xz-5.8.3/AUTHORS | 58 + cpp/third_party/xz-5.8.3/CMakeLists.txt | 2536 ++ cpp/third_party/xz-5.8.3/COPYING | 70 + cpp/third_party/xz-5.8.3/COPYING.0BSD | 11 + cpp/third_party/xz-5.8.3/COPYING.GPLv2 | 338 + cpp/third_party/xz-5.8.3/COPYING.GPLv3 | 674 + cpp/third_party/xz-5.8.3/COPYING.LGPLv2.1 | 501 + cpp/third_party/xz-5.8.3/ChangeLog | 19452 +++++++++++ cpp/third_party/xz-5.8.3/INSTALL | 976 + cpp/third_party/xz-5.8.3/INSTALL.generic | 368 + cpp/third_party/xz-5.8.3/Makefile.am | 123 + cpp/third_party/xz-5.8.3/Makefile.in | 1105 + cpp/third_party/xz-5.8.3/NEWS | 3046 ++ cpp/third_party/xz-5.8.3/PACKAGERS | 245 + cpp/third_party/xz-5.8.3/README | 281 + cpp/third_party/xz-5.8.3/THANKS | 262 + cpp/third_party/xz-5.8.3/TODO | 88 + cpp/third_party/xz-5.8.3/aclocal.m4 | 1363 + cpp/third_party/xz-5.8.3/autogen.sh | 42 + cpp/third_party/xz-5.8.3/build-aux/compile | 364 + .../xz-5.8.3/build-aux/config.guess | 1818 ++ .../xz-5.8.3/build-aux/config.rpath | 751 + cpp/third_party/xz-5.8.3/build-aux/config.sub | 2364 ++ cpp/third_party/xz-5.8.3/build-aux/depcomp | 792 + cpp/third_party/xz-5.8.3/build-aux/install-sh | 541 + .../xz-5.8.3/build-aux/license-check.sh | 177 + cpp/third_party/xz-5.8.3/build-aux/ltmain.sh | 11625 +++++++ cpp/third_party/xz-5.8.3/build-aux/manconv.sh | 56 + cpp/third_party/xz-5.8.3/build-aux/missing | 236 + .../xz-5.8.3/build-aux/test-driver | 160 + cpp/third_party/xz-5.8.3/build-aux/version.sh | 21 + .../xz-5.8.3/cmake/remove-ordinals.cmake | 25 + .../xz-5.8.3/cmake/tuklib_common.cmake | 56 + .../xz-5.8.3/cmake/tuklib_cpucores.cmake | 184 + .../xz-5.8.3/cmake/tuklib_integer.cmake | 288 + .../cmake/tuklib_large_file_support.cmake | 54 + .../xz-5.8.3/cmake/tuklib_mbstr.cmake | 25 + .../xz-5.8.3/cmake/tuklib_physmem.cmake | 153 + .../xz-5.8.3/cmake/tuklib_progname.cmake | 19 + cpp/third_party/xz-5.8.3/config.h.in | 644 + cpp/third_party/xz-5.8.3/configure | 27060 ++++++++++++++++ cpp/third_party/xz-5.8.3/configure.ac | 1452 + cpp/third_party/xz-5.8.3/debug/Makefile.am | 27 + cpp/third_party/xz-5.8.3/debug/Makefile.in | 758 + cpp/third_party/xz-5.8.3/debug/README | 17 + cpp/third_party/xz-5.8.3/debug/crc32.c | 38 + cpp/third_party/xz-5.8.3/debug/full_flush.c | 102 + cpp/third_party/xz-5.8.3/debug/hex2bin.c | 52 + cpp/third_party/xz-5.8.3/debug/known_sizes.c | 128 + cpp/third_party/xz-5.8.3/debug/memusage.c | 50 + cpp/third_party/xz-5.8.3/debug/repeat.c | 35 + cpp/third_party/xz-5.8.3/debug/sync_flush.c | 124 + .../xz-5.8.3/debug/testfilegen-arm64.c | 116 + .../xz-5.8.3/debug/translation.bash | 95 + .../xz-5.8.3/doc/examples/00_README.txt | 31 + .../xz-5.8.3/doc/examples/01_compress_easy.c | 296 + .../xz-5.8.3/doc/examples/02_decompress.c | 286 + .../doc/examples/03_compress_custom.c | 192 + .../doc/examples/04_compress_easy_mt.c | 205 + .../xz-5.8.3/doc/examples/11_file_info.c | 205 + .../xz-5.8.3/doc/examples/Makefile | 21 + cpp/third_party/xz-5.8.3/doc/faq.txt | 244 + cpp/third_party/xz-5.8.3/doc/history.txt | 150 + .../xz-5.8.3/doc/lzma-file-format.txt | 173 + .../xz-5.8.3/doc/man/txt/lzmainfo.txt | 35 + cpp/third_party/xz-5.8.3/doc/man/txt/xz.txt | 1651 + .../xz-5.8.3/doc/man/txt/xzdec.txt | 74 + .../xz-5.8.3/doc/man/txt/xzdiff.txt | 37 + .../xz-5.8.3/doc/man/txt/xzgrep.txt | 67 + .../xz-5.8.3/doc/man/txt/xzless.txt | 36 + .../xz-5.8.3/doc/man/txt/xzmore.txt | 30 + .../xz-5.8.3/doc/xz-file-format.txt | 1174 + cpp/third_party/xz-5.8.3/dos/INSTALL.txt | 78 + cpp/third_party/xz-5.8.3/dos/Makefile | 150 + cpp/third_party/xz-5.8.3/dos/README.txt | 123 + cpp/third_party/xz-5.8.3/dos/config.h | 146 + cpp/third_party/xz-5.8.3/doxygen/Doxyfile | 45 + .../xz-5.8.3/doxygen/update-doxygen | 114 + .../xz-5.8.3/extra/7z2lzma/7z2lzma.bash | 113 + .../xz-5.8.3/extra/scanlzma/scanlzma.c | 90 + cpp/third_party/xz-5.8.3/lib/Makefile.am | 44 + cpp/third_party/xz-5.8.3/lib/Makefile.in | 625 + cpp/third_party/xz-5.8.3/lib/getopt-cdefs.h | 72 + cpp/third_party/xz-5.8.3/lib/getopt-core.h | 98 + cpp/third_party/xz-5.8.3/lib/getopt-ext.h | 79 + .../xz-5.8.3/lib/getopt-pfx-core.h | 68 + cpp/third_party/xz-5.8.3/lib/getopt-pfx-ext.h | 72 + cpp/third_party/xz-5.8.3/lib/getopt.c | 823 + cpp/third_party/xz-5.8.3/lib/getopt.in.h | 60 + cpp/third_party/xz-5.8.3/lib/getopt1.c | 163 + cpp/third_party/xz-5.8.3/lib/getopt_int.h | 120 + cpp/third_party/xz-5.8.3/m4/ax_pthread.m4 | 524 + cpp/third_party/xz-5.8.3/m4/build-to-host.m4 | 274 + cpp/third_party/xz-5.8.3/m4/getopt.m4 | 70 + cpp/third_party/xz-5.8.3/m4/gettext.m4 | 392 + cpp/third_party/xz-5.8.3/m4/host-cpu-c-abi.m4 | 529 + cpp/third_party/xz-5.8.3/m4/iconv.m4 | 324 + cpp/third_party/xz-5.8.3/m4/intlmacosx.m4 | 71 + cpp/third_party/xz-5.8.3/m4/lib-ld.m4 | 170 + cpp/third_party/xz-5.8.3/m4/lib-link.m4 | 815 + cpp/third_party/xz-5.8.3/m4/lib-prefix.m4 | 334 + cpp/third_party/xz-5.8.3/m4/libtool.m4 | 8880 +++++ cpp/third_party/xz-5.8.3/m4/ltoptions.m4 | 519 + cpp/third_party/xz-5.8.3/m4/ltsugar.m4 | 124 + cpp/third_party/xz-5.8.3/m4/ltversion.m4 | 24 + cpp/third_party/xz-5.8.3/m4/lt~obsolete.m4 | 99 + cpp/third_party/xz-5.8.3/m4/nls.m4 | 33 + cpp/third_party/xz-5.8.3/m4/po.m4 | 456 + cpp/third_party/xz-5.8.3/m4/posix-shell.m4 | 66 + cpp/third_party/xz-5.8.3/m4/progtest.m4 | 92 + cpp/third_party/xz-5.8.3/m4/tuklib_common.m4 | 23 + .../xz-5.8.3/m4/tuklib_cpucores.m4 | 181 + cpp/third_party/xz-5.8.3/m4/tuklib_integer.m4 | 260 + cpp/third_party/xz-5.8.3/m4/tuklib_mbstr.m4 | 31 + cpp/third_party/xz-5.8.3/m4/tuklib_physmem.m4 | 217 + .../xz-5.8.3/m4/tuklib_progname.m4 | 29 + cpp/third_party/xz-5.8.3/m4/visibility.m4 | 85 + cpp/third_party/xz-5.8.3/po/LINGUAS | 25 + cpp/third_party/xz-5.8.3/po/Makefile.in.in | 517 + cpp/third_party/xz-5.8.3/po/Makevars | 91 + cpp/third_party/xz-5.8.3/po/POTFILES.in | 19 + cpp/third_party/xz-5.8.3/po/Rules-quot | 66 + cpp/third_party/xz-5.8.3/po/boldquot.sed | 21 + cpp/third_party/xz-5.8.3/po/ca.gmo | Bin 0 -> 15587 bytes cpp/third_party/xz-5.8.3/po/ca.po | 1633 + cpp/third_party/xz-5.8.3/po/cs.gmo | Bin 0 -> 7983 bytes cpp/third_party/xz-5.8.3/po/cs.po | 1679 + cpp/third_party/xz-5.8.3/po/da.gmo | Bin 0 -> 9040 bytes cpp/third_party/xz-5.8.3/po/da.po | 1436 + cpp/third_party/xz-5.8.3/po/de.gmo | Bin 0 -> 29882 bytes cpp/third_party/xz-5.8.3/po/de.po | 1267 + .../xz-5.8.3/po/en@boldquot.header | 35 + cpp/third_party/xz-5.8.3/po/en@quot.header | 32 + cpp/third_party/xz-5.8.3/po/eo.gmo | Bin 0 -> 15060 bytes cpp/third_party/xz-5.8.3/po/eo.po | 1627 + cpp/third_party/xz-5.8.3/po/es.gmo | Bin 0 -> 29244 bytes cpp/third_party/xz-5.8.3/po/es.po | 1266 + cpp/third_party/xz-5.8.3/po/fi.gmo | Bin 0 -> 28225 bytes cpp/third_party/xz-5.8.3/po/fi.po | 1266 + cpp/third_party/xz-5.8.3/po/fr.gmo | Bin 0 -> 10232 bytes cpp/third_party/xz-5.8.3/po/fr.po | 1668 + cpp/third_party/xz-5.8.3/po/hr.gmo | Bin 0 -> 28799 bytes cpp/third_party/xz-5.8.3/po/hr.po | 1271 + cpp/third_party/xz-5.8.3/po/hu.gmo | Bin 0 -> 15949 bytes cpp/third_party/xz-5.8.3/po/hu.po | 1673 + cpp/third_party/xz-5.8.3/po/insert-header.sed | 31 + cpp/third_party/xz-5.8.3/po/it.gmo | Bin 0 -> 28688 bytes cpp/third_party/xz-5.8.3/po/it.po | 1270 + cpp/third_party/xz-5.8.3/po/ka.gmo | Bin 0 -> 46526 bytes cpp/third_party/xz-5.8.3/po/ka.po | 1264 + cpp/third_party/xz-5.8.3/po/ko.gmo | Bin 0 -> 29850 bytes cpp/third_party/xz-5.8.3/po/ko.po | 1266 + cpp/third_party/xz-5.8.3/po/nl.gmo | Bin 0 -> 28532 bytes cpp/third_party/xz-5.8.3/po/nl.po | 1269 + cpp/third_party/xz-5.8.3/po/pl.gmo | Bin 0 -> 29090 bytes cpp/third_party/xz-5.8.3/po/pl.po | 1266 + cpp/third_party/xz-5.8.3/po/pt.gmo | Bin 0 -> 28796 bytes cpp/third_party/xz-5.8.3/po/pt.po | 1278 + cpp/third_party/xz-5.8.3/po/pt_BR.gmo | Bin 0 -> 15660 bytes cpp/third_party/xz-5.8.3/po/pt_BR.po | 1683 + cpp/third_party/xz-5.8.3/po/quot.sed | 17 + .../xz-5.8.3/po/remove-potcdate.sed | 25 + cpp/third_party/xz-5.8.3/po/ro.gmo | Bin 0 -> 30418 bytes cpp/third_party/xz-5.8.3/po/ro.po | 1311 + cpp/third_party/xz-5.8.3/po/sr.gmo | Bin 0 -> 36503 bytes cpp/third_party/xz-5.8.3/po/sr.po | 1264 + cpp/third_party/xz-5.8.3/po/stamp-po | 1 + cpp/third_party/xz-5.8.3/po/sv.gmo | Bin 0 -> 28399 bytes cpp/third_party/xz-5.8.3/po/sv.po | 1271 + cpp/third_party/xz-5.8.3/po/tr.gmo | Bin 0 -> 28887 bytes cpp/third_party/xz-5.8.3/po/tr.po | 1264 + cpp/third_party/xz-5.8.3/po/uk.gmo | Bin 0 -> 39005 bytes cpp/third_party/xz-5.8.3/po/uk.po | 1268 + cpp/third_party/xz-5.8.3/po/vi.gmo | Bin 0 -> 16808 bytes cpp/third_party/xz-5.8.3/po/vi.po | 1671 + cpp/third_party/xz-5.8.3/po/xz.pot | 1264 + cpp/third_party/xz-5.8.3/po/xz.pot-header | 7 + cpp/third_party/xz-5.8.3/po/zh_CN.gmo | Bin 0 -> 14488 bytes cpp/third_party/xz-5.8.3/po/zh_CN.po | 1650 + cpp/third_party/xz-5.8.3/po/zh_TW.gmo | Bin 0 -> 26773 bytes cpp/third_party/xz-5.8.3/po/zh_TW.po | 1267 + cpp/third_party/xz-5.8.3/po4a/ar.po | 3905 +++ cpp/third_party/xz-5.8.3/po4a/de.po | 3919 +++ cpp/third_party/xz-5.8.3/po4a/fr.po | 3978 +++ cpp/third_party/xz-5.8.3/po4a/it.po | 3896 +++ cpp/third_party/xz-5.8.3/po4a/ko.po | 3904 +++ .../xz-5.8.3/po4a/man/ar/lzmainfo.1 | 41 + cpp/third_party/xz-5.8.3/po4a/man/ar/xz.1 | 1791 + cpp/third_party/xz-5.8.3/po4a/man/ar/xzdec.1 | 77 + cpp/third_party/xz-5.8.3/po4a/man/ar/xzdiff.1 | 52 + cpp/third_party/xz-5.8.3/po4a/man/ar/xzgrep.1 | 89 + cpp/third_party/xz-5.8.3/po4a/man/ar/xzless.1 | 45 + cpp/third_party/xz-5.8.3/po4a/man/ar/xzmore.1 | 47 + .../xz-5.8.3/po4a/man/de/lzmainfo.1 | 46 + cpp/third_party/xz-5.8.3/po4a/man/de/xz.1 | 2117 ++ cpp/third_party/xz-5.8.3/po4a/man/de/xzdec.1 | 88 + cpp/third_party/xz-5.8.3/po4a/man/de/xzdiff.1 | 59 + cpp/third_party/xz-5.8.3/po4a/man/de/xzgrep.1 | 97 + cpp/third_party/xz-5.8.3/po4a/man/de/xzless.1 | 50 + cpp/third_party/xz-5.8.3/po4a/man/de/xzmore.1 | 52 + .../xz-5.8.3/po4a/man/fr/lzmainfo.1 | 47 + cpp/third_party/xz-5.8.3/po4a/man/fr/xz.1 | 2027 ++ cpp/third_party/xz-5.8.3/po4a/man/fr/xzdec.1 | 90 + cpp/third_party/xz-5.8.3/po4a/man/fr/xzless.1 | 49 + .../xz-5.8.3/po4a/man/it/lzmainfo.1 | 45 + cpp/third_party/xz-5.8.3/po4a/man/it/xz.1 | 2080 ++ cpp/third_party/xz-5.8.3/po4a/man/it/xzdec.1 | 88 + cpp/third_party/xz-5.8.3/po4a/man/it/xzdiff.1 | 55 + cpp/third_party/xz-5.8.3/po4a/man/it/xzgrep.1 | 94 + cpp/third_party/xz-5.8.3/po4a/man/it/xzless.1 | 47 + cpp/third_party/xz-5.8.3/po4a/man/it/xzmore.1 | 50 + .../xz-5.8.3/po4a/man/ko/lzmainfo.1 | 38 + cpp/third_party/xz-5.8.3/po4a/man/ko/xz.1 | 1585 + cpp/third_party/xz-5.8.3/po4a/man/ko/xzdec.1 | 72 + cpp/third_party/xz-5.8.3/po4a/man/ko/xzdiff.1 | 52 + cpp/third_party/xz-5.8.3/po4a/man/ko/xzgrep.1 | 85 + cpp/third_party/xz-5.8.3/po4a/man/ko/xzless.1 | 41 + cpp/third_party/xz-5.8.3/po4a/man/ko/xzmore.1 | 44 + .../xz-5.8.3/po4a/man/pt_BR/lzmainfo.1 | 45 + cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xz.1 | 1994 ++ .../xz-5.8.3/po4a/man/pt_BR/xzdec.1 | 87 + .../xz-5.8.3/po4a/man/pt_BR/xzless.1 | 48 + .../xz-5.8.3/po4a/man/ro/lzmainfo.1 | 57 + cpp/third_party/xz-5.8.3/po4a/man/ro/xz.1 | 2111 ++ cpp/third_party/xz-5.8.3/po4a/man/ro/xzdec.1 | 101 + cpp/third_party/xz-5.8.3/po4a/man/ro/xzdiff.1 | 70 + cpp/third_party/xz-5.8.3/po4a/man/ro/xzgrep.1 | 107 + cpp/third_party/xz-5.8.3/po4a/man/ro/xzless.1 | 60 + cpp/third_party/xz-5.8.3/po4a/man/ro/xzmore.1 | 62 + .../xz-5.8.3/po4a/man/sr/lzmainfo.1 | 42 + cpp/third_party/xz-5.8.3/po4a/man/sr/xz.1 | 1928 ++ cpp/third_party/xz-5.8.3/po4a/man/sr/xzdec.1 | 81 + cpp/third_party/xz-5.8.3/po4a/man/sr/xzdiff.1 | 54 + cpp/third_party/xz-5.8.3/po4a/man/sr/xzgrep.1 | 92 + cpp/third_party/xz-5.8.3/po4a/man/sr/xzless.1 | 47 + cpp/third_party/xz-5.8.3/po4a/man/sr/xzmore.1 | 49 + .../xz-5.8.3/po4a/man/sv/lzmainfo.1 | 42 + cpp/third_party/xz-5.8.3/po4a/man/sv/xz.1 | 1954 ++ cpp/third_party/xz-5.8.3/po4a/man/sv/xzdec.1 | 87 + cpp/third_party/xz-5.8.3/po4a/man/sv/xzdiff.1 | 54 + cpp/third_party/xz-5.8.3/po4a/man/sv/xzgrep.1 | 92 + cpp/third_party/xz-5.8.3/po4a/man/sv/xzless.1 | 47 + cpp/third_party/xz-5.8.3/po4a/man/sv/xzmore.1 | 48 + .../xz-5.8.3/po4a/man/uk/lzmainfo.1 | 45 + cpp/third_party/xz-5.8.3/po4a/man/uk/xz.1 | 2039 ++ cpp/third_party/xz-5.8.3/po4a/man/uk/xzdec.1 | 85 + cpp/third_party/xz-5.8.3/po4a/man/uk/xzdiff.1 | 56 + cpp/third_party/xz-5.8.3/po4a/man/uk/xzgrep.1 | 96 + cpp/third_party/xz-5.8.3/po4a/man/uk/xzless.1 | 49 + cpp/third_party/xz-5.8.3/po4a/man/uk/xzmore.1 | 51 + cpp/third_party/xz-5.8.3/po4a/po4a.conf | 16 + cpp/third_party/xz-5.8.3/po4a/pt_BR.po | 4003 +++ cpp/third_party/xz-5.8.3/po4a/ro.po | 3936 +++ cpp/third_party/xz-5.8.3/po4a/sr.po | 3908 +++ cpp/third_party/xz-5.8.3/po4a/sv.po | 3904 +++ cpp/third_party/xz-5.8.3/po4a/uk.po | 3908 +++ cpp/third_party/xz-5.8.3/po4a/update-po | 93 + cpp/third_party/xz-5.8.3/po4a/xz-man.pot | 3889 +++ cpp/third_party/xz-5.8.3/src/Makefile.am | 45 + cpp/third_party/xz-5.8.3/src/Makefile.in | 717 + .../xz-5.8.3/src/common/common_w32res.rc | 57 + .../xz-5.8.3/src/common/my_landlock.h | 184 + .../xz-5.8.3/src/common/mythread.h | 549 + cpp/third_party/xz-5.8.3/src/common/sysdefs.h | 229 + .../xz-5.8.3/src/common/tuklib_common.h | 95 + .../xz-5.8.3/src/common/tuklib_config.h | 12 + .../xz-5.8.3/src/common/tuklib_cpucores.c | 108 + .../xz-5.8.3/src/common/tuklib_cpucores.h | 22 + .../xz-5.8.3/src/common/tuklib_exit.c | 57 + .../xz-5.8.3/src/common/tuklib_exit.h | 24 + .../xz-5.8.3/src/common/tuklib_gettext.h | 54 + .../xz-5.8.3/src/common/tuklib_integer.h | 953 + .../xz-5.8.3/src/common/tuklib_mbstr.h | 78 + .../xz-5.8.3/src/common/tuklib_mbstr_fw.c | 30 + .../src/common/tuklib_mbstr_nonprint.c | 162 + .../src/common/tuklib_mbstr_nonprint.h | 71 + .../xz-5.8.3/src/common/tuklib_mbstr_width.c | 86 + .../xz-5.8.3/src/common/tuklib_mbstr_wrap.c | 294 + .../xz-5.8.3/src/common/tuklib_mbstr_wrap.h | 204 + .../xz-5.8.3/src/common/tuklib_open_stdxxx.c | 56 + .../xz-5.8.3/src/common/tuklib_open_stdxxx.h | 22 + .../xz-5.8.3/src/common/tuklib_physmem.c | 224 + .../xz-5.8.3/src/common/tuklib_physmem.h | 27 + .../xz-5.8.3/src/common/tuklib_progname.c | 49 + .../xz-5.8.3/src/common/tuklib_progname.h | 31 + .../src/common/w32_application.manifest | 28 + .../w32_application.manifest.comments.txt | 192 + .../xz-5.8.3/src/liblzma/Makefile.am | 128 + .../xz-5.8.3/src/liblzma/Makefile.in | 2237 ++ .../xz-5.8.3/src/liblzma/api/Makefile.am | 38 + .../xz-5.8.3/src/liblzma/api/Makefile.in | 665 + .../xz-5.8.3/src/liblzma/api/lzma.h | 327 + .../xz-5.8.3/src/liblzma/api/lzma/base.h | 749 + .../xz-5.8.3/src/liblzma/api/lzma/bcj.h | 195 + .../xz-5.8.3/src/liblzma/api/lzma/block.h | 694 + .../xz-5.8.3/src/liblzma/api/lzma/check.h | 163 + .../xz-5.8.3/src/liblzma/api/lzma/container.h | 993 + .../xz-5.8.3/src/liblzma/api/lzma/delta.h | 95 + .../xz-5.8.3/src/liblzma/api/lzma/filter.h | 769 + .../xz-5.8.3/src/liblzma/api/lzma/hardware.h | 62 + .../xz-5.8.3/src/liblzma/api/lzma/index.h | 882 + .../src/liblzma/api/lzma/index_hash.h | 123 + .../xz-5.8.3/src/liblzma/api/lzma/lzma12.h | 568 + .../src/liblzma/api/lzma/stream_flags.h | 265 + .../xz-5.8.3/src/liblzma/api/lzma/version.h | 134 + .../xz-5.8.3/src/liblzma/api/lzma/vli.h | 166 + .../xz-5.8.3/src/liblzma/check/Makefile.inc | 50 + .../xz-5.8.3/src/liblzma/check/check.c | 173 + .../xz-5.8.3/src/liblzma/check/check.h | 156 + .../xz-5.8.3/src/liblzma/check/crc32_arm64.h | 148 + .../xz-5.8.3/src/liblzma/check/crc32_fast.c | 196 + .../src/liblzma/check/crc32_loongarch.h | 65 + .../xz-5.8.3/src/liblzma/check/crc32_small.c | 70 + .../src/liblzma/check/crc32_table_be.h | 527 + .../src/liblzma/check/crc32_table_le.h | 527 + .../src/liblzma/check/crc32_tablegen.c | 120 + .../xz-5.8.3/src/liblzma/check/crc32_x86.S | 308 + .../xz-5.8.3/src/liblzma/check/crc64_fast.c | 161 + .../xz-5.8.3/src/liblzma/check/crc64_small.c | 57 + .../src/liblzma/check/crc64_table_be.h | 523 + .../src/liblzma/check/crc64_table_le.h | 523 + .../src/liblzma/check/crc64_tablegen.c | 89 + .../xz-5.8.3/src/liblzma/check/crc64_x86.S | 291 + .../src/liblzma/check/crc_clmul_consts_gen.c | 160 + .../xz-5.8.3/src/liblzma/check/crc_common.h | 181 + .../src/liblzma/check/crc_x86_clmul.h | 377 + .../xz-5.8.3/src/liblzma/check/sha256.c | 189 + .../xz-5.8.3/src/liblzma/common/Makefile.inc | 100 + .../src/liblzma/common/alone_decoder.c | 249 + .../src/liblzma/common/alone_decoder.h | 22 + .../src/liblzma/common/alone_encoder.c | 151 + .../src/liblzma/common/auto_decoder.c | 204 + .../src/liblzma/common/block_buffer_decoder.c | 79 + .../src/liblzma/common/block_buffer_encoder.c | 354 + .../src/liblzma/common/block_buffer_encoder.h | 23 + .../src/liblzma/common/block_decoder.c | 286 + .../src/liblzma/common/block_decoder.h | 21 + .../src/liblzma/common/block_encoder.c | 224 + .../src/liblzma/common/block_encoder.h | 46 + .../src/liblzma/common/block_header_decoder.c | 114 + .../src/liblzma/common/block_header_encoder.c | 131 + .../xz-5.8.3/src/liblzma/common/block_util.c | 89 + .../xz-5.8.3/src/liblzma/common/common.c | 486 + .../xz-5.8.3/src/liblzma/common/common.h | 412 + .../src/liblzma/common/easy_buffer_encoder.c | 26 + .../liblzma/common/easy_decoder_memusage.c | 23 + .../src/liblzma/common/easy_encoder.c | 23 + .../liblzma/common/easy_encoder_memusage.c | 23 + .../xz-5.8.3/src/liblzma/common/easy_preset.c | 26 + .../xz-5.8.3/src/liblzma/common/easy_preset.h | 36 + .../xz-5.8.3/src/liblzma/common/file_info.c | 850 + .../liblzma/common/filter_buffer_decoder.c | 87 + .../liblzma/common/filter_buffer_encoder.c | 54 + .../src/liblzma/common/filter_common.c | 393 + .../src/liblzma/common/filter_common.h | 50 + .../src/liblzma/common/filter_decoder.c | 214 + .../src/liblzma/common/filter_decoder.h | 22 + .../src/liblzma/common/filter_encoder.c | 330 + .../src/liblzma/common/filter_encoder.h | 22 + .../src/liblzma/common/filter_flags_decoder.c | 45 + .../src/liblzma/common/filter_flags_encoder.c | 55 + .../src/liblzma/common/hardware_cputhreads.c | 33 + .../src/liblzma/common/hardware_physmem.c | 24 + .../xz-5.8.3/src/liblzma/common/index.c | 1289 + .../xz-5.8.3/src/liblzma/common/index.h | 80 + .../src/liblzma/common/index_decoder.c | 369 + .../src/liblzma/common/index_decoder.h | 24 + .../src/liblzma/common/index_encoder.c | 260 + .../src/liblzma/common/index_encoder.h | 22 + .../xz-5.8.3/src/liblzma/common/index_hash.c | 341 + .../src/liblzma/common/lzip_decoder.c | 414 + .../src/liblzma/common/lzip_decoder.h | 21 + .../xz-5.8.3/src/liblzma/common/memcmplen.h | 192 + .../src/liblzma/common/microlzma_decoder.c | 220 + .../src/liblzma/common/microlzma_encoder.c | 140 + .../xz-5.8.3/src/liblzma/common/outqueue.c | 286 + .../xz-5.8.3/src/liblzma/common/outqueue.h | 259 + .../liblzma/common/stream_buffer_decoder.c | 90 + .../liblzma/common/stream_buffer_encoder.c | 141 + .../src/liblzma/common/stream_decoder.c | 469 + .../src/liblzma/common/stream_decoder.h | 21 + .../src/liblzma/common/stream_decoder_mt.c | 2004 ++ .../src/liblzma/common/stream_encoder.c | 354 + .../src/liblzma/common/stream_encoder_mt.c | 1278 + .../src/liblzma/common/stream_flags_common.c | 46 + .../src/liblzma/common/stream_flags_common.h | 35 + .../src/liblzma/common/stream_flags_decoder.c | 87 + .../src/liblzma/common/stream_flags_encoder.c | 85 + .../src/liblzma/common/string_conversion.c | 1363 + .../xz-5.8.3/src/liblzma/common/vli_decoder.c | 85 + .../xz-5.8.3/src/liblzma/common/vli_encoder.c | 68 + .../xz-5.8.3/src/liblzma/common/vli_size.c | 29 + .../xz-5.8.3/src/liblzma/delta/Makefile.inc | 19 + .../xz-5.8.3/src/liblzma/delta/delta_common.c | 72 + .../xz-5.8.3/src/liblzma/delta/delta_common.h | 19 + .../src/liblzma/delta/delta_decoder.c | 87 + .../src/liblzma/delta/delta_decoder.h | 25 + .../src/liblzma/delta/delta_encoder.c | 132 + .../src/liblzma/delta/delta_encoder.h | 23 + .../src/liblzma/delta/delta_private.h | 36 + .../xz-5.8.3/src/liblzma/liblzma.pc.in | 17 + .../xz-5.8.3/src/liblzma/liblzma_generic.map | 138 + .../xz-5.8.3/src/liblzma/liblzma_linux.map | 153 + .../xz-5.8.3/src/liblzma/liblzma_w32res.rc | 19 + .../xz-5.8.3/src/liblzma/lz/Makefile.inc | 18 + .../xz-5.8.3/src/liblzma/lz/lz_decoder.c | 333 + .../xz-5.8.3/src/liblzma/lz/lz_decoder.h | 325 + .../xz-5.8.3/src/liblzma/lz/lz_encoder.c | 632 + .../xz-5.8.3/src/liblzma/lz/lz_encoder.h | 352 + .../xz-5.8.3/src/liblzma/lz/lz_encoder_hash.h | 122 + .../src/liblzma/lz/lz_encoder_hash_table.h | 70 + .../xz-5.8.3/src/liblzma/lz/lz_encoder_mf.c | 744 + .../xz-5.8.3/src/liblzma/lzma/Makefile.inc | 40 + .../xz-5.8.3/src/liblzma/lzma/fastpos.h | 141 + .../xz-5.8.3/src/liblzma/lzma/fastpos_table.c | 521 + .../src/liblzma/lzma/fastpos_tablegen.c | 58 + .../xz-5.8.3/src/liblzma/lzma/lzma2_decoder.c | 310 + .../xz-5.8.3/src/liblzma/lzma/lzma2_decoder.h | 28 + .../xz-5.8.3/src/liblzma/lzma/lzma2_encoder.c | 413 + .../xz-5.8.3/src/liblzma/lzma/lzma2_encoder.h | 42 + .../xz-5.8.3/src/liblzma/lzma/lzma_common.h | 240 + .../xz-5.8.3/src/liblzma/lzma/lzma_decoder.c | 1263 + .../xz-5.8.3/src/liblzma/lzma/lzma_decoder.h | 53 + .../xz-5.8.3/src/liblzma/lzma/lzma_encoder.c | 786 + .../xz-5.8.3/src/liblzma/lzma/lzma_encoder.h | 58 + .../liblzma/lzma/lzma_encoder_optimum_fast.c | 169 + .../lzma/lzma_encoder_optimum_normal.c | 858 + .../src/liblzma/lzma/lzma_encoder_presets.c | 63 + .../src/liblzma/lzma/lzma_encoder_private.h | 161 + .../src/liblzma/rangecoder/Makefile.inc | 17 + .../xz-5.8.3/src/liblzma/rangecoder/price.h | 92 + .../src/liblzma/rangecoder/price_table.c | 24 + .../src/liblzma/rangecoder/price_tablegen.c | 93 + .../src/liblzma/rangecoder/range_common.h | 77 + .../src/liblzma/rangecoder/range_decoder.h | 967 + .../src/liblzma/rangecoder/range_encoder.h | 349 + .../xz-5.8.3/src/liblzma/simple/Makefile.inc | 51 + .../xz-5.8.3/src/liblzma/simple/arm.c | 76 + .../xz-5.8.3/src/liblzma/simple/arm64.c | 156 + .../xz-5.8.3/src/liblzma/simple/armthumb.c | 84 + .../xz-5.8.3/src/liblzma/simple/ia64.c | 117 + .../xz-5.8.3/src/liblzma/simple/powerpc.c | 81 + .../xz-5.8.3/src/liblzma/simple/riscv.c | 773 + .../src/liblzma/simple/simple_coder.c | 291 + .../src/liblzma/simple/simple_coder.h | 89 + .../src/liblzma/simple/simple_decoder.c | 39 + .../src/liblzma/simple/simple_decoder.h | 21 + .../src/liblzma/simple/simple_encoder.c | 37 + .../src/liblzma/simple/simple_encoder.h | 22 + .../src/liblzma/simple/simple_private.h | 73 + .../xz-5.8.3/src/liblzma/simple/sparc.c | 87 + .../xz-5.8.3/src/liblzma/simple/x86.c | 181 + .../xz-5.8.3/src/liblzma/validate_map.sh | 163 + .../xz-5.8.3/src/lzmainfo/Makefile.am | 66 + .../xz-5.8.3/src/lzmainfo/Makefile.in | 936 + .../xz-5.8.3/src/lzmainfo/lzmainfo.1 | 58 + .../xz-5.8.3/src/lzmainfo/lzmainfo.c | 243 + .../xz-5.8.3/src/lzmainfo/lzmainfo_w32res.rc | 11 + .../xz-5.8.3/src/scripts/Makefile.am | 85 + .../xz-5.8.3/src/scripts/Makefile.in | 713 + cpp/third_party/xz-5.8.3/src/scripts/xzdiff.1 | 99 + .../xz-5.8.3/src/scripts/xzdiff.in | 224 + cpp/third_party/xz-5.8.3/src/scripts/xzgrep.1 | 148 + .../xz-5.8.3/src/scripts/xzgrep.in | 302 + cpp/third_party/xz-5.8.3/src/scripts/xzless.1 | 69 + .../xz-5.8.3/src/scripts/xzless.in | 76 + cpp/third_party/xz-5.8.3/src/scripts/xzmore.1 | 69 + .../xz-5.8.3/src/scripts/xzmore.in | 82 + cpp/third_party/xz-5.8.3/src/xz/Makefile.am | 135 + cpp/third_party/xz-5.8.3/src/xz/Makefile.in | 1231 + cpp/third_party/xz-5.8.3/src/xz/args.c | 914 + cpp/third_party/xz-5.8.3/src/xz/args.h | 44 + cpp/third_party/xz-5.8.3/src/xz/coder.c | 1476 + cpp/third_party/xz-5.8.3/src/xz/coder.h | 107 + cpp/third_party/xz-5.8.3/src/xz/file_io.c | 1485 + cpp/third_party/xz-5.8.3/src/xz/file_io.h | 188 + cpp/third_party/xz-5.8.3/src/xz/hardware.c | 413 + cpp/third_party/xz-5.8.3/src/xz/hardware.h | 74 + cpp/third_party/xz-5.8.3/src/xz/list.c | 1357 + cpp/third_party/xz-5.8.3/src/xz/list.h | 17 + cpp/third_party/xz-5.8.3/src/xz/main.c | 381 + cpp/third_party/xz-5.8.3/src/xz/main.h | 29 + cpp/third_party/xz-5.8.3/src/xz/message.c | 1326 + cpp/third_party/xz-5.8.3/src/xz/message.h | 168 + cpp/third_party/xz-5.8.3/src/xz/mytime.c | 177 + cpp/third_party/xz-5.8.3/src/xz/mytime.h | 48 + cpp/third_party/xz-5.8.3/src/xz/options.c | 361 + cpp/third_party/xz-5.8.3/src/xz/options.h | 30 + cpp/third_party/xz-5.8.3/src/xz/private.h | 81 + cpp/third_party/xz-5.8.3/src/xz/sandbox.c | 317 + cpp/third_party/xz-5.8.3/src/xz/sandbox.h | 43 + cpp/third_party/xz-5.8.3/src/xz/signals.c | 237 + cpp/third_party/xz-5.8.3/src/xz/signals.h | 42 + cpp/third_party/xz-5.8.3/src/xz/suffix.c | 408 + cpp/third_party/xz-5.8.3/src/xz/suffix.h | 35 + cpp/third_party/xz-5.8.3/src/xz/util.c | 315 + cpp/third_party/xz-5.8.3/src/xz/util.h | 132 + cpp/third_party/xz-5.8.3/src/xz/xz.1 | 3264 ++ cpp/third_party/xz-5.8.3/src/xz/xz_w32res.rc | 11 + .../xz-5.8.3/src/xzdec/Makefile.am | 111 + .../xz-5.8.3/src/xzdec/Makefile.in | 1019 + .../xz-5.8.3/src/xzdec/lzmadec_w32res.rc | 11 + cpp/third_party/xz-5.8.3/src/xzdec/xzdec.1 | 144 + cpp/third_party/xz-5.8.3/src/xzdec/xzdec.c | 489 + .../xz-5.8.3/src/xzdec/xzdec_w32res.rc | 11 + cpp/third_party/xz-5.8.3/tests/Makefile.am | 83 + cpp/third_party/xz-5.8.3/tests/Makefile.in | 1414 + .../xz-5.8.3/tests/create_compress_files.c | 162 + cpp/third_party/xz-5.8.3/tests/files/README | 415 + .../tests/files/bad-0-backward_size.xz | Bin 0 -> 32 bytes .../tests/files/bad-0-empty-truncated.xz | Bin 0 -> 31 bytes .../tests/files/bad-0-footer_magic.xz | Bin 0 -> 32 bytes .../tests/files/bad-0-header_magic.xz | Bin 0 -> 32 bytes .../tests/files/bad-0-nonempty_index.xz | Bin 0 -> 32 bytes .../xz-5.8.3/tests/files/bad-0cat-alone.xz | Bin 0 -> 55 bytes .../tests/files/bad-0cat-header_magic.xz | Bin 0 -> 64 bytes .../xz-5.8.3/tests/files/bad-0catpad-empty.xz | Bin 0 -> 69 bytes .../xz-5.8.3/tests/files/bad-0pad-empty.xz | Bin 0 -> 37 bytes .../tests/files/bad-1-block_header-1.xz | Bin 0 -> 64 bytes .../tests/files/bad-1-block_header-2.xz | Bin 0 -> 64 bytes .../tests/files/bad-1-block_header-3.xz | Bin 0 -> 68 bytes .../tests/files/bad-1-block_header-4.xz | Bin 0 -> 76 bytes .../tests/files/bad-1-block_header-5.xz | Bin 0 -> 72 bytes .../tests/files/bad-1-block_header-6.xz | Bin 0 -> 72 bytes .../tests/files/bad-1-check-crc32-2.xz | Bin 0 -> 72 bytes .../xz-5.8.3/tests/files/bad-1-check-crc32.xz | Bin 0 -> 68 bytes .../xz-5.8.3/tests/files/bad-1-check-crc64.xz | Bin 0 -> 72 bytes .../tests/files/bad-1-check-sha256.xz | Bin 0 -> 96 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-1.xz | Bin 0 -> 64 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-10.xz | Bin 0 -> 60 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-11.xz | Bin 0 -> 64 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-2.xz | Bin 0 -> 424 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-3.xz | Bin 0 -> 424 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-4.xz | Bin 0 -> 408 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-5.xz | Bin 0 -> 408 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-6.xz | Bin 0 -> 68 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-7.xz | Bin 0 -> 408 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-8.xz | Bin 0 -> 464 bytes .../xz-5.8.3/tests/files/bad-1-lzma2-9.xz | Bin 0 -> 72 bytes .../tests/files/bad-1-stream_flags-1.xz | Bin 0 -> 68 bytes .../tests/files/bad-1-stream_flags-2.xz | Bin 0 -> 68 bytes .../tests/files/bad-1-stream_flags-3.xz | Bin 0 -> 68 bytes .../tests/files/bad-1-v0-uncomp-size.lz | Bin 0 -> 42 bytes .../xz-5.8.3/tests/files/bad-1-v1-crc32.lz | Bin 0 -> 50 bytes .../xz-5.8.3/tests/files/bad-1-v1-dict-1.lz | Bin 0 -> 50 bytes .../xz-5.8.3/tests/files/bad-1-v1-dict-2.lz | Bin 0 -> 50 bytes .../xz-5.8.3/tests/files/bad-1-v1-magic-1.lz | Bin 0 -> 50 bytes .../xz-5.8.3/tests/files/bad-1-v1-magic-2.lz | Bin 0 -> 50 bytes .../tests/files/bad-1-v1-member-size.lz | Bin 0 -> 50 bytes .../tests/files/bad-1-v1-trailing-magic.lz | Bin 0 -> 54 bytes .../tests/files/bad-1-v1-uncomp-size.lz | Bin 0 -> 50 bytes .../xz-5.8.3/tests/files/bad-1-vli-1.xz | Bin 0 -> 72 bytes .../xz-5.8.3/tests/files/bad-1-vli-2.xz | Bin 0 -> 76 bytes .../files/bad-2-compressed_data_padding.xz | Bin 0 -> 92 bytes .../xz-5.8.3/tests/files/bad-2-index-1.xz | Bin 0 -> 92 bytes .../xz-5.8.3/tests/files/bad-2-index-2.xz | Bin 0 -> 92 bytes .../xz-5.8.3/tests/files/bad-2-index-3.xz | Bin 0 -> 92 bytes .../xz-5.8.3/tests/files/bad-2-index-4.xz | Bin 0 -> 92 bytes .../xz-5.8.3/tests/files/bad-2-index-5.xz | Bin 0 -> 92 bytes .../files/bad-3-index-uncomp-overflow.xz | Bin 0 -> 132 bytes .../files/bad-too_big_size-with_eopm.lzma | Bin 0 -> 37 bytes .../bad-too_small_size-without_eopm-1.lzma | Bin 0 -> 31 bytes .../bad-too_small_size-without_eopm-2.lzma | Bin 0 -> 31 bytes .../bad-too_small_size-without_eopm-3.lzma | Bin 0 -> 36 bytes .../files/bad-unknown_size-without_eopm.lzma | Bin 0 -> 31 bytes .../xz-5.8.3/tests/files/good-0-empty.xz | Bin 0 -> 32 bytes .../xz-5.8.3/tests/files/good-0cat-empty.xz | Bin 0 -> 64 bytes .../tests/files/good-0catpad-empty.xz | Bin 0 -> 68 bytes .../xz-5.8.3/tests/files/good-0pad-empty.xz | Bin 0 -> 36 bytes .../tests/files/good-1-3delta-lzma2.xz | Bin 0 -> 528 bytes .../tests/files/good-1-arm64-lzma2-1.xz | Bin 0 -> 512 bytes .../tests/files/good-1-arm64-lzma2-2.xz | Bin 0 -> 488 bytes .../tests/files/good-1-block_header-1.xz | Bin 0 -> 72 bytes .../tests/files/good-1-block_header-2.xz | Bin 0 -> 68 bytes .../tests/files/good-1-block_header-3.xz | Bin 0 -> 68 bytes .../tests/files/good-1-check-crc32.xz | Bin 0 -> 68 bytes .../tests/files/good-1-check-crc64.xz | Bin 0 -> 72 bytes .../xz-5.8.3/tests/files/good-1-check-none.xz | Bin 0 -> 64 bytes .../tests/files/good-1-check-sha256.xz | Bin 0 -> 96 bytes .../tests/files/good-1-delta-lzma2.tiff.xz | Bin 0 -> 51316 bytes .../tests/files/good-1-empty-bcj-lzma2.xz | Bin 0 -> 52 bytes .../xz-5.8.3/tests/files/good-1-lzma2-1.xz | Bin 0 -> 424 bytes .../xz-5.8.3/tests/files/good-1-lzma2-2.xz | Bin 0 -> 424 bytes .../xz-5.8.3/tests/files/good-1-lzma2-3.xz | Bin 0 -> 408 bytes .../xz-5.8.3/tests/files/good-1-lzma2-4.xz | Bin 0 -> 464 bytes .../xz-5.8.3/tests/files/good-1-lzma2-5.xz | Bin 0 -> 52 bytes .../tests/files/good-1-v0-trailing-1.lz | Bin 0 -> 59 bytes .../xz-5.8.3/tests/files/good-1-v0.lz | Bin 0 -> 42 bytes .../tests/files/good-1-v1-trailing-1.lz | Bin 0 -> 67 bytes .../tests/files/good-1-v1-trailing-2.lz | Bin 0 -> 70 bytes .../xz-5.8.3/tests/files/good-1-v1.lz | Bin 0 -> 50 bytes .../xz-5.8.3/tests/files/good-2-lzma2.xz | Bin 0 -> 92 bytes .../xz-5.8.3/tests/files/good-2-v0-v1.lz | Bin 0 -> 78 bytes .../xz-5.8.3/tests/files/good-2-v1-v0.lz | Bin 0 -> 78 bytes .../xz-5.8.3/tests/files/good-2-v1-v1.lz | Bin 0 -> 86 bytes .../files/good-known_size-with_eopm.lzma | Bin 0 -> 37 bytes .../files/good-known_size-without_eopm.lzma | Bin 0 -> 31 bytes .../files/good-unknown_size-with_eopm.lzma | Bin 0 -> 37 bytes .../tests/files/unsupported-1-v234.lz | Bin 0 -> 50 bytes .../tests/files/unsupported-block_header.xz | Bin 0 -> 68 bytes .../xz-5.8.3/tests/files/unsupported-check.xz | Bin 0 -> 68 bytes .../tests/files/unsupported-filter_flags-1.xz | Bin 0 -> 68 bytes .../tests/files/unsupported-filter_flags-2.xz | Bin 0 -> 68 bytes .../tests/files/unsupported-filter_flags-3.xz | Bin 0 -> 68 bytes .../xz-5.8.3/tests/ossfuzz/Makefile | 17 + .../ossfuzz/config/fuzz_decode_alone.options | 5 + .../ossfuzz/config/fuzz_decode_stream.options | 4 + .../config/fuzz_decode_stream_mt.options | 4 + .../ossfuzz/config/fuzz_encode_stream.options | 4 + .../tests/ossfuzz/config/fuzz_lzma.dict | 22 + .../tests/ossfuzz/config/fuzz_xz.dict | 4 + .../xz-5.8.3/tests/ossfuzz/fuzz_common.h | 72 + .../tests/ossfuzz/fuzz_decode_alone.c | 41 + .../tests/ossfuzz/fuzz_decode_stream.c | 53 + .../tests/ossfuzz/fuzz_decode_stream_mt.c | 47 + .../tests/ossfuzz/fuzz_encode_stream.c | 86 + .../xz-5.8.3/tests/test_bcj_exact_size.c | 123 + .../xz-5.8.3/tests/test_block_header.c | 519 + cpp/third_party/xz-5.8.3/tests/test_check.c | 398 + .../xz-5.8.3/tests/test_compress.sh | 166 + .../tests/test_compress_generated_abc | 4 + .../tests/test_compress_generated_random | 4 + .../tests/test_compress_generated_text | 4 + cpp/third_party/xz-5.8.3/tests/test_files.sh | 208 + .../xz-5.8.3/tests/test_filter_flags.c | 535 + .../xz-5.8.3/tests/test_filter_str.c | 685 + .../xz-5.8.3/tests/test_hardware.c | 49 + cpp/third_party/xz-5.8.3/tests/test_index.c | 1826 ++ .../xz-5.8.3/tests/test_index_hash.c | 385 + .../xz-5.8.3/tests/test_lzip_decoder.c | 475 + .../xz-5.8.3/tests/test_memlimit.c | 172 + .../xz-5.8.3/tests/test_microlzma.c | 568 + .../xz-5.8.3/tests/test_scripts.sh | 82 + .../xz-5.8.3/tests/test_stream_flags.c | 478 + cpp/third_party/xz-5.8.3/tests/test_suffix.sh | 192 + cpp/third_party/xz-5.8.3/tests/test_vli.c | 323 + cpp/third_party/xz-5.8.3/tests/tests.cmake | 228 + cpp/third_party/xz-5.8.3/tests/tests.h | 74 + .../xz-5.8.3/tests/tests_w32res.rc | 18 + cpp/third_party/xz-5.8.3/tests/tuktest.h | 1053 + .../xz-5.8.3/tests/xzgrep_expected_output | 39 + .../xz-5.8.3/windows/INSTALL-MSVC.txt | 44 + .../INSTALL-MinGW-w64_with_Autotools.txt | 49 + .../windows/INSTALL-MinGW-w64_with_CMake.txt | 211 + .../xz-5.8.3/windows/README-Windows.txt | 100 + .../xz-5.8.3/windows/build-with-cmake.bat | 35 + cpp/third_party/xz-5.8.3/windows/build.bash | 245 + .../xz-5.8.3/windows/liblzma-crt-mixing.txt | 70 + cpp/third_party/zstd-1.5.7/.buckconfig | 9 + cpp/third_party/zstd-1.5.7/.buckversion | 1 + cpp/third_party/zstd-1.5.7/.cirrus.yml | 9 + cpp/third_party/zstd-1.5.7/.gitattributes | 21 + .../.github/ISSUE_TEMPLATE/bug_report.md | 35 + .../.github/ISSUE_TEMPLATE/feature_request.md | 20 + .../zstd-1.5.7/.github/dependabot.yml | 6 + .../.github/workflows/android-ndk-build.yml | 39 + .../zstd-1.5.7/.github/workflows/commit.yml | 104 + .../.github/workflows/dev-long-tests.yml | 313 + .../.github/workflows/dev-short-tests.yml | 725 + .../zstd-1.5.7/.github/workflows/nightly.yml | 38 + .../workflows/publish-release-artifacts.yml | 73 + .../.github/workflows/scorecards.yml | 64 + .../.github/workflows/windows-artifacts.yml | 58 + cpp/third_party/zstd-1.5.7/.gitignore | 63 + cpp/third_party/zstd-1.5.7/CHANGELOG | 863 + cpp/third_party/zstd-1.5.7/CODE_OF_CONDUCT.md | 5 + cpp/third_party/zstd-1.5.7/CONTRIBUTING.md | 489 + cpp/third_party/zstd-1.5.7/COPYING | 339 + cpp/third_party/zstd-1.5.7/LICENSE | 30 + cpp/third_party/zstd-1.5.7/Makefile | 471 + cpp/third_party/zstd-1.5.7/Package.swift | 36 + cpp/third_party/zstd-1.5.7/README.md | 237 + cpp/third_party/zstd-1.5.7/SECURITY.md | 15 + cpp/third_party/zstd-1.5.7/TESTING.md | 43 + .../zstd-1.5.7/contrib/VS2005/README.md | 3 + .../contrib/VS2005/fullbench/fullbench.vcproj | 440 + .../contrib/VS2005/fuzzer/fuzzer.vcproj | 488 + .../zstd-1.5.7/contrib/VS2005/zstd.sln | 55 + .../contrib/VS2005/zstd/zstd.vcproj | 552 + .../contrib/VS2005/zstdlib/zstdlib.vcproj | 546 + cpp/third_party/zstd-1.5.7/contrib/cleanTabs | 2 + .../contrib/diagnose_corruption/.gitignore | 1 + .../contrib/diagnose_corruption/Makefile | 35 + .../diagnose_corruption/check_flipped_bits.c | 400 + .../zstd-1.5.7/contrib/docker/Dockerfile | 20 + .../zstd-1.5.7/contrib/docker/README.md | 20 + .../externalSequenceProducer/.gitignore | 2 + .../contrib/externalSequenceProducer/Makefile | 40 + .../externalSequenceProducer/README.md | 14 + .../contrib/externalSequenceProducer/main.c | 107 + .../sequence_producer.c | 80 + .../sequence_producer.h | 26 + .../contrib/freestanding_lib/freestanding.py | 774 + .../zstd-1.5.7/contrib/gen_html/.gitignore | 3 + .../zstd-1.5.7/contrib/gen_html/Makefile | 51 + .../zstd-1.5.7/contrib/gen_html/README.md | 31 + .../contrib/gen_html/gen-zstd-manual.sh | 9 + .../zstd-1.5.7/contrib/gen_html/gen_html.cpp | 225 + .../contrib/largeNbDicts/.gitignore | 2 + .../zstd-1.5.7/contrib/largeNbDicts/Makefile | 58 + .../zstd-1.5.7/contrib/largeNbDicts/README.md | 33 + .../contrib/largeNbDicts/largeNbDicts.c | 1085 + .../contrib/linux-kernel/.gitignore | 4 + .../zstd-1.5.7/contrib/linux-kernel/Makefile | 108 + .../zstd-1.5.7/contrib/linux-kernel/README.md | 14 + .../contrib/linux-kernel/btrfs-benchmark.sh | 104 + .../linux-kernel/btrfs-extract-benchmark.sh | 99 + .../contrib/linux-kernel/decompress_sources.h | 34 + .../zstd-1.5.7/contrib/linux-kernel/linux.mk | 44 + .../contrib/linux-kernel/linux_zstd.h | 525 + .../zstd-1.5.7/contrib/linux-kernel/mem.h | 262 + .../linux-kernel/squashfs-benchmark.sh | 39 + .../contrib/linux-kernel/test/Makefile | 49 + .../test/include/linux/compiler.h | 23 + .../linux-kernel/test/include/linux/errno.h | 15 + .../linux-kernel/test/include/linux/kernel.h | 19 + .../linux-kernel/test/include/linux/limits.h | 15 + .../linux-kernel/test/include/linux/math64.h | 15 + .../linux-kernel/test/include/linux/module.h | 20 + .../linux-kernel/test/include/linux/printk.h | 15 + .../linux-kernel/test/include/linux/stddef.h | 15 + .../linux-kernel/test/include/linux/swab.h | 16 + .../linux-kernel/test/include/linux/types.h | 16 + .../test/include/linux/unaligned.h | 187 + .../linux-kernel/test/include/linux/xxhash.h | 745 + .../contrib/linux-kernel/test/macro-test.sh | 44 + .../contrib/linux-kernel/test/static_test.c | 52 + .../contrib/linux-kernel/test/test.c | 229 + .../contrib/linux-kernel/zstd_common_module.c | 29 + .../linux-kernel/zstd_compress_module.c | 237 + .../linux-kernel/zstd_decompress_module.c | 105 + .../contrib/linux-kernel/zstd_deps.h | 121 + .../contrib/match_finders/README.md | 42 + .../contrib/match_finders/zstd_edist.c | 558 + .../contrib/match_finders/zstd_edist.h | 70 + .../zstd-1.5.7/contrib/premake/premake4.lua | 6 + .../zstd-1.5.7/contrib/premake/zstd.lua | 80 + .../zstd-1.5.7/contrib/pzstd/.gitignore | 2 + cpp/third_party/zstd-1.5.7/contrib/pzstd/BUCK | 72 + .../zstd-1.5.7/contrib/pzstd/ErrorHolder.h | 54 + .../zstd-1.5.7/contrib/pzstd/Logging.h | 72 + .../zstd-1.5.7/contrib/pzstd/Makefile | 265 + .../zstd-1.5.7/contrib/pzstd/Options.cpp | 424 + .../zstd-1.5.7/contrib/pzstd/Options.h | 71 + .../zstd-1.5.7/contrib/pzstd/Pzstd.cpp | 626 + .../zstd-1.5.7/contrib/pzstd/Pzstd.h | 153 + .../zstd-1.5.7/contrib/pzstd/README.md | 56 + .../contrib/pzstd/SkippableFrame.cpp | 30 + .../zstd-1.5.7/contrib/pzstd/SkippableFrame.h | 64 + .../contrib/pzstd/images/Cspeed.png | Bin 0 -> 69804 bytes .../contrib/pzstd/images/Dspeed.png | Bin 0 -> 26335 bytes .../zstd-1.5.7/contrib/pzstd/main.cpp | 27 + .../zstd-1.5.7/contrib/pzstd/test/BUCK | 37 + .../contrib/pzstd/test/OptionsTest.cpp | 536 + .../contrib/pzstd/test/PzstdTest.cpp | 147 + .../zstd-1.5.7/contrib/pzstd/test/RoundTrip.h | 86 + .../contrib/pzstd/test/RoundTripTest.cpp | 84 + .../zstd-1.5.7/contrib/pzstd/utils/BUCK | 75 + .../zstd-1.5.7/contrib/pzstd/utils/Buffer.h | 99 + .../contrib/pzstd/utils/FileSystem.h | 96 + .../zstd-1.5.7/contrib/pzstd/utils/Likely.h | 28 + .../contrib/pzstd/utils/Portability.h | 16 + .../zstd-1.5.7/contrib/pzstd/utils/Range.h | 133 + .../contrib/pzstd/utils/ResourcePool.h | 96 + .../contrib/pzstd/utils/ScopeGuard.h | 50 + .../contrib/pzstd/utils/ThreadPool.h | 58 + .../contrib/pzstd/utils/WorkQueue.h | 182 + .../zstd-1.5.7/contrib/pzstd/utils/test/BUCK | 35 + .../contrib/pzstd/utils/test/BufferTest.cpp | 89 + .../contrib/pzstd/utils/test/RangeTest.cpp | 82 + .../pzstd/utils/test/ResourcePoolTest.cpp | 72 + .../pzstd/utils/test/ScopeGuardTest.cpp | 28 + .../pzstd/utils/test/ThreadPoolTest.cpp | 71 + .../pzstd/utils/test/WorkQueueTest.cpp | 282 + .../zstd-1.5.7/contrib/recovery/Makefile | 35 + .../contrib/recovery/recover_directory.c | 152 + .../contrib/seekable_format/README.md | 42 + .../seekable_format/examples/.gitignore | 5 + .../contrib/seekable_format/examples/Makefile | 53 + .../examples/parallel_compression.c | 214 + .../examples/parallel_processing.c | 194 + .../examples/seekable_compression.c | 136 + .../examples/seekable_decompression.c | 141 + .../examples/seekable_decompression_mem.c | 147 + .../contrib/seekable_format/tests/.gitignore | 1 + .../contrib/seekable_format/tests/Makefile | 38 + .../seekable_format/tests/seekable_tests.c | 363 + .../contrib/seekable_format/zstd_seekable.h | 226 + .../zstd_seekable_compression_format.md | 116 + .../seekable_format/zstdseek_compress.c | 365 + .../seekable_format/zstdseek_decompress.c | 600 + .../zstd-1.5.7/contrib/seqBench/Makefile | 58 + .../zstd-1.5.7/contrib/seqBench/seqBench.c | 53 + .../zstd-1.5.7/contrib/snap/snapcraft.yaml | 28 + cpp/third_party/zstd-1.5.7/doc/README.md | 26 + .../zstd-1.5.7/doc/decompressor_errata.md | 148 + .../zstd-1.5.7/doc/decompressor_permissive.md | 80 + .../doc/educational_decoder/.gitignore | 2 + .../doc/educational_decoder/Makefile | 62 + .../doc/educational_decoder/README.md | 36 + .../doc/educational_decoder/harness.c | 119 + .../doc/educational_decoder/zstd_decompress.c | 2323 ++ .../doc/educational_decoder/zstd_decompress.h | 61 + .../zstd-1.5.7/doc/images/CSpeed2.png | Bin 0 -> 73335 bytes .../zstd-1.5.7/doc/images/DCspeed5.png | Bin 0 -> 69278 bytes .../zstd-1.5.7/doc/images/DSpeed3.png | Bin 0 -> 27123 bytes .../zstd-1.5.7/doc/images/cdict_v136.png | Bin 0 -> 33330 bytes .../zstd-1.5.7/doc/images/dict-cr.png | Bin 0 -> 90412 bytes .../zstd-1.5.7/doc/images/dict-cs.png | Bin 0 -> 91518 bytes .../zstd-1.5.7/doc/images/dict-ds.png | Bin 0 -> 98316 bytes .../doc/images/zstd_cdict_v1_3_5.png | Bin 0 -> 93969 bytes .../zstd-1.5.7/doc/images/zstd_logo86.png | Bin 0 -> 13069 bytes .../zstd-1.5.7/doc/zstd_compression_format.md | 1771 + .../zstd-1.5.7/doc/zstd_manual.html | 2237 ++ .../zstd-1.5.7/examples/.gitignore | 15 + cpp/third_party/zstd-1.5.7/examples/Makefile | 93 + cpp/third_party/zstd-1.5.7/examples/README.md | 46 + cpp/third_party/zstd-1.5.7/examples/common.h | 246 + .../examples/dictionary_compression.c | 107 + .../examples/dictionary_decompression.c | 99 + .../examples/multiple_simple_compression.c | 116 + .../examples/multiple_streaming_compression.c | 133 + .../zstd-1.5.7/examples/simple_compression.c | 68 + .../examples/simple_decompression.c | 65 + .../examples/streaming_compression.c | 146 + .../streaming_compression_thread_pool.c | 180 + .../examples/streaming_decompression.c | 100 + .../examples/streaming_memory_usage.c | 137 + cpp/third_party/zstd-1.5.7/lib/.gitignore | 3 + cpp/third_party/zstd-1.5.7/lib/BUCK | 232 + cpp/third_party/zstd-1.5.7/lib/Makefile | 389 + cpp/third_party/zstd-1.5.7/lib/README.md | 248 + .../zstd-1.5.7/lib/common/allocations.h | 55 + cpp/third_party/zstd-1.5.7/lib/common/bits.h | 205 + .../zstd-1.5.7/lib/common/bitstream.h | 454 + .../zstd-1.5.7/lib/common/compiler.h | 464 + cpp/third_party/zstd-1.5.7/lib/common/cpu.h | 249 + cpp/third_party/zstd-1.5.7/lib/common/debug.c | 30 + cpp/third_party/zstd-1.5.7/lib/common/debug.h | 107 + .../zstd-1.5.7/lib/common/entropy_common.c | 340 + .../zstd-1.5.7/lib/common/error_private.c | 64 + .../zstd-1.5.7/lib/common/error_private.h | 158 + cpp/third_party/zstd-1.5.7/lib/common/fse.h | 625 + .../zstd-1.5.7/lib/common/fse_decompress.c | 315 + cpp/third_party/zstd-1.5.7/lib/common/huf.h | 277 + cpp/third_party/zstd-1.5.7/lib/common/mem.h | 422 + cpp/third_party/zstd-1.5.7/lib/common/pool.c | 371 + cpp/third_party/zstd-1.5.7/lib/common/pool.h | 81 + .../lib/common/portability_macros.h | 171 + .../zstd-1.5.7/lib/common/threading.c | 182 + .../zstd-1.5.7/lib/common/threading.h | 142 + .../zstd-1.5.7/lib/common/xxhash.c | 18 + .../zstd-1.5.7/lib/common/xxhash.h | 7094 ++++ .../zstd-1.5.7/lib/common/zstd_common.c | 48 + .../zstd-1.5.7/lib/common/zstd_deps.h | 123 + .../zstd-1.5.7/lib/common/zstd_internal.h | 324 + .../zstd-1.5.7/lib/common/zstd_trace.h | 156 + .../zstd-1.5.7/lib/compress/clevels.h | 134 + .../zstd-1.5.7/lib/compress/fse_compress.c | 625 + .../zstd-1.5.7/lib/compress/hist.c | 191 + .../zstd-1.5.7/lib/compress/hist.h | 82 + .../zstd-1.5.7/lib/compress/huf_compress.c | 1464 + .../zstd-1.5.7/lib/compress/zstd_compress.c | 7843 +++++ .../lib/compress/zstd_compress_internal.h | 1636 + .../lib/compress/zstd_compress_literals.c | 235 + .../lib/compress/zstd_compress_literals.h | 39 + .../lib/compress/zstd_compress_sequences.c | 442 + .../lib/compress/zstd_compress_sequences.h | 55 + .../lib/compress/zstd_compress_superblock.c | 688 + .../lib/compress/zstd_compress_superblock.h | 32 + .../zstd-1.5.7/lib/compress/zstd_cwksp.h | 765 + .../lib/compress/zstd_double_fast.c | 778 + .../lib/compress/zstd_double_fast.h | 42 + .../zstd-1.5.7/lib/compress/zstd_fast.c | 985 + .../zstd-1.5.7/lib/compress/zstd_fast.h | 30 + .../zstd-1.5.7/lib/compress/zstd_lazy.c | 2199 ++ .../zstd-1.5.7/lib/compress/zstd_lazy.h | 193 + .../zstd-1.5.7/lib/compress/zstd_ldm.c | 745 + .../zstd-1.5.7/lib/compress/zstd_ldm.h | 109 + .../lib/compress/zstd_ldm_geartab.h | 106 + .../zstd-1.5.7/lib/compress/zstd_opt.c | 1580 + .../zstd-1.5.7/lib/compress/zstd_opt.h | 72 + .../zstd-1.5.7/lib/compress/zstd_preSplit.c | 238 + .../zstd-1.5.7/lib/compress/zstd_preSplit.h | 33 + .../zstd-1.5.7/lib/compress/zstdmt_compress.c | 1923 ++ .../zstd-1.5.7/lib/compress/zstdmt_compress.h | 102 + .../lib/decompress/huf_decompress.c | 1944 ++ .../lib/decompress/huf_decompress_amd64.S | 602 + .../zstd-1.5.7/lib/decompress/zstd_ddict.c | 244 + .../zstd-1.5.7/lib/decompress/zstd_ddict.h | 44 + .../lib/decompress/zstd_decompress.c | 2410 ++ .../lib/decompress/zstd_decompress_block.c | 2209 ++ .../lib/decompress/zstd_decompress_block.h | 73 + .../lib/decompress/zstd_decompress_internal.h | 240 + .../zstd-1.5.7/lib/deprecated/zbuff.h | 214 + .../zstd-1.5.7/lib/deprecated/zbuff_common.c | 26 + .../lib/deprecated/zbuff_compress.c | 167 + .../lib/deprecated/zbuff_decompress.c | 77 + .../zstd-1.5.7/lib/dictBuilder/cover.c | 1302 + .../zstd-1.5.7/lib/dictBuilder/cover.h | 152 + .../zstd-1.5.7/lib/dictBuilder/divsufsort.c | 1913 ++ .../zstd-1.5.7/lib/dictBuilder/divsufsort.h | 57 + .../zstd-1.5.7/lib/dictBuilder/fastcover.c | 766 + .../zstd-1.5.7/lib/dictBuilder/zdict.c | 1133 + .../zstd-1.5.7/lib/dll/example/Makefile | 48 + .../zstd-1.5.7/lib/dll/example/README.md | 63 + .../lib/dll/example/build_package.bat | 20 + .../lib/dll/example/fullbench-dll.sln | 25 + .../lib/dll/example/fullbench-dll.vcxproj | 181 + .../zstd-1.5.7/lib/legacy/zstd_legacy.h | 452 + .../zstd-1.5.7/lib/legacy/zstd_v01.c | 2127 ++ .../zstd-1.5.7/lib/legacy/zstd_v01.h | 94 + .../zstd-1.5.7/lib/legacy/zstd_v02.c | 3465 ++ .../zstd-1.5.7/lib/legacy/zstd_v02.h | 93 + .../zstd-1.5.7/lib/legacy/zstd_v03.c | 3105 ++ .../zstd-1.5.7/lib/legacy/zstd_v03.h | 93 + .../zstd-1.5.7/lib/legacy/zstd_v04.c | 3598 ++ .../zstd-1.5.7/lib/legacy/zstd_v04.h | 142 + .../zstd-1.5.7/lib/legacy/zstd_v05.c | 4005 +++ .../zstd-1.5.7/lib/legacy/zstd_v05.h | 162 + .../zstd-1.5.7/lib/legacy/zstd_v06.c | 4110 +++ .../zstd-1.5.7/lib/legacy/zstd_v06.h | 172 + .../zstd-1.5.7/lib/legacy/zstd_v07.c | 4490 +++ .../zstd-1.5.7/lib/legacy/zstd_v07.h | 187 + cpp/third_party/zstd-1.5.7/lib/libzstd.mk | 235 + cpp/third_party/zstd-1.5.7/lib/libzstd.pc.in | 16 + .../zstd-1.5.7/lib/module.modulemap | 35 + cpp/third_party/zstd-1.5.7/lib/zdict.h | 481 + cpp/third_party/zstd-1.5.7/lib/zstd.h | 3198 ++ cpp/third_party/zstd-1.5.7/lib/zstd_errors.h | 107 + .../zstd-1.5.7/programs/.gitignore | 41 + cpp/third_party/zstd-1.5.7/programs/BUCK | 44 + cpp/third_party/zstd-1.5.7/programs/Makefile | 445 + cpp/third_party/zstd-1.5.7/programs/README.md | 344 + cpp/third_party/zstd-1.5.7/programs/benchfn.c | 256 + cpp/third_party/zstd-1.5.7/programs/benchfn.h | 173 + .../zstd-1.5.7/programs/benchzstd.c | 1281 + .../zstd-1.5.7/programs/benchzstd.h | 191 + cpp/third_party/zstd-1.5.7/programs/datagen.c | 186 + cpp/third_party/zstd-1.5.7/programs/datagen.h | 38 + cpp/third_party/zstd-1.5.7/programs/dibio.c | 440 + cpp/third_party/zstd-1.5.7/programs/dibio.h | 39 + cpp/third_party/zstd-1.5.7/programs/fileio.c | 3464 ++ cpp/third_party/zstd-1.5.7/programs/fileio.h | 171 + .../zstd-1.5.7/programs/fileio_asyncio.c | 663 + .../zstd-1.5.7/programs/fileio_asyncio.h | 195 + .../zstd-1.5.7/programs/fileio_common.h | 121 + .../zstd-1.5.7/programs/fileio_types.h | 86 + cpp/third_party/zstd-1.5.7/programs/lorem.c | 285 + cpp/third_party/zstd-1.5.7/programs/lorem.h | 32 + .../zstd-1.5.7/programs/platform.h | 217 + cpp/third_party/zstd-1.5.7/programs/timefn.c | 168 + cpp/third_party/zstd-1.5.7/programs/timefn.h | 59 + cpp/third_party/zstd-1.5.7/programs/util.c | 1643 + cpp/third_party/zstd-1.5.7/programs/util.h | 362 + .../zstd-1.5.7/programs/windres/verrsrc.h | 17 + .../zstd-1.5.7/programs/windres/zstd.rc | 51 + .../zstd-1.5.7/programs/windres/zstd32.res | Bin 0 -> 1044 bytes .../zstd-1.5.7/programs/windres/zstd64.res | Bin 0 -> 1044 bytes cpp/third_party/zstd-1.5.7/programs/zstd.1 | 392 + cpp/third_party/zstd-1.5.7/programs/zstd.1.md | 714 + cpp/third_party/zstd-1.5.7/programs/zstdcli.c | 1658 + .../zstd-1.5.7/programs/zstdcli_trace.c | 172 + .../zstd-1.5.7/programs/zstdcli_trace.h | 24 + cpp/third_party/zstd-1.5.7/programs/zstdgrep | 134 + .../zstd-1.5.7/programs/zstdgrep.1 | 26 + .../zstd-1.5.7/programs/zstdgrep.1.md | 30 + cpp/third_party/zstd-1.5.7/programs/zstdless | 8 + .../zstd-1.5.7/programs/zstdless.1 | 14 + .../zstd-1.5.7/programs/zstdless.1.md | 16 + cpp/third_party/zstd-1.5.7/tests/.gitignore | 72 + .../tests/DEPRECATED-test-zstd-speed.py | 378 + cpp/third_party/zstd-1.5.7/tests/Makefile | 481 + cpp/third_party/zstd-1.5.7/tests/README.md | 184 + .../tests/automated_benchmarking.py | 326 + cpp/third_party/zstd-1.5.7/tests/bigdict.c | 133 + cpp/third_party/zstd-1.5.7/tests/checkTag.c | 65 + .../zstd-1.5.7/tests/check_size.py | 31 + .../zstd-1.5.7/tests/cli-tests/.gitignore | 6 + .../zstd-1.5.7/tests/cli-tests/README.md | 258 + .../zstd-1.5.7/tests/cli-tests/basic/args.sh | 10 + .../tests/cli-tests/basic/args.sh.exit | 1 + .../tests/cli-tests/basic/args.sh.stderr.glob | 28 + .../zstd-1.5.7/tests/cli-tests/basic/help.sh | 10 + .../tests/cli-tests/basic/help.sh.stdout.glob | 34 + .../tests/cli-tests/basic/memlimit.sh | 40 + .../cli-tests/basic/memlimit.sh.stderr.exact | 13 + .../cli-tests/basic/memlimit.sh.stdout.exact | 13 + .../tests/cli-tests/basic/output_dir.sh | 7 + .../basic/output_dir.sh.stderr.exact | 2 + .../basic/output_dir.sh.stdout.exact | 2 + .../tests/cli-tests/basic/version.sh | 6 + .../cli-tests/basic/version.sh.stdout.glob | 2 + .../zstd-1.5.7/tests/cli-tests/bin/cmp_size | 44 + .../zstd-1.5.7/tests/cli-tests/bin/datagen | 3 + .../zstd-1.5.7/tests/cli-tests/bin/die | 4 + .../zstd-1.5.7/tests/cli-tests/bin/println | 2 + .../zstd-1.5.7/tests/cli-tests/bin/unzstd | 1 + .../zstd-1.5.7/tests/cli-tests/bin/zstd | 9 + .../zstd-1.5.7/tests/cli-tests/bin/zstdcat | 1 + .../zstd-1.5.7/tests/cli-tests/bin/zstdgrep | 2 + .../zstd-1.5.7/tests/cli-tests/bin/zstdless | 2 + .../zstd-1.5.7/tests/cli-tests/cltools/setup | 6 + .../tests/cli-tests/cltools/zstdgrep.sh | 8 + .../tests/cli-tests/cltools/zstdgrep.sh.exit | 1 + .../cltools/zstdgrep.sh.stderr.exact | 1 + .../cli-tests/cltools/zstdgrep.sh.stdout.glob | 4 + .../tests/cli-tests/cltools/zstdless.sh | 10 + .../cltools/zstdless.sh.stderr.exact | 2 + .../cli-tests/cltools/zstdless.sh.stdout.glob | 5 + .../tests/cli-tests/common/format.sh | 19 + .../tests/cli-tests/common/mtime.sh | 13 + .../tests/cli-tests/common/permissions.sh | 18 + .../tests/cli-tests/common/platform.sh | 36 + .../tests/cli-tests/compression/adapt.sh | 14 + .../tests/cli-tests/compression/basic.sh | 36 + .../compression/compress-literals.sh | 10 + .../tests/cli-tests/compression/format.sh | 16 + .../tests/cli-tests/compression/golden.sh | 16 + .../cli-tests/compression/gzip-compat.sh | 17 + .../tests/cli-tests/compression/levels.sh | 75 + .../compression/levels.sh.stderr.exact | 80 + .../compression/long-distance-matcher.sh | 7 + .../cli-tests/compression/multi-threaded.sh | 15 + .../multi-threaded.sh.stderr.exact | 11 + .../cli-tests/compression/multiple-files.sh | 21 + .../multiple-files.sh.stdout.exact | 12 + .../cli-tests/compression/row-match-finder.sh | 7 + .../tests/cli-tests/compression/setup | 7 + .../cli-tests/compression/stream-size.sh | 7 + .../cli-tests/compression/verbose-wlog.sh | 11 + .../compression/verbose-wlog.sh.stderr.glob | 5 + .../compression/verbose-wlog.sh.stdout.glob | 5 + .../cli-tests/compression/window-resize.sh | 9 + .../window-resize.sh.stderr.ignore | 0 .../compression/window-resize.sh.stdout.glob | 3 + .../cli-tests/decompression/detectErrors.sh | 11 + .../tests/cli-tests/decompression/golden.sh | 7 + .../cli-tests/decompression/pass-through.sh | 57 + .../pass-through.sh.stderr.exact | 11 + .../pass-through.sh.stdout.exact | 25 + .../cli-tests/dict-builder/empty-input.sh | 9 + .../dict-builder/empty-input.sh.stderr.exact | 1 + .../tests/cli-tests/dict-builder/no-inputs.sh | 3 + .../cli-tests/dict-builder/no-inputs.sh.exit | 1 + .../dict-builder/no-inputs.sh.stderr.exact | 5 + .../dictionaries/dictionary-mismatch.sh | 29 + .../dictionary-mismatch.sh.stderr.exact | 7 + .../tests/cli-tests/dictionaries/golden.sh | 9 + .../tests/cli-tests/dictionaries/setup | 6 + .../tests/cli-tests/dictionaries/setup_once | 24 + .../file-handling/directory-mirror.sh | 49 + .../directory-mirror.sh.stderr.exact | 0 .../directory-mirror.sh.stdout.exact | 0 ...compress-file-to-dir-without-write-perm.sh | 12 + ...-to-dir-without-write-perm.sh.stderr.exact | 26 + .../file-stat/compress-file-to-file.sh | 9 + .../compress-file-to-file.sh.stderr.exact | 42 + .../file-stat/compress-file-to-stdout.sh | 8 + .../compress-file-to-stdout.sh.stderr.exact | 24 + .../file-stat/compress-stdin-to-file.sh | 8 + .../compress-stdin-to-file.sh.stderr.exact | 24 + .../file-stat/compress-stdin-to-stdout.sh | 8 + .../compress-stdin-to-stdout.sh.stderr.exact | 18 + .../file-stat/decompress-file-to-file.sh | 8 + .../decompress-file-to-file.sh.stderr.exact | 38 + .../file-stat/decompress-file-to-stdout.sh | 7 + .../decompress-file-to-stdout.sh.stderr.exact | 18 + .../file-stat/decompress-stdin-to-file.sh | 7 + .../decompress-stdin-to-file.sh.stderr.exact | 20 + .../file-stat/decompress-stdin-to-stdout.sh | 7 + ...decompress-stdin-to-stdout.sh.stderr.exact | 14 + .../tests/cli-tests/progress/no-progress.sh | 46 + .../progress/no-progress.sh.stderr.glob | 96 + .../tests/cli-tests/progress/progress.sh | 41 + .../progress/progress.sh.stderr.glob | 62 + .../zstd-1.5.7/tests/cli-tests/run.py | 731 + .../tests/cli-tests/zstd-symlinks/setup | 6 + .../tests/cli-tests/zstd-symlinks/zstdcat.sh | 12 + .../zstd-symlinks/zstdcat.sh.stdout.exact | 8 + cpp/third_party/zstd-1.5.7/tests/datagencli.c | 149 + .../zstd-1.5.7/tests/decodecorpus.c | 1998 ++ .../tests/dict-files/zero-weight-dict | Bin 0 -> 153 bytes .../zstd-1.5.7/tests/external_matchfinder.c | 140 + .../zstd-1.5.7/tests/external_matchfinder.h | 39 + cpp/third_party/zstd-1.5.7/tests/fullbench.c | 1209 + .../zstd-1.5.7/tests/fuzz/.gitignore | 31 + .../zstd-1.5.7/tests/fuzz/Makefile | 278 + .../zstd-1.5.7/tests/fuzz/README.md | 161 + .../zstd-1.5.7/tests/fuzz/block_decompress.c | 53 + .../zstd-1.5.7/tests/fuzz/block_round_trip.c | 103 + .../tests/fuzz/decompress_cross_format.c | 130 + .../tests/fuzz/decompress_dstSize_tooSmall.c | 74 + .../tests/fuzz/dictionary_decompress.c | 77 + .../zstd-1.5.7/tests/fuzz/dictionary_loader.c | 106 + .../tests/fuzz/dictionary_round_trip.c | 155 + .../tests/fuzz/dictionary_stream_round_trip.c | 209 + .../zstd-1.5.7/tests/fuzz/fse_read_ncount.c | 100 + cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz.h | 57 + cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz.py | 910 + .../tests/fuzz/fuzz_data_producer.c | 95 + .../tests/fuzz/fuzz_data_producer.h | 66 + .../zstd-1.5.7/tests/fuzz/fuzz_helpers.c | 48 + .../zstd-1.5.7/tests/fuzz/fuzz_helpers.h | 81 + .../tests/fuzz/fuzz_third_party_seq_prod.h | 116 + .../tests/fuzz/generate_sequences.c | 88 + .../zstd-1.5.7/tests/fuzz/huf_decompress.c | 68 + .../zstd-1.5.7/tests/fuzz/huf_round_trip.c | 137 + .../tests/fuzz/raw_dictionary_round_trip.c | 119 + .../zstd-1.5.7/tests/fuzz/regression_driver.c | 90 + .../tests/fuzz/seekable_roundtrip.c | 88 + .../tests/fuzz/seq_prod_fuzz_example/Makefile | 16 + .../fuzz/seq_prod_fuzz_example/README.md | 12 + .../seq_prod_fuzz_example/example_seq_prod.c | 52 + .../tests/fuzz/sequence_compression_api.c | 452 + .../zstd-1.5.7/tests/fuzz/simple_compress.c | 60 + .../zstd-1.5.7/tests/fuzz/simple_decompress.c | 59 + .../zstd-1.5.7/tests/fuzz/simple_round_trip.c | 182 + .../zstd-1.5.7/tests/fuzz/stream_decompress.c | 119 + .../zstd-1.5.7/tests/fuzz/stream_round_trip.c | 218 + .../zstd-1.5.7/tests/fuzz/zstd_frame_info.c | 43 + .../zstd-1.5.7/tests/fuzz/zstd_helpers.c | 208 + .../zstd-1.5.7/tests/fuzz/zstd_helpers.h | 56 + cpp/third_party/zstd-1.5.7/tests/fuzzer.c | 5147 +++ .../PR-3517-block-splitter-corruption-test | 1 + .../zstd-1.5.7/tests/golden-compression/http | 1 + .../huffman-compressed-larger | Bin 0 -> 143 bytes .../large-literal-and-match-lengths | Bin 0 -> 199998 bytes .../golden-decompression-errors/.gitignore | 1 + .../golden-decompression-errors/off0.bin.zst | Bin 0 -> 17 bytes .../truncated_huff_state.zst | Bin 0 -> 19 bytes .../zeroSeq_extraneous.zst | Bin 0 -> 27 bytes .../tests/golden-decompression/block-128k.zst | Bin 0 -> 131081 bytes .../golden-decompression/empty-block.zst | Bin 0 -> 11 bytes .../golden-decompression/rle-first-block.zst | Bin 0 -> 45 bytes .../tests/golden-decompression/zeroSeq_2B.zst | Bin 0 -> 25 bytes .../http-dict-missing-symbols | Bin 0 -> 1000 bytes .../zstd-1.5.7/tests/gzip/Makefile | 45 + .../zstd-1.5.7/tests/gzip/gzip-env.sh | 46 + .../zstd-1.5.7/tests/gzip/helin-segv.sh | 31 + .../zstd-1.5.7/tests/gzip/help-version.sh | 270 + .../zstd-1.5.7/tests/gzip/hufts-segv.gz | Bin 0 -> 425 bytes .../zstd-1.5.7/tests/gzip/hufts.sh | 34 + .../zstd-1.5.7/tests/gzip/init.cfg | 5 + cpp/third_party/zstd-1.5.7/tests/gzip/init.sh | 616 + cpp/third_party/zstd-1.5.7/tests/gzip/keep.sh | 51 + cpp/third_party/zstd-1.5.7/tests/gzip/list.sh | 31 + .../zstd-1.5.7/tests/gzip/memcpy-abuse.sh | 34 + .../zstd-1.5.7/tests/gzip/mixed.sh | 68 + .../tests/gzip/null-suffix-clobber.sh | 35 + .../zstd-1.5.7/tests/gzip/stdin.sh | 31 + .../zstd-1.5.7/tests/gzip/test-driver.sh | 150 + .../zstd-1.5.7/tests/gzip/trailing-nul.sh | 37 + .../zstd-1.5.7/tests/gzip/unpack-invalid.sh | 36 + .../zstd-1.5.7/tests/gzip/z-suffix.sh | 30 + .../zstd-1.5.7/tests/gzip/zdiff.sh | 48 + .../zstd-1.5.7/tests/gzip/zgrep-context.sh | 47 + .../zstd-1.5.7/tests/gzip/zgrep-f.sh | 43 + .../zstd-1.5.7/tests/gzip/zgrep-signal.sh | 64 + .../zstd-1.5.7/tests/gzip/znew-k.sh | 40 + .../zstd-1.5.7/tests/invalidDictionaries.c | 61 + .../zstd-1.5.7/tests/largeDictionary.c | 128 + cpp/third_party/zstd-1.5.7/tests/legacy.c | 260 + .../zstd-1.5.7/tests/libzstd_builds.sh | 104 + cpp/third_party/zstd-1.5.7/tests/longmatch.c | 102 + cpp/third_party/zstd-1.5.7/tests/loremOut.c | 50 + cpp/third_party/zstd-1.5.7/tests/loremOut.h | 15 + cpp/third_party/zstd-1.5.7/tests/paramgrill.c | 2965 ++ cpp/third_party/zstd-1.5.7/tests/playTests.sh | 1925 ++ cpp/third_party/zstd-1.5.7/tests/poolTests.c | 271 + .../zstd-1.5.7/tests/rateLimiter.py | 41 + .../zstd-1.5.7/tests/regression/.gitignore | 4 + .../zstd-1.5.7/tests/regression/Makefile | 60 + .../zstd-1.5.7/tests/regression/README.md | 28 + .../zstd-1.5.7/tests/regression/config.c | 404 + .../zstd-1.5.7/tests/regression/config.h | 91 + .../zstd-1.5.7/tests/regression/data.c | 631 + .../zstd-1.5.7/tests/regression/data.h | 121 + .../zstd-1.5.7/tests/regression/levels.h | 59 + .../zstd-1.5.7/tests/regression/method.c | 701 + .../zstd-1.5.7/tests/regression/method.h | 65 + .../zstd-1.5.7/tests/regression/result.c | 30 + .../zstd-1.5.7/tests/regression/result.h | 103 + .../zstd-1.5.7/tests/regression/results.csv | 1480 + .../zstd-1.5.7/tests/regression/test.c | 362 + .../zstd-1.5.7/tests/roundTripCrash.c | 241 + cpp/third_party/zstd-1.5.7/tests/seqgen.c | 260 + cpp/third_party/zstd-1.5.7/tests/seqgen.h | 58 + .../zstd-1.5.7/tests/test-license.py | 156 + .../zstd-1.5.7/tests/test-variants.sh | 115 + .../zstd-1.5.7/tests/test-zstd-versions.py | 308 + .../zstd-1.5.7/tests/zstreamtest.c | 3467 ++ .../zstd-1.5.7/zlibWrapper/.gitignore | 28 + cpp/third_party/zstd-1.5.7/zlibWrapper/BUCK | 22 + .../zstd-1.5.7/zlibWrapper/Makefile | 120 + .../zstd-1.5.7/zlibWrapper/README.md | 163 + .../zstd-1.5.7/zlibWrapper/examples/example.c | 598 + .../zlibWrapper/examples/example_original.c | 599 + .../zstd-1.5.7/zlibWrapper/examples/fitblk.c | 254 + .../zlibWrapper/examples/fitblk_original.c | 233 + .../zlibWrapper/examples/minigzip.c | 605 + .../zlibWrapper/examples/zwrapbench.c | 1018 + .../zstd-1.5.7/zlibWrapper/gzclose.c | 26 + .../zstd-1.5.7/zlibWrapper/gzcompatibility.h | 68 + .../zstd-1.5.7/zlibWrapper/gzguts.h | 229 + .../zstd-1.5.7/zlibWrapper/gzlib.c | 587 + .../zstd-1.5.7/zlibWrapper/gzread.c | 637 + .../zstd-1.5.7/zlibWrapper/gzwrite.c | 632 + .../zstd-1.5.7/zlibWrapper/zstd_zlibwrapper.c | 1200 + .../zstd-1.5.7/zlibWrapper/zstd_zlibwrapper.h | 91 + cpp/tools/format/output_format.cc | 10 + python/tsfile/constants.py | 1 + python/tsfile/tsfile_cpp.pxd | 6 + python/tsfile/tsfile_py_cpp.pyx | 6 + 1248 files changed, 455242 insertions(+), 35 deletions(-) create mode 100644 cpp/src/compress/lzma2_compressor.cc create mode 100644 cpp/src/compress/lzma2_compressor.h create mode 100644 cpp/src/compress/zstd_compressor.cc create mode 100644 cpp/src/compress/zstd_compressor.h create mode 100644 cpp/src/encoding/bit_packing_utils.h create mode 100644 cpp/src/encoding/camel_decoder.h create mode 100644 cpp/src/encoding/camel_encoder.h create mode 100644 cpp/src/encoding/chimp_decoder.h create mode 100644 cpp/src/encoding/chimp_encoder.h create mode 100644 cpp/src/encoding/rlbe_decoder.h create mode 100644 cpp/src/encoding/rlbe_encoder.h create mode 100644 cpp/test/compress/lzma2_compressor_test.cc create mode 100644 cpp/test/compress/zstd_compressor_test.cc create mode 100644 cpp/test/encoding/camel_codec_test.cc create mode 100644 cpp/test/encoding/chimp_codec_test.cc create mode 100644 cpp/test/encoding/rlbe_codec_test.cc create mode 100644 cpp/third_party/xz-5.8.3/ABOUT-NLS create mode 100644 cpp/third_party/xz-5.8.3/AUTHORS create mode 100644 cpp/third_party/xz-5.8.3/CMakeLists.txt create mode 100644 cpp/third_party/xz-5.8.3/COPYING create mode 100644 cpp/third_party/xz-5.8.3/COPYING.0BSD create mode 100644 cpp/third_party/xz-5.8.3/COPYING.GPLv2 create mode 100644 cpp/third_party/xz-5.8.3/COPYING.GPLv3 create mode 100644 cpp/third_party/xz-5.8.3/COPYING.LGPLv2.1 create mode 100644 cpp/third_party/xz-5.8.3/ChangeLog create mode 100644 cpp/third_party/xz-5.8.3/INSTALL create mode 100644 cpp/third_party/xz-5.8.3/INSTALL.generic create mode 100644 cpp/third_party/xz-5.8.3/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/NEWS create mode 100644 cpp/third_party/xz-5.8.3/PACKAGERS create mode 100644 cpp/third_party/xz-5.8.3/README create mode 100644 cpp/third_party/xz-5.8.3/THANKS create mode 100644 cpp/third_party/xz-5.8.3/TODO create mode 100644 cpp/third_party/xz-5.8.3/aclocal.m4 create mode 100755 cpp/third_party/xz-5.8.3/autogen.sh create mode 100755 cpp/third_party/xz-5.8.3/build-aux/compile create mode 100755 cpp/third_party/xz-5.8.3/build-aux/config.guess create mode 100755 cpp/third_party/xz-5.8.3/build-aux/config.rpath create mode 100755 cpp/third_party/xz-5.8.3/build-aux/config.sub create mode 100755 cpp/third_party/xz-5.8.3/build-aux/depcomp create mode 100755 cpp/third_party/xz-5.8.3/build-aux/install-sh create mode 100644 cpp/third_party/xz-5.8.3/build-aux/license-check.sh create mode 100644 cpp/third_party/xz-5.8.3/build-aux/ltmain.sh create mode 100644 cpp/third_party/xz-5.8.3/build-aux/manconv.sh create mode 100755 cpp/third_party/xz-5.8.3/build-aux/missing create mode 100755 cpp/third_party/xz-5.8.3/build-aux/test-driver create mode 100644 cpp/third_party/xz-5.8.3/build-aux/version.sh create mode 100644 cpp/third_party/xz-5.8.3/cmake/remove-ordinals.cmake create mode 100644 cpp/third_party/xz-5.8.3/cmake/tuklib_common.cmake create mode 100644 cpp/third_party/xz-5.8.3/cmake/tuklib_cpucores.cmake create mode 100644 cpp/third_party/xz-5.8.3/cmake/tuklib_integer.cmake create mode 100644 cpp/third_party/xz-5.8.3/cmake/tuklib_large_file_support.cmake create mode 100644 cpp/third_party/xz-5.8.3/cmake/tuklib_mbstr.cmake create mode 100644 cpp/third_party/xz-5.8.3/cmake/tuklib_physmem.cmake create mode 100644 cpp/third_party/xz-5.8.3/cmake/tuklib_progname.cmake create mode 100644 cpp/third_party/xz-5.8.3/config.h.in create mode 100755 cpp/third_party/xz-5.8.3/configure create mode 100644 cpp/third_party/xz-5.8.3/configure.ac create mode 100644 cpp/third_party/xz-5.8.3/debug/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/debug/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/debug/README create mode 100644 cpp/third_party/xz-5.8.3/debug/crc32.c create mode 100644 cpp/third_party/xz-5.8.3/debug/full_flush.c create mode 100644 cpp/third_party/xz-5.8.3/debug/hex2bin.c create mode 100644 cpp/third_party/xz-5.8.3/debug/known_sizes.c create mode 100644 cpp/third_party/xz-5.8.3/debug/memusage.c create mode 100644 cpp/third_party/xz-5.8.3/debug/repeat.c create mode 100644 cpp/third_party/xz-5.8.3/debug/sync_flush.c create mode 100644 cpp/third_party/xz-5.8.3/debug/testfilegen-arm64.c create mode 100644 cpp/third_party/xz-5.8.3/debug/translation.bash create mode 100644 cpp/third_party/xz-5.8.3/doc/examples/00_README.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/examples/01_compress_easy.c create mode 100644 cpp/third_party/xz-5.8.3/doc/examples/02_decompress.c create mode 100644 cpp/third_party/xz-5.8.3/doc/examples/03_compress_custom.c create mode 100644 cpp/third_party/xz-5.8.3/doc/examples/04_compress_easy_mt.c create mode 100644 cpp/third_party/xz-5.8.3/doc/examples/11_file_info.c create mode 100644 cpp/third_party/xz-5.8.3/doc/examples/Makefile create mode 100644 cpp/third_party/xz-5.8.3/doc/faq.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/history.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/lzma-file-format.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/man/txt/lzmainfo.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/man/txt/xz.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/man/txt/xzdec.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/man/txt/xzdiff.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/man/txt/xzgrep.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/man/txt/xzless.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/man/txt/xzmore.txt create mode 100644 cpp/third_party/xz-5.8.3/doc/xz-file-format.txt create mode 100644 cpp/third_party/xz-5.8.3/dos/INSTALL.txt create mode 100644 cpp/third_party/xz-5.8.3/dos/Makefile create mode 100644 cpp/third_party/xz-5.8.3/dos/README.txt create mode 100644 cpp/third_party/xz-5.8.3/dos/config.h create mode 100644 cpp/third_party/xz-5.8.3/doxygen/Doxyfile create mode 100755 cpp/third_party/xz-5.8.3/doxygen/update-doxygen create mode 100755 cpp/third_party/xz-5.8.3/extra/7z2lzma/7z2lzma.bash create mode 100644 cpp/third_party/xz-5.8.3/extra/scanlzma/scanlzma.c create mode 100644 cpp/third_party/xz-5.8.3/lib/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/lib/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt-cdefs.h create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt-core.h create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt-ext.h create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt-pfx-core.h create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt-pfx-ext.h create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt.c create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt.in.h create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt1.c create mode 100644 cpp/third_party/xz-5.8.3/lib/getopt_int.h create mode 100644 cpp/third_party/xz-5.8.3/m4/ax_pthread.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/build-to-host.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/getopt.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/gettext.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/host-cpu-c-abi.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/iconv.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/intlmacosx.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/lib-ld.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/lib-link.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/lib-prefix.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/libtool.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/ltoptions.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/ltsugar.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/ltversion.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/lt~obsolete.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/nls.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/po.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/posix-shell.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/progtest.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/tuklib_common.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/tuklib_cpucores.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/tuklib_integer.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/tuklib_mbstr.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/tuklib_physmem.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/tuklib_progname.m4 create mode 100644 cpp/third_party/xz-5.8.3/m4/visibility.m4 create mode 100644 cpp/third_party/xz-5.8.3/po/LINGUAS create mode 100644 cpp/third_party/xz-5.8.3/po/Makefile.in.in create mode 100644 cpp/third_party/xz-5.8.3/po/Makevars create mode 100644 cpp/third_party/xz-5.8.3/po/POTFILES.in create mode 100644 cpp/third_party/xz-5.8.3/po/Rules-quot create mode 100644 cpp/third_party/xz-5.8.3/po/boldquot.sed create mode 100644 cpp/third_party/xz-5.8.3/po/ca.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/ca.po create mode 100644 cpp/third_party/xz-5.8.3/po/cs.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/cs.po create mode 100644 cpp/third_party/xz-5.8.3/po/da.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/da.po create mode 100644 cpp/third_party/xz-5.8.3/po/de.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/de.po create mode 100644 cpp/third_party/xz-5.8.3/po/en@boldquot.header create mode 100644 cpp/third_party/xz-5.8.3/po/en@quot.header create mode 100644 cpp/third_party/xz-5.8.3/po/eo.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/eo.po create mode 100644 cpp/third_party/xz-5.8.3/po/es.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/es.po create mode 100644 cpp/third_party/xz-5.8.3/po/fi.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/fi.po create mode 100644 cpp/third_party/xz-5.8.3/po/fr.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/fr.po create mode 100644 cpp/third_party/xz-5.8.3/po/hr.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/hr.po create mode 100644 cpp/third_party/xz-5.8.3/po/hu.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/hu.po create mode 100644 cpp/third_party/xz-5.8.3/po/insert-header.sed create mode 100644 cpp/third_party/xz-5.8.3/po/it.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/it.po create mode 100644 cpp/third_party/xz-5.8.3/po/ka.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/ka.po create mode 100644 cpp/third_party/xz-5.8.3/po/ko.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/ko.po create mode 100644 cpp/third_party/xz-5.8.3/po/nl.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/nl.po create mode 100644 cpp/third_party/xz-5.8.3/po/pl.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/pl.po create mode 100644 cpp/third_party/xz-5.8.3/po/pt.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/pt.po create mode 100644 cpp/third_party/xz-5.8.3/po/pt_BR.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/pt_BR.po create mode 100644 cpp/third_party/xz-5.8.3/po/quot.sed create mode 100644 cpp/third_party/xz-5.8.3/po/remove-potcdate.sed create mode 100644 cpp/third_party/xz-5.8.3/po/ro.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/ro.po create mode 100644 cpp/third_party/xz-5.8.3/po/sr.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/sr.po create mode 100644 cpp/third_party/xz-5.8.3/po/stamp-po create mode 100644 cpp/third_party/xz-5.8.3/po/sv.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/sv.po create mode 100644 cpp/third_party/xz-5.8.3/po/tr.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/tr.po create mode 100644 cpp/third_party/xz-5.8.3/po/uk.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/uk.po create mode 100644 cpp/third_party/xz-5.8.3/po/vi.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/vi.po create mode 100644 cpp/third_party/xz-5.8.3/po/xz.pot create mode 100644 cpp/third_party/xz-5.8.3/po/xz.pot-header create mode 100644 cpp/third_party/xz-5.8.3/po/zh_CN.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/zh_CN.po create mode 100644 cpp/third_party/xz-5.8.3/po/zh_TW.gmo create mode 100644 cpp/third_party/xz-5.8.3/po/zh_TW.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/ar.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/de.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/fr.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/it.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/ko.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ar/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ar/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ar/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ar/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ar/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ar/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ar/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/de/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/de/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/de/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/de/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/de/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/de/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/de/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/fr/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/fr/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/fr/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/fr/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/it/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/it/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/it/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/it/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/it/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/it/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/it/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ko/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ko/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ko/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ko/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ko/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ko/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ko/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/pt_BR/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ro/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ro/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ro/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ro/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ro/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ro/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/ro/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sr/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sr/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sr/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sr/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sr/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sr/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sr/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sv/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sv/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sv/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sv/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sv/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sv/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/sv/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/uk/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/uk/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/uk/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/uk/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/uk/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/uk/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/man/uk/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/po4a/po4a.conf create mode 100644 cpp/third_party/xz-5.8.3/po4a/pt_BR.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/ro.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/sr.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/sv.po create mode 100644 cpp/third_party/xz-5.8.3/po4a/uk.po create mode 100755 cpp/third_party/xz-5.8.3/po4a/update-po create mode 100644 cpp/third_party/xz-5.8.3/po4a/xz-man.pot create mode 100644 cpp/third_party/xz-5.8.3/src/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/src/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/src/common/common_w32res.rc create mode 100644 cpp/third_party/xz-5.8.3/src/common/my_landlock.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/mythread.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/sysdefs.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_common.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_config.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_cpucores.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_cpucores.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_exit.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_exit.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_gettext.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_integer.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_mbstr.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_mbstr_fw.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_mbstr_nonprint.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_mbstr_nonprint.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_mbstr_width.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_mbstr_wrap.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_mbstr_wrap.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_open_stdxxx.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_open_stdxxx.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_physmem.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_physmem.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_progname.c create mode 100644 cpp/third_party/xz-5.8.3/src/common/tuklib_progname.h create mode 100644 cpp/third_party/xz-5.8.3/src/common/w32_application.manifest create mode 100644 cpp/third_party/xz-5.8.3/src/common/w32_application.manifest.comments.txt create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/base.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/bcj.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/block.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/check.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/container.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/delta.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/filter.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/hardware.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/index.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/index_hash.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/lzma12.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/stream_flags.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/version.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/api/lzma/vli.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/Makefile.inc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/check.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/check.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_arm64.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_fast.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_loongarch.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_small.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_table_be.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_table_le.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_tablegen.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc32_x86.S create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc64_fast.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc64_small.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc64_table_be.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc64_table_le.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc64_tablegen.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc64_x86.S create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc_clmul_consts_gen.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc_common.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/crc_x86_clmul.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/check/sha256.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/Makefile.inc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/alone_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/alone_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/alone_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/auto_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_buffer_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_buffer_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_buffer_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_header_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_header_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/block_util.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/common.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/common.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/easy_buffer_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/easy_decoder_memusage.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/easy_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/easy_encoder_memusage.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/easy_preset.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/easy_preset.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/file_info.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_buffer_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_buffer_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_common.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_common.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_flags_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/filter_flags_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/hardware_cputhreads.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/hardware_physmem.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/index.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/index.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/index_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/index_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/index_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/index_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/index_hash.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/lzip_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/lzip_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/memcmplen.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/microlzma_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/microlzma_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/outqueue.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/outqueue.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_buffer_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_buffer_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_decoder_mt.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_encoder_mt.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_flags_common.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_flags_common.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_flags_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/stream_flags_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/string_conversion.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/vli_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/vli_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/common/vli_size.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/Makefile.inc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/delta_common.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/delta_common.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/delta_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/delta_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/delta_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/delta_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/delta/delta_private.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/liblzma.pc.in create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/liblzma_generic.map create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/liblzma_linux.map create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/liblzma_w32res.rc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/Makefile.inc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/lz_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/lz_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/lz_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/lz_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/lz_encoder_hash.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/lz_encoder_hash_table.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lz/lz_encoder_mf.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/Makefile.inc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/fastpos.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/fastpos_table.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/fastpos_tablegen.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma2_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma2_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma2_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma2_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_common.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_encoder_optimum_fast.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_encoder_optimum_normal.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_encoder_presets.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/lzma/lzma_encoder_private.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/rangecoder/Makefile.inc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/rangecoder/price.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/rangecoder/price_table.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/rangecoder/price_tablegen.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/rangecoder/range_common.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/rangecoder/range_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/rangecoder/range_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/Makefile.inc create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/arm.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/arm64.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/armthumb.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/ia64.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/powerpc.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/riscv.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/simple_coder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/simple_coder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/simple_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/simple_decoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/simple_encoder.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/simple_encoder.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/simple_private.h create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/sparc.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/simple/x86.c create mode 100644 cpp/third_party/xz-5.8.3/src/liblzma/validate_map.sh create mode 100644 cpp/third_party/xz-5.8.3/src/lzmainfo/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/src/lzmainfo/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/src/lzmainfo/lzmainfo.1 create mode 100644 cpp/third_party/xz-5.8.3/src/lzmainfo/lzmainfo.c create mode 100644 cpp/third_party/xz-5.8.3/src/lzmainfo/lzmainfo_w32res.rc create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzdiff.1 create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzdiff.in create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzgrep.1 create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzgrep.in create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzless.1 create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzless.in create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzmore.1 create mode 100644 cpp/third_party/xz-5.8.3/src/scripts/xzmore.in create mode 100644 cpp/third_party/xz-5.8.3/src/xz/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/src/xz/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/src/xz/args.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/args.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/coder.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/coder.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/file_io.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/file_io.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/hardware.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/hardware.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/list.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/list.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/main.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/main.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/message.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/message.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/mytime.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/mytime.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/options.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/options.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/private.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/sandbox.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/sandbox.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/signals.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/signals.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/suffix.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/suffix.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/util.c create mode 100644 cpp/third_party/xz-5.8.3/src/xz/util.h create mode 100644 cpp/third_party/xz-5.8.3/src/xz/xz.1 create mode 100644 cpp/third_party/xz-5.8.3/src/xz/xz_w32res.rc create mode 100644 cpp/third_party/xz-5.8.3/src/xzdec/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/src/xzdec/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/src/xzdec/lzmadec_w32res.rc create mode 100644 cpp/third_party/xz-5.8.3/src/xzdec/xzdec.1 create mode 100644 cpp/third_party/xz-5.8.3/src/xzdec/xzdec.c create mode 100644 cpp/third_party/xz-5.8.3/src/xzdec/xzdec_w32res.rc create mode 100644 cpp/third_party/xz-5.8.3/tests/Makefile.am create mode 100644 cpp/third_party/xz-5.8.3/tests/Makefile.in create mode 100644 cpp/third_party/xz-5.8.3/tests/create_compress_files.c create mode 100644 cpp/third_party/xz-5.8.3/tests/files/README create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0-backward_size.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0-empty-truncated.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0-footer_magic.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0-header_magic.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0-nonempty_index.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0cat-alone.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0cat-header_magic.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0catpad-empty.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-0pad-empty.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-3.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-4.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-5.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-6.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-check-crc32-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-check-crc32.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-check-crc64.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-check-sha256.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-10.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-11.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-3.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-4.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-5.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-6.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-7.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-8.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-9.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-stream_flags-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-stream_flags-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-stream_flags-3.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v0-uncomp-size.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-crc32.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-dict-1.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-dict-2.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-magic-1.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-magic-2.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-member-size.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-trailing-magic.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-uncomp-size.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-vli-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-1-vli-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-2-compressed_data_padding.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-2-index-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-2-index-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-2-index-3.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-2-index-4.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-2-index-5.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-3-index-uncomp-overflow.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-too_big_size-with_eopm.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-too_small_size-without_eopm-1.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-too_small_size-without_eopm-2.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-too_small_size-without_eopm-3.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/bad-unknown_size-without_eopm.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-0-empty.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-0cat-empty.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-0catpad-empty.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-0pad-empty.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-3delta-lzma2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-arm64-lzma2-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-arm64-lzma2-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-3.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-check-crc32.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-check-crc64.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-check-none.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-check-sha256.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-delta-lzma2.tiff.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-empty-bcj-lzma2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-3.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-4.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-5.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-v0-trailing-1.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-v0.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-v1-trailing-1.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-v1-trailing-2.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-1-v1.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-2-lzma2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-2-v0-v1.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-2-v1-v0.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-2-v1-v1.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-known_size-with_eopm.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-known_size-without_eopm.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/good-unknown_size-with_eopm.lzma create mode 100644 cpp/third_party/xz-5.8.3/tests/files/unsupported-1-v234.lz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/unsupported-block_header.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/unsupported-check.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-1.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-2.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-3.xz create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/Makefile create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_alone.options create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream.options create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream_mt.options create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_encode_stream.options create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_lzma.dict create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_xz.dict create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_common.h create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_alone.c create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream.c create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream_mt.c create mode 100644 cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_encode_stream.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_bcj_exact_size.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_block_header.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_check.c create mode 100755 cpp/third_party/xz-5.8.3/tests/test_compress.sh create mode 100755 cpp/third_party/xz-5.8.3/tests/test_compress_generated_abc create mode 100755 cpp/third_party/xz-5.8.3/tests/test_compress_generated_random create mode 100755 cpp/third_party/xz-5.8.3/tests/test_compress_generated_text create mode 100755 cpp/third_party/xz-5.8.3/tests/test_files.sh create mode 100644 cpp/third_party/xz-5.8.3/tests/test_filter_flags.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_filter_str.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_hardware.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_index.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_index_hash.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_lzip_decoder.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_memlimit.c create mode 100644 cpp/third_party/xz-5.8.3/tests/test_microlzma.c create mode 100755 cpp/third_party/xz-5.8.3/tests/test_scripts.sh create mode 100644 cpp/third_party/xz-5.8.3/tests/test_stream_flags.c create mode 100755 cpp/third_party/xz-5.8.3/tests/test_suffix.sh create mode 100644 cpp/third_party/xz-5.8.3/tests/test_vli.c create mode 100644 cpp/third_party/xz-5.8.3/tests/tests.cmake create mode 100644 cpp/third_party/xz-5.8.3/tests/tests.h create mode 100644 cpp/third_party/xz-5.8.3/tests/tests_w32res.rc create mode 100644 cpp/third_party/xz-5.8.3/tests/tuktest.h create mode 100644 cpp/third_party/xz-5.8.3/tests/xzgrep_expected_output create mode 100644 cpp/third_party/xz-5.8.3/windows/INSTALL-MSVC.txt create mode 100644 cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_Autotools.txt create mode 100644 cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_CMake.txt create mode 100644 cpp/third_party/xz-5.8.3/windows/README-Windows.txt create mode 100644 cpp/third_party/xz-5.8.3/windows/build-with-cmake.bat create mode 100644 cpp/third_party/xz-5.8.3/windows/build.bash create mode 100644 cpp/third_party/xz-5.8.3/windows/liblzma-crt-mixing.txt create mode 100644 cpp/third_party/zstd-1.5.7/.buckconfig create mode 100644 cpp/third_party/zstd-1.5.7/.buckversion create mode 100644 cpp/third_party/zstd-1.5.7/.cirrus.yml create mode 100644 cpp/third_party/zstd-1.5.7/.gitattributes create mode 100644 cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 cpp/third_party/zstd-1.5.7/.github/dependabot.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/android-ndk-build.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/commit.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/dev-long-tests.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/dev-short-tests.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/nightly.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/publish-release-artifacts.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/scorecards.yml create mode 100644 cpp/third_party/zstd-1.5.7/.github/workflows/windows-artifacts.yml create mode 100644 cpp/third_party/zstd-1.5.7/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/CHANGELOG create mode 100644 cpp/third_party/zstd-1.5.7/CODE_OF_CONDUCT.md create mode 100644 cpp/third_party/zstd-1.5.7/CONTRIBUTING.md create mode 100644 cpp/third_party/zstd-1.5.7/COPYING create mode 100644 cpp/third_party/zstd-1.5.7/LICENSE create mode 100644 cpp/third_party/zstd-1.5.7/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/Package.swift create mode 100644 cpp/third_party/zstd-1.5.7/README.md create mode 100644 cpp/third_party/zstd-1.5.7/SECURITY.md create mode 100644 cpp/third_party/zstd-1.5.7/TESTING.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/VS2005/README.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/VS2005/fullbench/fullbench.vcproj create mode 100644 cpp/third_party/zstd-1.5.7/contrib/VS2005/fuzzer/fuzzer.vcproj create mode 100644 cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd.sln create mode 100644 cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd/zstd.vcproj create mode 100644 cpp/third_party/zstd-1.5.7/contrib/VS2005/zstdlib/zstdlib.vcproj create mode 100755 cpp/third_party/zstd-1.5.7/contrib/cleanTabs create mode 100644 cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/check_flipped_bits.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/docker/Dockerfile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/docker/README.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/README.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/main.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.h create mode 100755 cpp/third_party/zstd-1.5.7/contrib/freestanding_lib/freestanding.py create mode 100644 cpp/third_party/zstd-1.5.7/contrib/gen_html/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/gen_html/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/gen_html/README.md create mode 100755 cpp/third_party/zstd-1.5.7/contrib/gen_html/gen-zstd-manual.sh create mode 100644 cpp/third_party/zstd-1.5.7/contrib/gen_html/gen_html.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/README.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/largeNbDicts.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/README.md create mode 100755 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-benchmark.sh create mode 100755 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-extract-benchmark.sh create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/decompress_sources.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux.mk create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux_zstd.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/mem.h create mode 100755 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/squashfs-benchmark.sh create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/compiler.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/errno.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/kernel.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/limits.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/math64.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/module.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/printk.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/stddef.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/swab.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/types.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/unaligned.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/xxhash.h create mode 100755 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/macro-test.sh create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/static_test.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/test.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_common_module.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_compress_module.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_decompress_module.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_deps.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/match_finders/README.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/premake/premake4.lua create mode 100644 cpp/third_party/zstd-1.5.7/contrib/premake/zstd.lua create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/BUCK create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/ErrorHolder.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/Logging.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/README.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/images/Cspeed.png create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/images/Dspeed.png create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/main.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/test/BUCK create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/test/OptionsTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/test/PzstdTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTrip.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTripTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/BUCK create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Buffer.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/FileSystem.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Likely.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Portability.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Range.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ResourcePool.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ScopeGuard.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ThreadPool.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/WorkQueue.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BUCK create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BufferTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/RangeTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ResourcePoolTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ScopeGuardTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ThreadPoolTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/WorkQueueTest.cpp create mode 100644 cpp/third_party/zstd-1.5.7/contrib/recovery/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/recovery/recover_directory.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/README.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_compression.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_processing.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_compression.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression_mem.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/seekable_tests.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable.h create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable_compression_format.md create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_compress.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seqBench/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/contrib/seqBench/seqBench.c create mode 100644 cpp/third_party/zstd-1.5.7/contrib/snap/snapcraft.yaml create mode 100644 cpp/third_party/zstd-1.5.7/doc/README.md create mode 100644 cpp/third_party/zstd-1.5.7/doc/decompressor_errata.md create mode 100644 cpp/third_party/zstd-1.5.7/doc/decompressor_permissive.md create mode 100644 cpp/third_party/zstd-1.5.7/doc/educational_decoder/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/doc/educational_decoder/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/doc/educational_decoder/README.md create mode 100644 cpp/third_party/zstd-1.5.7/doc/educational_decoder/harness.c create mode 100644 cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.h create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/CSpeed2.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/DCspeed5.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/DSpeed3.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/cdict_v136.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/dict-cr.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/dict-cs.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/dict-ds.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/zstd_cdict_v1_3_5.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/images/zstd_logo86.png create mode 100644 cpp/third_party/zstd-1.5.7/doc/zstd_compression_format.md create mode 100644 cpp/third_party/zstd-1.5.7/doc/zstd_manual.html create mode 100644 cpp/third_party/zstd-1.5.7/examples/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/examples/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/examples/README.md create mode 100644 cpp/third_party/zstd-1.5.7/examples/common.h create mode 100644 cpp/third_party/zstd-1.5.7/examples/dictionary_compression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/dictionary_decompression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/multiple_simple_compression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/multiple_streaming_compression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/simple_compression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/simple_decompression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/streaming_compression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/streaming_compression_thread_pool.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/streaming_decompression.c create mode 100644 cpp/third_party/zstd-1.5.7/examples/streaming_memory_usage.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/lib/BUCK create mode 100644 cpp/third_party/zstd-1.5.7/lib/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/lib/README.md create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/allocations.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/bits.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/bitstream.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/compiler.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/cpu.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/debug.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/debug.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/entropy_common.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/error_private.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/error_private.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/fse.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/fse_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/huf.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/mem.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/pool.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/pool.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/portability_macros.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/threading.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/threading.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/xxhash.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/xxhash.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/zstd_common.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/zstd_deps.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/zstd_internal.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/common/zstd_trace.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/clevels.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/fse_compress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/hist.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/hist.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/huf_compress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_internal.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_cwksp.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm_geartab.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress_amd64.S create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_internal.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_common.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_compress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/dictBuilder/fastcover.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/dictBuilder/zdict.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/dll/example/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/lib/dll/example/README.md create mode 100644 cpp/third_party/zstd-1.5.7/lib/dll/example/build_package.bat create mode 100644 cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.sln create mode 100644 cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.vcxproj create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_legacy.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v02.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v02.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v03.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v03.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v04.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v04.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v05.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v05.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v06.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v06.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v07.c create mode 100644 cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v07.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/libzstd.mk create mode 100644 cpp/third_party/zstd-1.5.7/lib/libzstd.pc.in create mode 100644 cpp/third_party/zstd-1.5.7/lib/module.modulemap create mode 100644 cpp/third_party/zstd-1.5.7/lib/zdict.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/zstd.h create mode 100644 cpp/third_party/zstd-1.5.7/lib/zstd_errors.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/programs/BUCK create mode 100644 cpp/third_party/zstd-1.5.7/programs/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/programs/README.md create mode 100644 cpp/third_party/zstd-1.5.7/programs/benchfn.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/benchfn.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/benchzstd.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/benchzstd.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/datagen.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/datagen.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/dibio.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/dibio.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/fileio.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/fileio.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/fileio_asyncio.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/fileio_asyncio.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/fileio_common.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/fileio_types.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/lorem.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/lorem.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/platform.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/timefn.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/timefn.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/util.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/util.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/windres/verrsrc.h create mode 100644 cpp/third_party/zstd-1.5.7/programs/windres/zstd.rc create mode 100644 cpp/third_party/zstd-1.5.7/programs/windres/zstd32.res create mode 100644 cpp/third_party/zstd-1.5.7/programs/windres/zstd64.res create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstd.1 create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstd.1.md create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstdcli.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstdcli_trace.c create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstdcli_trace.h create mode 100755 cpp/third_party/zstd-1.5.7/programs/zstdgrep create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstdgrep.1 create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstdgrep.1.md create mode 100755 cpp/third_party/zstd-1.5.7/programs/zstdless create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstdless.1 create mode 100644 cpp/third_party/zstd-1.5.7/programs/zstdless.1.md create mode 100644 cpp/third_party/zstd-1.5.7/tests/.gitignore create mode 100755 cpp/third_party/zstd-1.5.7/tests/DEPRECATED-test-zstd-speed.py create mode 100644 cpp/third_party/zstd-1.5.7/tests/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/tests/README.md create mode 100644 cpp/third_party/zstd-1.5.7/tests/automated_benchmarking.py create mode 100644 cpp/third_party/zstd-1.5.7/tests/bigdict.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/checkTag.c create mode 100755 cpp/third_party/zstd-1.5.7/tests/check_size.py create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/README.md create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/args.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/args.sh.exit create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/args.sh.stderr.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/help.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/help.sh.stdout.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/memlimit.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/memlimit.sh.stderr.exact create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/memlimit.sh.stdout.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/output_dir.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/output_dir.sh.stderr.exact create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/output_dir.sh.stdout.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/version.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/basic/version.sh.stdout.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/cmp_size create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/datagen create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/die create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/println create mode 120000 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/unzstd create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/zstd create mode 120000 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/zstdcat create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/zstdgrep create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/bin/zstdless create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/setup create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/zstdgrep.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/zstdgrep.sh.exit create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/zstdgrep.sh.stderr.exact create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/zstdgrep.sh.stdout.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/zstdless.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/zstdless.sh.stderr.exact create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/cltools/zstdless.sh.stdout.glob create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/common/format.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/common/mtime.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/common/permissions.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/common/platform.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/adapt.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/basic.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/compress-literals.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/format.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/golden.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/gzip-compat.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/levels.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/levels.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/long-distance-matcher.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/multi-threaded.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/multi-threaded.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/multiple-files.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/multiple-files.sh.stdout.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/row-match-finder.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/setup create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/stream-size.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/verbose-wlog.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/verbose-wlog.sh.stderr.glob create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/verbose-wlog.sh.stdout.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/window-resize.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/window-resize.sh.stderr.ignore create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/compression/window-resize.sh.stdout.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/decompression/detectErrors.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/decompression/golden.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/decompression/pass-through.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/decompression/pass-through.sh.stderr.exact create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/decompression/pass-through.sh.stdout.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/dict-builder/empty-input.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/dict-builder/empty-input.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/dict-builder/no-inputs.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/dict-builder/no-inputs.sh.exit create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/dictionaries/dictionary-mismatch.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/dictionaries/dictionary-mismatch.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/dictionaries/golden.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/dictionaries/setup create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/dictionaries/setup_once create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-handling/directory-mirror.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-file-to-file.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-file-to-file.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-file-to-stdout.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-file-to-stdout.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-stdin-to-file.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-file-to-file.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-file-to-file.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-file-to-stdout.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-file-to-stdout.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-stdin-to-file.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh.stderr.exact create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/progress/no-progress.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/progress/no-progress.sh.stderr.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/progress/progress.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/progress/progress.sh.stderr.glob create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/run.py create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/zstd-symlinks/setup create mode 100755 cpp/third_party/zstd-1.5.7/tests/cli-tests/zstd-symlinks/zstdcat.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact create mode 100644 cpp/third_party/zstd-1.5.7/tests/datagencli.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/decodecorpus.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/dict-files/zero-weight-dict create mode 100644 cpp/third_party/zstd-1.5.7/tests/external_matchfinder.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/external_matchfinder.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/fullbench.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/README.md create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/block_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/block_round_trip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/decompress_cross_format.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/decompress_dstSize_tooSmall.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/dictionary_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/dictionary_loader.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/dictionary_round_trip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/dictionary_stream_round_trip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/fse_read_ncount.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz.h create mode 100755 cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz.py create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz_data_producer.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz_data_producer.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz_helpers.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz_helpers.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/fuzz_third_party_seq_prod.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/generate_sequences.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/huf_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/huf_round_trip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/raw_dictionary_round_trip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/regression_driver.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/seekable_roundtrip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/seq_prod_fuzz_example/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/seq_prod_fuzz_example/README.md create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/seq_prod_fuzz_example/example_seq_prod.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/sequence_compression_api.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/simple_compress.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/simple_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/simple_round_trip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/stream_decompress.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/stream_round_trip.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/zstd_frame_info.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/zstd_helpers.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzz/zstd_helpers.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/fuzzer.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-compression/PR-3517-block-splitter-corruption-test create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-compression/http create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-compression/huffman-compressed-larger create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-compression/large-literal-and-match-lengths create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression-errors/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression-errors/off0.bin.zst create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression-errors/truncated_huff_state.zst create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression-errors/zeroSeq_extraneous.zst create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression/block-128k.zst create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression/empty-block.zst create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression/rle-first-block.zst create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-decompression/zeroSeq_2B.zst create mode 100644 cpp/third_party/zstd-1.5.7/tests/golden-dictionaries/http-dict-missing-symbols create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/Makefile create mode 100755 cpp/third_party/zstd-1.5.7/tests/gzip/gzip-env.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/helin-segv.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/help-version.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/hufts-segv.gz create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/hufts.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/init.cfg create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/init.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/keep.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/list.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/memcpy-abuse.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/mixed.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/null-suffix-clobber.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/stdin.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/test-driver.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/trailing-nul.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/unpack-invalid.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/z-suffix.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/zdiff.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/zgrep-context.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/zgrep-f.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/zgrep-signal.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/gzip/znew-k.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/invalidDictionaries.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/largeDictionary.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/legacy.c create mode 100755 cpp/third_party/zstd-1.5.7/tests/libzstd_builds.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/longmatch.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/loremOut.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/loremOut.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/paramgrill.c create mode 100755 cpp/third_party/zstd-1.5.7/tests/playTests.sh create mode 100644 cpp/third_party/zstd-1.5.7/tests/poolTests.c create mode 100755 cpp/third_party/zstd-1.5.7/tests/rateLimiter.py create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/README.md create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/config.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/config.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/data.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/data.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/levels.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/method.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/method.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/result.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/result.h create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/results.csv create mode 100644 cpp/third_party/zstd-1.5.7/tests/regression/test.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/roundTripCrash.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/seqgen.c create mode 100644 cpp/third_party/zstd-1.5.7/tests/seqgen.h create mode 100755 cpp/third_party/zstd-1.5.7/tests/test-license.py create mode 100755 cpp/third_party/zstd-1.5.7/tests/test-variants.sh create mode 100755 cpp/third_party/zstd-1.5.7/tests/test-zstd-versions.py create mode 100644 cpp/third_party/zstd-1.5.7/tests/zstreamtest.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/.gitignore create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/BUCK create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/Makefile create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/README.md create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/examples/example.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/examples/example_original.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/examples/fitblk.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/examples/fitblk_original.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/examples/minigzip.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/examples/zwrapbench.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/gzclose.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/gzcompatibility.h create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/gzguts.h create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/gzlib.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/gzread.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/gzwrite.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/zstd_zlibwrapper.c create mode 100644 cpp/third_party/zstd-1.5.7/zlibWrapper/zstd_zlibwrapper.h diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 75cc55a4fc..91ea672dac 100755 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -247,6 +247,23 @@ if (ENABLE_ZLIB) add_definitions(-DENABLE_GZIP) endif() +option(ENABLE_ZSTD "Enable Zstandard compression" ON) +message("cmake using: ENABLE_ZSTD=${ENABLE_ZSTD}") + +if (ENABLE_ZSTD) + add_definitions(-DENABLE_ZSTD) +endif() + +option(ENABLE_LZMA2 "Enable LZMA2 compression through bundled XZ Utils" ON) +message("cmake using: ENABLE_LZMA2=${ENABLE_LZMA2}") + +if (ENABLE_LZMA2) + if (CMAKE_VERSION VERSION_LESS 3.20) + message(FATAL_ERROR "ENABLE_LZMA2 requires CMake 3.20 or newer because bundled XZ Utils 5.8.3 requires it") + endif() + add_definitions(-DENABLE_LZMA2) +endif() + option(ENABLE_THREADS "Enable multi-threaded read/write (requires pthreads)" ON) message("cmake using: ENABLE_THREADS=${ENABLE_THREADS}") diff --git a/cpp/build.sh b/cpp/build.sh index f51c4eded3..d78595929c 100644 --- a/cpp/build.sh +++ b/cpp/build.sh @@ -32,6 +32,8 @@ enable_snappy=ON enable_lz4=ON enable_lzokay=ON enable_zlib=ON +enable_zstd=ON +enable_lzma2=ON shell_dir=$(cd "$(dirname "$0")";pwd) @@ -62,6 +64,10 @@ Options: --disable-lzokay --enable-zlib= --disable-zlib + --enable-zstd= + --disable-zstd + --enable-lzma2= + --disable-lzma2 -h, --help Show this help message. EOF } @@ -79,6 +85,8 @@ function print_config() echo "enable_lz4=$enable_lz4" echo "enable_lzokay=$enable_lzokay" echo "enable_zlib=$enable_zlib" + echo "enable_zstd=$enable_zstd" + echo "enable_lzma2=$enable_lzma2" } function run_test_for_cov() @@ -123,6 +131,10 @@ parse_options() enable_lzokay=$(get_key_value "$1");; --enable-zlib=*) enable_zlib=$(get_key_value "$1");; + --enable-zstd=*) + enable_zstd=$(get_key_value "$1");; + --enable-lzma2=*) + enable_lzma2=$(get_key_value "$1");; --disable-antlr4) enable_antlr4=OFF;; --disable-snappy) @@ -133,6 +145,10 @@ parse_options() enable_lzokay=OFF;; --disable-zlib) enable_zlib=OFF;; + --disable-zstd) + enable_zstd=OFF;; + --disable-lzma2) + enable_lzma2=OFF;; -h | --help) usage exit 0;; @@ -199,7 +215,9 @@ cmake ../../ \ -DENABLE_SNAPPY=$enable_snappy \ -DENABLE_LZ4=$enable_lz4 \ -DENABLE_LZOKAY=$enable_lzokay \ - -DENABLE_ZLIB=$enable_zlib + -DENABLE_ZLIB=$enable_zlib \ + -DENABLE_ZSTD=$enable_zstd \ + -DENABLE_LZMA2=$enable_lzma2 VERBOSE=1 make if [ ${do_install} -eq 1 ] diff --git a/cpp/pom.xml b/cpp/pom.xml index 153e75dc21..e82888645a 100644 --- a/cpp/pom.xml +++ b/cpp/pom.xml @@ -39,6 +39,8 @@ ON ON ON + ON + ON ON OFF @@ -87,6 +89,8 @@ + + "): + + +=====+ + | Foo | + +=====+ + + +=====+ + ---> | Bar | + +=====+ + + The above is equivalent to this: + + +=====+=====+ + | Foo | Bar | + +=====+=====+ + + +1.2. Multibyte Integers + + Multibyte integers of static length, such as CRC values, + are stored in little endian byte order (least significant + byte first). + + When smaller values are more likely than bigger values (for + example file sizes), multibyte integers are encoded in a + variable-length representation: + - Numbers in the range [0, 127] are copied as is, and take + one byte of space. + - Bigger numbers will occupy two or more bytes. All but the + last byte of the multibyte representation have the highest + (eighth) bit set. + + For now, the value of the variable-length integers is limited + to 63 bits, which limits the encoded size of the integer to + nine bytes. These limits may be increased in the future if + needed. + + The following C code illustrates encoding and decoding of + variable-length integers. The functions return the number of + bytes occupied by the integer (1-9), or zero on error. + + #include + #include + + size_t + encode(uint8_t buf[static 9], uint64_t num) + { + if (num > UINT64_MAX / 2) + return 0; + + size_t i = 0; + + while (num >= 0x80) { + buf[i++] = (uint8_t)(num) | 0x80; + num >>= 7; + } + + buf[i++] = (uint8_t)(num); + + return i; + } + + size_t + decode(const uint8_t buf[], size_t size_max, uint64_t *num) + { + if (size_max == 0) + return 0; + + if (size_max > 9) + size_max = 9; + + *num = buf[0] & 0x7F; + size_t i = 0; + + while (buf[i++] & 0x80) { + if (i >= size_max || buf[i] == 0x00) + return 0; + + *num |= (uint64_t)(buf[i] & 0x7F) << (i * 7); + } + + return i; + } + + +2. Overall Structure of .xz File + + A standalone .xz files consist of one or more Streams which may + have Stream Padding between or after them: + + +========+================+========+================+ + | Stream | Stream Padding | Stream | Stream Padding | ... + +========+================+========+================+ + + The sizes of Stream and Stream Padding are always multiples + of four bytes, thus the size of every valid .xz file MUST be + a multiple of four bytes. + + While a typical file contains only one Stream and no Stream + Padding, a decoder handling standalone .xz files SHOULD support + files that have more than one Stream or Stream Padding. + + In contrast to standalone .xz files, when the .xz file format + is used as an internal part of some other file format or + communication protocol, it usually is expected that the decoder + stops after the first Stream, and doesn't look for Stream + Padding or possibly other Streams. + + +2.1. Stream + + +-+-+-+-+-+-+-+-+-+-+-+-+=======+=======+ +=======+ + | Stream Header | Block | Block | ... | Block | + +-+-+-+-+-+-+-+-+-+-+-+-+=======+=======+ +=======+ + + +=======+-+-+-+-+-+-+-+-+-+-+-+-+ + ---> | Index | Stream Footer | + +=======+-+-+-+-+-+-+-+-+-+-+-+-+ + + All the above fields have a size that is a multiple of four. If + Stream is used as an internal part of another file format, it + is RECOMMENDED to make the Stream start at an offset that is + a multiple of four bytes. + + Stream Header, Index, and Stream Footer are always present in + a Stream. The maximum size of the Index field is 16 GiB (2^34). + + There are zero or more Blocks. The maximum number of Blocks is + limited only by the maximum size of the Index field. + + Total size of a Stream MUST be less than 8 EiB (2^63 bytes). + The same limit applies to the total amount of uncompressed + data stored in a Stream. + + If an implementation supports handling .xz files with multiple + concatenated Streams, it MAY apply the above limits to the file + as a whole instead of limiting per Stream basis. + + +2.1.1. Stream Header + + +---+---+---+---+---+---+-------+------+--+--+--+--+ + | Header Magic Bytes | Stream Flags | CRC32 | + +---+---+---+---+---+---+-------+------+--+--+--+--+ + + +2.1.1.1. Header Magic Bytes + + The first six (6) bytes of the Stream are so called Header + Magic Bytes. They can be used to identify the file type. + + Using a C array and ASCII: + const uint8_t HEADER_MAGIC[6] + = { 0xFD, '7', 'z', 'X', 'Z', 0x00 }; + + In plain hexadecimal: + FD 37 7A 58 5A 00 + + Notes: + - The first byte (0xFD) was chosen so that the files cannot + be erroneously detected as being in .lzma format, in which + the first byte is in the range [0x00, 0xE0]. + - The sixth byte (0x00) was chosen to prevent applications + from misdetecting the file as a text file. + + If the Header Magic Bytes don't match, the decoder MUST + indicate an error. + + +2.1.1.2. Stream Flags + + The first byte of Stream Flags is always a null byte. In the + future, this byte may be used to indicate a new Stream version + or other Stream properties. + + The second byte of Stream Flags is a bit field: + + Bit(s) Mask Description + 0-3 0x0F Type of Check (see Section 3.4): + ID Size Check name + 0x00 0 bytes None + 0x01 4 bytes CRC32 + 0x02 4 bytes (Reserved) + 0x03 4 bytes (Reserved) + 0x04 8 bytes CRC64 + 0x05 8 bytes (Reserved) + 0x06 8 bytes (Reserved) + 0x07 16 bytes (Reserved) + 0x08 16 bytes (Reserved) + 0x09 16 bytes (Reserved) + 0x0A 32 bytes SHA-256 + 0x0B 32 bytes (Reserved) + 0x0C 32 bytes (Reserved) + 0x0D 64 bytes (Reserved) + 0x0E 64 bytes (Reserved) + 0x0F 64 bytes (Reserved) + 4-7 0xF0 Reserved for future use; MUST be zero for now. + + Implementations SHOULD support at least the Check IDs 0x00 + (None) and 0x01 (CRC32). Supporting other Check IDs is + OPTIONAL. If an unsupported Check is used, the decoder SHOULD + indicate a warning or error. + + If any reserved bit is set, the decoder MUST indicate an error. + It is possible that there is a new field present which the + decoder is not aware of, and can thus parse the Stream Header + incorrectly. + + +2.1.1.3. CRC32 + + The CRC32 is calculated from the Stream Flags field. It is + stored as an unsigned 32-bit little endian integer. If the + calculated value does not match the stored one, the decoder + MUST indicate an error. + + The idea is that Stream Flags would always be two bytes, even + if new features are needed. This way old decoders will be able + to verify the CRC32 calculated from Stream Flags, and thus + distinguish between corrupt files (CRC32 doesn't match) and + files that the decoder doesn't support (CRC32 matches but + Stream Flags has reserved bits set). + + +2.1.2. Stream Footer + + +-+-+-+-+---+---+---+---+-------+------+----------+---------+ + | CRC32 | Backward Size | Stream Flags | Footer Magic Bytes | + +-+-+-+-+---+---+---+---+-------+------+----------+---------+ + + +2.1.2.1. CRC32 + + The CRC32 is calculated from the Backward Size and Stream Flags + fields. It is stored as an unsigned 32-bit little endian + integer. If the calculated value does not match the stored one, + the decoder MUST indicate an error. + + The reason to have the CRC32 field before the Backward Size and + Stream Flags fields is to keep the four-byte fields aligned to + a multiple of four bytes. + + +2.1.2.2. Backward Size + + Backward Size is stored as a 32-bit little endian integer, + which indicates the size of the Index field as multiple of + four bytes, minimum value being four bytes: + + real_backward_size = (stored_backward_size + 1) * 4; + + If the stored value does not match the real size of the Index + field, the decoder MUST indicate an error. + + Using a fixed-size integer to store Backward Size makes + it slightly simpler to parse the Stream Footer when the + application needs to parse the Stream backwards. + + +2.1.2.3. Stream Flags + + This is a copy of the Stream Flags field from the Stream + Header. The information stored to Stream Flags is needed + when parsing the Stream backwards. The decoder MUST compare + the Stream Flags fields in both Stream Header and Stream + Footer, and indicate an error if they are not identical. + + +2.1.2.4. Footer Magic Bytes + + As the last step of the decoding process, the decoder MUST + verify the existence of Footer Magic Bytes. If they don't + match, an error MUST be indicated. + + Using a C array and ASCII: + const uint8_t FOOTER_MAGIC[2] = { 'Y', 'Z' }; + + In hexadecimal: + 59 5A + + The primary reason to have Footer Magic Bytes is to make + it easier to detect incomplete files quickly, without + uncompressing. If the file does not end with Footer Magic Bytes + (excluding Stream Padding described in Section 2.2), it cannot + be undamaged, unless someone has intentionally appended garbage + after the end of the Stream. + + +2.2. Stream Padding + + Only the decoders that support decoding of concatenated Streams + MUST support Stream Padding. + + Stream Padding MUST contain only null bytes. To preserve the + four-byte alignment of consecutive Streams, the size of Stream + Padding MUST be a multiple of four bytes. Empty Stream Padding + is allowed. If these requirements are not met, the decoder MUST + indicate an error. + + Note that non-empty Stream Padding is allowed at the end of the + file; there doesn't need to be a new Stream after non-empty + Stream Padding. This can be convenient in certain situations + [GNU-tar]. + + The possibility of Stream Padding MUST be taken into account + when designing an application that parses Streams backwards, + and the application supports concatenated Streams. + + +3. Block + + +==============+=================+===============+=======+ + | Block Header | Compressed Data | Block Padding | Check | + +==============+=================+===============+=======+ + + +3.1. Block Header + + +-------------------+-------------+=================+ + | Block Header Size | Block Flags | Compressed Size | + +-------------------+-------------+=================+ + + +===================+======================+ + ---> | Uncompressed Size | List of Filter Flags | + +===================+======================+ + + +================+--+--+--+--+ + ---> | Header Padding | CRC32 | + +================+--+--+--+--+ + + +3.1.1. Block Header Size + + This field overlaps with the Index Indicator field (see + Section 4.1). + + This field contains the size of the Block Header field, + including the Block Header Size field itself. Valid values are + in the range [0x01, 0xFF], which indicate the size of the Block + Header as multiples of four bytes, minimum size being eight + bytes: + + real_header_size = (encoded_header_size + 1) * 4; + + If a Block Header bigger than 1024 bytes is needed in the + future, a new field can be added between the Block Header and + Compressed Data fields. The presence of this new field would + be indicated in the Block Header field. + + +3.1.2. Block Flags + + The Block Flags field is a bit field: + + Bit(s) Mask Description + 0-1 0x03 Number of filters (1-4) + 2-5 0x3C Reserved for future use; MUST be zero for now. + 6 0x40 The Compressed Size field is present. + 7 0x80 The Uncompressed Size field is present. + + If any reserved bit is set, the decoder MUST indicate an error. + It is possible that there is a new field present which the + decoder is not aware of, and can thus parse the Block Header + incorrectly. + + +3.1.3. Compressed Size + + This field is present only if the appropriate bit is set in + the Block Flags field (see Section 3.1.2). + + The Compressed Size field contains the size of the Compressed + Data field, which MUST be non-zero. Compressed Size is stored + using the encoding described in Section 1.2. If the Compressed + Size doesn't match the size of the Compressed Data field, the + decoder MUST indicate an error. + + +3.1.4. Uncompressed Size + + This field is present only if the appropriate bit is set in + the Block Flags field (see Section 3.1.2). + + The Uncompressed Size field contains the size of the Block + after uncompressing. Uncompressed Size is stored using the + encoding described in Section 1.2. If the Uncompressed Size + does not match the real uncompressed size, the decoder MUST + indicate an error. + + Storing the Compressed Size and Uncompressed Size fields serves + several purposes: + - The decoder knows how much memory it needs to allocate + for a temporary buffer in multithreaded mode. + - Simple error detection: wrong size indicates a broken file. + - Seeking forwards to a specific location in streamed mode. + + It should be noted that the only reliable way to determine + the real uncompressed size is to uncompress the Block, + because the Block Header and Index fields may contain + (intentionally or unintentionally) invalid information. + + +3.1.5. List of Filter Flags + + +================+================+ +================+ + | Filter 0 Flags | Filter 1 Flags | ... | Filter n Flags | + +================+================+ +================+ + + The number of Filter Flags fields is stored in the Block Flags + field (see Section 3.1.2). + + The format of each Filter Flags field is as follows: + + +===========+====================+===================+ + | Filter ID | Size of Properties | Filter Properties | + +===========+====================+===================+ + + Both Filter ID and Size of Properties are stored using the + encoding described in Section 1.2. Size of Properties indicates + the size of the Filter Properties field as bytes. The list of + officially defined Filter IDs and the formats of their Filter + Properties are described in Section 5.3. + + Filter IDs greater than or equal to 0x4000_0000_0000_0000 + (2^62) are reserved for implementation-specific internal use. + These Filter IDs MUST never be used in List of Filter Flags. + + +3.1.6. Header Padding + + This field contains as many null byte as it is needed to make + the Block Header have the size specified in Block Header Size. + If any of the bytes are not null bytes, the decoder MUST + indicate an error. It is possible that there is a new field + present which the decoder is not aware of, and can thus parse + the Block Header incorrectly. + + +3.1.7. CRC32 + + The CRC32 is calculated over everything in the Block Header + field except the CRC32 field itself. It is stored as an + unsigned 32-bit little endian integer. If the calculated + value does not match the stored one, the decoder MUST indicate + an error. + + By verifying the CRC32 of the Block Header before parsing the + actual contents allows the decoder to distinguish between + corrupt and unsupported files. + + +3.2. Compressed Data + + The format of Compressed Data depends on Block Flags and List + of Filter Flags. Excluding the descriptions of the simplest + filters in Section 5.3, the format of the filter-specific + encoded data is out of scope of this document. + + +3.3. Block Padding + + Block Padding MUST contain 0-3 null bytes to make the size of + the Block a multiple of four bytes. This can be needed when + the size of Compressed Data is not a multiple of four. If any + of the bytes in Block Padding are not null bytes, the decoder + MUST indicate an error. + + +3.4. Check + + The type and size of the Check field depends on which bits + are set in the Stream Flags field (see Section 2.1.1.2). + + The Check, when used, is calculated from the original + uncompressed data. If the calculated Check does not match the + stored one, the decoder MUST indicate an error. If the selected + type of Check is not supported by the decoder, it SHOULD + indicate a warning or error. + + +4. Index + + +-----------------+===================+ + | Index Indicator | Number of Records | + +-----------------+===================+ + + +=================+===============+-+-+-+-+ + ---> | List of Records | Index Padding | CRC32 | + +=================+===============+-+-+-+-+ + + Index serves several purposes. Using it, one can + - verify that all Blocks in a Stream have been processed; + - find out the uncompressed size of a Stream; and + - quickly access the beginning of any Block (random access). + + +4.1. Index Indicator + + This field overlaps with the Block Header Size field (see + Section 3.1.1). The value of Index Indicator is always 0x00. + + +4.2. Number of Records + + This field indicates how many Records there are in the List + of Records field, and thus how many Blocks there are in the + Stream. The value is stored using the encoding described in + Section 1.2. If the decoder has decoded all the Blocks of the + Stream, and then notices that the Number of Records doesn't + match the real number of Blocks, the decoder MUST indicate an + error. + + +4.3. List of Records + + List of Records consists of as many Records as indicated by the + Number of Records field: + + +========+========+ + | Record | Record | ... + +========+========+ + + Each Record contains information about one Block: + + +===============+===================+ + | Unpadded Size | Uncompressed Size | + +===============+===================+ + + If the decoder has decoded all the Blocks of the Stream, it + MUST verify that the contents of the Records match the real + Unpadded Size and Uncompressed Size of the respective Blocks. + + Implementation hint: It is possible to verify the Index with + constant memory usage by calculating for example SHA-256 of + both the real size values and the List of Records, then + comparing the hash values. Implementing this using + non-cryptographic hash like CRC32 SHOULD be avoided unless + small code size is important. + + If the decoder supports random-access reading, it MUST verify + that Unpadded Size and Uncompressed Size of every completely + decoded Block match the sizes stored in the Index. If only + partial Block is decoded, the decoder MUST verify that the + processed sizes don't exceed the sizes stored in the Index. + + +4.3.1. Unpadded Size + + This field indicates the size of the Block excluding the Block + Padding field. That is, Unpadded Size is the size of the Block + Header, Compressed Data, and Check fields. Unpadded Size is + stored using the encoding described in Section 1.2. The value + MUST never be zero; with the current structure of Blocks, the + actual minimum value for Unpadded Size is five. + + Implementation note: Because the size of the Block Padding + field is not included in Unpadded Size, calculating the total + size of a Stream or doing random-access reading requires + calculating the actual size of the Blocks by rounding Unpadded + Sizes up to the next multiple of four. + + The reason to exclude Block Padding from Unpadded Size is to + ease making a raw copy of Compressed Data without Block + Padding. This can be useful, for example, if someone wants + to convert Streams to some other file format quickly. + + +4.3.2. Uncompressed Size + + This field indicates the Uncompressed Size of the respective + Block as bytes. The value is stored using the encoding + described in Section 1.2. + + +4.4. Index Padding + + This field MUST contain 0-3 null bytes to pad the Index to + a multiple of four bytes. If any of the bytes are not null + bytes, the decoder MUST indicate an error. + + +4.5. CRC32 + + The CRC32 is calculated over everything in the Index field + except the CRC32 field itself. The CRC32 is stored as an + unsigned 32-bit little endian integer. If the calculated + value does not match the stored one, the decoder MUST indicate + an error. + + +5. Filter Chains + + The Block Flags field defines how many filters are used. When + more than one filter is used, the filters are chained; that is, + the output of one filter is the input of another filter. The + following figure illustrates the direction of data flow. + + v Uncompressed Data ^ + | Filter 0 | + Encoder | Filter 1 | Decoder + | Filter n | + v Compressed Data ^ + + +5.1. Alignment + + Alignment of uncompressed input data is usually the job of + the application producing the data. For example, to get the + best results, an archiver tool should make sure that all + PowerPC executable files in the archive stream start at + offsets that are multiples of four bytes. + + Some filters, for example LZMA2, can be configured to take + advantage of specified alignment of input data. Note that + taking advantage of aligned input can be beneficial also when + a filter is not the first filter in the chain. For example, + if you compress PowerPC executables, you may want to use the + PowerPC filter and chain that with the LZMA2 filter. Because + not only the input but also the output alignment of the PowerPC + filter is four bytes, it is now beneficial to set LZMA2 + settings so that the LZMA2 encoder can take advantage of its + four-byte-aligned input data. + + The output of the last filter in the chain is stored to the + Compressed Data field, which is is guaranteed to be aligned + to a multiple of four bytes relative to the beginning of the + Stream. This can increase + - speed, if the filtered data is handled multiple bytes at + a time by the filter-specific encoder and decoder, + because accessing aligned data in computer memory is + usually faster; and + - compression ratio, if the output data is later compressed + with an external compression tool. + + +5.2. Security + + If filters would be allowed to be chained freely, it would be + possible to create malicious files, that would be very slow to + decode. Such files could be used to create denial of service + attacks. + + Slow files could occur when multiple filters are chained: + + v Compressed input data + | Filter 1 decoder (last filter) + | Filter 0 decoder (non-last filter) + v Uncompressed output data + + The decoder of the last filter in the chain produces a lot of + output from little input. Another filter in the chain takes the + output of the last filter, and produces very little output + while consuming a lot of input. As a result, a lot of data is + moved inside the filter chain, but the filter chain as a whole + gets very little work done. + + To prevent this kind of slow files, there are restrictions on + how the filters can be chained. These restrictions MUST be + taken into account when designing new filters. + + The maximum number of filters in the chain has been limited to + four, thus there can be at maximum of three non-last filters. + Of these three non-last filters, only two are allowed to change + the size of the data. + + The non-last filters, that change the size of the data, MUST + have a limit how much the decoder can compress the data: the + decoder SHOULD produce at least n bytes of output when the + filter is given 2n bytes of input. This limit is not + absolute, but significant deviations MUST be avoided. + + The above limitations guarantee that if the last filter in the + chain produces 4n bytes of output, the chain as a whole will + produce at least n bytes of output. + + +5.3. Filters + +5.3.1. LZMA2 + + LZMA (Lempel-Ziv-Markov chain-Algorithm) is a general-purpose + compression algorithm with high compression ratio and fast + decompression. LZMA is based on LZ77 and range coding + algorithms. + + LZMA2 is an extension on top of the original LZMA. LZMA2 uses + LZMA internally, but adds support for flushing the encoder, + uncompressed chunks, eases stateful decoder implementations, + and improves support for multithreading. Thus, the plain LZMA + will not be supported in this file format. + + Filter ID: 0x21 + Size of Filter Properties: 1 byte + Changes size of data: Yes + Allow as a non-last filter: No + Allow as the last filter: Yes + + Preferred alignment: + Input data: Adjustable to 1/2/4/8/16 byte(s) + Output data: 1 byte + + The format of the one-byte Filter Properties field is as + follows: + + Bits Mask Description + 0-5 0x3F Dictionary Size + 6-7 0xC0 Reserved for future use; MUST be zero for now. + + Dictionary Size is encoded with one-bit mantissa and five-bit + exponent. The smallest dictionary size is 4 KiB and the biggest + is 4 GiB. + + Raw value Mantissa Exponent Dictionary size + 0 2 11 4 KiB + 1 3 11 6 KiB + 2 2 12 8 KiB + 3 3 12 12 KiB + 4 2 13 16 KiB + 5 3 13 24 KiB + 6 2 14 32 KiB + ... ... ... ... + 35 3 27 768 MiB + 36 2 28 1024 MiB + 37 3 29 1536 MiB + 38 2 30 2048 MiB + 39 3 30 3072 MiB + 40 2 31 4096 MiB - 1 B + + Instead of having a table in the decoder, the dictionary size + can be decoded using the following C code: + + const uint8_t bits = get_dictionary_flags() & 0x3F; + if (bits > 40) + return DICTIONARY_TOO_BIG; // Bigger than 4 GiB + + uint32_t dictionary_size; + if (bits == 40) { + dictionary_size = UINT32_MAX; + } else { + dictionary_size = 2 | (bits & 1); + dictionary_size <<= bits / 2 + 11; + } + + +5.3.2. Branch/Call/Jump Filters for Executables + + These filters convert relative branch, call, and jump + instructions to their absolute counterparts in executable + files. This conversion increases redundancy and thus + compression ratio. + + Size of Filter Properties: 0 or 4 bytes + Changes size of data: No + Allow as a non-last filter: Yes + Allow as the last filter: No + + Below is the list of filters in this category. The alignment + is the same for both input and output data. + + Filter ID Alignment Description + 0x04 1 byte x86 filter (BCJ) + 0x05 4 bytes PowerPC (big endian) filter + 0x06 16 bytes IA64 filter + 0x07 4 bytes ARM filter [1] + 0x08 2 bytes ARM Thumb filter [1] + 0x09 4 bytes SPARC filter + 0x0A 4 bytes ARM64 filter [2] + 0x0B 2 bytes RISC-V filter + + [1] These are for little endian instruction encoding. + This must not be confused with data endianness. + A processor configured for big endian data access + may still use little endian instruction encoding. + The filters don't care about the data endianness. + + [2] 4096-byte alignment gives the best results + because the address in the ADRP instruction + is a multiple of 4096 bytes. + + If the size of Filter Properties is four bytes, the Filter + Properties field contains the start offset used for address + conversions. It is stored as an unsigned 32-bit little endian + integer. The start offset MUST be a multiple of the alignment + of the filter as listed in the table above; if it isn't, the + decoder MUST indicate an error. If the size of Filter + Properties is zero, the start offset is zero. + + Setting the start offset may be useful if an executable has + multiple sections, and there are many cross-section calls. + Taking advantage of this feature usually requires usage of + the Subblock filter, whose design is not complete yet. + + +5.3.3. Delta + + The Delta filter may increase compression ratio when the value + of the next byte correlates with the value of an earlier byte + at specified distance. + + Filter ID: 0x03 + Size of Filter Properties: 1 byte + Changes size of data: No + Allow as a non-last filter: Yes + Allow as the last filter: No + + Preferred alignment: + Input data: 1 byte + Output data: Same as the original input data + + The Properties byte indicates the delta distance, which can be + 1-256 bytes backwards from the current byte: 0x00 indicates + distance of 1 byte and 0xFF distance of 256 bytes. + + +5.3.3.1. Format of the Encoded Output + + The code below illustrates both encoding and decoding with + the Delta filter. + + // Distance is in the range [1, 256]. + const unsigned int distance = get_properties_byte() + 1; + uint8_t pos = 0; + uint8_t delta[256]; + + memset(delta, 0, sizeof(delta)); + + while (1) { + const int byte = read_byte(); + if (byte == EOF) + break; + + uint8_t tmp = delta[(uint8_t)(distance + pos)]; + if (is_encoder) { + tmp = (uint8_t)(byte) - tmp; + delta[pos] = (uint8_t)(byte); + } else { + tmp = (uint8_t)(byte) + tmp; + delta[pos] = tmp; + } + + write_byte(tmp); + --pos; + } + + +5.4. Custom Filter IDs + + If a developer wants to use custom Filter IDs, there are two + choices. The first choice is to contact Lasse Collin and ask + him to allocate a range of IDs for the developer. + + The second choice is to generate a 40-bit random integer + which the developer can use as a personal Developer ID. + To minimize the risk of collisions, Developer ID has to be + a randomly generated integer, not manually selected "hex word". + The following command, which works on many free operating + systems, can be used to generate Developer ID: + + dd if=/dev/urandom bs=5 count=1 | hexdump + + The developer can then use the Developer ID to create unique + (well, hopefully unique) Filter IDs. + + Bits Mask Description + 0-15 0x0000_0000_0000_FFFF Filter ID + 16-55 0x00FF_FFFF_FFFF_0000 Developer ID + 56-62 0x3F00_0000_0000_0000 Static prefix: 0x3F + + The resulting 63-bit integer will use 9 bytes of space when + stored using the encoding described in Section 1.2. To get + a shorter ID, see the beginning of this Section how to + request a custom ID range. + + +5.4.1. Reserved Custom Filter ID Ranges + + Range Description + 0x0000_0300 - 0x0000_04FF Reserved to ease .7z compatibility + 0x0002_0000 - 0x0007_FFFF Reserved to ease .7z compatibility + 0x0200_0000 - 0x07FF_FFFF Reserved to ease .7z compatibility + + +6. Cyclic Redundancy Checks + + There are several incompatible variations to calculate CRC32 + and CRC64. For simplicity and clarity, complete examples are + provided to calculate the checks as they are used in this file + format. Implementations MAY use different code as long as it + gives identical results. + + The program below reads data from standard input, calculates + the CRC32 and CRC64 values, and prints the calculated values + as big endian hexadecimal strings to standard output. + + #include + #include + #include + + uint32_t crc32_table[256]; + uint64_t crc64_table[256]; + + void + init(void) + { + static const uint32_t poly32 = UINT32_C(0xEDB88320); + static const uint64_t poly64 + = UINT64_C(0xC96C5795D7870F42); + + for (size_t i = 0; i < 256; ++i) { + uint32_t crc32 = i; + uint64_t crc64 = i; + + for (size_t j = 0; j < 8; ++j) { + if (crc32 & 1) + crc32 = (crc32 >> 1) ^ poly32; + else + crc32 >>= 1; + + if (crc64 & 1) + crc64 = (crc64 >> 1) ^ poly64; + else + crc64 >>= 1; + } + + crc32_table[i] = crc32; + crc64_table[i] = crc64; + } + } + + uint32_t + crc32(const uint8_t *buf, size_t size, uint32_t crc) + { + crc = ~crc; + for (size_t i = 0; i < size; ++i) + crc = crc32_table[buf[i] ^ (crc & 0xFF)] + ^ (crc >> 8); + return ~crc; + } + + uint64_t + crc64(const uint8_t *buf, size_t size, uint64_t crc) + { + crc = ~crc; + for (size_t i = 0; i < size; ++i) + crc = crc64_table[buf[i] ^ (crc & 0xFF)] + ^ (crc >> 8); + return ~crc; + } + + int + main() + { + init(); + + uint32_t value32 = 0; + uint64_t value64 = 0; + uint64_t total_size = 0; + uint8_t buf[8192]; + + while (1) { + const size_t buf_size + = fread(buf, 1, sizeof(buf), stdin); + if (buf_size == 0) + break; + + total_size += buf_size; + value32 = crc32(buf, buf_size, value32); + value64 = crc64(buf, buf_size, value64); + } + + printf("Bytes: %" PRIu64 "\n", total_size); + printf("CRC-32: 0x%08" PRIX32 "\n", value32); + printf("CRC-64: 0x%016" PRIX64 "\n", value64); + + return 0; + } + + +7. References + + LZMA SDK - The original LZMA implementation + https://7-zip.org/sdk.html + + LZMA Utils - LZMA adapted to POSIX-like systems + https://tukaani.org/lzma/ + + XZ Utils - The next generation of LZMA Utils + https://tukaani.org/xz/ + + [RFC-1952] + GZIP file format specification version 4.3 + https://www.ietf.org/rfc/rfc1952.txt + - Notation of byte boxes in section "2.1. Overall conventions" + + [RFC-2119] + Key words for use in RFCs to Indicate Requirement Levels + https://www.ietf.org/rfc/rfc2119.txt + + [GNU-tar] + GNU tar 1.35 manual + https://www.gnu.org/software/tar/manual/html_node/Blocking-Factor.html + - Node 9.4.2 "Blocking Factor", paragraph that begins + "gzip will complain about trailing garbage" + - Note that this URL points to the latest version of the + manual, and may some day not contain the note which is in + 1.35. For the exact version of the manual, download GNU + tar 1.35: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.35.tar.gz + diff --git a/cpp/third_party/xz-5.8.3/dos/INSTALL.txt b/cpp/third_party/xz-5.8.3/dos/INSTALL.txt new file mode 100644 index 0000000000..e5ba85bdb1 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/dos/INSTALL.txt @@ -0,0 +1,78 @@ + +Building XZ Utils for DOS +========================= + +Introduction + + This document explains how to build XZ Utils for DOS using DJGPP. + The resulting binaries should run at least on various DOS versions + and under Windows 95/98/98SE/ME. + + This is somewhat experimental and has got very little testing. + + Note: Makefile and config.h are updated only now and then. This + means that if you checked out a development version, building for + DOS might not work without updating Makefile and config.h first. + + +Getting and Installing DJGPP + + You may use to help + deciding what to download. If you are only interested in building + XZ Utils, the zip-picker may list files that you don't strictly + need. However, using the zip-picker can still be worth it to get a + nice short summary of installation instructions (they can be found + from readme.1st too). + + For a more manual method, first select a mirror from + and go the + subdirectory named "current". You need the following files: + + unzip32.exe (if you don't already have a LFN-capable unzipper) + v2/djdev205.zip + v2gnu/bnu234b.zip + v2gnu/gcc920b.zip + v2gnu/mak43b.zip + v2misc/csdpmi7b.zip + + If newer versions are available, probably you should try them first. + Note that versions older than djdev205.zip aren't supported. Also + note that you want csdpmi7b.zip even if you run under Windows or + DOSEMU because the XZ Utils Makefile will embed cwsdstub.exe to + the resulting xz.exe. + + See the instructions in readme.1st found from djdev205.zip. Here's + a short summary, but you should still read readme.1st. + + C:\> mkdir DJGPP + C:\> cd DJGPP + C:\DJGPP> c:\download\unzip32 c:\download\djdev205.zip + C:\DJGPP> c:\download\unzip32 c:\download\bnu234b.zip + C:\DJGPP> c:\download\unzip32 c:\download\gcc920b.zip + C:\DJGPP> c:\download\unzip32 c:\download\mak43b.zip + C:\DJGPP> c:\download\unzip32 c:\download\csdpmi7b.zip + + C:\DJGPP> set PATH=C:\DJGPP\BIN;%PATH% + C:\DJGPP> set DJGPP=C:\DJGPP\DJGPP.ENV + + You may want to add the last two lines into AUTOEXEC.BAT or have, + for example, DJGPP.BAT which you can run before using DJGPP. + + Make sure you use completely upper case path in the DJGPP environment + variable. This is not required by DJGPP, but the XZ Utils Makefile is + a bit stupid and expects that everything in DJGPP environment variable + is uppercase. + + +Building + + You need to have an environment that supports long filenames (LFN). + Once you have built XZ Utils, the resulting binaries can be run + without long filename support. + + Run "make" in this directory (the directory containing this + INSTALL.txt). You should get xz.exe (and a bunch of temporary files). + Other tools are not built. Having e.g. xzdec.exe doesn't save much + space compared to xz.exe because the DJGPP runtime makes the .exe + quite big anyway. + diff --git a/cpp/third_party/xz-5.8.3/dos/Makefile b/cpp/third_party/xz-5.8.3/dos/Makefile new file mode 100644 index 0000000000..a3d4ab4ba2 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/dos/Makefile @@ -0,0 +1,150 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################### +# +# Makefile to build XZ Utils using DJGPP +# +# Author: Lasse Collin +# +############################################################################### + +# For debugging, set comment "#define NDEBUG 1" from config.h to enable +# the assert() macro, set STRIP=rem to disable stripping, and finally +# e.g. CFLAGS="-g -O0". +CC = gcc +STRIP = strip +CPPFLAGS = +CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2 +LDFLAGS = -lemu + +ALL_CFLAGS = -std=gnu99 + +ALL_CPPFLAGS = \ + -I. \ + -I../lib \ + -I../src/common \ + -I../src/liblzma/api \ + -I../src/liblzma/common \ + -I../src/liblzma/check \ + -I../src/liblzma/rangecoder \ + -I../src/liblzma/lz \ + -I../src/liblzma/lzma \ + -I../src/liblzma/delta \ + -I../src/liblzma/simple \ + -DHAVE_CONFIG_H + +ALL_CPPFLAGS += $(CPPFLAGS) +ALL_CFLAGS += $(CFLAGS) + +.PHONY: all +all: xz.exe + +SRCS_C = \ + ../lib/getopt.c \ + ../lib/getopt1.c \ + ../src/common/tuklib_cpucores.c \ + ../src/common/tuklib_exit.c \ + ../src/common/tuklib_mbstr_fw.c \ + ../src/common/tuklib_mbstr_nonprint.c \ + ../src/common/tuklib_mbstr_width.c \ + ../src/common/tuklib_mbstr_wrap.c \ + ../src/common/tuklib_open_stdxxx.c \ + ../src/common/tuklib_physmem.c \ + ../src/common/tuklib_progname.c \ + ../src/liblzma/check/check.c \ + ../src/liblzma/check/crc32_fast.c \ + ../src/liblzma/check/crc64_fast.c \ + ../src/liblzma/check/sha256.c \ + ../src/liblzma/common/alone_decoder.c \ + ../src/liblzma/common/alone_encoder.c \ + ../src/liblzma/common/block_decoder.c \ + ../src/liblzma/common/block_encoder.c \ + ../src/liblzma/common/block_header_decoder.c \ + ../src/liblzma/common/block_header_encoder.c \ + ../src/liblzma/common/block_util.c \ + ../src/liblzma/common/common.c \ + ../src/liblzma/common/file_info.c \ + ../src/liblzma/common/filter_common.c \ + ../src/liblzma/common/filter_decoder.c \ + ../src/liblzma/common/filter_encoder.c \ + ../src/liblzma/common/filter_flags_decoder.c \ + ../src/liblzma/common/filter_flags_encoder.c \ + ../src/liblzma/common/hardware_physmem.c \ + ../src/liblzma/common/index.c \ + ../src/liblzma/common/index_decoder.c \ + ../src/liblzma/common/index_encoder.c \ + ../src/liblzma/common/index_hash.c \ + ../src/liblzma/common/lzip_decoder.c \ + ../src/liblzma/common/stream_decoder.c \ + ../src/liblzma/common/stream_encoder.c \ + ../src/liblzma/common/stream_flags_common.c \ + ../src/liblzma/common/stream_flags_decoder.c \ + ../src/liblzma/common/stream_flags_encoder.c \ + ../src/liblzma/common/string_conversion.c \ + ../src/liblzma/common/vli_decoder.c \ + ../src/liblzma/common/vli_encoder.c \ + ../src/liblzma/common/vli_size.c \ + ../src/liblzma/delta/delta_common.c \ + ../src/liblzma/delta/delta_decoder.c \ + ../src/liblzma/delta/delta_encoder.c \ + ../src/liblzma/lz/lz_decoder.c \ + ../src/liblzma/lz/lz_encoder.c \ + ../src/liblzma/lz/lz_encoder_mf.c \ + ../src/liblzma/lzma/fastpos_table.c \ + ../src/liblzma/lzma/lzma2_decoder.c \ + ../src/liblzma/lzma/lzma2_encoder.c \ + ../src/liblzma/lzma/lzma_decoder.c \ + ../src/liblzma/lzma/lzma_encoder.c \ + ../src/liblzma/lzma/lzma_encoder_optimum_fast.c \ + ../src/liblzma/lzma/lzma_encoder_optimum_normal.c \ + ../src/liblzma/lzma/lzma_encoder_presets.c \ + ../src/liblzma/rangecoder/price_table.c \ + ../src/liblzma/simple/arm.c \ + ../src/liblzma/simple/arm64.c \ + ../src/liblzma/simple/armthumb.c \ + ../src/liblzma/simple/ia64.c \ + ../src/liblzma/simple/powerpc.c \ + ../src/liblzma/simple/simple_coder.c \ + ../src/liblzma/simple/simple_decoder.c \ + ../src/liblzma/simple/simple_encoder.c \ + ../src/liblzma/simple/sparc.c \ + ../src/liblzma/simple/x86.c \ + ../src/xz/args.c \ + ../src/xz/coder.c \ + ../src/xz/file_io.c \ + ../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 +SRCS_ASM = \ + ../src/liblzma/check/crc32_x86.S \ + ../src/liblzma/check/crc64_x86.S + +OBJS_C = $(SRCS_C:.c=.o) +OBJS_ASM = $(SRCS_ASM:.S=.o) +OBJS = $(OBJS_C) $(OBJS_ASM) + +getopt.h: + update ../lib/getopt.in.h getopt.h + +$(OBJS): getopt.h + +$(OBJS_C): %.o: %.c + $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $< + +$(OBJS_ASM): %.o: %.S + $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $< + +# Make xz.exe not depend on an external DPMI server. +xz.exe: $(OBJS) + $(CC) $(ALL_CFLAGS) $(OBJS) $(LDFLAGS) -o $@ + $(STRIP) --strip-all $@ + exe2coff $@ + del $@ + copy /b $(DJGPP:DJGPP.ENV=BIN\CWSDSTUB.EXE) + $(@:.exe=) $@ + del $(@:.exe=) diff --git a/cpp/third_party/xz-5.8.3/dos/README.txt b/cpp/third_party/xz-5.8.3/dos/README.txt new file mode 100644 index 0000000000..0e8f6c086e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/dos/README.txt @@ -0,0 +1,123 @@ + +XZ Utils on DOS +=============== + +DOS-specific filename handling + + xz detects at runtime if long filename (LFN) support is + available and will use it by default. It can be disabled by + setting an environment variable: + + set lfn=n + + When xz is in LFN mode, it behaves pretty much the same as it + does on other operating systems. Examples: + + xz foo.tar -> foo.tar.xz + xz -d foo.tar.xz -> foo.tar + + xz -F lzma foo.tar -> foo.tar.lzma + xz -d foo.tar.lzma -> foo.tar + + When LFN support isn't available or it is disabled with LFN=n + environment setting, xz works in short filename (SFN) mode. This + affects filename suffix handling when compressing. + + When compressing to the .xz format in SFN mode: + + - Files without an extension get .xz just like on LFN systems. + + - *.tar files become *.txz (shorthand for *.tar.xz). *.txz + is recognized by xz on all supported operating systems. + (Try to avoid confusing this with gzipped .txt files.) + + - Files with 1-3 character extension have their extension modified + so that the last character is a dash ("-"). If the extension + is already three characters, the last character is lost. The + resulting *.?- or *.??- filename is recognized in LFN mode, but + it isn't recognized by xz on other operating systems. + + Examples: + + xz foo -> foo.xz | xz -d foo.xz -> foo + xz foo.tar -> foo.txz | xz -d foo.txz -> foo.tar + xz foo.c -> foo.c- | xz -d foo.c- -> foo.c + xz read.me -> read.me- | xz -d read.me- -> read.me + xz foo.txt -> foo.tx- | xz -d foo.tx- -> foo.tx ! + + Note that in the last example above, the third character of the + filename extension is lost. + + When compressing to the legacy .lzma format in SFN mode: + + - *.tar files become *.tlz (shorthand for *.tar.lzma). *.tlz + is recognized by xz on all supported operating systems. + + - Other files become *.lzm. The original filename extension + is lost. *.lzm is recognized also in LFN mode, but it is not + recognized by xz on other operating systems. + + Examples: + + xz -F lzma foo -> foo.lzm | xz -d foo.lzm -> foo + xz -F lzma foo.tar -> foo.tlz | xz -d foo.tlz -> foo.tar + xz -F lzma foo.c -> foo.lzm | xz -d foo.lzm -> foo ! + xz -F lzma read.me -> read.lzm | xz -d read.lzm -> read ! + xz -F lzma foo.txt -> foo.lzm | xz -d foo.lzm -> foo ! + + When compressing with a custom suffix (-S .SUF, --suffix=.SUF) to + any file format: + + - If the suffix begins with a dot, the filename extension is + replaced with the new suffix. The original extension is lost. + + - If the suffix doesn't begin with a dot and the filename has no + extension and the filename given on the command line doesn't + have a dot at the end, the custom suffix is appended just like + on LFN systems. + + - If the suffix doesn't begin with a dot and the filename has + an extension (or an extension-less filename is given with a dot + at the end), the last 1-3 characters of the filename extension + may get overwritten to fit the given custom suffix. + + Examples: + + xz -S x foo -> foox | xz -dS x foox -> foo + xz -S x foo. -> foo.x | xz -dS x foo.x -> foo + xz -S .x foo -> foo.x | xz -dS .x foo.x -> foo + xz -S .x foo. -> foo.x | xz -dS .x foo.x -> foo + xz -S x.y foo -> foox.y | xz -dS x.y foox.y -> foo + xz -S .a foo.c -> foo.a | xz -dS .a foo.a -> foo ! + xz -S a foo.c -> foo.ca | xz -dS a foo.ca -> foo.c + xz -S ab foo.c -> foo.cab | xz -dS ab foo.cab -> foo.c + xz -S ab read.me -> read.mab | xz -dS ab read.mab -> read.m ! + xz -S ab foo.txt -> foo.tab | xz -dS ab foo.tab -> foo.t ! + xz -S abc foo.txt -> foo.abc | xz -dS abc foo.abc -> foo ! + + When decompressing, the suffix handling in SFN mode is the same as + in LFN mode. The DOS-specific filenames *.lzm, *.?-, and *.??- are + recognized also in LFN mode. + + xz handles certain uncommon situations safely: + + - If the generated output filename refers to the same file as + the input file, xz detects this and refuses to compress or + decompress the input file even if --force is used. This can + happen when giving an overlong filename in SFN mode. E.g. + "xz -S x foo.texinfo" would try to write to foo.tex which on + SFN system is the same file as foo.texinfo. + + - If the generated output filename is a special file like "con" + or "prn", xz detects this and refuses to compress or decompress + the input file even if --force is used. + + +Bugs + + xz doesn't necessarily work in Dosbox. It should work in DOSEMU. + + Pressing Ctrl-c or Ctrl-Break won't remove the incomplete target file + when running under Windows XP Command Prompt (something goes wrong + with SIGINT handling). It works correctly under Windows 95/98/98SE/ME. + diff --git a/cpp/third_party/xz-5.8.3/dos/config.h b/cpp/third_party/xz-5.8.3/dos/config.h new file mode 100644 index 0000000000..4bab00e131 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/dos/config.h @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: 0BSD */ + +/* How many MiB of RAM to assume if the real amount cannot be determined. */ +#define ASSUME_RAM 32 + +/* Define to 1 if crc32 integrity check is enabled. */ +#define HAVE_CHECK_CRC32 1 + +/* Define to 1 if crc64 integrity check is enabled. */ +#define HAVE_CHECK_CRC64 1 + +/* Define to 1 if sha256 integrity check is enabled. */ +#define HAVE_CHECK_SHA256 1 + +/* Define to 1 if the 32-bit x86 CRC assembly files are used. */ +#define HAVE_CRC_X86_ASM 1 + +/* Define to 1 if any of HAVE_DECODER_foo have been defined. */ +#define HAVE_DECODERS 1 + +/* Define to 1 if arm decoder is enabled. */ +#define HAVE_DECODER_ARM 1 + +/* Define to 1 if arm64 decoder is enabled. */ +#define HAVE_DECODER_ARM64 1 + +/* Define to 1 if armthumb decoder is enabled. */ +#define HAVE_DECODER_ARMTHUMB 1 + +/* Define to 1 if delta decoder is enabled. */ +#define HAVE_DECODER_DELTA 1 + +/* Define to 1 if ia64 decoder is enabled. */ +#define HAVE_DECODER_IA64 1 + +/* Define to 1 if lzma1 decoder is enabled. */ +#define HAVE_DECODER_LZMA1 1 + +/* Define to 1 if lzma2 decoder is enabled. */ +#define HAVE_DECODER_LZMA2 1 + +/* Define to 1 if powerpc decoder is enabled. */ +#define HAVE_DECODER_POWERPC 1 + +/* Define to 1 if sparc decoder is enabled. */ +#define HAVE_DECODER_SPARC 1 + +/* Define to 1 if x86 decoder is enabled. */ +#define HAVE_DECODER_X86 1 + +/* Define to 1 if any of HAVE_ENCODER_foo have been defined. */ +#define HAVE_ENCODERS 1 + +/* Define to 1 if arm encoder is enabled. */ +#define HAVE_ENCODER_ARM 1 + +/* Define to 1 if arm64 encoder is enabled. */ +#define HAVE_ENCODER_ARM64 1 + +/* Define to 1 if armthumb encoder is enabled. */ +#define HAVE_ENCODER_ARMTHUMB 1 + +/* Define to 1 if delta encoder is enabled. */ +#define HAVE_ENCODER_DELTA 1 + +/* Define to 1 if ia64 encoder is enabled. */ +#define HAVE_ENCODER_IA64 1 + +/* Define to 1 if lzma1 encoder is enabled. */ +#define HAVE_ENCODER_LZMA1 1 + +/* Define to 1 if lzma2 encoder is enabled. */ +#define HAVE_ENCODER_LZMA2 1 + +/* Define to 1 if powerpc encoder is enabled. */ +#define HAVE_ENCODER_POWERPC 1 + +/* Define to 1 if sparc encoder is enabled. */ +#define HAVE_ENCODER_SPARC 1 + +/* Define to 1 if x86 encoder is enabled. */ +#define HAVE_ENCODER_X86 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if .lz (lzip) decompression support is enabled. */ +#define HAVE_LZIP_DECODER 1 + +/* Define to 1 to enable bt2 match finder. */ +#define HAVE_MF_BT2 1 + +/* Define to 1 to enable bt3 match finder. */ +#define HAVE_MF_BT3 1 + +/* Define to 1 to enable bt4 match finder. */ +#define HAVE_MF_BT4 1 + +/* Define to 1 to enable hc3 match finder. */ +#define HAVE_MF_HC3 1 + +/* Define to 1 to enable hc4 match finder. */ +#define HAVE_MF_HC4 1 + +/* Define to 1 if stdbool.h conforms to C99. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the 'utimes' function. */ +#define HAVE_UTIMES 1 + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 0 + +/* Define to 1 if the system has the type '_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if the GNU C extension __builtin_assume_aligned is supported. + */ +#define HAVE___BUILTIN_ASSUME_ALIGNED 1 + +/* Define to 1 if the GNU C extensions __builtin_bswap16/32/64 are supported. + */ +#define HAVE___BUILTIN_BSWAPXX 1 + +/* Define to 1 to disable debugging code. */ +#define NDEBUG 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "xz@tukaani.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "XZ Utils" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://tukaani.org/xz/" + +/* The size of 'size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + +/* Define to 1 if the system supports fast unaligned access to 16-bit and + 32-bit integers. */ +#define TUKLIB_FAST_UNALIGNED_ACCESS 1 diff --git a/cpp/third_party/xz-5.8.3/doxygen/Doxyfile b/cpp/third_party/xz-5.8.3/doxygen/Doxyfile new file mode 100644 index 0000000000..e13724e788 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/doxygen/Doxyfile @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: 0BSD + +# Run "doxygen" in this directory to generate the liblzma API documentation +# into ../doc/api. +# +# Use the "update-doxygen" script for more choices: +# - Include the liblzma version number in the generated documentation. +# - Instead of API docs, docs of XZ Utils internals may be built. +# - Change the output directory for out-of-tree builds. +# +# These options were tested with Doxygen 1.9.8 and 1.13.2. + +PROJECT_NAME = "liblzma (XZ Utils)" +OUTPUT_DIRECTORY = ../doc +STRIP_FROM_PATH = ../src/liblzma/api +INPUT = ../src/liblzma/api +FILE_PATTERNS = *.c *.h +RECURSIVE = YES +OPTIMIZE_OUTPUT_FOR_C = YES +EXTRACT_STATIC = YES +SORT_MEMBER_DOCS = NO +WARN_IF_UNDOCUMENTED = NO +WARN_AS_ERROR = FAIL_ON_WARNINGS +SOURCE_TOOLTIPS = NO +VERBATIM_HEADERS = NO +ALPHABETICAL_INDEX = NO +HTML_OUTPUT = api +HTML_COLORSTYLE_HUE = 210 +HTML_COLORSTYLE_SAT = 180 +HTML_COLORSTYLE_GAMMA = 110 +HTML_DYNAMIC_MENUS = NO +SEARCHENGINE = NO +GENERATE_LATEX = NO +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +PREDEFINED = LZMA_API(type)=type \ + LZMA_API_IMPORT= \ + LZMA_API_CALL= \ + tuklib_attr_noreturn= \ + lzma_attribute(attr)= \ + lzma_attr_alloc_size(size)= + +# Debian and Ubuntu patch Doxygen so that HAVE_DOT = YES is the default. +# Set HAVE_DOT explicitly to get consistent behavior across distributions. +HAVE_DOT = NO diff --git a/cpp/third_party/xz-5.8.3/doxygen/update-doxygen b/cpp/third_party/xz-5.8.3/doxygen/update-doxygen new file mode 100755 index 0000000000..c5d6ad39f1 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/doxygen/update-doxygen @@ -0,0 +1,114 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# While it's possible to use the Doxyfile as is to generate liblzma API +# documentation, it is recommended to use this script because this adds +# the XZ Utils version number to the generated HTML. +# +# Other features: +# - Generate documentation of the XZ Utils internals. +# - Set input and output paths for out-of-tree builds. +# +############################################################################# +# +# Authors: Jia Tan +# Lasse Collin +# +############################################################################# + +set -e + +show_usage() +{ + echo "Usage: $0 [ABS_TOP_SRCDIR ABS_OUTDIR]" + echo + echo "Supported modes:" + echo " - 'api' (default): liblzma API docs into doc/api" + echo " - 'internal': internal docs into doc/internal" + echo + echo "Absolute source and output dirs may be set" \ + "to do an out-of-tree build." + echo "The output directory must already exist." + exit 1 +} + +case $1 in + api|internal) + ;; + *) + show_usage + ;; +esac + +if type doxygen > /dev/null 2>&1; then + : +else + echo "$0: 'doxygen' command not found" >&2 + exit 1 +fi + +case $# in + 1) + # One argument: Building inside the source tree + ABS_TOP_SRCDIR=`dirname "$0"`/.. + ABS_OUTDIR=$ABS_TOP_SRCDIR/doc + ;; + 3) + # Three arguments: Possibly an out of tree build + ABS_TOP_SRCDIR=$2 + ABS_OUTDIR=$3 + ;; + *) + show_usage + ;; +esac + +if test ! -f "$ABS_TOP_SRCDIR/doxygen/Doxyfile"; then + echo "$0: Source dir '$ABS_TOP_SRCDIR/doxygen/Doxyfile' not found" >&2 + exit 1 +fi +if test ! -d "$ABS_OUTDIR"; then + echo "$0: Output dir '$ABS_OUTDIR' not found" >&2 + exit 1 +fi + +# Get the package version so that it can be included in the generated docs. +PACKAGE_VERSION=`cd "$ABS_TOP_SRCDIR" && sh build-aux/version.sh` + +case $1 in + api) + # Remove old documentation before re-generating the new. + rm -rf "$ABS_OUTDIR/api" + + # Generate the HTML documentation by preparing the Doxyfile + # in stdin and piping the result to the doxygen command. + # With Doxygen, the last assignment of a value to a tag will + # override any earlier assignment. So, we can use this + # feature to override the tags that need to change between + # "api" and "internal" modes. + ABS_SRCDIR=$ABS_TOP_SRCDIR/src/liblzma/api + ( + cat "$ABS_TOP_SRCDIR/doxygen/Doxyfile" + echo "PROJECT_NUMBER = $PACKAGE_VERSION" + echo "OUTPUT_DIRECTORY = $ABS_OUTDIR" + echo "STRIP_FROM_PATH = $ABS_SRCDIR" + echo "INPUT = $ABS_SRCDIR" + ) | doxygen -q - + ;; + + internal) + rm -rf "$ABS_OUTDIR/internal" + ( + cat "$ABS_TOP_SRCDIR/doxygen/Doxyfile" + echo 'PROJECT_NAME = "XZ Utils"' + echo "PROJECT_NUMBER = $PACKAGE_VERSION" + echo "OUTPUT_DIRECTORY = $ABS_OUTDIR" + echo "STRIP_FROM_PATH = $ABS_TOP_SRCDIR" + echo "INPUT = $ABS_TOP_SRCDIR/src" + echo 'HTML_OUTPUT = internal' + echo 'SEARCHENGINE = YES' + ) | doxygen -q - + ;; +esac diff --git a/cpp/third_party/xz-5.8.3/extra/7z2lzma/7z2lzma.bash b/cpp/third_party/xz-5.8.3/extra/7z2lzma/7z2lzma.bash new file mode 100755 index 0000000000..351108c87a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/extra/7z2lzma/7z2lzma.bash @@ -0,0 +1,113 @@ +#!/bin/bash +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# 7z2lzma.bash is very primitive .7z to .lzma converter. The input file must +# have exactly one LZMA compressed stream, which has been created with the +# default lc, lp, and pb values. The CRC32 in the .7z archive is not checked, +# and the script may seem to succeed while it actually created a corrupt .lzma +# file. You should always try uncompressing both the original .7z and the +# created .lzma and compare that the output is identical. +# +# This script requires basic GNU tools and 7z or 7za tool from p7zip. +# +# Last modified: 2009-01-15 14:25+0200 +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +# You can use 7z or 7za, both will work. +SEVENZIP=7za + +if [ $# != 2 -o -z "$1" -o -z "$2" ]; then + echo "Usage: $0 input.7z output.lzma" + exit 1 +fi + +# Converts an integer variable to little endian binary integer. +int2bin() +{ + local LEN=$1 + local NUM=$2 + local HEX=(0 1 2 3 4 5 6 7 8 9 A B C D E F) + local I + for ((I=0; I < "$LEN"; ++I)); do + printf "\\x${HEX[(NUM >> 4) & 0x0F]}${HEX[NUM & 0x0F]}" + NUM=$((NUM >> 8)) + done +} + +# Make sure we get possible errors from pipes. +set -o pipefail + +# Get information about the input file. At least older 7z and 7za versions +# may return with zero exit status even when an error occurred, so check +# if the output has any lines beginning with "Error". +INFO=$("$SEVENZIP" l -slt "$1") +if [ $? != 0 ] || printf '%s\n' "$INFO" | grep -q ^Error; then + printf '%s\n' "$INFO" + exit 1 +fi + +# Check if the input file has more than one compressed block. +if printf '%s\n' "$INFO" | grep -q '^Block = 1'; then + echo "Cannot convert, because the input file has more than" + echo "one compressed block." + exit 1 +fi + +# Get compressed, uncompressed, and dictionary size. +CSIZE=$(printf '%s\n' "$INFO" | sed -rn 's|^Packed Size = ([0-9]+$)|\1|p') +USIZE=$(printf '%s\n' "$INFO" | sed -rn 's|^Size = ([0-9]+$)|\1|p') +DICT=$(printf '%s\n' "$INFO" | sed -rn 's|^Method = LZMA:([0-9]+[bkm]?)$|\1|p') + +if [ -z "$CSIZE" -o -z "$USIZE" -o -z "$DICT" ]; then + echo "Parsing output of $SEVENZIP failed. Maybe the file uses some" + echo "other compression method than plain LZMA." + exit 1 +fi + +# The following assumes that the default lc, lp, and pb settings were used. +# Otherwise the output will be corrupt. +printf '\x5D' > "$2" + +# Dictionary size can be either was power of two, bytes, kibibytes, or +# mebibytes. We need to convert it to bytes. +case $DICT in + *b) + DICT=${DICT%b} + ;; + *k) + DICT=${DICT%k} + DICT=$((DICT << 10)) + ;; + *m) + DICT=${DICT%m} + DICT=$((DICT << 20)) + ;; + *) + DICT=$((1 << DICT)) + ;; +esac +int2bin 4 "$DICT" >> "$2" + +# Uncompressed size +int2bin 8 "$USIZE" >> "$2" + +# Copy the actual compressed data. Using multiple dd commands to avoid +# copying large amount of data with one-byte block size, which would be +# annoyingly slow. +BS=8192 +BIGSIZE=$((CSIZE / BS)) +CSIZE=$((CSIZE % BS)) +{ + dd of=/dev/null bs=32 count=1 \ + && dd bs="$BS" count="$BIGSIZE" \ + && dd bs=1 count="$CSIZE" +} < "$1" >> "$2" + +exit $? diff --git a/cpp/third_party/xz-5.8.3/extra/scanlzma/scanlzma.c b/cpp/third_party/xz-5.8.3/extra/scanlzma/scanlzma.c new file mode 100644 index 0000000000..1c8fcd8f48 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/extra/scanlzma/scanlzma.c @@ -0,0 +1,90 @@ +/* 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 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +*/ + +/* Usage example: + + $ wget http://www.wifi-shop.cz/Files/produkty/wa2204/wa2204av1.4.1.zip + $ unzip wa2204av1.4.1.zip + $ gcc scanlzma.c -o scanlzma -Wall + $ ./scanlzma 0 < WA2204-FW1.4.1/linux-1.4.bin | lzma -c -d | strings | grep -i "copyright" + UpdateDD version 2.5, Copyright (C) 2005 Philipp Benner. + Copyright (C) 2005 Philipp Benner. + Copyright (C) 2005 Philipp Benner. + mawk 1.3%s%s %s, Copyright (C) Michael D. Brennan + # Copyright (C) 1998, 1999, 2001 Henry Spencer. + ... + +*/ + + +/* LZMA compressed file format */ +/* --------------------------- */ +/* Offset Size Description */ +/* 0 1 Special LZMA properties for compressed data */ +/* 1 4 Dictionary size (little endian) */ +/* 5 8 Uncompressed size (little endian). -1 means unknown size */ +/* 13 Compressed data */ + +#include +#include +#include + +#define BUFSIZE 4096 + +int find_lzma_header(unsigned char *buf) { + return (buf[0] < 0xE1 + && buf[0] == 0x5d + && buf[4] < 0x20 + && (memcmp (buf + 10 , "\x00\x00\x00", 3) == 0 + || (memcmp (buf + 5, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 8) == 0))); +} + +int main(int argc, char *argv[]) { + unsigned char buf[BUFSIZE]; + int ret, i, numlzma, blocks=0; + + if (argc != 2) { + printf("usage: %s numlzma < infile | lzma -c -d > outfile\n" + "where numlzma is index of lzma file to extract, starting from zero.\n", + argv[0]); + exit(1); + } + numlzma = atoi(argv[1]); + + for (;;) { + /* Read data. */ + ret = fread(buf, BUFSIZE, 1, stdin); + if (ret != 1) + break; + + /* Scan for signature. */ + for (i = 0; i $@-t + mv -f $@-t $@ diff --git a/cpp/third_party/xz-5.8.3/lib/Makefile.in b/cpp/third_party/xz-5.8.3/lib/Makefile.in new file mode 100644 index 0000000000..f097e04052 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/Makefile.in @@ -0,0 +1,625 @@ +# Makefile.in generated by automake 1.18.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2025 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = lib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/build-to-host.m4 $(top_srcdir)/m4/getopt.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/posix-shell.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/tuklib_common.m4 \ + $(top_srcdir)/m4/tuklib_cpucores.m4 \ + $(top_srcdir)/m4/tuklib_integer.m4 \ + $(top_srcdir)/m4/tuklib_mbstr.m4 \ + $(top_srcdir)/m4/tuklib_physmem.m4 \ + $(top_srcdir)/m4/tuklib_progname.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cr +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libgnu_a_AR = $(AR) $(ARFLAGS) +libgnu_a_RANLIB = $(RANLIB) +am_libgnu_a_OBJECTS = +libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = $(DEPDIR)/getopt.Po $(DEPDIR)/getopt1.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libgnu_a_SOURCES) +DIST_SOURCES = $(libgnu_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp getopt.c getopt1.c +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETOPT_H = @GETOPT_H@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINKER_FLAG_UNDEFINED_VERSION = @LINKER_FLAG_UNDEFINED_VERSION@ +LIPO = @LIPO@ +LN_EXEEXT = @LN_EXEEXT@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSIX_SHELL = @POSIX_SHELL@ +POSUB = @POSUB@ +PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CXX = @PTHREAD_CXX@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_path_for_scripts = @enable_path_for_scripts@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xz = @xz@ +noinst_LIBRARIES = libgnu.a +libgnu_a_SOURCES = +libgnu_a_DEPENDENCIES = $(LIBOBJS) +libgnu_a_LIBADD = $(LIBOBJS) +EXTRA_DIST = \ + getopt.in.h \ + getopt.c \ + getopt1.c \ + getopt_int.h \ + getopt-cdefs.h \ + getopt-core.h \ + getopt-ext.h \ + getopt-pfx-core.h \ + getopt-pfx-ext.h + +BUILT_SOURCES = $(GETOPT_H) +MOSTLYCLEANFILES = getopt.h getopt.h-t +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign lib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -$(am__rm_f) $(noinst_LIBRARIES) + +libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(EXTRA_libgnu_a_DEPENDENCIES) + $(AM_V_at)-rm -f libgnu.a + $(AM_V_AR)$(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) + $(AM_V_at)$(libgnu_a_RANLIB) libgnu.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @: >>$@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -$(am__rm_f) $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -$(am__rm_f) $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f $(DEPDIR)/getopt.Po + -rm -f $(DEPDIR)/getopt1.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(DEPDIR)/getopt.Po + -rm -f $(DEPDIR)/getopt1.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: all check install install-am install-exec install-strip + +.PHONY: all all-am am--depfiles check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +getopt.h: getopt.in.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/getopt.in.h; \ + } > $@-t + mv -f $@-t $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/cpp/third_party/xz-5.8.3/lib/getopt-cdefs.h b/cpp/third_party/xz-5.8.3/lib/getopt-cdefs.h new file mode 100644 index 0000000000..576428c1c4 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt-cdefs.h @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* getopt-on-non-glibc compatibility macros. + Copyright (C) 1989-2023 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GETOPT_CDEFS_H +#define _GETOPT_CDEFS_H 1 + +/* This header should not be used directly; include getopt.h or + unistd.h instead. It does not have a protective #error, because + the guard macro for getopt.h in gnulib is not fixed. */ + +/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect + a number of the internal macros supplied to GNU libc's headers by + sys/cdefs.h. Provide fallback definitions for all of them. */ +#ifdef HAVE_SYS_CDEFS_H +# include +#endif + +#ifndef __BEGIN_DECLS +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# else +# define __BEGIN_DECLS /* nothing */ +# endif +#endif +#ifndef __END_DECLS +# ifdef __cplusplus +# define __END_DECLS } +# else +# define __END_DECLS /* nothing */ +# endif +#endif + +#ifndef __GNUC_PREREQ +# if defined __GNUC__ && defined __GNUC_VERSION__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# else +# define __GNUC_PREREQ(maj, min) 0 +# endif +#endif + +#ifndef __THROW +# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) +# if __cplusplus >= 201103L +# define __THROW noexcept (true) +# else +# define __THROW throw () +# endif +# else +# define __THROW +# endif +#endif + +#endif /* _GETOPT_CDEFS_H */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt-core.h b/cpp/third_party/xz-5.8.3/lib/getopt-core.h new file mode 100644 index 0000000000..126ce80892 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt-core.h @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* Declarations for getopt (basic, portable features only). + Copyright (C) 1989-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _GETOPT_CORE_H +#define _GETOPT_CORE_H 1 + +/* This header should not be used directly; include getopt.h or + unistd.h instead. Unlike most bits headers, it does not have + a protective #error, because the guard macro for getopt.h in + gnulib is not fixed. */ + +__BEGIN_DECLS + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message 'getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, 'optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in 'optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU 'getopt'. + + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more + options. + + If OPTS begins with '-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. + + For standards compliance, the 'argv' argument has the type + char *const *, but this is inaccurate; if argument permutation is + enabled, the argv array (not the strings it points to) must be + writable. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +__END_DECLS + +#endif /* _GETOPT_CORE_H */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt-ext.h b/cpp/third_party/xz-5.8.3/lib/getopt-ext.h new file mode 100644 index 0000000000..006037ba86 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt-ext.h @@ -0,0 +1,79 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* Declarations for getopt (GNU extensions). + Copyright (C) 1989-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _GETOPT_EXT_H +#define _GETOPT_EXT_H 1 + +/* This header should not be used directly; include getopt.h instead. + Unlike most bits headers, it does not have a protective #error, + because the guard macro for getopt.h in gnulib is not fixed. */ + +__BEGIN_DECLS + +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of 'struct option' terminated by an element containing a name which is + zero. + + The field 'has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ + +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the 'has_arg' field of 'struct option'. */ + +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +__END_DECLS + +#endif /* _GETOPT_EXT_H */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt-pfx-core.h b/cpp/third_party/xz-5.8.3/lib/getopt-pfx-core.h new file mode 100644 index 0000000000..ee22d3f77f --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt-pfx-core.h @@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* getopt (basic, portable features) gnulib wrapper header. + Copyright (C) 1989-2023 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GETOPT_PFX_CORE_H +#define _GETOPT_PFX_CORE_H 1 + +/* This header should not be used directly; include getopt.h or + unistd.h instead. It does not have a protective #error, because + the guard macro for getopt.h in gnulib is not fixed. */ + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in getopt-core.h and getopt-ext.h. Systematically + rename identifiers so that they do not collide with the system + functions and variables. Renaming avoids problems with some + compilers and linkers. */ +#ifdef __GETOPT_PREFIX +# ifndef __GETOPT_ID +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# endif +# undef getopt +# undef optarg +# undef opterr +# undef optind +# undef optopt +# define getopt __GETOPT_ID (getopt) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) + +/* Work around a problem on macOS, which declares getopt with a + trailing __DARWIN_ALIAS(getopt) that would expand to something like + __asm("_" "rpl_getopt" "$UNIX2003") were it not for the following + hack to suppress the macOS declaration . */ +# ifdef __APPLE__ +# define _GETOPT +# endif + +/* The system's getopt.h may have already included getopt-core.h to + declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that + getopt-core.h declares them with prefixes. */ +# undef _GETOPT_CORE_H +#endif + +#include + +#endif /* _GETOPT_PFX_CORE_H */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt-pfx-ext.h b/cpp/third_party/xz-5.8.3/lib/getopt-pfx-ext.h new file mode 100644 index 0000000000..00d2a0952f --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt-pfx-ext.h @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* getopt (GNU extensions) gnulib wrapper header. + Copyright (C) 1989-2023 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GETOPT_PFX_EXT_H +#define _GETOPT_PFX_EXT_H 1 + +/* This header should not be used directly; include getopt.h instead. + It does not have a protective #error, because the guard macro for + getopt.h in gnulib is not fixed. */ + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in getopt-core.h and getopt-ext.h. Systematically + rename identifiers so that they do not collide with the system + functions and variables. Renaming avoids problems with some + compilers and linkers. */ +#ifdef __GETOPT_PREFIX +# ifndef __GETOPT_ID +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# endif +# undef getopt_long +# undef getopt_long_only +# undef option +# undef _getopt_internal +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) + +/* The system's getopt.h may have already included getopt-ext.h to + declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that + getopt-ext.h declares them with prefixes. */ +# undef _GETOPT_EXT_H +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". For backward + compatibility with old applications, if __GETOPT_PREFIX is not + defined, we supply GNU-libc-compatible, but incorrect, prototypes + using "char *const *argv". (GNU libc is stuck with the incorrect + prototypes, as they are baked into older versions of LSB.) */ +#ifndef __getopt_argv_const +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +#include + +#endif /* _GETOPT_PFX_EXT_H */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt.c b/cpp/third_party/xz-5.8.3/lib/getopt.c new file mode 100644 index 0000000000..ab3ff879ce --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt.c @@ -0,0 +1,823 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* Getopt for GNU. + Copyright (C) 1987-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _LIBC +# ifdef HAVE_CONFIG_H +# include +# endif +#endif + +#include "getopt.h" + +#include +#include +#include +#ifndef _MSC_VER +# include +#endif + +#ifdef _LIBC +/* When used as part of glibc, error printing must be done differently + for standards compliance. getopt is not a cancellation point, so + it must not call functions that are, and it is specified by an + older standard than stdio locking, so it must not refer to + functions in the "user namespace" related to stdio locking. + Finally, it must use glibc's internal message translation so that + the messages are looked up in the proper text domain. */ +# include +# define fprintf __fxprintf_nocancel +# define flockfile(fp) _IO_flockfile (fp) +# define funlockfile(fp) _IO_funlockfile (fp) +#else +/* Completely disable NLS for getopt. We won't include translations for it + anyway. If the system lacks getopt_long, missing translations probably + aren't a problem. */ +//# include "gettext.h" +//# define _(msgid) gettext (msgid) +#define _(msgid) (msgid) +/* When used standalone, flockfile and funlockfile might not be + available. */ +# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ + || (defined _WIN32 && ! defined __CYGWIN__)) +# define flockfile(fp) /* nop */ +# define funlockfile(fp) /* nop */ +# endif +/* When used standalone, do not attempt to use alloca. */ +# define __libc_use_alloca(size) 0 +# undef alloca +# define alloca(size) (abort (), (void *)0) +#endif + +/* This implementation of 'getopt' has three modes for handling + options interspersed with non-option arguments. It can stop + scanning for options at the first non-option argument encountered, + as POSIX specifies. It can continue scanning for options after the + first non-option argument, but permute 'argv' as it goes so that, + after 'getopt' is done, all the options precede all the non-option + arguments and 'optind' points to the first non-option argument. + Or, it can report non-option arguments as if they were arguments to + the option character '\x01'. + + The default behavior of 'getopt_long' is to permute the argument list. + When this implementation is used standalone, the default behavior of + 'getopt' is to stop at the first non-option argument, but when it is + used as part of GNU libc it also permutes the argument list. In both + cases, setting the environment variable POSIXLY_CORRECT to any value + disables permutation. + + If the first character of the OPTSTRING argument to 'getopt' or + 'getopt_long' is '+', both functions will stop at the first + non-option argument. If it is '-', both functions will report + non-option arguments as arguments to the option character '\x01'. */ + +#include "getopt_int.h" + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Keep a global copy of all internal members of getopt_data. */ + +static struct _getopt_data getopt_data; + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + 'first_nonopt' and 'last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +static void +exchange (char **argv, struct _getopt_data *d) +{ + int bottom = d->__first_nonopt; + int middle = d->__last_nonopt; + int top = d->optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + d->__first_nonopt += (d->optind - d->__last_nonopt); + d->__last_nonopt = d->optind; +} + +/* Process the argument starting with d->__nextchar as a long option. + d->optind should *not* have been advanced over this argument. + + If the value returned is -1, it was not actually a long option, the + state is unchanged, and the argument should be processed as a set + of short options (this can only happen when long_only is true). + Otherwise, the option (and its argument, if any) have been consumed + and the return value is the value to return from _getopt_internal_r. */ +static int +process_long_option (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, + int long_only, struct _getopt_data *d, + int print_errors, const char *prefix) +{ + char *nameend; + size_t namelen; + const struct option *p; + const struct option *pfound = NULL; + int n_options; + int option_index; + + for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + namelen = (size_t)(nameend - d->__nextchar); + + /* First look for an exact match, counting the options as a side + effect. */ + for (p = longopts, n_options = 0; p->name; p++, n_options++) + if (!strncmp (p->name, d->__nextchar, namelen) + && namelen == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + option_index = n_options; + break; + } + + if (pfound == NULL) + { + /* Didn't find an exact match, so look for abbreviations. */ + unsigned char *ambig_set = NULL; + int ambig_malloced = 0; + int ambig_fallback = 0; + int indfound = -1; + + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, d->__nextchar, namelen)) + { + if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + { + /* Second or later nonexact match found. */ + if (!ambig_fallback) + { + if (!print_errors) + /* Don't waste effort tracking the ambig set if + we're not going to print it anyway. */ + ambig_fallback = 1; + else if (!ambig_set) + { + if (__libc_use_alloca (n_options)) + ambig_set = alloca (n_options); + else if ((ambig_set = malloc ((size_t)n_options)) == NULL) + /* Fall back to simpler error message. */ + ambig_fallback = 1; + else + ambig_malloced = 1; + + if (ambig_set) + { + memset (ambig_set, 0, (size_t)n_options); + ambig_set[indfound] = 1; + } + } + if (ambig_set) + ambig_set[option_index] = 1; + } + } + } + + if (ambig_set || ambig_fallback) + { + if (print_errors) + { + if (ambig_fallback) + fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"), + argv[0], prefix, d->__nextchar); + else + { + flockfile (stderr); + fprintf (stderr, + _("%s: option '%s%s' is ambiguous; possibilities:"), + argv[0], prefix, d->__nextchar); + + for (option_index = 0; option_index < n_options; option_index++) + if (ambig_set[option_index]) + fprintf (stderr, " '%s%s'", + prefix, longopts[option_index].name); + + /* This must use 'fprintf' even though it's only + printing a single character, so that it goes through + __fxprintf_nocancel when compiled as part of glibc. */ + fprintf (stderr, "\n"); + funlockfile (stderr); + } + } + if (ambig_malloced) + free (ambig_set); + d->__nextchar += strlen (d->__nextchar); + d->optind++; + d->optopt = 0; + return '?'; + } + + option_index = indfound; + } + + if (pfound == NULL) + { + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short option, + then it's an error. */ + if (!long_only || argv[d->optind][1] == '-' + || strchr (optstring, *d->__nextchar) == NULL) + { + if (print_errors) + fprintf (stderr, _("%s: unrecognized option '%s%s'\n"), + argv[0], prefix, d->__nextchar); + + d->__nextchar = NULL; + d->optind++; + d->optopt = 0; + return '?'; + } + + /* Otherwise interpret it as a short option. */ + return -1; + } + + /* We have found a matching long option. Consume it. */ + d->optind++; + d->__nextchar = NULL; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + fprintf (stderr, + _("%s: option '%s%s' doesn't allow an argument\n"), + argv[0], prefix, pfound->name); + + d->optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + fprintf (stderr, + _("%s: option '%s%s' requires an argument\n"), + argv[0], prefix, pfound->name); + + d->optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; +} + +/* Initialize internal data upon the first call to getopt. */ + +static const char * +_getopt_initialize (int argc, + char **argv, const char *optstring, + struct _getopt_data *d, int posixly_correct) +{ + (void)argc; + (void)argv; + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + if (d->optind == 0) + d->optind = 1; + + d->__first_nonopt = d->__last_nonopt = d->optind; + d->__nextchar = NULL; + + /* Determine how to handle the ordering of options and nonoptions. */ + if (optstring[0] == '-') + { + d->__ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + d->__ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct || !!getenv ("POSIXLY_CORRECT")) + d->__ordering = REQUIRE_ORDER; + else + d->__ordering = PERMUTE; + + d->__initialized = 1; + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If 'getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If 'getopt' finds another option character, it returns that character, + updating 'optind' and 'nextchar' so that the next call to 'getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, 'getopt' returns -1. + Then 'optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set 'opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in 'optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in 'optarg', otherwise 'optarg' is set to zero. + + If OPTSTRING starts with '-' or '+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with '--' instead of '-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a '=', or else the in next ARGV-element. + When 'getopt' finds a long-named option, it returns 0 if that option's + 'flag' field is nonzero, the value of the option's 'val' field + if the 'flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of 'struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal_r (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, + int long_only, struct _getopt_data *d, int posixly_correct) +{ + int print_errors = d->opterr; + + if (argc < 1) + return -1; + + d->optarg = NULL; + + if (d->optind == 0 || !d->__initialized) + optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); + else if (optstring[0] == '-' || optstring[0] == '+') + optstring++; + + if (optstring[0] == ':') + print_errors = 0; + + /* Test whether ARGV[optind] points to a non-option argument. */ +#define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') + + if (d->__nextchar == NULL || *d->__nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (d->__last_nonopt > d->optind) + d->__last_nonopt = d->optind; + if (d->__first_nonopt > d->optind) + d->__first_nonopt = d->optind; + + if (d->__ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange (argv, d); + else if (d->__last_nonopt != d->optind) + d->__first_nonopt = d->optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (d->optind < argc && NONOPTION_P) + d->optind++; + d->__last_nonopt = d->optind; + } + + /* The special ARGV-element '--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (d->optind != argc && !strcmp (argv[d->optind], "--")) + { + d->optind++; + + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange (argv, d); + else if (d->__first_nonopt == d->__last_nonopt) + d->__first_nonopt = d->optind; + d->__last_nonopt = argc; + + d->optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (d->optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (d->__first_nonopt != d->__last_nonopt) + d->optind = d->__first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (d->__ordering == REQUIRE_ORDER) + return -1; + d->optarg = argv[d->optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Check whether it might be a long option. */ + if (longopts) + { + if (argv[d->optind][1] == '-') + { + /* "--foo" is always a long option. The special option + "--" was handled above. */ + d->__nextchar = argv[d->optind] + 2; + return process_long_option (argc, argv, optstring, longopts, + longind, long_only, d, + print_errors, "--"); + } + + /* If long_only and the ARGV-element has the form "-f", + where f is a valid short option, don't consider it an + abbreviated form of a long option that starts with f. + Otherwise there would be no way to give the -f short + option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an + abbreviation of the long option, just like "--fu", and + not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + if (long_only && (argv[d->optind][2] + || !strchr (optstring, argv[d->optind][1]))) + { + int code; + d->__nextchar = argv[d->optind] + 1; + code = process_long_option (argc, argv, optstring, longopts, + longind, long_only, d, + print_errors, "-"); + if (code != -1) + return code; + } + } + + /* It is not a long option. Skip the initial punctuation. */ + d->__nextchar = argv[d->optind] + 1; + } + + /* Look at and handle the next short option-character. */ + + { + char c = *d->__nextchar++; + const char *temp = strchr (optstring, c); + + /* Increment 'optind' when we start to process its last character. */ + if (*d->__nextchar == '\0') + ++d->optind; + + if (temp == NULL || c == ':' || c == ';') + { + if (print_errors) + fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); + d->optopt = c; + return '?'; + } + + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';' && longopts != NULL) + { + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + d->optarg = d->__nextchar; + else if (d->optind == argc) + { + if (print_errors) + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); + + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + d->optarg = argv[d->optind]; + + d->__nextchar = d->optarg; + d->optarg = NULL; + return process_long_option (argc, argv, optstring, longopts, longind, + 0 /* long_only */, d, print_errors, "-W "); + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else + d->optarg = NULL; + d->__nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); + + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented 'optind' once; + increment it again when taking next ARGV-elt as argument. */ + d->optarg = argv[d->optind++]; + d->__nextchar = NULL; + } + } + return c; + } +} + +int +_getopt_internal (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, int long_only, + int posixly_correct) +{ + int result; + + getopt_data.optind = optind; + getopt_data.opterr = opterr; + + result = _getopt_internal_r (argc, argv, optstring, longopts, + longind, long_only, &getopt_data, + posixly_correct); + + optind = getopt_data.optind; + optarg = getopt_data.optarg; + optopt = getopt_data.optopt; + + return result; +} + +/* glibc gets a LSB-compliant getopt and a POSIX-complaint __posix_getopt. + Standalone applications just get a POSIX-compliant getopt. + POSIX and LSB both require these functions to take 'char *const *argv' + even though this is incorrect (because of the permutation). */ +#define GETOPT_ENTRY(NAME, POSIXLY_CORRECT) \ + int \ + NAME (int argc, char *const *argv, const char *optstring) \ + { \ + return _getopt_internal (argc, (char **)argv, optstring, \ + 0, 0, 0, POSIXLY_CORRECT); \ + } + +#ifdef _LIBC +GETOPT_ENTRY(getopt, 0) +GETOPT_ENTRY(__posix_getopt, 1) +#else +GETOPT_ENTRY(getopt, 1) +#endif + + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of 'getopt'. */ + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value '%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt.in.h b/cpp/third_party/xz-5.8.3/lib/getopt.in.h new file mode 100644 index 0000000000..6d602c5da2 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt.in.h @@ -0,0 +1,60 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* Declarations for getopt. + Copyright (C) 1989-2023 Free Software Foundation, Inc. + This file is part of gnulib. + Unlike most of the getopt implementation, it is NOT shared + with the GNU C Library, which supplies a different version of + this file. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GETOPT_H + +#define _GETOPT_H 1 + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file. Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX +# include +# include + +# ifndef _MSC_VER +# include +# endif +#endif + +/* From Gnulib's lib/arg-nonnull.h: */ +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +#include +#include +#include + +#endif /* _GETOPT_H */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt1.c b/cpp/third_party/xz-5.8.3/lib/getopt1.c new file mode 100644 index 0000000000..5cb3b913d0 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt1.c @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _LIBC +# ifdef HAVE_CONFIG_H +# include +# endif +#endif + +#include "getopt.h" +#include "getopt_int.h" + +int +getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 0, 0); +} + +int +_getopt_long_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 0, d, 0); +} + +/* Like getopt_long, but '-' as well as '--' can indicate a long option. + If an option that starts with '-' (not '--') doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (int argc, char *__getopt_argv_const *argv, + const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 1, 0); +} + +int +_getopt_long_only_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 1, d, 0); +} + + +#ifdef TEST + +#include +#include + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static const struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == -1) + break; + + switch (c) + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value '%s'\n", optarg); + break; + + case 'd': + printf ("option d with value '%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/cpp/third_party/xz-5.8.3/lib/getopt_int.h b/cpp/third_party/xz-5.8.3/lib/getopt_int.h new file mode 100644 index 0000000000..2dcb553821 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/lib/getopt_int.h @@ -0,0 +1,120 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +/* Internal declarations for getopt. + Copyright (C) 1989-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library and is also part of gnulib. + Patches to this file should be submitted to both projects. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _GETOPT_INT_H +#define _GETOPT_INT_H 1 + +#include + +extern int _getopt_internal (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, int __posixly_correct); + + +/* Reentrant versions which can handle parsing multiple argument + vectors at the same time. */ + +/* Describe how to deal with options that follow non-option ARGV-elements. + + REQUIRE_ORDER means don't recognize them as options; stop option + processing when the first non-option is seen. This is what POSIX + specifies should happen. + + PERMUTE means permute the contents of ARGV as we scan, so that + eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written + to expect this. + + RETURN_IN_ORDER is an option available to programs that were + written to expect options and other ARGV-elements in any order + and that care about the ordering of the two. We describe each + non-option ARGV-element as if it were the argument of an option + with character code 1. + + The special argument '--' forces an end of option-scanning regardless + of the value of 'ordering'. In the case of RETURN_IN_ORDER, only + '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ + +enum __ord + { + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER + }; + +/* Data type for reentrant functions. */ +struct _getopt_data +{ + /* These have exactly the same meaning as the corresponding global + variables, except that they are used for the reentrant + versions of getopt. */ + int optind; + int opterr; + int optopt; + char *optarg; + + /* Internal members. */ + + /* True if the internal members have been initialized. */ + int __initialized; + + /* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + char *__nextchar; + + /* See __ord above. */ + enum __ord __ordering; + + /* Handle permutation of arguments. */ + + /* Describe the part of ARGV that contains non-options that have + been skipped. 'first_nonopt' is the index in ARGV of the first + of them; 'last_nonopt' is the index after the last of them. */ + + int __first_nonopt; + int __last_nonopt; +}; + +/* The initializer is necessary to set OPTIND and OPTERR to their + default values and to clear the initialization flag. */ +#define _GETOPT_DATA_INITIALIZER { 1, 1 } + +extern int _getopt_internal_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, struct _getopt_data *__data, + int __posixly_correct); + +extern int _getopt_long_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + struct _getopt_data *__data); + +extern int _getopt_long_only_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, + int *__longind, + struct _getopt_data *__data); + +#endif /* getopt_int.h */ diff --git a/cpp/third_party/xz-5.8.3/m4/ax_pthread.m4 b/cpp/third_party/xz-5.8.3/m4/ax_pthread.m4 new file mode 100644 index 0000000000..3f26da6265 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/ax_pthread.m4 @@ -0,0 +1,524 @@ +dnl SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-macro + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also to link with them as well. For example, you might link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threaded programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 31 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) + AC_MSG_RESULT([$ax_pthread_ok]) + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) + + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) + + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff --git a/cpp/third_party/xz-5.8.3/m4/build-to-host.m4 b/cpp/third_party/xz-5.8.3/m4/build-to-host.m4 new file mode 100644 index 0000000000..d13649e0c5 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/build-to-host.m4 @@ -0,0 +1,274 @@ +# build-to-host.m4 +# serial 5 +dnl Copyright (C) 2023-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. + +dnl Written by Bruno Haible. + +dnl When the build environment ($build_os) is different from the target runtime +dnl environment ($host_os), file names may need to be converted from the build +dnl environment syntax to the target runtime environment syntax. This is +dnl because the Makefiles are executed (mostly) by build environment tools and +dnl therefore expect file names in build environment syntax, whereas the runtime +dnl expects file names in target runtime environment syntax. +dnl +dnl For example, if $build_os = cygwin and $host_os = mingw32, filenames need +dnl be converted from Cygwin syntax to native Windows syntax: +dnl /cygdrive/c/foo/bar -> C:\foo\bar +dnl /usr/local/share -> C:\cygwin64\usr\local\share +dnl +dnl gl_BUILD_TO_HOST([somedir]) +dnl This macro takes as input an AC_SUBSTed variable 'somedir', which must +dnl already have its final value assigned, and produces two additional +dnl AC_SUBSTed variables 'somedir_c' and 'somedir_c_make', that designate the +dnl same file name value, just in different syntax: +dnl - somedir_c is the file name in target runtime environment syntax, +dnl as a C string (starting and ending with a double-quote, +dnl and with escaped backslashes and double-quotes in +dnl between). +dnl - somedir_c_make is the same thing, escaped for use in a Makefile. + +AC_DEFUN([gl_BUILD_TO_HOST], +[ + AC_REQUIRE([AC_CANONICAL_BUILD]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_BUILD_TO_HOST_INIT]) + + dnl Define somedir_c. + gl_final_[$1]="$[$1]" + dnl Translate it from build syntax to host syntax. + case "$build_os" in + cygwin*) + case "$host_os" in + mingw* | windows*) + gl_final_[$1]=`cygpath -w "$gl_final_[$1]"` ;; + esac + ;; + esac + dnl Convert it to C string syntax. + [$1]_c=`printf '%s\n' "$gl_final_[$1]" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes" | tr -d "$gl_tr_cr"` + [$1]_c='"'"$[$1]_c"'"' + AC_SUBST([$1_c]) + + dnl Define somedir_c_make. + [$1]_c_make=`printf '%s\n' "$[$1]_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"` + dnl Use the substituted somedir variable, when possible, so that the user + dnl may adjust somedir a posteriori when there are no special characters. + if test "$[$1]_c_make" = '\"'"${gl_final_[$1]}"'\"'; then + [$1]_c_make='\"$([$1])\"' + fi + AC_SUBST([$1_c_make]) +]) + +dnl Some initializations for gl_BUILD_TO_HOST. +AC_DEFUN([gl_BUILD_TO_HOST_INIT], +[ + gl_sed_double_backslashes='s/\\/\\\\/g' + gl_sed_escape_doublequotes='s/"/\\"/g' +changequote(,)dnl + gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g" +changequote([,])dnl + gl_sed_escape_for_make_2='s,\$,\\$$,g' + dnl Find out how to remove carriage returns from output. Solaris /usr/ucb/tr + dnl does not understand '\r'. + case `echo r | tr -d '\r'` in + '') gl_tr_cr='\015' ;; + *) gl_tr_cr='\r' ;; + esac +]) + + +dnl The following macros are convenience invocations of gl_BUILD_TO_HOST +dnl for some of the variables that are defined by Autoconf. +dnl To do so for _all_ the possible variables, use the module 'configmake'. + +dnl Defines bindir_c and bindir_c_make. +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_BINDIR], +[ + dnl Find the final value of bindir. + gl_saved_prefix="${prefix}" + gl_saved_exec_prefix="${exec_prefix}" + gl_saved_bindir="${bindir}" + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + exec_prefix='${prefix}' + fi + eval exec_prefix="$exec_prefix" + eval bindir="$bindir" + gl_BUILD_TO_HOST([bindir]) + bindir="${gl_saved_bindir}" + exec_prefix="${gl_saved_exec_prefix}" + prefix="${gl_saved_prefix}" +]) + +dnl Defines datadir_c and datadir_c_make, +dnl where datadir = $(datarootdir) +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_DATADIR], +[ + dnl Find the final value of datadir. + gl_saved_prefix="${prefix}" + gl_saved_datarootdir="${datarootdir}" + gl_saved_datadir="${datadir}" + dnl Unfortunately, prefix gets only finally determined at the end of + dnl configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + eval datarootdir="$datarootdir" + eval datadir="$datadir" + gl_BUILD_TO_HOST([datadir]) + datadir="${gl_saved_datadir}" + datarootdir="${gl_saved_datarootdir}" + prefix="${gl_saved_prefix}" +]) + +dnl Defines libdir_c and libdir_c_make. +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LIBDIR], +[ + dnl Find the final value of libdir. + gl_saved_prefix="${prefix}" + gl_saved_exec_prefix="${exec_prefix}" + gl_saved_libdir="${libdir}" + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + exec_prefix='${prefix}' + fi + eval exec_prefix="$exec_prefix" + eval libdir="$libdir" + gl_BUILD_TO_HOST([libdir]) + libdir="${gl_saved_libdir}" + exec_prefix="${gl_saved_exec_prefix}" + prefix="${gl_saved_prefix}" +]) + +dnl Defines libexecdir_c and libexecdir_c_make. +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LIBEXECDIR], +[ + dnl Find the final value of libexecdir. + gl_saved_prefix="${prefix}" + gl_saved_exec_prefix="${exec_prefix}" + gl_saved_libexecdir="${libexecdir}" + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + exec_prefix='${prefix}' + fi + eval exec_prefix="$exec_prefix" + eval libexecdir="$libexecdir" + gl_BUILD_TO_HOST([libexecdir]) + libexecdir="${gl_saved_libexecdir}" + exec_prefix="${gl_saved_exec_prefix}" + prefix="${gl_saved_prefix}" +]) + +dnl Defines localedir_c and localedir_c_make. +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LOCALEDIR], +[ + dnl Find the final value of localedir. + gl_saved_prefix="${prefix}" + gl_saved_datarootdir="${datarootdir}" + gl_saved_localedir="${localedir}" + dnl Unfortunately, prefix gets only finally determined at the end of + dnl configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + eval datarootdir="$datarootdir" + eval localedir="$localedir" + gl_BUILD_TO_HOST([localedir]) + localedir="${gl_saved_localedir}" + datarootdir="${gl_saved_datarootdir}" + prefix="${gl_saved_prefix}" +]) + +dnl Defines pkgdatadir_c and pkgdatadir_c_make, +dnl where pkgdatadir = $(datadir)/$(PACKAGE) +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGDATADIR], +[ + dnl Find the final value of pkgdatadir. + gl_saved_prefix="${prefix}" + gl_saved_datarootdir="${datarootdir}" + gl_saved_datadir="${datadir}" + gl_saved_pkgdatadir="${pkgdatadir}" + dnl Unfortunately, prefix gets only finally determined at the end of + dnl configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + eval datarootdir="$datarootdir" + eval datadir="$datadir" + eval pkgdatadir="$pkgdatadir" + gl_BUILD_TO_HOST([pkgdatadir]) + pkgdatadir="${gl_saved_pkgdatadir}" + datadir="${gl_saved_datadir}" + datarootdir="${gl_saved_datarootdir}" + prefix="${gl_saved_prefix}" +]) + +dnl Defines pkglibdir_c and pkglibdir_c_make, +dnl where pkglibdir = $(libdir)/$(PACKAGE) +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGLIBDIR], +[ + dnl Find the final value of pkglibdir. + gl_saved_prefix="${prefix}" + gl_saved_exec_prefix="${exec_prefix}" + gl_saved_libdir="${libdir}" + gl_saved_pkglibdir="${pkglibdir}" + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + exec_prefix='${prefix}' + fi + eval exec_prefix="$exec_prefix" + eval libdir="$libdir" + eval pkglibdir="$pkglibdir" + gl_BUILD_TO_HOST([pkglibdir]) + pkglibdir="${gl_saved_pkglibdir}" + libdir="${gl_saved_libdir}" + exec_prefix="${gl_saved_exec_prefix}" + prefix="${gl_saved_prefix}" +]) + +dnl Defines pkglibexecdir_c and pkglibexecdir_c_make, +dnl where pkglibexecdir = $(libexecdir)/$(PACKAGE) +AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGLIBEXECDIR], +[ + dnl Find the final value of pkglibexecdir. + gl_saved_prefix="${prefix}" + gl_saved_exec_prefix="${exec_prefix}" + gl_saved_libexecdir="${libexecdir}" + gl_saved_pkglibexecdir="${pkglibexecdir}" + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + exec_prefix='${prefix}' + fi + eval exec_prefix="$exec_prefix" + eval libexecdir="$libexecdir" + eval pkglibexecdir="$pkglibexecdir" + gl_BUILD_TO_HOST([pkglibexecdir]) + pkglibexecdir="${gl_saved_pkglibexecdir}" + libexecdir="${gl_saved_libexecdir}" + exec_prefix="${gl_saved_exec_prefix}" + prefix="${gl_saved_prefix}" +]) diff --git a/cpp/third_party/xz-5.8.3/m4/getopt.m4 b/cpp/third_party/xz-5.8.3/m4/getopt.m4 new file mode 100644 index 0000000000..9d9141b28c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/getopt.m4 @@ -0,0 +1,70 @@ +dnl SPDX-License-Identifier: FSFULLR + +# getopt.m4 serial 49 (modified version) +dnl Copyright (C) 2002-2006, 2008-2023 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# This version has been modified to reduce complexity since we only need +# GNU getopt_long and do not care about replacing getopt. +# +# Pass gl_replace_getopt=yes (or any non-empty value instead of "yes") as +# an argument to configure to force the use of the getopt_long replacement. + +AC_DEFUN([gl_FUNC_GETOPT_GNU], +[ + AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) + + if test -n "$gl_replace_getopt"; then + gl_GETOPT_SUBSTITUTE + fi +]) + +AC_DEFUN([gl_GETOPT_CHECK_HEADERS], +[ + if test -z "$gl_replace_getopt"; then + AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) + fi + + if test -z "$gl_replace_getopt"; then + AC_CHECK_FUNCS([getopt_long], [], [gl_replace_getopt=yes]) + fi + + dnl BSD getopt_long uses a way to reset option processing, that is different + dnl from GNU and Solaris (which copied the GNU behavior). We support both + dnl GNU and BSD style resetting of getopt_long(), so there's no need to use + dnl GNU getopt_long() on BSD due to different resetting style. + if test -z "$gl_replace_getopt"; then + AC_CHECK_DECL([optreset], + [AC_DEFINE([HAVE_OPTRESET], 1, + [Define to 1 if getopt.h declares extern int optreset.])], + [], [#include ]) + fi + + dnl POSIX 2008 does not specify leading '+' behavior, but see + dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on + dnl the next version of POSIX. We don't use that feature, so this + dnl is not a problem for us. Thus, the respective test was removed here. + + dnl Checks for getopt handling '-' as a leading character in an option + dnl string were removed, since we also don't use that feature. + +]) + +AC_DEFUN([gl_GETOPT_SUBSTITUTE], +[ + AC_LIBOBJ([getopt]) + AC_LIBOBJ([getopt1]) + + AC_CHECK_HEADERS_ONCE([sys/cdefs.h]) + + AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], + [Define to rpl_ if the getopt replacement functions and variables + should be used.]) + + GETOPT_H=getopt.h + AC_SUBST([GETOPT_H]) +]) + +AC_DEFUN([gl_GETOPT], [gl_FUNC_GETOPT_GNU]) diff --git a/cpp/third_party/xz-5.8.3/m4/gettext.m4 b/cpp/third_party/xz-5.8.3/m4/gettext.m4 new file mode 100644 index 0000000000..d6a98efbf9 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/gettext.m4 @@ -0,0 +1,392 @@ +# gettext.m4 +# serial 81 (gettext-0.23) +dnl Copyright (C) 1995-2014, 2016, 2018-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2024. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL must be one of 'external', 'use-libtool', 'here'. +dnl INTLSYMBOL should be 'external' for packages other than GNU gettext. +dnl It should be 'use-libtool' for the packages 'gettext-runtime' and +dnl 'gettext-tools'. +dnl It should be 'here' for the package 'gettext-runtime/intl'. +dnl If INTLSYMBOL is 'here', then a libtool library +dnl $(top_builddir)/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value '$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + m4_if([$1], [], , [m4_if([$1], [external], , [m4_if([$1], [use-libtool], , [m4_if([$1], [here], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + m4_if(m4_if([$1], [], [old])[]m4_if([$1], [no-libtool], [old]), [old], + [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. +])]) + m4_if([$2], [], , [m4_if([$2], [need-ngettext], , [m4_if([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_building_libintl_in_same_build_tree], + m4_if([$1], [use-libtool], [yes], [m4_if([$1], [here], [yes], [no])])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. + m4_if(gt_building_libintl_in_same_build_tree, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + m4_if(gt_building_libintl_in_same_build_tree, yes, [ + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + m4_if(gt_building_libintl_in_same_build_tree, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH([included-gettext], + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + m4_if(gt_building_libintl_in_same_build_tree, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_saved_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv or other + dnl OS dependent libraries, specifically on macOS and AIX. + gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS" + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + aix*) gt_LIBINTL_EXTRA="-lpthread" ;; + esac + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \ + && { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then + LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) +#else +#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 +#endif +$gt_revision_test_code + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION + ]])], + [LIBINTL="$LIBINTL $LIBICONV $gt_LIBINTL_EXTRA" + LTLIBINTL="$LTLIBINTL $LTLIBICONV $gt_LIBINTL_EXTRA" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_saved_CPPFLAGS" + LIBS="$gt_saved_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools \ + && test "$PACKAGE" != libintl; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + m4_if(gt_building_libintl_in_same_build_tree, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + USE_INCLUDED_LIBINTL=yes + LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" + LTLIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE([ENABLE_NLS], [1], + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE([HAVE_GETTEXT], [1], + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE([HAVE_DCGETTEXT], [1], + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + m4_if(gt_building_libintl_in_same_build_tree, yes, [ + dnl Make all variables we use known to autoconf. + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT]) + ]) + + m4_if(gt_building_libintl_in_same_build_tree, yes, [], [ + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST([INTLLIBS]) + ]) + + dnl Make all documented variables known to autoconf. + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) + + dnl Define localedir_c and localedir_c_make. + gl_BUILD_TO_HOST_LOCALEDIR +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + + +dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) diff --git a/cpp/third_party/xz-5.8.3/m4/host-cpu-c-abi.m4 b/cpp/third_party/xz-5.8.3/m4/host-cpu-c-abi.m4 new file mode 100644 index 0000000000..ca021d6a9e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/host-cpu-c-abi.m4 @@ -0,0 +1,529 @@ +# host-cpu-c-abi.m4 +# serial 18 +dnl Copyright (C) 2002-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. + +dnl From Bruno Haible and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test __BIG_ENDIAN__ vs. __LITTLE_ENDIAN__. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[34567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h <. +dnl Don't make changes that are incompatible with that documentation! + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. + gl_saved_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + gl_saved_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$gl_saved_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10, macOS 14.4. + gl_saved_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + ]], + [[int result = 0; + /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from + successful returns. This is even documented in + */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against macOS 14.4 bug: Failures are not distinguishable from + successful returns. + POSIX:2018 says: "The iconv() function shall ... return the number of + non-identical conversions performed." + But here, the conversion always does transliteration (the suffixes + "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and + does not report when it does a non-identical conversion. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L WITH STROKE */ + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + /* Here: + With glibc, GNU libiconv (including macOS up to 13): res == (size_t)-1, errno == EILSEQ. + With musl libc, NetBSD 10, Solaris 11: res == 1. + With macOS 14.4: res == 0, output is "l". */ + if (res == 0) + result |= 2; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\263"; + char buf[10]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 4; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + ICONV_CONST char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + ICONV_CONST char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 16; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 32; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } + return result; +]])], + [am_cv_func_iconv_works=yes], , + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + test "$am_cv_func_iconv_works" = no || break + done + LIBS="$gl_saved_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$gl_saved_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +AC_DEFUN_ONCE([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([whether iconv is compatible with its POSIX signature], + [gl_cv_iconv_nonconst], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); + ]], + [[]])], + [gl_cv_iconv_nonconst=yes], + [gl_cv_iconv_nonconst=no]) + ]) + else + dnl When compiling GNU libiconv on a system that does not have iconv yet, + dnl pick the POSIX compliant declaration without 'const'. + gl_cv_iconv_nonconst=yes + fi + if test $gl_cv_iconv_nonconst = yes; then + iconv_arg1="" + else + iconv_arg1="const" + fi + AC_DEFINE_UNQUOTED([ICONV_CONST], [$iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test $gl_cv_iconv_nonconst != yes; then + ICONV_CONST="const" + fi + ]) + + dnl A summary result, for those packages which want to print a summary at the + dnl end of the configuration. + if test "$am_func_iconv" = yes; then + if test -n "$LIBICONV"; then + am_cv_func_iconv_summary='yes, in libiconv' + else + am_cv_func_iconv_summary='yes, in libc' + fi + else + if test "$am_cv_func_iconv" = yes; then + am_cv_func_iconv_summary='not working, consider installing GNU libiconv' + else + am_cv_func_iconv_summary='no, consider installing GNU libiconv' + fi + fi +]) diff --git a/cpp/third_party/xz-5.8.3/m4/intlmacosx.m4 b/cpp/third_party/xz-5.8.3/m4/intlmacosx.m4 new file mode 100644 index 0000000000..4cf791673b --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/intlmacosx.m4 @@ -0,0 +1,71 @@ +# intlmacosx.m4 +# serial 10 (gettext-0.23) +dnl Copyright (C) 2004-2014, 2016, 2019-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on Mac OS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in Mac OS X 10.4. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + [gt_cv_func_CFPreferencesCopyAppValue], + [gt_saved_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFPreferencesCopyAppValue(NULL, NULL)]])], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_saved_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent, + dnl because in macOS 10.13.4 it has the following behaviour: + dnl When two or more languages are specified in the + dnl "System Preferences > Language & Region > Preferred Languages" panel, + dnl it returns en_CC where CC is the territory (even when English is not among + dnl the preferred languages!). What we want instead is what + dnl CFLocaleCopyCurrent returned in earlier macOS releases and what + dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the + dnl first among the preferred languages and CC is the territory. + AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], + [gt_saved_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyPreferredLanguages();]])], + [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], + [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) + LIBS="$gt_saved_LIBS"]) + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + dnl Starting with macOS version 14, CoreFoundation relies on CoreServices, + dnl and we have to link it in explicitly, otherwise an exception + dnl NSInvalidArgumentException "unrecognized selector sent to instance" + dnl occurs. + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) diff --git a/cpp/third_party/xz-5.8.3/m4/lib-ld.m4 b/cpp/third_party/xz-5.8.3/m4/lib-ld.m4 new file mode 100644 index 0000000000..e6e16bb0b5 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/lib-ld.m4 @@ -0,0 +1,170 @@ +# lib-ld.m4 +# serial 13 +dnl Copyright (C) 1996-2003, 2009-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. + +dnl Subroutines of libtool.m4, +dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. + +dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], +[# I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +if test -n "$LD"; then + AC_MSG_CHECKING([for ld]) +elif test "$GCC" = yes; then + AC_MSG_CHECKING([for ld used by $CC]) +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + AC_CACHE_VAL([acl_cv_path_LD], + [ + acl_cv_path_LD= # Final result of this test + ac_prog=ld # Program to search in $PATH + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + case $host in + *-*-mingw* | windows*) + # gcc leaves a trailing carriage return which upsets mingw + acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + fi + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_saved_IFS" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" + ]) + AC_ARG_WITH(PACK[-prefix], +[[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" + fi + fi +]) + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Use breadth-first search. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + fi + done + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + saved_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$saved_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then + haveit= + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$dependency_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$dependency_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + dnl But on GNU systems, ignore -lc options, because + dnl - linking with libc is the default anyway, + dnl - linking with libc.a may produce an error + dnl "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie" + dnl or may produce an executable that always crashes, see + dnl . + dep=`echo "X$dep" | sed -e 's/^X-l//'` + if test "X$dep" != Xc \ + || case $host_os in + linux* | gnu* | k*bsd*-gnu) false ;; + *) true ;; + esac; then + names_next_round="$names_next_round $dep" + fi + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_saved_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_saved_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_saved_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_saved_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_saved_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_saved_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_saved_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_saved_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/cpp/third_party/xz-5.8.3/m4/lib-prefix.m4 b/cpp/third_party/xz-5.8.3/m4/lib-prefix.m4 new file mode 100644 index 0000000000..cf72a5b481 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/lib-prefix.m4 @@ -0,0 +1,334 @@ +# lib-prefix.m4 +# serial 23 +dnl Copyright (C) 2001-2005, 2008-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. + +dnl From Bruno Haible. + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH([lib-prefix], +[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_saved_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_saved_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_saved_prefix="$prefix" + prefix="$acl_final_prefix" + acl_saved_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a function acl_is_expected_elfclass, that tests whether standard input +dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, +dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing +dnl the basename of the libdir to try in turn, either "lib" or "lib64" or +dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib, lib32, and lib64. + dnl On most glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on + dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go + dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. + dnl We determine the compiler's default mode by looking at the compiler's + dnl library search path. If at least one of its elements ends in /lib64 or + dnl points to a directory whose absolute pathname ends in /lib64, we use that + dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, + dnl namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) + + AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], + [AC_EGREP_CPP([Extensible Linking Format], + [#if defined __ELF__ || (defined __linux__ && (defined __EDG__ || defined __SUNPRO_C)) + Extensible Linking Format + #endif + ], + [gl_cv_elf=yes], + [gl_cv_elf=no]) + ]) + if test $gl_cv_elf = yes; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi + # Use 'expr', not 'test', to compare the values of func_elfclass, because on + # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, + # not 1 or 2. +changequote(,)dnl + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac +changequote([,])dnl + else + acl_is_expected_elfclass () + { + : + } + fi + + dnl Allow the user to override the result by setting acl_cv_libdirstems. + AC_CACHE_CHECK([for the common suffixes of directories in the library search path], + [acl_cv_libdirstems], + [dnl Try 'lib' first, because that's the default for libdir in GNU, see + dnl . + acl_libdirstem=lib + acl_libdirstem2= + acl_libdirstem3= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; + esac + fi + ;; + netbsd*) + dnl On NetBSD/sparc64, there is a 'sparc' subdirectory that contains + dnl 32-bit libraries. + if test $HOST_CPU_C_ABI_32BIT != no; then + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparc ;; + esac + fi + ;; + *) + dnl If $CC generates code for a 32-bit ABI, the libraries are + dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. + dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries + dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. + dnl Find the compiler's search path. However, non-system compilers + dnl sometimes have odd library search paths. But we can't simply invoke + dnl '/usr/bin/gcc -print-search-dirs' because that would not take into + dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_saved_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_saved_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" + ]) + dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and + dnl acl_libdirstem3. +changequote(,)dnl + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` +changequote([,])dnl +]) diff --git a/cpp/third_party/xz-5.8.3/m4/libtool.m4 b/cpp/third_party/xz-5.8.3/m4/libtool.m4 new file mode 100644 index 0000000000..5ccb3a8131 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/libtool.m4 @@ -0,0 +1,8880 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996-2001, 2003-2019, 2021-2025 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 2025 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +]) + +# serial 66 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + +# _LT_CC_BASENAME(CC) +# ------------------- +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. +m4_defun([_LT_CC_BASENAME], +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_DECL_FILECMD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options that allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). +libext=a + +with_gnu_ld=$lt_cv_prog_gnu_ld + +old_CC=$CC +old_CFLAGS=$CFLAGS + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from 'configure', and 'config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain=$ac_aux_dir/ltmain.sh +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the 'libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags='_LT_TAGS'dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + +# _LT_OBJECTIVE_C +# ------------------------------ +m4_defun([_LT_OBJECTIVE_C], [ + AC_CACHE_CHECK([for Objective C compilation], + [lt_cv_objc_compiles], + [ save_CFLAGS=$CFLAGS + CFLAGS=$OBJCFLAGS + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([#import +@interface Addition : NSObject +- (int)this:(int)a that:(int)b; +@end + +@implementation Addition +- (int)this:(int)a that:(int)b +{ + return a + b; +} +@end +],[])], + lt_cv_objc_compiles=yes, + lt_cv_objc_compiles=no + ) + CFLAGS=$save_CFLAGS + ] + ) + objc_compiles=$lt_cv_objc_compiles + _LT_DECL([], [objc_compiles], [1], + [Check for compiling Objective C and C++ code]) +]) + +m4_defun([_LT_ML64], [ + AC_CACHE_CHECK([for ML64 compilation], + [lt_cv_ml64_compiles], + [ save_CFLAGS=$CFLAGS + CFLAGS=$ML64FLAGS + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([ret +],[])], + lt_cv_ml64_compiles=yes, + lt_cv_ml64_compiles=no + ) + CFLAGS=$save_CFLAGS + ] + ) + objc_compiles=$lt_cv_objc_compiles + _LT_DECL([], [ml64_compiles], [1], + [Check for compiling ml64 code]) +]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# '#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test 0 = "$lt_write_fail" && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), in case it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +'$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2025 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +while test 0 != $[#] +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try '$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try '$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test yes = "$silent" && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options that allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST + fi + + cfgfile=${ofile}T + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL +# Generated automatically by $as_me ($PACKAGE) $VERSION +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +_LT_COPYING +_LT_LIBTOOL_TAGS + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + $SED '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Objective-C], [_LT_LANG(OBJC)], + [Objective-C++], [_LT_LANG(OBJCXX)], + [Microsoft Macro Assembler], [_LT_LANG(ML64)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_ML64], [ +m4_defun([AC_PROG_ML64], +[AC_LANG_PUSH(ML64)dnl +AC_ARG_VAR([ML64], [ml64 compiler command])dnl +AC_ARG_VAR([ML64FLAGS], [ml64 compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(ML64, ml64) +if test -z "$ML64"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(ML64, [${ac_tool_prefix}ml64], [${ac_tool_prefix}ml64]) + fi +fi +if test -z "$ML64"; then + AC_CHECK_PROG(ML64, ml64, ml64, false) +fi +])#m4_defun +])#m4_ifndef + + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [LT_LANG(OBJC)], + [m4_define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[LT_LANG(OBJC)])]) + +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [LT_LANG(OBJCXX)], + [m4_define([AC_PROG_OBJCXX], defn([AC_PROG_OBJCXX])[LT_LANG(OBJCXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_ML64], + [LT_LANG(ML64)], + [m4_define([AC_PROG_ML64], defn([AC_PROG_ML64])[LT_LANG(ML64)])]) +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) + + +]) + +# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + # Feature test to disable chained fixups since it is not + # compatible with '-undefined dynamic_lookup' + AC_CACHE_CHECK([for -no_fixup_chains linker flag], + [lt_cv_support_no_fixup_chains], + [ save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([],[])], + lt_cv_support_no_fixup_chains=yes, + lt_cv_support_no_fixup_chains=no + ) + LDFLAGS=$save_LDFLAGS + ] + ) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS=$save_LDFLAGS + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main(void) { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' + if test yes = "$lt_cv_support_no_fixup_chains"; then + AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) + fi + ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + _lt_dar_needs_single_mod=no + case $host_os in + rhapsody* | darwin1.*) + _lt_dar_needs_single_mod=yes ;; + darwin*) + # When targeting Mac OS X 10.4 (darwin 8) or later, + # -single_module is the default and -multi_module is unsupported. + # The toolchain on macOS 10.14 (darwin 18) and later cannot + # target any OS version that needs -single_module. + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) + _lt_dar_needs_single_mod=yes ;; + esac + ;; + esac + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + m4_if([$1], [CXX], +[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs $stdlibflag -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs $stdlibflag -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case $ECHO in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + # Trim trailing / since we'll always append absolute paths and we want + # to avoid //, if only for less confusing output for the user. + lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([$with_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and where our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test no = "$enable_libtool_lock" || enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `$FILECMD conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `$FILECMD conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `$FILECMD conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `$FILECMD conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `$FILECMD conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `$FILECMD conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `$FILECMD conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*|x86_64-gnu*) + case `$FILECMD conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*|x86_64-gnu*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi + ;; +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `$FILECMD conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks=$enable_libtool_lock +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +_LT_DECL([], [AR], [1], [The archiver]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because that's what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [1], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_REQUIRE([AC_PROG_RANLIB]) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.expsym + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.expsym conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test yes = "[$]$2"; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.expsym + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.expsym conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS +]) + +if test yes = "[$]$2"; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu* | ironclad*) + # Under GNU Hurd and Ironclad, this test is not required because there + # is no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | windows* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n "$lt_cv_sys_max_cmd_len"; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test yes = "$cross_compiling"; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord (void) __attribute__((visibility("default"))); +#endif + +int fnord (void) { return 42; } +int main (void) +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | windows* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen=shl_load], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen=dlopen], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.expsym + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.expsym out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then + + # We can hardcode non-existent directories. + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) +else + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac + fi +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | windows* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + # If user builds GCC with multilib enabled, + # it should just install on $(libdir) + # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. + if test xyes = x"$multilib"; then + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + $install_prog $dir/$dlname $destdir/$dlname~ + chmod a+x $destdir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib $destdir/$dlname'\'' || exit \$?; + fi' + else + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + fi + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | windows* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl* | *,icl* | *,icx*) + # Native MSVC and Intel compilers + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw* | windows*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC and ICC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly* | midnightbsd*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + case $host_cpu in + powerpc64) + # On FreeBSD bi-arch platforms, a different variable is used for 32-bit + # binaries. See . + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[int test_pointer_size[sizeof (void *) - 5]; + ]])], + [shlibpath_var=LD_LIBRARY_PATH], + [shlibpath_var=LD_32_LIBRARY_PATH]) + ;; + *) + shlibpath_var=LD_LIBRARY_PATH + ;; + esac + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; + +*-mlibc) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='mlibc ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Ideally, we could use ldconfig to report *all* directories which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + enable_cxx_stdlib=yes + stdlibflag= + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + enable_cxx_stdlib=yes + stdlibflag= + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + +rdos*) + dynamic_linker=no + ;; + +serenity*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + dynamic_linker='SerenityOS LibELF' + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +emscripten*) + version_type=none + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + dynamic_linker="Emscripten linker" + _LT_COMPILER_PIC($1)='-fPIC' + _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(no_undefined_flag, $1)= + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program that can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac]) +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program that can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test no = "$withval" || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw* | *-*-windows*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + +# _LT_CHECK_MAGIC_METHOD +# ---------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_MAGIC_METHOD], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +AC_CACHE_CHECK([how to recognize dependent libraries], +lt_cv_deplibs_check_method, +[lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[[4-9]]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[[45]]*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='$FILECMD -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | windows* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly* | midnightbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=$FILECMD + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +*-mlibc) + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +serenity*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | windows* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi]) +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | windows* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool], + [lt_cv_path_manifest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_manifest_tool=yes + fi + rm -f conftest*]) +if test yes != "$lt_cv_path_manifest_tool"; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM=-lm) + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | windows* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BCDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib[[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib[[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \([[a-zA-Z_]][[a-zA-Z0-9_]]*\)$/ {\"lib\1\", (void *) \&\1},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw* | windows*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++ or ICC, + # which start with @ or ?. And Cygwin gawk-4.1.4-3 and newer + # treats input as binary, have to drop carriage return first. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {sub(/\\r\$/,\"\")};"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(void){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test yes = "$GXX"; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.expsym' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly* | midnightbsd*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + *-mlibc) + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64, which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* | icpx*) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + serenity*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test yes = "$GCC"; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.expsym' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + *-mlibc) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | freebsd*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *flang* | ftn | f18* | f95*) + # Flang compiler. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort* | icx* | ifx*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + serenity*) + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds + ;; + cygwin* | mingw* | windows* | cegcc*) + case $cc_basename in + cl* | icl* | icx* | icpx*) + # Native MSVC and Intel compilers + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | windows* | pw32* | cegcc*) + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + with_gnu_ld=yes + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | windows* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + _LT_TAGVAR(file_list_spec, $1)='@' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + *-mlibc) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort* | ifx*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac + + if test yes = "$GCC"; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | windows* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++ or Intel C++ Compiler. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl* | icl* | icx* | icpx*) + # Native MSVC and Intel compilers + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + # A check exists to verify if there are linker flags, which will use + # different commands when linking. + _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.expsym"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.expsym; + fi~ + if test -z "$linker_flags"; then + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + else + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,$linker_flags-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + fi~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC and ICC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly* | midnightbsd*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + *-mlibc) + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + ;; + esac + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + ;; + + osf3*) + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.expsym; done; printf "%s\\n" "-hidden">> $lib.expsym~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.expsym $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.expsym' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + serenity*) + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.expsym' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ + $LD -G$allow_undefined_flag -M $lib.expsym -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.expsym' + ;; + *) + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ + $CC -G$allow_undefined_flag -M $lib.expsym -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.expsym' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e. impossible to change by setting $shlibpath_var if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC=$CC +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(void){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report what library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC=$lt_save_CC +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_caught_CXX_error"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test yes = "$GXX"; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test yes = "$GXX"; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='$wl' + + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac + + if test yes = "$GXX"; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | windows* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl* | ,icl* | no,icl* | ,icx* | no,icx* | ,icpx* | no,icpx*) + # Native MSVC and Intel compilers + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + # A check exists to verify if there are linker flags, which will use + # different commands when linking. + _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.expsym"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.expsym; + fi~ + if test -z "$linker_flags"; then + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + else + $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.expsym" -Wl,$linker_flags-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"; + fi~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $stdlibflag $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly* | midnightbsd*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $stdlibflag $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + *-mlibc) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* | icpx*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | $SED 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + else + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + output_verbose_link_cmd=func_echo_all + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.expsym; done~ + echo "-hidden">> $lib.expsym~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.expsym `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.expsym' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $stdlibflag $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + serenity*) + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ + $CC -G$allow_undefined_flag $wl-M $wl$lib.expsym -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ + $CC -shared $pic_flag $stdlibflag $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + else + # g++ 2.7 appears to require '-G' NOT '-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G $stdlibflag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.expsym~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.expsym~echo "local: *; };" >> $lib.expsym~ + $CC -G $stdlibflag $wl-M $wl$lib.expsym $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.expsym' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP -v "^Driving:" | $GREP " [[-]]L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no + + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test yes != "$_lt_caught_CXX_error" + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + if test yes = "$enable_cxx_stdlib"; then + output_verbose_link_cmd= + fi + + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in + + -L* | -R* | -l* | */libclang_rt.*.a) + # Some compilers place space between "-{L,R,l}" and the path. + # Remove the space. + if test x-L = x"$p" || + test x-R = x"$p" || + test x-l = x"$p"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test no = "$pre_test_object_deps_done"; then + case $prev in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)=$prev$p + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test no = "$pre_test_object_deps_done"; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)=$p + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)=$p + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test no = "$F77"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_F77"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test no = "$FC"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test yes != "$_lt_disable_FC"; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_FC" + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_ML64_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the ML64 assembler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_ML64_CONFIG], +[AC_REQUIRE([LT_PROG_ML64])dnl +AC_LANG_SAVE + +# Source file extension for ML64 test sources. +ac_ext=asm + +#Object file extension for compile ML64 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="main PROC ret main ENDP" + +# Code to be used in simple link tests +lt_simple_link_test_code="main PROC ret main ENDP" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# TODO? Check for compilation issues with ML64 flags. + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${ML64-"gcc"} +CFLAGS=$ML64FLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_ML64_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_OBJC_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Objective-C compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_OBJC_CONFIG], +[AC_REQUIRE([LT_PROG_OBJC])dnl +AC_LANG_SAVE + +# Source file extension for OBJC test sources. +ac_ext=m + +# Object file extension for compiled OBJC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(void){return(0);}' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Check for compilation issues with OBJC flags +_LT_OBJECTIVE_C +if test "yes" = "$lt_cv_gnustep_exists"; then + OBJCFLAGS="$OBJCFLAGS `gnustep-config --objc-flags`" +fi + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${OBJC-"gcc"} +CFLAGS=$OBJCFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_OBJC_CONFIG + + +# _LT_LANG_OBJCXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Objective-C++ compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_OBJCXX_CONFIG], +[AC_REQUIRE([LT_PROG_OBJCXX])dnl +AC_LANG_SAVE + +# Source file extension for OBJCXX test sources. +ac_ext=mm + +# Object file extension for compiled OBJCXX test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Check for compilation issues with OBJCXX flags +_LT_OBJECTIVE_C + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${OBJCXX-"g++"} +CFLAGS=$OBJCXXFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_OBJCXX_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code=$lt_simple_compile_test_code + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + +# LT_PROG_ML64 +# ----------- +AC_DEFUN([LT_PROG_ML64], +[AC_CHECK_TOOL(ML64, ml64,) +]) + + +# LT_PROG_OBJC +# ----------- +AC_DEFUN([LT_PROG_OBJC], +[AC_CHECK_TOOL(OBJC, gcc,) + AC_CHECK_TOOL(GNUSTEP_CONFIG, gnustep-config,) + if test Xgnustep-config = X"$GNUSTEP_CONFIG"; then + test set = "${OBJCFLAGS+set}" || OBJCFLAGS="`gnustep-config --objc-flags`" + fi + AC_SUBST(OBJCFLAGS)])])[]dnl +]) + +# LT_PROG_OBJCXX +# ----------- +AC_DEFUN([LT_PROG_OBJCXX], +[AC_CHECK_TOOL(OBJCXX, g++,) + AC_CHECK_TOOL(GNUSTEP_CONFIG, gnustep-config,) + if test Xgnustep-config = X"$GNUSTEP_CONFIG"; then + test set = "${OBJCXXFLAGS+set}" || OBJCXXFLAGS="`gnustep-config --objc-flags`" + fi + AC_SUBST(OBJCXXFLAGS)])])[]dnl +]) + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_FILECMD +# ---------------- +# Check for a file(cmd) program that can be used to detect file type and magic +m4_defun([_LT_DECL_FILECMD], +[AC_CHECK_PROG([FILECMD], [file], [file], [:]) +_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) +])# _LD_DECL_FILECMD + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine what file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* | *-*-windows* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* | *-*-windows* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* | *-*-windows* ) + case $build in + *-*-mingw* | *-*-windows* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl + +AS_CASE([$host], + [*-*-mingw* | *-*-windows* | *-*-cygwin*], + [AS_CASE([$build], + [*-*-mingw* | *-*-windows* | *-*-cygwin*], + [AC_MSG_CHECKING([whether cygpath is installed]) + AC_CACHE_VAL([lt_cv_cygpath_installed], + [lt_cv_cygpath_installed=ignoring + cygpath --help &> /dev/null + _lt_result=$? + AS_IF([test 0 = "$_lt_result"], + [lt_cv_cygpath_installed=yes], + [lt_cv_cygpath_installed=no]) + ]) + AC_MSG_RESULT([$lt_cv_cygpath_installed]) + _LT_DECL([cygpath_installed], [lt_cv_cygpath_installed], + [0], [whether cygpath is installed])dnl + AS_IF([test "xyes" != "x$lt_cv_cygpath_installed"], + [ + AC_MSG_CHECKING([whether to use cmd with one slash or two slashes]) + AC_CACHE_VAL([lt_cv_cmd_slashes], + [ + _lt_result=`cmd /c echo one-slash works. Not checked //c echo two-slashes 2>/dev/null` + AS_IF([test 0 != $?], + [AC_MSG_ERROR([Do not know how to convert paths])]) + AS_CASE([$_lt_result], + [one-slash*],[lt_cv_cmd_slashes="one"], + [two-slashes*],[lt_cv_cmd_slashes="two"], + [AC_MSG_ERROR([Do not know how to convert paths])] + ) + ]) + AC_MSG_RESULT([$lt_cv_cmd_slashes]) + ]) + ]) + ] +)dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/cpp/third_party/xz-5.8.3/m4/ltoptions.m4 b/cpp/third_party/xz-5.8.3/m4/ltoptions.m4 new file mode 100644 index 0000000000..9e93e6f040 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/ltoptions.m4 @@ -0,0 +1,519 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2025 Free +# Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 12 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option '$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [cxx-stdlib no-cxx-stdlib], [_LT_ENABLE_CXX_STDLIB]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the 'disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --enable-aix-soname configure option, and support the +# `aix-soname=aix' and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. +# DEFAULT is either `aix', `both', or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_ENABLE([aix-soname], + [AS_HELP_STRING([--enable-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $enableval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --enable-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$enable_aix_soname], + [_AC_ENABLE_IF([with], [aix-soname], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)]) + enable_aix_soname=$lt_cv_with_aix_soname]) + with_aix_soname=$enable_aix_soname + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +power*-*-aix[[5-9]]*,'') + AC_MSG_WARN([for $host, specify if building shared libraries for versioning (svr4|both)]) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + with_aix_soname=aix + AC_MSG_RESULT([(default) $with_aix_soname]) + ;; +*) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + with_aix_soname=aix + AC_MSG_RESULT([(default) $with_aix_soname]) + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --enable-pic flag, and support the 'pic-only' and 'no-pic' +# LT_INIT options. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_ENABLE([pic], + [AS_HELP_STRING([--enable-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $enableval in + yes|no) pic_mode=$enableval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [dnl Continue to support --with-pic and --without-pic, for backward + dnl compatibility. + _AC_ENABLE_IF([with], [pic], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [pic_mode=m4_default([$1], [default])])] + ) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the 'pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +# _LT_ENABLE_CXX_STDLIB([MODE]) +# -------------------- +# implement the --enable-cxx-stdlib flag, and support the 'cxx-stdlib' and 'no-cxx-stdlib' +# LT_INIT options. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'no'. +m4_define([_LT_ENABLE_CXX_STDLIB], +[m4_define([_LT_ENABLE_CXX_STDLIB_DEFAULT], [m4_if($1, yes, yes, no)])dnl +stdlibflag=-nostdlib +AC_ARG_ENABLE([cxx-stdlib], + [AS_HELP_STRING([--enable-cxx-stdlib@<:@=PKGS@:>@], + [let the compiler frontend decide what standard libraries to link when building C++ shared libraries and modules @<:@default=]_LT_ENABLE_CXX_STDLIB_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_cxx_stdlib=yes ;; + no) enable_cxx_stdlib=no ;; + *) + enable_cxx_stdlib=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_cxx_stdlib=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [enable_cxx_stdlib=]_LT_ENABLE_CXX_STDLIB_DEFAULT) + +if test yes = "$enable_cxx_stdlib"; then + stdlibflag= +fi + +_LT_DECL([], [enable_cxx_stdlib], [0], [Whether to let the compiler frontend decide what standard libraries to link when building C++ shared libraries and modules])dnl +_LT_DECL([], [stdlibflag], [0], [Flag used for specifying not to link standard libraries])dnl +])# _LT_ENABLE_CXX_STDLIB + +LT_OPTION_DEFINE([LT_INIT], [cxx-stdlib], [_LT_ENABLE_CXX_STDLIB([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-cxx-stdlib], [_LT_ENABLE_CXX_STDLIB([no])]) + + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/cpp/third_party/xz-5.8.3/m4/ltsugar.m4 b/cpp/third_party/xz-5.8.3/m4/ltsugar.m4 new file mode 100644 index 0000000000..5698955ba8 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/ltsugar.m4 @@ -0,0 +1,124 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2025 Free Software +# Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59, which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/cpp/third_party/xz-5.8.3/m4/ltversion.m4 b/cpp/third_party/xz-5.8.3/m4/ltversion.m4 new file mode 100644 index 0000000000..09bdaa5ee3 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/ltversion.m4 @@ -0,0 +1,24 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004, 2011-2019, 2021-2025 Free Software Foundation, +# Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 4509 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.6.0]) +m4_define([LT_PACKAGE_REVISION], [2.6.0]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.6.0' +macro_revision='2.6.0' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/cpp/third_party/xz-5.8.3/m4/lt~obsolete.m4 b/cpp/third_party/xz-5.8.3/m4/lt~obsolete.m4 new file mode 100644 index 0000000000..c1d7729b4a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/lt~obsolete.m4 @@ -0,0 +1,99 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2025 Free +# Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/cpp/third_party/xz-5.8.3/m4/nls.m4 b/cpp/third_party/xz-5.8.3/m4/nls.m4 new file mode 100644 index 0000000000..219cbaa136 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/nls.m4 @@ -0,0 +1,33 @@ +# nls.m4 +# serial 6 (gettext-0.20.2) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2024 Free +dnl Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) diff --git a/cpp/third_party/xz-5.8.3/m4/po.m4 b/cpp/third_party/xz-5.8.3/m4/po.m4 new file mode 100644 index 0000000000..8c0d8602df --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/po.m4 @@ -0,0 +1,456 @@ +# po.m4 +# serial 33 (gettext-0.23) +dnl Copyright (C) 1995-2014, 2016, 2018-2022, 2024 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2024. + +AC_PREREQ([2.60]) + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_SED])dnl + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.22]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Test whether it is GNU msgmerge >= 0.20. + if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' + else + dnl Test whether it is GNU msgmerge >= 0.12. + if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' + else + dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is + dnl slow. But this is not a big problem, as such old gettext versions are + dnl hardly in use any more. + MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' + fi + fi + AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION]) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*) + useit=yes + ;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" </dev/null \ + && break;; + esac + done]) + + if test "$gl_cv_posix_shell" != no; then + POSIX_SHELL=$gl_cv_posix_shell + PREFERABLY_POSIX_SHELL=$POSIX_SHELL + else + POSIX_SHELL= + PREFERABLY_POSIX_SHELL=/bin/sh + fi + AC_SUBST([POSIX_SHELL]) + AC_SUBST([PREFERABLY_POSIX_SHELL]) +]) diff --git a/cpp/third_party/xz-5.8.3/m4/progtest.m4 b/cpp/third_party/xz-5.8.3/m4/progtest.m4 new file mode 100644 index 0000000000..65ec1942ab --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/progtest.m4 @@ -0,0 +1,92 @@ +# progtest.m4 +# serial 10 (gettext-0.23) +dnl Copyright (C) 1996-2003, 2005, 2008-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +AC_PREREQ([2.53]) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL([ac_cv_path_$1], +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in m4_if([$5], , $PATH, [$5]); do + IFS="$gt_saved_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$gt_saved_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +m4_if([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test m4_if([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$][$1]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST([$1])dnl +]) diff --git a/cpp/third_party/xz-5.8.3/m4/tuklib_common.m4 b/cpp/third_party/xz-5.8.3/m4/tuklib_common.m4 new file mode 100644 index 0000000000..c837703406 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/tuklib_common.m4 @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# SYNOPSIS +# +# TUKLIB_COMMON +# +# DESCRIPTION +# +# Common checks for tuklib. +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +AC_DEFUN_ONCE([TUKLIB_COMMON], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +])dnl diff --git a/cpp/third_party/xz-5.8.3/m4/tuklib_cpucores.m4 b/cpp/third_party/xz-5.8.3/m4/tuklib_cpucores.m4 new file mode 100644 index 0000000000..928ef3440e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/tuklib_cpucores.m4 @@ -0,0 +1,181 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# SYNOPSIS +# +# TUKLIB_CPUCORES +# +# DESCRIPTION +# +# Check how to find out the number of available CPU cores in the system. +# This information is used by tuklib_cpucores.c. +# +# Supported methods: +# - GetSystemInfo(): Windows (including Cygwin) +# - sched_getaffinity(): glibc (GNU/Linux, GNU/kFreeBSD) +# - cpuset_getaffinity(): FreeBSD +# - sysctl(): BSDs, OS/2 +# - sysconf(): GNU/Linux, Solaris, Tru64, IRIX, AIX, QNX, Cygwin (but +# GetSystemInfo() is used on Cygwin) +# - pstat_getdynamic(): HP-UX +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +AC_DEFUN_ONCE([TUKLIB_CPUCORES], [ +AC_REQUIRE([TUKLIB_COMMON]) + +# sys/param.h might be needed by sys/sysctl.h. +AC_CHECK_HEADERS([sys/param.h]) + +AC_CACHE_CHECK([how to detect the number of available CPU cores], + [tuklib_cv_cpucores_method], [ + +# Maybe checking $host_os would be enough but this matches what +# tuklib_cpucores.c does. +# +# NOTE: IRIX has a compiler that doesn't error out with #error, so use +# a non-compilable text instead of #error to generate an error. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#if defined(_WIN32) || defined(__CYGWIN__) +int main(void) { return 0; } +#else +compile error +#endif +]])], [tuklib_cv_cpucores_method=special], [ + +# glibc-based systems (GNU/Linux and GNU/kFreeBSD) have sched_getaffinity(). +# The CPU_COUNT() macro was added in glibc 2.9 so we try to link the +# test program instead of merely compiling it. glibc 2.9 is old enough that +# if someone uses the code on older glibc, the fallback to sysconf() should +# be good enough. +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +int +main(void) +{ + cpu_set_t cpu_mask; + sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask); + return CPU_COUNT(&cpu_mask); +} +]])], [tuklib_cv_cpucores_method=sched_getaffinity], [ + +# FreeBSD has both cpuset and sysctl. Look for cpuset first because +# it's a better approach. +# +# This test would match on GNU/kFreeBSD too but it would require +# -lfreebsd-glue when linking and thus in the current form this would +# fail on GNU/kFreeBSD. The above test for sched_getaffinity() matches +# on GNU/kFreeBSD so the test below should never run on that OS. +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +#include + +int +main(void) +{ + cpuset_t set; + cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, + sizeof(set), &set); + return 0; +} +]])], [tuklib_cv_cpucores_method=cpuset], [ + +# On OS/2, both sysconf() and sysctl() pass the tests in this file, +# but only sysctl() works. On QNX it's the opposite: only sysconf() works +# (although it assumes that _POSIX_SOURCE, _XOPEN_SOURCE, and _POSIX_C_SOURCE +# are undefined or alternatively _QNX_SOURCE is defined). +# +# We test sysctl() first and intentionally break the sysctl() test on QNX +# so that sysctl() is never used on QNX. +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#ifdef __QNX__ +compile error +#endif +#ifdef HAVE_SYS_PARAM_H +# include +#endif +#include +int +main(void) +{ +#ifdef HW_NCPUONLINE + /* This is preferred on OpenBSD, see tuklib_cpucores.c. */ + int name[2] = { CTL_HW, HW_NCPUONLINE }; +#else + int name[2] = { CTL_HW, HW_NCPU }; +#endif + int cpus; + size_t cpus_size = sizeof(cpus); + sysctl(name, 2, &cpus, &cpus_size, NULL, 0); + return 0; +} +]])], [tuklib_cv_cpucores_method=sysctl], [ + +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +int +main(void) +{ + long i; +#ifdef _SC_NPROCESSORS_ONLN + /* Many systems using sysconf() */ + i = sysconf(_SC_NPROCESSORS_ONLN); +#else + /* IRIX */ + i = sysconf(_SC_NPROC_ONLN); +#endif + return 0; +} +]])], [tuklib_cv_cpucores_method=sysconf], [ + +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +#include + +int +main(void) +{ + struct pst_dynamic pst; + pstat_getdynamic(&pst, sizeof(pst), 1, 0); + (void)pst.psd_proc_cnt; + return 0; +} +]])], [tuklib_cv_cpucores_method=pstat_getdynamic], [ + + tuklib_cv_cpucores_method=unknown +])])])])])])]) + +case $tuklib_cv_cpucores_method in + sched_getaffinity) + AC_DEFINE([TUKLIB_CPUCORES_SCHED_GETAFFINITY], [1], + [Define to 1 if the number of available CPU cores + can be detected with sched_getaffinity()]) + ;; + cpuset) + AC_DEFINE([TUKLIB_CPUCORES_CPUSET], [1], + [Define to 1 if the number of available CPU cores + can be detected with cpuset(2).]) + ;; + sysctl) + AC_DEFINE([TUKLIB_CPUCORES_SYSCTL], [1], + [Define to 1 if the number of available CPU cores + can be detected with sysctl().]) + ;; + sysconf) + AC_DEFINE([TUKLIB_CPUCORES_SYSCONF], [1], + [Define to 1 if the number of available CPU cores + can be detected with sysconf(_SC_NPROCESSORS_ONLN) + or sysconf(_SC_NPROC_ONLN).]) + ;; + pstat_getdynamic) + AC_DEFINE([TUKLIB_CPUCORES_PSTAT_GETDYNAMIC], [1], + [Define to 1 if the number of available CPU cores + can be detected with pstat_getdynamic().]) + ;; +esac +])dnl diff --git a/cpp/third_party/xz-5.8.3/m4/tuklib_integer.m4 b/cpp/third_party/xz-5.8.3/m4/tuklib_integer.m4 new file mode 100644 index 0000000000..29f2c95f8b --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/tuklib_integer.m4 @@ -0,0 +1,260 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# SYNOPSIS +# +# TUKLIB_INTEGER +# +# DESCRIPTION +# +# Checks for tuklib_integer.h: +# - Endianness +# - Does the compiler or the operating system provide byte swapping macros +# - Does the hardware support fast unaligned access to 16-bit, 32-bit, +# and 64-bit integers +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +AC_DEFUN_ONCE([TUKLIB_INTEGER], [ +AC_REQUIRE([TUKLIB_COMMON]) +AC_REQUIRE([AC_C_BIGENDIAN]) + +AC_MSG_CHECKING([if __builtin_bswap16/32/64 are supported]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + [[__builtin_bswap16(1); + __builtin_bswap32(1); + __builtin_bswap64(1);]])], +[ + AC_DEFINE([HAVE___BUILTIN_BSWAPXX], [1], + [Define to 1 if the GNU C extensions + __builtin_bswap16/32/64 are supported.]) + AC_MSG_RESULT([yes]) +], [ + AC_MSG_RESULT([no]) + + # Look for other byteswapping methods. + AC_CHECK_HEADERS([byteswap.h sys/endian.h sys/byteorder.h], [break]) + + # Even if we have byteswap.h we may lack the specific macros/functions. + if test x$ac_cv_header_byteswap_h = xyes ; then + m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [ + AC_MSG_CHECKING([if FUNC is available]) + AC_LINK_IFELSE([AC_LANG_SOURCE([ +#include +int +main(void) +{ + FUNC[](42); + return 0; +} + ])], [ + AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1], + [Define to 1 if] FUNC [is available.]) + AC_MSG_RESULT([yes]) + ], [AC_MSG_RESULT([no])]) + + ])dnl + fi +]) + +# On archs that we use tuklib_integer_strict_align() (see below), we need +# objdump to detect support for unaligned access. (Libtool needs objdump +# too, so Libtool does this same tool check as well.) +AC_CHECK_TOOL([OBJDUMP], [objdump], [false]) + +# An internal helper that attempts to detect if -mstrict-align or +# -mno-strict-align is in effect. This sets enable_unaligned_access=yes +# if compilation succeeds and the regex passed as an argument does *not* +# match the objdump output of a check program. Otherwise this sets +# enable_unaligned_access=no. +tuklib_integer_strict_align () +{ + # First guess no. + enable_unaligned_access=no + + # Force -O2 because without optimizations the memcpy() + # won't be optimized out. + tuklib_integer_saved_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -O2" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + unsigned int check_strict_align(const void *p) + { + unsigned int i; + memcpy(&i, p, sizeof(i)); + return i; + } + ]])], [ + # Disassemble the test function from the object file. + if $OBJDUMP -d conftest.$ac_objext > conftest.s ; then + # This function should be passed a regex that + # matches if there are instructions that load + # unsigned bytes. Such instructions indicate + # that -mstrict-align is in effect. + # + # NOTE: Use braces to avoid M4 parameter + # expansion. + if grep -- "${1}" conftest.s > /dev/null ; then + : + else + # No single-byte unsigned load + # instructions were found, + # so it seems that -mno-strict-align + # is in effect. + # Override our earlier guess. + enable_unaligned_access=yes + fi + fi + ]) + CFLAGS=$tuklib_integer_saved_CFLAGS +} + +AC_MSG_CHECKING([if unaligned memory access should be used]) +AC_ARG_ENABLE([unaligned-access], AS_HELP_STRING([--enable-unaligned-access], + [Enable if the system supports *fast* unaligned memory access + with 16-bit, 32-bit, and 64-bit integers. By default, + this is enabled on x86, x86-64, + 32/64-bit big endian PowerPC, + 64-bit little endian PowerPC, + and some ARM, ARM64, and RISC-V systems.]), + [], [enable_unaligned_access=auto]) +if test "x$enable_unaligned_access" = xauto ; then + # NOTE: There might be other architectures on which unaligned access + # is fast. + case $host_cpu in + i?86|x86_64|powerpc|powerpc64|powerpc64le) + enable_unaligned_access=yes + ;; + arm*|riscv*) + # On 32-bit ARM, GCC and Clang + # #define __ARM_FEATURE_UNALIGNED + # if and only if unaligned access is supported. + # + # RISC-V C API Specification says that if + # __riscv_misaligned_fast is defined then + # unaligned access is known to be fast. + # + # MSVC is handled as a special case: We assume that + # 32-bit ARM supports fast unaligned access. + # If MSVC gets RISC-V support then this will assume + # fast unaligned access on RISC-V too. + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #if !defined(__ARM_FEATURE_UNALIGNED) \ + && !defined(__riscv_misaligned_fast) \ + && !defined(_MSC_VER) + compile error + #endif + int main(void) { return 0; } + ])], + [enable_unaligned_access=yes], + [enable_unaligned_access=no]) + ;; + aarch64*) + # On ARM64, Clang defines __ARM_FEATURE_UNALIGNED + # if and only if unaligned access is supported. + # However, GCC (at least up to 15.2.0) defines it + # even when using -mstrict-align, so autodetection + # with this macro doesn't work with GCC on ARM64. + # (It does work on 32-bit ARM.) See: + # + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555 + # + # We need three checks: + # + # 1. If __ARM_FEATURE_UNALIGNED is defined and the + # compiler isn't GCC, unaligned access is enabled. + # If the compiler is MSVC, unaligned access is + # enabled even without __ARM_FEATURE_UNALIGNED. + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #if defined(__ARM_FEATURE_UNALIGNED) \ + && (!defined(__GNUC__) \ + || defined(__clang__)) + #elif defined(_MSC_VER) + #else + compile error + #endif + int main(void) { return 0; } + ])], [enable_unaligned_access=yes]) + + # 2. If __ARM_FEATURE_UNALIGNED is not defined, + # unaligned access is disabled. + if test "x$enable_unaligned_access" = xauto ; then + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #ifdef __ARM_FEATURE_UNALIGNED + compile error + #endif + int main(void) { return 0; } + ])], [enable_unaligned_access=no]) + fi + + # 3. Use heuristics to detect if -mstrict-align is + # in effect when building with GCC. + if test "x$enable_unaligned_access" = xauto ; then + [tuklib_integer_strict_align \ + '[[:blank:]]ldrb[[:blank:]]'] + fi + ;; + loongarch*) + # See sections 7.4, 8.1, and 8.2: + # https://github.com/loongson/la-softdev-convention/blob/v0.2/la-softdev-convention.adoc + # + # That is, desktop and server processors likely support + # unaligned access in hardware but embedded processors + # might not. GCC defaults to -mno-strict-align and so + # do majority of GNU/Linux distributions. As of + # GCC 15.2, there is no predefined macro to detect + # if -mstrict-align or -mno-strict-align is in effect. + # Use heuristics based on compiler output. + [ + tuklib_integer_strict_align \ + '[[:blank:]]ld\.bu[[:blank:]]' + ] + ;; + *) + enable_unaligned_access=no + ;; + esac +fi +if test "x$enable_unaligned_access" = xyes ; then + AC_DEFINE([TUKLIB_FAST_UNALIGNED_ACCESS], [1], [Define to 1 if + the system supports fast unaligned access to 16-bit, + 32-bit, and 64-bit integers.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([if unsafe type punning should be used]) +AC_ARG_ENABLE([unsafe-type-punning], + AS_HELP_STRING([--enable-unsafe-type-punning], + [This introduces strict aliasing violations and may result + in broken code. However, this might improve performance in + some cases, especially with old compilers (e.g. + GCC 3 and early 4.x on x86, GCC < 6 on ARMv6 and ARMv7).]), + [], [enable_unsafe_type_punning=no]) +if test "x$enable_unsafe_type_punning" = xyes ; then + AC_DEFINE([TUKLIB_USE_UNSAFE_TYPE_PUNNING], [1], [Define to 1 to use + unsafe type punning, e.g. char *x = ...; *(int *)x = 123; + which violates strict aliasing rules and thus is + undefined behavior and might result in broken code.]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([if __builtin_assume_aligned is supported]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[__builtin_assume_aligned("", 1);]])], + [ + AC_DEFINE([HAVE___BUILTIN_ASSUME_ALIGNED], [1], + [Define to 1 if the GNU C extension + __builtin_assume_aligned is supported.]) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) +])dnl diff --git a/cpp/third_party/xz-5.8.3/m4/tuklib_mbstr.m4 b/cpp/third_party/xz-5.8.3/m4/tuklib_mbstr.m4 new file mode 100644 index 0000000000..98b1d7a3d9 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/tuklib_mbstr.m4 @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# SYNOPSIS +# +# TUKLIB_MBSTR +# +# DESCRIPTION +# +# Check if multibyte and wide character functionality is available +# for use by tuklib_mbstr_* functions. If not enough multibyte string +# support is available in the C library, the functions keep working +# with the assumption that all strings are a in single-byte character +# set without combining characters, e.g. US-ASCII or ISO-8859-*. +# +# This .m4 file and tuklib_mbstr.h are common to all tuklib_mbstr_* +# functions, but each function is put into a separate .c file so +# that it is possible to pick only what is strictly needed. +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +AC_DEFUN_ONCE([TUKLIB_MBSTR], [ +AC_REQUIRE([TUKLIB_COMMON]) +AC_FUNC_MBRTOWC +AC_CHECK_FUNCS([wcwidth vasprintf]) +])dnl diff --git a/cpp/third_party/xz-5.8.3/m4/tuklib_physmem.m4 b/cpp/third_party/xz-5.8.3/m4/tuklib_physmem.m4 new file mode 100644 index 0000000000..4bffe858a9 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/tuklib_physmem.m4 @@ -0,0 +1,217 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# SYNOPSIS +# +# TUKLIB_PHYSMEM +# +# DESCRIPTION +# +# Check how to get the amount of physical memory. +# This information is used in tuklib_physmem.c. +# +# Supported methods: +# +# - Windows (including Cygwin), OS/2, DJGPP (DOS), OpenVMS, AROS, +# and QNX have operating-system specific functions. +# +# - AIX has _system_configuration.physmem. +# +# - sysconf() works on GNU/Linux and Solaris, and possibly on +# some BSDs. +# +# - BSDs use sysctl(). +# +# - Tru64 uses getsysinfo(). +# +# - HP-UX uses pstat_getstatic(). +# +# - IRIX has setinvent_r(), getinvent_r(), and endinvent_r(). +# +# - sysinfo() works on Linux/dietlibc and probably on other Linux +# systems whose libc may lack sysconf(). +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +AC_DEFUN_ONCE([TUKLIB_PHYSMEM], [ +AC_REQUIRE([TUKLIB_COMMON]) + +# sys/param.h might be needed by sys/sysctl.h. +AC_CHECK_HEADERS([sys/param.h]) + +AC_CACHE_CHECK([how to detect the amount of physical memory], + [tuklib_cv_physmem_method], [ + +# Maybe checking $host_os would be enough but this matches what +# tuklib_physmem.c does. +# +# NOTE: IRIX has a compiler that doesn't error out with #error, so use +# a non-compilable text instead of #error to generate an error. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \ + || defined(__DJGPP__) || defined(__VMS) \ + || defined(AMIGA) || defined(__AROS__) || defined(__QNX__) +int main(void) { return 0; } +#else +compile error +#endif +]])], [tuklib_cv_physmem_method=special], [ + +# Look for AIX-specific solution before sysconf(), because the test +# for sysconf() will pass on AIX but won't actually work +# (sysconf(_SC_PHYS_PAGES) compiles but always returns -1 on AIX). +# +# NOTE: There is no need to link the check program because it's not calling +# any functions and thus implicit function declarations aren't a problem. +# The unused reference to _system_configuration.physmem might get optimized +# away, and thus the linker might not see that symbol anyway. +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include + +int +main(void) +{ + (void)_system_configuration.physmem; + return 0; +} +]])], [tuklib_cv_physmem_method=aix], [ + +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +int +main(void) +{ + long i; + i = sysconf(_SC_PAGESIZE); + i = sysconf(_SC_PHYS_PAGES); + return 0; +} +]])], [tuklib_cv_physmem_method=sysconf], [ + +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#ifdef HAVE_SYS_PARAM_H +# include +#endif +#include +int +main(void) +{ + int name[2] = { CTL_HW, HW_PHYSMEM }; + unsigned long mem; + size_t mem_ptr_size = sizeof(mem); + sysctl(name, 2, &mem, &mem_ptr_size, NULL, 0); + return 0; +} +]])], [tuklib_cv_physmem_method=sysctl], [ + +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +#include + +int +main(void) +{ + int memkb; + int start = 0; + getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start); + return 0; +} +]])], [tuklib_cv_physmem_method=getsysinfo],[ + +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +#include + +int +main(void) +{ + struct pst_static pst; + pstat_getstatic(&pst, sizeof(pst), 1, 0); + (void)pst.physical_memory; + (void)pst.page_size; + return 0; +} +]])], [tuklib_cv_physmem_method=pstat_getstatic],[ + +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +int +main(void) +{ + inv_state_t *st = NULL; + setinvent_r(&st); + getinvent_r(st); + endinvent_r(st); + return 0; +} +]])], [tuklib_cv_physmem_method=getinvent_r], [ + +# This version of sysinfo() is Linux-specific. Some non-Linux systems have +# different sysinfo() so we must check $host_os. +case $host_os in + linux*) + AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +int +main(void) +{ + struct sysinfo si; + sysinfo(&si); + return 0; +} + ]])], [ + tuklib_cv_physmem_method=sysinfo + ], [ + tuklib_cv_physmem_method=unknown + ]) + ;; + *) + tuklib_cv_physmem_method=unknown + ;; +esac +])])])])])])])]) + +case $tuklib_cv_physmem_method in + aix) + AC_DEFINE([TUKLIB_PHYSMEM_AIX], [1], + [Define to 1 if the amount of physical memory + can be detected with _system_configuration.physmem.]) + ;; + sysconf) + AC_DEFINE([TUKLIB_PHYSMEM_SYSCONF], [1], + [Define to 1 if the amount of physical memory can + be detected with sysconf(_SC_PAGESIZE) and + sysconf(_SC_PHYS_PAGES).]) + ;; + sysctl) + AC_DEFINE([TUKLIB_PHYSMEM_SYSCTL], [1], + [Define to 1 if the amount of physical memory can + be detected with sysctl().]) + ;; + getsysinfo) + AC_DEFINE([TUKLIB_PHYSMEM_GETSYSINFO], [1], + [Define to 1 if the amount of physical memory can + be detected with getsysinfo().]) + ;; + pstat_getstatic) + AC_DEFINE([TUKLIB_PHYSMEM_PSTAT_GETSTATIC], [1], + [Define to 1 if the amount of physical memory can + be detected with pstat_getstatic().]) + ;; + getinvent_r) + AC_DEFINE([TUKLIB_PHYSMEM_GETINVENT_R], [1], + [Define to 1 if the amount of physical memory + can be detected with getinvent_r().]) + ;; + sysinfo) + AC_DEFINE([TUKLIB_PHYSMEM_SYSINFO], [1], + [Define to 1 if the amount of physical memory + can be detected with Linux sysinfo().]) + ;; +esac +])dnl diff --git a/cpp/third_party/xz-5.8.3/m4/tuklib_progname.m4 b/cpp/third_party/xz-5.8.3/m4/tuklib_progname.m4 new file mode 100644 index 0000000000..b70d063ff0 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/tuklib_progname.m4 @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# SYNOPSIS +# +# TUKLIB_PROGNAME +# +# DESCRIPTION +# +# Put argv[0] into a global variable progname. On DOS-like systems, +# modify it so that it looks nice (no full path or .exe suffix). +# +# This .m4 file is needed allow this module to use glibc's +# program_invocation_name. +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +AC_DEFUN_ONCE([TUKLIB_PROGNAME], [ +AC_REQUIRE([TUKLIB_COMMON]) +AC_CHECK_DECL([program_invocation_name], [AC_DEFINE( + [HAVE_PROGRAM_INVOCATION_NAME], [1], + [Define to 1 if 'program_invocation_name' is declared in .])], + [], [#include ]) +])dnl diff --git a/cpp/third_party/xz-5.8.3/m4/visibility.m4 b/cpp/third_party/xz-5.8.3/m4/visibility.m4 new file mode 100644 index 0000000000..4a741c5eab --- /dev/null +++ b/cpp/third_party/xz-5.8.3/m4/visibility.m4 @@ -0,0 +1,85 @@ +dnl SPDX-License-Identifier: FSFULLR + +# visibility.m4 +# serial 9 +dnl Copyright (C) 2005, 2008, 2010-2024 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl Mac OS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN([gl_VISIBILITY], +[ + AC_REQUIRE([AC_PROG_CC]) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + dnl First, check whether -Werror can be added to the command line, or + dnl whether it leads to an error because of some other option that the + dnl user has put into $CC $CFLAGS $CPPFLAGS. + AC_CACHE_CHECK([whether the -Werror option is usable], + [gl_cv_cc_vis_werror], + [gl_saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_vis_werror=yes], + [gl_cv_cc_vis_werror=no]) + CFLAGS="$gl_saved_CFLAGS" + ]) + dnl Now check whether visibility declarations are supported. + AC_CACHE_CHECK([for simple visibility declarations], + [gl_cv_cc_visibility], + [gl_saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + dnl We use the option -Werror and a function dummyfunc, because on some + dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning + dnl "visibility attribute not supported in this configuration; ignored" + dnl at the first function definition in every compilation unit, and we + dnl don't want to use the option in this case. + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void); + int hiddenvar; + int exportedvar; + int hiddenfunc (void) { return 51; } + int exportedfunc (void) { return 1225736919; } + void dummyfunc (void) {} + ]], + [[]])], + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) + CFLAGS="$gl_saved_CFLAGS" + ]) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + AC_SUBST([CFLAG_VISIBILITY]) + AC_SUBST([HAVE_VISIBILITY]) + AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], + [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) +]) diff --git a/cpp/third_party/xz-5.8.3/po/LINGUAS b/cpp/third_party/xz-5.8.3/po/LINGUAS new file mode 100644 index 0000000000..67e9a8b9a7 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/LINGUAS @@ -0,0 +1,25 @@ +ca +cs +da +de +eo +es +fi +fr +hr +hu +it +ka +ko +nl +pl +pt +pt_BR +ro +sr +sv +tr +uk +vi +zh_CN +zh_TW diff --git a/cpp/third_party/xz-5.8.3/po/Makefile.in.in b/cpp/third_party/xz-5.8.3/po/Makefile.in.in new file mode 100644 index 0000000000..acff1e1bee --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/Makefile.in.in @@ -0,0 +1,517 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-2000 Ulrich Drepper +# Copyright (C) 2000-2024 Free Software Foundation, Inc. +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. +# +# Origin: gettext-0.23 +GETTEXT_MACRO_VERSION = 0.22 + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + +SED = @SED@ +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ +localedir = @localedir@ +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ + +# We use $(mkdir_p). +# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as +# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, +# @install_sh@ does not start with $(SHELL), so we add it. +# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined +# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake +# versions, $(mkinstalldirs) and $(install_sh) are unused. +mkinstalldirs = $(SHELL) @install_sh@ -d +install_sh = $(SHELL) @install_sh@ +MKDIR_P = @MKDIR_P@ +mkdir_p = @mkdir_p@ + +# When building gettext-tools, we prefer to use the built programs +# rather than installed programs. However, we can't do that when we +# are cross compiling. +CROSS_COMPILING = @CROSS_COMPILING@ + +GMSGFMT_ = @GMSGFMT@ +GMSGFMT_no = @GMSGFMT@ +GMSGFMT_yes = @GMSGFMT_015@ +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) +XGETTEXT_ = @XGETTEXT@ +XGETTEXT_no = @XGETTEXT@ +XGETTEXT_yes = @XGETTEXT_015@ +XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) +MSGMERGE = @MSGMERGE@ +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sed \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot +POFILESDEPS_yes = $(POFILESDEPS_) +POFILESDEPS_no = +POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) + +DISTFILESDEPS_ = update-po +DISTFILESDEPS_yes = $(DISTFILESDEPS_) +DISTFILESDEPS_no = +DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) + +# Makevars gets inserted here. (Don't remove this line!) + +all: all-@USE_NLS@ + + +.SUFFIXES: +.SUFFIXES: .po .gmo .sed .nop .po-create .po-update + +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +$(GMOFILES): $(srcdir)/$(DOMAIN).pot +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po + + +all-yes: $(srcdir)/stamp-po +all-no: + +# Ensure that the gettext macros and this Makefile.in.in are in sync. +CHECK_MACRO_VERSION = \ + test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ + || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ + exit 1; \ + } + +# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no +# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because +# we don't want to bother translators with empty POT files). We assume that +# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. +# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target). + +# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS +# have been loosely updated. Its purpose is that when a developer or translator +# checks out the package from a version control system, and the $(DOMAIN).pot +# file is not under version control, "make" will update the $(DOMAIN).pot and +# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This +# timestamp would not be necessary if updating the $(CATALOGS) would always +# touch them; however, the rule for $(POFILES) has been designed to not touch +# files that don't need to be changed. +$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot + @$(CHECK_MACRO_VERSION) + test ! -f $(srcdir)/$(DOMAIN).pot || \ + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @test ! -f $(srcdir)/$(DOMAIN).pot || { \ + echo "touch $(srcdir)/stamp-po" && \ + echo timestamp > $(srcdir)/stamp-poT && \ + mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \ + } + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +# The determination of whether the package xyz is a GNU one is based on the +# heuristic whether some file in the top level directory mentions "GNU xyz". +# If GNU 'find' is available, we avoid grepping through monster files. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ + else \ + package_prefix=''; \ + fi; \ + if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ + else \ + msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ + fi; \ + case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + ;; \ + *) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --package-name="$${package_prefix}@PACKAGE@" \ + --package-version='@VERSION@' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + ;; \ + esac + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot-header; then \ + sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ + cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ + rm -f $(DOMAIN).1po \ + || exit 1; \ + fi; \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f $(srcdir)/remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f $(srcdir)/remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(POFILESDEPS) + @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + if test -f "$(srcdir)/$${lang}.po"; then \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + 0.1[1-5] | 0.1[1-5].*) \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + 0.1[6-7] | 0.1[6-7].*) \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +install-dvi install-ps install-pdf install-html: + +mostlyclean: + rm -f $(srcdir)/stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: $(srcdir)/stamp-po $(DISTFILES) + @dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + dists="$$dists $(DOMAIN).pot stamp-po"; \ + else \ + case $(XGETTEXT) in \ + :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \ + *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \ + esac; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir) || exit 1; \ + else \ + cp -p $(srcdir)/$$file $(distdir) || exit 1; \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.10 | 0.10.*) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + 0.1[1-5] | 0.1[1-5].*) \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + 0.1[6-7] | 0.1[6-7].*) \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) --quiet $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +# Recreate Makefile by invoking config.status. Explicitly invoke the shell, +# because execution permission bits may not work on the current file system. +# Use @SHELL@, which is the shell determined by autoconf for the use by its +# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. +Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ + && @SHELL@ ./config.status $(subdir)/$@.in po-directories + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# This Makefile contains rules which don't work with parallel make, +# namely dist2. +# See . +# So, turn off parallel execution in this Makefile. +.NOTPARALLEL: diff --git a/cpp/third_party/xz-5.8.3/po/Makevars b/cpp/third_party/xz-5.8.3/po/Makevars new file mode 100644 index 0000000000..b2d8a7cfbe --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/Makevars @@ -0,0 +1,91 @@ +# 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) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --add-location=file --no-wrap --keyword=_ --keyword=N_ '--keyword=W_:1,"This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care."' + +# 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 +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# 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 = 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: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = + +# 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 = --add-location=file --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. +# +# NOTE: The the custom "mydist" target in ../Makefile.am updates xz.pot. +# An updated xz.pot will cause the .po files to be updated too but +# only when updating would change more than the POT-Creation-Date line. +DIST_DEPENDS_ON_UPDATE_PO = no diff --git a/cpp/third_party/xz-5.8.3/po/POTFILES.in b/cpp/third_party/xz-5.8.3/po/POTFILES.in new file mode 100644 index 0000000000..dead5ed430 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/POTFILES.in @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: 0BSD + +# List of source files which contain translatable strings. +src/xz/args.c +src/xz/coder.c +src/xz/file_io.c +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/sandbox.c +src/xz/signals.c +src/xz/suffix.c +src/xz/util.c +src/lzmainfo/lzmainfo.c +src/common/tuklib_exit.c +src/liblzma/common/string_conversion.c diff --git a/cpp/third_party/xz-5.8.3/po/Rules-quot b/cpp/third_party/xz-5.8.3/po/Rules-quot new file mode 100644 index 0000000000..9e13054079 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/Rules-quot @@ -0,0 +1,66 @@ +# Special Makefile rules for English message catalogs with quotation marks. +# +# Copyright (C) 2001-2024 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# This file is offered as-is, without any warranty. +# +# Written by Bruno Haible , 2001. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sed Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-create: + $(MAKE) en@quot.po-update +en@boldquot.po-create: + $(MAKE) en@boldquot.po-update + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ + | $(SED) -f $$tmpdir/$$lang.insert-header | $(SED) -e '/^%%/d' \ + | $(MSGCONV) -t UTF-8 | \ + { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ + $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ + ;; \ + *) \ + $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ + ;; \ + esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ + ; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sed + sed -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sed > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sed + sed -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sed > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff --git a/cpp/third_party/xz-5.8.3/po/boldquot.sed b/cpp/third_party/xz-5.8.3/po/boldquot.sed new file mode 100644 index 0000000000..3c1de54e66 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/boldquot.sed @@ -0,0 +1,21 @@ +# Sed script that converts quotations, by replacing ASCII quotation marks +# with Unicode quotation marks and highlighting the quotations in bold face. +# +# Copyright (C) 2001 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# This file is offered as-is, without any warranty. +# +# Written by Bruno Haible , 2001. +# +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff --git a/cpp/third_party/xz-5.8.3/po/ca.gmo b/cpp/third_party/xz-5.8.3/po/ca.gmo new file mode 100644 index 0000000000000000000000000000000000000000..4670cf7d2f22d967a5e4aba44e4593d347ef21ce GIT binary patch literal 15587 zcmb`Nd2n4^)ffAasWysVGbP{TqPLpAvgwnyUEoFdCTguRlc38r|bl{INg|@>C{d~_k z_brkvJ2ZE6-uEtN`JLZ(e&=`eZ_i)%!Dj?P@E~QF5}X?Z-vIvhIYIDD@Z}dc+yd^P z==vBq1U>}r1iuD8A3W#6AXo>!2s{sb8Tdl*Qt;QoT^?@+2Y7x9cnSCkkADHalIQP( zuLjS#CE*(clh@o0=Mw|SD?oEDYyfC&U1s{a`0O4WndM21$Ym5G58Sp za_}>t0sr3PPr(JAH!z6ib2nH4?+0H6eic-|{|UYnyqHScz-^%Vi$HyU8~6h75m0nJ z0bT?C9k?C5kdJ%7>p=1EUa$Z^3)a9b8ysC901-#<7$|;z4ty5)=l=Vb!AYKf2&&#L z22;Ij!DoY`;CgVvKfe(i;&~Rl0{j4|d3*_E>cPK)BjAt0VepC6N^Vz!F9B}@cY{ly`0*Lg@)O*}^TjmU2~L5c>s_F} zKMd{wzYJ>rzW_Dgb#w};!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tt-+N*%#mPEK(eAbzQA?=hIm&=ZJNG(MnU47970X*rQtJIT-VxxVt$&ra zEvH6a-o{-2pMdMk1GJLf{D~8uJ!@&7&|wP<>*x{p(4_2(UwhdH+q{X31e1cEdXhC| z<(@8V1=LPwEeMgc7Lfq$6bT?soLjaQgRwBH5|i^U6IR%~avxGEa44fg z7kla=bf+%%Uk1%Yx=+D_dpN8KrQK5(#NSm1WtmuxSlFcI?x;nPP@c-W)uF5!V#{iP zTkktzo%T#{&7pDC4$el1JqDwJHdBiA1pot_yn?RQU`BNHR;5T^YA2Q&Olk51e$ zdGN^8h&`W~nAEG8@rjZBBOKiv9B4l{ZAK^j@yx#Q_5(xKT{|D{&K1x*X}JrS7zi^ zW$ZjU)&4+=!Lz+9uD?RcUPutj9P!a-)_^zdPqG8gG3#|C<)q*_udG zZ6=M(tjojjtj)`*lbrLQN##M$sgrnF_smfb+I;FH2R-hEJ?R;(>%SRETrMH;M literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/ca.po b/cpp/third_party/xz-5.8.3/po/ca.po new file mode 100644 index 0000000000..1f22beadda --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/ca.po @@ -0,0 +1,1633 @@ +# SPDX-License-Identifier: 0BSD +# +# XZ Utils Catalan Translation +# Copyright (C) The XZ Utils authors and contributors +# This file is published under the BSD Zero Clause License. +# +# Jordi Mas i Hernàndez , 2022, 2024 +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.6.0-pre2\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2024-08-18 18:19+0300\n" +"Last-Translator: Jordi Mas i Hernàndez \n" +"Language-Team: Catalan \n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"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 +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: argument no vàlid per a --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: massa arguments per a --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "A --block-list, falta la mida del bloc després del número de cadena de filtres «%c:»" + +#: src/xz/args.c +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 +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: tipus de format de fitxer desconegut" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: tipus de comprovació d'integritat no admès" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Només es pot especificar un fitxer amb '--files' o '--files0'." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "La variable d'entorn %s conté massa arguments" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "El suport de compressió s'ha desactivat en temps de construcció" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "El suport de descompressió s'ha desactivat en temps de construcció" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "No s'admet la compressió de fitxers lzip (.lz)" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list s'ignora a menys que es comprimeixi al format .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Amb --format=raw, --suffix=.SUF és necessari si no s'escriu a la sortida estàndard" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "El nombre màxim de filtres és de quatre" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Error a l'opció --filters%s=FILTERS:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "El límit d'ús de la memòria és massa baix per a la configuració del filtre indicat." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "cadena de filtres %u utilitzada per --block-list però no especificada amb --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Es desaconsella l'ús d'un predefinit en mode RAW." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Les opcions exactes dels predefinits poden variar entre versions de programari." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "El format .lzma només admet el filtre LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "No es pot usar LZMA1 amb el format .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "La cadena de filtres %u és incompatible amb --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Es canvia al mode d'un sol fil a causa de --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Opcions no admeses a la cadena de filtres %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "S'utilitzen fins a % fils." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Cadena de filtres o opcions de filtre no admeses" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "La descompressió necessitarà %s MiB de memòria." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "S'ha reduït el nombre de fils de %s a %s per a no excedir el límit d'ús de memòria de %s MiB" + +#: src/xz/coder.c +#, 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'ha reduït el nombre de fils de %s a un. El límit d'ús automàtic de memòria de %s MiB encara s'està excedint. Es requereix %s MiB de memòria. Es continua igualment." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "S'està canviant al mode d'un sol fil per a no excedir el límit d'ús de la memòria de %s MiB" + +#: src/xz/coder.c +#, 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 "S'ha ajustat la mida del diccionari LZMA%c de %s MiB a %s MiB per a no excedir el límit d'ús de memòria de %s MiB" + +#: src/xz/coder.c +#, c-format +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 "S'ha ajustat la mida del diccionari LZMA%c per a --filters%u de %s MiB a %s MiBper a no excedir el límit d'ús de memòria de %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "S'ha produït un error en canviar a la cadena de filtres %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "S'ha produït un error en crear una canonada: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: ha fallat la funció poll(): %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: sembla que el fitxer s'ha mogut, no s'elimina" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: no es pot eliminar: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: no es pot establir el propietari del fitxer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: no es pot establir el grup de fitxers: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: no es poden establir els permisos del fitxer: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: ha fallat el tancament del fitxer: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: ha fallat el tancament del fitxer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "S'ha produït un error en obtenir els indicadors d'estat del fitxer de l'entrada estàndard: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: és un enllaç simbòlic, s'omet" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: és un directori, s'omet" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: no és un fitxer normal, s'omet" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: el fitxer té el bit de setuid o setgid, s'omet" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: el fitxer té un bit enganxós, s'omet" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: el fitxer d'entrada té més d'un enllaç dur, s'omet" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Nom de fitxer buit, s'omet" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "S'ha produït un error en restaurar els indicadors d'estat a l'entrada estàndard: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "S'ha produït un error en obtenir els indicadors d'estat del fitxer de la sortida estàndard: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s: ha fallat el tancament del fitxer: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s: no és un fitxer normal, s'omet" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "S'ha produït un error en restaurar l'indicador O_APPEND a la sortida estàndard: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: ha fallat el tancament del fitxer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: ha fallat la cerca en intentar crear un fitxer dispers: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: error de lectura: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: error en cercar el fitxer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: fi inesperat del fitxer" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: error d'escriptura: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Desactivat" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Quantitat de memòria física (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Nombre de fils del processador:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Compressió:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Descompressió:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Descompressió multifil:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Predeterminat per a -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Informació del maquinari:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Límits d'ús de la memòria:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Fluxos:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blocs:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Mida comprimida:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Mida no comprimida:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Relació:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Comprovació:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Farciment del flux:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Memòria necessària:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Mides a les capçaleres:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Nombre de fitxers:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Flux" + +#: src/xz/list.c +msgid "Block" +msgstr "Bloc" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blocs" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "CompOffset" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "UncompOffset" + +#: src/xz/list.c +msgid "CompSize" +msgstr "CompSize" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "UncompSize" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "TotalSize" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Relació" + +#: src/xz/list.c +msgid "Check" +msgstr "Comprovació" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "CheckVal" + +#: src/xz/list.c +msgid "Padding" +msgstr "Separació" + +#: src/xz/list.c +msgid "Header" +msgstr "Capçalera" + +#: src/xz/list.c +msgid "Flags" +msgstr "Senyals" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "MemUsage" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtres" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Cap" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "NoConeix2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "NoConeix3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "NoConeix5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "NoConeix6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "NoConeix7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "NoConeix8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "NoConeix9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "NoConeix11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "NoConeix12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "NoConeix13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "NoConeix14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "NoConeix15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: El fitxer està buit" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Massa petit per a ser un fitxer .xz vàlid" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Strms Blocs Comprimit NoComprimit Ràtio Check Nom de fitxer" + +#: src/xz/list.c +msgid "Yes" +msgstr "Sí" + +#: src/xz/list.c +msgid "No" +msgstr "No" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +msgstr " Versió mínima 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s fitxer\n" +msgstr[1] "%s fitxers\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Totals:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list només funciona en fitxers .xz (--format=xz o --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Proveu «lzmainfo» amb fitxers .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list no admet la lectura des de l'entrada estàndard" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Error en llegir els noms de fitxer: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Final inesperat de l'entrada en llegir els noms de fitxer" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: S'ha trobat un caràcter nul en llegir els noms de fitxer. Potser volíeu utilitzar «--files0» en comptes de «--files»?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "La compressió i descompressió amb --robot encara no són admesos." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "No es poden llegir les dades de l'entrada estàndard en llegir els noms de fitxer de l'entrada estàndard" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Error intern (error)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "No es poden establir els gestors de senyals" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Sense comprovació d'integritat; no es verifica la integritat del fitxer" + +#: src/xz/message.c +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 +msgid "Memory usage limit reached" +msgstr "S'ha arribat al límit d'ús de la memòria" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "No s'ha reconegut el format del fitxer" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Opcions no admeses" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Les dades comprimides estan malmeses" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Final inesperat de l'entrada" + +#: src/xz/message.c +#, 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 +#, 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 +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Cadena de filtres: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Proveu «%s --help» per a més informació." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"Ús: %s [OPCIÓ]... [FITXER]...\n" +"Comprimeix o descomprimeix FITXERS en format .xz.\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Els arguments obligatoris per a opcions llargues també són obligatoris\n" +"per a opcions curtes.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " Mode d'operació:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force compression" +msgstr "Descompressió:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force decompression" +msgstr "Descompressió:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +" Modificadors de l'operació:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "Ha fallat l'escriptura a la sortida estàndard" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --single-stream decompress only the first stream, and silently\n" +#| " ignore possible remaining input data" +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" +" --single-stream descomprimeix només el primer flux, i silenciosament\n" +" ignora les possibles dades d'entrada restants" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +" Opcions bàsiques de format i compressió de fitxers:\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --ignore-check don't verify the integrity check when decompressing" +msgid "don't verify the integrity check when decompressing" +msgstr " --ignore-check no verifiquis la comprovació d'integritat en descomprimir" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 ... -9 compressió predefinida; per defecte és 6; tingueu en\n" +" compte l'ús de memòria del compressor *i* del\n" +" descompressor abans d'utilitzar 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme intenta millorar la ràtio de compressió usant més temps\n" +" de CPU; no afecta els requisits de memòria del\n" +" descompressor" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n" +#| " as many threads as there are processor cores" +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +" -T, --threads=NUM usa com a màxim NUM fils; el valor predeterminat és 0;\n" +" que utilitza tants fils com nuclis té el processador" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-size=SIZE\n" +#| " start a new .xz block after every SIZE bytes of input;\n" +#| " use this to set the block size for threaded compression" +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" +" --block-size=MIDA\n" +" inicia un bloc nou .xz després de cada MIDA de bytes\n" +" d'entrada; utilitzeu-ho per a establir la mida del bloc\n" +" per a la compressió amb fils" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-list=BLOCKS\n" +#| " start a new .xz block after the given comma-separated\n" +#| " intervals of uncompressed data; optionally, specify a\n" +#| " filter chain number (0-9) followed by a ':' before the\n" +#| " uncompressed data size" +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" +" --block-list=BLOCS\n" +" inicia un bloc .xz nou després de la separació d'intervals\n" +" amb comes donada de dades sense comprimir; opcionalment,\n" +" especifiqueu un número de cadena de filtres (0-9) seguit\n" +" d'un «:» abans de la mida de dades sense comprimir" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --flush-timeout=TIMEOUT\n" +#| " when compressing, if more than TIMEOUT milliseconds has\n" +#| " passed since the previous flush and reading more input\n" +#| " would block, all pending data is flushed out" +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" +" --flush-timeout=TEMPS\n" +" en comprimir, si han passat més de mil·lisegons de temps\n" +" d'espera des de l'anterior fluix i llegir més entrades\n" +" blocaria, totes les dades pendents es buiden" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +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ó" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +" Cadena de filtres personalitzada per a la compressió (alternativa per a l'ús\n" +" de predefinits):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " --filters=FILTERS set the filter chain using the liblzma filter string\n" +#| " syntax; use --filters-help for more information" +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" +"\n" +" --filters=FILTERS estableix la cadena de filtres utilitzant la sintaxi\n" +" de cadena de filtres del liblzma\n" +" Useu --filters-help per a més informació" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters1=FILTERS ... --filters9=FILTERS\n" +#| " set additional filter chains using the liblzma filter\n" +#| " string syntax to use with --block-list" +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" +" --filters1=FILTRES ... --filters9=FILTRES\n" +" estableix cadenes de filtres addicionals utilitzant\n" +" la sintaxi de cadena del filtre liblzmava a usar amb\n" +" --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters-help display more information about the liblzma filter string\n" +#| " syntax and exit." +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" +" --filters-help mostra més informació sobre la sintaxi de cadena del\n" +" filtre i surt." + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Number of processor threads:" +msgid "number of position bits" +msgstr "Nombre de fils del processador:" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "compression mode" +msgstr "Descompressió:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" Altres opcions:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr " -Q, --no-warn fes que els avisos no afectin l'estat de sortida" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr "" +" --robot usa missatges analitzables per la màquina\n" +" (útil per a scripts)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" +" --info-memory mostra la quantitat total de RAM i els límits actualment\n" +" actius d'ús de memòria, i surt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version mostra el número de versió i surt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"Sense FITXER, o quan el FITXER és -, es llegeix l'entrada estàndard.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Informa d'errors a <%s> (en anglès o finès).\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "Pàgina inicial de %s: <%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +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Ó." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy, c-format +#| 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" +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" +"Les cadenes de filtres s'estableixen utilitzant --filters=FILTERS o les\n" +"opcions --filters1=FILTRES ... --filters9=FILTERS. Cada filtre de la cadena\n" +"es pot separar per espais o '--'. Alternativament pot ser un predefinit\n" +" <0-9>[e] especificat en comptes d'una cadena de filtres.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Els filtres admesos i les seves opcions són:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be 'name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: les opcions han de ser parelles «name=value» separades per comes" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: nom d'opció no vàlid" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s: el valor de l'opció no és vàlid" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "No s'admet el LZMA1/LZMA2 predefinit: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +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 +#, 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 +#, 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 +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: El sufix del nom de fitxer no és vàlid" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s: El valor no és un enter decimal no negatiu" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: el sufix multiplicador no és vàlid" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Els sufixos vàlids són «KiB» (2^10), «MiB» (2^20) i «GiB» (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "El valor de l'opció «%s» ha d'estar a l'interval [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Les dades comprimides no es poden llegir des d'un terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Les dades comprimides no es poden escriure en un terminal" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" +"Ús: %s [--help] [--version] [FITXER]...\n" +"Mostra la informació emmagatzemada a la capçalera del fitxer .lzma" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Show information stored in the .lzma file header." +msgstr "" +"Ús: %s [--help] [--version] [FITXER]...\n" +"Mostra la informació emmagatzemada a la capçalera del fitxer .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "El fitxer és massa petit per a ser un fitxer .xz" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "No és un fitxer .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Ha fallat l'escriptura a la sortida estàndard" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Error desconegut" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Opcions no admeses" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Cadena de filtres o opcions de filtre no admeses" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s: nom d'opció no vàlid" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s: el sufix multiplicador no és vàlid" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s: tipus de format de fitxer desconegut" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "No es pot usar LZMA1 amb el format .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "El nombre màxim de filtres és de quatre" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress força la compressió\n" +#~ " -d, --decompress força la descompressió\n" +#~ " -t, --test comprova la integritat del fitxer comprimit\n" +#~ " -l, --list informació sobre els fitxers .xz" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep manté (no suprimeixis) els fitxers d'entrada\n" +#~ " -f, --force força la sobreescriptura del fitxer de sortida i\n" +#~ " (des)comprimeix els enllaços\n" +#~ " -c, --stdout escriu a la sortida estàndard i no suprimeixis els\n" +#~ " fitxers d'entrada" + +#~ 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" +#~ msgstr "" +#~ " --no-sparse no creïs fitxers dispersos en descomprimir\n" +#~ " -S, --suffix=.SUF usa el sufix «.SUF» en fitxers comprimits\n" +#~ " --files[=FILE] llegeix els noms de fitxer a processar des del FITXER;\n" +#~ " si s'omet, els noms de fitxer es llegeixen de l'entrada\n" +#~ " estàndard; els noms de fitxer s'han de finalitzar amb el\n" +#~ " caràcter de línia nova\n" +#~ " --files0[=FILE] com --files però usa el caràcter nul com a terminador" + +#~ 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'" +#~ msgstr "" +#~ " -F, --format=FMT fitxer de format per a codificar o descodificar; els\n" +#~ " valors possibles són «auto» (predeterminat), «xz»,\n" +#~ " «lzma», «lzip» i «raw»\n" +#~ " -C, --check=CHECK el tipus de comprovació d'integritat: «none» (useu amb\n" +#~ " precaució), «crc32», «crc64» (predeterminat), o «sha256»" + +#, no-c-format +#~ msgid "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ msgstr "" +#~ " --memlimit-compress=LÍMIT\n" +#~ " --memlimit-decompress=LÍMIT\n" +#~ " --memlimit-mt-decompress=LÍMIT\n" +#~ " -M, --memlimit=LÍMIT\n" +#~ " estableix el límit d'ús de memòria per a la compressió,\n" +#~ " descompressió, descompressió amb fils, o tots ells; el\n" +#~ " LÍMIT és en bytes, % de RAM, o 0 per als predeterminats" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 o LZMA2; OPTS és una llista separada per comes de\n" +#~ " --lzma2[=OPTS] zero o més opcions de les següents (valors vàlids;\n" +#~ " predeterminat):\n" +#~ " preset=PRE restableix les opcions a un predefinit\n" +#~ " (0-9[e])\n" +#~ " dict=NUM mida del diccionari (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM nombre de bits de context literal (0-4; 3)\n" +#~ " lp=NUM nombre de bits de posició literal (0-4; 0)\n" +#~ " pb=NUM nombre de bits de posició (0-4; 2)\n" +#~ " mode=MODE mode de compressió (ràpid, normal; normal)\n" +#~ " nice=NUM longitud de coincidència (2-273; 64)\n" +#~ " mf=NAME cercador de coincidències (hc3, hc4, bt2,\n" +#~ " bt3, bt4; bt4)\n" +#~ " depth=NUM profunditat màxima de cerca; 0=automàtic\n" +#~ " (predeterminat)" + +#~ 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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ msgstr "" +#~ "\n" +#~ " --x86[=OPTS] filtre BCJ x86 (32-bit i 64-bit)\n" +#~ " --arm[=OPTS] filtre BCJ ARM\n" +#~ " --armthumb[=OPTS] filtre BCJ ARM-Thumb\n" +#~ " --arm64[=OPTS] filtre ARM64 BCJ\n" +#~ " --powerpc[=OPTS] filtre BCJ PowerPC (només endian gran)\n" +#~ " --ia64[=OPTS] filtre IA-64 (Itanium) BCJ\n" +#~ " --sparc[=OPTS] filtre BCJ SPARC\n" +#~ " --riscv[=OPTS] filtre RISC-V BCJ\n" +#~ " OPTS vàlids per a tots els filtres BCJ:\n" +#~ " start=Núm. decalatge d'inici per a les conversions\n" +#~ " (per defecte=0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=OPTS] Filtre delta; OPT (valors vàlids; predeterminat):\n" +#~ " dist=Núm. entre bytes que es resten de\n" +#~ " l'altre (1-256; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet suprimeix els avisos; especifiqueu-ho dues vegades per a\n" +#~ " suprimir també els errors\n" +#~ " -v, --verbose sigues detallat; especifiqueu dues vegades per a tenir\n" +#~ " encara més detall" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help mostra l'ajuda curta (només mostra les opcions bàsiques)\n" +#~ " -H, --long-help mostra aquesta ajuda llarga i surt" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help mostra aquesta ajuda curta i surt\n" +#~ " -H, --long-help mostra l'ajuda llarga (llista també opcions avançades)" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "No s'ha pogut habilitar l'espai aïllat" diff --git a/cpp/third_party/xz-5.8.3/po/cs.gmo b/cpp/third_party/xz-5.8.3/po/cs.gmo new file mode 100644 index 0000000000000000000000000000000000000000..f9ebe3d90b343a6ef4f0b24d2e1bf028bf4287b0 GIT binary patch literal 7983 zcma)=TWlQHdB-QV6Q_*ZrfQnHZPK3Du_M=7nxtf1DASfi$*ydXVl2u@^w3~-_mCXz z%$(_5mfS^)UJ&%fR^E!%b%BCFkRm7uH9%e(M1qUuA`Z|XeaJ(Qha?Y4Q50lF|cjTeJ3bb824fD_rWuu*trdgowoe@uY#iYkH81Phatz#d*B&(jOTyG zsgHyI4vPF!Od@(c28x|8gHMA6DD(WifBqLx*8Okr9QY{47G8Y@lzBc6iX2}Ag)jdB zioG9)gqOhQL0RW>psfFopnU%p_zCbo!CCOghaFx7c@=cQYv3E8%>M&Wfse7M@M;kh zyZkvQ{QCkZ6N4 zSn>M}Q25mZ7s1y-1%3;JBEgSAk>h8e#OKEex+U;sQ1tv8@B#2`P{t2H;q}7=(M#Y5 zLGi<-2t0c2?K5(rg-7WfEQc>FVuw>$A16`x!@}v-}d;g z9>3%9haP|I@u%Q498U&3X%UUCo+ZuTO~Mwi%0xFU8EpPu8M;eLo) zI4F5wnfr0>Gu*<5NVsllN3qs9gV173I1;tyVX*ilZbd<@FQA zv~*vKVm(zi3Te%&#V}1x$-u;P^*lW%-xj)5B@@X&wVsP0)YIS<|>xE@?l9j#jIHX7lRT>uTYSq*_RbtonF*P#s zy8(F!Jd&?`+2uwYh zB_s$*J4Mt-Em_fLBn&%l3Gek*OEXk5iBDBk5w6$y3G2G z9qYWPJBXQ8J1j%D>|RA38xDBlu&%+PNwQoQ1;W|sS}qwv3%i6>DpW*X5+TQZx^Lp3 zQb=eZ)IIx?FIpzgtE?PNC4q!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0s2vFvRL(8aS+IgHw`-AN)DqL3b$DEYv1w-QI>}->7E%13<2%c?b&VVp5u|t0{ad~E99bnHoRRJ`B|Z>;Y=99aq7P!*wTOCI9c<8tlkIR2k(USeqLhFZ`WIcDA@wnA#K}Rqhv29M~a8tZ6Va16Qn&9UyJ;Boe literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/cs.po b/cpp/third_party/xz-5.8.3/po/cs.po new file mode 100644 index 0000000000..57949f7326 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/cs.po @@ -0,0 +1,1679 @@ +# XZ Utils Czech translation +# This file is put in the public domain. +# Marek Černocký , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: xz-utils\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2010-12-03 11:32+0100\n" +"Last-Translator: Marek Černocký \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" +"X-Poedit-Language: Czech\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Neznámý typ formátu souboru" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Neznámý typ kontroly integrity" + +#: src/xz/args.c +#, fuzzy +#| msgid "Only one file can be specified with `--files' or `--files0'." +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Spolu s přepínači „--files“ nebo „--files0“ může být zadán pouze jeden soubor" + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Proměnná prostředí %s obsahuje příliš mnoho argumentů" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "" + +#: src/xz/args.c +#, 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: S přepínačem --format=raw je vyžadován --sufix=.PRIP, vyjma zápisu do standardního výstupu" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Maximální počet filtrů je čtyři" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Omezení použitelné paměti je příliš malé pro dané nastavení filtru." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Použití přednastavení v režimu raw je nevhodné." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Přesné volby u přednastavení se mohou lišit mezi různými verzemi softwaru." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Formát .lzma podporuje pouze filtr LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 nelze použít s formátem .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "" + +#: src/xz/coder.c +#, fuzzy, c-format +#| msgid "Unsupported options" +msgid "Unsupported options in filter chain %u" +msgstr "Nepodporovaná volba" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "" + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Nepodporovaný omezující filtr nebo volby filtru" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Dekomprimace bude vyžadovat %s MiB paměti." + +#: src/xz/coder.c +#, 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 "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Přizpůsobit velikost slovníku LZMA%c z %s MiB na %s MiB, tak aby nebylo překročeno omezení použitelné paměti %s MiB" + +#: src/xz/coder.c +#, 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 "" + +#: src/xz/coder.c +#, 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 "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Přizpůsobit velikost slovníku LZMA%c z %s MiB na %s MiB, tak aby nebylo překročeno omezení použitelné paměti %s MiB" + +#: src/xz/coder.c +#, 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 "Přizpůsobit velikost slovníku LZMA%c z %s MiB na %s MiB, tak aby nebylo překročeno omezení použitelné paměti %s MiB" + +#: src/xz/coder.c +#, 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 "Přizpůsobit velikost slovníku LZMA%c z %s MiB na %s MiB, tak aby nebylo překročeno omezení použitelné paměti %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Vypadá to, že soubor byl přesunut, proto nebude odstraněn" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Nelze odstranit: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Nelze nastavit vlastníka souboru: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Nelze nastavit skupinu souboru: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Nelze nastavit oprávnění souboru: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Selhalo zavření souboru: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Selhalo zavření souboru: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Jedná se o symbolický odkaz, vynechává se" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Jedná se o složku, vynechává se" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Nejedná se o běžný soubor, vynechává se" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Soubor má nastavený bit setuid nebo setgid, vynechává se" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Soubor má nastavený bit sticky, vynechává se" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Vstupní soubor má více než jeden pevný odkaz, vynechává se" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Prázdný název souboru, vynechává se" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Selhalo zavření souboru: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s: Nejedná se o běžný soubor, vynechává se" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Chyba při obnovení příznaku O_APPEND na standardní výstup: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Selhalo zavření souboru: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Selhalo nastavení pozice při pokusu o vytvoření souboru řídké matice: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Chyba čtení: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Chyba při posunu v rámci souboru: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Neočekávaný konec souboru" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Chyba zápisu: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Vypnuto" + +#: src/xz/hardware.c +#, fuzzy +#| msgid "Total amount of physical memory (RAM): " +msgid "Amount of physical memory (RAM):" +msgstr "Celkové množství fyzické paměti (RAM): " + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "" + +#: src/xz/hardware.c +#, fuzzy +#| msgid "Memory usage limit for decompression: " +msgid "Multi-threaded decompression:" +msgstr "Omezení použitelné paměti pro dekomprimaci:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "" + +#: src/xz/hardware.c +#, fuzzy +#| msgid "Memory usage limit reached" +msgid "Memory usage limits:" +msgstr "Dosaženo omezení použitelné paměti" + +#: src/xz/list.c +msgid "Streams:" +msgstr "" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "" + +#: src/xz/list.c +#, fuzzy +#| msgid " Compressed size: %s\n" +msgid "Compressed size:" +msgstr " Komprimovaná velikost: %s\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Uncompressed size: %s\n" +msgid "Uncompressed size:" +msgstr " Nekomprimovaná velikost: %s\n" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "" + +#: src/xz/list.c +msgid "Check:" +msgstr "" + +#: src/xz/list.c +#, fuzzy +#| msgid " Stream padding: %s\n" +msgid "Stream Padding:" +msgstr " Zarovnání proudu: %s\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Memory needed: %s MiB\n" +msgid "Memory needed:" +msgstr " Potřebná paměť: %s MiB\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Sizes in headers: %s\n" +msgid "Sizes in headers:" +msgstr " Velikosti v hlavičkách: %s\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Number of files: %s\n" +msgid "Number of files:" +msgstr " Počet souborů: %s\n" + +#: src/xz/list.c +msgid "Stream" +msgstr "" + +#: src/xz/list.c +msgid "Block" +msgstr "" + +#: src/xz/list.c +msgid "Blocks" +msgstr "" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "" + +#: src/xz/list.c +msgid "CompSize" +msgstr "" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "" + +#: src/xz/list.c +#, fuzzy +#| msgid "Totals:" +msgid "TotalSize" +msgstr "Celkem:" + +#: src/xz/list.c +msgid "Ratio" +msgstr "" + +#: src/xz/list.c +msgid "Check" +msgstr "" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "" + +#: src/xz/list.c +msgid "Padding" +msgstr "" + +#: src/xz/list.c +msgid "Header" +msgstr "" + +#: src/xz/list.c +msgid "Flags" +msgstr "" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "" + +#: src/xz/list.c +msgid "Filters" +msgstr "" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "žádná" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "neznámá-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "neznámá-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "neznámá-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "neznámá-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "neznámá-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "neznámá-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "neznámá-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "neznámá-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "neznámá-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "neznámá-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "neznámá-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "neznámá-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Soubor je prázdný" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Je příliš malý na to, aby to mohl být platný soubor .xz" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Proud Bloky Komprim Nekomprim Poměr Kontrl Název souboru" + +#: src/xz/list.c +msgid "Yes" +msgstr "Ano" + +#: src/xz/list.c +msgid "No" +msgstr "Ne" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s soubor\n" +msgstr[1] "%s soubory\n" +msgstr[2] "%s souborů\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Celkem:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list pracuje pouze se soubory .xz (--format=xz nebo --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "" + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list nepodporuje čtení ze standardního vstupu" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Chyba při čtení názvů souborů: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Neočekávaný konec vstupu při čtení názvů souborů" + +#: src/xz/main.c +#, fuzzy, c-format +#| msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?" +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Byl nalezen nulový znak při čtení názvů souborů; nechtěli jste náhodou použít „--files0“ místo „--files“?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Komprimace a dekomprimace s přepínačem --robot není zatím podporovaná." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Ze standardního vstupu nelze číst data, když se ze standardního vstupu načítají názvy souborů" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Interní chyba" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Nelze ustanovit ovladač signálu" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Žádná kontrola integrity; integrita souboru se nebude ověřovat" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Nepodporovaný typ kontroly integrity; integrita souboru se nebude ověřovat" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Dosaženo omezení použitelné paměti" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Formát souboru nebyl rozpoznán" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Nepodporovaná volba" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Komprimovaná data jsou poškozená" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Neočekávaný konec vstupu" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "Je vyžadováno %s MiB paměti. Limit je %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Omezující filtr: %s\n" + +#: src/xz/message.c +#, fuzzy, c-format +#| msgid "Try `%s --help' for more information." +msgid "Try '%s --help' for more information." +msgstr "Zkuste „%s --help“ pro více informací" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"Použití: %s [PŘEPÍNAČ]... [SOUBOR]...\n" +"Komprimuje nebo dekomprimuje SOUBORy ve formátu xz.\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Povinné argumenty pro dlouhé přepínače jsou povinné rovněž pro krátké přepínače.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr "Operační režim:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Memory usage limit for decompression: " +msgid "force compression" +msgstr "Omezení použitelné paměti pro dekomprimaci:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Memory usage limit for decompression: " +msgid "force decompression" +msgstr "Omezení použitelné paměti pro dekomprimaci:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +"Modifikátory operací:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "Zápis do standardního výstupu selhal" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +"Základní přepínače pro formát souboru a komprimaci:\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 .. -9 přednastavení komprimace; výchozí je 6; než použijete\n" +" hodnoty 7 – 9, vezměte do úvahy množství použité paměti" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme zkusit zlepšit poměr komprimace využitím více času\n" +" procesoru; nemá vliv na paměťové nároky dekomprimace" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" +" --no-adjust pokud nastavení komprimace přesáhne omezení použitelné\n" +" paměti, předat chybu namísto snížení nastavení" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +"Vlastní omezující filtr pro komprimaci (alternativa k použití přednastavených):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "compression mode" +msgstr "Operační režim:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" Ostatní přepínače:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr " -Q, --no-warn způsobí, že varování neovlivní stav ukončení" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr "" +" --robot použít strojově analyzovatelné zprávy (užitečné pro\n" +" skripty)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" +" --info-memory zobrazit celkové množství paměti RAM a současné aktivní\n" +" omezení použitelné paměti a skončit" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version zobrazit číslo verze a skončit" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"Pokud SOUBOR není zadán nebo pokud je -, bude se číst ze standardního vstupu.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Chyby hlaste na <%s> (v angličtině nebo finštině).\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "Domovská stránka %s: <%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "The supported filters and their options are:" +msgstr "Nepodporovaný omezující filtr nebo volby filtru" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be `name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: Volby musí být páry „název=hodnota“ oddělené čárkami" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Neplatný název volby" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s: Neplatná hodnota volby" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Nepodporované přednastavení LZMA1/LZMA2: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Součet lc a lp nesmí překročit hodnotu 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Název souboru má neznámou příponu, vynechává se" + +#: src/xz/suffix.c +#, fuzzy, c-format +#| msgid "%s: File already has `%s' suffix, skipping" +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Soubor již má příponu „%s“, vynechává se" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Neplatná přípona názvu souboru" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s: Hodnota není nezáporné desítkové číslo" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Neplatná jednotka s předponou" + +#: src/xz/util.c +#, 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 "Platné jednotky s předponami jsou „KiB“ (2^10 B), „MiB“ (2^20 B) a „GiB“ (2^30 B)." + +#: src/xz/util.c +#, fuzzy, c-format +#| msgid "Value of the option `%s' must be in the range [%, %]" +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Hodnota volby „%s“ musí být v rozsahu [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Z terminálu nelze číst komprimovaná data" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Do terminálu nelze zapisovat komprimovaná data" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "%s: Too small to be a valid .xz file" +msgid "File is too small to be a .lzma file" +msgstr "%s: Je příliš malý na to, aby to mohl být platný soubor .xz" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Zápis do standardního výstupu selhal" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Neznámá chyba" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Nepodporovaná volba" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Nepodporovaný omezující filtr nebo volby filtru" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s: Neplatný název volby" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s: Neplatná jednotka s předponou" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s: Neznámý typ formátu souboru" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "LZMA1 nelze použít s formátem .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "Maximální počet filtrů je čtyři" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress provést komprimaci\n" +#~ " -d, --decompress provést dekomprimaci\n" +#~ " -t, --test testovat integritu komprimovaného souboru\n" +#~ " -l, --list vypsat informace o souborech .xz" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep zachovat (nemazat) vstupní soubory\n" +#~ " -f, --force vynutit přepis výstupního souboru a de/komprimovat odkazy\n" +#~ " -c, --stdout zapisovat na standardní výstup a nemazat vstupní soubory" + +#, 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" +#~ " --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" +#~ msgstr "" +#~ " --no-sparse nevytvářet při dekomprimaci soubory řídkých matic\n" +#~ " -S, --suffix=.PRIP použít u komprimovaných souborů příponu „.PRIP“\n" +#~ " --files[=SOUBOR] číst názvy souborů, které se mají zpracovat, ze SOUBORu;\n" +#~ " pokud není SOUBOR zadán, čte se ze standardního vstupu;\n" +#~ " názvy souborů musí být zakončeny znakem nového řádku\n" +#~ " --files0[=SOUBOR] stejné jako --files, ale použít k zakončování nulový znak" + +#, 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" +#~ " -C, --check=CHECK integrity check type: 'none' (use with caution),\n" +#~ " 'crc32', 'crc64' (default), or 'sha256'" +#~ msgstr "" +#~ " -F, --format=FORMÁT formát souboru k zakódování nebo dekódování; možné\n" +#~ " hodnoty jsou „auto“ (výchozí), „xz“, „lzma“ a „raw“\n" +#~ " -C, --check=KONTROLA typ kontroly integrity: „none“ (používejte s rozmyslem),\n" +#~ " „crc32“, „crc64“ (výchozí) nebo „sha256“" + +#, 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" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ msgstr "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " nastaví omezení použitelné paměti pro komprimaci,\n" +#~ " dekomprimaci nebo obojí; LIMIT je v bajtech, % z paměti\n" +#~ " RAM nebo 0 pro výchozí" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ " --lzma1[=VOLBY] LZMA1 nebo LZMA2; VOLBY je čárkou oddělovaný seznam žádné\n" +#~ " --lzma2[=VOLBY] nebo více následujících voleb (platné hodnoty; výchozí):\n" +#~ " preset=PŘE změnit volby na PŘEdnastavené (0 – 9[e])\n" +#~ " dict=POČ velikost slovníku (4 KiB – 1536 MiB; 8 MiB)\n" +#~ " lc=POČ počet kontextových bitů literálu (0 – 4; 3)\n" +#~ " lp=POČ počet pozičních bitů literálu (0 – 4; 0)\n" +#~ " pb=POČ počet pozičních bitů (0 – 4; 2)\n" +#~ " mode=REŽIM režim komprimace (fast, normal; normal)\n" +#~ " nice=NUM příznivá délka shody (2 – 273; 64)\n" +#~ " mf=NÁZEV hledání shod (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=POČ maximální hloubka prohledávání;\n" +#~ " 0 = automaticky (výchozí)" + +#, 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" +#~ " --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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ msgstr "" +#~ "\n" +#~ " --x86[=VOLBY] Filtr x86 BCJ (32bitový a 64bitový)\n" +#~ " --powerpc[=VOLBY] Filtr PowerPC BCJ (pouze big endian)\n" +#~ " --ia64[=VOLBY] Filtr IA64 (Itanium) BCJ\n" +#~ " --arm[=VOLBY] Filtr ARM BCJ (pouze little endian)\n" +#~ " --armthumb[=VOLBY] Filtr ARM-Thumb BCJ (pouze little endian)\n" +#~ " --sparc[=VOLBY] Filtr SPARC BCJ\n" +#~ " Platné volby pro všechny filtry BCJ:\n" +#~ " start=POČ počáteční posun pro převody (výchozí=0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=VOLBY] Filtr Delta; platné VOLBY (platné hodnoty; výchozí):\n" +#~ " dist=POČ vzdálenost mezi bajty, které jsou odečítány\n" +#~ " jeden od druhého (1 – 256; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet potlačit varování; zadáním dvakrát, potlačíte i chyby\n" +#~ " -v, --verbose podrobnější zprávy; zadáním dvakrát, budou ještě\n" +#~ " podrobnější" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help zobrazit krátkou nápovědu (vypíše jen základní přepínače)\n" +#~ " -H, --long-help zobrazit tuto úplnou nápovědu a skončit" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help zobrazit tuto zkrácenou nápovědu a skončit\n" +#~ " -H, --long-help zobrazit úplnou nápovědu (vypíše i pokročilé přepínače)" + +#~ msgid "Memory usage limit for compression: " +#~ msgstr "Omezení použitelné paměti pro komprimaci: " + +#, c-format +#~ msgid " Streams: %s\n" +#~ msgstr " Proudů: %s\n" + +#, c-format +#~ msgid " Blocks: %s\n" +#~ msgstr " Bloků: %s\n" + +#, c-format +#~ msgid " Ratio: %s\n" +#~ msgstr " Poměr komprimace: %s\n" + +#, c-format +#~ msgid " Check: %s\n" +#~ msgstr " Typ kontroly: %s\n" + +#~ msgid "" +#~ " Streams:\n" +#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" +#~ msgstr "" +#~ " Proudy:\n" +#~ " Proud Bloky KomprPozice NekomprPozice KomprVelikost NekomprVelikost Poměr Kontrola Zarovnání" + +#, c-format +#~ msgid "" +#~ " Blocks:\n" +#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check" +#~ msgstr "" +#~ " Bloky:\n" +#~ " Proud Blok KomprPozice NekomprPozice CelkVelikost NekomprVelikost Poměr Kontrola" + +#, c-format +#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" +#~ msgstr " KontrHod %*s Hlavič Příznaky KomprVel PoužiPam Filtry" + +#, c-format +#~ msgid "The selected match finder requires at least nice=%" +#~ msgstr "Vybraný vyhledávač shod vyžaduje minimálně nice=%" + +#~ msgid "Limit was %s MiB, but %s MiB would have been needed" +#~ msgstr "Limit byl %s MiB, ale bylo by zapotřebí %s MiB" + +#~ msgid "%s MiB (%s bytes)\n" +#~ msgstr "%s MiB (%s bajtů)\n" + +#~ msgid "" +#~ " -e, --extreme use more CPU time when encoding to increase compression\n" +#~ " ratio without increasing memory usage of the decoder" +#~ msgstr "" +#~ " -e, --extreme využít více procesorového času pro kódování, čímž se\n" +#~ " zvýší kompresní poměr bez zvýšení paměti použité kodérem" + +#~ msgid "" +#~ " -M, --memory=NUM use roughly NUM bytes of memory at maximum; 0 indicates\n" +#~ " the default setting, which is 40 % of total RAM" +#~ msgstr "" +#~ " -M, --memory=POČ použít zhruba POČ bajtů paměti jako maximum; 0 znamená\n" +#~ " výchozí nastavení, což je 40% celkového množství paměti" + +#~ msgid "" +#~ "\n" +#~ " --subblock[=OPTS] Subblock filter; valid OPTS (valid values; default):\n" +#~ " size=NUM number of bytes of data per subblock\n" +#~ " (1 - 256Mi; 4Ki)\n" +#~ " rle=NUM run-length encoder chunk size (0-256; 0)" +#~ msgstr "" +#~ "\n" +#~ " --subblock[=VOLBY] Subblokový filtr; platné VOLBY (platné hodnoty; výchozí):\n" +#~ " size=POČ počet bajtů dat na subblok\n" +#~ " (1 - 256 Mi; 4 Ki)\n" +#~ " rle=POČ velikost dávky pro kodér run-length (0-256; 0)" + +#~ msgid "" +#~ "On this system and configuration, this program will use a maximum of roughly\n" +#~ "%s MiB RAM and " +#~ msgstr "" +#~ "Na tomto systému a s tímto nastavením použije tento program maximum ze zhruba\n" +#~ "%s MiB RAM a " + +#~ msgid "" +#~ "one thread.\n" +#~ "\n" +#~ msgstr "" +#~ "jedno vlákno.\n" +#~ "\n" + +#~ msgid "%s: Invalid multiplier suffix. Valid suffixes:" +#~ msgstr "%s: Neplatná přípona. Platné přípony jsou:" diff --git a/cpp/third_party/xz-5.8.3/po/da.gmo b/cpp/third_party/xz-5.8.3/po/da.gmo new file mode 100644 index 0000000000000000000000000000000000000000..460dae3cf0da253aa610134613b98dab9238e11a GIT binary patch literal 9040 zcmb`Ldu(ObRmM+BN>URVnv%XKWlyPLhUDJZo=Gy}$%J{>lQ=W>O#PVVp(;AQcl-Lx zJ@=f;dD!D1C`hRgpcEm5h(Le@WFQEN5E2?FQvYy~5J-WlAVC$NNspKYvFQ{RMcG z-zCPJ1%DM}OVJyk^zb!M@E5>`!LNYg>H8Qg{$Bu5 zZB&9y@I_E|`5jPpdL5Kq{uxyN2Qa$qvjQ4017-i82>2?fe!Jjzg8u+Y?tAGZISzs1 zQ44$!dD)8NZv<5R2ua_t@}g#n*o0gd<1+A{9*8&IGgMNJSDMYG_e;KxD9^`qdE;FrLszz;L2 zo_9da|J(eNoPP#N|8Iup69kt_{5}F|ogGkiz7A^sUk3?q(Hr1t@T=kZ5#xCsgWAVW zf}aGx0E+J)JrqUX2rh$K{~1v7UjyF-z8LT`0bdUIO96iayqkW%8}Rc1|0v)W1AaN+ zn*rYfA7k9VfhWNk$fxx)@B;V}DEs{t_%ZNbz;}S}hYWXstK5U@IU3N{UEj-p^&7u5 zuP#*XF6kGyaC}ls7+lZNaJm2qGmZzc;rR85@I&0t1)beK#Ch?LFczKWKF%$k=z?1A z5|5X-#Yfpvyps>E%WdmI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`m8?9c@eAbXNXYz-bksR&x=hP?;JElEZnt$hHzzKqST1dxC*n~8WPSIuJT-ID_~xm@nK^XI zOdmPv${kf#n{_wu^=wL(M?C8myVtikHO*P_quuLSnIRlXxPB!jEX%xLXk| z3mwBm1GqV?vWl@P>jH^U((RJWTqVAb>a5{&Hp?^`A8g{>KvmiST`ZGWR|l}>fjuhD zXrd@v9_7Oq>#nwHVxNH$;O$lFtdTHts37li3Mx}|Zz)RJJmg#`cW-n|fAow)p`TRhY~f{dq7PmT3bn2RM-YCz0~JJ)Qn_?W&EVe57otEfCOYhs%fIopTG_p| z{Pc5#XPQjeNh%5V&2O4Nd zq&pD29loN3VsCtkFzZm(je<%!oP%tQTCYn;>(-fBFY1ov>k36$8wHg~n__NM?CoXj zQ>yg%w&fG7$yOsT+Ut3zl;A}nuVSApMJQF|mSIBE?OqX7_E&bq?&S1)gSaA;1X6Sw z3*ma~=ZS{l)K=>;QO1T!5O>74Nmrpx5nWIPMzZNdb@iaO>j*8CSXCmiFs8ol4Cio?mtKIN=mBT>#YRWqHoEDPyhkbb;lqsik6&B8%c*eUElGP@4CZ6D=FTR ziSs3piSiDajY7HW)r?kZvUI+Ixk8tKr#hFw?P%xE=FQz3N_`dV%&};}z#%H$a5Nu$ z07q-#RE43T?W$h)v@uO38(LJdp+(6XTGX_@HS9L*HGD<2>-$jb`UbVGZ=CR-ZhU#$ zI9NRgAK(KA#8NJ!3>mSv-CoTPxHxWazL5Bg?!ejG`UFTsEn>$@zP;n%I>i+$Zy{x3 z=sP0t;Xyrp1pm@dRSqtSOj1L;X|boyJ(u;%7e;Z)jO8EEQ*m^8d7(avhQ}-MQ6au> I`r+*V1E)SyivR!s literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/da.po b/cpp/third_party/xz-5.8.3/po/da.po new file mode 100644 index 0000000000..bea97ac0f5 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/da.po @@ -0,0 +1,1436 @@ +# Danish translation xz. +# This file is put in the public domain. +# Joe Hansen , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.2.4\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2019-03-04 23:08+0100\n" +"Last-Translator: Joe Hansen \n" +"Language-Team: Danish \n" +"Language: da\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=2; plural=(n != 1);\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Ugyldigt parameter til --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: For mange argumenter til --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 kan kun bruges som det sidste element i --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Ukendt filformattype" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Typen for integritetkontrol er ikke understøttet" + +#: src/xz/args.c +#, fuzzy +#| msgid "Only one file can be specified with `--files' or `--files0'." +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Kun en fil kan angives med »--files« eller »--files0«." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, fuzzy, c-format +#| msgid "%s: " +msgid "%s: %s" +msgstr "%s: " + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Miljøvariablen %s indeholder for mange argumenter" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Komprimeringsunderstøttelse blev deaktiveret på byggetidspunktet" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Dekomprimeringsunderstøttelse blev deaktiveret på byggetidspunktet" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "" + +#: src/xz/args.c +#, 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: med --format=raw, --suffix=.SUF er krævet med mindre der skrives til standardud" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Maksimalt antal filtre er fire" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Begræsningen for brug af hukommelse er for lav for den givne filteropsætning." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Det frarådes at bruge en forhåndskonfiguration i rå tilstand (raw mode)." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "De præcise indstillinger for forhåndskonfigurationerne kan variere mellem programversioner." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Formatet .lzma understøtter kun LZMA1-filteret" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 kan ikke bruges med .xz-formatet" + +#: src/xz/coder.c +#, fuzzy, c-format +#| msgid "The filter chain is incompatible with --flush-timeout" +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Filterkæden er ikke kompatibel med --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Skifter til enkelt trådet tilstand på grund af --flush-timeout" + +#: src/xz/coder.c +#, fuzzy, c-format +#| msgid "Unsupported options" +msgid "Unsupported options in filter chain %u" +msgstr "Tilvalg er ikke understøttede" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Bruger op til % tråde." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Filterkæde eller filterindstillinger er ikke understøttet" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Dekomprimering vil kræve %s MiB hukommelse." + +#: src/xz/coder.c +#, 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 "Justerede antallet af tråde fra %s til %s for ikke at overskride begræsningen på brug af hukommelse på %s MiB" + +#: src/xz/coder.c +#, 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 "" + +#: src/xz/coder.c +#, 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 "Justerede antallet af tråde fra %s til %s for ikke at overskride begræsningen på brug af hukommelse på %s MiB" + +#: src/xz/coder.c +#, 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 "Justerede LZMA%c-ordbogsstørrelsen fra %s MiB til %s MiB for ikke at overskride begrænsningen på brug af hukommelse på %s MiB" + +#: src/xz/coder.c +#, 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 "Justerede LZMA%c-ordbogsstørrelsen fra %s MiB til %s MiB for ikke at overskride begrænsningen på brug af hukommelse på %s MiB" + +#: src/xz/coder.c +#, fuzzy, c-format +#| msgid "Error creating a pipe: %s" +msgid "Error changing to filter chain %u: %s" +msgstr "Det opstod en fejl under oprettelse af en datakanal: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Det opstod en fejl under oprettelse af en datakanal: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() mislykkedes: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Filen er vist blevet flyttet, sletter ikke" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Kan ikke fjerne: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Kan ikke angive filejeren: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Kan ikke angive filgruppen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Kan ikke angive filtilladelser: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Lukning af filen fejlede: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Lukning af filen fejlede: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Der opstod en fejl under indhentelse af filstatusflag fra standardind: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Er en symbolsk henvisning, udelader" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Er en mappe, udelader" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Er ikke en normal fil, udelader" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Filen har setuid- eller setgid-bitsæt, udelader" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Fil har klæbende bitsæt, udelader" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Inddatafil har mere end en hård henvisning, udelader" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Tomt filnavn, udelader" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Der opstod en fejl under gendannelse af statusflagene til standardind: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Der opstod en fejl under indhentelse af filstatusflag fra standardud: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Lukning af filen fejlede: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s: Er ikke en normal fil, udelader" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Der opstod en fejl under gendannelse af flaget O_APPEND til standardud: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Lukning af filen fejlede: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Søgning fejlede under forsøg på at oprette en tynd fil: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Læsefejl: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Der opstod en fejl under søgning efter filen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Uventet filafslutning" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Skrivefejl: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Deaktiveret" + +#: src/xz/hardware.c +#, fuzzy +#| msgid "Total amount of physical memory (RAM): " +msgid "Amount of physical memory (RAM):" +msgstr "Samlet mængde fysisk hukommelse (RAM): " + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "" + +#: src/xz/hardware.c +#, fuzzy +#| msgid "Memory usage limit for decompression: " +msgid "Multi-threaded decompression:" +msgstr "Grænse for hukommelsesforbug til dekomprimering: " + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "" + +#: src/xz/hardware.c +#, fuzzy +#| msgid "Memory usage limit reached" +msgid "Memory usage limits:" +msgstr "Begrænsning på brug af hukommelse er nået" + +#: src/xz/list.c +msgid "Streams:" +msgstr "" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "" + +#: src/xz/list.c +#, fuzzy +#| msgid " Compressed size: %s\n" +msgid "Compressed size:" +msgstr " Komprimeret str.: %s\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Uncompressed size: %s\n" +msgid "Uncompressed size:" +msgstr " Ukomprimeret str.: %s\n" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "" + +#: src/xz/list.c +msgid "Check:" +msgstr "" + +#: src/xz/list.c +#, fuzzy +#| msgid " Stream padding: %s\n" +msgid "Stream Padding:" +msgstr " Strømfyld: %s\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Memory needed: %s MiB\n" +msgid "Memory needed:" +msgstr " Hukommelse krævet: %s MiB\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Sizes in headers: %s\n" +msgid "Sizes in headers:" +msgstr " Størrelser i teksthoveder: %s\n" + +#: src/xz/list.c +#, fuzzy +#| msgid " Number of files: %s\n" +msgid "Number of files:" +msgstr " Antal filer: %s\n" + +#: src/xz/list.c +msgid "Stream" +msgstr "" + +#: src/xz/list.c +msgid "Block" +msgstr "" + +#: src/xz/list.c +msgid "Blocks" +msgstr "" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "" + +#: src/xz/list.c +msgid "CompSize" +msgstr "" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "" + +#: src/xz/list.c +#, fuzzy +#| msgid "Totals:" +msgid "TotalSize" +msgstr "I alt:" + +#: src/xz/list.c +msgid "Ratio" +msgstr "" + +#: src/xz/list.c +msgid "Check" +msgstr "" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "" + +#: src/xz/list.c +msgid "Padding" +msgstr "" + +#: src/xz/list.c +msgid "Header" +msgstr "" + +#: src/xz/list.c +msgid "Flags" +msgstr "" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "" + +#: src/xz/list.c +msgid "Filters" +msgstr "" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Ingen" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Ukendt-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Ukendt-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Ukendt-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Ukendt-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Ukendt-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Ukendt-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Ukendt-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Ukendt-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Ukendt-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Ukendt-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Ukendt-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Ukendt-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Filen er tom" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: For lille til at være en gyldig .xz-fil" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "" + +#: src/xz/list.c +msgid "Yes" +msgstr "Ja" + +#: src/xz/list.c +msgid "No" +msgstr "Nej" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +msgstr " Minimum for XZ Utils-version: %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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s fil\n" +msgstr[1] "%s filer\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "I alt:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "" + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list understøtter ikke læsning fra standardind" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Der opstod en fejl under forsøg på læsning af filnavne: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Uventet afslutning på inddata under forsøg på læsning af filnavne" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Komprimering og dekomprimering med --robot er endnu ikke understøttet." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Intern fejl (fejl)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Kan ikke etbalere signalhåndteringer" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Ingen integritetkontrol; verificerer ikke filintegritet" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Begrænsning på brug af hukommelse er nået" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Filformatet blev ikke genkendt" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Tilvalg er ikke understøttede" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Komprimerede data er ødelagte" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Uventet afslutning på inddata" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB hukommelse er krævet. Begrænseren er deaktiveret." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB hukommelse er krævet. Begrænsningen er %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Filterkæde: %s\n" + +#: src/xz/message.c +#, fuzzy, c-format +#| msgid "Try `%s --help' for more information." +msgid "Try '%s --help' for more information." +msgstr "Prøv »%s --help« for yderligere information." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Obligatoriske argumenter til lange tilvalg er også obligatoriske for korte\n" +"tilvalg.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " Operationstilstand:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Memory usage limit for decompression: " +msgid "force compression" +msgstr "Grænse for hukommelsesforbug til dekomprimering: " + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Memory usage limit for decompression: " +msgid "force decompression" +msgstr "Grænse for hukommelsesforbug til dekomprimering: " + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +"Operationsændrere:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "Skrivning til standardud mislykkedes" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "compression mode" +msgstr " Operationstilstand:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +"Andre tilvalg:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr "" +" --robot brug beskeder der kan fortolkes maskinelt (nyttigt\n" +" for skripter)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version vis versionsnummer og afslut" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"Med ingen FIL, eller når FIL er -, læs standardind.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Rapporter fejl til <%s> (på engelsk eller finsk).\n" +"Rapporter oversættelsesfejl til .\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "%s hjemmeside: <%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "DETTE ER EN UDVIKLINGSVERSION - BRUG IKKE I PRODUKTION." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "The supported filters and their options are:" +msgstr "Filterkæde eller filterindstillinger er ikke understøttet" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be `name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: Tilvalg skal være »navne=værdi«-par adskilt med kommaer" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Ugyldigt tilvalgsnavn" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s: Ugyldigt tilvalgsværdi" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "LZMA1/LZMA2-forhåndskonfiguration er ikke understøttet: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Summen af lc og lp må ikke være højere end 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Filnavn har ukendt endelse, udelader" + +#: src/xz/suffix.c +#, fuzzy, c-format +#| msgid "%s: File already has `%s' suffix, skipping" +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Filen har allrede endelsen »%s«, udelader." + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Ugyldig filnavnendelse" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s: Værdi er ikke et positivt decimalheltal" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Ugyldig multiplikatorendelse" + +#: src/xz/util.c +#, 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 "Gyldige endelser er »KiB« (2^10), »MiB« (2^20) og »GiB« (2^30)." + +#: src/xz/util.c +#, fuzzy, c-format +#| msgid "Value of the option `%s' must be in the range [%, %]" +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Værdien for tilvalget »%s« skal være i intervallet [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Komprimerede data kan ikke læses fra en terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Komprimerede data kan ikke skrives til en terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "%s: Too small to be a valid .xz file" +msgid "File is too small to be a .lzma file" +msgstr "%s: For lille til at være en gyldig .xz-fil" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Skrivning til standardud mislykkedes" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Ukendt fejl" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Tilvalg er ikke understøttede" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Filterkæde eller filterindstillinger er ikke understøttet" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s: Ugyldigt tilvalgsnavn" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s: Ugyldig multiplikatorendelse" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s: Ukendt filformattype" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "LZMA1 kan ikke bruges med .xz-formatet" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "Maksimalt antal filtre er fire" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help vis den korte hjælpetekst (viser kun grundlæggende\n" +#~ " tilvalg)\n" +#~ " -H, --long-help vis den lange hjælpetekst og afslut" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help vis den korte hjælpetekst og afslut\n" +#~ " -H, --long-help vis den lange hjælpetekst (viser også de avancerede\n" +#~ " tilvalg)" + +#~ msgid "Sandbox is disabled due to incompatible command line arguments" +#~ msgstr "Sandkassen er deaktiveret på grund af inkompatible kommandolinjeargumenter" + +#~ msgid "Sandbox was successfully enabled" +#~ msgstr "Sandkassen blev aktiveret" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "Kunne ikke aktivere sandkassen" + +#~ msgid "Memory usage limit for compression: " +#~ msgstr "Grænse for hukommelsesforbrug til komprimering: " + +#, c-format +#~ msgid " Streams: %s\n" +#~ msgstr " Strømme: %s\n" + +#, c-format +#~ msgid " Blocks: %s\n" +#~ msgstr " Blokke: %s\n" + +#, c-format +#~ msgid " Ratio: %s\n" +#~ msgstr " Pakkeforhold: %s\n" + +#, c-format +#~ msgid " Check: %s\n" +#~ msgstr " Kontrol: %s\n" + +#~ msgid "" +#~ " Streams:\n" +#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" +#~ msgstr "" +#~ " Strømme:\n" +#~ " Strøm Blokke KompForsk. DekompForsk. KompStr. DekompStr. Forh. Kontrol Fyld" + +#, c-format +#~ msgid "" +#~ " Blocks:\n" +#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check" +#~ msgstr "" +#~ " Blokke:\n" +#~ " Strøm Blok KompForsk. DekompForsk. Ialtstr. DekompStr. Forh. Kontrol" + +#, c-format +#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" +#~ msgstr " KontrolVær %*sTeksth Flag Kompstr. HukForb. Filtre" + +#, c-format +#~ msgid "The selected match finder requires at least nice=%" +#~ msgstr "Den valgte matchfinder kræver mindst nice=%" diff --git a/cpp/third_party/xz-5.8.3/po/de.gmo b/cpp/third_party/xz-5.8.3/po/de.gmo new file mode 100644 index 0000000000000000000000000000000000000000..b1880f4e73982b1a4a8d7a7cccf928f851fce873 GIT binary patch literal 29882 zcmchf3w&Hxedli=FH9gI2_Xam*CC3e#G}Yg;v{mMM7GDauq_))w!sj{NOMOTG;>GH zow00{4Ua-0bPE(hfRZH(1SqA2Lcyijkj7$xLZRi^7T5$Rg#gQ=&;YxzOTWMWIrq*T zNp_OYhtJN(N5A_z=bp#^eg4xze+Bqd@cm#9_z(X4 z0q`lDKmPn6xD>n+yc~QUsOMe-J`Vh_zy2w373aSM^}dUrNF8tpycleNPXccPF9iP* z?1w-(W7dX5aoaVd;s{Z>xjq^+35cpkC<6lXm>d!O5OTb$|J^xOSM}p6Q zYrua4^`7(jqx)BZ=Yab`^*08u178MS0p0_y2Oj`W2CtygdfzqRW5EV^E_e&bas{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al 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/de.po b/cpp/third_party/xz-5.8.3/po/de.po new file mode 100644 index 0000000000..ab7d433b70 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/de.po @@ -0,0 +1,1267 @@ +# SPDX-License-Identifier: 0BSD +# +# German translation for xz. +# This file is published under the BSD Zero Clause License. +# André Noll , 2010. +# Anna Henningsen , 2015. +# Mario Blättermann , 2019, 2022-2025. +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-01-26 11:02+0100\n" +"Last-Translator: Mario Blättermann \n" +"Language-Team: German \n" +"Language: de\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=2; plural=(n != 1);\n" +"X-Generator: Lokalize 24.12.1\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Ungültiges Argument für --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Zu viele Argumente für --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "In --block-list fehlt die Blockgröße nach der Filterkettennummer »%c:«" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 kann nur das letzte Element in --block-list sein" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Unbekanntes Dateiformat" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Integritätsprüfungstyp nicht unterstützt" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Nur eine Datei kann als Argument für »--files« oder »--files0« angegeben werden." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Die Umgebungsvariable %s enthält zu viele Argumente" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Die Unterstützung für Kompression wurde zum Zeitpunkt der Erstellung deaktiviert" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Die Unterstützung für Dekompression wurde zum Zeitpunkt der Erstellung deaktiviert" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Kompression von lzip-Dateien (.lz) wird nicht unterstützt" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list wird ignoriert, außer wenn in das .xz-Format komprimiert wird" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Mit --format=raw ist --suffix=.SUF notwendig, falls nicht in die Standardausgabe geschrieben wird" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Maximal vier Filter möglich" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Fehler in der Option --filters%s=FILTER:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Die Speicherbedarfsbegrenzung ist für die gegebene Filter-Konfiguration zu niedrig." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "Filterkette %u wird von --block-list verwendet, wurde aber nicht mit --filters%u= angegeben" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Verwendung einer Voreinstellung im Roh-Modus wird nicht empfohlen." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Die genauen Optionen der Voreinstellung können zwischen Softwareversionen variieren." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Das .lzma-Format unterstützt nur den LZMA1-Filter" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 kann nicht mit dem .xz-Format verwendet werden" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Die Filterkette %u ist inkompatibel zu --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Wegen --flush-timeout wird auf den Einzelthread-Modus umgeschaltet" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Nicht unterstützte Optionen in Filterkette %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Bis zu % Threads werden benutzt." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Filterkette oder Filteroptionen werden nicht unterstützt" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Dekompression wird %s MiB Speicher brauchen." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Anzahl der Threads wurde von %s auf %s reduziert, um die Speicherbedarfsbegrenzung von %s MiB nicht zu übersteigen" + +#: src/xz/coder.c +#, 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 "Anzahl der Threads wurde von %s auf einen reduziert. Die automatische Begrenzung des Speicherverbrauchs auf %s MiB wird immer noch überschritten. %s MiB an Speicher sind erforderlich. Es wird dennoch fortgesetzt." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Es wurde in den Einzelthread-Modus gewechselt, um die Speicherbedarfsbegrenzung von %s MiB nicht zu übersteigen" + +#: src/xz/coder.c +#, 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 "Die LZMA%c-Wörterbuchgröße wurde von %s MiB auf %s MiB angepasst, um die Speicherbedarfsbegrenzung von %s MiB nicht zu übersteigen" + +#: src/xz/coder.c +#, c-format +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 "Die LZMA%c-Wörterbuchgröße für --filters%u wurde von %s MiB auf %s MiB angepasst, um die Speicherbedarfsbegrenzung von %s MiB nicht zu übersteigen" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Fehler beim Wechsel zur Filterkette %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Fehler beim Erzeugen der Pipeline: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() ist fehlgeschlagen: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Datei scheint verschoben worden zu sein, daher wird sie nicht gelöscht" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Löschen nicht möglich: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Dateieigentümer kann nicht gesetzt werden: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Dateigruppe kann nicht gesetzt werden: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Zugriffsrechte können nicht gesetzt werden: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Fehler beim Synchronisieren der Datei: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Fehler beim Synchronisieren des Verzeichnisses der Datei: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Dateistatus-Markierungen können nicht aus der Standardeingabe ermittelt werden: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Ist ein symbolischer Link, wird übersprungen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Ist ein Verzeichnis, wird übersprungen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Keine reguläre Datei, wird übersprungen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Datei hat das setuid- oder setgid-Bit gesetzt, wird übersprungen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Datei hat sticky-Bit gesetzt, wird übersprungen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Eingabedatei hat mehr als einen harten Link, wird übersprungen" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Leerer Dateiname, wird übersprungen" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Fehler beim Wiederherstellen der Status-Markierungen für die Standardeingabe: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Status-Markierungen der Standardausgabe können nicht ermittelt werden: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Fehler beim Öffnen des Verzeichnisses: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Ziel ist keine reguläre Datei" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Fehler beim Wiederherstellen der O_APPEND-Markierungen für die Standardausgabe: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Fehler beim Schließen der Datei: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Positionierungsfehler beim Versuch, eine Sparse-Datei (dünnbesetzte Datei) zu erzeugen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Lesefehler: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Fehler beim Durchsuchen der Datei: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Unerwartetes Ende der Datei" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Schreibfehler: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Deaktiviert" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Gesamtmenge physischer Speicher (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Anzahl der Prozessor-Threads:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Kompression:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Dekompression:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Multithread-Dekompression:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Vorgabe für -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Hardware-Information:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Speicherbedarfsbegrenzung:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Datenströme:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blöcke:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Größe komprimiert:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Größe unkomprimiert:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Verhältnis:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Prüfung:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Datenstromauffüllung:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Benötigter Speicher:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Größe in Köpfen:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Anzahl Dateien:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Datenstrom" + +#: src/xz/list.c +msgid "Block" +msgstr "Block" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blöcke" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "KompVers" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "UnkompVers" + +#: src/xz/list.c +msgid "CompSize" +msgstr "KompGröße" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "UnkompGröße" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "Gesamt" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Verhältnis" + +#: src/xz/list.c +msgid "Check" +msgstr "Prüfung" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "Prüfwert" + +#: src/xz/list.c +msgid "Padding" +msgstr "Auffüllung" + +#: src/xz/list.c +msgid "Header" +msgstr "Kopf" + +#: src/xz/list.c +msgid "Flags" +msgstr "Flags" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "SpeichVerb" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filter" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Keine" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Unbek.2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Unbek.3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Unbek.5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Unbek.6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Unbek.7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Unbek.8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Unbek.9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Unbek.11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Unbek.12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Unbek.13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Unbek.14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Unbek.15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Datei ist leer" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Zu klein, um eine gültige .xz-Datei zu sein" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr " Str. Blöcke Kompr. Unkompr. Verh. Check Dateiname" + +#: src/xz/list.c +msgid "Yes" +msgstr "Ja" + +#: src/xz/list.c +msgid "No" +msgstr "Nein" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Minimal erforderliche XZ Utils-Version:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s Datei\n" +msgstr[1] "%s Dateien\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Gesamt:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list funktioniert nur mit .xz-Dateien (--format=xz oder --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Versuchen Sie »lzmainfo« mit .lzma-Dateien." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list unterstützt kein Lesen aus der Standardeingabe" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Fehler beim Lesen der Dateinamen: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Unerwartetes Ende der Eingabe beim Lesen der Dateinamen" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Null-Zeichen beim Lesen der Dateinamen gefunden; meinten Sie »--files0« statt »--files«?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Kompression und Dekompression mit --robot wird noch nicht unterstützt." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Lesen der Daten aus der Standardeingabe ist nicht möglich, wenn die Dateinamen auch aus der Standardeingabe gelesen werden" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Interner Fehler (Bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Signalroutine kann nicht gesetzt werden" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Keine Integritätsprüfung; Integrität der Datei wird nicht überprüft" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Typ der Integritätsprüfung wird nicht unterstützt; Integrität der Datei wird nicht überprüft" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Speicherbedarfsbegrenzung erreicht" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Dateiformat nicht erkannt" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Optionen nicht unterstützt" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Komprimierte Daten sind beschädigt" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Unerwartetes Ende der Eingabe" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB Speicher wird benötigt. Die Begrenzung ist deaktiviert." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB Speicher wird benötigt. Die Begrenzung ist %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Filterkette: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Versuchen Sie »%s --help« für mehr Informationen." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Fehler bei der Ausgabe des Hilfetextes (Fehlercode %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Aufruf: %s [OPTION] … [DATEI] …\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Komprimiert oder dekomprimiert .xz-DATEI(EN)." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Obligatorische Argumente für lange Optionen sind auch für kurze Optionen\n" +"zwingend." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Aktionsmodus:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "Kompression erzwingen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "Dekompression erzwingen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "Integrität der komprimierten Datei überprüfen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "Informationen zu .xz-Dateien auflisten" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Aktionsmodifikatoren:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "Eingabedateien beibehalten (nicht löschen)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "Überschreiben der Ausgabedatei erzwingen und Links (de)komprimieren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "In die Standardausgabe schreiben und die Eingabedateien nicht löschen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "Ausgabedatei nicht auf dem Speichergerät synchronisieren, bevor die Eingabedatei gelöscht wird" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "Nur den ersten Datenstrom dekomprimieren und stillschweigend mögliche weitere Eingabedaten ignorieren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "Beim Dekomprimieren keine Sparse-Dateien erzeugen" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".END" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "».END« als Endung für komprimierte Dateien benutzen" + +#: src/xz/message.c +msgid "FILE" +msgstr "DATEI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "Zu verarbeitende Dateinamen aus DATEI lesen; falls keine DATEI angegeben wurde, werden Dateinamen aus der Standardeingabe gelesen. Dateinamen müssen durch einen Zeilenumbruch voneinander getrennt werden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "Wie --files, aber das Null-Zeichen wird als Trenner benutzt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Grundlegende Optionen für Dateiformat und Kompression:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMAT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "Dateiformat zur Kodierung oder Dekodierung; mögliche Werte sind »auto« (Voreinstellung), »xz«, »lzma«, »lzip« und »raw«" + +#: src/xz/message.c +msgid "NAME" +msgstr "NAME" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "Typ der Integritätsprüfung: »none« (Vorsicht!), »crc32«, »crc64« (Voreinstellung) oder »sha256«" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "Integritätsprüfung beim Dekomprimieren nicht ausführen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "Kompressionseinstellung; Voreinstellung ist 6. Beachten Sie den Speicherbedarf des Kompressors *und* des Dekompressors, wenn Sie 7-9 benutzen!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "Versuchen, durch stärkere CPU-Auslastung das Kompressionsverhältnis zu verbessern. Dies beeinflusst nicht den Speicherbedarf des Dekompressors." + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "ANZAHL" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "Höchstens die angegebene ANZAHL Threads erzeugen; die Voreinstellung ist 0, wobei so viele Threads erzeugt werden, wie Prozessorkerne vorhanden sind" + +#: src/xz/message.c +msgid "SIZE" +msgstr "GRÖẞE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "Einen neuen .xz-Block nach der angegebenen GRÖẞE der Eingabe in Bytes beginnen; benutzen Sie diese Option, um die Blockgröße für die Kompression mit mehreren Threads zu setzen" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLÖCKE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "Einen neuen .xz-Block gemäß der angegebenen, durch Kommata getrennten Intervalle an unkomprimierten Daten beginnen; optional kann eine Filterkettennummer (0-9) angegeben werden, gefolgt von einem »:« und der unkomprimierten Datengröße" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "Wenn beim Komprimieren mehr als die angegebene ANZAHL an Millisekunden seit der letzten Leerungsaktion vergangen ist und das Lesen von zusätzlichen Eingabedaten den Prozess blockieren würde, dann werden alle noch ausstehenden Daten geschrieben" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "BEGRENZUNG" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "Speicherbedarfsbegrenzung für Kompression, Dekompression oder beides setzen; die BEGRENZUNG wird in Bytes oder als Prozentsatz RAM angegeben. Geben Sie 0 an, um die Grundeinstellungen zu verwenden." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "Wenn die Kompressionseinstellungen die Speicherbedarfsbegrenzung übersteigen, wird ein Fehler ausgegeben, statt die Einstellungen nach unten anzupassen." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Benutzerdefinierte Filterkette für Kompression (alternativ zur Verwendung von Voreinstellungen):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTER" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "Die Filterkette anhand der Liblzma-Filterkettensyntax setzen; mit --filters-help erhalten Sie weitere Informationen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "Zusätzliche Filter anhand der Liblzma-Filterkettensyntax setzen, die mit --block-list verwendet werden sollen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "Weitere Informationen über die Liblzma-Filterkettensyntax anzeigen und beenden." + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPTIONEN" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 oder LZMA2; OPTIONEN ist eine durch Kommata getrennte Liste bestehend aus den folgenden Optionen (zulässige Werte; Voreinstellung):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "ZAHL" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "Optionen auf Voreinstellungsstufe zurücksetzen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "Wörterbuchgröße" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "Anzahl der Literal-Kontext-Bits" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "Anzahl der Literal-Positions-Bits" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "Anzahl der Positions-Bits" + +#: src/xz/message.c +msgid "MODE" +msgstr "MODUS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "Kompressionsmodus" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "Nice-Länge eines Treffers" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "Algorithmus zum Auffinden von Übereinstimmungen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "Maximale Suchtiefe; 0=automatisch (Voreinstellung)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ-Filter (32-bit und 64-bit)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM-BCJ-Filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb-BCJ-Filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64-BCJ-Filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC-BCJ-Filter (nur Big Endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA64-(Itanium-)BCJ-Filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC-BCJ-Filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V-BCJ-Filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Zulässige Optionen für alle BCJ-Filter:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "Startversatz für Konversion (Voreinstellung=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Delta-Filter; zulässige Optionen (gültige Werte; Voreinstellung):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "Abstand zwischen den Bytes, die voneinander subtrahiert werden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Andere Optionen:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "Warnungen unterdrücken; wird diese Option zweimal angegeben, werden auch Fehlermeldungen unterdrückt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "Ausführlicher Modus; wird diese Option zweimal angegeben, erfolgen noch ausführlichere Ausgaben" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "Warnungen verändern nicht den Exit-Status" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "Maschinenlesbare Meldungen ausgeben (nützlich für Skripte)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "Gesamtspeicher (RAM) sowie die gegenwärtig aktive Speicherbedarfsbegrenzung anzeigen und das Programm beenden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "Kurze Hilfe anzeigen (zeigt nur die grundlegenden Optionen)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "Diese lange Hilfe anzeigen und das Programm beenden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "Diese kurze Hilfe anzeigen und das Programm beenden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "Die lange Hilfe (und damit auch fortgeschrittene Optionen) anzeigen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "Versionsnummer anzeigen und beenden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Wenn DATEI nicht angegeben wurde oder DATEI gleich - ist, dann wird aus der Standardeingabe gelesen." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Melden Sie Fehler an <%s> (auf Englisch oder Finnisch)." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s-Homepage: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "DIES IST EINE NICHT FÜR DEN PRODUKTIVBETRIEB GEEIGNETE ENTWICKLERVERSION." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Filterketten werden durch Setzen der Optionen --filters=FILTER oder --filters1=FILTER … --filters9=FILTER definiert. Die Filter können innerhalb der Kette durch Leerzeichen oder »--« getrennt werden. Alternativ kann eine Voreinstellung %s anstelle einer Filterkette verwendet werden." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Folgende Filterkettem und Filteroptionen werden unterstützt:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Optionen müssen in der Form »Name=Wert« gegeben werden, getrennt durch Kommata" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Ungültiger Optionsname" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Ungültiger Optionswert" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "LZMA1/LZMA2-Voreinstellung wird nicht unterstützt: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Die Summe aus lc und lp darf höchstens 4 sein" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Dateiname hat unbekanntes Suffix, wird übersprungen" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Datei hat bereits das Suffix »%s«, wird übersprungen" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Ungültige Dateiendung" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Wert ist keine nicht-negative dezimale Ganzzahl" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Ungültige Einheit" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Gültige Einheiten sind »KiB« (2^10), »MiB« (2^20) und »GiB« (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Wert der Option »%s« muss im Bereich [%, %] sein" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Komprimierte Daten können nicht vom Terminal gelesen werden" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Komprimierte Daten können nicht auf das Terminal geschrieben werden" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Aufruf: %s [--help] [--version] [DATEI] …\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Im .lzma-Dateikopf gespeicherte Informationen anzeigen." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Die Datei ist zu klein, um eine .lzma-Datei zu sein" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Keine .lzma-Datei" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Schreiben in die Standardausgabe fehlgeschlagen" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Unbekannter Fehler" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Voreinstellung wird nicht unterstützt" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Nicht unterstützter Schalter in der Voreinstellung" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Unbekannter Optionsname" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Optionswert darf nicht leer sein" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Wert ist außerhalb des zulässigen Bereichs" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Diese Option unterstützt keine Einheiten-Endungen" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Ungültige Einheit (KiB, MiB oder GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Unbekannter Filtername" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Dieser Filter kann nicht im .xz-Format verwendet werden" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Speicherzuweisung ist fehlgeschlagen" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Leere Zeichenkette ist nicht erlaubt; versuchen Sie »6«, wenn der Vorgabewert erwünscht ist" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Maximal vier Filter sind möglich" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Filtername fehlt" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Unzulässige Filterkette (»lzma2« fehlt am Ende?)" diff --git a/cpp/third_party/xz-5.8.3/po/en@boldquot.header b/cpp/third_party/xz-5.8.3/po/en@boldquot.header new file mode 100644 index 0000000000..ac96ad9f36 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/en@boldquot.header @@ -0,0 +1,35 @@ +%% A header that gets inserted into message catalogs named en@boldquot.po. +%% +%% Copyright (C) 2001 Free Software Foundation, Inc. +%% This file is free software; the Free Software Foundation +%% gives unlimited permission to copy and/or distribute it, +%% with or without modifications, as long as this notice is preserved. +%% This file is offered as-is, without any warranty. +%% +%% Written by Bruno Haible , 2001. +%% +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# diff --git a/cpp/third_party/xz-5.8.3/po/en@quot.header b/cpp/third_party/xz-5.8.3/po/en@quot.header new file mode 100644 index 0000000000..287e2e735b --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/en@quot.header @@ -0,0 +1,32 @@ +%% A header that gets inserted into message catalogs named en@quot.po. +%% +%% Copyright (C) 2001 Free Software Foundation, Inc. +%% This file is free software; the Free Software Foundation +%% gives unlimited permission to copy and/or distribute it, +%% with or without modifications, as long as this notice is preserved. +%% This file is offered as-is, without any warranty. +%% +%% Written by Bruno Haible , 2001. +%% +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# diff --git a/cpp/third_party/xz-5.8.3/po/eo.gmo b/cpp/third_party/xz-5.8.3/po/eo.gmo new file mode 100644 index 0000000000000000000000000000000000000000..7839b5360b2dd9819c8174168223f7adb22042cc GIT binary patch literal 15060 zcmb`NdyHIHeaCMS6Nn*%1d{Lwa0r;SgJ-f{KjN(8;I+MuH}>ut@2&%ZB;1|3J9~HT z+&j#jYkN(2ly{l}0SW<{s8WgqRg0)vQC_NAB&Ud{N@+oD5$Xd`5aORAL{U-O&-a{j z=ds>6He$4AzV~q+zw>*a-|P>r+3?{@f*|-fZIl)~B?!I){M{8na4C4hl@7OpJ81em z0#?CC!Cl}tz-z$Eo*4ui!0W)v!54tnf;WOM0e5@68yw;Oe(=TMCp?}7U&Q?n!JEL# zt_p&i!78{3ycfJ0e20Jj5pXN_e+z1zpMyKVE1neuF9UA}UjWv?7lLmAuLmCmZva0F z8u0Hu{v2H9{y8k7{k#br2Ok1o4t^cfy#ED0AH1GUW8fI5`65v7-v&M#{3Iy4z69O| zejD5lK9iSw!Tq54_g1hAeh#dITc6|T`T&SHfiuKj z4)80W_Wx^8``y5#kQ!_RwQmC+0!Kht5~Sc}@a>@V?@vL|_bpI#e-FGB{1K@23||_z z2b8`X17!m#sC~Zy+yFiXYQLZK_<2zB|0<|`{RkADFGcx8=PN+bw+*}-+zmbkeh5UB zf?W*O`@Kha*<;7!{T|=t@geX=#(f-={r?q+Nd!LzwVz*u($AL~_dWte-$UR&@KfM8_!Ch4 zdKp5W1n&X)3;u|&%fQFM!{ArJ&t1Y^S@bsUzxGn6KTk#JP_bYJ+yFK}$tMA|UJi=B z2R;5JDE<65a0I*#<}y`qJIJG85!?>G8B1WGPH2c^G;&AkHL1!|r}Q0qJl?g2jo zYTloMupoFgH^S|p=$r!$n1DPAAE5O63YhaW@NV!5um-AM%Reu`joiN(l)rcYl)V22)V_ZOiryR8 z+&=JTQ2T9zJHdxR&HGJI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rNsW+-cLy=!pT8DoA}go#0=(~s>&aa zT8jlDq+Ef9)}X0(WnB&j0-HO)Oe-@5br|Yam!gmrl+pPDQUX7spISI)c7bcKPkVA^ z6Sh)6m~@od;7IB(Kn=@B5ziSVEEr04O+M4}#a<74Dpxgg5mTgj%r97!$5|X76H+L> z!{$*aZi-*Q(vZfXq{!@7g`gzHx<~%aimlu?(RE{d2$XuxL}e7?#<8FGF76xWO5lAK zJpPFMIkt*7hZSBUI}!X>kG&CH}ZFnM%he!?81Zcq1x`H4Fw%);Fh2WP8tc+LZsezVN)`Bf$30EMEJ zE+KUld<|(ubt)saVsHQLB1+v+9jjLYR{qnJGBA4Eloum$=5A9RrVV>RRmUKu)S5B2 zHc4Xc9Gd)4g4@VQGMI^?y>o{(o2pQ?uXFSz8Fwdj>PPmxyhDA=*MjVko{aVj4}Go+C?~ zmX{GG+j;;OMsq`a&sQ3+L zDEtJ44i0j1?tHw?F9B{-J>Tt*^Y-ilC;KOK4naDh+nT{TFBIm>3T1F-, 2019, 2023–2024. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.6.0-pre2\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2024-02-24 00:16-0500\n" +"Last-Translator: Keith Bowes \n" +"Language-Team: Esperanto \n" +"Language: eo\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=2; plural=(n != 1);\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Nevalida parametro por --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Tro da argumentoj por --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "En --block-list, la blokgrando mankas post numero de la filtrila ĉeno '%c:'" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 povas nur esti uzata kiel la lasta elemento en --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Nekonata dosierformata tipo" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Nekomprenata tipo de integra kontrolo" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Nur unu dosiero estas specifebla per '--files' aŭ '--files0'." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "La medivariablo %s enhavas troajn argumentojn" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Rego de kunpremado estas malaktivigita dum muntotempo" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Rego de malkunpremado estas malaktivigita dum muntotempo" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Ne povas kunpremi lzip-dosierojn (.lz)" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list estas ignorata se ne kunpremas al la formato .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Kun --format=raw, --suffix=.SUF estas postulata se ne skribi al la ĉefeligujo" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Maksimuma nombra da filtriloj estas kvar" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Erora en la --filters%s=FILTRILOJ elekto:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Memoruzada limigo estas tro malgranda por la donita filtrila elekto." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "filtrila ĉeno %u uzata de --block-list sed ne specifita per --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Uzi aprioraĵon en kruda reĝimo estas malkonsilinda." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "La ĝustaj elektoj de la aprioraĵoj povas varii inter programoj eldonoj." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "La .lzma-formato komprenas sole la filtrilon LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA ne estas uzebla por la .xz-formato" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "La filtrila ĉeno %u estas nekongrua kun --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Ŝanĝas al unufadena reĝimo pro --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Nekomprenataj elektoj en filtrila ĉeno %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Uzas ĝis % fadenoj" + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Nekomprenata filtrila ĉeno aŭ filtrilaj elektoj" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Malkunpremado postulos %s megabajtojn da memoro." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Malpliigis la nombron da fadenoj de %s ĝis %s por ne superi la memoruzadan limigo de %s megabajtoj" + +#: src/xz/coder.c +#, 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 "Malpliigis la nombron da fadenoj de %s ĝis unu. La aŭtomata memoruzada limigo de %s megabajtoj ankoraŭ estas superata. %s megabajtoj da memoro estas postulata. Senkonsidere daŭrigas." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Ŝanĝas al unufadena reĝimo por ne superi la memoruzadan limigon de %s megabajtoj" + +#: src/xz/coder.c +#, 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 "Alĝŭstigis vortara grando de LZMA%c de %s megabajtoj ĝis %s megabajtoj por ne superi la memoruzadan limigon de %s megabajtoj" + +#: src/xz/coder.c +#, c-format +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 "Alĝustigis vortara grando de LZMA%c por --filters%u de %s megabajtoj ĝis %s megabajtoj por ne superi la memoruzadan limigon de %s megabajtoj" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Eraro dum ŝanĝiĝo al filtrila ĉeno %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Eraro dum krei dukton: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() malsukcesis: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Dosiero ŝajne estis movita, ne forigos" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Ne eblas forigi: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Ne eblas agordi la dosieran estron: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Ne eblas agordi la dosieran grupon: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Ne eblas agordi la dosierajn atingopermesojn: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Fermo de la dosiero malsukcesis: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Fermo de la dosiero malsukcesis: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Eraro dum atingi la dosierstatajn flagojn de ĉefenigujon: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Estas simbola ligilo, preterpasas" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Estas dosierujo, preterpasas" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Ne regula dosiero, preterpasas" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Dosiero havas setuid- aŭ setgid-biton, preterpasas" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Dosiero havas glueman biton, preterpasas" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Enmeta dosiero havas pli ol rektan ligilon, preterpasas" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Malplena dosiero, preterpasas" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Eraro dum restarigi la statajn flagojn de la ĉefenigujo: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Eraro dum atingi la dosierstatajn flagojn el la ĉefenigujo: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Fermo de la dosiero malsukcesis: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s: Ne regula dosiero, preterpasas" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Eraro dum restarigi la flagon O_APPEND de la ĉefenigujo: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Fermo de la dosiero malsukcesis: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Serĉado malsukcesis dum provi krei maldensan dosieron: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Legeraro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Eraro dum serĉi la dosieron: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Neatendita dosierfino" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Skriberaro: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Malaktiva" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Kiomo da efektiva memoro (ĉefmemoro)" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Nombro da procesoraj fadenoj:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Kunpremo:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Malkunmpreno:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Plurfadena malkunpremado:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Aprioraĵo por -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Aparataro-informoj:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Memoruzada limigoj:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Fluoj:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blokoj:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Kunpremita grando:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Nekunpremita grando:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Proporcio:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Kontrolo:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Fluo-remburo:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Memoro postulata:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Grandoj en ĉapoj:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Nombro da dosieroj:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Fluo" + +#: src/xz/list.c +msgid "Block" +msgstr "Bloko" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blokoj" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "KunpMsam" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "MKunMSam" + +#: src/xz/list.c +msgid "CompSize" +msgstr "Kunpgrando" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "Mkunpgrando" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "KiomGrando" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Proporcio" + +#: src/xz/list.c +msgid "Check" +msgstr "Kontrolo" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "KontVal" + +#: src/xz/list.c +msgid "Padding" +msgstr "Remburo" + +#: src/xz/list.c +msgid "Header" +msgstr "Ĉapo" + +#: src/xz/list.c +msgid "Flags" +msgstr "Flago" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "Memuzado" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtriloj" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Nenio" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Nekonata-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Nekonata-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Nekonata-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Nekonata-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Nekonata-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Nekonata-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Nekonata-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Nekonata-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Nekonata-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Nekonata-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Nekonata-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Nekonata-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Dosiero malplenas" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Tro malgranda por esti valida .xz-dosiero" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Fluoj Blokoj Kunpremita Nekunpremita Propor Kontrol Dosiernomo" + +#: src/xz/list.c +msgid "Yes" +msgstr "Jes" + +#: src/xz/list.c +msgid "No" +msgstr "Ne" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +msgstr " Minimuma eldono 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s dosiero\n" +msgstr[1] "%s dosieroj\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Sumoj:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list funkcias nur por .xz-dosierojn (--format=xz aŭ --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Provi la programon 'lzmainfo' por .lzma-dosieroj." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list ne regas legadon el la ĉefenigujo" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Eraro dum legi dosiernomojn: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Neatendita fino de enigo dum legi dosiernomojn" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Nula signo trovita dum legi dosiernomojn; eble vi celis uzi la parametron '--files0' anstataŭ '--files'" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Kunpremo kaj malkunmpremo per --robot ankoraŭ ne estas regataj." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Ne eblas legi datumojn el la ĉefenigujo dum legi dosiernomojn el la ĉefenigujo" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Interna programeraro" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Ne eblas establi signalajn traktilojn" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Neniu integra kontrolo; ne certigos dosieran integron" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Nekomprenata tipo de integra kontrolo; ne certigos dosieran integron" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Memoruzada limigo atingita" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Dosierformato ne rekonata" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Nekomprenataj elektoj" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Kunpremitaj datumoj estas koruptaj" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Neatendita fino de enigo" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s megabajtoj da memoro estas postulataj. La limigilo estas malaktiva." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s megabajtoj da memoro estas postulata. La limigo estas %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Filtrila ĉeno: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "'%s --help' por pliaj informaj." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"Uzmaniero: %s [ELEKTO].. [DOSIERO]...\n" +"Kunpremi aŭ malkunpremi DOSIEROjN laŭ la .xz-formato.\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Devigitaj parametroj por longaj elektoj estas ankaŭ devigitaj por\n" +"mallongaj elektoj.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " Operacia reĝimo:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force compression" +msgstr "Malkunmpreno:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force decompression" +msgstr "Malkunmpreno:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +" Operacia modifiloj:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "Skribi al la ĉefeligujo malsukcesis" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --single-stream decompress only the first stream, and silently\n" +#| " ignore possible remaining input data" +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" +" --single-stream\n" +" malkunpremi nur la unuan fluon kaj silente\n" +" ignori eventualajn ceterajn enigajn datumojn" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +" Bazaj dosierformataj kaj kunpremaj elektoj:\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --ignore-check don't verify the integrity check when decompressing" +msgid "don't verify the integrity check when decompressing" +msgstr " --ignore-check ne certigi la integran kontrolon dum malkunpremo" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 ... -9 kunpremnivelo; apriore 6; pripensu memoruzadon antaŭ ol\n" +" uzi la nivelojn 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme provi plibonigi kunpreman proporcion per uzado de\n" +" ĉefprocesoran tempon; ne influas la memorajn postulojn\n" +" de malkunpremo" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n" +#| " as many threads as there are processor cores" +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +" -T, --threads=NOMBRO\n" +" uzi maksimume NOMBRO da fadenoj; apriore 0, kiu\n" +" uzas fadenojn samnombrajn kiel procesorajn kernojn" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-size=SIZE\n" +#| " start a new .xz block after every SIZE bytes of input;\n" +#| " use this to set the block size for threaded compression" +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" +" --block-size=GRANDO\n" +" komenci novan .xz-blokon post ĉiu GRANDO bajtoj da enigo;\n" +" uzi por agordi la blokan grandon por kunfadena kunpremo" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-list=BLOCKS\n" +#| " start a new .xz block after the given comma-separated\n" +#| " intervals of uncompressed data; optionally, specify a\n" +#| " filter chain number (0-9) followed by a ':' before the\n" +#| " uncompressed data size" +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" +" --block-list=BLOKOJ\n" +" komenci novan .xz-blokon post la donitajn intertempojn de\n" +" nekunpremitaj datumoj, apartigataj de komoj. Laŭvole\n" +" specifi numero (0-9) de filtrila ĉeno kaj poste ':' antaŭ\n" +" la malkunpremita datuma grando" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --flush-timeout=TIMEOUT\n" +#| " when compressing, if more than TIMEOUT milliseconds has\n" +#| " passed since the previous flush and reading more input\n" +#| " would block, all pending data is flushed out" +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" +" --flush-timeout=TEMPOLIMO\n" +" dum kunpremo se pli ol TEMPOLIMO milisekundoj\n" +" okazis post la antaŭan elbufrigo kaj legi pliajn enigojn\n" +" paŭzigus, ĉiuj atendataj datumoj estas elbufrigataj" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" +" --no-adjust se kunprema agordo superas la memoruzadan limigon\n" +" montri eraron anstataŭ malgrandigi la agordaĵon" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +" Propra filtrila ĉeno por kunpremo (alternativaj por uzi antaŭagordaĵon):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " --filters=FILTERS set the filter chain using the liblzma filter string\n" +#| " syntax; use --filters-help for more information" +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" +"\n" +" --filters=FILTRILOJ agordi la filtrilan ĉenan uzanta la sintakso de la\n" +" lzma-filtrila ĉeno. --filters-help or pliaj informoj" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters1=FILTERS ... --filters9=FILTERS\n" +#| " set additional filter chains using the liblzma filter\n" +#| " string syntax to use with --block-list" +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" +" --filters=FILTRILOJ ... --filters9=FILTRILOJ\n" +" agordi aldonajn filtrilajn ĉenojn por uzi kun\n" +" --block-list per la sintakso de liblzma-filtrila ĉeno" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters-help display more information about the liblzma filter string\n" +#| " syntax and exit." +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" +" --filters-help montri pliajn informojn pri la sintakso de la\n" +" liblzma-filtrila ĉeno kaj poste eliri." + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Number of processor threads:" +msgid "number of position bits" +msgstr "Nombro da procesoraj fadenoj:" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "compression mode" +msgstr "Malkunmpreno:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" Aliaj elektoj:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr " -Q, --no-warn avertoj ne influu la eliran staton" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr " --robot uzi mesaĝojn facile analizeblaj per skriptoj" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" +" --info-memory montri la totalan kiomon de la ĉefmemoro kaj la nune\n" +" aktivaj memoruzadaj limigoj, kaj finiĝi" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version montri la eldonan numeron kaj finiĝi" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"Kun neniu DOSIERO aŭ kiam DOSIERO estas -, legi el la ĉefenigujo.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Raporti programerarojn al <%s> (en la angla aŭ la suoma).\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "%s ĉefpaĝo: <%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ĈI TIU ESTAS DISVOLVA REDAKCIO, NE CELATA POR ĈIUTAGA UZADO." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy, c-format +#| 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" +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" +"Filtrilaj ĉenoj estas agorditaj per la elektoj --filters=FIILTRILOJ aŭ\n" +"--filters1=FILTRILOJ ... --filters9=FILTRILOJ. Ĉiu filtrilo en la ĉeno\n" +"estas apartigebla per spacetoj aŭ '--'. Alternative antaŭargordo <0-9>[e]\n" +"anstataŭ filtrila ĉeno estas specifebla.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "La komprenataj filtriloj aŭ filtrilaj elektoj estas:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be 'name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: Elektoj devas esti paroj de 'name=value', apartigitaj per komoj" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Nevalida elekto-nomo" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s: Nevalida elekto-valoro" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Nevalida LZMA1/LZMA2 antaŭagordaĵo: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "La sumo de lc kaj lp devas ne esti pli ol 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Dosiernomo havas nekonatan sufikson, preterpasas" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Dosiero jam havas la sufikson '%s', preterpasas" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Nevalida dosiernoma sufikso" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s: Valoro ne estas nenegativa dekuma entjero" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Nevalida multiplika sufikso" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Validaj sufiksoj estas 'KiB' (2^10), 'MiB' (2^20) kaj 'GiB' (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Valoro de la elekto '%s' devas esti inkluzive inter % kaj %" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Kunpremitaj datumoj ne povas esti ligataj de terminalo" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Kunpremitaj datumoj ne povas esti skribataj al terminalo" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" +"Uzmaniero: %s [--help] [--version] [DOSIERO]...\n" +"Montri informojn konservitaj en la .lzma-dosiera ĉapo" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Show information stored in the .lzma file header." +msgstr "" +"Uzmaniero: %s [--help] [--version] [DOSIERO]...\n" +"Montri informojn konservitaj en la .lzma-dosiera ĉapo" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Dosiero malgrandas por esti .lzma-dosiero" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Ne .lzma-dosiero" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Skribi al la ĉefeligujo malsukcesis" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Nekonata eraro" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Nekomprenataj elektoj" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Nekomprenata filtrila ĉeno aŭ filtrilaj elektoj" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s: Nevalida elekto-nomo" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s: Nevalida multiplika sufikso" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s: Nekonata dosierformata tipo" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "LZMA ne estas uzebla por la .xz-formato" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "Maksimuma nombra da filtriloj estas kvar" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress eldevigi kunpremon\n" +#~ " -d, --decompress eldevigi malkunpremon\n" +#~ " -t, --test certigi la integron de kunpremitan dosieron\n" +#~ " -l, --list listigi informojn pri .xz-dosierojn" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep ne forigi enigajn dosierojn\n" +#~ " -f, --force eldevigi anstataŭigi eligajn dosierojn kaj\n" +#~ " (mal)kunpmremajn ligilojn \n" +#~ " -c, --stdout skribi al la ĉefeligujo kaj ne forigi enigajn dosierojn" + +#~ 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" +#~ msgstr "" +#~ " --no-sparse ne krei maldensajn dosierojn dum malkunpremiĝo\n" +#~ " -S, --suffix=.SUF uzi la sufikson '.SUF' ĉe kunpremataj dosieroj\n" +#~ " --files[=DOSIERO]\n" +#~ " legi dosiernomojn traktotajn el DOSIERO; se DOSIERO estas\n" +#~ " forlasita, dosiernomoj estas legataj el la ĉefenigujo;\n" +#~ " dosiernomojn devas finigi novlinia signo\n" +#~ " --files0[=DOSIERO]\n" +#~ " kiel --files sed uzi la nulan signon por finigi" + +#~ 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'" +#~ msgstr "" +#~ "h -F, --format=FMT dosierformato kodota aŭ malkodata; validaj valoroj estas\n" +#~ " 'auto' (apriora), 'xz', 'lzma', 'lzip' kaj 'raw'\n" +#~ " -C, --check=KONT tipo de integra kontrolo: 'none' (estu atentema),\n" +#~ " 'crc32', 'crc64' (apriora) aŭ 'sha256'" + +#, no-c-format +#~ msgid "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ msgstr "" +#~ " --memlimit-compress=LIMIGO\n" +#~ " --memlimit-decompress=LIMIGO\n" +#~ " --memlimit-mt-decompress=LIMIGO\n" +#~ " -M, --memlimit=LIMO\n" +#~ " agordi memoruzadon por kunpremo, malkunpremo,\n" +#~ " kunfadena kunpmero aŭ ĉiuj el tiuj; LIMIGO estas\n" +#~ " laŭ bajtoj, % da ĉefmemoro, aŭ 0 por aprioraĵoj" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ " --lzma1[=ELEKTOJ] LZMA1 aŭ LZMA2; OPTS estas listo de nul aŭ pliaj\n" +#~ " --lzma2[=ELEKTOJ] de la jenaj elektoj (validaj valoroj; apriora),\n" +#~ " apartigataj de komoj:\n" +#~ " preset=ANT restarigi agordon al antaŭagordaĵon (0-9[e])\n" +#~ " dict=NOM vortara grando (4 kilobajtoj - 1536\n" +#~ " megabajtoj; 8 megabajtoj)\n" +#~ " lc=NOM nombro da laŭvortaj kuntekstaj bitoj\n" +#~ " (0-4; 3)\n" +#~ " lp=NOM nombro da laŭvortaj poziciaj bitoj (0-4; 0)\n" +#~ " pb=NOM nombro da poziciaj bitoj (0-4; 2)\n" +#~ " mode=REĜI kunprema reĝimo (fast, normal; normal)\n" +#~ " nice=NOM bona longo de kongruaĵo (2-273; 64)\n" +#~ " mf=NOMO kongruaĵa trovilo (hc3, hc4, bt2, bt3, bt4;\n" +#~ " bt4)\n" +#~ " depth=NUM maksimuma profundo de serĉo; 0=aŭtomata\n" +#~ " (apriore)" + +#~ 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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ msgstr "" +#~ "\n" +#~ " --x86[=ELEKTOJ] x86-BCJ-filtrilo (32-bita kaj 64-bita)\n" +#~ " --arm[=ELEKTOJ] ARM-BCJ-filtrilo\n" +#~ " --armthumb[=ELEKTOJ]\n" +#~ " ARM-Thumb-BCJ-filtrilo\n" +#~ " --arm64[=OPTS] ARM64-BCJ-filtrilo\n" +#~ " --powerpc[=ELEKTOJ] PowerPC-BCJ-filtrilo (nur pezkomenca)\n" +#~ " --ia64[=ELEKTOJ] IA-64 (Itanium)-BCJ-filtrilo\n" +#~ " --sparc[=ELEKTOJ] SPARC-BCJ-filtrilo\n" +#~ " --riscv[=ELEKTOJ] RISC-V_BCJ-filtrilo\n" +#~ " Validaj ELEKTOJ por ĉiuj BCJ-filters:\n" +#~ " start=NOMBRO komenca deŝovo por konvertoj (apriore 0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=ELEKTOJ] Delta filtriloj; validaj valoroj:\n" +#~ " dist=NOMBRO distanco inter bajtoj subtrahataj de unu\n" +#~ " la alia (1-256; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet silentigi avertojn; uzu dufoje por ankaŭ silentigi erarojn\n" +#~ " -v, --verbose eligi superfluajn informojn; uzu dufoje por pliigi la\n" +#~ " superfluecon" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help montri la mallongan helpon (listigas nur la bazajn\n" +#~ " elektojn)\n" +#~ " -H, --long-help montri la longan helpon kaj finiĝi" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help montri ĉi tiun mallongan helpon kaj finiĝi\n" +#~ " -H, --long-help montri la longan helpon (listigas ankaŭ la altnivelajn\n" +#~ " elektojn)" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "Malsukcesis aktivigi la sablujon" diff --git a/cpp/third_party/xz-5.8.3/po/es.gmo b/cpp/third_party/xz-5.8.3/po/es.gmo new file mode 100644 index 0000000000000000000000000000000000000000..abc29a1e5981a0eb6fb800342a0bfa8ad1dbfa84 GIT binary patch literal 29244 zcmb`P34C2wedli=8)iuekcF_^ggBBDOL&VD%Q3Mc%dvtb8B2CTLI_vyT}jt|i}LP! zwq@F|q?7@Mr4XPjGfW^rU>ddn11SvyqV2SWLZAbrFeznUhGojIOk2u)fB$pt@}6WT zY5P7t`rYO1=f9o*`Cs3E#)+>#Aqaw#`Lhmu-l;(las8UpgWzG@KmJUI7l3O?`rQf+ zg0BZRgP#G<0RPG3W6lbK6S+SRJQ=(Yd;&NCo(GP2jKMzcUkW}Id_TAv{Jg*a1^5*1 zpKx{%Tm)_cpAOy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e0jn~mORJ`4iykkbU@wgqwAc9f@2Axv3%n*(!Wdx`=B_;82ww6Fai=9ll(_RA#eXq7*_n^J7lq!*=9M)A^u*@cHG?4AJ6o%I z;^SzUr;?548?j6pP@yP_Ie$n!%Qpo&4zLhK)eUWFvZ+48)}g=7f`r&ylkysT{#hw2c#A0R&>3jTrM8|ngiZdb=^qyK|FM$Q7z)QwUSsUAOnIDtSMIx*~X0{$5 zz!tL;@K(ejj71BU*VR+AS>ib8Fx^zl3qWUX*@=i#87Av&D@Wjl<}8ob;1a7X=i6p0 zpk^&6|4XPpveNmB+g>l*->h3}Y7cLQ&GvQnVTmbRw|~#RD{=HsGr0;arZx@e zV|Lr(tT~}ZqF%8VYz~>cZD+`#_, 2022, 2023, 2024, 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.8.0-pre1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-05-14 14:23-0600\n" +"Last-Translator: Cristian Othón Martínez Vera \n" +"Language-Team: Spanish \n" +"Language: es\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=2; plural=(n != 1);\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Argumento inválido para --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Demasiados argumentos para --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "En --block-list, falta el tamaño de bloque después del número de cadena de filtros '%c:'" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 solo se puede usar como el último elemento en --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Tipo de formato de fichero desconocido" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: No se admite el tipo de verificación de integridad" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Solo se puede especificar un fichero con '--files' o '--files0'." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "La variable de ambiente %s contiene demasiados argumentos" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Se desactivó el soporte para compresión en el momento de compilación" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Se desactivó el soporte para descompresión en el momento de compilación" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "No se admite la compresión de ficheros lzip (.lz)" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list se descarta a menos que se comprima con el formato .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Con --format=raw, se requiere --suffix=.SUF a menos que se escriba a la salida estándar" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "El número máximo de filtros es cuatro" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Error en la opción --filters%s=FILTROS:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "El límite de uso de memoria es demasiado bajo para la configuración de filtros dada." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "la cadena de filtros %u es usada por --block-list pero no se especifica con --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "No se recomienda un modo predeterminado en modo crudo." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "El número exacto de las opciones predeterminadas puede variar entre versiones del software." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "El formato .lzma solamente admite el filtro LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "No se puede usar LZMA1 con el formato .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "La cadena de filtros %u es incompatible con --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Se cambia al modo de un solo hilo debido a --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Opciones sin soporte en la cadena de filtros %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Se usan hasta % hilos." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "No se admiten las opciones de cadena de filtros o de filtro" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "La descompresión necesitará %s MiB de memoria." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Se reduce el número de hilos de %s a %s para no exceder el límite de uso de memoria de %s MiB" + +#: src/xz/coder.c +#, 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 "Se reduce el número de hilos de %s a uno. Aún se está excediendo el límite automático de uso de memoria de %s MiB. Se requieren %s MiB de memoria. Continúa de cualquier manera." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Se ajusta al modo de un solo hilo para no exceder el límite de uso de memoria de %s MiB" + +#: src/xz/coder.c +#, 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 "Se ajusta el tamaño del diccionario LZMA%c de %s MiB a %s MiB para no exceder el límite de uso de memoria de %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Se ajusta el tamaño del diccionario LZMA%c para --filters%u de %s MiB a %s MiB para no exceder el límite de uso de memoria de %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Error al cambiar a la cadena de filtros %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Error al crear una tubería: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: falló poll(): %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Al parecer se movió el fichero, no se borra" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: No se puede borrar: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: No se puede establecer el propietario del fichero: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: No se puede establecer el grupo del fichero: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: No se pueden establecer los permisos del fichero: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Falló al sincronizar el fichero: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Falló al sincronizar el directorio del fichero: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Error al obtener la opciones de estado de fichero de la entrada estándar: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Es un enlace simbólico, se salta" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Es un directorio, se salta" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: No es un fichero regular, se salta" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: El fichero tiene el bit setuid o setgid activo, se salta" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: El fichero tiene el bit sticky activo, se salta" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: El fichero de entrada tiene más de un enlace duro, se salta" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Nombre de fichero vacío, se salta" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Error al restaurar las opciones de estado en la entrada estándar: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Error al obtener las opciones de estado de fichero de la entrada estándar: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Falló al abrir el directorio: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: El destino no es un fichero regular" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Error al restaurar la opción O_APPEND a la salida estándar: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Falló al cerrar el fichero: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Falló la búsqueda al tratar de crear un fichero disperso: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Error de lectura: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Error al buscar en el fichero: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Fin de fichero inesperado" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Error de escritura: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Desactivado" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Cantidad total de memoria física (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Número de hilos de procesador:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Compresión" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Descompresión:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Descompresión multihilos:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Por omisión para -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Información de hardware:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Límites de uso de memoria:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Flujos:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Bloques:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Tamaño comprimido:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Tamaño sin comprimir:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Tasa:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Verificación:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Relleno de flujo:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Memoria requerida:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Tamaños en cabeceras:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Número de ficheros:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Flujo" + +#: src/xz/list.c +msgid "Block" +msgstr "Bloque" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Bloques" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "DesplComp" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "DesplDescomp" + +#: src/xz/list.c +msgid "CompSize" +msgstr "TamComp" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "TamDescomp" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "TamTotal" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Tasa" + +#: src/xz/list.c +msgid "Check" +msgstr "Verif" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "ValVerif" + +#: src/xz/list.c +msgid "Padding" +msgstr "Relleno" + +#: src/xz/list.c +msgid "Header" +msgstr "Cabecera" + +#: src/xz/list.c +msgid "Flags" +msgstr "Opciones" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "UsoMem" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtros" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Ninguno" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Descon-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Descon-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Descon-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Descon-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Descon-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Descon-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Descon-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Descon-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Descon-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Descon-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Descon-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Descon-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: El fichero está vacío" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Demasiado pequeño para ser un fichero .xz válido" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Flujos Bloques Comprimido Sin-Comprimir Tasa Verif Nombre-Fichero" + +#: src/xz/list.c +msgid "Yes" +msgstr "Sí" + +#: src/xz/list.c +msgid "No" +msgstr "No" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Versión mínima de Herramientas XZ:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s fichero\n" +msgstr[1] "%s ficheros\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Totales:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list solo funciona con ficheros .xz (--format=xz o --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Pruebe 'lzmainfo' con ficheros .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list no admite leer de la entrada estándar" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Error al leer nombres de fichero: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Fin de entrada inesperada al leer nombres de fichero" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Se encontraron caracteres nulos al leer nombres de ficheros. ¿Tal vez quería usar '--files0' en lugar de '--files'?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Aún no se admite la compresión y descompresión con --robot." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "No se pueden leer datos de la entrada estándar cuando se leen nombres de fichero de la entrada estándar" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Error interno (bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "No se pueden establecer los manejadores de señales" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "No hay revisión de integridad; no se verifica la integridad del fichero" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "No se admite el tipo de revisión de integridad; no se verifica la integridad del fichero" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Se alcanzó el límite de uso de memoria" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "No se reconoce el formato del fichero" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Opciones sin soporte" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Los datos comprimidos están corruptos" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Fin de entrada inesperado" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "Se requieren %s MiB de memoria. Se desactiva el limitador." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "Se requieren %s MiB de memoria. El límite es %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Cadena de filtro: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Pruebe '%s --help' para obtener más información." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Error al mostrar el texto de ayuda (código de error %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Uso: %s [OPCIÓN]... [FICHERO]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Comprime o descomprime FICHEROs en el formato .xz." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Los argumentos obligatorios para las opciones largas también son obligatorios para las opciones cortas." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Modo de operación:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "fuerza la compresión" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "fuerza la descompresión" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "prueba la integridad del fichero comprimido" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "muestra la información acerca de los ficheros .xz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Modificadores de operación:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "conserva (no borra) los ficheros de entrada" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "fuerza la sobreescritura del fichero de salida y (des)comprime enlaces" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "escribe a la salida estándar y no borra los ficheros de entrada" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "no sincroniza el fichero de salida con el dispositivo de almacenamiento antes de borrar el fichero de entrada" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "solo descomprime el primer flujo, y descarta silenciosamente los posibles datos de entrada restantes" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "no crea archivos temporales al descomprimir" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "usa el sufijo '.SUF' para los ficheros comprimidos" + +#: src/xz/message.c +msgid "FILE" +msgstr "FICHERO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "lee los nombres de fichero a procesar del FICHERO; si se omite el FICHERO, los nombres de fichero se leen de la entrada estándar; los nombres de fichero deber de terminar con el carácter de línea nueva" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "como --files pero usa el carácter nulo como terminador" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Opciones básicas de compresión y formato de fichero:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMATO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "formato de fichero para codificar o decodificar; los valores posibles son 'auto' (por defecto), 'xz', 'lzma', 'lzip', y 'raw'" + +#: src/xz/message.c +msgid "NAME" +msgstr "NOMBRE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "tipo de verificación de integridad: 'none' (usar con cuidado), 'crc32', 'crc64' (por defecto), o 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "no hace la verificación de integridad al descomprimir" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "valor predefinido de compresión; por defecto es 6. ¡Considere el compresor *y* el uso de memoria del compresor antes de usar 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "trata de mejorar la razón de compresión usando más tiempo de procesamiento; no afecta los requisitos de memoria del descompresor" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "NÚM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "usa como máximo NÚM hilos; por defecto es 0, el cual usa tantos hilos como hayan núcleos de procesador" + +#: src/xz/message.c +msgid "SIZE" +msgstr "TAMAÑO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "inicia un nuevo bloque .xz después de cada TAMAÑO bytes de entrada; use esta opción para establecer el tamaño de bloque para la compresión con hilos" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOQUES" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "inicia un nuevo bloque .xz después de cada intervalo dado, separado por comas, de datos sin comprimir; opcionalmente, especifica un número de cadena de filtros (0-9) a continuación de ':' antes del tamaño de los datos sin comprimir" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "al comprimir, si pasaron más de NÚM milisegundos desde el último descarte y la lectura de más entrada produciría un bloqueo, todos los datos pendientes son descartados" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "LÍMITE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "define el límite de uso de memoria para compresión, descompresión, descompresión con hilos, o todos los anteriores; el LÍMITE es en bytes, % de RAM, o 0 para valores por defecto" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "si la configuración de compresión excede el límite de uso de memoria, muestra un error en lugar de ajustar los valores hacia abajo" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Cadena de filtros personal para compresión (alternativa a usar valores predefinidos):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTROS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "define la cadena de filtros usando la sintaxis de la cadena de filtros liblzma; use --filters-help para obtener más información" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "define cadenas de filtros adicionales usando la sintaxis de cadena de filtros liblzma para usar con --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "muestra más información acerca de la sintaxis de cadenas de filtros liblzma y termina" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPCS" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 o LZMA2: OPCS es una lista separada por comas de cero o más de las siguientes opciones (valores válidos; por defecto):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "PRE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "cambia las opciones al valor predefinido" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "tamaño de diccionario" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "número de bits de contexto literal" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "número de bits de posición literal" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "número de bits de posición" + +#: src/xz/message.c +msgid "MODE" +msgstr "MODO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "modo de descompresión" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "longitud aceptada de una coincidencia" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "buscador de coincidencias" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "profundidad máxima de búsqueda; 0=automática (por defecto)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "filtro BCJ de x86 (32-bit y 64-bit)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "filtro BCJ de ARM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "filtro BCJ de ARM-Thumb" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "filtro BCJ de ARM64" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "filtro BCJ de PowerPC (sólo big endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "filtro BCJ de IA-64 (Itanium)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "filtro BCJ de Sparc" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "filtro BCJ de RISC-V" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "OPCS válidas para todos los filtros BCJ:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "desplazamiento de inicio para las conversiones (por defecto=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Delta de filtro; OPCS válidas (valores válidos; por defecto):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "distancia entre bytes que se restan unos de otros" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Otras opciones:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "suprime los avisos; especificar dos veces para suprimir también los errores" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "descriptivo; especificar dos veces para ser aún más descriptivo" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "los avisos no afectan el estado de la salida" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "usa mensajes analizables por máquina (útil para scripts)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "muestra la cantidad total de RAM y los límites de uso de memoria activos, y termina" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "muestra la ayuda corta (sólo muestra las opciones básicas)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "muestra esta ayuda larga y termina" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "muestra esta ayuda corta y termina" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "muestra la ayuda larga (también muestra las opciones avanzadas)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "muestra el número de versión y termina" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Sin FICHEROs, o cuando el FICHERO es -, lee la entrada estándar." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Reporte errores a <%s> (en inglés o finlandés).\n" +"Reporte errores de traducción al español a ." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "Sitio web de %s: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ESTA ES UNA VERSIÓN EN DESARROLLO Y NO ESTÁ LISTA PARA USO EN PRODUCCIÓN." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Las cadenas de filtros se definen usando las opciones --filters=FILTROS o --filters1=FILTROS ... --filters9=FILTROS. Cada filtro en la cadena se puede separar con espacios o '--'. Alternativamente, se puede especificar un valor predeterminado %s en lugar de una cadena de filtro." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Los filtros admitidos y sus opciones son:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Las opciones deben ser pares 'nombre=valor' separadas por comas" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Nombre de opción inválido" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Valor de opción inválido" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "No se admite el valor predefinido LZMA1/LZMA2: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "La suma de lc y lp no debe exceder 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: El nombre de fichero tiene un sufijo desconocido, se salta" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: El fichero ya tiene un sufijo '%s', se salta" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Sufijo de nombre de fichero inválido" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "El valor no es un entero decimal no-negativo" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Sufijo multiplicador inválido" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Los sufijos válidos son 'KiB' (2^10), 'MiB' (2^20), y 'GiB' (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "El valor de la opción '%s' debe estar en el intervalo [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "No se pueden leer datos comprimidos de una terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "No se pueden escribir datos comprimidos a una terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Uso: %s [--help] [--version] [FICHERO]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Muestra información almacenada en la cabecera del fichero .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "El fichero es demasiado pequeño para ser un fichero .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "No es un fichero .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Falló la escritura a la salida estándar" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Error desconocido" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Opción sin soporte" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Opción sin soporte en el valor predefinido" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Nombre de opción inválido" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "El valor de la opción no puede estar vacío" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Valor fuera de intervalo" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Esta opción no admite ningún sufijo multiplicador" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Sufijo multiplicador inválido (KiB, MiB, o GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Nombre de filtro desconocido" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Este filtro no se puede usar en el formato .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Falló el alojamiento de memoria" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "No se permite una cadena vacía, pruebe con '6' si se requiere un valor por defecto" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "El número máximo de filtros es cuatro" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Falta el nombre del filtro" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Cadena de filtro inválida (¿falta 'lzma2' al final?)" diff --git a/cpp/third_party/xz-5.8.3/po/fi.gmo b/cpp/third_party/xz-5.8.3/po/fi.gmo new file mode 100644 index 0000000000000000000000000000000000000000..a85048858951e44183a4dee5428cb335f7406742 GIT binary patch literal 28225 zcmb`P37i~Pedo*gL|nEp26L8d46)3+baypf z-6M?_j0tAJ5RMJzT3{U#apmB~Sy+}!gd`AP4TOXMh9!w{AOuKaU?Bgt)X zEb^g0^ZHlEt5@&+-~WEE=bp1qdF@F-5S+%>2Jks&1VO~{tIrIAhj4z*xehM`*HiSl z0~`Wh3vK~F4W14D!s8MoK&k|v1vi0z z59&RS<4gB9gO3Jp0@dFpcqMoncnSDPa4UE}cnWw4o!0v<2OkNh;5pzeAk!7R2JC=G z!5VlT#0$Y&K+VIQpy>E^@Ko?_fBmn((>cEf48eQB3Gj3#MfGj~_595s>=D$!Rba!P z9|koqF9gLG@AK#11~vXOL)X8Hz){Yx1jTE&fU5r<@ZsP+;CAr)pzd#49RzE^X;9;R z1*mbp8Qci|5vcxr3uMZJ`@m7~r1RZ;Yy+9nAOT0f7lESh$3fBm-$3!p>IyA zpvLi|_kSJKdw&9oP7kATSSJ_&)$TU%WN-)g5O5c$d71F{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twM|lk+|kV|HFhnS~gMvztw55 zgu;N8KV=C8W-ZQ4xC$MSXVuhMwrsO^7!~dwvx@5uM(Y${K;yDAhq(E55}uP&nHd)^sUL)^Y-|k%sfbYZ6ps^k zLk5W(Ub^Y~SSjS7Z{ZuTLh-F&UHv~Pw|a`P$U{Q4-qljR?QZaOi#1dHKxHr! z=LjnsVg7iR{XXX9E4*;5=$Ip~>67Y8rot_*1L#!(RwTDJ02AiFW%g zbmF^U-l_g=gv+esjTG8g8);3+!mY|#n>s#xgiCfLm#BA~m>FZx<{8=VdVv&8rw(vDq_#v zteKTYgN1FmKu*ZDf`n3LsBT%JU{X4ln^d?G2SGw0!vh%1cc7AHa0b_NTPF1>J-I<9+AsF05#P-c8BT-qa`EKTu>uXX7|OrFo7ONkcxQt>OU6VSBPY45mFC0}spnG+dU@8dBLQ4bH+ZA_CQ zajO+;NQb_Lo#RkQn+x(*r0|BN-<&->&imzlL;=YY{*#EMLTprBeluqq1|f{s586VG z5YV6|qtHhy`l8NTGOfTi3GGvlhnD3QB%($l9qfwXHfi0kH_6q3xPz#(eTiv00uu_qw)tT#d*)br!A?X&E_4atVT~6XUQnh|700CJG-v=j^SWC)7dkQQ~gDsJ_ zPSl_&HODsao`o1{X(-fl23%IR-w2a>&o`j^WT5RpR|nnhb4y0E1%2;$_mWKpTlf)r z`3KDTF9PzP7rURs_@8X(clrDWAOEjMm~m~IW-jd~!|1-7A2`A<2l%Bm2&U}8<6>+1 F{{x3j6, 2019, 2020, 2022, 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-01-29 21:57+0200\n" +"Last-Translator: Lauri Nurmi \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.5\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Virheellinen argumentti valitsimelle --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Liian monta argumenttia valitsimelle --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "Valitsimen --block-list yhteydessä lohkon koko puuttuu suodinketjun numeron '%c:' jälkeen" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 kelpaa vain viimeiseksi alkioksi valitsimen --block-list kanssa" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Tuntematon tiedostomuototyyppi" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Eheystarkistuksen tyyppiä ei tueta" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Vain yksi tiedosto voidaan antaa valitsimille ”--files” ja ”--files0”." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, 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 +msgid "Compression support was disabled at build time" +msgstr "Tiivistämistuki on poistettu käytöstä käännösaikana" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Purkutuki on poistettu käytöstä käännösaikana" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Lzip-tiedostojen (.lz) tiivistämistä ei tueta" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list jätetään huomiotta, ellei olla tiivistämässä .xz-muotoon" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "--format=raw vaatii, että --suffix=.PÄÄTE on annettu, ellei kirjoiteta vakiotulosteeseen" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Suodattimien enimmäismäärä on neljä" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Virhe --filters%s=SUOTIMET-asetuksessa:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Muistinkäytön raja on liian matala valituille suotimille." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "--block-list käyttää suodinketjua %u, jota ei ole määritelty --filters%u=:lla" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Esiasetusten käyttö raw-tilassa ei ole suositeltavaa." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Esiasetusten tarkat asetukset saattavat vaihdella ohjelmistoversioiden välillä." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr ".lzma-muoto tukee vain LZMA1-suodinta" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1:tä ei voi käyttää .xz-muodon kanssa" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Suodinketju %u on yhteensopimaton valitsimen --flush-timeout kanssa" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Vaihdetaan yksisäikeiseen tilaan valitsimen --flush-timeout vuoksi" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Ei-tuettuja asetuksia suodinketjussa %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Käytetään enintään % säiettä." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Ei-tuetut suodinketjun tai suotimen asetukset" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Purkaminen vaatii %s MiB muistia." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Pudotettiin säikeiden määrä %s säikeestä %s:een, jottei ylitettäisi %s MiB:n rajaa muistinkäytölle" + +#: src/xz/coder.c +#, 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 "Pudotettiin säikeiden määrä %s säikeestä yhteen. Automaattinen %s MiB:n raja muistinkäytölle ylittyy silti. Vaaditaan %s MiB muistia. Jatketaan kaikesta huolimatta." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Siirrytään yhden säikeen tilaan, jottei ylitettäisi %s MiB:n rajaa muistinkäytölle" + +#: src/xz/coder.c +#, 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 "Pudotettiin LZMA%c-sanaston koko %s MiB:stä %s MiB:hen, jottei ylitettäisi %s MiB:n rajaa muistinkäytölle" + +#: src/xz/coder.c +#, c-format +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 "Pudotettiin LZMA%c-sanaston koko --filter%u:lle %s MiB:stä %s MiB:hen, jottei ylitettäisi %s MiB:n rajaa muistinkäytölle" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Virhe vaihdettaessa suodinketjuun %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Virhe putkea luodessa: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll()-kutsu epäonnistui: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Tiedosto on nähtävästi siirretty, ei poisteta" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Ei voi poistaa: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Tiedoston omistajaa ei voi asettaa: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Tiedoston ryhmää ei voi asettaa: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Tiedoston oikeuksia ei voi asettaa: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Tiedoston synkronointi epäonnistui: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Tiedoston hakemiston synkronointi epäonnistui: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Virhe tiedoston tilalippujen noutamisessa vakiosyötteelle: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: On symbolinen linkki, ohitetaan" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: On hakemisto, ohitetaan" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Ei ole tavallinen tiedosto, ohitetaan" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Tiedostolla on setuid- tai setgid-bitti, ohitetaan" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Tiedostolla on sticky-bitti, ohitetaan" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Syötetiedostoon on yli yksi kova linkki, ohitetaan" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Tyhjä tiedostonimi, ohitetaan" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Virhe tilalippujen palauttamisessa vakiosyötteelle: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Virhe tiedoston tilalippujen noutamisessa vakiotulosteelle: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Hakemiston avaaminen epäonnistui: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Kohde ei ole tavallinen tiedosto" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Virhe O_APPEND-lipun palauttamisessa vakiosyötteelle: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Tiedoston sulkeminen epäonnistui: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Siirtyminen epäonnistui yritettäessä luoda hajanaista tiedostoa: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Lukuvirhe: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Virhe tiedostossa siirtymisessä: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Odottamaton tiedoston loppu" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Kirjoitusvirhe: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Pois käytöstä" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Fyysisen muistin kokonaismäärä (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Suoritinsäikeiden määrä:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Tiivistys:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Purku:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Monisäikeinen purku:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "-T0:n oletusarvo:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Laitteiston tiedot:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Muistinkäytön rajat:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Virrat:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Lohkot:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Tiivistetty koko:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Tiivistämätön koko:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Suhde:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Tarkistus:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Virran tasaus:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Tarvittava muisti:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Koot otsakkeissa:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Tiedostojen määrä:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Virta" + +#: src/xz/list.c +msgid "Block" +msgstr "Lohko" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Lohkot" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "TiivSiirr." + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "Tv:tönSiirr." + +#: src/xz/list.c +msgid "CompSize" +msgstr "TiivKoko" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "Tv:tönKoko" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "Yht.Koko" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Suhde" + +#: src/xz/list.c +msgid "Check" +msgstr "Tark." + +#: src/xz/list.c +msgid "CheckVal" +msgstr "Tark.arvo" + +#: src/xz/list.c +msgid "Padding" +msgstr "Tasaus" + +#: src/xz/list.c +msgid "Header" +msgstr "Otsake" + +#: src/xz/list.c +msgid "Flags" +msgstr "Liput" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "Muist.käyt." + +#: src/xz/list.c +msgid "Filters" +msgstr "Suodattimet" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Ei mitään" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Tuntematon-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Tuntematon-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Tuntematon-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Tuntematon-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Tuntematon-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Tuntematon-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Tuntematon-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Tuntematon-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Tuntematon-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Tuntematon-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Tuntematon-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Tuntematon-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Tiedosto on tyhjä" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Liian pieni kelvolliseksi .xz-tiedostoksi" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Virrat Lohkot Tiivist. Tiivistämätön Suhde Tark. Tiedostonimi" + +#: src/xz/list.c +msgid "Yes" +msgstr "Kyllä" + +#: src/xz/list.c +msgid "No" +msgstr "Ei" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "XZ Utilsin vähimmäisversio:" + +#. 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 +#, 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 +msgid "Totals:" +msgstr "Yhteensä:" + +#: src/xz/list.c +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 +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Kokeile ”lzmainfo”-komento .lzma-tiedostoille." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list ei tue lukemista vakiosyötteestä" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Virhe luettaessa tiedostonimiä: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Odottamaton syötteen loppu tiedostonimiä luettaessa" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Nul-merkki kohdattiin tiedostonimiä lukiessa; oliko tarkoitus antaa valitsin ”--files0” eikä ”--files”?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Tiivistys ja purku --robot -valitsimen kanssa eivät ole vielä tuettuja." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Dataa ei voi lukea vakiosyötteestä kun tiedostonimiä luetaan vakiosyötteestä" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Sisäinen virhe (ohjelmistovika)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Signaalinkäsittelimiä ei voi muodostaa" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Ei eheystarkastusta; ei varmenneta tiedoston eheyttä" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Ei-tuettu eheystarkastuksen tyyppi; ei varmenneta tiedoston eheyttä" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Muistinkäytön raja saavutettu" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Tiedostomuotoa ei tunnistettu" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Ei-tuetut asetukset" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Tiivistetty data on turmeltunut" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Odottamaton syötteen loppu" + +#: src/xz/message.c +#, 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 +#, 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 +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Suodinketju: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Komento ”%s --help” antaa lisää tietoa." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Virhe tulostettaessa ohjetekstiä (virhekoodi %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Käyttö: %s [VALITSIN]... [TIEDOSTO]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Tiivistä tai pura .xz-muotoisia TIEDOSTOja." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Pitkien valitsinten pakolliset argumentit ovat pakollisia myös lyhyille." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr " Toimintatila:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "pakota tiivistys" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "pakota purku" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "testaa tiivistetyn tiedoston eheys" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "näytä tietoa .xz-tiedostoista" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Toimintomääreet:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "säilytä syötetiedostot (älä poista)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "pakota tulostiedostojen ylikirjoitus ja pura/tiivistä linkit" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "kirjoita vakiotulosteeseen äläkä poista syötetiedostoja" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "älä synkronoi tulostiedostoa tallennuslaitteelle ennen syötetiedoston poistamista" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "pura vain ensimmäinen virta, ja ohita hiljaisesti mahdollinen jäljellä oleva syötedata" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "älä luo hajanaisia tiedostoja purettaessa" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".PÄÄTE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "käytä ”.PÄÄTE”-päätettä tiivistetyille tiedostoille" + +#: src/xz/message.c +msgid "FILE" +msgstr "TIED" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "lue käsiteltävät tiedostonimet TIEDostosta; jos TIED jätetään antamatta, tiedostonimet luetaan vakiosyötteestä; tiedostonimet on päätettävä rivinvaihtomerkillä" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "kuten --files mutta käytä päättämiseen nul-merkkiä" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Tiedostomuodon ja tiivistyksen perusasetukset:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "MUOTO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "tuotettava tai luettava tiedostomuoto; vaihtoehdot ovat ”auto” (oletus), ”xz”, ”lzma”, ”lzip” ja ”raw”" + +#: src/xz/message.c +msgid "NAME" +msgstr "NIMI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "eheystarkastuksen tyyppi: ”none” (käytä varoen), ”crc32”, ”crc64” (oletus) tai ”sha256”" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "älä suorita eheystarkastusta purettaessa" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "tiivistyksen esiasetus; oletus on 6; ota tiivistyksen *ja* purun muistinkäyttö huomioon ennen arvojen 7–9 käyttämistä!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "yritä parantaa tiivistyssuhdetta käyttämällä enemmän suoritinaikaa; ei vaikuta purkimen muistivaatimuksiin" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "MÄÄRÄ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "käytä enintään MÄÄRÄä säiettä; oletus on 0, jolloin käytetään suoritinytimien määrän verran säikeitä" + +#: src/xz/message.c +msgid "SIZE" +msgstr "KOKO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "aloita uusi .xz-lohko aina KOKO syötetavun jälkeen; käytä tätä säikeistetyn tiivistyksen lohkokoon asettamiseen" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "LOHKOT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "aloita uusi .xz-lohko pilkuin erotettujen tiivistämättömän datan välien jälkeen; vaihtoehtoisesti anna suodatinketjun numeron (0–9) ja sen jälkeen ”:” ennen tiivistämättömän datan kokoa" + +# to block: salpautua? kuulostaako hyvältä? +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "jos tiivistettäessä on kulunut yli MÄÄRÄ ms edellisestä huuhtomisesta ja syötteen lukemisen jatkaminen salpautuisi, kaikki odottava data huuhdellaan" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "RAJA" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "aseta muistinkäytön raja tiivistykselle, purkamiselle, säikeistetylle purkamisella tai näille kaikille; RAJA on tavuja, %-osuus RAM-muistista tai 0 oletusarvoille" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "jos tiivistysasetukset ylittävät muistinkäytön rajan, anna virhe äläkä pudota asetuksia alaspäin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Mukautettu suodinketju tiivistykselle (vaihtoehto esiasetuksille):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "SUOTIMET" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "aseta suodinketju käyttäen libzma:n suodinsyntaksia; lisätietoja valitsimella --filters-help" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "aseta lisäsuodinketjuja käyttäen libzma:n suodinsyntaksia --block-list:in kanssa käytettäväksi" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "näytä lisätietoa liblzma:n suodinsyntaksista ja poistu" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "ASET" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 tai LZMA2; ASET on pilkuilla erotettu lista nollasta tai useammasta seuraavasta asetuksesta (kelvolliset arvot; oletus):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "ESI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "palauta asetukset esiasetukseen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "sanaston koko" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "literaalien kontekstibittien määrä" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "literaalien sijaintibittien määrä" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "sijaintibittien määrä" + +#: src/xz/message.c +msgid "MODE" +msgstr "TILA" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "tiivistystila" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "täsmäävyyden kiva pituus" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "täsmäävyydenetsin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "enimmäishakusyvyys; 0=automaattinen (oletus)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ -suodin (32- ja 64-bittinen)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ -suodin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BJC -suodin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ -suodin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ -suodin (vain big endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ -suodin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ -suodin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ -suodin" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Kelvolliset ASETukset kaikille BJC-suotimille:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "muunnosten aloitussiirtymä (oletus=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Delta-suodin; kelvolliset ASETukset (kelvolliset arvot; oletus):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "toisistaan vähennettävien tavujen välinen etäisyys" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Muut asetukset:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "vaienna varoitukset; kahdesti antamalla myös virheet" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "ole lavea; kahdesti antamalla vieläkin laveampi" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "älkööt varoitukset vaikuttako paluuarvoon" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "käytä koneluettavia viestejä (sopii skripteihin)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "näytä RAM-muistin kokonaismäärä sekä parhaillaan vallitsevat muistinkäytön rajat, ja poistu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "näytä lyhyt ohje (kertoo vain perusasetukset)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "näytä tämä pitkä ohje ja poistu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "näytä tämä lyhyt ohje ja poistu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "näytä pitkä ohje (kertoo myös lisäasetukset)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "näytä versionumero ja poistu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Jos TIEDOSTOa ei ole annettu, tai se on -, luetaan vakiosyötettä." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Ilmoita ohjelmistovioista (suomeksi) osoitteeseen <%s>." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s -kotisivu: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "TÄMÄ ON KEHITYSVERSIO, JOTA EI OLE TARKOITETTU TUOTANTOKÄYTTÖÖN." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Suodinketjut asetetaan käyttämällä valitsinta --filters=SUOTIMET tai --filters1=SUOTIMET ... --filters9=SUOTIMET. Kukin ketjun suodin voidaan erottaa välilyönneillä tai ”--”:lla. Vaihtoehtoisesti suodinketjun sijaan voidaan antaa esiasetus %s." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Tuetut suotimet ja niiden asetukset ovat:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Valitsinten on oltava pilkuilla eroteltuja ”nimi=arvo”-pareja" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Virheellinen asetuksen nimi" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Virheellinen asetuksen arvo" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Ei-tuettu LZMA1/LZMA2-esiasetus: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +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 +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Tiedostonimen pääte on tuntematon, ohitetaan" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Tiedostolla on jo ”%s”-pääte, ohitetaan" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Virheellinen tiedostonimen pääte" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Arvo ei ole ei ole epänegatiivinen kymmenkantainen kokonaisluku" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Tuntematon kerroin" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Kelvolliset kertoimet ovat ”KiB” (2¹⁰), ”MiB” (2²⁰) ja ”GiB” (2³⁰)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Valitsimen ”%s” arvon on oltava välillä [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Tiivistettyä dataa ei voi lukea päätteestä" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Tiivistettyä dataa ei voi kirjoittaa päätteeseen" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Käyttö: %s [--help] [--version] [TIEDOSTO]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Näytä .lzma-tiedosto-otsakkeeseen tallennettu tieto." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Liian pieni kelvolliseksi .xz-tiedostoksi" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Ei .lzma-tiedosto" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Vakiotulosteeseen kirjoitus epäonnistui" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Tuntematon virhe" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Ei-tuettu esiasetus" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Ei-tuettu lippu esiasetuksessa" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Tuntematon asetuksen nimi" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Valitsimen arvo ei voi olla tyhjä" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Arvo sallitun välin ulkopuolella" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Tämä asetus ei tue kertoimia" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Virheellinen kerroin (KiB, MiB tai GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Tuntematon suotimen nimi" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Tätä suodinta ei voi käyttää .xz-muodon kanssa" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Muistinvaraus epäonnistui" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Tyhjä merkkijono ei ole sallittu, kokeile arvoa ”6”, jos oletusarvoa tarvitaan" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Suodattimien enimmäismäärä on neljä" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Suotimen nimi puuttuu" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Virheellinen suodinketju (puuttuuko ”lzma2” lopusta?)" diff --git a/cpp/third_party/xz-5.8.3/po/fr.gmo b/cpp/third_party/xz-5.8.3/po/fr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6b7b53ba2690a5f140cc4cb05be88841004f103f GIT binary patch literal 10232 zcmbuETZ|-EdB@Ax*f89T!3o4ke3G!4U3Ex~>oS+kg@@ckh!iOT5gvd@Q7&UyL_~@}3W)@hJVXwWqWB@Q2z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use)~RSnb?|C;4e zeC{)^ zsFL|76aMUI-z0ra3|$vz=Ax%qLDUU;B@+rdOK*eW$p5Z>=(G|eWv^0w@s`D1(zS?? zw2zBomkxYIDV6SaMOpAo-b~)kspwn}^BoE~rlcbkowB4u98j1;VaM|5iaIw;=&UQ7 zE|oI!uKH=4h$7*`RC4-p6my=9<-kPlhZku3RKjEr2dg{Rn%Cx3bG4<`7Mo>JXSP|? zdX}4}+VlRkImP$crMZ?`o>^74@shW$GvJadcO4<~DL@PMS%D))Q z@sk?11W*XBDvyY|EcQtLYHC0(;XPrCKjg1Y+Leq+*2CR!m=Yx-fx?FP>rn-jCkePR zFJVe_p1wi1OAj9ST-1KV{=>Kzv`LKFf!G)sy>N^|kOZaybzC$+vaXTfX{$kqvf&+< zNqMFHn3PCUzO)S~3k};-mG;?6`&^}ce%P*buk@~Tcx>4B@nQ4Auz8W9$dFyuj9rOH z)K==P97dcc9XW$=)G8`%aLGzif_H=fh}Na7y(RO{w&5qZKK!_V;5JP4@pzjm<~2$# zH4K#KHg>jV+z(hZR{MK(?}, 2011-2014. +# Stéphane Aulery , 2019-2023. +# +msgid "" +msgstr "" +"Project-Id-Version: xz-5.4.4-pre1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2023-12-19 04:12+0100\n" +"Last-Translator: Stéphane Aulery \n" +"Language-Team: French \n" +"Language: fr\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=2; plural=(n==1) ? 0 : 1;\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s : argument de l'option --block-list invalide" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s : trop d'arguments pour l'option --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 peut seulement être utilisé en dernier élément de --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s : Format de fichier inconnu" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s : Type de vérification d'intégrité inconnu" + +#: src/xz/args.c +#, fuzzy +#| msgid "Only one file can be specified with `--files' or `--files0'." +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Un seul fichier peut être spécifié avec `--files' ou `--files0'." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, fuzzy, c-format +#| msgid "%s: " +msgid "%s: %s" +msgstr "%s : " + +#: src/xz/args.c +#, 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 +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 +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 +msgid "Compression of lzip files (.lz) is not supported" +msgstr "" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "" + +#: src/xz/args.c +#, 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 +msgid "Maximum number of filters is four" +msgstr "Le nombre maximal de filtres est quatre" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "La limite d'utilisation mémoire est trop basse pour la configuration de filtres donnée." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Utiliser un préréglage en mode `raw' est déconseillé." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Le détail des préréglages peut varier entre différentes versions du logiciel." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Le format .lzma ne prend en charge que le filtre LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "Le filtre LZMA1 ne peut être utilisé avec le format .xz" + +#: src/xz/coder.c +#, fuzzy, c-format +#| msgid "The filter chain is incompatible with --flush-timeout" +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "La Chaine de filtre est incompatible avec --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Bascule en mode mono-processus à cause de --flush-timeout" + +#: src/xz/coder.c +#, fuzzy, c-format +#| msgid "Unsupported options" +msgid "Unsupported options in filter chain %u" +msgstr "Options non prises en charge" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Jusqu'à % threads seront utilisés." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Enchaînement ou options de filtres non pris en charge" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "La décompression nécessitera %s MiB de mémoire." + +#: src/xz/coder.c +#, fuzzy, c-format +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" + +#: src/xz/coder.c +#, 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 "" + +#: src/xz/coder.c +#, fuzzy, c-format +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" + +#: src/xz/coder.c +#, c-format +msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB" +msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB" + +#: src/xz/coder.c +#, 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 "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB" + +#: src/xz/coder.c +#, fuzzy, c-format +#| msgid "Error creating a pipe: %s" +msgid "Error changing to filter chain %u: %s" +msgstr "Impossible de créer un tube anonyme (pipe) : %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Impossible de créer un tube anonyme (pipe) : %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s : L'appel à la fonction poll() a échoué : %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, 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 +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s : Impossible de supprimer : %s" + +#: src/xz/file_io.c +#, 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 +#, 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 +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s : Impossible de modifier les permissions du fichier : %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s : Impossible de fermer le fichier : %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s : Impossible de fermer le fichier : %s" + +# Note from translator on "file status flags". +# The following entry is kept un-translated on purpose. It is difficult to +# translate and should only happen in exceptional circumstances which means +# that translating would: +# - lose some of the meaning +# - make it more difficult to look up in search engines; it might happen one in +# a million times, if we dilute the error message in 20 languages, it will be +# almost impossible to find an explanation and support for the error. +#: src/xz/file_io.c +#, 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 +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s est un lien symbolique : ignoré" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s est un répertoire : ignoré" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s n'est pas un fichier régulier : ignoré" + +#: src/xz/file_io.c +#, 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 +#, 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 +#, 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 +msgid "Empty filename, skipping" +msgstr "Nom de fichier vide, ignoré" + +# See note from translator above titled "file status flags". +#: src/xz/file_io.c +#, 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 +#, 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 +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s : Impossible de fermer le fichier : %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s n'est pas un fichier régulier : ignoré" + +#: src/xz/file_io.c +#, 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 +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s : Impossible de fermer le fichier : %s" + +#: src/xz/file_io.c +#, 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 +#, c-format +msgid "%s: Read error: %s" +msgstr "%s : Erreur d'écriture : %s" + +#: src/xz/file_io.c +#, 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 +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s : Fin de fichier inattendue" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s : Erreur d'écriture : %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Désactivé" + +#: src/xz/hardware.c +#, fuzzy +msgid "Amount of physical memory (RAM):" +msgstr "Quantité totale de mémoire physique (RAM) : " + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "" + +#: src/xz/hardware.c +#, fuzzy +msgid "Multi-threaded decompression:" +msgstr "Limite d'utilisation pour la décompression : " + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "" + +#: src/xz/hardware.c +#, fuzzy +msgid "Memory usage limits:" +msgstr "Limite d'utilisation mémoire atteinte" + +#: src/xz/list.c +msgid "Streams:" +msgstr "" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "" + +#: src/xz/list.c +#, fuzzy +msgid "Compressed size:" +msgstr " Taille données avec compression : %s\n" + +#: src/xz/list.c +#, fuzzy +msgid "Uncompressed size:" +msgstr " Taille données sans compression : %s\n" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "" + +#: src/xz/list.c +msgid "Check:" +msgstr "" + +#: src/xz/list.c +#, fuzzy +msgid "Stream Padding:" +msgstr " Octets de rembourrage du flux : %s\n" + +#: src/xz/list.c +#, fuzzy +msgid "Memory needed:" +msgstr " Mémoire nécessaire : %s MiB\n" + +#: src/xz/list.c +#, fuzzy +msgid "Sizes in headers:" +msgstr " Tailles stockées dans l'en-tête : %s\n" + +#: src/xz/list.c +#, fuzzy +msgid "Number of files:" +msgstr " Nombre de fichiers : %s\n" + +#: src/xz/list.c +msgid "Stream" +msgstr "" + +#: src/xz/list.c +msgid "Block" +msgstr "" + +#: src/xz/list.c +msgid "Blocks" +msgstr "" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "" + +#: src/xz/list.c +msgid "CompSize" +msgstr "" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "" + +#: src/xz/list.c +#, fuzzy +msgid "TotalSize" +msgstr "Totaux :" + +#: src/xz/list.c +msgid "Ratio" +msgstr "" + +#: src/xz/list.c +msgid "Check" +msgstr "" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "" + +#: src/xz/list.c +msgid "Padding" +msgstr "" + +#: src/xz/list.c +msgid "Header" +msgstr "" + +#: src/xz/list.c +msgid "Flags" +msgstr "" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "" + +#: src/xz/list.c +msgid "Filters" +msgstr "" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Aucune" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Inconnue-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Inconnue-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Inconnue-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Inconnue-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Inconnue-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Inconnue-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Inconnue-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Inconnue-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Inconnue-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Inconnue-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Inconnue-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Inconnue-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s : Le fichier est vide" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s : Trop petit pour être un fichier xz valide." + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Flux Blocs Compressé Décompressé Ratio Vérif. Nom de fichier" + +#: src/xz/list.c +msgid "Yes" +msgstr "Oui" + +#: src/xz/list.c +msgid "No" +msgstr "Non" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +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 +#, 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 +msgid "Totals:" +msgstr "Totaux :" + +#: src/xz/list.c +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 +msgid "Try 'lzmainfo' with .lzma files." +msgstr "" + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list est incompatible avec la lecture sur l'entrée standard" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s : Erreur lors de la lecture des noms de fichiers : %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s : Fin des données inattendue lors de la lecture des noms de fichiers" + +#: src/xz/main.c +#, fuzzy, c-format +#| msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?" +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s : Caractère NULL détecté lors de la lecture des noms de fichiers ; peut-être pensiez-vous à `--files0' plutot qu'a `--files' ?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "La compression et la décompression ne marchent pas encore avec --robot." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Impossible de lire à la fois les données et les noms de fichiers depuis l'entrée standard" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s : " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Erreur interne (bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Impossible d'installer le gestionnaire de signaux" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Pas de données de vérification d'intégrité ; vérification non effectuée" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Méthode de vérification d'intégrité non prise en charge ; vérification non effectuée" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Limite d'utilisation mémoire atteinte" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Format de fichier inconnu" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Options non prises en charge" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Les données compressées sont corrompues" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Fin des données inattendue " + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB de mémoire sont nécessaires. La limite est désactivée." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB de mémoire sont nécessaires, la limite étant %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s : Enchaînement de filtres : %s\n" + +#: src/xz/message.c +#, fuzzy, c-format +#| msgid "Try `%s --help' for more information." +msgid "Try '%s --help' for more information." +msgstr "Éxécutez `%s --help' pour obtenir davantage d'informations." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"Utilisation : %s [OPTION]... [FICHIER]...\n" +"Compresse ou decompresse FICHIER(s) au format .xz.\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Les arguments obligatoires pour les options longues le sont aussi pour les\n" +"options courtes.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " Mode d'opération :\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +msgid "force compression" +msgstr "Limite d'utilisation pour la décompression : " + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +msgid "force decompression" +msgstr "Limite d'utilisation pour la décompression : " + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +" Modificateurs :\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "Impossible d'écrire vers la sortie standard" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --single-stream decompress only the first stream, and silently\n" +#| " ignore possible remaining input data" +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" +" --single-stream décompresser uniquement le premier flux et ignorer\n" +" silencieusement les données éventuellement restantes" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +" Options basiques de format de fichier et de compression :\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --ignore-check don't verify the integrity check when decompressing" +msgid "don't verify the integrity check when decompressing" +msgstr "" +" --ignore-check ne pas vérifier l'intégrité des données lors de\n" +" la décompression" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 ... -9 préréglage de compression : 6 par défaut ; pensez à\n" +" l'utilisation mémoire du compresseur *et* du décompresseur\n" +" avant d'utiliser 7, 8 ou 9 !" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme essayer d'améliorer la compression en utilisant davantage\n" +" de temps processeur ;\n" +" n'affecte pas les besoins mémoire du décompresseur" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, 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 "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +" -T, --threads=NB créer au plus NB fils de compression (1 par défault) ; la\n" +" valeur 0 est spéciale et équivaut au nombre de processeurs\n" +" de la machine" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-size=SIZE\n" +#| " start a new .xz block after every SIZE bytes of input;\n" +#| " use this to set the block size for threaded compression" +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" +" --block-size=TAILLE\n" +" débuter un bloc XZ après chaque TAILLE octets de données\n" +" d'entrée ; ce réglage sert pour la compression paralléle" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-list=SIZES\n" +#| " start a new .xz block after the given comma-separated\n" +#| " intervals of uncompressed data" +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" +" --block-list=TAILLES\n" +" débuter des blocs XZ après les TAILLES octets de données\n" +" spécifiées avec des virgules pour séparateur" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --flush-timeout=TIMEOUT\n" +#| " when compressing, if more than TIMEOUT milliseconds has\n" +#| " passed since the previous flush and reading more input\n" +#| " would block, all pending data is flushed out" +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +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 sont écrites" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" +" --no-adjust si les réglages de compression dépassent la limite\n" +" d'utilisation mémoire, renvoyer une erreur plutôt que de\n" +" diminuer les réglages" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +" Chaîne de filtres de compression personnalisée (en lieu des préréglages) :" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "compression mode" +msgstr " Mode d'opération :\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" Autres options :\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr " -Q, --no-warn les avertissements ne modifient pas le code de sortie" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr "" +" --robot utiliser des messages lisibles par un programme\n" +" (utile pour les scripts)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" +" --info-memory afficher la quantité totale de RAM ainsi que la limite\n" +" actuelle d'utilisation mémoire puis quitter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version afficher le numéro de version puis quitter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"Sans FILE ou quand FILE est -, lire l'entrée standard.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Signaler les bogues à <%s> (en anglais ou en finnois).\n" +"Signaler les bogues de traduction à .\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "Page du projet %s : <%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "CECI EST UNE VERSION DE DEVELOPPEMENT QUI NE DOIT PAS ÊTRE UTILISEE EN PRODUCTION." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "The supported filters and their options are:" +msgstr "Enchaînement ou options de filtres non pris en charge" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be `name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: Les options doivent être des paires `nom=valeur' séparées par des virgules" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s : Nom d'option invalide" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s : Valeur d'option invalide" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Préréglage LZMA1/LZMA2 non reconnu : %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +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 +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s : Le fichier a un suffixe inconnu, ignoré" + +#: src/xz/suffix.c +#, fuzzy, c-format +#| msgid "%s: File already has `%s' suffix, skipping" +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s : Le fichier a déjà le suffixe '%s', ignoré" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Suffixe de nom de fichier invalide" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s : La valeur n'est pas un entier décimal non négatif" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s : Suffixe multiplicateur invalide" + +#: src/xz/util.c +#, 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 "Les suffixes valides sont 'KiB' (2^10), 'MiB' (2^20) et 'GiB' (2^30)." + +#: src/xz/util.c +#, fuzzy, c-format +#| msgid "Value of the option `%s' must be in the range [%, %]" +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "La valeur de l'option '%s' doit être inclue entre % et %" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Les données compressées ne peuvent pas être lues depuis un terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Les données compressées ne peuvent pas être écrites dans un terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "%s: Too small to be a valid .xz file" +msgid "File is too small to be a .lzma file" +msgstr "%s : Trop petit pour être un fichier xz valide." + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Impossible d'écrire vers la sortie standard" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Erreur inconnue" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Options non prises en charge" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Enchaînement ou options de filtres non pris en charge" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s : Nom d'option invalide" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s : Suffixe multiplicateur invalide" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s : Format de fichier inconnu" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "Le filtre LZMA1 ne peut être utilisé avec le format .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "Le nombre maximal de filtres est quatre" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress forcer le mode compression\n" +#~ " -d, --decompress forcer le mode décompression\n" +#~ " -t, --test tester l'intégrité du fichier compressé\n" +#~ " -l, --list lister les informations sur les fichiers .xz" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep ne pas supprimer les fichiers d'entrée\n" +#~ " -f, --force forcer l'écrasement éventuel du fichier de sortie et\n" +#~ " (dé)compresser les liens symboliques\n" +#~ " -c, --stdout écrire sur la sortie standard et ne pas supprimer les\n" +#~ " fichiers d'entrée" + +#, 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" +#~ " --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" +#~ msgstr "" +#~ " --no-sparse ne pas créer de 'sparse file' lors de la décompression\n" +#~ " -S, --suffix=.SUF utiliser le suffixe `.SUF' pour les fichiers compressés\n" +#~ " --files[=FILE] lire les fichiers sur lesquels opérer depuis FILE ; si\n" +#~ " FILE est omis, ceux-ci sont lus depuis l'entrée standard\n" +#~ " et doivent être suivis d'un caractère retour à la ligne\n" +#~ " --files0[=FILE] comme --files mais avec un caractère null comme séparateur" + +#, 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'" +#~ msgstr "" +#~ " -F, --format=FMT format du fichier à encoder ou décoder ; sont acceptés :\n" +#~ " `auto' (par défaut), `xz', `lzma' et `raw'\n" +#~ " -C, --check=CHECK type de vérification d'intégrité : `none' (à utiliser avec\n" +#~ " précaution), `crc32', `crc64' (par défaut) ou `sha256'" + +#, fuzzy, no-c-format +#~ msgid "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ msgstr "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " règle la limite d'utilisation mémoire pour la compression,\n" +#~ " décompression ou les deux ; LIMIT est en octets,\n" +#~ " pourcentage de RAM, ou 0 pour la valeur par défaut" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1/2 ; OPTS est une liste d'options parmi les suivantes\n" +#~ " --lzma2[=OPTS] (entre parenthèses : valeurs valides et par défaut) :\n" +#~ " preset=PRE remettre les options à un préréglage (0-9[e])\n" +#~ " dict=NUM taille dictionnaire (4KiB - 1536MiB ; 8MiB)\n" +#~ " lc=NUM nombre de 'literal context bits' (0-4 ; 3)\n" +#~ " lp=NUM nombre de 'literal position bits' (0-4 ; 0)\n" +#~ " pb=NUM nombre de 'position bits' (0-4 ; 2)\n" +#~ " mode=MODE mode de compression (fast, normal ; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME 'match finder' (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM profondeur de recherche maximale ;\n" +#~ " 0=automatique (par défaut)" + +#, 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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ msgstr "" +#~ "\n" +#~ " --x86[=OPTS] filtre BCJ x86 (32-bit et 64-bit)\n" +#~ " --powerpc[=OPTS] filtre BCJ PowerPC ('big endian' uniquement)\n" +#~ " --ia64[=OPTS] filtre BCJ IA-64 (Itanium)\n" +#~ " --arm[=OPTS] filtre BCJ ARM ('little endian' uniquement)\n" +#~ " --armthumb[=OPTS] filtre BCJ ARM-Thumb ('little endian' uniquement)\n" +#~ " --sparc[=OPTS] filtre BCJ SPARC\n" +#~ " OPTS valides pour tous les filtres BCJ :\n" +#~ " start=NUM position de début de la conversion (défaut=0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=OPTS] Filtre delta ; OPTS valides (vals. valides ; par défaut) :\n" +#~ " dist=NUM distance entre les octets soustraits les\n" +#~ " uns aux autres (1-256 ; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet masquer les avertissements ; spécifier deux fois pour\n" +#~ " aussi masquer les erreurs\n" +#~ " -v, --verbose être bavard ; spécifier deux fois pour l'être davantage" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help afficher l'aide courte (ne liste que les options de base)\n" +#~ " -H, --long-help afficher l'aide longue (ceci) puis quitter" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help afficher l'aide courte (ceci) puis quitter\n" +#~ " -H, --long-help afficher l'aide longue (liste aussi les options avancées)" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "Echec de l'activation de la sandboxe" + +#~ msgid "The selected match finder requires at least nice=%" +#~ msgstr "Le `match finder' choisi nécessite au moins nice=%" + +#~ 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" + +#~ msgid "Sandbox was successfully enabled" +#~ msgstr "La sandboxe a été activée avec succès" + +#~ msgid "Memory usage limit for compression: " +#~ msgstr "Limite d'utilisation pour la compression : " + +#~ msgid " Streams: %s\n" +#~ msgstr " Flux : %s\n" + +#~ msgid " Blocks: %s\n" +#~ msgstr " Blocs : %s\n" + +#~ msgid " Ratio: %s\n" +#~ msgstr " Ratio : %s\n" + +#~ msgid " Check: %s\n" +#~ msgstr " Vérification : %s\n" + +#~ msgid "" +#~ " Streams:\n" +#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" +#~ msgstr "" +#~ " Flux :\n" +#~ " Flux Blocs PositionComp PositionDécomp TailleComp TailleDécomp Ratio Vérif. Bourrage" + +#~ msgid "" +#~ " Blocks:\n" +#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check" +#~ msgstr "" +#~ " Blocs :\n" +#~ " Flux Bloc PositionComp PositionDécomp TailleTot TailleDécomp Ratio Vérif." + +#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" +#~ msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres" + +#~ msgid "Error setting O_NONBLOCK on standard input: %s" +#~ msgstr "Impossible d'établir le drapeau O_NONBLOCK sur la sortie standard : %s" + +#~ msgid "Error setting O_NONBLOCK on standard output: %s" +#~ msgstr "Impossible d'activer le drapeau O_NONBLOCK sur la sortie standard : %s" diff --git a/cpp/third_party/xz-5.8.3/po/hr.gmo b/cpp/third_party/xz-5.8.3/po/hr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..e43f132de575467c6f0c3d2d39a85405f382dd91 GIT binary patch literal 28799 zcmb`P3!Gh7UGH~G9}o~qDWyE!DNSdl&6!TpHnfwb?IfAB(=;o&w;FaLB!5X*~+~+X{hq%8F{C4mma2xnx zfBzNmMchC8vLLt$ybinud?l!QZvvkQzS}>4Ke(OyuYr2s70;y&I1XL`rr`6z2f!DC zzY6k-;6vaGz|Vmp_@w7KyaHU|eiBssUja4GkAmai=RnPWE1haQcY#-e_kybbvmjN1 z4}d$tzXkQ4%lM=3uLqw69s@PrHh2^G{ou9WBj6tJE8uzHwG3MCy8(PUn1Yvp_kt`} z@FQRkd=RXI&xLp)crU1R_(@Q7d?$E5_!0m72=fD~8LKa2!UIwcD-5~4{ z)WI!a%io^_wJxs##TW1L_n!te|BFI5zN^6r?r#FcYxjbx{}A{z@GC8+Q1p8#sP%mr zsD4_Y`ssn1@0&oaqS?(=Lf;_xxWV-2A9AN_$E-}ln~txoDV{RU>X!% zI-uxs3Kac*7`zdD2dMXd64ZOY3W`oorE^#(*aoWKec+S8+re|eJ3+0>jQ{@Cpw{Dc z9^VSWs=?3s?@xoG_aA}J054!M^}b6%)w>!L-ERjqzSn?y-w%Nof)9X@Gj*dj&6^E8vj$TcH_GU6u)c*)z2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a7SeQrxYt=sj+dvoI+sT$hKG$T8WAKP@;f`eOb;ha0i01F$M=SNqdIeL&K z(N7N+?WZW(J1X4K0j@J~b-z2%u8gE^IpnAs{s2~u-ySeidGf_rpy(5ffJHWzmwHF% zFbulWuMo(hqf{Ly=r;(gB?%fcAYQp`be5H)rXQ;aCDfX%tc`#P4yjqx(3 z1mu7u1>QLEYXYxi==66y9*!CGiW*yAn(9)s$-z-JT`vH$A_ZR z#>X1}S7iQ5NTz_73^8L;TAG}AlcAa_?Q7>4*TNkg$Qt?)LyVcry%js1$&VN;0%M{T z+7g0!1&Mkvw*lV<2C3G;NQpF@{>XDmxRw5g4g9X5!T(@tc{7Y}&&>ZaJ&@T|qWw5} zL`&a1E-%gWy)G6AVUaDIH%>51G|?~^Z)g0_O(q0Pmcg<(99TSFh6+3@6u$goTEk9I z-LjACY=2PwMT7PXHv2`x;i>+$JNYkVruw`1KMhb)m=X7T`1}VZ`LEUaL6Cm0aTdQo bM}6KM9303jcn+bjGL-iA, 2020-2025. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: xz 5.8.0-pre1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-03-26 21:00-0700\n" +"Last-Translator: Božidar Putanec \n" +"Language-Team: Croatian \n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: vim9.1\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: nevaljani argument za --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Previše argumenata za --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "Uz '--block-list' nedostaje veličina bloka iza broja lanca filtra '%c:'" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "za '--block-list' može se koristiti '0' samo kao posljednji element" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Nepoznata vrsta formata datoteke" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Nepodržani način (tip) provjere integriteta" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Samo jedna datoteka može biti specificirana s '--files' ili '--files0'." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Varijabla okruženja '%s' sadrži previše argumenata" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Podrška za kompresiju bila je onemogućena tijekom kompilacije" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Podrška za dekompresiju bila je onemogućena tijekom kompilacije" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Kompresija LZIP datoteka (.lz) nije podržana" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "'--block-list' je zanemaren (vrijedi samo za komprimiranje u .xz format)" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Uz opciju '--format=raw', '--suffix=.EXT' je nužan (osim ako ne piše na standardni izlaz)" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Maksimalni broj filtara je četiri" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Greška u opciji '--filters%s=FILTRI':" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Za danu postavku filtara treba više memorije (granica upotrebe memorije je preniska)" + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "lanac filtra %u koristi se za '--block-list', ali nije naveden s '--filters%u='" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Ne preporučuje se koristiti početne (preset) postavke u sirovom načinu rada." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Točne opcije početnih (preset) postavki mogu se razlikovati ovisno od verzije do verzije softvera." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Samo LZMA1 filtar podržava format .lzma" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "Ne može se koristi LZMA1 s .xz formatom" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Lanac filtra %u nije kompatibilan s '--flush-timeout'" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Prelazimo na način rada s jednom dretvom zbog '--flush-timeout'" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Nepodržane opcije u lancu filtra %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Koristimo do % dretvi." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Nepodržani lanac filtara ili opcija filtara" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Za dekompresiju će trebati %s MiB memorije." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Smanjen je broj dretvi od %s na %s da ne prekorači granicu upotrebe memorije od %s MiB" + +#: src/xz/coder.c +#, 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 "Smanjen je broj od %s na jednu dretvu, ali granica od %s MiB automatske upotrebe memorije još uvijek je prekoračena. Potrebno je %s MiB memorije. Ipak nastavljamo dalje." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Prelazimo na način rada s jednom dretvom da ne prekoračimo granicu upotrebe memorije od %s MiB" + +#: src/xz/coder.c +#, 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 "Veličina LZMA%c rječnika prilagođena je od %s na %s da se ne prekorači granica upotrebe memorije od %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Veličina LZMA%c rječnika prilagođena je za '--filters%u' od %s na %s da ne prekorači granicu upotrebe memorije od %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Greška pri prebacivanju na lanac filtra %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Greška pri stvaranju cijevi: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() nije uspjela: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Izgleda da je datoteka premještena -- nije izbrisana" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "Brisanje %s nije moguće: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Nije moguće promijeniti vlasnika datoteke: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Nije moguće promijeniti grupu datoteke: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Nije moguće postaviti prava dostupa datoteci: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Nije uspjelo sinkronizirati datoteku: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Nije uspjelo sinkronizirati direktorij datoteke: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Greška pri pokušaju dobivanja oznaka statusa datoteke iz standardnog ulaza: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: To je simbolična poveznica -- preskočeno" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: To je direktorij -- preskočeno" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: To nije regularna datoteka -- preskočeno" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Datoteka ima postavljen SETUID- ili SETGID bit -- preskočeno" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Datoteka ima postavljen ljepljivi bit -- preskočeno" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Ulazna datoteka ima više od jednog tvrdog linka -- preskočeno" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Prazna datoteka -- preskočeno" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Greška pri vraćanju statusnih flags na standardni ulaz: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Greška pri dobivanju oznaka statusa datoteke iz standardnog izlaza: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Nije uspjelo otvoriti direktorij: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Odredište nije obična datoteka" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Greška pri vraćanju 'O_APPEND' oznaka na standardni izlaz: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Nije uspjelo zatvoriti datoteku: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: 'Seeking' (traženje) nije uspjelo pri pokušaju stvaranja raštrkane datoteke: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Greška pri čitanju: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Greška pri 'seeking' (traženju) datoteke: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Neočekivani kraj datoteke" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Greška pri pisanju: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Onemogućeno" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Količina fizičke memorije (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Broj dretvi procesora:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Kompresija:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Dekompresija:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Dekompresija s više dretvi:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Zadano za -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Informacije o hardveru:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Granica za korištenje memorije:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Tokovi:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blokovi:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Komprimirana veličina:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Dekomprimirana veličina:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Omjer:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Kontrola:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Dopuna toka:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Potrebna memorija:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Veličine u zaglavljima:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Količina datoteka:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Tok" + +#: src/xz/list.c +msgid "Block" +msgstr "Blok" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blokovi" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "KomprOdmak" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "DekomprOdmak" + +#: src/xz/list.c +msgid "CompSize" +msgstr "KomprVeličina" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "DekomprVeličina" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "TotalVeličina" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Omjer" + +#: src/xz/list.c +msgid "Check" +msgstr "Kontrola" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "KontrVrijedn" + +#: src/xz/list.c +msgid "Padding" +msgstr "Dopuna" + +#: src/xz/list.c +msgid "Header" +msgstr "Zaglavlje" + +#: src/xz/list.c +msgid "Flags" +msgstr "Flags" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "MemUpotreba" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtri" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Nijedan" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Nepoznat-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Nepoznat-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Nepoznat-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Nepoznat-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Nepoznat-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Nepoznat-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Nepoznat-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Nepoznat-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Nepoznat-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Nepoznat-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Nepoznat-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Nepoznat-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Datoteka je prazna" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Datoteka je premala da bude valjana .xz datoteka" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr " Tok Blok Komprimirano Dekomprimir Omjer Kontr Datoteka" + +#: src/xz/list.c +msgid "Yes" +msgstr "Da" + +#: src/xz/list.c +msgid "No" +msgstr "Ne" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Minimalna verzija programa XZ:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s datoteka\n" +msgstr[1] "%s datoteke\n" +msgstr[2] "%s datoteka\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Ukupno:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "'--list' radi samo sa .xz datoteke (--format=xz ili --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Pokušajte s ‘lzmainfo’ s .lzma datotekama." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "'--list' ne podržava čitanje iz standardnog izlaza" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Greška pri čitanju datoteka: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Neočekivani kraj ulaznih podataka tijekom čitanja imena datoteka" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Prazni NULA-znak pronađen pri čitanju imena datoteka; možda ste mislili koristiti '--files0' umjesto '--files'?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Komprimiranje i dekomprimiranje s '--robot' još nije podržano." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Nije moguće čitati podatke iz standardnog ulaza dok se čitaju imena datoteka iz standardnog ulaza" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Interna greška (bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Nije moguće uspostaviti rukovatelje signala" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Nema provjere integriteta -- ne provjeravamo integritet datoteke" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Nepodržani tip provjere integriteta -- ne provjeravamo integritet datoteke" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Dostignuta je granica za upotrebu memorije" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Format datoteke nije prepoznat" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Nepodržane opcije" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Komprimirani podaci su oštećeni" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Neočekivani kraj ulaznih podataka" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s Potrebno je MiB memorije. Ograničenja su onemogućena." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s Potrebno je MiB memorije. Ograničenje je %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Lanac filtara: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Pokušajte s '%s --help’ za pomoć i više informacija." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Greška prilikom ispisa teksta pomoći (kod greške %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Uporaba: %s [OPCIJA...][DATOTEKA...]\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Komprimira ili dekomprimira DATOTEKE u .xz formatu." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Obvezni argumenti za duge opcije, obvezni su i za kratke opcije." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Način rada:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "prisilna kompresija" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "prisilna dekompresija" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "provjera integriteta komprimirane datoteke" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "prikaz informacija o .xz datotekama" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Modifikatori načina rada:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "sprema ulazne datoteke (ne brisati ih)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "prisilno piše preko izlazne datoteke i (de)komprimira linkove" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "ispiše na standardni izlaz i zadrži ulazne datoteke" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "ne sinkronizira izlaznu datoteku s uređajem za pohranu podataka dok ne izbriše ulaznu datoteku" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "dekomprimira samo prvi tok i tiho ignorira moguće preostale ulazne podatke" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "ne stvara raspršene datoteke kad komprimira" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".EXT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "koristi sufiks '.EXT' na komprimiranim datotekama" + +#: src/xz/message.c +msgid "FILE" +msgstr "DATOTEKA" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "imena datoteka koje treba obraditi čita iz DATOTEKA; ako DATOTEKA nije navedena, imena datoteka čita iz standardnog ulaza; svako ime datoteke mora završiti sa znakom novog retka (newline)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "kao '--files', ali s NULA-znakom (null character, Unicode U+0000) kao završetak imena" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Osnovni format datoteke i opcije za kompresiju:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMAT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "format datoteke za kodiranje ili dekodiranje; moguće vrijednosti su 'auto' (zadano), 'xz', 'lzma', 'lzip' i 'raw'" + +#: src/xz/message.c +msgid "NAME" +msgstr "IME" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "vrsta provjere integriteta: 'none' (koristite s oprezom), 'crc32', 'crc64' (zadano) ili 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "ne verificira provjeru integriteta pri dekompresiji" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "početna postavka kompresije (zadano je 6); razmotrite upotrebu memorije za komprimiranje *i* dekomprimiranje prije upotrebe 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "pokuša poboljšati omjer kompresije koristeći više vremena procesora (CPU); ne utječe na potrebnu memoriju za dekompresiju" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "BROJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "koristi maksimalno ovaj BROJ dretvi; zadano je 0, što znači da koristi toliko dretvi, koliko procesor ima jezgri" + +#: src/xz/message.c +msgid "SIZE" +msgstr "VELIČINA" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "započne novi .xz blok nakon svakih toliko (\"VELIČINA) bajtova ulaznih bajtova; to koristite da postavite veličinu bloka za kompresiju s nekoliko dretvi (tokova)" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOKOVI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "započne novi .xz block nakon te veličina (BLOKOVI) nekomprimiranih podataka odvojenih zarezima; opcionalno, navedite lance filtra broj (0-9) iza kojeg slijedi ':' a prije veličine nekomprimiranih podataka" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "ako se pri komprimiranju potroši više od NUM milisekundi od prethodnog pražnjenja, a daljnje čitanje bi blokiralo ulaz, isprazni sve podatke na čekanju" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "OGRANIČENJE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "postavi ograničenje na količinu memorije za kompresiju, dekompresiju, dekompresiju s dretvama, ili za sve to; OGRANIČENJE je u bajtovima, % od RAM-a, ili 0 za zadano" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "ako dane postavke kompresije prekorače ograničenje upotrebe memorije, završi s greškom umjesto da prilagodi postavke shodno ograničenju memorije" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Prilagođeni lanac filtra za kompresiju (alternativa korištenju početnih postavki):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTRI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "postavi lanac filtra koristeći liblzma filtar string sintaksu; upotrebite '--filters-help' za više informacija" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "postavite dodatne lance filtra koristeći liblzma filtar sintaksu s '--block-list'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "pokaže više informacija za liblzma filtar sintaksu" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPCIJE" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 ili LZMA2; OPCIJE je lista od nula ili više, zarezom odvojenih opcija (valjane vrijednosti; zadano):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "PočP" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "vrati opcije na početne postavke" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "veličina rječnika" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "broj kontekstnih bitova po bajtu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "broj pozicijskih bitova po bajtu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "broj pozicijskih bitova" + +#: src/xz/message.c +msgid "MODE" +msgstr "NAČIN" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "način kompresije" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "lijepa duljina podudaranja" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "tražilica podudaranja" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "maksimalna dubina traženja; 0=automatic (zadano)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ filtar (32-bit and 64-bit)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ filtar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ filtar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ filtar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ filtar (samo veliki endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ filtar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ filtar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ filtar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Valid OPTS za sve BCJ filtre:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "početni pomak za konverzije (zadano=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Delta filtar; valjane OPCIJE (valjane vrijednosti; zadano:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "razmak između bajtova koji se oduzimaju jedan od drugog" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Ostale opcije:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "potisne upozorenja; navedite dva puta da potisnete i pogreške" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "objašnjava što radi; navedite dva put za još više informacija" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "upozorenja nemaju utjecaja na izlazni status" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "koristite poruke za računalnu obradu (korisno za skripte)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "pokaže ukupnu količinu RAM-a i trenutno aktivna ograničenja korištenja memorije, pa iziđe" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "ispiše kratku pomoć (popis osnovnih opcija)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "ispiše ovu opširnu pomoć i iziđe" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "ispiše ovu kratku pomoć i iziđe" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "ispiše opširnu pomoć (također i popis naprednih opcija)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "pokaže informacije o inačici" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Ako DATOTEKA nije navedena ili je '-' (crtica), čita standardni ulaz." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Greške prijavite na <%s> (na engleskom ili finskom).\n" +"Prijavite greške u prijevodu na ." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s matična mrežna stranica: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "OVO JE RAZVOJNA INAČICA I NIJE NAMIJENJENA ZA PROIZVODNJU." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Lanci filtara postavljaju se pomoću '--filters=FILTERS' ili '--filters1=FILTERS ... --filters9=FILTERS' opcije. Svaki filter u lancu može biti odvojen s razmakom ili s '--' (dvije crtice). Alternativno, početna postavka %s može biti navedena umjesto lanca filtra." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Podržani filtri i njihove opcije su:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Opcije moraju biti parovi 'name=value' odvojeni zarezima" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Nevaljano ime opcije" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Nevaljana vrijednost opcije" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Nepodržana LZMA1/LZMA2 početna postavka: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Zbroj lc i lp ne smije biti veći od 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Ime datoteke nema poznatu ekstenziju, preskačemo" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Datoteka već ima '%s' ekstenziju, preskačemo" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Nevaljana ekstenzija u imenu datoteke" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Vrijednost nije nula ili pozitivni dekadski cijeli broj" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Nevaljani sufiks-množitelj" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Valjani sufiks-množitelji su 'KiB' (2^10), 'MiB' (2^20), i 'GiB' (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Vrijednost opcije '%s' mora biti u rasponu [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Nije moguće čitati komprimirane podatke iz terminala" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Nije moguće pisati komprimirane podatke na terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Uporaba: %s [--help] [--version] [DATOTEKA...]\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Pokaže informacije pohranjene u zaglavlju datoteke .lzma." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Datoteka je premala da bude .lzma datoteka" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "To nije .lzma datoteka" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Pisanje na standardni izlaz nije uspjelo" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Nepoznata greška" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Nepodržane početne opcije" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Nepodržani flag u početnoj opciji" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Nevaljano ime opcije" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Vrijednost opcije ne može biti prazna" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Vrijednost je izvan granica" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Ova opcija ne podržava upotrebu sufiks-množitelja" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Nevaljani sufiks-množitelj (KiB, MiB, or GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Nepoznato ime filtra" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Ovaj filtar ne može se koristi u .xz formatu" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Dodjela memorije nije uspjela" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Prazan string nije dopušten, pokušajte s '6' ako je potrebna zadana vrijednost" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Maksimalni broj filtara je četiri" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Nema imena filtra" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Nevaljani lanac filtra (nema 'lzma2’ na kraju)?" diff --git a/cpp/third_party/xz-5.8.3/po/hu.gmo b/cpp/third_party/xz-5.8.3/po/hu.gmo new file mode 100644 index 0000000000000000000000000000000000000000..800f812947af292c8cb65964565ad13ef4ed75e7 GIT binary patch literal 15949 zcmb`NdvIJ=eaA1vybL4|0txR!5+R#tHwiGL|B_YX%m?q)w?$zpQ@7}w) z_pa<+LJ7}6c_c0+G#Nt2=_B=k2T~V9Axwwastm78TmEPZ^p&9uo#|r+XqnD1LqETB z&fUE$TZ+x}j?RAX<2--w^E>*-%Qt=US&rj8LK&tw&vBgZ0e|%Z$9XpRnim@!0=HA- z`ZQPs9|d=S-vKWNFS*olHi54Ip9{Vkd^vbE_y%yN#iQUL&-a3_2miq0Ux2UU`A6WJ zz)LQ3oa@0NH~`)Sz7%}Feg6c0bg5zh~R^8VA{ zR`9zZta5$TCvO-3pup2SG^Ugy0tNeW1wS=Rld?Q=rWIZ^4_uAA>TU z;z!!;0!3bCLD7K_ly%<&ZUP?zWxbDE{4yx~|0XEw`Y|Z;yawTud0q#~{6@f|;7;%{ z@Dm`Sg*(-%8Yy!<_gs5(CaVU6<(P*ndilvTdJ*5Ve6+brH} zaSD|27A)RnamiwA@m`A`wD=%+HSHb&MgPABq7u$eKv~Z(L6OgEl=<#~GQS7GTfjdC z$H0FBgDR>3{s7rVFaHh{x^IKYqTgju`uhwh<9rT02!6?a z-*l51_s!r-cs~aU{mP)|O%s&$ehL&hd)(rmTKu}jr!4*ed?EFIV)5q|Wis;qMHa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9r#?X@q&Qd#dW3^jZH{vExO+p{kbtvJ)f zcsj)-XHmI_(fq@<{KNMA!wtEIe3N{Oe4QP+`Zwn8cjoSI((WJ=SRq0FlxnT;>4;DK zN4`Pc)7yNc*#dV(qIS+87xc+)ZM$1)9ZL}VozvTTjxoz~T(E;YzrOWi0|Jbe{HKO& z*d@O!>ay&T2qw){B&@Fz>@9nQBOH2Z6WC28@Xu;mL?slEOe6YWGl1A$5oV6TL}s&t zFy62Ww{JKM(~8DRPQ&a=eIBOG3$IPuxJy-P>wT(8FSrsw=Fh@RUV`*d*pgM$@G-G_n{$!F!YnBy+r|6|8nntzC$REFUif^Wtyr*bJ_tY3jooiD, 2019, 2022, 2024. +msgid "" +msgstr "" +"Project-Id-Version: xz 5.6.0-pre2\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2024-02-17 18:35+0100\n" +"Last-Translator: Meskó Balázs \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"plural-forms: nplurals=2; plural=(n != 1);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.4\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Érvénytelen argumentum a --block-list kapcsolóhoz" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Túl sok argumentum a --block-list kapcsolóhoz" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "A --block-list kapcsolónál hiányzik a blokkméret a(z) „%c:” szűrőláncszám után" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "A 0 csak utolsó elemként használható a --block-list kapcsolónál" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Ismeretlen fájlformátumtípus" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Nem támogatott integritás-ellenőrzési típus" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Csak egy fájl adható meg a „--files” vagy „--files0” kapcsolóknál." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "A(z) %s környezeti változó túl sok argumentumot tartalmaz" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "A tömörítési támogatás ki lett kapcsolva fordítási időben" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "A kibontási támogatás ki lett kapcsolva fordítási időben" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Az lzip-fájlok (.lz) tömörítése nem támogatott" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "A --block-list kapcsoló csak .xz formátum esetén van figyelembe véve" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "A --format=raw esetén a --suffix=.SUF szükséges, hacsak nem a szabványosra kimenetre ír" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "A szűrők legnagyobb száma négy" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Hiba a --filters%s=SZŰRŐK kapcsolóban:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "A memóriahasználat túl alacsony a megadott szűrőbeállításokhoz." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "A --block-list használja a(z) %u. szűrőláncot, de az nincs megadva a --filters%u= kapcsolóval" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Az előbeállítások használata nyers módban nem javasolt." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Az előbeállítások pontos beállításai különbözhetnek a szoftververziók között." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Az .lzma formátum csak az LZMA1 szűrőt támogatja" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "Az LZMA1 nem használható az .xz formátummal" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "A(z) %u. szűrőlánc nem kompatibilis a --flush-timeout kapcsolóval" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Egyszálú módra váltás a --flush-timeout kapcsoló miatt" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Nem támogatott kapcsolók a(z) %u szűrőláncban" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Legfeljebb % szál használata." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Nem támogatott szűrőlánc vagy szűrőkapcsolók" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "A kibontáshoz %s MiB memória szükséges." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "A szálak számának csökkentése erről: %s, erre: %s, hogy ne lépje túl a(z) %s MiB-os korlátot" + +#: src/xz/coder.c +#, 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 "A szálak számának csökkentése erről: %s, egyre. A(z) %s MiB-os automatikus memóriahasználati korlát így is túl lett lépve. %s MiB memória szükséges. Ennek ellenére folytatás mindenképpen." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Egyszálú módra váltás, hogy ne lépje túl a(z) %s MiB-os memóriahasználati korlátot" + +#: src/xz/coder.c +#, 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 "Az LZMA%c szótár méretének módosítása erről: %s MiB, erre: %s MiB, hogy ne lépje túl a(z) %s MiB-os korlátot" + +#: src/xz/coder.c +#, c-format +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 "A --filters%2$u szűrőhöz tartozó LZMA%1$c szótár méretének módosítása %3$s MiB-ról %4$s MiB-ra, hogy ne lépje túl a(z) %5$s MiB-os korlátot" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Hiba a(z) %u. szűrőlánc létrehozásakor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Hiba a csővezeték létrehozásakor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() sikertelen: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Úgy tűnik, hogy a fájl át lett helyezve, nincs eltávolítás" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Nem távolítható el: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: A fájl tulajdonosa nem adható meg: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: A fájl csoportja nem adható meg: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: A fájl jogosultságai nem adhatók meg: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: A fájl lezárása sikertelen: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: A fájl lezárása sikertelen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Hiba a fájl állapotjelzőinek lekérdezésekor a szabványos bemenetről: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Szimbolikus link, kihagyás" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Könyvtár, kihagyás" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Nem szabályos fájl, kihagyás" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: A fájlon setuid vagy setgid bit van beállítva, kihagyás" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: A fájlon sticky bit van beállítva, kihagyás" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: A bemeneti fájlhoz több mint egy hard link tartozik, kihagyás" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Üres fájlnév, kihagyás" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Hiba a fájl állapotjelzőinek visszaállításakor a szabványos bemenetre: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Hiba a fájl állapotjelzőinek lekérdezésekor a szabványos kimenetről: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s: A fájl lezárása sikertelen: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s: Nem szabályos fájl, kihagyás" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Hiba az O_APPEND visszaállításakor a szabványos kimenetre: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: A fájl lezárása sikertelen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: A pozícionálás sikertelen a ritka fájl létrehozásának kísérletekor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Olvasási hiba: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Hiba a fájlban pozícionáláskor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Váratlan fájlvég" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Írási hiba: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Letiltva" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Fizikai memória (RAM) mennyisége:" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Processzorszálak száma:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Tömörítés:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Kibontás:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Többszálás kibontás:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "A -T0 alapértelmezése:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Hardverjellemzők:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Memóriahasználat korlátja:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Adatfolyamok:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blokkok:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Tömörített méret:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Kibontott méret:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Arány:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Ellenőrzés:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Adatfolyam kerete:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Szükséges memória:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Méretek a fejlécekben:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Fájlok száma:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Adatfolyam" + +#: src/xz/list.c +msgid "Block" +msgstr "Blokk" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blokkok" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "Tömörített eltolás" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "Kibontott eltolás" + +#: src/xz/list.c +msgid "CompSize" +msgstr "Tömörített méret" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "Kibontott méret" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "Teljes méret" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Arány" + +#: src/xz/list.c +msgid "Check" +msgstr "Ellenőrzés" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "Ellenőrzőérték" + +#: src/xz/list.c +msgid "Padding" +msgstr "Keret" + +#: src/xz/list.c +msgid "Header" +msgstr "Fejléc" + +#: src/xz/list.c +msgid "Flags" +msgstr "Jelzők" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "Memóriahasználat" + +#: src/xz/list.c +msgid "Filters" +msgstr "Szűrők" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Nincs" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Névtelen-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Névtelen-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Névtelen-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Névtelen-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Névtelen-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Névtelen-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Névtelen-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Névtelen-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Névtelen-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Névtelen-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Névtelen-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Névtelen-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: A fájl üres" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Túl kicsi, hogy érvényes .xz fájl legyen" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Folyam Blokkok Tömörített Kibontott Arány Ellenőrzés Fájlnév" + +#: src/xz/list.c +msgid "Yes" +msgstr "Igen" + +#: src/xz/list.c +msgid "No" +msgstr "Nem" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +msgstr " Legkisebb XZ Utils verzió: %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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s fájl\n" +msgstr[1] "%s fájl\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Összesen:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "A --list csak .xz fájlokkal működik (--format=xz vagy --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Az „lzmainfo” kipróbálása az .lzma fájlok esetén." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "A --list nem támogatja a szabványos bemenetről beolvasást" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Hiba a fájlnevek olvasásakor: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: A bemenet váratlanul véget ért a fájlnevek olvasásakor" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Null karakter található a fájlnevek olvasásakor; talán a „--files0” kapcsolóra gondolt a „--files” helyett?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "A tömörítés és kibontás még nem támogatott a --robot kapcsolóval." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Az adatok nem olvashatók be a szabványos bemenetről a fájlnevek olvasásakor" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Belső hiba (bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "A szignálkezelők nem hozhatók létre" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Nincs integritás-ellenőrzés; a fájl épsége nem lesz ellenőrizve" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Nem támogatott integritás-ellenőrzési típus; a fájl épsége nem lesz ellenőrizve" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Memóriahasználat korlátja elérve" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "A fájlformátum nem felismert" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Nem támogatott kapcsolók" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "A tömörített adatok megsérültek" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "A bemenet váratlanul véget ért" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB memória szükséges. A korlátozás letiltva." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB memória szükséges. A korlát %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Szűrőlánc: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "További információkért adja ki a következő parancsot: „%s --help”." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"Használat: %s [KAPCSOLÓ]... [FÁJL]...\n" +".xz formátumú FÁJLok tömörítése vagy kibontása.\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "A hosszú kapcsolók kötelező argumentumai a rövid kapcsolók esetén is kötelezők.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " Működési mód:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force compression" +msgstr "Kibontás:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force decompression" +msgstr "Kibontás:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +" Műveleti módosítók:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "A szabványos kimenetre írás sikertelen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --single-stream decompress only the first stream, and silently\n" +#| " ignore possible remaining input data" +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" +" --single-stream csak az első adatfolyam kibontása, és a\n" +" lehetséges hátralévő bemeneti adatok mellőzése" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +" Alapvető fájlformátum és tömörítési beállítások:\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --ignore-check don't verify the integrity check when decompressing" +msgid "don't verify the integrity check when decompressing" +msgstr " --ignore-check kibontáskor ne ellenőrizze az épséget" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 ... -9 tömörítési előbeállítás; alapértelmezett a 6;\n" +" a 7-9 használata előtt vegye figyelembe a tömörítő\n" +" *és* kibontó memóriahasználatát!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme a tömörítési arány javítási kísérlete több CPU-idő\n" +" használatával; nincs hatással a kibontó memóriaigényére" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n" +#| " as many threads as there are processor cores" +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +" -T, --threads=SZÁM legfeljebb ennyi szál használata; alapértelmezett a 0,\n" +" amely annyi szálat használ, amennyi processzormag áll\n" +" rendelkezésre" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-size=SIZE\n" +#| " start a new .xz block after every SIZE bytes of input;\n" +#| " use this to set the block size for threaded compression" +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" +" --block-size=MÉRET\n" +" új .xz blokk indítása minden MÉRETnyi bájt bemenet után;\n" +" a többszálas tömörítés blokkméretének megadásához" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-list=BLOCKS\n" +#| " start a new .xz block after the given comma-separated\n" +#| " intervals of uncompressed data; optionally, specify a\n" +#| " filter chain number (0-9) followed by a ':' before the\n" +#| " uncompressed data size" +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" +" --block-list=BLOKKOK\n" +" új .xz blokk indítása a vesszőkkel felsorolva megadott\n" +" méretű tömörítetlen adatszakaszok után; a tömörítetlen\n" +" adatok mérete előtt egy szűrőláncszám (0-9) is megadható\n" +" egy „:” karakter közbeiktatásával" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --flush-timeout=TIMEOUT\n" +#| " when compressing, if more than TIMEOUT milliseconds has\n" +#| " passed since the previous flush and reading more input\n" +#| " would block, all pending data is flushed out" +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" +" --flush-timeout=IDŐTÚLLÉPÉS\n" +" tömörítéskor, ha több mint IDŐTÚLLÉPÉS ezredmásodperc\n" +" telt el az előző kiírástól, és a bemenetolvasás\n" +" blokkolna, akkor minden adat ki lesz írva" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" +" --no-adjust ha a tömörítési beállítások túllépik a memóriahasználati\n" +" korlátot, akkor hibát fog adni a beállítások lefelé\n" +" állítása helyett" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +" Egyéni szűrőlánc a tömörítéshez (alternatíva az előbeállításokra):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " --filters=FILTERS set the filter chain using the liblzma filter string\n" +#| " syntax; use --filters-help for more information" +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" +"\n" +" --filters=SZŰRŐK a szűrőlánc beállítása liblzma szűrőformátummal;\n" +" további információkért lásd a --filters-help kapcsolót" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters1=FILTERS ... --filters9=FILTERS\n" +#| " set additional filter chains using the liblzma filter\n" +#| " string syntax to use with --block-list" +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" +" --filters1=SZŰRŐK ... --filters9=SZŰRŐK\n" +" további szűrőláncok beállítása liblzma formátummal a\n" +" --block-list kapcsolóhoz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters-help display more information about the liblzma filter string\n" +#| " syntax and exit." +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" +" --filters-help további információk megjelenítése a libzma\n" +" szűrőformátumról, majd kilépés." + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Number of processor threads:" +msgid "number of position bits" +msgstr "Processzorszálak száma:" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "compression mode" +msgstr "Kibontás:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" Egyéb kapcsolók:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr "" +" -Q, --no-warn a figyelmeztetések nem befolyásolják a kilépési\n" +" állapotkódot" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr "" +" --robot géppel értelmezhető üzenetek használata\n" +" (parancsfájlok esetén hasznos)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" +" --info-memory az összes RAM mennyiségének és a jelenlegi\n" +" memóriahasználati korlátok megjelenítése, és kilépés" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version a verziószám kiírása és kilépés" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"FÁJL nélkül, vagy ha a FÁJL -, olvasás a szabványos bemenetről.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Ide jelentse a hibákat: <%s> (angolul vagy finnül).\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "%s honlap: <%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "EZ EGY FEJLESZTŐI VÁLTOZAT, NEM ÉLES HASZNÁLATRA SZÁNT." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy, c-format +#| 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" +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" +"A szűrőláncokat a --filters=SZŰRŐK vagy a\n" +"--filters1=SZŰRŐK ... --filters9=SZŰRŐK kapcsolókkal lehet megadni. A láncban\n" +"szereplő egyes szűrőket szóközökkel vagy „--” karakterekkel kell elválasztani.\n" +"Illetve egy <0-9>[e] előbeállítás is megadható szűrőlánc helyett.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "A támogatott szűrők és azok kapcsolói a következők:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be 'name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: A kapcsolóknak vesszőkkel elválasztott „név=érték” pároknak kell lenniük" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Érvénytelen kapcsolónév" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s: Érvénytelen kapcsolóérték" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Nem támogatott LZMA1/LZMA2 előbeállítás: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Az lc és lp összege nem haladhatja meg a 4-et" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: A fájlnév utótagja ismeretlen, kihagyás" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: A fájlnak már van „%s” utótagja, kihagyás" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Érvénytelen fájlnév utótag" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s: Az érték nem nemnegatív decimális egész szám" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Érvénytelen szorzó utótag" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Az érvényes utótagok: „KiB” (2^10), „MiB” (2^20) és „GiB” (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "A(z) „%s” kapcsoló értékének a(z) [%, %] tartományban kell lennie" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "A tömörített adatokat nem lehet beolvasni a terminálból" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "A tömörített adatokat nem lehet kiírni a terminálba" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" +"Használat: %s [--help] [--version] [FÁJL]…\n" +"Az .lzma fájl fejlécében tárolt információk megjelenítése" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Show information stored in the .lzma file header." +msgstr "" +"Használat: %s [--help] [--version] [FÁJL]…\n" +"Az .lzma fájl fejlécében tárolt információk megjelenítése" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "A fájl túl kicsi, hogy érvényes .lzma fájl legyen" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Nem .lzma fájl" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "A szabványos kimenetre írás sikertelen" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Ismeretlen hiba" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Nem támogatott kapcsolók" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Nem támogatott szűrőlánc vagy szűrőkapcsolók" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s: Érvénytelen kapcsolónév" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s: Érvénytelen szorzó utótag" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s: Ismeretlen fájlformátumtípus" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "Az LZMA1 nem használható az .xz formátummal" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "A szűrők legnagyobb száma négy" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress kényszerített tömörítés\n" +#~ " -d, --decompress kényszerített kibontás\n" +#~ " -t, --test tömörített fájl épségének tesztelése\n" +#~ " -l, --list információk kiírása az .xz fájlokról" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep bemeneti fájlok megtartása (ne törölje)\n" +#~ " -f, --force kimeneti fájl kényszerített felülírása,\n" +#~ " és a linkek tömörítése/kibontása\n" +#~ " -c, --stdout írás a szabványos kimenetre írás, és nem törli a\n" +#~ " bemeneti fájlokat" + +#~ 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" +#~ msgstr "" +#~ " --no-sparse ne hozzon létre ritka fájlokat kibontáskor\n" +#~ " -S, --suffix=.SUF a „.SUF” utótag használata a tömörített fájlokon\n" +#~ " --files[=FÁJL] fájlnevek beolvasása a FÁJLból; ha a FÁJL nincs\n" +#~ " megadva, akkor a fájlnevek a szabványos bemenetről\n" +#~ " lesznek beolvasva; a fájlneveket újsor karakterrel\n" +#~ " kell zárni\n" +#~ " --files0[=FÁJL] mint a --files, de a null karaktert használja\n" +#~ " használja elválasztóként" + +#~ 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'" +#~ msgstr "" +#~ " -F, --format=FMT a kódoláshoz vagy dekódoláshoz használt fájlformátum;\n" +#~ " lehetséges értékek „auto” (alapértelmezett), „xz”,\n" +#~ " „lzma”, „lzip” és „raw”\n" +#~ " -C, --check=ELL integritás-ellenőrzés típusa: „none” (óvatosan használja),\n" +#~ " „crc32”, „crc64” (alapértelmezett) vagy „sha256”" + +#, no-c-format +#~ msgid "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ msgstr "" +#~ " --memlimit-compress=KORLÁT\n" +#~ " --memlimit-decompress=KORLÁT\n" +#~ " --memlimit-mt-decompress=KORLÁT\n" +#~ " -M, --memlimit=KORLÁT\n" +#~ " a memóriahasználati korlát megadása tömörítéshez,\n" +#~ " kibontáshoz, többszálú kibontású vagy mindháromhoz; a\n" +#~ " KORLÁT bájtokban van megadva, a RAM %-ában, vagy 0 az\n" +#~ " alapértelmezéshez" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ " --lzma1[=KAPCS] LZMA1 vagy LZMA2; a KAPCS nulla vagy több vesszővel\n" +#~ " --lzma2[=KAPCS] elválasztott kapcsoló az alábbiak közül\n" +#~ " (érvényes érték; alapértelmezett):\n" +#~ " preset=ELŐ visszaállítás egy előbeállításra (0-9[e])\n" +#~ " dict=SZÁM szótárméret (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=SZÁM literál környezeti bitek száma (0-4; 3)\n" +#~ " lp=SZÁM literál pozícióbitek száma (0-4; 0)\n" +#~ " pb=SZÁM pozícióbitek száma (0-4; 2)\n" +#~ " mode=MÓD tömörítési mód (fast, normal; normal)\n" +#~ " nice=SZÁM az egyezés „nice” hossza (2-273; 64)\n" +#~ " mf=NÉV egyezéskereső (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=SZÁM legnagyobb keresési mélység; 0=automatikus\n" +#~ " (alapértelmezett)" + +#~ 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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ msgstr "" +#~ "\n" +#~ " --x86[=KAPCS] x86 BCJ szűrő (32 bites és 64 bites)\n" +#~ " --arm[=KAPCS] ARM BCJ szűrő\n" +#~ " --armthumb[=KAPCS] ARM-Thumb BCJ szűrő\n" +#~ " --arm64[=KAPCS] ARM64 BCJ szűrő\n" +#~ " --powerpc[=KAPCS] PowerPC BCJ szűrő (csak big endian esetén)\n" +#~ " --ia64[=KAPCS] IA-64 (Itanium) BCJ szűrő\n" +#~ " --sparc[=KAPCS] SPARC BCJ szűrő\n" +#~ " --riscv[=KAPCS] RISC-V BCJ szűrő\n" +#~ " Érvényes KAPCS az összes BCJ szűrőhöz:\n" +#~ " start=SZÁM kezdési eltolás az átalakításokhoz\n" +#~ " (alapértelmezett=0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=OPTS] Delta szűrő; érvényes KAPCSOLÓK\n" +#~ " (érvényes értékek; alapértelmezett default):\n" +#~ " dist=SZÁM az egymásból kivont bájtok közti\n" +#~ " távolság (1-256; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet figyelmeztetések elrejtése; adja meg kétszer, hogy a\n" +#~ " hibákat is elrejtse\n" +#~ " -v, --verbose legyen bőbeszédű; adja meg kétszer, hogy még bőbeszédűbb\n" +#~ " legyen" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help a rövid súgó megjelenítése (csak az alapvető kapcsolók)\n" +#~ " -H, --long-help ezen hosszú súgó megjelenítése, és kilépés" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help ezen rövid súgó megjelenítése, és kilépés\n" +#~ " -H, --long-help a hosszú súgó megjelenítése (speciális kapcsolókhoz)" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "A homokozó engedélyezése sikertelen" + +#, c-format +#~ msgid "The selected match finder requires at least nice=%" +#~ msgstr "A kiválasztott egyezéskeresőhöz legalább nice=% szükséges" + +#~ msgid "Sandbox is disabled due to incompatible command line arguments" +#~ msgstr "A homokozó ki lett kapcsolva a nem kompatibilis parancssori argumentumok miatt" + +#~ msgid "Sandbox was successfully enabled" +#~ msgstr "A homokozó sikeresen engedélyezve" + +#~ msgid "Memory usage limit for compression: " +#~ msgstr "Memóriahasználat korlátja tömörítéskor: " + +#~ msgid " Streams: %s\n" +#~ msgstr " Adatfolyamok: %s\n" + +#~ msgid " Blocks: %s\n" +#~ msgstr " Blokkok: %s\n" + +#~ msgid " Ratio: %s\n" +#~ msgstr " Arány: %s\n" + +#~ msgid " Check: %s\n" +#~ msgstr " Ellenőrzés: %s\n" + +#~ msgid "" +#~ " Streams:\n" +#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" +#~ msgstr "" +#~ " Adatfolyamok:\n" +#~ " Folyam Blokkok TömEltolás KibEltolás TömMéret KibMéret Arány Ellenőrzés Keret" + +#~ msgid "" +#~ " Blocks:\n" +#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check" +#~ msgstr "" +#~ " Blokkok:\n" +#~ " Folyam Blokkok TömEltolás KibEltolás TömMéret KibMéret Arány Ellenőrzés" + +#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" +#~ msgstr " ÉrtékEll %*s Fejléc Jelzők TömMéret MemHasználat Szűrők" diff --git a/cpp/third_party/xz-5.8.3/po/insert-header.sed b/cpp/third_party/xz-5.8.3/po/insert-header.sed new file mode 100644 index 0000000000..f9534e7edf --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/insert-header.sed @@ -0,0 +1,31 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# Copyright (C) 2001 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# This file is offered as-is, without any warranty. +# +# Written by Bruno Haible , 2001. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/cpp/third_party/xz-5.8.3/po/it.gmo b/cpp/third_party/xz-5.8.3/po/it.gmo new file mode 100644 index 0000000000000000000000000000000000000000..910262b2de06b4c77e38677c2e3ec7b1ed62681b GIT binary patch literal 28688 zcmb`P34A11edh~fd`!Rx7%Ygi*5E57nHrE14786*EA%Iy3M|OctI7|X05H=*(i$gdJVUuhK%R*q6GvD9;y*j$3 z8IP0nXP$m_yn6NC|NXD`fB%}VKK{hlKPm`RcnA18 zihe%@$H1R~8^N_t3WCRjHIE0t6FI*fJPCXys7GH9o(I0$JW%hu1Ka?<6?`W60C*1gQ}Aiv z*-zn};70IVa2FVY`#s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n*XlJo0E_EC z>5yJkC#cT%atJJ>cIFLNr_L_4vcv+*-LgC#sG|S(hcBK8dQu=tC(6ot2$=29 zJCjzpBi{s>aj+puNvgHOZ& z%yupMEG0_WEG4$i={Rk8h%uP=F6QWY0Mn-twfyRA^J{|W->BLnG;VxPx- z#h};ozfE#ug|iYMqE3}HF;o1iQLAg=!MW@wJv?hD7kSuMCh6IXY*Tt~*}U zS0CiAYM@G{bxJ(YQ|{}EMbws0(NIbdrkRC{n>JBY{z!{23Y_3Uo+5ZPpzkf%3+Q^I zSkNjsiXgy>@?J5G`nE!BZB&FBeIH5}VJs&;NNQAZiFYb^yhX4Qo literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/it.po b/cpp/third_party/xz-5.8.3/po/it.po new file mode 100644 index 0000000000..a8cce1559c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/it.po @@ -0,0 +1,1270 @@ +# SPDX-License-Identifier: 0BSD +# +# Italian translation for xz +# This file is published under the BSD Zero Clause License. +# Gruppo traduzione italiano di Ubuntu-it , 2009, 2010 +# Lorenzo De Liso , 2010. +# Milo Casagrande , 2009, 2010, 2011, 2014, 2019. +# Luca Vercelli 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.8.0-pre1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-03-10 11:31+0000\n" +"Last-Translator: Luca Vercelli \n" +"Language-Team: Italian \n" +"Language: it\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" +"X-Launchpad-Export-Date: 2010-08-16 19:16+0000\n" +"X-Generator: Poedit 2.2.1\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: argomento non valido per --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: troppi argomenti per --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "In --block-list, la dimensione del blocco è mancante, dopo il numero di catena di filtri \"%c:\"" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 può essere usato solo come ultimo elemento in --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: tipo di formato del file sconosciuto" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: tipo di controllo integrità non supportato" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Solo un file può essere specificato con \"--files\" o \"--files0\"." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "La variabile d'ambiente %s contiene troppi argomenti" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Il supporto alla compressione è stato disabilitato in fase di compilazione" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Il supporto alla decompressione è stato disabilitato in fase di compilazione" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "La compressione di file lzip (.lz) non è supportata" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list viene ignorato a meno che si stia comprimendo in formato .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Con --format=raw è richiesto --suffix=.SUF a meno che non si scriva sullo standard output" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Il numero massimo di filtri è quattro" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Errore nell'opzione --filters%s=FILTRI:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Il limite dell'uso della memoria è troppo basso per l'impostazione del filtro dato." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "catena di filtri %u usata da --block-list ma non specificata con --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Non è consigliato usare un preset nella modalità raw." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Le opzioni esatte per i preset possono variare tra le versioni del software." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Il formato .lzma supporta solo il filtro LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 non può essere usato con il formato .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "La catena di filtri %u non è compatibile con --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Passaggio a modalità singolo thread poiché viene usato --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Opzioni non supportate nella catena di filtri %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Vengono usati fino a % thread." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Catena di filtri od opzioni del filtro non supportata" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "La decompressione necessita di %s MiB di memoria." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Ridotto il numero di thread da %s a %s per non eccedere il limite di utilizzo della memoria di %s MiB" + +#: src/xz/coder.c +#, 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 "Ridotto il numero di thread da %s a uno. Il limite automatico di uso di memoria di %s MiB è ancora superato. Necessari %s MiB di memoria. Si procede comunque." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Si è commutato alla modalità a thread singola per non eccedere il limite di utilizzo della memoria di %s MiB" + +#: src/xz/coder.c +#, 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 "Regolata la dimensione del dizionario LZMA%c da %s MiB a %s MiB per non superare il limite dell'uso della memoria di %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Regolata la dimensione del dizionario LZMA%c per --filters%u da %s MiB a %s MiB per non superare il limite dell'uso della memoria di %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Errore nel concatenare alla catena di filtri %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Errore nel creare una pipe: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() non riuscita: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: sembra che il file sia stato spostato, non viene rimosso" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: impossibile rimuovere: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: impossibile impostare il proprietario del file: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: impossibile impostare il gruppo del file: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: impossibile impostare i permessi del file: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: sincronizzazione del file non riuscita: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: sincronizzazione della cartella del file non riuscita: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Errore nel recuperare le flag di stato del file dallo standard input: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: è un collegamento simbolico, viene saltato" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: è una cartella, viene saltata" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: non è un file regolare, viene saltato" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: il file ha il bit setuid o setgid impostato, viene saltato" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: il file ha lo sticky bit impostato, viene saltato" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: il file di input ha più di un collegamento fisico, viene saltato" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Nome file vuoto, viene saltato" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Errore nel ripristinare le flag di stato sullo standard input: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Errore nel recuperare le flag di stato del file dallo standard output: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: apertura della cartella non riuscita: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: la destinazione non è un file regolare" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Errore nel ripristinare la flag O_APPEND sullo standard output: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: chiusura del file non riuscita: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: posizionamento non riuscito nel tentativo di creare un file sparso: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: errore di lettura: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: errore nel cercare nel file: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: fine del file inaspettata" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: errore di scrittura: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Disabilitata" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Quantità di memoria fisica (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Numero di thread del processore:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Compressione:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Decompressione:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Decompressione multi-thread:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Valori predefiniti per -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Informazioni hardware:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Limiti di utilizzo della memoria:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Stream:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blocchi:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Dimensione compressa:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Dimensione non compressa:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Rapporto:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Controllo:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Padding dello stream:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Memoria necessaria:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Dim. negli header:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Numero di file:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Stream" + +#: src/xz/list.c +msgid "Block" +msgstr "Blocco" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blocchi" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "" + +#: src/xz/list.c +msgid "CompSize" +msgstr "" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "TotalSize" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Rapporto" + +#: src/xz/list.c +msgid "Check" +msgstr "Controllo" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "" + +#: src/xz/list.c +msgid "Padding" +msgstr "Padding" + +#: src/xz/list.c +msgid "Header" +msgstr "Header" + +#: src/xz/list.c +msgid "Flags" +msgstr "Flag" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtri" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Nessuno" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Sconosc2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Sconosc3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Sconosc5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Sconosc6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Sconosc7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Sconosc8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Sconosc9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Sconosc11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Sconosc12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Sconosc13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Sconosc14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Sconosc15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: il file è vuoto" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: troppo piccolo per essere un file .xz valido" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr " Strm Blocc. Compresso Estratto Rapp. Contr Nome file" + +#: src/xz/list.c +msgid "Yes" +msgstr "Sì" + +#: src/xz/list.c +msgid "No" +msgstr "No" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Versione \"XZ Utils\" minima:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s file\n" +msgstr[1] "%s file\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Totali:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list funziona solamente con file .xz (--format=xz o --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Provare \"lzmainfo\" con i file .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list non è in grado di leggere dallo standard input" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: errore nel leggere i nomi dei file: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: fine dell'input durante la lettura dei nomi dei file non attesa" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: trovato carattere null durante la lettura dei nomi dei file; forse si intendeva usare \"--files0\" invece di \"--files\"?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "La compressione e la decompressione con --robot non sono ancora supportate." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Impossibile leggere i dati dallo standard input durante la lettura dei nomi dei file dallo standard input" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Errore interno (bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Impossibile stabilire i gestori dei segnali" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Nessun controllo d'integrità; l'integrità del file non viene verificata" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Tipo di controllo di integrità non supportato; l'integrità del file non viene verificata" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Limite di utilizzo della memoria raggiunto" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Formato di file non riconosciuto" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Opzioni non supportate" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "I dati compressi sono danneggiati" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Fine dell'input non attesa" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB di memoria sono richiesti. Il limite è disabilitato." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB di memoria sono richiesti. Il limite è %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: catena di filtri: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Provare \"%s --help\" per maggiori informazioni." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Errore nello stampare il testo di aiuto (codice di errore %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Utilizzo: %s [OPZIONE]... [FILE]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Comprime o decomprime i FILE nel formato .xz." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Gli argomenti obbligatori per le opzioni lunghe sono obbligatori anche per quelle brevi." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Modalità di operazione:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "forza compressione" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "forza decompressione" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "testa l'integrità del file compresso" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "elenca informazioni sui file .xz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Modificatori di operazioni:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "conserva (non eliminare) i file input" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "forza la sovrascrittura del file output e dei link (de)compressi" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "scrivere sullo standard output e non eliminare i file input" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "non sincronizzare il file output sul supporto di memoria prima di rimuovere il file input" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "decomprime solamente il primo stream e ignora silenziosamente eventuali rimanenti dati di input" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "non creare file sparsi durante la decompressione" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "usare il suffisso \".SUF\" sui file compressi" + +#: src/xz/message.c +msgid "FILE" +msgstr "FILE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "legge da FILE i nomi dei file da processare; se FILE viene omesso, i nomi dei file vengono letti dallo standard input; i nomi dei file devono essere terminati da un carattere \"a capo\"" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "come --files ma usa il carattere null come terminatore" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Formato file di base e opzioni di compressione:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMATO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "formato di file per codificare o decodificare; i valori possibili sono \"auto\" (il predefinito), \"xz\", \"lzma\", \"lzip\" e \"raw\"" + +#: src/xz/message.c +msgid "NAME" +msgstr "NOME" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "tipo di controllo di integrità: \"none\" (usare con cautela), \"crc32\", \"crc64\" (predefinito), oppure \"sha256\"" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "non verifica il codice di integrità quando decomprime" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "preset di compressione; predefinito è 6; prendere in considerazione l'utilizzo di memoria per comprimere *e* decomprimere prima di usare 7-9" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "tenta di migliorare il rapporto di compressione utilizzando più tempo di CPU; non cambia i requisiti di memoria in fase di decompressione" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "NUM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "Usa al massimo NUM thread: il valore predefinito è 0, che usa tanti thread quanti core la CPU ha a disposizione" + +#: src/xz/message.c +msgid "SIZE" +msgstr "DIM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "avvia un nuovo blocco .xz dopo ogni DIM byte di input; usare questo per impostare la dimensione del blocco durante la compressione con thread" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOCCHI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "inizia un nuovo blocco .xz dopo gli intervalli indicati (separati da virgole) di dati non compressi; opzionalmente, specifica il numero di una catena di filtri (0-9) seguito da \":\" prima della dimensione dei dati non compressi" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "durante la compressione, se sono passati più di NUM millisecondi dal flush precedente e la lettura di ulteriore input risulterebbe bloccata, viene eseguito il flush di tutti i dati pendenti" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "LIMITE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "imposta il limite di utilizzo memoria per compressione, decompressione, decompressione con thread, oppure tutte quante; LIMITE è in byte, % di RAM, oppure 0 per i valori predefiniti" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "se le impostazioni di compressione eccedono il limite di utilizzo della memoria, lancia un errore invece di utilizzare valori più piccoli" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Catena di filtri personalizzati per la compressione (alternative per l'utilizzo di preset):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTRI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "imposta la catena di filtri usando la sintassi delle stringhe di filtri liblzma; usare --filters-help per avere più informazioni" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "imposta catene di filtri addizionali usando la sintassi delle stringhe di filtri liblzma da usare con --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "mostra più informazioni sulla sintassi della stringa del filtro liblzma ed esce" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPZIONI" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "LZMA1 or LZMA2; OPZ is a comma-separated list of zero or more of the following options (valid values; default):" +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 o LZMA2; OPZIONI è una lista separata da virgole di zero o più delle seguenti opzioni (valori validi; predefinito):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "PRESET" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "reimposta le opzioni a un preset" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "Dimensione del dizionario" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "numero di bit di contesto per carattere" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "numero di bit di posizione per carattere" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "numero di bit di posizione" + +#: src/xz/message.c +msgid "MODE" +msgstr "MODALITÀ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "modalità di compressione" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "lunghezza ragionevole di una corrispondenza" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "cercatore di corrispondenze" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "massima profondità di ricerca; 0=automatico (predefinito)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "filtro BCJ x86 (32-bit e 64-bit)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "filtro BCJ ARM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "filtro BCJ ARM-Thumb" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "filtro BCJ ARM64" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "filtro BCJ PowerPC (solo big-endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "filtro BCJ IA-64 (Itanium)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "filtro BCJ SPARC" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "filtro BCJ RISC-V" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "OPZIONI valide per tutti i filtri BCJ:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "offset iniziale per le conversioni (predefinito=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Filtro delta; OPZIONI valide (valori validi; predefiniti):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "distanza tra i byte sottratti l'uno dall'altro" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Altre opzioni:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "sopprime gli avvertimenti; specificare due volte per sopprimere anche gli errori" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "prolisso; specificare due volte per ancora più prolisso" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "gli avvertimenti non influenzano lo stato d'uscita" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "usa messaggi analizzabili (utile per gli script)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "visualizza la quantità totale di RAM e il limite attuale attivo di utilizzo della memoria ed esce" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "mostra l'aiuto breve (elenca solo le opzioni base)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "mostra l'aiuto esteso ed esce" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "mostra l'aiuto breve ed esce" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "mostra l'aiuto esteso (elenca anche le opzioni avanzate)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "visualizza il numero di versione ed esce" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Senza FILE, o quando FILE è -, legge lo standard input." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Segnalare i bug a <%s> (in inglese o finlandese). Segnalare i bug di traduzione a ." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "Homepage di %s: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "*Questa è una versione di sviluppo non adatta per utilizzi in produzione.*" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Le catene di filtri sono impostate usando le opzioni --filters=FILTRI oppure --filters1=FILTRI... --filters9=FILTRI. Ogni filtro nella catena può essere separato da spazi o da \"--\". In alternativa si può specificare un preset %s al posto di una catena di filtri." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "I filtri supportati e le loro opzioni sono:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Le opzioni devono essere coppie \"nome=valore\" separate da virgole" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: nome opzione non valido" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "valore dell'opzione non valido" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Preset LZMA/LZMA2 non supportato: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "La somma di lc e lp non deve superare 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: il nome del file ha un suffisso sconosciuto, viene saltato" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: il file ha il suffisso \"%s\", viene saltato" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: suffisso del nome del file non valido" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Il valore non è un numero intero decimale non-negativo" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: suffisso del moltiplicatore non valido" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "I suffissi validi sono \"KiB\" (2^10), \"MiB\" (2^20), e \"GiB\" (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Il valore dell'opzione \"%s\" deve essere nell'intervallo [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "I dati compressi non possono essere letti da un terminale" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "I dati compressi non possono essere scritti su un terminale" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Utilizzo: %s [--help] [--version] [FILE]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Mostra le informazioni immagazzinate nella header del file .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Il file è troppo piccolo per essere un file .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Non è un file .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Scrittura sullo standard output non riuscita" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Errore sconosciuto" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Preset non supportato" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Flag nel preset non supportato" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Nome di opzione non valido" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Il valore dell'opzione non può essere vuoto" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Valore fuori scala" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Questa opzione non supporta alcun suffisso moltiplicatore" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Suffisso del moltiplicatore non valido (KiB, MiB, o GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Nome di filtro non valido" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Questo filtro non può essere usato nel formato .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Allocazione di memoria fallita" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Stringa vuota non ammessa, provare '6' se è necessario un valore predefinito" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Il numero massimo di filtri è quattro" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Nome del filtro mancante" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Catena di filtro non valida (manca \"lzma2\" al fondo?)" diff --git a/cpp/third_party/xz-5.8.3/po/ka.gmo b/cpp/third_party/xz-5.8.3/po/ka.gmo new file mode 100644 index 0000000000000000000000000000000000000000..a3573a11d7bcc32d044bdb43765e9d39a1cde8a1 GIT binary patch literal 46526 zcmdU&3!I!~eeYiprADfVg4$YrgTzfByXFE28zP1fAVMz91rbG=?9Oh+?9Qw^GvrbW z(&(wSD&eAu66-`1tCfqV+IwlW)*dg%R_(F2w$#|xYOmH->p8u6zQ5=9yqB4s*(`|X zGM~Kjd*A2szyJTw^S(2gedzR)-};y&NgmJJ3h;&>N|Flah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!E10?D7ujqp6kfMU@QB?JT?Nyg2q`Kxr3Si= zB+>O5TNOw{ME(wjLBV4x#q%l?rj&nul?l#9rssOYPnDpLQn@gSU?k}Tb07oLF#tB_ zq<@lm#p#>d5IUjIjB73!UAP2YC@fPEOR!b(FQ?XEUQP z1d)$!2Y}OBS<4{nj4#V-dvx?Xrnb?1GY7G*)UveY8#VDZS^97t!*7?{q1p-WxWB%7nb znM5o(SQuT{D43J>KyPVAig_{9gBiN2xc<^%Mj6w00tH4u0i&66K_4N^o_9#v?6O?( z)Q}LPGq*gQQ8`bv8<^<8;a!o!HKWSW08fPpbPx%@bKOZY_ml%YYQ|W^H_^xtq6AkS zb&ixmp4>6;!0?4G34e1jTO70YSn;g`7q&5?!6CDERzEDTHg5=JE@gp>;kFZUMS+nX zLC~}qVrvHT(hFr)BSsek920P{o;Gi+;84PoG%-W=3-5&i&=}QGfI*xeWevNDY53M|JRLoq9gG7ic%H0LrHTpVfyr`H+F1wD`R zJM}R{1d72Qr4fx8u`_fPj8z#-v>d&GJip<;AL`X2|H*+=b94N=n6e&phiS0-J2rD z(HGP;A;`lx%57UY;E}-Msqml!eUdc`J6a?s*Y0C13gM&Re%f5OLp=nWGB=1jQ&*blI)M+jwIJqrrP08wd-%o z`tMrnzh4Zc+26(HFG8z}KPoy|<*S7JVd(3V?vO{O-l#`aJc6Woo^XlP`SK}Ub|Im{ U0C`y7J)QRs=Ks*wB!h1M8x~jUzyJUM literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/ka.po b/cpp/third_party/xz-5.8.3/po/ka.po new file mode 100644 index 0000000000..748bf695a6 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/ka.po @@ -0,0 +1,1264 @@ +# SPDX-License-Identifier: 0BSD +# +# xz translation to Georgian. +# This file is published under the BSD Zero Clause License. +# Temuri Doghonadze , 2024. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-03-02 06:03+0100\n" +"Last-Translator: Temuri Doghonadze \n" +"Language-Team: Georgian <(nothing)>\n" +"Language: ka\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.5\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: --block-list -ის არასწორი არგუმენტი" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: --block-list -ის მეტისმეტად ბევრი არგუმენტი" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "პარამეტრი --block-list ფილტრის ჯაჭვის ნომრის '%c' შემდეგ ბლოკის ზომა აკლია" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "ნული --block-list -ის მხოლოდ ბოლო ელემენტი შეიძლება იყოს" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: ფაილის ფორმატის უცნობი ტიპი" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: სიმრთელის შემოწმების მხარდაუჭერელი ტიპი" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "'--files' ან '--files0' -თან ერთად, მხოლოდ, ერთი ფაილის მითითება შეიძლება." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "გარემოს ცვლადი %s მეტისმეტად ბევრ არგუმენტს შეიცავს" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "შეკუმშვის მხარდაჭერა გამორთულია აგების დროს" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "გაშლის მხარდაჭერა გამორთულია აგების დროს" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "შეკუმშვა lzip (.lz) ფაილებისთვის მხარდაჭერილი არაა" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "პარამეტრი --block-list გამოტოვებულია იმ შემთხვევის გარდა, თუ .xz ფორმატს იყენებთ" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "--format=raw -თან ერთად --suffix=.SUF -ის მითითება აუცილებელია, თუ stdout-ზე არ წერთ" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "ფილტრების მაქსიმალური რაოდენობა ოთხის ტოლია" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Error პარამეტრში --filters%s=FILTERS:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "მითითებული ფილტრის გამოსაყენებლად მეხსიერების გამოყენების ლიმიტი მეტისმეტად დაბალია." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "ფილტრების ჯაჭვი %u გამოიყენება პარამეტრით --block-list, მაგრამ არაა მითითებული პარამეტრით --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "პრესეტის დაუმუშავებელ რეჟიმში გამოყენება რეკომენდებული არაა." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "პრესეტების ზუსტი პარამეტრები ვერსიებს შორის იცვლება." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr ".lzma ფორმატს მხოლოდ LZMA1 ფილტრს მხარდაჭერა გააჩნია" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1-ის გამოყენება .შეუძლებელია xz ფორმატით" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "ფილტრების ჯაჭვი %u შეუთავსებელია პარამეტრთან --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "ერთნაკადიან რეჟიმზე გადართვა --flush-timeout -ის გამო" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "მხარდაუჭერელი პარამეტრები ფილტრის ჯაჭვში %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "გამოიყენება მაქსიმუმ % ნაკადი." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "მხარდაუჭერელი ფილტრების ჯაჭვი ან ფილტრის პარამეტრები" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "გაშლისთვის საჭიროა %s მიბ მეხსიერება." + +#: src/xz/coder.c +#, 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 მიბ" + +#: src/xz/coder.c +#, 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-დან ერთამდე. ავტომატური მეხსიერების გამოყენების შეზღუდვა %s მბ-ზე გადაცილებულია. საჭიროა %s მიბ მეხსიერება. მაინც გავაგრძელებ." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "გადავერთე ერთნაკადიან რეჟიმში, რომ არ გადავაცილო მეხსიერების ზღვარს %s მიბ" + +#: src/xz/coder.c +#, 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 მიბ-დან %s მიბ-ზე, რომ არ გადავაჭარბო მეხსიერების ლიმიტს, რომელიც %s მიბ-ის ტოლია" + +#: src/xz/coder.c +#, c-format +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-ის ლექსიკონის ზომა შესწორდა --filters%u-სთვის %s მიბ-დან %s მიბ-ზე, რომ არ გადავაჭარბო მეხსიერების ლიმიტს, რომელიც %s მიბ-ის ტოლია" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "ფილტრების ჯაჭვზე %u შეცვლის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "ფაიფის შექმნის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() -ის შეცდომა: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: როგორც ჩანს, ფაილი გადატანილია. არ წავშლი" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: წაშლა შეუძლებელია: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: ფაილის მფლობელის დაყენების შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: ფაილის ჯგუფის დაყენების შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: ფაილის წვდომების დაყენების შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: ფაილის სინქრონიზაციის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: ფაილის საქაღალდის სინქრონიზაციის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "ფაილის სტატუსის ალმები მიღების შეცდომა სტანდარტული შეყვანიდან: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: სიმბმულია. გამოტოვება" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: საქაღალდეა, გამოტოვება" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: ჩვეულებრივი ფაილი არაა. გამოტოვება" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: ფაილს setuid ან setgit ბიტი აქვს დაყენებული. გამოტოვება" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: ფაილს წებოვანი ბიტი აქვს. გამოტოვება" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: შეყვანილ ფაილს ერთზე მეტი მყარი ბმული გააჩნია. გამოტოვება" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "ცარიელი ფაილის სახელი. გამოტოვება" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "სტატუსის ალმების აღდგენის შეცდომა სტანდარტულ შეყვანაზე: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "ფაილის სტატუსის ალმების მიღების შეცდომა სტანრარტული გამოტანიდან: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: საქაღალდის გახსნის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: სამიზნე ჩვეულებრივი ფაილი არაა" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "O_APPEND ალმის აღდგენის შეცდომა სტანდარტულ გამოტანაზე: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: ფაილის დახურვის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: გადახვევის შეცდომა დამატებითი ფაილის შექმნის მცდელობისას: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: წაკითხვის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: ფაილის გადახვევის შეცდომა: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: ფაილის მოულოდნელი დასასრული" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: ჩაწერის შეცდომა: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "გამორთულია" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "ფიზიკური მეხსიერების (RAM) რაოდენობა:" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "პროცესორის ნაკადების რაოდენობა:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "შეკუმშვა:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "გაშლა:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "მრავალნაკადიანი გაშლა:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "ნაგულისხმევი პარამეტრისთვის -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "ინფორმაცია აპარატურის შესახებ:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "მეხსიერების გამოყენების შეზღუდვები:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "ნაკადები:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "ბლოკები:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "შეკუმშული ზომა:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "შეუკუმშავი ზომა:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "პროპორციები:" + +#: src/xz/list.c +msgid "Check:" +msgstr "შემოწმება:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "ნაკადის შევსება:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "საჭიროა მეხსიერება:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "ზომა თავსართებში:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "ფაილების რაოდენობა:" + +#: src/xz/list.c +msgid "Stream" +msgstr "ნაკადი" + +#: src/xz/list.c +msgid "Block" +msgstr "ბლოკი" + +#: src/xz/list.c +msgid "Blocks" +msgstr "ბლოკები" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "შეკუმშწანაცვლ" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "შეუკუმშწანაცვლ" + +#: src/xz/list.c +msgid "CompSize" +msgstr "შეკუმშზომა" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "შეუკუმშზომა" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "ზომასულ" + +#: src/xz/list.c +msgid "Ratio" +msgstr "პროპორციები" + +#: src/xz/list.c +msgid "Check" +msgstr "შემოწმება" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "მნიშვნშემოწმ" + +#: src/xz/list.c +msgid "Padding" +msgstr "შევსება" + +#: src/xz/list.c +msgid "Header" +msgstr "ზედა კოლონტიტული" + +#: src/xz/list.c +msgid "Flags" +msgstr "დროშები" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "მეხსგამოყ" + +#: src/xz/list.c +msgid "Filters" +msgstr "ფილტრები" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "არაფერი" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "უცნობი-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "უცნობი-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "უცნობი-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "უცნობი-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "უცნობი-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "უცნობი-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "უცნობი-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "უცნობი-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "უცნობი-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "უცნობი-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "უცნობი-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "უცნობი-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: ფაილი ცარიელია" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: მეტისმეტად პატარაა, რომ სწორ .xz ფაილს წარმოადგენდეს" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "ნაკადები ბლოკები შეკუმშული შეუკუმშავი ფარდობა შემოწმება ფაილს სახელი" + +#: src/xz/list.c +msgid "Yes" +msgstr "დიახ" + +#: src/xz/list.c +msgid "No" +msgstr "არა" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "მინიმალური XZ Utils ვერსია:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s ფაილი\n" +msgstr[1] "%s ფაილი\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "ჯამები:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list მხოლოდ .xz ფაილებზე მუშაობს (--format=xz ან --format=auto (ავტომატური))" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "სცადეთ 'lzmainfo' .lzma ფაილებისთვის." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list -ს სტანდარტული შეყვანიდან წაკითხვის მხარდაჭერა არ გააჩნია" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: ფაილის სახელების წაკითხვის შეცდომა: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: შეყვანის მოულოდნელი დასასრული ფაილის სახელების კითხვისას" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: ფაილის სახელების კითხვისა აღმოჩენილია ნულოვანი სიმბოლო. შეიძლება, '--files'-ის მაგიერ '--files0'-ის გამოყენება გნებავდათ?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "--robot -ან ერთად შეკუმშვა და გაშლა ჯერჯერობით მხარდაუჭერელია." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "მონაცემების სტანდარტული შეყვანიდან წაკითხვა მაშინ, როცა ფაილების სახელებიც სტანდარტული შეყვანიდან იკითხება, შეუძლებელია" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "შიდა შეცდომა (პროგრამა გასამართია)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "სიგნალების დამმუშავებლების დამყარების შეცდომა" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "სიმრთელის შემოწმების გარეშე. ფაილის სიმრთელე არ შემოწმდება" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "ფაილის სიმრთელის შემოწმების ხარდაუჭერელი ტიპი. ფაილის სიმრთელე არ შემოწმდება" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "მეხსიერების გამოყენების ლიმიტი მიღწეულია" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "ფაილის ფორმატი უცნობია" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "მხარდაუწერელი პარამეტრები" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "შეკუმშული მონაცემები დაზიანებულია" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "შეყვანის მოულოდნელი დასასრული" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "საჭიროა %s მბ მეხსიერება. მსაზღვრელი გამორთულია." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "საჭიროა %s მბ მეხსიერება. ზღვარია: %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: ფილტრის ჯაჭვი: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "მეტი ინფორმაციისთვის სცადეთ '%s --help'." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "დახმარების ტექსტის გამოტანის შეცდომა (შეცდომის კოდია %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "გამოყენება: %s [პარამეტრი].. [ფაილი]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "მითითებული ფაილების .xz ფორმატში შეკუმშვა ან გაშლა." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "გრძელი პარამეტრების აუცილებელი არგუმენტები მათი მოკლე ვარიანტებისთვისაც სავალდებულოა." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "ოპერაციის რეჟიმი:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "ნაძალადევი შეკუმშვა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "ნაძალადევი გაშლა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "შეკუმშული ფალის მთლიანობის შემოწმება" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "ინფორმაციის ჩამოთვლა .xz ფაილების შესახებ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "ოპერაციის მოდიფიკატორები:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "შეყვანის ფაილების შენარჩუნება (არ წაშლა)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "გამოტანის ფაილის თავზე გადაწერა და ბმულების შეკუმშვა/გაშლა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "სტანდარტულ გამოტანაზე ჩაწერა და შეყვანილი ფაილები არ წაიშლება" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "გამოტანის ფაილის საცავის მოწყობილობასთან სინქრონიზაცია შეყვანის ფაილის წაშლამდე არ მოხდება" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "გაშლის, მხოლოდ, პირველ ნაკადს და ჩუმად დააიგნორებს დარჩენილ შეყვანილ მონაცემებს" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "გაშლისას დამატებითი ფაილები არ შეიქმნება" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "შეკუმშულ ფაილებზე '.SUF' სუფიქსის გამოყენება" + +#: src/xz/message.c +msgid "FILE" +msgstr "FILE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "დასამუშავებელი ფაილის სახელების FILE-დან წაკითხვა; თუ FILE მითითებული არაა, ფაილის სახელები სტანდარტული შეყვანიდან იქნება წაკითხული. ფაილის სახელები ხაზის გადატანის სიმბოლოთი უნდა სრულდებოდეს" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "--files-ის მსგავსად, მაგრამ ფაილის სახელის დასასრულებლად ნულოვანი სიმბოლოს გამოყენება" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "ფაილის ფორმატისა და შეკუმშვის ძირითადი პარამეტრები:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "ფორმატი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "ფაილის ფორმატი გასაშიფრად ან დასაშიფრად. შესაძლო მნიშვნელობებია 'auto' (ნაგულიხმევი), 'xz', 'lzma', 'lzip' და 'raw'" + +#: src/xz/message.c +msgid "NAME" +msgstr "სახელი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "მთლიანობის შემოწმების ტიპი: 'არცერთი' (გამოიყენეთ ყურადღებით), 'crc32', 'crc64' (ნაგულისხმევი), ან 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "გაშლისას სიმრთელე არ შემოწმდება" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "შეკუმშვის პრესეტი. ნაგულისხმებია 6; 7-9 მნიშვნელობის მითითებამდე გაითვალისწინეთ შემკუმშავისა *და* გამშლელის მეხსიერების მოთხოვნები!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "CPU-ის მეტი დატვირთვის ხარჯზე შეკუმშვის დონის აწევის ცდა. არქივის გაშლისას მეხსიერების მოთხოვნები არ შეიცვლება" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "NUM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "გამოყენებული იქნება მაქს. NUM ნაკადი; ნაგულისხმევი მნიშვნელობაა 0, რაც იყენებს იმდენ ნაკადს, რამდენი ბირთვიც აქვს პროცესორს" + +#: src/xz/message.c +msgid "SIZE" +msgstr "ზომა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "ახალი .xz ბლოკის დაწყება ყოველი მითითებული ზომის მიღწევისას. გამოიყენეთ ეს, რომ დააყენოთ ბლოკის ზომა მრავალნაკადიანი შეკუმშვისას" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "ბლოკები" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "დაიწყება ახალი .xz ბლოკი მითითებული მძიმით გამოყოფილი ინტერვალის განმავლობაში შეუკუმშავი მონაცემების მიღების შემდეგ. არასავალდებულოდ შეგიძლიათ მიუთითოთ ფილტრების ჯაჭვის ნომერი (0-9), რომელსაც '.' მოჰყვება შეუკუმშავი მონაცემების ზომის შემდეგ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "კომპრესიის დროს, თუ NUM მილიწამზე მეტი გავიდა მას შემდეგ, რაც წინა ფლეში და მეტი შეყვანის წაკითხვა დაბლოკავს, ყველა მომლოდინე მონაცემი ამოიწურა" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "ლიმიტი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "მეხსიერების ლიმიტის დაყენება შეკუმშვისთვის, გაშლისთვის, მრავალნაკადიანი გაშლისთვის, ან ყველასთვის ლიმიტი მიეთითება ბაიტებში, RAM-ის %-ში, ან 0, ნაგულისხმევი მნიშვნელობის გამოსაყენებლად" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "თუ შეკუმშვის პარამეტრი გადასცდება მეხსიერების გამოყენების ლიმიტს, პარამეტრის შემცირების მაგიერ შეცდომის გამოტანა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "მომხმარებლის ფილტრის ჯაჭვი შეკუმშვისთვის (პრესეტების გამოყენების ალტერნატივა):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "ფილტრები" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "ფილტრების ჯაჭვის აწყობა liblzma-ის ფილტრის პარამეტრის სინტაქსით მეტი ინფორმაციისთვის გამოიყენეთ --filters-help" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "დამატებითი ფილტრის ჯაჭვების დაყენება liblzma-ის ფილტრის სინტაქსით --block-list პარამეტრით გამოსაყენებლად" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "მეტი ინფორმაციის გამოტანა liblzma ფილტრის სტრიქონის სინტაქის შესახებ და გასვლა" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "პარამ-ები" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 ან LZMA2. OPTS მძიმით გამოყოფილი სიაა ნული ან მეტი შემდეგი პარამეტრებიდან (სწორი მნიშვნელობა. ნაგულიხმევი):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "პრე" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "პარამეტრების ჩამოყრა პრესეტზე" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "ლექსიკონის ზომა" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "ლიტერალის კონტექსტის ბიტების რაოდენობა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "ლიტერალის მდებარეობის ბიტების რაოდენობა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "მდებარეობის ბიტების რაოდენობა" + +#: src/xz/message.c +msgid "MODE" +msgstr "რეჟიმი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "შეკუმშვის რეჟიმი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "დაფორმატებული დამთხვევის სიგრძე" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "დამთხვევის მძებნელი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "მაქსიმალური ძებნის სიღრმე. 0=ავტომატური (ნაგულისხმევი)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ ფილტრი (32-ბიტიანი და 64-ბიტიანი)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ ფილტრი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ ფილტრი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ ფილტრი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ ფილტრი(მხოლოდ მსხვილბოლოიანი)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ ფილტრი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ ფილტრი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ ფილტრი" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "სწორი პარამეტრები ყველა BCJ ფილტრისთვის:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "დაწყების წანაცვლება გადაყვანებისთვის (ნაგულისხმევი=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "დელტა ფილტრი. დაშვებული პარამეტრები (სწორი მნიშვნელობები, ნაგულისხმევი):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "დაშორება ბაიტებს შორის გამოაკლდება ერთმანეთს" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "სხვა პარამეტრები:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "გაფრთხილებების დადუმება. შეცდომების დასამალად მიუთითეთ ორჯერ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "მეტი შეტყობინების გამოტანა. უფრო მეტი შეტყობინებისთვის მიუთითეთ ორჯერ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "გაფრთხილებებს გასვლის სტატუსზე გავლენა არ ექნებათ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "მანქანისთვის დამუშავებადი შეტყობინებები (სკრიპტებისთვის)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "მეხსიერების ჯამური რაოდენობის და ამჟამად აქტიური მეხსიერების ლიმიტების გამოტანა და გასვლა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "მოკლე დახმარების ჩვენება (მხოლოდ, ძირითადი პარამეტრები)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "გრძელი დახმარების ჩვენება და გასვლა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "ამ მოკლე დახმარების ჩვენება და გასვლა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "უფრო გრძელი დახმარების ჩვენება (ასევე ნაჩვენები ქნება დამატებითი პარამეტრებიც)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "ვერსიის ინფორმაციის ჩვენება და გასვლა" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "როცა ფაილი არ არსებობს ან '-'-ია, წაკითხვა stdin-დან მოხდება." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "შეცდომების შესახებ მიწერეთ <%s> (ინგლისურად, ან ფინურად)." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s-ის საწყისი გვერდია: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ეს სატესტო ვერსიაა. ნუ გამოიყენებთ ყოველდღიური მოხმარებისთვის." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "ფილტრის ჯაჭვების დაყენება --filters=ფილტრები ან --filters1=ფილტრები... --filters9=ფილტრები პარამეტრებით ხდება. თითოეული ფილტრი ამ ჯაჭვში ერთმანეთისგან ჰარეებით, ან '--'-ითაა გამოყოფილი. ასევე შეგიძლიათ მიუთითოთ პრესეტი %s ფილტრის ჯაჭვის მაგიერ." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "მხარდაჭერელი ფილტრები და მათ პარამეტრებია:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "პარამეტრები უნდა წარმოადგენდეს \"სახელი=მნიშვნელობა\" ტიპის წყვილებს, მძიმეებით გამოყოფილს" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: არასწორი პარამეტრის სახელი" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "არასწორი პარამეტრის მნიშვნელობა" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "მხარდაუჭერელი LZMA1/LZMA2 პრესეტი: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "\"lc\" და \"lp\"-ის ჯამი 4-ზე მეტი არ უნდა იყო" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: ფაილის სახელის უცნობი სუფიქსი. გამოტოვება" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: ფაილს სუფიქსი `%s' უკვე გააჩნა. გამოტოვება" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: ფაილის სახელის არასწორი სუფიქსი" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "მნიშვნელობა არაუარყოფით მთელ რიცხვს არ წარმოადგენს" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: არასწორი მამრავლის სუფიქსი" + +#: src/xz/util.c +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 +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "პარამეტრის (%s) მნიშვნელობის დასაშვები დიაპაზონია [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "შეკუმშული მონაცემების ტერმინალიდან წაკითხვა შეუძლებელია" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "შეკუმშული მონაცემების ტერმინალში ჩაწერა შეუძლებელია" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "გამოყენება: %s [--help] [--version] [ფაილი]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr ".lzma ფაილის თავსართში შენახული ინფორმაციის ჩვენება." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "%s: მეტისმეტად პატარაა, რომ სწორ .xz ფაილს წარმოადგენდეს" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "არ წარმოადგენს .lzma ფაილს" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "სტანდარტული გამოტანაში ჩაწერის შეცდომა" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "უცნობი შეცდომა" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "მხარდაუჭერელი პრესეტი" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "მხარდაუჭერელი ალამი პრესეტში" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "უცნობი პარამეტრის სახელი" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "პარამეტრი ცარიელი ვერ იქნება" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "მნიშვნელობა დიაპაზონს გარეთაა" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "ამ პარამეტრს გამამრავლებელი სუფიქსების მხარდაჭერა არ გააჩნია" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "არასწორი მულტიპლიკატორის სუფიქსი (KiB, MiB ან GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "ფილტრის უცნობი სახელი" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "ამ ფილტრს .xz ფორმატში ვერ გამოიყენებთ" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "მეხსიერების გამოყოფის შეცდომა" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "ცარიელი სტრიქონი დაუშვებელია. სცადეთ '6', თუ ნაგულისხმევი მნიშვნელობა გჭირდებათ" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "ფილტრების მაქსიმალური რაოდენობა ოთხის ტოლია" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "ფილტრის სახელი მითითებული არაა" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "არასწორი ფილტრის ჯაჭვი (ბოლოში აკლია 'lzma2'?)" diff --git a/cpp/third_party/xz-5.8.3/po/ko.gmo b/cpp/third_party/xz-5.8.3/po/ko.gmo new file mode 100644 index 0000000000000000000000000000000000000000..4d7123e36aee93244356b11c9613600943349565 GIT binary patch literal 29850 zcmb`P34B~veeZ7|B;c^5>|5amA|xf2kY&e7yK&fCN*DT|6k2F0EflC`)b#;;ap>L2x$sRq)l|e|UW58-n0Mt}g>G0^bF`4r~H10~dNsgY{g0417EIBv=RjslWa? z_%^Oz_r@T&0-OcD8~hNcdiR6B20rcYe+`_@^)Era@A5a%25bW_2lL=tz&+rvgQFm? z2)+Tn75oVpf-iov!^^>STrUFE{s~a?{4=l({0XS}Uq+`I&-=i4f%k%{|0qb6;19u8 z@b5vr=Z*Z)^Q*wufOmizZw{Ob_JcFQFM;#GpMw{IGa0nrcMbSTFb}>KyccA-f(OA8 zco6IW-vseO@Lo{s@F`GqJOsW3{HDMEUGQSAe*lKyPr&8i#Vm^I-43e#ognNHbb!;q zZhyTI)Vgd2#TQTc>mP!e|D~ZD-<9A3uIGZ{wR=I;e-eB-_yce;SO)dH^|Byn1lvK) zcNeI64udnm$3czfZ$Oqj_!+nWyx<*fJr;s2X^;WufLlS)_Y0ut|DT}v<+67|Q*aq5 z`hE-)y+03%E?)sP|33mXpKpO`KMsn&Ud_cAcoT>S1g$WG+ARS^zxRS#-`hd;(+#Sh z5~%s!4{9C11By?|pvLvKce(qwfG^?t!(ap03HE^ZgBquV=w{$0AS4Kufuc(fD7tI{ zMZZsg*Mg6LdjI!9z4sTO=yVC4!#Y77sD2lMF9vT0Uj*I?YF(E5=Y62o<35iMfv{?D z*gyX&D0+V#d=+>Ri>dd$9#p+6LDBtYP~+PS>V3Pxi@`l0Bn^f^$@!N+(c#a)i@?7G z?*M-Yej1!}g`?XKK#l*BE8X}m1;sCyf$C=!sP<`4eSA$;wZv=k{vSh*BCMW-EL2d=xJU#=8Pkscx418m=o8LP?wYvfg!4=@k z!QTX@f%k&aH`_qzsbTOH;7L$=waG>G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wo;z4RJRoCIP1slV zj*|HGhKmKkwCo(;966+(W2E2WBRJjx^O-A{={&}sWUoX|F3$w_9WZ71+;I7kkp_N~ z(lW9fvTI%5J#?l0+77)m#X^>IXbd zRV(FP88|X_y3fTUc0d#D?RHOV44$gtqMv7I;ys->ao`tvd@rgwS|t5?M<;iNv9KHo z8#P6!sEC*j9W8%Li87;T`B97}`&6Siz$0-N@Jf>26C~E{2f71HP+bOrEdL}cRCQat zsj2ecT)l5#Xui?Emc=FnSU!hbyY=~o0Vfb&^Zr%Gex98Y3v zHemJe@r_OU_wy)@mXcn{1UbMhAnw|HtbFJ>IoJvx@IlaP(sw$OjHlpN$`R6@C6lM_ zCrHM1wet^L18-=hI0pxi5H`Uu6tM(pl1gTM>R4q5KexbvS9rw|dq(qO?OYt=5f0`# zo2BG6k{#`AdTBLXz}(5~oE-4#)H`)m7V4LKZxOU|LTHGceG;*nQ4vPik2fM_tO?;I zqv}FO=DbHdF_18KODsAuB#3^?, 2019, 2022, 2023, 2024, 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-01-24 23:22+0900\n" +"Last-Translator: Seong-ho Cho \n" +"Language-Team: Korean \n" +"Language: ko\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"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.5\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: --block-list의 인자값이 잘못됨" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: --block-list 인자 갯수가 너무 많음" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "--block-list에서 필터 체인 번호 '%c:' 다음 블록 크기가 빠졌습니다." + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 값은 --block-list의 마지막 원소로만 사용할 수 있습니다" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: 알 수 없는 파일 형식" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: 지원하지 않는 무결성 검사 형식" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "'--files' 또는 '--files0' 옵션에는 하나의 파일만 지정할 수 있습니다." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "%s 환경 변수에 너무 많은 인자 값이 들어있습니다" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "빌드 시점에 압축 기능을 비활성했습니다" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "빌드 시점에 압축 해제 기능을 비활성했습니다" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "lzip 파일 (.lz) 압축은 지원하지 않습니다" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr ".xz 형식으로 압축하지 않으면 --block-list 옵션은 무시합니다" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "표준 출력으로 기록하지 않는 한 --format=raw, --suffix=.<확장자> 옵션이 필요합니다" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "최대 필터 갯수는 4 입니다" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "--filters%s=<필터> 옵션 오류:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "주어진 필터 설정으로는 메모리 사용 제한 값이 너무 적습니다." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "--block-lisk에서 필터 체인 %u번을 사용하고 있지만 --filters%u= 옵션으로 지정하지 않았습니다" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "RAW 모드에서의 프리셋 사용은 권장하지 않습니다." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "프리셋의 정확한 옵션 값은 프로그램 버전에 따라 다릅니다." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr ".lzma 형식은 LZMA1 필터만 지원합니다" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr ".xz 형식에는 LZMA1 필터를 사용할 수 없습니다" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "필터 체인 %u번이 --flush-timeout 옵션과 맞지 않습니다" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "--flush-timeout 옵션을 지정하였으므로 단일 스레드 모드로 전환합니다" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "필터 체인 %u번에서 지원하지 않는 옵션" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "최대 스레드 %개를 사용합니다." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "지원하지 않는 필터 체인 또는 필터 옵션" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "압축 해제시 %s MiB 메모리 용량이 필요합니다." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "메모리 사용량 %s MiB 제한을 넘지 않으려 스레드 수를 %s(에)서 %s(으)로 줄였습니다" + +#: src/xz/coder.c +#, 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(에)서 하나로 줄었습니다. 메모리 사용 자동 제한량 %sMiB를 여전히 초과합니다. 메모리 공간 %sMiB가 필요합니다. 어쨌든 계속합니다." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "메모리 사용 제한량 %sMiB를 넘지 않으려 단일 스레드 모드로 전환합니다" + +#: src/xz/coder.c +#, 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 "메모리 사용 제한량 %4$sMiB를 넘지 않으려 %2$sMiB에서 %3$sMiB로 LZMA%1$c 딕셔너리 크기를 조정했습니다" + +#: src/xz/coder.c +#, c-format +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 "메모리 사용 제한량 %5$sMiB를 넘지 않으려 %3$sMiB에서 %4$sMiB로 --filters%2$u의 LZMA%1$c 딕셔너리 크기를 조정했습니다" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "필터 체인 %u번 전환 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "파이프 생성 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() 실패: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: 파일을 이동한 것 같음, 제거 안함" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: 제거할 수 없음: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: 파일 소유자를 설정할 수 없음: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: 파일 소유 그룹을 설정할 수 없음: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: 파일 권한을 설정할 수 없음: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: 파일 동기화 실패: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: 파일의 디렉터리 동기화 실패: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "표준 입력에서 파일 상태 플래그 가져오기 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: 심볼릭 링크, 건너뜀" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: 디렉터리입니다, 건너뜀" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: 일반 파일 아님, 건너뜀" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: setuid 또는 setgid 비트 설정 있음, 건너뜀" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: 끈적이 비트 설정이 있는 파일, 건너뜀" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: 입력 파일에 하나 이상의 하드링크가 있습니다, 건너뜀" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "파일 이름 없음, 건너뜀" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "표준 입력으로의 상태 플래그 복원 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "표준 출력에서 파일 상태 플래그 가져오기 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: 디렉터리 열기 실패: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: 대상이 일반 파일이 아닙니다" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "표준 출력으로의 O_APPEND 플래그 복원 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: 파일 닫기 실패: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: 분할 파일 생성 시도시 탐색 실패: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: 읽기 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: 파일 탐색 오류: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: 예상치 못한 파일의 끝" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: 쓰기 오류: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "사용 안함" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "물리 메모리 양 (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "프로세서 스레드 수:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "압축:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "압축해제:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "멀티 스레드 압축 해제:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "-T0 기본값:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "하드웨어 정보:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "메모리 사용 제한량:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "스트림:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "블록 수:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "압축 용량:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "압축해제 용량:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "압축율:" + +#: src/xz/list.c +msgid "Check:" +msgstr "검사:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "스트림 패딩:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "요구 메모리:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "헤더 길이:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "파일 갯수:" + +#: src/xz/list.c +msgid "Stream" +msgstr "스트림" + +#: src/xz/list.c +msgid "Block" +msgstr "블록" + +#: src/xz/list.c +msgid "Blocks" +msgstr "블록" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "압축오프셋" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "압축해제오프셋" + +#: src/xz/list.c +msgid "CompSize" +msgstr "압축크기" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "압축해제크기" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "총크기" + +#: src/xz/list.c +msgid "Ratio" +msgstr "압축율" + +#: src/xz/list.c +msgid "Check" +msgstr "검사" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "검사값" + +#: src/xz/list.c +msgid "Padding" +msgstr "패딩" + +#: src/xz/list.c +msgid "Header" +msgstr "헤더" + +#: src/xz/list.c +msgid "Flags" +msgstr "플래그" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "메모리사용" + +#: src/xz/list.c +msgid "Filters" +msgstr "필터" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "없음" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "알 수 없음-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "알 수 없음-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "알 수 없음-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "알 수 없음-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "알 수 없음-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "알 수 없음-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "알 수 없음-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "알 수 없음-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "알 수 없음-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "알 수 없음-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "알 수 없음-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "알 수 없음-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: 파일 내용 없음" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: 유효한 .xz 파일로 보기에는 너무 작습니다" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "스트림 블록 압축 압축해제 압축율 검사 파일 이름" + +#: src/xz/list.c +msgid "Yes" +msgstr "예" + +# 주: 아니오가 아니라 아니요가 맞는 표현 +#: src/xz/list.c +msgid "No" +msgstr "아니요" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "최소 XZ 유틸리티 버전:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "파일 %s개\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "총:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list 옵션은 .xz 파일에만 동작합니다(--format=xz 또는 --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "'lzmainfo' 명령에 .lzma 파일 이름을 붙여 실행해보십시오." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list 옵션은 표준 입력 읽기를 지원하지 않습니다" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: 파일 이름 읽기 오류: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: 파일 이름 읽는 중 예상치 못한 입력 끝" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: 파일 이름을 읽는 도중 NULL 문자 발견. '--files' 옵션 대신 '--files0' 옵션을 사용하시려는게 아닙니까?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "아직 압축 동작과 압축 해제 동작에 --robot 옵션을 지원하지 않습니다." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "표준 출력에서 파일 이름을 읽을 때 표준 입력에서 데이터를 읽을 수 없습니다" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "내부 오류 (버그)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "시그널 처리자를 준비할 수 없습니다" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "무결성 검사 안함. 파일 무결성을 검증하지 않습니다" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "지원하지 않는 무결성 검사 형식. 파일 무결성을 검증하지 않습니다" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "메모리 사용량 한계에 도달했습니다" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "파일 형식을 인식할 수 없음" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "지원하지 않는 옵션" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "압축 데이터 깨짐" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "예상치 못한 입력 끝" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB 메모리 용량이 필요합니다. 제한을 비활성합니다." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB 메모리 용량이 필요합니다. 제한 용량은 %s 입니다." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: 필터 체인: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "자세한 사용법은 '%s --help'를 입력하십시오." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "도움말 텍스트 출력 오류(오류 코드 %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "사용법: %s [옵션]... [파일]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr ".xz 형식의 <파일>로 압축하거나 압축을 해제합니다." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "긴 옵션 버전의 필수 인자는 짧은 옵션에도 해당합니다." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "동작 방식:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "강제 압축" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "강제 압축 해제" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "압축 파일 무결성을 시험합니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr ".xz 파일에 대한 정보를 보여줍니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "동작 지정자:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "입력 파일을 그대로 둡니다 (삭제 안함)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "출력 파일을 강제로 덮어쓰고 링크 압축을 진행(해제)합니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "표준 출력에 기록하고 입력 파일을 삭제하지 않습니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "입력 파일을 제거하기 전 저장 장치로 출력 파일을 동기화하지 않습니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "첫 스트림 압축만 해제하며, 가능한 나머지 입력 데이터는 무시합니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "압축 해제시 희소 처리 파일을 만들지 않습니다" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "파일 압축시 접미사를 '.SUF'로 사용합니다" + +#: src/xz/message.c +msgid "FILE" +msgstr "<파일>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "<파일>에서 처리할 파일 이름을 읽습니다. <파일> 값을 생략하면, 표준 입ㄹ겨에서 파일 이름을 읽어들입니다. 파일 이름은 개행 문자로 끝나야 합니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "--files와 비슷하나 널 문자를 종결 문자로 사용합니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "기본 파일 형식 및 압축 옵션:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "<형식>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "인코딩 또는 디코딩할 파일 형식입니다. 사용할 수 있는 값은 'auto'(기본), 'xz', 'lzma', 'lzip', 'raw'가 있습니다" + +#: src/xz/message.c +msgid "NAME" +msgstr "<이름>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "무결성 검사 형식: 'none'(사용에 유의), 'crc32', 'crc64' (기본값), 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "압축 해제시" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "압축 사전 설정. 기본값은 6 입니다. 7-9를 사용하려면 압축 메모리 사용량*과* 압축 해제 메모리 사용량을 지정하십시오!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "CPU 점유 시간을 더 확보하여 압축률을 개선합니다. 압축 해제시 메모리 요구 용량에는 영향을 주지 않습니다" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "<숫자>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "최대 스레드 <개수>를 사용합니다. 기본값은 실제 프로세서 코어 수 만큼의 스레드를 사용하도록 지정하는 0 값입니다" + +#: src/xz/message.c +msgid "SIZE" +msgstr "<크기>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "모든 <크기>의 입력 다음 새 .xz 블록을 시작합니다. 스레드 압축의 블록 크기를 지정할 때 사용합니다" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "<블록>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "콤마로 구분한 연속 지정값 만큼 압축 해제한 데이터 용량 다음, 새 .xz 블록을 시작합니다. 압축 해제 데이터 크기 앞에 콜론(':') 표기 후 필터 체인 번호(0-9)를 추가로 지정할 수 있습니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "압축하는 동안, 이전 데이터를 플러싱한 후 더 많은 블록 입력을 읽어들일 때 <숫자> 만큼의 밀리초단위 제한시간을 넘기면 모든 대기 데이터를 소거합니다" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "<제한>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "압축, 해제, 스레드 분산 압축 해제, 또는 유사 동작 수행시 메모리 사용량 제한을 설정합니다. 바이트 단위 <제한>값, % 단위 RAM 사용량을 지정하든지 아니면 기본값으로 0을 지정하십시오" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "압축 설정이 메모리 사용량 제한을 넘어서면 설정 값을 줄이는 대신 오류 메시지를 나타냅니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "압축용 개별 필터 체인 설정 (사전 설정 사용을 대신함):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "<필터>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "liblzma 필터 문자열 문법으로 필터 체인을 설정합니다. 자세한 정보는 --filters-help 옵션을 사용하십시오" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "--block-list 옵션을 함께 사용할 수 있는 liblzma 필터 문자열 문법으로 추가 필터 체인을 설정합니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "liblzma 필터 문자열 문법 추가 정보를 나타낸 후 빠져나갑니다" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "<옵션>" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 또는 LZMA2입니다. <옵션> 값은 다음과 같은 0개 이상의 쉼표 구분 값입니다 (유효한 값. 기본값):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "<사전설정>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "사전 설정 값으로 옵션 재설정" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "딕셔너리 크기" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "보이는 대로의 컨텍스트 비트 갯수" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "보이는 대로의 위치 비트 갯수" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "위치 비트 수" + +#: src/xz/message.c +msgid "MODE" +msgstr "<모드>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "압축 모드" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "일치하는 항목의 nice 길이" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "일치 항목 검색기" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "최대 검색 깊이 값. 0=자동 (기본값)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ 필터 (32비트 및 64비트)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ 필터" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ 필터" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ 필더" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ 필터 (빅 엔디안 전용)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (아이태니엄) BCJ 필터" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ 필터" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ 필터" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "모든 BCJ 필터에 대한 적절한 <옵션>값:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "변환 시작 오프셋 값 (기본값=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "델타 필터. 적절한 <옵션> (적절한 값. 기본값):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "바이트 값 차이 거리" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "기타 옵션:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "경고문 숨김. 더 많은 오류 메시지를 숨가려면 두번 지정하십시오" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "자세하게 표시. 더 자세하게 출력하려면 두번 지정하십시오" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "경고가 종료 상태에 영향을 주지 않게합니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "기계 해석 가능한 메시지를 사용합니다 (스크립트 활용시 유용함)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "RAM 총 용량과 현재 활성 메모리 사용 한계값을 표시하고 나갑니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "간단한 도움말 표시 (기본 옵션만 표시)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "이 긴 도움말을 보여주고 나갑니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "이 간단한 도움말을 보여주고 나갑니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "긴 도움말 표시 (고급 옵션도 보여줍니다)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "버전 번호를 표시하고 빠져나갑니다" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "<파일> 값이 없거나, <파일> 값이 - 문자이면, 표준 입력을 읽어들입니다." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "<%s> (영문 또는 핀란드어)에 버그를 보고하십시오." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s 홈페이지: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "!! 주의 !! 개발 버전이며 실제 사용 용도가 아닙니다." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" +"--filters=<필터> 또는 --filters1=<필터> ... --filters9=<필터> 옵션으로\n" +"필터 체인을 지정합니다. 체인의 각 필터는 공백 문자 또는 '--'으로 구분할 수 있습니다.\n" +"필터 체인 대신 %s 사전 설정 값을 지정할 수 있습니다." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "지원하는 필터와 옵션은 다음과 같습니다:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "옵션은 쉼표로 구분한 '이름=값' 쌍이어야합니다" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: 잘못된 옵션 이름" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "잘못된 옵션 값" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "지원하지 않는 LZMA1/LZMA2 사전 설정: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "lc값과 lp값의 합이 4를 초과하면 안됩니다" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: 파일 이름에 알 수 없는 확장자 붙음, 건너뜀" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: 파일에 이미 '%s' 확장자가 붙음, 건너뜀" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: 잘못된 파일 이름 확장자" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "값이 10진 양의 정수가 아닙니다" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: 잘못된 승수 단위" + +#: src/xz/util.c +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 +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "'%s' 옵션 값은 [%, %] 범위 안에 있어야 합니다" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "압축 데이터를 터미널에서 읽을 수 없습니다" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "압축 데이터를 터미널에 기록할 수 없습니다" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "사용법: %s [--help] [--version] [<파일>]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr ".lzma 파일 헤더에 저장한 정보를 보여줍니다." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr ".lzma 파일이기에는 너무 작습니다" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr ".lzma 파일이 아닙니다" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "표준 출력 기록 실패" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "알 수 없는 오류" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "지원하지 않는 사전 설정" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "지원하지 않는 사전 설정 플래그" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "알 수 없는 옵션 이름" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "옵션 값을 비워둘 수 없습니다" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "값 범위 벗어남" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "이 옵션은 배수 단위 접미사를 지원하지 않습니다" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "잘못된 배수 단위 (KiB, MiB, 또는 GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "알 수 없는 파일 형식" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr ".xz 형식에 이 필터를 사용할 수 없습니다" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "메모리 할당 실패" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "빈 문자열을 허용하지 않습니다. 기본값이 필요하다면 '6'을 넣으십시오" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "최대 필터 갯수는 4 입니다" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "필터 이름이 빠졌습니다" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "부적절한 필터 체인 ('lzma2'를 뺐습니까?)" diff --git a/cpp/third_party/xz-5.8.3/po/nl.gmo b/cpp/third_party/xz-5.8.3/po/nl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6f2c6756bbb1b98bd8a277721cc8badcfa45a213 GIT binary patch literal 28532 zcmcJX3w&Hxedli=4{!p65J!(3HSZSXv%iXzBO&Kj+@L zBgsy(?9RtWzq$9GbM86+^M9TH`H$~8>*Uv+6a>Mk{22tF`-mW@@cmV12EoI)KKls{ zF9bJI^m#2f0KN{~3Vs?q3;dbKN1qb}Cv$y1cq(`i_;|1ko)7Nu7=b0OUkW}Ayd7K* z{*}M}5%^TDAAfETYyd9>p8?(os@|>OW5Eyk`+o**LR84m<*CybbV5@Ylghz)ynPz#oApgO@O9z3+1H(O?3e4c-j0 zT)}I=HuyHM3Z4h?Lhxo#>+lv(bbJSR3V5f#|7GwruI~Xu@IG(?JdH(By~Ci|-vGiM zK^0sF*8TNSQ0wv{P<-)ze|;~g`JWlO@m&m#aD62xUb`7o{oBDazZcB>pEjuZ-U@0R?*_#u-vu?Ur(WdlUkjeX^>e{Ka29NWw}Kj{glG?N3J3{;aZq$= zf}+bZDEhq`yaK!p)cd~*>b*Y(MW@s09M%cegX(t&_;7F!_%LuUsCAj}&tC{?JznDR z^&qSoywgAbG$?w17JLkNDvPQ2Jpoj`i$T$S52*3I2-N#t1)c`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qTS-w9fRlc&$j@r~9vLga?q^;~$-O6WudAyk>%XaU~Si z$Wq*Un1^vqNApQX>)2=1W#CydR)26T(d-?O6&|rg$k?@;1)@swI8y{lNmB|<6jYXz zVUeWwj64trL8XrVPXb3x-+^N-A4*Yr2BW;=_Qql@(JnqvSCEttN!mWf$#v8UvN)YC zkzlq4#Y}i!Qm_#HK|M*3a!wKEL~_~vLXQDrj6P%0Efbzhsg%@94qEv|OZLpAyGIZ7 zEU*kOdxMu!I|yJlwmQrUYK0`6XJ(j0Bt|uCXGob9W}}R$H7b~yBt_g?Oh>csJMtxW zYYcCig&vkJ<0lHN5aNr}NT;PWwr`nAGaV)-g#~c-_+JtEFLe~*2)rANgpt_kPhOIy zF?6q|7?9!A>Ir!(^pG_X&%o_#8?AzcwSn|XK7xE4A?tQ;eq~okdy?q+Uwzifq31SI zA%g}}*M`I03V6$Rz~#%+=fxT>e}0yPWP1yv$;s?Bphj5SBy`7hf@$l}(j4@H4m-gf zG{{%S$q)w(a1kkEc972h&&OVv(27{ev#*zP{S2%7E6U8{Dox>%)7+*@Cg@KkPQ)W>;MTfc_KQHTTo%F53?O2RmHRQ~&?~ literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/nl.po b/cpp/third_party/xz-5.8.3/po/nl.po new file mode 100644 index 0000000000..4dc897f5e2 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/nl.po @@ -0,0 +1,1269 @@ +# SPDX-License-Identifier: 0BSD +# +# Dutch translation for xz-utils. +# This file is published under the BSD Zero Clause License. +# +# "Wie soll ich wissen was ich meine bevor ich höre was ich sage." +# +# Benno Schulenberg , 2019, 2024, 2025. +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-01-25 15:51+0100\n" +"Last-Translator: Benno Schulenberg \n" +"Language-Team: Dutch \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Ongeldig argument bij --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Te veel argumenten bij --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "Bij '--block-list' ontbreekt blokgrootte na filterketennummer '%c':" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "Bij '--block-list' kan '0' alleen het laatste element zijn" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Onbekend soort bestandsindeling" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Niet-ondersteund soort integriteitscontrole" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Slechts één bestand kan opgegeven worden met '--files' of '--files0'." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Omgevingsvariabele '%s' bevat te veel argumenten" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Compressie werd uitgeschakeld tijdens compilatie" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Decompressie werd uitgeschakeld tijdens compilatie" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Compressie van LZIP-bestanden (.lz) wordt niet ondersteund" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "'--block-list' wordt genegeerd (alleen geldig bij comprimeren naar .xz-indeling)" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Met '--format=raw' is optie '--suffix=.EXT' vereist (tenzij naar standaarduitvoer geschreven wordt)" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Het maximum aantal filters is vier" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Fout in optie '--filters%s=FILTERS':" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Geheugengebruiksgrens is te laag voor de gegeven filterconfiguratie." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "filterketen %u is gebruikt bij '--block-list' maar niet gegeven met '--filters%u='" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Gebruik van een voorinstelling in rauwe modus wordt ontraden." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "De precieze opties van de voorinstellingen kunnen variëren tussen programmaversies." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "De .lzma-indeling ondersteunt alleen het LZMA1-filter" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 kan niet gebruikt worden met de .xz-indeling" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Filterketen %u is niet compatibel met '--flush-timeout'" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Overgeschakeld naar enkeldraads modus wegens '--flush-timeout'" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Niet-ondersteunde opties in filterketen %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Tot % threads worden gebruikt." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Niet-ondersteunde filterketen of filteropties" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Decompressie heeft %s MiB aan geheugen nodig." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Aantal threads is gereduceerd van %s naar %s om de geheugengebruiksgrens van %s MiB niet te overschrijden" + +#: src/xz/coder.c +#, 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 "Het aantal threads is gereduceerd van %s naar 1, maar de automatische geheugengebruiksgrens van %s MiB wordt alsnog overschreden. %s MiB aan geheugen is nodig. Toch doorgegaan." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Overgeschakeld naar enkeldraads modus, om de geheugengebruiksgrens van %s MiB niet te overschrijden" + +#: src/xz/coder.c +#, 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 "Grootte van LZMA%c-woordenboek is aangepast van %s MiB naar %s MiB om de geheugengebruiksgrens van %s MiB niet te overschrijden" + +#: src/xz/coder.c +#, c-format +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 "Grootte van LZMA%c-woordenboek voor '--filters%u' is aangepast van %s MiB naar %s MiB om de geheugengebruiksgrens van %s MiB niet te overschrijden" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Fout bij overgaan naar filterketen %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Fout bij aanmaken van pijp: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() is mislukt: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "Bestand '%s' schijnt verplaatst te zijn -- niet verwijderd" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "Kan '%s' niet verwijderen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Kan bestandseigenaar niet instellen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Kan bestandsgroep niet instellen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Kan de toegangsrechten niet instellen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Synchroniseren van bestand is mislukt: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Synchroniseren van bestandsmap is mislukt: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Fout bij verkrijgen van de bestandstoestandsvlaggen van standaardinvoer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Is een symbolische koppeling -- overgeslagen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Is een map -- overgeslagen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Is geen gewoon bestand -- overgeslagen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Bestand heeft SETUID- of SETGID-bit gezet -- overgeslagen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Bestand heeft 'sticky'-bit gezet -- overgeslagen" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Invoerbestand heeft meer dan één harde koppeling -- overgeslagen" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Lege bestandsnaam -- overgeslagen" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Fout bij herstellen van de bestandstoestandsvlaggen naar standaardinvoer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Fout bij verkrijgen van de bestandstoestandsvlaggen van standaarduitvoer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Openen van map is mislukt: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Doel is geen gewoon bestand" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Fout bij herstellen van de 'O_APPEND'-vlag naar standaardinvoer: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Sluiten van bestand is mislukt: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: 'Seeken' is mislukt bij aanmaken van een bestand met gaten: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Leesfout: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Fout bij 'seeken': %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Onverwacht einde van bestand" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Schrijffout: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Uitgeschakeld" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Hoeveelheid fysiek geheugen (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Aantal processor-threads:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Compressie:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Decompressie:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Multi-threaded decompressie:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Default voor -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Hardware-informatie:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Geheugengebruiksgrenzen:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Streams:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blokken:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Gecomprimeerde grootte:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Ongecomprimeerde grootte:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Ratio:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Controle:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Stream-opvulling:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Benodigd geheugen:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Groottes in koppen:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Aantal bestanden:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Stream" + +#: src/xz/list.c +msgid "Block" +msgstr "Blok" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blokken" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "Gecomp.Start" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "Ongecomp.Start" + +#: src/xz/list.c +msgid "CompSize" +msgstr "Gecomp.Grootte" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "Ongecomp.Grootte" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "TotaleGrootte" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Ratio" + +#: src/xz/list.c +msgid "Check" +msgstr "Controle" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "Cont.waarde" + +#: src/xz/list.c +msgid "Padding" +msgstr "Vulling" + +#: src/xz/list.c +msgid "Header" +msgstr "Kop" + +#: src/xz/list.c +msgid "Flags" +msgstr "Vlaggen" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "Geh.geb." + +#: src/xz/list.c +msgid "Filters" +msgstr "Filters" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Geen" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Onbekend-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Onbekend-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Onbekend-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Onbekend-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Onbekend-8" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Onbekend-9" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Onbekend-10" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Onbekend-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Onbekend-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Onbekend-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Onbekend-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Onbekend-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Bestand is leeg" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Te klein om een geldig .xz-bestand te zijn" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Strms Blokkn Gecomprim. Ongecomprim. Ratio Contrle Bestandsnaam" + +#: src/xz/list.c +msgid "Yes" +msgstr "Ja" + +#: src/xz/list.c +msgid "No" +msgstr "Nee" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Minimale XZ-Utils-versie:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s bestand\n" +msgstr[1] "%s bestanden\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Totalen:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "'--list' werkt alleen voor .xz-bestanden (--format=xz of --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Probeer 'lzmainfo' met .lzma-bestanden." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "'--list' is niet mogelijk bij lezen van standaardinvoer" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Fout bij lezen van bestandsnamen: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Onverwacht einde van invoer tijdens lezen van bestandsnamen" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: NUL-teken gevonden bij lezen van bestandsnamen; misschien bedoelde u '--files0' i.p.v. '--files'?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Compressie en decompressie met '--robot' worden nog niet ondersteund." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Kan geen gegevens van standaardinvoer lezen wanneer bestandsnamen daarvan gelezen worden" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "** Interne fout (bug) **" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Kan signaalverwerkers niet instellen" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Geen integriteitscontrole -- bestandsintegriteit wordt niet gecontroleerd" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Niet-ondersteunde integriteitscontrole -- bestandsintegriteit wordt niet gecontroleerd" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Geheugengebruiksgrens is bereikt" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Bestandsindeling niet herkend" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Niet-ondersteunde opties" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Gecomprimeerde gegevens zijn beschadigd" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Onverwacht einde van invoer" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB aan geheugen is nodig. De begrenzer is uitgeschakeld." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB aan geheugen is nodig. De grens is %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Filterketen: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Typ '%s --help' voor meer informatie." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Fout bij tonen van hulptekst (foutcode %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Gebruikt: %s [OPTIE...] [BESTAND...]\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Comprimeert of decomprimeert BESTANDen in de .xz-indeling." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "(Een verplicht argument bij een lange optie geldt ook voor de korte vorm.)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr " Werkingsmodus:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "comprimeren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "decomprimeren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "integriteit van gecomprimeerd bestand controleren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "informatie tonen over .xz-bestanden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Werkingsaanpassers:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "invoerbestanden behouden (niet verwijderen)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "uitvoerbestand overschrijven, koppelingen (de)comprimeren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "naar standaarduitvoer schrijven, invoerbestanden behouden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "het uitvoerbestand niet met het opslagmedium synchroniseren alvorens het invoerbestand te verwijderen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "alleen de eerste stream decomprimeren, en stilzwijgend eventuele overige invoergegevens negeren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "geen bestanden met gaten aanmaken bij het decomprimeren" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".EXT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "deze extensie gebruiken voor gecomprimeerde bestanden" + +#: src/xz/message.c +msgid "FILE" +msgstr "BESTAND" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "namen van te verwerken bestanden uit dit BESTAND halen; als BESTAND weggelaten wordt, dan worden de namen van standaardinvoer gelezen; elke naam moet afgesloten worden met een nieuweregelteken" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "zoals '--files' maar met het NUL-teken als naamsafsluiting" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Bestandsindeling- en compressie-opties:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "INDELING" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "te coderen of decoderen bestandsindeling; mogelijke waarden zijn 'auto' (standaard), 'xz', 'lzma', 'lzip', en 'raw'" + +#: src/xz/message.c +msgid "NAME" +msgstr "NAAM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "soort integriteitscontrole: 'none' (ontraden), 'crc32', 'crc64' (standaard), of 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "geen integriteitscontrole doen tijdens decomprimeren" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "compressiegraad (standaard is 6); denk aan geheugengebruik van compressor *en* decompressor alvorens 7-9 te gebruiken" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "compressieratio verbeteren met meer processortijd; heeft geen invloed op het geheugengebruik bij decompressie" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "GETAL" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +"maximaal dit aantal threads gebruiken; standaard is 0,\n" +"wat zoveel threads als er processorkernen zijn betekent" + +#: src/xz/message.c +msgid "SIZE" +msgstr "GROOTTE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "een nieuw .xz-blok beginnen na steeds dit aantal invoerbytes; gebruik dit om de blokgrootte voor threaded compressie in te stellen" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOKKEN" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "een nieuw .xz-blok beginnen na deze komma-gescheiden groottes van ongecomprimeerde gegevens; geef eventueel het filterketennummer op (0-9) gevolgd door ':' vóór een gegeven grootte" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "als tijdens compressie meer dan dit aantal milliseconden voorbijgegaan is sinds de vorige doorspoeling, en het lezen van meer gegevens zou blokkeren, dan alle wachtende gegevens doorspoelen" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "GRENS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "de geheugengebruiksgrens instellen voor compressie, decompressie, threaded decompressie, of allemaal; GRENS is in bytes, % van RAM, of 0 voor de standaardwaarden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "als compressie-instellingen de geheugengebruiksgrens overschrijden, een fout melden i.p.v. de instellingen te verlagen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Aangepaste filterketen voor compressie (een alternatief voor compressiegraden):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTERS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "de filterketen instellen met de liblzma-filtersyntax; gebruik '--filters-help' voor meer informatie" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "extra filterketens instellen met de liblzma-filtersyntax te gebruiken met '--block-list'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "meer informatie over de liblzma-filtersyntax tonen en stoppen" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "INSTEL" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 of LZMA2; INSTEL is een komma-gescheiden lijst van nul of meer van de volgende opties (geldige waarden; standaard):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "GRAAD" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "opties terugstellen op een voorinstelling" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "woordenboekgrootte" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "aantal contextbits per byte" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "aantal positiebits per byte" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "aantal positiebits" + +#: src/xz/message.c +msgid "MODE" +msgstr "MODUS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "compressiemodus" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "mooie lengte van overeenkomst" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "overeenkomstzoeker" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "maximum zoekdiepte; 0=automatisch (standaard)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ-filter (32-bit en 64-bit)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ-filter (alleen big endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Geldige INSTEL voor alle BCJ-filters:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "beginpunt voor conversies (standaard=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Delta-filter; geldige INSTEL (geldige waarden; standaard):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "afstand tussen bytes die van elkaar afgetrokken worden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Andere opties:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "waarschuwingen onderdrukken; -q -q onderdrukt ook fouten" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "melden wat er gedaan wordt; -v -v geeft nog meer info" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "waarschuwingen de afsluitwaarde niet laten beïnvloeden" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "meldingen in machine-opmaak geven (nuttig voor scripts)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "de totale hoeveelheid RAM en de actieve geheugengebruiksgrenzen tonen en stoppen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "korte hulptekst tonen (met alleen basisopties)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "deze lange hulptekst tonen en stoppen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "deze korte hulptekst tonen en stoppen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "lange hulptekst tonen (met ook geavanceerde opties)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "versienummer tonen en stoppen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Zonder BESTAND, of wanneer BESTAND '-' is, wordt standaardinvoer gelezen." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Rapporteer programmagebreken aan <%s> (in het Engels);\n" +"meld fouten in de vertaling aan ." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "Webpagina van %s: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "DIT IS een ONTWIKKELINGSVERSIE -- NIET BEDOELD voor WERKELIJK GEBRUIK." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Filterketens worden ingesteld met de opties '--filters=FILTERS' of '--filters1=FILTERS ... --filters9=FILTERS'. Elk filter in de keten kan gescheiden worden door spaties of '--'. In plaats van een filterketen kan ook een voorinstelling %s gegeven worden." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Ondersteunde filters en hun opties zijn:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Opties moeten 'naam=waarde'-paren zijn, gescheiden door komma's" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Ongeldige optienaam" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Ongeldige optiewaarde" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Niet-ondersteunde LZMA1/LZMA2-voorinstelling: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "De som van lc en lp mag niet groter zijn dan 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Bestand heeft onbekende extensie -- overgeslagen" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Bestand heeft al '%s'-extensie -- overgeslagen" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Ongeldige bestandsnaamextensie" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Waarde is geen niet-negatief tientallig geheel getal" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Ongeldig vermenigvuldigingsachtervoegsel" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Geldige achtervoegsels zijn 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Waarde van optie '%s' moet in het bereik [%, %] liggen" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Gecomprimeerde gegevens kunnen niet van een terminal gelezen worden" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Gecomprimeerde gegevens kunnen niet naar een terminal geschreven worden" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Gebruik: %s [--help] [--version] [BESTAND...]\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Toont informatie uit de .lzma-bestandskop." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Bestand is te klein om een .lzma-bestand te zijn" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Geen .lzma-bestand" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Schrijven naar standaarduitvoer is mislukt" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Onbekende fout" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Niet-ondersteunde voorinstelling" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Niet-ondersteunde vlag in voorinstelling" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Ongeldige optienaam" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Optiewaarde mag niet leeg zijn" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Waarde ligt buiten bereik" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Deze optie accepteert geen vermenigvuldigingsachtervoegsels" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Ongeldig vermenigvuldigingsachtervoegsel (KiB, MiB, of GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Onbekende filternaam" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Dit filter kan niet gebruikt worden met de .xz-indeling" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Onvoldoende geheugen beschikbaar" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Lege tekenreeks is niet toegestaan; probeer '6' als een standaardwaarde nodig is" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Het maximum aantal filters is vier" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Ontbrekende filternaam" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Ongeldige filterketen (ontbreekt 'lzma2' aan het eind?)" diff --git a/cpp/third_party/xz-5.8.3/po/pl.gmo b/cpp/third_party/xz-5.8.3/po/pl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..93864523d4fe9984c447bf5a1fc2a5a196128c67 GIT binary patch literal 29090 zcmb`P4V+wOUGERj76{nZT3S$%6KL2?n_V|)o3@*Vc9U%ArpfM_-85~mz}cCzo0FZH zGt8OEWJV~oQYyXxR}icPDPBRnS9!U-c+movHoW8W2f=xqZw4;_p9?+>90NCldp*YB2wVXQ7lJ8xDR>vi zas{sk+u+ZFRqz>1UI^X=Y8~DRY98MKo)3P)U;jh!iJX5H48bpgbKnzM6xBNl>iIiC z$RntNo4~q1KLu)C?gm8{@A2n<25S5lhpvBDfm58{2#VJ30#*NA;8VfRg8RX*fV#h9 za}aC=E1<^vW1zwBK-uHOot&-shNQE(Y-g0BVDPchLg!1*9k z5X^#_mnNur>4BQR9|vy$-v;Xap8@sWzXvr>PoZ&0C)fh2-M!!wz+1q_g9kya%bdUe z3Q+5Dug5onkZSOA{{CrD^Zgs(Mc@T2rrviMsCrj{n)h2k_3v&_?|U8iMDPtDQyRP( z6rX<-)I9t?cmeoF;4$#ez@GtkUFqiSv!MF_l&f6-E(S#}n?bd+0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lL(VWCPJmRj2<-OPIRrL>k*HtO{3Ix1Sz!fdBj)AY2WiY96~ z?KG-k_c-&vj>dL{^{BTLhrP4|gGX)#I$0c!jE!l$*~CbgG_p3dB^i)k9l6QIG1rV6 zIY}173D@wzVLcm*#0!dD@TBZ&x~{cbJ!>irEA+ArMTc24YS9(-WAJFNQ90g98%clt zi|Js&@oPGaLAg-(q zDjnrwyk;GmX{|Q8wLA;uu}WekD-9T_3PVB*Sy)Ny%@zlKr8L_%XzNfgW;_#C)7XhR z->U)DwbFW+wWCH=>}X@opXsKp)eKgx_4wo36!nFpkfAlco4G|=6{k_Boo)@r7mn-? zCc=ubInS~f5HI}9!bvqnSv!ntv9Wg27-sFM!-v8>dk<(?;F5sTvBl$^`qG+->KV~3`;RAAzYSUW;7W=S7{a(%QWvn`!)SwlvGtlYv*-C`NRDk{xH>RvNqvQC+RYtt_t~Q59CBcI4)8 zm~74>%{HnU>=hrlzr0;1w?(yJFO)pDyo}1T!vz-44n*A|v}&Bwdboe);53}ju!S0s z`*=~GHMEXGhFVsL&^m8xAB7NC9UH*CQq8Zg-i0^Yh-WC|9Q9$xO4@35ny$;fDUluH z${CaS*Ln=PFVmx&w2wplt#nDM1I4Ir4rE3zZVv{d`Vc{_pEPZi;lc4*e`{{O6i*Gk zGUxOzjF($=A*8X?Noo*yg5E3jknX}nFot72r^$_V@;O&0Mq%nmtSS2m1A@uvnBb8F zirX0^xvy9xJ@6PhG5kO`L4-HNf}SrKw`0Wd;imPb, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (الاسم)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "هذا دائماً هو السطر الأول عند البدء في سرد ملف. العمود الثاني في السطر هو اسم الملف." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (الملف)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "يحتوي هذا السطر على معلومات عامة حول ملف B<.xz>. يُطبع هذا السطر دائماً بعد سطر B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (التدفق)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "يُستخدم نوع السطر هذا فقط عند تحديد B<--verbose>. يوجد من أسطر B بعدد التدفقات الموجودة في ملف B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (الكتلة)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "يُستخدم نوع السطر هذا فقط عند تحديد B<--verbose>. يوجد من أسطر B بعدد الكتل الموجودة في ملف B<.xz>. تظهر أسطر B بعد كل أسطر B؛ ولا تتداخل أنواع الأسطر المختلفة." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (الملخص)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "يُستخدم نوع السطر هذا فقط عند تحديد B<--verbose> مرتين. يُطبع هذا السطر بعد كل أسطر B. مثل سطر B، يحتوي سطر B على معلومات عامة حول ملف B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (الإجماليات)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "هذا السطر هو دائماً السطر الأخير تماماً في مخرجات القائمة. يعرض الأعداد والأحجام الإجمالية." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "أعمدة أسطر B:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "عدد التدفقات في الملف" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "إجمالي عدد الكتل في التدفق (التدفقات)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "الحجم المضغوط للملف" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "الحجم غير المضغوط للملف" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "نسبة الضغط، مثلاً B<0.123>. إذا كانت النسبة فوق 9.999، تُعرض ثلاث شرطات (B<--->) بدلاً من النسبة." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "قائمة مفصولة بفواصل لأسماء فحوصات السلامة. تُستخدم السلاسل التالية لأنواع الفحص المعروفة: B، B، B، و B. لأنواع الفحص غير المعروفة، يُستخدم BI، حيث I هو معرّف الفحص كرقم عشري (رقم واحد أو رقمان)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "إجمالي حجم حشو التدفق في الملف" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "أعمدة أسطر B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "رقم التدفق (التدفق الأول هو 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "عدد الكتل في التدفق" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "إزاحة البداية المضغوطة" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "إزاحة البداية غير المضغوطة" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "الحجم المضغوط (لا يشمل حشو التدفق)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "الحجم غير المضغوط" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "نسبة الضغط" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "اسم فحص السلامة" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "حجم حشو التدفق" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "أعمدة أسطر B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "رقم التدفق الذي يحتوي على هذه الكتلة" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "رقم الكتلة بالنسبة لبداية التدفق (الكتلة الأولى هي 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "رقم الكتلة بالنسبة لبداية الملف" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "إزاحة البداية المضغوطة بالنسبة لبداية الملف" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "إزاحة البداية غير المضغوطة بالنسبة لبداية الملف" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "إجمالي الحجم المضغوط للكتلة (يشمل الترويسات)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "إذا حُدد B<--verbose> مرتين، تضاف أعمدة إضافية في أسطر B. لا تُعرض هذه الأعمدة مع B<--verbose> واحدة، لأن الحصول عليها يتطلب عمليات بحث (seeks) كثيرة وبالتالي قد يكون بطيئاً:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "قيمة فحص السلامة بالتمثيل الست عشري" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "حجم ترويسة الكتلة" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "أعلام الكتلة: يشير B إلى وجود الحجم المضغوط، ويشير B إلى وجود الحجم غير المضغوط. إذا لم يُضبط العلم، تظهر شرطة (B<->) بدلاً منه للحفاظ على طول السلسلة ثابتاً. قد تضاف أعلام جديدة في نهاية السلسلة مستقبلاً." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "حجم البيانات المضغوطة الفعلية في الكتلة (هذا يستثني ترويسة الكتلة، وحشو الكتلة، وحقول الفحص)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "مقدار الذاكرة (بالبايت) المطلوبة لفك ضغط هذه الكتلة باستخدام إصدار B هذا" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "تسلسل المرشحات. لاحظ أن معظم الخيارات المستخدمة وقت الضغط لا يمكن معرفتها، لأن الخيارات اللازمة لفك الضغط فقط هي التي تخزن في ترويسات B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "أعمدة أسطر B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "مقدار الذاكرة (بالبايت) المطلوبة لفك ضغط هذا الملف باستخدام إصدار B هذا" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B أو B للإشارة إلى ما إذا كانت كل ترويسات الكتل تحتوي على الحجم المضغوط وغير المضغوط مخزنين فيها" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I<منذ> B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "أقل إصدار B مطلوب لفك ضغط الملف" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "أعمدة سطر B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "عدد التدفقات" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "عدد الكتل" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "الحجم المضغوط" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "متوسط نسبة الضغط" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "قائمة مفصولة بفواصل لأسماء فحوصات السلامة التي كانت موجودة في الملفات" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "حجم حشو التدفق" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "عدد الملفات. هذا موجود للحفاظ على ترتيب الأعمدة السابقة بنفس ترتيبها في أسطر B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "إذا حُدد B<--verbose> مرتين، تضاف أعمدة إضافية في سطر B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "أقصى مقدار للذاكرة (بالبايت) المطلوبة لفك ضغط الملفات باستخدام إصدار B هذا" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "قد تضيف الإصدارات المستقبلية أنواع أسطر جديدة وأعمدة جديدة للأنواع الحالية، لكن الأعمدة الحالية لن تتغير." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "مساعدة المرشحات" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "تطبع B المرشحات المدعومة بالتنسيق التالي:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "Dies ist stets die erste Zeile, wenn eine Datei aufgelistet wird. Die zweite Spalte in der Zeile enthält den Dateinamen." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +# CHECK overall +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "Diese Zeile enthält allgemeine Informationen zur B<.xz>-Datei. Diese Zeile wird stets nach der B-Zeile ausgegeben." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Dieser Zeilentyp wird nur verwendet, wenn B<--verbose> angegeben wurde. Es gibt genau so viele B-Zeilen, wie Datenströme in der B<.xz>-Datei enthalten sind." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Dieser Zeilentyp wird nur verwendet, wenn B<--verbose> angegeben wurde. Es gibt so viele B-Zeilen, wie Blöcke in der B<.xz>-Datei. Die B-Zeilen werden nach allen B-Zeilen angezeigt; verschiedene Zeilentypen werden nicht verschachtelt." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Dieser Zeilentyp wird nur verwendet, wenn B<--verbose> zwei Mal angegeben wurde. Diese Zeile wird nach allen B-Zeilen ausgegeben. Wie die B-Zeile enthält die B-Zeile allgemeine Informationen zur B<.xz>-Datei." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Diese Zeile ist immer die letzte der Listenausgabe. Sie zeigt die Gesamtanzahlen und -größen an." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Die Spalten der B-Zeilen:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Anzahl der Datenströme in der Datei" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Gesamtanzahl der Blöcke in den Datenströmen" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Komprimierte Größe der Datei" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Unkomprimierte Größe der Datei" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "Das Kompressionsverhältnis, zum Beispiel B<0.123>. Wenn das Verhältnis über 9.999 liegt, werden drei Minuszeichen (B<--->) anstelle des Kompressionsverhältnisses angezeigt." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Durch Kommata getrennte Liste der Namen der Integritätsprüfungen. Für die bekannten Überprüfungstypen werden folgende Zeichenketten verwendet: B, B, B und B. BI wird verwendet, wobei I die Kennung der Überprüfung als Dezimalzahl angibt (ein- oder zweistellig)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Gesamtgröße der Datenstromauffüllung in der Datei" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Die Spalten der B-Zeilen:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Datenstromnummer (der erste Datenstrom ist 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Anzahl der Blöcke im Datenstrom" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Komprimierte Startposition" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Unkomprimierte Startposition" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Komprimierte Größe (schließt die Datenstromauffüllung nicht mit ein)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Unkomprimierte Größe" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Kompressionsverhältnis" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Name der Integritätsprüfung" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Größe der Datenstromauffüllung" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Die Spalten der B-Zeilen:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Anzahl der in diesem Block enthaltenen Datenströme" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Blocknummer relativ zum Anfang des Datenstroms (der erste Block ist 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Blocknummer relativ zum Anfang der Datei" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Komprimierter Startversatz relativ zum Beginn der Datei" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Unkomprimierter Startversatz relativ zum Beginn der Datei" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Komprimierte Gesamtgröße des Blocks (einschließlich Header)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Wenn B<--verbose> zwei Mal angegeben wurde, werden zusätzliche Spalten in die B-Zeilen eingefügt. Diese werden mit einem einfachen B<--verbose> nicht angezeigt, da das Ermitteln dieser Informationen viele Suchvorgänge erfordert und daher recht langsam sein kann:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Wert der Integritätsprüfung in hexadezimaler Notation" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Block-Header-Größe" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Block-Schalter: B gibt an, dass die komprimierte Größe verfügbar ist, und B gibt an, dass die unkomprimierte Größe verfügbar ist. Falls der Schalter nicht gesetzt ist, wird stattdessen ein Bindestrich (B<->) angezeigt, um die Länge der Zeichenkette beizubehalten. In Zukunft könnten neue Schalter am Ende der Zeichenkette hinzugefügt werden." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Größe der tatsächlichen komprimierten Daten im Block. Ausgeschlossen sind hierbei die Block-Header, die Blockauffüllung und die Prüffelder." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Größe des Speichers (in Byte), der zum Dekomprimieren dieses Blocks mit dieser B-Version benötigt wird." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Filterkette. Beachten Sie, dass die meisten der bei der Kompression verwendeten Optionen nicht bekannt sein können, da in den B<.xz>-Headern nur die für die Dekompression erforderlichen Optionen gespeichert sind." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Die Spalten der B-Zeilen:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Größe des Speichers (in Byte), der zum Dekomprimieren dieser Datei mit dieser B-Version benötigt wird." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B oder B geben an, ob in allen Block-Headern sowohl die komprimierte als auch die unkomprimierte Größe gespeichert ist." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Minimale B-Version, die zur Dekompression der Datei erforderlich ist" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "Die Spalten der B-Zeile:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Anzahl der Datenströme" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Anzahl der Blöcke" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Komprimierte Größe" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Durchschnittliches Kompressionsverhältnis" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Durch Kommata getrennte Liste der Namen der Integritätsprüfungen, die in den Dateien präsent waren." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Größe der Datenstromauffüllung" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Anzahl der Dateien. Dies dient dazu, die Reihenfolge der vorigen Spalten an die in den B-Zeilen anzugleichen." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Wenn B<--verbose> zwei Mal angegeben wird, werden zusätzliche Spalten in die B-Zeile eingefügt:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Maximale Größe des Speichers (in Byte), der zum Dekomprimieren der Dateien mit dieser B-Version benötigt wird." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "Zukünftige Versionen könnten neue Zeilentypen hinzufügen, weiterhin könnten auch in den vorhandenen Zeilentypen weitere Spalten hinzugefügt werden, aber die existierenden Spalten werden nicht geändert." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "Filterhilfe" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "B gibt die unterstützten Filter im folgenden Format aus:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "C'est toujours la première ligne au début de la liste d'un fichier. La seconde colonne de la ligne est le nom de fichier." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "Cette ligne contient l'information globale sur le fichier B<.xz>. Cette ligne est toujours écrite après la ligne B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Ce type de ligne n'est utilisée que lorsque B< --verbose> a été indiquée. Il y a autant de lignes B qu'il y a de flux dans le fichier B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Ce type de ligne n'est utilisé seulement lorsque B<--verbose> a été indiquée. Il y a autant de lignes B qu'il y a de blocs dans le fichier B<.xz>. Les lignes B sont affichées après toutes les lignes B ; les différents types de lignes ne sont pas imbriqués." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Ce type de ligne n'est utilisé que lorsque B<--verbose> a été indiqué deux fois. Cette ligne est affichée après toutes les lignes B. Comme la ligne B, la ligne B contient l'information globale sur le fichier B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Cette ligne est toujours la toute dernière ligne de la sortie. Elle affiche les comptes et les tailles totaux." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Les colonnes des lignes B :" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Nombre de flux dans le fichier" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Nombre total de blocs dans le ou les flux." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Taille compressée du fichier" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Taille décompressée du fichier" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Liste de noms de contrôles d'intégrité séparés par des virgules. Les chaînes suivantes sont utilisées pour les types de vérification connus : B, B, B et B. Pour le types de vérification inconnus, BI est utilisé, où I est un identifiant de vérification sous la forme d'un nombre décimal (un ou deux chiffres)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Taille totale du remplissage du flux dans le fichier" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Les colonnes des lignes B :" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Numéro de flux (le premier flux a le numéro 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Nombre de blocs dans le flux" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Décalage de départ compressé" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Décalage de départ décompressé" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Taille compressée (ne comprend pas le remplissage du flux)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Taille décompressée" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Taux de compression" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Nom de la vérification d'intégrité" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Taille du remplissage de flux" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Les colonnes des lignes B :" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Numéro du flux qui contient ce bloc" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Numéro du bloc relatif au commencement du flux (le premier bloc a pour numéro 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Numéro du bloc relatif au début du fichier" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Décalage de départ compressé relatif au début du fichier" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Décalage de départ décompressé relatif au début du fichier" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Taille compressée totale du bloc (en-têtes inclus)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Si B<--verbose> a été indiqué deux fois, les colonnes additionnelles sont inclues sur les lignes B. Elles ne sont pas affichées avec un seul B<--verbose>, car l'obtention de ces informations nécessite de nombreuses recherches et peut donc être lente :" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Valeur de la vérification d'intégrité en hexadécimal" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Taille d'en-tête de bloc" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Drapeaux du bloc : B indique que la taille compressée est présente, et B indique que la taille décompréssée est présente. Si le drapeau n'est pas indiqué, un tiret (B<->) est affiché à la place pour que la longueur de la chaîne reste fixe. De nouveaux drapeaux pourraient être ajoutés à la fin de la chaîne dans le futur." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Taille des données effectivement compressées dans le bloc (en excluant l'en-tête de bloc, le remplissage de bloc et les champs de vérification)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Quantité de mémoire (en octets) nécessaire pour décompresser ce bloc avec cette version de B." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Chaîne de filtrage. Remarquez que la plupart des options utilisées au moment de la compression ne peuvent pas être connues, car seules les options nécessaires pour la décompression sont stockées dans les en-têtes B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Les colonnes des lignes B :" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Quantité de mémoire (en octets) nécessaire pour décompresser ce fichier avec cette version de B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B ou B indique si tous les en-têtes de bloc stockent à la fois la taille compressée et la taille décompressée." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Version minimale de B nécessaire pour décompresser le fichier." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "Les colonnes de la ligne B :" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Nombre de flux" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Nombre de blocs" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Taille compressée" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Taux de compression moyen" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Liste séparée par des virgules des noms de vérification d'intégrité qui étaient présents dans les fichiers" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Taille de remplissage de flux" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Nombre de fichiers. Permet de garder l'ordre des colonnes précédentes comme sur les lignes B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Si B<--verbose> a été indiqué deux fois, des colonnes supplémentaires sont incluses sur la ligne B :" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Quantité maximale de mémoire (en octets) nécessaire pour décompresser les fichiers avec cette version de B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "Les versions futures pourront ajouter de nouveaux types de lignes et de nouvelles colonnes pourront être ajoutées aux types de lignes existants, mais les colonnes existantes ne seront pas modifiées." + +#. type: SS +#: ../src/xz/xz.1 +#, fuzzy, no-wrap +#| msgid "Filter" +msgid "Filters help" +msgstr "Filtre" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "Questa è sempre la prima riga quando si inizia a elencare un file. La seconda colonna della riga è il nome del file." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "Questa riga contiene informazioni generali sul file B<.xz>. Questa riga viene sempre stampata dopo la riga B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Questo tipo di riga viene utilizzato solo quando è stato specificato B<--verbose>. Sono presenti tante righe B quanti sono i flussi nel file B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Questo tipo di riga viene utilizzato solo quando è stato specificato B<--verbose>. Ci sono tante righe B quanti sono i blocchi nel file B<.xz>. Le righe B vengono visualizzate dopo tutte le righe B; i diversi tipi di riga non vengono interlacciati." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Questo tipo di riga viene utilizzato solo quando B<--verbose> è stato specificato due volte. Questa riga viene stampata dopo tutte le righe B. Come la riga B, la riga B contiene informazioni generali sul file B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Questa riga è sempre l'ultima riga dell'output dell'elenco. Mostra i conteggi totali e le dimensioni." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Le colonne delle righe B:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Numero di flussi nel file" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Numero totale di blocchi nel flusso/i." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Dimensione compressa del file" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Dimensione non compressa del file" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "Rapporto di compressione, es. B<0.123>. Se il rapporto è oltre 9999, al posto del rapporto vengono mostrati tre trattini (B<--->)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Elenco separato da virgole dei nomi dei controlli di integrità. Le stringhe seguenti vengono utilizzate per i tipi di controllo conosciuti: B, B, B, e B. Per i tipi di controllo non conosciuti viene utilizzato BI, dove I è l'ID del controllo come numero decimale (una o due cifre)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Dimensione totale del padding del flusso nel file" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Le colonne delle righe B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Numero di flusso (il primo è 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Numero di blocchi nel flusso" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Offset iniziale compressione" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Offset iniziale decompressione" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Dimensione compressa (non include il padding del flusso)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Dimensione non compressa" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Rapporto di compressione" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Nome del controllo di integrità" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Dimensione del padding del flusso" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Le colonne delle righe B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Numero di flussi che contengono questo blocco" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Numero del blocco relativo all'inizio del flusso (il primo blocco è 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Numero del blocco relativo all'inizio del file" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Offset iniziale compressione relativo all'inizio del file" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Offset iniziale decompressione relativo all'inizio del file" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Dimensione totale compressa del blocco (incluse le intestazioni)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Se B<--verbose> viene specificato due volte, sono incluse colonne aggiuntive nelle righe B. Queste non sono mostrate con un B<--verbose> singolo, perché recuperare queste informazioni richiede molte ricerche e quindi può essere lento:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Valore del controllo di integrità in formato esadecimale" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Dimensione intestazione blocco" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Flag del blocco: Bindica che è presente la dimensione compressa, B indica che è presente la dimensione non compressa. Se il flag non è impostato, viene mostrato un trattino (B<->) per mantenere fissa la lunghezza della stringa. Nuovi flag potrebbero essere aggiunti alla fine della stringa in futuro." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Dimensione dei dati compressi effettivi nel blocco (sono esclusi l'intestazione del blocco, il padding del blocco e i campi di controllo)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Quantità di memoria (in byte) necessaria per decomprimere questo blocco con questa versione B" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Catena di filtri. Si noti che la maggior parte delle opzioni utilizzate al momento della compressione non è nota, perché solo le opzioni necessarie per la decompressione sono memorizzate nelle intestazioni B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Le colonne delle righe B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Quantità di memoria (in byte) necessaria per decomprimere questo file con questa versione B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B o B indica se tutte le intestazioni di blocco contengono all'interno sia dimensioni compresse che dimensioni non compresse" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Versione minima di B richiesta per decomprimere il file" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "Le colonne delle righe B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Numero di flussi" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Numero di blocchi" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Dimensione compressa" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Rapporto di compressione medio" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Elenco separato da virgole dei nomi dei controlli di integrità presenti nei file" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Dimensione del padding dello stream" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Numero di file. Questo serve a mantenere l'ordine delle colonne precedenti uguale a quello delle righe del B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Se B<--verbose> viene specificato due volte, sono incluse colonne aggiuntive nella riga B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Quantità massima di memoria (in byte) necessaria per decomprimere i file con questa versione B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "Versioni future potrebbero aggiungere nuovi tipi di riga e nuove colonne possono essere aggiunte ai tipi di riga esistenti, ma le colonne esistenti non verranno modificate." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "Aiuto sui filtri" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "B stampa i filtri supportati nel seguente formato:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "이 행은 항상 파일 목록 시작 부분의 첫번째 줄에 있습니다. 이 행의 두번째 컬럼에 파일 이름이 들어있습니다." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "이 행에는 B<.xz> 파일의 전반적인 정보가 들어있습니다. 이 행은 항상 B 행 다음에 있습니다." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "이 행 형식은 B<--verbose> 옵션을 지정했을 때만 사용합니다. B<.xz> 파일의 B 행 수만큼 나타납니다." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "이 행 형식은 B<--verbose> 옵션을 지정했을 때만 사용합니다. B<.xz> 파일의 블록 수만큼 B 행이 나타납니다. B 행은 모든 B 행 다음에 나타납니다. 다른 형식의 행이 끼어들지는 않습니다." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "이 행 형식은 B<--verbose> 옵션을 두번 지정했을 때만 사용합니다. 이 행은 모든 B 행 다음에 출력합니다. B 행과 비슷하게, B 행에는 B<.xz> 파일의 전반적인 정보가 담겨있습니다." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "이 행은 목록 출력의 가장 마지막에 항상 나타납니다. 총 갯수와 크기를 나타냅니다." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "B 행 컬럼:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "파일 스트림 갯수" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "스트림의 블록 총 갯수" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "파일 압축 크기" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "파일 압축 해제 크기" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "예를 들면, B<0.123>과 같은 압축율 입니다. 비율이 9.999라면, 대시 문자 3개 (B<--->)를 비율 값 대신 나타냅니다." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "쉼표로 구분한 무결성 검사 이름 목록입니다. B, B, B, B 문자열을 알려진 검사 형식으로 사용합니다. 알 수 없는 검사 형식에 대해서는 BI을 사용하며, 여기서 I은 (한 두자리) 정수형 숫자값으로 이루어진 검사 ID 입니다." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "파일의 스트림 패딩 총 길이" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "B 행 컬럼:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "스트림 번호 (첫 스트림은 1번)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "스트림의 블록 총 갯수" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "압축 시작 오프셋" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "비압축 시작 오프셋" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "압축 크기 (스트림 패딩 미포함)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "압축 해제 용량" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "압축율" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "무결성 검사 이름" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "스트림 패딩 길이" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "B 행 컬럼:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "이 블록이 들어간 스트림 갯수" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "스트림 시작 부분의 블록 번호 (첫번째 블록은 1번)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "파일 시작 부분의 블록 번호" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "파일 시작 부분의 압축 시작 오프셋" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "파일 시작 부분의 비압축 시작 오프셋" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "총 블록 압축 크기 (헤더 포함)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "B<--verbose>를 두 번 지정하면, 추가 컬럼을 B 행에 넣습니다. B<--verbose> 단일 지정시에는 이 정보를 볼 때 탐색을 여러번 수행해야 하기 때문에 실행 과정이 느려질 수 있어서 나타내지 않습니다:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "16진수 무결성 검사값" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "블록 헤더 크기" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "블록 플래그: B는 압축 크기가 현재 값임을 나타내고, B는 압축 전 원본 크기가 현재 값임을 나타냅니다. 플래그를 설정하지 않았다면, 문자열 길이를 유지할 목적으로 대시 B<-> 를 대신 나타냅니다. 새 플래그는 나중에 문자열 끝 부분에 추가할 예정입니다." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "블록에 압축 해서 넣은 데이터의 실제 츠기 (블록 헤더, 블록 패딩, 검사 필드 제외)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "이 B 버전에서 이 블록의 압축을 해제할 때 필요한 (바이트 단위) 메모리 용량" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "필터 체인. 대부분 사용하는 옵션은 압축 해제시 필요한 옵션만을 B<.xz> 헤더에 저장하기 때문에 압축 시간에 알 수 없습니다." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "B 행 컬럼:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "이 B 버전에서 이 파일 압축을 해제할 때 필요한 (바이트 단위) 메모리 용량" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "모든 블록 헤더에 압축 크기와 압축 전 원본 크기 정보가 들어갔는지 여부를 나타내는 B 또는 B 값" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "B I<5.1.2alpha> I<부터:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "파일 압축 해제시 필요한 최소 B 버전" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "B 행 컬럼:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "스트림 갯수" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "블록 갯수" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "압축 크기" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "평균 압축율" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "파일에 들어 있어 쉼표로 구분한 무결성 검사 이름 목록" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "스트림 패딩 길이" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "파일 갯수. B 행의 컬럼 순서를 따라갑니다." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "B<--verbose> 옵션을 두 번 지정하면, B 행에 추가 컬럼이 들어갑니다:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "이 B 버전에서 파일 압축을 해제할 떄 필요한 (바이트 단위) 최대 메모리 사용량" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "차후 버전에서는 새 행 형식을 추가하고 기존 행 형식에 추가할 수 있는 새 컬럼을 넣기 까지는 알 수 있겠지만, 기존 컬럼은 바꾸지 않을 예정입니다." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "필터 도움말" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "B 는 다음 형식의 지원 필터 목록을 출력합니다:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP (الاسم) +هذا دائماً هو السطر الأول عند البدء في سرد ملف. العمود الثاني في السطر هو +اسم الملف. +.TP +\fBfile\fP (الملف) +يحتوي هذا السطر على معلومات عامة حول ملف \fB.xz\fP. يُطبع هذا السطر دائماً بعد +سطر \fBname\fP. +.TP +\fBstream\fP (التدفق) +يُستخدم نوع السطر هذا فقط عند تحديد \fB\-\-verbose\fP. يوجد من أسطر \fBstream\fP +بعدد التدفقات الموجودة في ملف \fB.xz\fP. +.TP +\fBblock\fP (الكتلة) +يُستخدم نوع السطر هذا فقط عند تحديد \fB\-\-verbose\fP. يوجد من أسطر \fBblock\fP بعدد +الكتل الموجودة في ملف \fB.xz\fP. تظهر أسطر \fBblock\fP بعد كل أسطر \fBstream\fP؛ ولا +تتداخل أنواع الأسطر المختلفة. +.TP +\fBsummary\fP (الملخص) +يُستخدم نوع السطر هذا فقط عند تحديد \fB\-\-verbose\fP مرتين. يُطبع هذا السطر بعد +كل أسطر \fBblock\fP. مثل سطر \fBfile\fP، يحتوي سطر \fBsummary\fP على معلومات عامة حول +ملف \fB.xz\fP. +.TP +\fBtotals\fP (الإجماليات) +هذا السطر هو دائماً السطر الأخير تماماً في مخرجات القائمة. يعرض الأعداد +والأحجام الإجمالية. +.PP +أعمدة أسطر \fBfile\fP: +.PD 0 +.RS +.IP 2. 4 +عدد التدفقات في الملف +.IP 3. 4 +إجمالي عدد الكتل في التدفق (التدفقات) +.IP 4. 4 +الحجم المضغوط للملف +.IP 5. 4 +الحجم غير المضغوط للملف +.IP 6. 4 +نسبة الضغط، مثلاً \fB0.123\fP. إذا كانت النسبة فوق 9.999، تُعرض ثلاث شرطات +(\fB\-\-\-\fP) بدلاً من النسبة. +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +قائمة مفصولة بفواصل لأسماء فحوصات السلامة. تُستخدم السلاسل التالية لأنواع +الفحص المعروفة: \fBNone\fP، \fBCRC32\fP، \fBCRC64\fP، و \fBSHA\-256\fP. لأنواع الفحص غير +المعروفة، يُستخدم \fBUnknown\-\fP\fIN\fP، حيث \fIN\fP هو معرّف الفحص كرقم عشري (رقم +واحد أو رقمان). +.IP 8. 4 +إجمالي حجم حشو التدفق في الملف +.RE +.PD +.PP +أعمدة أسطر \fBstream\fP: +.PD 0 +.RS +.IP 2. 4 +رقم التدفق (التدفق الأول هو 1) +.IP 3. 4 +عدد الكتل في التدفق +.IP 4. 4 +إزاحة البداية المضغوطة +.IP 5. 4 +إزاحة البداية غير المضغوطة +.IP 6. 4 +الحجم المضغوط (لا يشمل حشو التدفق) +.IP 7. 4 +الحجم غير المضغوط +.IP 8. 4 +نسبة الضغط +.IP 9. 4 +اسم فحص السلامة +.IP 10. 4 +حجم حشو التدفق +.RE +.PD +.PP +أعمدة أسطر \fBblock\fP: +.PD 0 +.RS +.IP 2. 4 +رقم التدفق الذي يحتوي على هذه الكتلة +.IP 3. 4 +رقم الكتلة بالنسبة لبداية التدفق (الكتلة الأولى هي 1) +.IP 4. 4 +رقم الكتلة بالنسبة لبداية الملف +.IP 5. 4 +إزاحة البداية المضغوطة بالنسبة لبداية الملف +.IP 6. 4 +إزاحة البداية غير المضغوطة بالنسبة لبداية الملف +.IP 7. 4 +إجمالي الحجم المضغوط للكتلة (يشمل الترويسات) +.IP 8. 4 +الحجم غير المضغوط +.IP 9. 4 +نسبة الضغط +.IP 10. 4 +اسم فحص السلامة +.RE +.PD +.PP +إذا حُدد \fB\-\-verbose\fP مرتين، تضاف أعمدة إضافية في أسطر \fBblock\fP. لا تُعرض +هذه الأعمدة مع \fB\-\-verbose\fP واحدة، لأن الحصول عليها يتطلب عمليات بحث (seeks) +كثيرة وبالتالي قد يكون بطيئاً: +.PD 0 +.RS +.IP 11. 4 +قيمة فحص السلامة بالتمثيل الست عشري +.IP 12. 4 +حجم ترويسة الكتلة +.IP 13. 4 +أعلام الكتلة: يشير \fBc\fP إلى وجود الحجم المضغوط، ويشير \fBu\fP إلى وجود الحجم +غير المضغوط. إذا لم يُضبط العلم، تظهر شرطة (\fB\-\fP) بدلاً منه للحفاظ على طول +السلسلة ثابتاً. قد تضاف أعلام جديدة في نهاية السلسلة مستقبلاً. +.IP 14. 4 +حجم البيانات المضغوطة الفعلية في الكتلة (هذا يستثني ترويسة الكتلة، وحشو +الكتلة، وحقول الفحص) +.IP 15. 4 +مقدار الذاكرة (بالبايت) المطلوبة لفك ضغط هذه الكتلة باستخدام إصدار \fBxz\fP هذا +.IP 16. 4 +تسلسل المرشحات. لاحظ أن معظم الخيارات المستخدمة وقت الضغط لا يمكن معرفتها، +لأن الخيارات اللازمة لفك الضغط فقط هي التي تخزن في ترويسات \fB.xz\fP. +.RE +.PD +.PP +أعمدة أسطر \fBsummary\fP: +.PD 0 +.RS +.IP 2. 4 +مقدار الذاكرة (بالبايت) المطلوبة لفك ضغط هذا الملف باستخدام إصدار \fBxz\fP هذا +.IP 3. 4 +\fByes\fP أو \fBno\fP للإشارة إلى ما إذا كانت كل ترويسات الكتل تحتوي على الحجم +المضغوط وغير المضغوط مخزنين فيها +.PP +\fIمنذ\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +أقل إصدار \fBxz\fP مطلوب لفك ضغط الملف +.RE +.PD +.PP +أعمدة سطر \fBtotals\fP: +.PD 0 +.RS +.IP 2. 4 +عدد التدفقات +.IP 3. 4 +عدد الكتل +.IP 4. 4 +الحجم المضغوط +.IP 5. 4 +الحجم غير المضغوط +.IP 6. 4 +متوسط نسبة الضغط +.IP 7. 4 +قائمة مفصولة بفواصل لأسماء فحوصات السلامة التي كانت موجودة في الملفات +.IP 8. 4 +حجم حشو التدفق +.IP 9. 4 +عدد الملفات. هذا موجود للحفاظ على ترتيب الأعمدة السابقة بنفس ترتيبها في أسطر +\fBfile\fP. +.PD +.RE +.PP +إذا حُدد \fB\-\-verbose\fP مرتين، تضاف أعمدة إضافية في سطر \fBtotals\fP: +.PD 0 +.RS +.IP 10. 4 +أقصى مقدار للذاكرة (بالبايت) المطلوبة لفك ضغط الملفات باستخدام إصدار \fBxz\fP +هذا +.IP 11. 4 +\fByes\fP أو \fBno\fP للإشارة إلى ما إذا كانت كل ترويسات الكتل تحتوي على الحجم +المضغوط وغير المضغوط مخزنين فيها +.PP +\fIمنذ\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +أقل إصدار \fBxz\fP مطلوب لفك ضغط الملف +.RE +.PD +.PP +قد تضيف الإصدارات المستقبلية أنواع أسطر جديدة وأعمدة جديدة للأنواع الحالية، +لكن الأعمدة الحالية لن تتغير. +. +.SS "مساعدة المرشحات" +تطبع \fBxz \-\-robot \-\-filters\-help\fP المرشحات المدعومة بالتنسيق التالي: +.PP +\fIالمرشح\fP\fB:\fP\fIالخيار\fP\fB=<\fP\fIالقيمة\fP\fB>,\fP\fIالخيار\fP\fB=<\fP\fIالقيمة\fP\fB>\fP... +.TP +\fIfilter\fP (المرشح) +اسم المرشح +.TP +\fIoption\fP (الخيار) +اسم خيار خاص بالمرشح +.TP +\fIvalue\fP (القيمة) +تظهر نطاقات الـ \fIالقيمة\fP الرقمية كـ +\fB<\fP\fImin\fP\fB\-\fP\fImax\fP\fB>\fP. خيارات الـ \fIالقيمة\fP النصية تظهر داخل +\fB< >\fP ومفصولة بمحرف \fB|\fP. +.PP +يُطبع كل مرشح في سطر خاص به. +. +.SS "معلومات حد الذاكرة" +تطبع \fBxz \-\-robot \-\-info\-memory\fP سطراً واحداً بعدة أعمدة مفصولة بعلامات +جدولة: +.IP 1. 4 +إجمالي مقدار الذاكرة الفعلية (RAM) بالبايت. +.IP 2. 4 +حد استهلاك الذاكرة للضغط بالبايت (\fB\-\-memlimit\-compress\fP). القيمة الخاصة +\fB0\fP تشير إلى الإعداد المبدئي الذي يكون في نمط الخيط الواحد بلا حد. +.IP 3. 4 +حد استهلاك الذاكرة لفك الضغط بالبايت (\fB\-\-memlimit\-decompress\fP). القيمة +الخاصة \fB0\fP تشير إلى الإعداد المبدئي الذي يكون في نمط الخيط الواحد بلا حد. +.IP 4. 4 +منذ \fBxz\fP 5.3.4alpha: استهلاك الذاكرة لفك الضغط متعدد الخيوط بالبايت +(\fB\-\-memlimit\-mt\-decompress\fP). هذه القيمة ليست صفراً أبداً لأن قيمة مبدئية +خاصة بالنظام تظهر في العمود 5 تُستخدم إذا لم يُحدد حد صراحةً. كما أنها ليست +أكبر من القيمة في العمود 3 أبداً حتى لو حُددت قيمة أكبر باستخدام +\fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +منذ \fBxz\fP 5.3.4alpha: حد استهلاك ذاكرة مبدئي خاص بالنظام يُستخدم للحد من عدد +الخيوط عند الضغط بعدد خيوط آلي (\fB\-\-threads=0\fP) ولم يُحدد حد لاستهلاك +الذاكرة (\fB\-\-memlimit\-compress\fP). يُستخدم هذا أيضاً كقيمة مبدئية لـ +\fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +منذ \fBxz\fP 5.3.4alpha: عدد خيوط المعالج المتاحة. +.PP +في المستقبل، قد تحتوي مخرجات \fBxz \-\-robot \-\-info\-memory\fP على أعمدة أكثر، +لكنها لن تتجاوز سطراً واحداً أبداً. +. +.SS الإصدار +تطبع \fBxz \-\-robot \-\-version\fP رقم إصدار \fBxz\fP و liblzma بالتنسيق التالي: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +الإصدار الرئيسي. +.TP +\fIYYY\fP +الإصدار الفرعي. الأرقام الزوجية مستقرة. الأرقام الفردية هي إصدارات ألفا أو +بيتا. +.TP +\fIZZZ\fP +مستوى التصحيح للإصدارات المستقرة أو مجرد عداد لإصدارات التطوير. +.TP +\fIS\fP +الاستقرار. 0 لألفا، 1 لبيتا، و 2 للمستقر. يجب أن يكون \fIS\fP دائماً 2 عندما +يكون \fIYYY\fP زوجياً. +.PP +\fIXYYYZZZS\fP متطابقان في السطرين إذا كان \fBxz\fP و liblzma من نفس إصدار XZ +Utils. +.PP +أمثلة: 4.999.9beta هو \fB49990091\fP و 5.0.0 هو \fB50000002\fP. +. +.SH "حالة الخروج" +.TP +\fB0\fP +كل شيء على ما يرام. +.TP +\fB1\fP +حدث خطأ. +.TP +\fB2\fP +حدث شيء يستحق التحذير، ولكن لم تحدث أخطاء فعلية. +.PP +الملاحظات (ليست تحذيرات أو أخطاء) المطبوعة على الخطأ القياسي لا تؤثر على +حالة الخروج. +. +.SH البيئة +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +يحلل \fBxz\fP قوائم الخيارات المفصولة بمسافات من متغيرات البيئة \fBXZ_DEFAULTS\fP +و \fBXZ_OPT\fP بهذا الترتيب، قبل تحليل الخيارات من سطر الأوامر. لاحظ أن +الخيارات فقط هي التي تُحلل من متغيرات البيئة؛ وتُتجاهل جميع غير الخيارات +بصمت. يتم التحليل باستخدام \fBgetopt_long\fP(3) المستخدم أيضاً لوسائط سطر +الأوامر. +.PP +\fBتحذير:\fP بضبط متغيرات البيئة هذه، فإنك تقوم فعلياً بتعديل البرامج +والسكربتات التي تشغل \fBxz\fP. في معظم الأوقات يكون من الآمن ضبط حدود استهلاك +الذاكرة، وعدد الخيوط، وخيارات الضغط عبر متغيرات البيئة. ومع ذلك، يمكن لبعض +الخيارات أن تعطل السكربتات. مثال واضح هو \fB\-\-help\fP الذي يجعل \fBxz\fP يعرض نص +المساعدة بدلاً من ضغط أو فك ضغط الملف. أمثلة أكثر دقة هي \fB\-\-quiet\fP و +\fB\-\-verbose\fP. في كثير من الحالات يعمل تمكين مؤشر التقدم باستخدام +\fB\-\-verbose\fP بشكل جيد، ولكن في بعض المواقف تسبب الرسائل الإضافية مشاكل. كما +يؤثر مستوى الإسهاب على سلوك \fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +خيارات مبدئية خاصة بالمستخدم أو شاملة للنظام. عادةً ما تُضبط في سكربت تهيئة +الصدفة لتمكين محدد استهلاك ذاكرة \fBxz\fP بشكل مبدئي أو ضبط عدد الخيوط +المبدئي. باستثناء سكربتات تهيئة الصدفة والحالات الخاصة المماثلة، يجب ألا +تقوم السكربتات أبداً بضبط أو إلغاء ضبط \fBXZ_DEFAULTS\fP. +.TP +\fBXZ_OPT\fP +هذا لتمرير الخيارات إلى \fBxz\fP عندما لا يكون من الممكن ضبط الخيارات مباشرة +على سطر أوامر \fBxz\fP. هذا هو الحال عندما يتم تشغيل \fBxz\fP بواسطة سكربت أو +أداة، على سبيل المثال GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +قد تستخدم البرامج النصية \fBXZ_OPT\fP، مثلاً، لضبط خيارات ضغط مبدئية خاصة +بالبرنامج النصي. لا يزال يُنصح بالسماح للمستخدمين بتجاوز \fBXZ_OPT\fP إذا كان +ذلك معقولاً. مثلاً، في برامج \fBsh\fP(1) النصية يمكن للمرء استخدام شيء كهذا: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "التوافق مع أدوات LZMA" +تُعد صيغة سطر أوامر \fBxz\fP عملياً مجموعة فوقية لكل من \fBlzma\fP، و\fBunlzma\fP، +و\fBlzcat\fP كما هي موجودة في أدوات LZMA إصدار 4.32.x. في معظم الحالات، يمكن +استبدال أدوات LZMA بأدوات XZ دون كسر البرامج النصية الموجودة. ومع ذلك، توجد +بعض أوجه عدم التوافق التي قد تسبب مشاكل أحياناً. +. +.SS "مستويات الضبط المسبق للضغط" +ترقيم مستويات الضبط المسبق للضغط ليس متطابقاً في \fBxz\fP وأدوات LZMA. الاختلاف +الأهم هو كيفية تعيين أحجام القواميس لمختلف مستويات الضبط. حجم القاموس يساوي +تقريباً استهلاك الذاكرة عند فك الضغط. +.RS +.PP +.TS +tab(;); +c c c +c n n. +المستوى;xz;أدوات LZMA +\-0;256 كيلوبايت;غير متاح +\-1;1 ميجابايت;64 ك.بايت +\-2;2 ميجابايت;1 ميجابايت +\-3;4 ميجابايت;512 ك.بايت +\-4;4 ميجابايت;1 ميجابايت +\-5;8 ميجابايت;2 ميجابايت +\-6;8 ميجابايت;4 ميجابايت +\-7;16 ميجابايت;8 ميجابايت +\-8;32 ميجابايت;16 ميجابايت +\-9;64 ميجابايت;32 ميجابايت +.TE +.RE +.PP +تؤثر اختلافات حجم القاموس على استهلاك ذاكرة الضاغط أيضاً، ولكن توجد اختلافات +أخرى بين أدوات LZMA وأدوات XZ تجعل الفارق أكبر: +.RS +.PP +.TS +tab(;); +c c c +c n n. +المستوى;xz;أدوات LZMA إصدار 4.32.x +\-0;3 ميجابايت;غير متاح +\-1;9 ميجابايت;2 ميجابايت +\-2;17 ميجابايت;12 م.بايت +\-3;32 ميجابايت;12 م.بايت +\-4;48 ميجابايت;16 ميجابايت +\-5;94 ميجابايت;26 م.بايت +\-6;94 ميجابايت;45 م.بايت +\-7;186 ميجابايت;83 م.بايت +\-8;370 ميجابايت;159 م.بايت +\-9;674 ميجابايت;311 م.بايت +.TE +.RE +.PP +مستوى الضبط المبدئي في أدوات LZMA هو \fB\-7\fP بينما في أدوات XZ هو \fB\-6\fP، لذا +كلاهما يستخدم قاموساً بحجم 8 م.بايت بشكل مبدئي. +. +.SS "ملفات lzma. المتدفقة مقابل غير المتدفقة" +يمكن تخزين الحجم غير المضغوط للملف في ترويسة \fB.lzma\fP. تقوم أدوات LZMA بذلك +عند ضغط الملفات العادية. البديل هو وسم الحجم غير المضغوط بأنه غير معروف +واستخدام علامة نهاية الحمولة للإشارة إلى المكان الذي يجب أن يتوقف عنده فك +الضغط. تستخدم أدوات LZMA هذه الطريقة عندما يكون الحجم غير المضغوط غير معروف، +كما هو الحال مثلاً في الأنابيب. +.PP +يدعم \fBxz\fP فك ضغط ملفات \fB.lzma\fP بوجود علامة نهاية الحمولة أو بدونها، لكن +جميع ملفات \fB.lzma\fP التي ينشئها \fBxz\fP تستخدم علامة نهاية الحمولة ويكون الحجم +غير المضغوط فيها موسوماً بأنه غير معروف في الترويسة. قد يسبب هذا مشكلة في +بعض الحالات غير الشائعة. مثلاً، قد يعمل مفكك ضغط \fB.lzma\fP في جهاز مدمج فقط +مع الملفات ذات الحجم غير المضغوط المعروف. إذا واجهت هذه المشكلة، تحتاج +لاستخدام أدوات LZMA أو LZMA SDK لإنشاء ملفات \fB.lzma\fP بحجم غير مضغوط معروف. +. +.SS "ملفات lzma. غير المدعومة" +تسمح صيغة \fB.lzma\fP بقيم \fIlc\fP تصل إلى 8، وقيم \fIlp\fP تصل إلى 4. يمكن لأدوات +LZMA فك ضغط الملفات بأي قيم \fIlc\fP و\fIlp\fP، لكنها تنشئ دائماً ملفات بـ \fBlc=3\fP +و\fBlp=0\fP. إنشاء ملفات بقيم \fIlc\fP و\fIlp\fP أخرى متاح عبر \fBxz\fP وعبر LZMA SDK. +.PP +يتطلب تنفيذ مرشح LZMA1 في liblzma ألا يتجاوز مجموع \fIlc\fP و\fIlp\fP القيمة +4. لذا، لا يمكن فك ضغط ملفات \fB.lzma\fP التي تتجاوز هذا القيد باستخدام \fBxz\fP. +.PP +تنشئ أدوات LZMA ملفات \fB.lzma\fP فقط بأحجام قواميس هي 2^\fIn\fP (قوة للعدد 2) +لكنها تقبل الملفات بأي حجم قاموس. تقبل liblzma فقط ملفات \fB.lzma\fP التي يكون +حجم قاموسها 2^\fIn\fP أو 2^\fIn\fP + 2^(\fIn\fP\-1). الهدف من ذلك هو تقليل الإيجابيات +الخاطئة عند الكشف عن ملفات \fB.lzma\fP. +.PP +يُفترض ألا تمثل هذه القيود مشكلة من الناحية العملية، حيث أن جميع ملفات +\&\fB.lzma\fP تقريباً ضُغطت بإعدادات تقبلها liblzma. +. +.SS "مخلفات لاحقة" +عند فك الضغط، تتجاهل أدوات LZMA بصمت كل شيء بعد تدفق \fB.lzma\fP الأول. في معظم +الحالات، يُعد هذا خطأ برمجياً. يعني هذا أيضاً أن أدوات LZMA لا تدعم فك ضغط +ملفات \fB.lzma\fP المتسلسلة. +.PP +إذا تبقى بيانات بعد تدفق \fB.lzma\fP الأول، يعتبر \fBxz\fP الملف تالفاً إلا إذا +استخدم خيار \fB\-\-single\-stream\fP. قد يؤدي هذا لكسر البرامج النصية الغامضة التي +افترضت تجاهل المخلفات اللاحقة. +. +.SH ملاحظات +. +.SS "قد يختلف المخرج المضغوط" +قد يختلف المخرج المضغوط بدقة والناتج عن نفس ملف المدخلات غير المضغوط بين +إصدارات أدوات XZ حتى لو كانت خيارات الضغط متطابقة. يرجع ذلك إلى إمكانية +تحسين المرمز (ضغط أسرع أو أفضل) دون التأثير على صيغة الملف. يمكن أن يختلف +المخرج حتى بين البناءات المختلفة لنفس إصدار أدوات XZ، في حال استخدام خيارات +بناء مختلفة. +.PP +ما سبق يعني أنه بمجرد تنفيذ \fB\-\-rsyncable\fP، لن تكون الملفات الناتجة بالضرورة +قابلة لـ rsync ما لم تُضغط الملفات القديمة والجديدة بنفس إصدار xz. يمكن حل +هذه المشكلة إذا جُمد جزء من تنفيذ المرمز للحفاظ على استقرار مخرج rsync عبر +إصدارات xz. +. +.SS "مفكات ضغط xz. المدمجة" +تنفيذات مفكك ضغط \fB.xz\fP المدمجة مثل XZ Embedded لا تدعم بالضرورة الملفات +المنشأة بأنواع فحص سلامة (\fIcheck\fP) غير \fBnone\fP و\fBcrc32\fP. بما أن الخيار +المبدئي هو \fB\-\-check=crc64\fP، يجب عليك استخدام \fB\-\-check=none\fP أو +\fB\-\-check=crc32\fP عند إنشاء ملفات للأنظمة المدمجة. +.PP +خارج الأنظمة المدمجة، تدعم جميع مفكات ضغط صيغة \fB.xz\fP كافة أنواع الفحص، أو +على الأقل تكون قادرة على فك ضغط الملف دون التحقق من فحص السلامة إذا كان ذلك +الفحص المحدد غير مدعوم. +.PP +يدعم XZ Embedded مرشحات BCJ، ولكن فقط مع إزاحة البدء المبدئية. +. +.SH أمثلة +. +.SS أساسيات +ضغط الملف \fIfoo\fP إلى \fIfoo.xz\fP باستخدام مستوى الضغط المبدئي (\fB\-6\fP)، وإزالة +\fIfoo\fP إذا نجح الضغط: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +فك ضغط \fIbar.xz\fP إلى \fIbar\fP وعدم إزالة \fIbar.xz\fP حتى لو نجح فك الضغط: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +إنشاء \fIbaz.tar.xz\fP بضبط مسبق \fB\-4e\fP (أي \fB\-4 \-\-extreme\fP)، وهو أبطأ من +الخيار المبدئي \fB\-6\fP، ولكنه يحتاج ذاكرة أقل للضغط وفك الضغط (48 م.بايت و5 +م.بايت على التوالي): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +يمكن فك ضغط مزيج من الملفات المضغوطة وغير المضغوطة إلى المخرج القياسي بأمر +واحد: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "الضغط المتوازي لملفات عديدة" +في GNU وBSD*، يمكن استخدام \fBfind\fP(1) و\fBxargs\fP(1) لموازاة ضغط العديد من +الملفات: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +يحدد الخيار \fB\-P\fP في \fBxargs\fP(1) عدد عمليات \fBxz\fP المتوازية. تعتمد أفضل قيمة +للخيار \fB\-n\fP على عدد الملفات المراد ضغطها. إذا كان هناك ملفان فقط، يُفضل أن +تكون القيمة 1؛ ومع وجود عشرات آلاف الملفات، قد تكون القيمة 100 أو أكثر +مناسبة لتقليل عدد عمليات \fBxz\fP التي سينشئها \fBxargs\fP(1) في النهاية. +.PP +الخيار \fB\-T1\fP لـ \fBxz\fP موجود لإجباره على وضع الخيط الواحد، لأن \fBxargs\fP(1) +يُستخدم للتحكم في كمية الموازاة. +. +.SS "وضع الروبوت" +حساب إجمالي عدد البايتات التي حُفظت بعد ضغط ملفات متعددة: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +قد يرغب برنامج نصي في معرفة أنه يستخدم نسخة \fBxz\fP حديثة كفاية. يتحقق برنامج +\fBsh\fP(1) التالي من أن رقم إصدار أداة \fBxz\fP لا يقل عن 5.0.0. هذه الطريقة +متوافقة مع النسخ التجريبية القديمة التي لم تكن تدعم خيار \fB\-\-robot\fP: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Your xz is too old." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +ضبط حد استهلاك الذاكرة لفك الضغط باستخدام \fBXZ_OPT\fP، ولكن إذا وُضع حد +مسبقاً، فلا تزده: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "سلاسل مرشحات ضاغط مخصصة" +أبسط استخدام لسلاسل المرشحات المخصصة هو تخصيص ضبط LZMA2 مسبق. يمكن أن يكون +هذا مفيداً لأن عمليات الضبط المسبق تغطي فقط مجموعة فرعية من مجموعات إعدادات +الضغط المفيدة المحتملة. +.PP +تُعد أعمدة CompCPU في الجداول الموجودة في أوصاف الخيارات \fB\-0\fP ... \fB\-9\fP +و\fB\-\-extreme\fP مفيدة عند تخصيص إعدادات LZMA2 المسبقة. إليك الأجزاء ذات الصلة +المجموعة من هذين الجدولين: +.RS +.PP +.TS +tab(;); +c c +n n. +المستوى;معالج الضغط +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +إذا كنت تعرف أن ملفاً يتطلب قاموساً كبيراً نوعاً ما (مثلاً 32 م.بايت) ليُضغط +جيداً، ولكنك تريد ضغطه بشكل أسرع مما يفعله \fBxz \-8\fP، يمكن تعديل ضبط مسبق +بقيمة CompCPU منخفضة (مثلاً 1) لاستخدام قاموس أكبر: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +مع ملفات معينة، قد يكون الأمر أعلاه أسرع من \fBxz \-6\fP مع ضغط أفضل بكثير. ومع +ذلك، يجب التأكيد على أن بعض الملفات فقط تستفيد من قاموس كبير مع إبقاء قيمة +CompCPU منخفضة. الحالة الأكثر وضوحاً التي يمكن أن يساعد فيها قاموس كبير هي +أرشيف يحتوي ملفات متشابهة جداً حجم كل منها بضعة ميجابايتات على الأقل. يجب أن +يكون حجم القاموس أكبر بكثير من أي ملف فردي للسماح لـ LZMA2 بالاستفادة +الكاملة من أوجه التشابه بين الملفات المتتالية. +.PP +إذا كان استهلاك الذاكرة العالي جداً للضاغط ومفكك الضغط مقبولاً، وكان الملف +المضغوط لا يقل عن عدة مئات من الميجابايتات، فقد يكون من المفيد استخدام قاموس +أكبر حتى من 64 م.بايت التي يستخدمها \fBxz \-9\fP: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +يمكن أن يكون استخدام \fB\-vv\fP (أي \fB\-\-verbose \-\-verbose\fP) كما في المثال أعلاه +مفيداً لرؤية متطلبات الذاكرة للضاغط ومفكك الضغط. تذكر أن استخدام قاموس أكبر +من حجم الملف غير المضغوط هو هدر للذاكرة، لذا فإن الأمر أعلاه ليس مفيداً +للملفات الصغيرة. +.PP +أحياناً لا يهم وقت الضغط، ولكن يجب الحفاظ على انخفاض استهلاك ذاكرة مفكك +الضغط، مثلاً لجعل فك ضغط الملف ممكناً على نظام مدمج. يستخدم الأمر التالي +\fB\-6e\fP (أي \fB\-6 \-\-extreme\fP) كقاعدة ويضبط القاموس على 64 ك.بايت فقط. يمكن فك +ضغط الملف الناتج باستخدام XZ Embedded (لهذا السبب يوجد \fB\-\-check=crc32\fP) +باستخدام حوالي 100 ك.بايت من الذاكرة. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +إذا أردت عصر أكبر عدد ممكن من البايتات، فإن تعديل عدد بتات سياق الحروف +(\fIlc\fP) وعدد بتات الموضع (\fIpb\fP) قد يساعد أحياناً. قد يساعد أيضاً تعديل عدد +بتات موضع الحروف (\fIlp\fP)، ولكن عادة ما تكون \fIlc\fP و\fIpb\fP أكثر أهمية. مثلاً، +أرشيف شيفرة مصدرية يحتوي غالباً نص US\-ASCII، لذا قد يعطي شيء مثل التالي +ملفاً أصغر قليلاً (بحوالي 0.1 %) من \fBxz \-6e\fP (جرب أيضاً بدون \fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +استخدام مرشح آخر مع LZMA2 يمكن أن يحسن الضغط مع أنواع ملفات معينة. مثلاً، +لضغط مكتبة مشتركة x86\-32 أو x86\-64 باستخدام مرشح x86 BCJ: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +لاحظ أن ترتيب خيارات المرشحات مهم. إذا حُدد \fB\-\-x86\fP بعد \fB\-\-lzma2\fP، سيُظهر +\fBxz\fP خطأ، لأنه لا يمكن وجود أي مرشح بعد LZMA2، وأيضاً لأن مرشح x86 BCJ لا +يمكن استخدامه كآخر مرشح في السلسلة. +.PP +يمكن لمرشح دلتا مع LZMA2 إعطاء نتائج جيدة مع الصور النقطية. يُفترض أن يتفوق +عادةً على PNG، التي تملك مرشحات أكثر تقدماً من دلتا البسيط ولكنها تستخدم +Deflate للضغط الفعلي. +.PP +يجب حفظ الصورة بصيغة غير مضغوطة، مثلاً كـ TIFF غير مضغوط. تُضبط معلمة +المسافة (distance) لمرشح دلتا لتطابق عدد البايتات لكل بكسل في الصورة. مثلاً، +تحتاج الصورة النقطية RGB بـ 24 بتة إلى \fBdist=3\fP، ومن الجيد أيضاً تمرير +\fBpb=0\fP لـ LZMA2 لمواءمة محاذاة الثلاثة بايتات: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +إذا وضعت صور متعددة في أرشيف واحد (مثلاً tar.)، سيعمل مرشح دلتا على ذلك +أيضاً طالما أن جميع الصور لها نفس عدد البايتات لكل بكسل. +. +.SH "انظر أيضاً" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +أدوات XZ: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ar/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzdec.1 new file mode 100644 index 0000000000..8537753c74 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzdec.1 @@ -0,0 +1,77 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Arabic translation for xz-man. +.\" Zayed Al-Saidi , 2026. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 2024\-04\-08 توكاني "أدوات XZ" +.SH الاسم +xzdec, lzmadec \- مفكات ضغط صغيرة لـ xz. و lzma. +.SH موجز +\fBxzdec\fP [\fIخيار...\fP] [\fIملف...\fP] +.br +\fBlzmadec\fP [\fIخيار...\fP] [\fIملف...\fP] +.SH الوصف +\fBxzdec\fP هي أداة لفك الضغط فقط تعتمد على liblzma لملفات \fB.xz\fP (وفقط +\&\fB.xz\fP). يُقصد من \fBxzdec\fP أن تعمل كبديل جاهز لـ \fBxz\fP(1) في أكثر الحالات +شيوعاً حيث يُكتب البرنامج النصي لاستخدام \fBxz \-\-decompress \-\-stdout\fP (وربما +خيارات شائعة أخرى) لفك ضغط ملفات \fB.xz\fP. أداة \fBlzmadec\fP مطابقة لـ \fBxzdec\fP +باستثناء أنها تدعم ملفات \fB.lzma\fP بدلاً من ملفات \fB.xz\fP. +.PP +لتقليل حجم الملف القابل للتنفيذ، لا تدعم \fBxzdec\fP تعدد الخيوط أو التوطين، +ولا تقرأ الخيارات من متغيرات البيئة \fBXZ_DEFAULTS\fP و\fBXZ_OPT\fP. كما لا تدعم +\fBxzdec\fP عرض معلومات التقدم الوسيطة: إرسال \fBSIGINFO\fP لـ \fBxzdec\fP لا يفعل +شيئاً، وإرسال \fBSIGUSR1\fP ينهي العملية بدلاً من عرض معلومات التقدم. +.SH خيارات +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +يُتجاهل للتوافق مع \fBxz\fP(1). تدعم \fBxzdec\fP فك الضغط فقط. +.TP +\fB\-k\fP, \fB\-\-keep\fP +يُتجاهل للتوافق مع \fBxz\fP(1). لا تنشئ \fBxzdec\fP أو تزيل أي ملفات أبداً. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +يُتجاهل للتوافق مع \fBxz\fP(1). تكتب \fBxzdec\fP دائماً البيانات المفكوكة إلى +المخرج القياسي. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +تحديد هذا مرة واحدة لا يفعل شيئاً لأن \fBxzdec\fP لا تعرض أي تحذيرات أو +إشعارات. حدده مرتين لكتم الأخطاء. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +يُتجاهل للتوافق مع \fBxz\fP(1). لا تستخدم \fBxzdec\fP حالة الخروج 2 أبداً. +.TP +\fB\-h\fP, \fB\-\-help\fP +عرض رسالة مساعدة والخروج بنجاح. +.TP +\fB\-V\fP, \fB\-\-version\fP +عرض رقم إصدار \fBxzdec\fP و liblzma. +.SH "حالة الخروج" +.TP +\fB0\fP +كل شيء كان جيداً. +.TP +\fB1\fP +حدث خطأ. +.PP +لا تملك \fBxzdec\fP أي رسائل تحذير مثل \fBxz\fP(1)، ولذا لا تستخدم \fBxzdec\fP حالة +الخروج 2. +.SH ملاحظات +استخدم \fBxz\fP(1) بدلاً من \fBxzdec\fP أو \fBlzmadec\fP للاستخدام اليومي +العادي. \fBxzdec\fP أو \fBlzmadec\fP مخصصان فقط للحالات التي يكون فيها من المهم +توفير مفكك ضغط أصغر حجماً من \fBxz\fP(1) كامل الميزات. +.PP +\fBxzdec\fP و \fBlzmadec\fP ليسا صغيرين حقاً. يمكن تقليل الحجم أكثر عن طريق إسقاط +ميزات من liblzma وقت التجميع، لكن لا ينبغي فعل ذلك عادةً للملفات التنفيذية +الموزعة في توزيعات أنظمة التشغيل غير المدمجة التقليدية. إذا كنت بحاجة لمفكك +ضغط \fB.xz\fP صغير حقاً، فكر في استخدام XZ Embedded. +.SH "انظر أيضاً" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ar/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzdiff.1 new file mode 100644 index 0000000000..79fdefab64 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzdiff.1 @@ -0,0 +1,52 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Arabic translation for xz-man. +.\" Zayed Al-Saidi , 2026. +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 2025\-03\-06 توكاني "أدوات XZ" +.SH الاسم +xzcmp, xzdiff, lzcmp, lzdiff \- مقارنة الملفات المضغوطة +. +.SH موجز +\fBxzcmp\fP [\fIخيار...\fP] \fIملف1\fP [\fIملف2\fP] +.br +\fBxzdiff\fP \&... +.br +\fBlzcmp\fP \&... (مهجور) +.br +\fBlzdiff\fP \&... (مهجور) +. +.SH الوصف +يقارن \fBxzcmp\fP و \fBxzdiff\fP المحتويات غير المضغوطة لملفين. تُمرر البيانات غير +المضغوطة والخيارات إلى \fBcmp\fP(1) أو \fBdiff\fP(1) ما لم يُحدد \fB\-\-help\fP أو +\fB\-\-version\fP. +.PP +إذا حُدد كل من \fIملف1\fP و \fIملف2\fP، يمكن أن يكونا ملفات غير مضغوطة أو ملفات +بصيغ يمكن لكل من \fBxz\fP(1) أو \fBgzip\fP(1) أو \fBbzip2\fP(1) أو \fBlzop\fP(1) أو +\fBzstd\fP(1) أو \fBlz4\fP(1) فك ضغطها. تُحدد أوامر فك الضغط المطلوبة من لاحقات +أسماء الملفات. يُفترض أن الملف ذو اللاحقة غير المعروفة إما غير مضغوط أو +بصيغة يمكن لـ \fBxz\fP(1) فك ضغطها. +.PP +إذا وُفر اسم ملف واحد فقط، يجب أن يملك \fIملف1\fP لاحقة صيغة ضغط مدعومة، +ويُفترض أن اسم \fIملف2\fP هو \fIملف1\fP مع حذف لاحقة صيغة الضغط. +.PP +تتوفر أوامر \fBlzcmp\fP و \fBlzdiff\fP للتوافق مع أدوات LZMA القديمة. هذه الأوامر +مهجورة وستُحذف في إصدار مستقبلي. +. +.SH "حالة الخروج" +في حال حدوث خطأ في فك الضغط، تكون حالة الخروج \fB2\fP. بخلاف ذلك، تُستخدم حالة +خروج \fBcmp\fP(1) أو \fBdiff\fP(1). +. +.SH "انظر أيضاً" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ar/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzgrep.1 new file mode 100644 index 0000000000..3dbd58c663 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzgrep.1 @@ -0,0 +1,89 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Arabic translation for xz-man. +.\" Zayed Al-Saidi , 2026. +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 2025\-03\-06 توكاني "أدوات XZ" +.SH الاسم +xzgrep \- البحث عن أنماط داخل الملفات التي قد تكون مضغوطة +. +.SH موجز +\fBxzgrep\fP [\fIخيار...\fP] [\fIقائمة_أنماط\fP] [\fIملف...\fP] +.br +\fBxzegrep\fP \&... +.br +\fBxzfgrep\fP \&... +.br +\fBlzgrep\fP \&... (مهجور) +.br +\fBlzegrep\fP \&... (مهجور) +.br +\fBlzfgrep\fP \&... (مهجور) +. +.SH الوصف +يستدعي \fBxzgrep\fP الأداة \fBgrep\fP(1) على المحتويات غير المضغوطة للملفات. تُحدد +صيغ \fIالملفات\fP من لاحقات أسمائها. أي \fIملف\fP بلاحقة يدعمها \fBxz\fP(1) أو +\fBgzip\fP(1) أو \fBbzip2\fP(1) أو \fBlzop\fP(1) أو \fBzstd\fP(1) أو \fBlz4\fP(1) سيجري فك +ضغطه؛ ويُفترض أن جميع الملفات الأخرى غير مضغوطة. +.PP +إذا لم تُحدد \fIملفات\fP أو كان \fIالملف\fP هو \fB\-\fP، تُقرأ المدخلات القياسية. عند +القراءة من المدخلات القياسية، تُفك فقط الملفات التي يدعمها \fBxz\fP(1). يُفترض +أن الملفات الأخرى في صيغتها غير المضغوطة بالفعل. +.PP +معظم \fIخيارات\fP \fBgrep\fP(1) مدعومة. ومع ذلك، الخيارات التالية غير مدعومة: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIإجراء\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIنمط\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIنمط\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIملف\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIنمط\fP +.PP +\fBxzegrep\fP هو اسم مستعار لـ \fBxzgrep \-E\fP. و \fBxzfgrep\fP هو اسم مستعار لـ +\fBxzgrep \-F\fP. +.PP +أوامر \fBlzgrep\fP و \fBlzegrep\fP و \fBlzfgrep\fP متوفرة للتوافق مع أدوات LZMA +القديمة. وهي مهجورة وستُحذف في إصدار مستقبلي. +. +.SH "حالة الخروج" +.TP +0 +وُجدت مطابقة واحدة على الأقل في ملف واحد على الأقل من ملفات المدخلات. ولم +تحدث أخطاء. +.TP +1 +لم توجد أي مطابقات في أي من ملفات المدخلات. ولم تحدث أخطاء. +.TP +>1 +حدث خطأ واحد أو أكثر. من غير المعروف ما إذا عُثر على مطابقات. +. +.SH البيئة +.TP +\fBGREP\fP +إذا ضُبط المتغير \fBGREP\fP على قيمة غير فارغة، فسيُستخدم بدلاً من \fBgrep\fP أو +\fBgrep \-E\fP أو \fBgrep \-F\fP. +. +.SH "انظر أيضاً" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ar/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzless.1 new file mode 100644 index 0000000000..4833c9ae43 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzless.1 @@ -0,0 +1,45 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Arabic translation for xz-man. +.\" Zayed Al-Saidi , 2026. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 2025\-03\-06 توكاني "أدوات XZ" +.SH الاسم +xzless, lzless \- عرض ملفات (نصية) مضغوطة بصيغة xz أو lzma +.SH موجز +\fBxzless\fP [\fIملف\fP...] +.br +\fBlzless\fP [\fIملف\fP...] (مهجور) +.SH الوصف +\fBxzless\fP هو مرشح يعرض النصوص من الملفات المضغوطة على الطرفية. تُفك الملفات +التي يدعمها \fBxz\fP(1)؛ ويُفترض أن الملفات الأخرى في صيغتها غير المضغوطة +بالفعل. إذا لم تُعطَ \fIملفات\fP، تقرأ \fBxzless\fP من المدخلات القياسية. +.PP +تستخدم \fBxzless\fP الأداة \fBless\fP(1) لعرض مخرجها. وبخلاف \fBxzmore\fP، لا يمكن +تغيير خيار المستعرض (pager) الخاص بها عن طريق ضبط متغير بيئة. تعتمد الأوامر +على كل من \fBmore\fP(1) و \fBvi\fP(1) وتسمح بالتحرك للأمام والخلف والبحث. انظر +دليل \fBless\fP(1) لمزيد من المعلومات. +.PP +يتوفر الأمر \fBlzless\fP للتوافق مع أدوات LZMA القديمة. وهو مهجور وسيُحذف في +إصدار مستقبلي. +.SH البيئة +.TP +\fBLESSMETACHARS\fP +قائمة من الحروف الخاصة بالصدفة (shell). تضبطها \fBxzless\fP ما لم تكن مضبوطة +بالفعل في البيئة. +.TP +\fBLESSOPEN\fP +يُضبط على سطر أوامر لاستدعاء مفكك ضغط \fBxz\fP(1) للمعالجة المسبقة لملفات +المدخلات قبل تمريرها لـ \fBless\fP(1). +.SH "انظر أيضاً" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ar/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzmore.1 new file mode 100644 index 0000000000..19a989b6aa --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ar/xzmore.1 @@ -0,0 +1,47 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Arabic translation for xz-man. +.\" Zayed Al-Saidi , 2026. +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 2025\-03\-06 توكاني "أدوات XZ" +.SH الاسم +xzmore, lzmore \- عرض ملفات (نصية) مضغوطة بصيغة xz أو lzma +. +.SH موجز +\fBxzmore\fP [\fIملف\fP...] +.br +\fBlzmore\fP [\fIملف\fP...] (مهجور) +. +.SH الوصف +تعرض \fBxzmore\fP النصوص من الملفات المضغوطة على الطرفية باستخدام +\fBmore\fP(1). تُفك الملفات التي يدعمها \fBxz\fP(1)؛ ويُفترض أن الملفات الأخرى في +صيغتها غير المضغوطة بالفعل. إذا لم تُعطَ \fIملفات\fP، تقرأ \fBxzmore\fP من +المدخلات القياسية. انظر دليل \fBmore\fP(1) لمعرفة أوامر لوحة المفاتيح. +.PP +لاحظ أن التمرير للخلف قد لا يكون ممكناً اعتماداً على تنفيذ \fBmore\fP(1). وذلك +لأن \fBxzmore\fP تستخدم أنبوباً لتمرير البيانات المفكوكة إلى \fBmore\fP(1). بينما +تستخدم \fBxzless\fP(1) الأداة \fBless\fP(1) التي توفر ميزات أكثر تقدماً. +.PP +يتوفر الأمر \fBlzmore\fP للتوافق مع أدوات LZMA القديمة. وهو مهجور وسيُحذف في +إصدار مستقبلي. +. +.SH البيئة +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +إذا ضُبط المتغير \fBPAGER\fP، فستُستخدم قيمته كمستعرض (pager) بدلاً من +\fBmore\fP(1). +. +.SH "انظر أيضاً" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/de/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/de/lzmainfo.1 new file mode 100644 index 0000000000..10eba6fb5d --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/de/lzmainfo.1 @@ -0,0 +1,46 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" German translation for xz-man. +.\" Mario Blättermann , 2015, 2019-2020, 2022-2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 "30. Juni 2013" Tukaani XZ\-Dienstprogramme +.SH BEZEICHNUNG +lzmainfo \- im .lzma\-Dateikopf enthaltene Informationen anzeigen +.SH ÜBERSICHT +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIDatei …\fP] +.SH BESCHREIBUNG +\fBlzmainfo\fP zeigt die im \fB.lzma\fP\-Dateikopf enthaltenen Informationen an. Es +liest die ersten 13 Bytes aus der angegebenen \fIDatei\fP, dekodiert den +Dateikopf und gibt das Ergebnis in die Standardausgabe in einem +menschenlesbaren Format aus. Falls keine \fIDatei\fPen angegeben werden oder +die \fIDatei\fP als \fB\-\fP übergeben wird, dann wird aus der Standardeingabe +gelesen. +.PP +In der Regel sind die unkomprimierte Größe der Daten und die Größe des +Wörterbuchs am bedeutsamsten. Die unkomprimierte Größe kann nur dann +angezeigt werden, wenn die Datei im \fB.lzma\fP\-Format kein Datenstrom ist. Die +Größe des für die Dekompression nötigen Speichers beträgt einige Dutzend +Kilobyte zuzüglich der Größe des Inhaltsverzeichnisses. +.PP +\fBlzmainfo\fP ist in den XZ\-Dienstprogrammen hauptsächlich zur Kompatibilität +zu den LZMA\-Dienstprogrammen enthalten. +.SH EXIT\-STATUS +.TP +\fB0\fP +Alles ist in Ordnung. +.TP +\fB1\fP +Ein Fehler ist aufgetreten. +.SH FEHLER +\fBlzmainfo\fP verwendet \fBMB\fP, während das korrekte Suffix \fBMiB\fP (2^20 Bytes) +wäre. Damit wird die Kompatibilität zu den LZMA\-Dienstprogrammen +gewährleistet. +.SH "SIEHE AUCH" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/de/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/de/xz.1 new file mode 100644 index 0000000000..39e92ce91c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/de/xz.1 @@ -0,0 +1,2117 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" German translation for xz-man. +.\" Mario Blättermann , 2015, 2019-2020, 2022-2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 "8. März 2025" Tukaani XZ\-Dienstprogramme +. +.SH BEZEICHNUNG +xz, unxz, xzcat, lzma, unlzma, lzcat \- .xz\- und .lzma\-Dateien komprimieren +oder dekomprimieren +. +.SH ÜBERSICHT +\fBxz\fP [\fIOption…\fP] [\fIDatei…\fP] +. +.SH BEFEHLSALIASE +\fBunxz\fP ist gleichbedeutend mit \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP ist gleichbedeutend mit \fBxz \-\-decompress \-\-stdout\fP. +.br +\fBlzma\fP ist gleichbedeutend mit \fBxz \-\-format=lzma\fP. +.br +\fBunlzma\fP ist gleichbedeutend mit \fBxz \-\-format=lzma \-\-decompress\fP. +.br +\fBlzcat\fP ist gleichbedeutend mit \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP. +.PP +Wenn Sie Skripte schreiben, die Dateien dekomprimieren, sollten Sie stets +den Namen \fBxz\fP mit den entsprechenden Argumenten (\fBxz \-d\fP oder \fBxz \-dc\fP) +anstelle der Namen \fBunxz\fP und \fBxzcat\fP verwenden. +. +.SH BESCHREIBUNG +\fBxz\fP ist ein Allzweckwerkzeug zur Datenkompression, dessen +Befehlszeilensyntax denen von \fBgzip\fP(1) und \fBbzip2\fP(1) ähnelt. Das native +Dateiformat ist das \fB.xz\fP\-Format, aber das veraltete, von den +LZMA\-Dienstprogrammen verwendete Format sowie komprimierte Rohdatenströme +ohne Containerformat\-Header werden ebenfalls unterstützt. Außerdem wird die +Dekompression des von \fBlzip\fP verwendeten \fB.lz\fP\-Formats unterstützt. +.PP +\fBxz\fP komprimiert oder dekomprimiert jede \fIDatei\fP entsprechend des +gewählten Vorgangsmodus. Falls entweder \fB\-\fP oder keine Datei angegeben ist, +liest \fBxz\fP aus der Standardeingabe und leitet die verarbeiteten Dateien in +die Standardausgabe. Wenn die Standardausgabe kein Terminal ist, verweigert +\fBxz\fP das Schreiben komprimierter Daten in die Standardausgabe. Dabei wird +eine Fehlermeldung angezeigt und die \fIDatei\fP übersprungen. Ebenso +verweigert \fBxz\fP das Lesen komprimierter Daten aus der Standardeingabe, wenn +diese ein Terminal ist. +.PP +\fIDateien\fP, die nicht als \fB\-\fP angegeben sind, werden in eine neue Datei +geschrieben, deren Name aus dem Namen der Quell\-\fIDatei\fP abgeleitet wird +(außer wenn \fB\-\-stdout\fP angegeben ist): +.IP \(bu 3 +Bei der Kompression wird das Suffix des Formats der Zieldatei (\fB.xz\fP oder +\&\fB.lzma\fP) an den Namen der Quelldatei angehängt und so der Name der +Zieldatei gebildet. +.IP \(bu 3 +Bei der Dekompression wird das Suffix \fB.xz\fP, \fB.lzma\fP oder \fB.lz\fP vom +Dateinamen entfernt und so der Name der Zieldatei gebildet. Außerdem erkennt +\fBxz\fP die Suffixe \fB.txz\fP und \fB.tlz\fP und ersetzt diese durch \fB.tar\fP. +.PP +Wenn die Zieldatei bereits existiert, wird eine Fehlermeldung angezeigt und +die \fIDatei\fP übersprungen. +.PP +Außer beim Schreiben in die Standardausgabe zeigt \fBxz\fP eine Warnung an und +überspringt die \fIDatei\fP, wenn eine der folgenden Bedingungen zutreffend +ist: +.IP \(bu 3 +Die \fIDatei\fP ist keine reguläre Datei. Symbolischen Verknüpfungen wird nicht +gefolgt und diese daher nicht zu den regulären Dateien gezählt. +.IP \(bu 3 +Die \fIDatei\fP hat mehr als eine harte Verknüpfung. +.IP \(bu 3 +Für die \fIDatei\fP ist das »setuid«\-, »setgid«\- oder »sticky«\-Bit gesetzt. +.IP \(bu 3 +Der Aktionsmodus wird auf Kompression gesetzt und die \fIDatei\fP hat bereits +das Suffix des Zieldateiformats (\fB.xz\fP oder \fB.txz\fP beim Komprimieren in +das \fB.xz\fP\-Format und \fB.lzma\fP oder \fB.tlz\fP beim Komprimieren in das +\&\fB.lzma\fP\-Format). +.IP \(bu 3 +Der Aktionsmodus wird auf Dekompression gesetzt und die \fIDatei\fP hat nicht +das Suffix eines der unterstützten Zieldateiformate (\fB.xz\fP, \fB.txz\fP, +\&\fB.lzma\fP, \fB.tlz\fP oder \fB.lz\fP). +.PP +Nach erfolgreicher Kompression oder Dekompression der \fIDatei\fP kopiert \fBxz\fP +Eigentümer, Gruppe, Zugriffsrechte, Zugriffszeit und Änderungszeit aus der +Ursprungs\-\fIDatei\fP in die Zieldatei. Sollte das Kopieren der Gruppe +fehlschlagen, werden die Zugriffsrechte so angepasst, dass jenen Benutzern +der Zugriff auf die Zieldatei verwehrt bleibt, die auch keinen Zugriff auf +die Ursprungs\-\fIDatei\fP hatten. Das Kopieren anderer Metadaten wie +Zugriffssteuerlisten oder erweiterter Attribute wird von \fBxz\fP noch nicht +unterstützt. +.PP +Sobald die Zieldatei erfolgreich geschlossen wurde, wird die +Ursprungs\-\fIDatei\fP entfernt. Dies wird durch die Option \fB\-\-keep\fP +verhindert. Die Ursprungs\-\fIDatei\fP wird niemals entfernt, wenn die Ausgabe +in die Standardausgabe geschrieben wird oder falls ein Fehler auftritt. +.PP +Durch Senden der Signale \fBSIGINFO\fP oder \fBSIGUSR1\fP an den \fBxz\fP\-Prozess +werden Fortschrittsinformationen in den Fehlerkanal der Standardausgabe +geleitet. Dies ist nur eingeschränkt hilfreich, wenn die +Standardfehlerausgabe ein Terminal ist. Mittels \fB\-\-verbose\fP wird ein +automatisch aktualisierter Fortschrittsanzeiger angezeigt. +. +.SS Speicherbedarf +In Abhängigkeit von den gewählten Kompressionseinstellungen bewegt sich der +Speicherverbrauch zwischen wenigen hundert Kilobyte und mehreren +Gigabyte. Die Einstellungen bei der Kompression einer Datei bestimmen dabei +den Speicherbedarf bei der Dekompression. Die Dekompression benötigt +üblicherweise zwischen 5\ % und 20\ % des Speichers, der bei der Kompression +der Datei erforderlich war. Beispielsweise benötigt die Dekompression einer +Datei, die mit \fBxz \-9\fP komprimiert wurde, gegenwärtig etwa 65\ MiB +Speicher. Es ist jedoch auch möglich, dass \fB.xz\fP\-Dateien mehrere Gigabyte +an Speicher zur Dekompression erfordern. +.PP +Insbesondere für Benutzer älterer Systeme wird eventuell ein sehr großer +Speicherbedarf ärgerlich sein. Um unangenehme Überraschungen zu vermeiden, +verfügt \fBxz\fP über eine eingebaute Begrenzung des Speicherbedarfs, die +allerdings in der Voreinstellung deaktiviert ist. Zwar verfügen einige +Betriebssysteme über eingebaute Möglichkeiten zur prozessabhängigen +Speicherbegrenzung, doch diese sind zu unflexibel (zum Beispiel kann +\fBulimit\fP(1) beim Begrenzen des virtuellen Speichers \fBmmap\fP(2) +beeinträchtigen). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +Die Begrenzung des Speicherbedarfs kann mit der Befehlszeilenoption +\fB\-\-memlimit=\fP\fIBegrenzung\fP aktiviert werden. Oft ist es jedoch bequemer, +die Begrenzung durch Setzen der Umgebungsvariable \fBXZ_DEFAULTS\fP +standardmäßig zu aktivieren, zum Beispiel +\fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. Die Begrenzungen können getrennt für +Kompression und Dekompression mittels \fB\-\-memlimit\-compress=\fP\fIBegrenzung\fP +und \fB\-\-memlimit\-decompress=\fP\fIBegrenzung\fP festgelegt werden. Die Verwendung +einer solchen Option außerhalb der Variable \fBXZ_DEFAULTS\fP ist kaum +sinnvoll, da \fBxz\fP in einer einzelnen Aktion nicht gleichzeitig Kompression +und Dekompression ausführen kann und \fB\-\-memlimit=\fP\fIBegrenzung\fP (oder \fB\-M\fP +\fIBegrenzung\fP) lässt sich einfacher in der Befehlszeile eingeben. +.PP +Wenn die angegebene Speicherbegrenzung bei der Dekompression überschritten +wird, schlägt der Vorgang fehl und \fBxz\fP zeigt eine Fehlermeldung an. Wird +die Begrenzung bei der Kompression überschritten, dann versucht \fBxz\fP die +Einstellungen entsprechend anzupassen, außer wenn \fB\-\-format=raw\fP oder +\fB\-\-no\-adjust\fP angegeben ist. Auf diese Weise schlägt die Aktion nicht fehl, +es sei denn, die Begrenzung wurde sehr niedrig angesetzt. Die Anpassung der +Einstellungen wird schrittweise vorgenommen, allerdings entsprechen die +Schritte nicht den Voreinstellungen der Kompressionsstufen. Das bedeutet, +wenn beispielsweise die Begrenzung nur geringfügig unter den Anforderungen +für \fBxz \-9\fP liegt, werden auch die Einstellungen nur wenig angepasst und +nicht vollständig herunter zu den Werten für \fBxz \-8\fP +. +.SS "Verkettung und Auffüllung von .xz\-Dateien" +Es ist möglich, \fB.xz\fP\-Dateien direkt zu verketten. Solche Dateien werden +von \fBxz\fP genauso dekomprimiert wie eine einzelne \fB.xz\fP\-Datei. +.PP +Es ist weiterhin möglich, eine Auffüllung zwischen den verketteten Teilen +oder nach dem letzten Teil einzufügen. Die Auffüllung muss aus Null\-Bytes +bestehen und deren Größe muss ein Vielfaches von vier Byte sein. Dies kann +zum Beispiel dann vorteilhaft sein, wenn die \fB.xz\fP\-Datei auf einem +Datenträger gespeichert wird, dessen Dateisystem die Dateigrößen in +512\-Byte\-Blöcken speichert. +.PP +Verkettung und Auffüllung sind für \fB.lzma\fP\-Dateien oder Rohdatenströme +nicht erlaubt. +. +.SH OPTIONEN +. +.SS "Ganzzahlige Suffixe und spezielle Werte" +An den meisten Stellen, wo ein ganzzahliges Argument akzeptiert wird, kann +ein optionales Suffix große Ganzzahlwerte einfacher darstellen. Zwischen +Ganzzahl und dem Suffix dürfen sich keine Leerzeichen befinden. +.TP +\fBKiB\fP +multipliziert die Ganzzahl mit 1.024 (2^10). \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP und +\fBKB\fP werden als Synonyme für \fBKiB\fP akzeptiert. +.TP +\fBMiB\fP +multipliziert die Ganzzahl mit 1.048.576 (2^20). \fBMi\fP, \fBm\fP, \fBM\fP und \fBMB\fP +werden als Synonyme für \fBMiB\fP akzeptiert. +.TP +\fBGiB\fP +multipliziert die Ganzzahl mit 1.073.741.824 (2^30). \fBGi\fP, \fBg\fP, \fBG\fP und +\fBGB\fP werden als Synonyme für \fBGiB\fP akzeptiert. +.PP +Der spezielle Wert \fBmax\fP kann dazu verwendet werden, um den von der +jeweiligen Option akzeptierten maximalen Ganzzahlwert anzugeben. +. +.SS Aktionsmodus +Falls mehrere Aktionsmodi angegeben sind, wird der zuletzt angegebene +verwendet. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Kompression. Dies ist der voreingestellte Aktionsmodus, sofern keiner +angegeben ist und auch kein bestimmter Modus aus dem Befehlsnamen abgeleitet +werden kann (der Befehl \fBunxz\fP impliziert zum Beispiel \fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Nach erfolgreicher Kompression wird die Quelldatei gelöscht, außer wenn in +die Standardausgabe geschrieben wird oder \fB\-\-keep\fP angegeben wurde. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Dekomprimieren. Nach erfolgreicher Dekompression wird die Quelldatei +gelöscht, außer wenn in die Standardausgabe geschrieben wird oder \fB\-\-keep\fP +angegeben wurde. +.TP +\fB\-t\fP, \fB\-\-test\fP +prüft die Integrität der komprimierten \fIDateien\fP. Diese Option ist +gleichbedeutend mit \fB\-\-decompress \-\-stdout\fP, außer dass die dekomprimierten +Daten verworfen werden, anstatt sie in die Standardausgabe zu leiten. Es +werden keine Dateien erstellt oder entfernt. +.TP +\fB\-l\fP, \fB\-\-list\fP +gibt Informationen zu den komprimierten \fIDateien\fP aus. Es werden keine +unkomprimierten Dateien ausgegeben und keine Dateien angelegt oder +entfernt. Im Listenmodus kann das Programm keine komprimierten Daten aus der +Standardeingabe oder anderen nicht durchsuchbaren Quellen lesen. +.IP "" +Die Liste zeigt in der Standardeinstellung grundlegende Informationen zu den +\fIDateien\fP an, zeilenweise pro Datei. Detailliertere Informationen erhalten +Sie mit der Option \fB\-\-verbose\fP. Wenn Sie diese Option zweimal angeben, +werden noch ausführlichere Informationen ausgegeben. Das kann den Vorgang +allerdings deutlich verlangsamen, da die Ermittlung der zusätzlichen +Informationen zahlreiche Suchvorgänge erfordert. Die Breite der +ausführlichen Ausgabe übersteigt 80 Zeichen, daher könnte die Weiterleitung +in beispielsweise\& \fBless\ \-S\fP sinnvoll sein, falls das Terminal nicht +breit genug ist. +.IP "" +Die exakte Ausgabe kann in verschiedenen \fBxz\fP\-Versionen und +Spracheinstellungen unterschiedlich sein. Wenn eine maschinell auswertbare +Ausgabe gewünscht ist, dann sollten Sie \fB\-\-robot \-\-list\fP verwenden. +. +.SS Aktionsattribute +.TP +\fB\-k\fP, \fB\-\-keep\fP +verhindert das Löschen der Eingabedateien. +.IP "" +Seit der \fBxz\fP\-Version 5.2.6 wird die Kompression oder Dekompression auch +dann ausgeführt, wenn die Eingabe ein symbolischer Link zu einer regulären +Datei ist, mehr als einen harten Link hat oder das »setuid«\-, »setgid«\- oder +»sticky«\-Bit gesetzt ist. Die genannten Bits werden nicht in die Zieldatei +kopiert. In früheren Versionen geschah dies nur mit \fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Diese Option hat verschiedene Auswirkungen: +.RS +.IP \(bu 3 +Wenn die Zieldatei bereits existiert, wird diese vor der Kompression oder +Dekompression gelöscht. +.IP \(bu 3 +Die Kompression oder Dekompression wird auch dann ausgeführt, wenn die +Eingabe ein symbolischer Link zu einer regulären Datei ist, mehr als einen +harten Link hat oder das »setuid«\-, »setgid«\- oder »sticky«\-Bit gesetzt +ist. Die genannten Bits werden nicht in die Zieldatei kopiert. +.IP \(bu 3 +Wenn es zusammen mit \fB\-\-decompress\fP und \fB\-\-stdout\fP verwendet wird und +\fBxz\fP den Typ der Quelldatei nicht ermitteln kann, wird die Quelldatei +unverändert in die Standardausgabe kopiert. Dadurch kann \fBxzcat\fP \fB\-\-force\fP +für Dateien, die nicht mit \fBxz\fP komprimiert wurden, wie \fBcat\fP(1) verwendet +werden. Zukünftig könnte \fBxz\fP neue Dateikompressionsformate unterstützen, +wodurch \fBxz\fP mehr Dateitypen dekomprimieren kann, anstatt sie unverändert +in die Standardausgabe zu kopieren. Mit der Option \fB\-\-format=\fP\fIFormat\fP +können Sie \fBxz\fP anweisen, nur ein einzelnes Dateiformat zu dekomprimieren. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +schreibt die komprimierten oder dekomprimierten Daten in die Standardausgabe +anstatt in eine Datei. Dies impliziert \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +dekomprimiert nur den ersten \fB.xz\fP\-Datenstrom und ignoriert stillschweigend +weitere Eingabedaten, die möglicherweise dem Datenstrom +folgen. Normalerweise führt solcher anhängender Datenmüll dazu, dass \fBxz\fP +eine Fehlermeldung ausgibt. +.IP "" +\fBxz\fP dekomprimiert niemals mehr als einen Datenstrom aus \fB.lzma\fP\-Dateien +oder Rohdatenströmen, aber dennoch wird durch diese Option möglicherweise +vorhandener Datenmüll nach der \fB.lzma\fP\-Datei oder dem Rohdatenstrom +ignoriert. +.IP "" +Diese Option ist wirkungslos, wenn der Aktionsmodus nicht \fB\-\-decompress\fP +oder \fB\-\-test\fP ist. +.IP "" +Seit der Programmversion \fBxz\fP 5.7.1alpha impliziert \fB\-\-single\-stream\fP +zusätzlich die Option \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +verhindert die Erzeugung von Sparse\-Dateien. In der Voreinstellung versucht +\fBxz\fP, bei der Dekompression in eine reguläre Datei eine Sparse\-Datei zu +erzeugen, wenn die dekomprimierten Daten lange Abfolgen von binären Nullen +enthalten. Dies funktioniert auch beim Schreiben in die Standardausgabe, +sofern diese in eine reguläre Datei weitergeleitet wird und bestimmte +Zusatzbedingungen erfüllt sind, die die Aktion absichern. Die Erzeugung von +Sparse\-Dateien kann Plattenplatz sparen und beschleunigt die Dekompression +durch Verringerung der Ein\-/Ausgaben der Platte. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +verwendet \fI.suf\fP bei der Dekompression anstelle von \fB.xz\fP oder \fB.lzma\fP +als Suffix für die Zieldatei. Falls nicht in die Standardausgabe geschrieben +wird und die Quelldatei bereits das Suffix \fI.suf\fP hat, wird eine Warnung +angezeigt und die Datei übersprungen. +.IP "" +berücksichtigt bei der Dekompression zusätzlich zu Dateien mit den Suffixen +\&\fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP oder \fB.lz\fP auch jene mit dem Suffix +\&\fI.suf\fP. Falls die Quelldatei das Suffix \fI.suf\fP hat, wird dieses entfernt +und so der Name der Zieldatei abgeleitet. +.IP "" +Beim Komprimieren oder Dekomprimieren von Rohdatenströmen mit +\fB\-\-format=raw\fP muss das Suffix stets angegeben werden, außer wenn die +Ausgabe in die Standardausgabe erfolgt. Der Grund dafür ist, dass es kein +vorgegebenes Suffix für Rohdatenströme gibt. +.TP +\fB\-\-files\fP[\fB=\fP\fIDatei\fP] +liest die zu verarbeitenden Dateinamen aus \fIDatei\fP. Falls keine \fIDatei\fP +angegeben ist, werden die Dateinamen aus der Standardeingabe +gelesen. Dateinamen müssen mit einem Zeilenumbruch beendet werden. Ein +Bindestrich (\fB\-\fP) wird als regulärer Dateiname angesehen und nicht als +Standardeingabe interpretiert. Falls Dateinamen außerdem als +Befehlszeilenargumente angegeben sind, werden diese vor den Dateinamen aus +der \fIDatei\fP verarbeitet. +.TP +\fB\-\-files0\fP[\fB=\fP\fIDatei\fP] +Dies ist gleichbedeutend mit \fB\-\-files\fP[\fB=\fP\fIDatei\fP], außer dass jeder +Dateiname mit einem Null\-Zeichen abgeschlossen werden muss. +. +.SS "Grundlegende Dateiformat\- und Kompressionsoptionen" +.TP +\fB\-F\fP \fIFormat\fP, \fB\-\-format=\fP\fIFormat\fP +gibt das \fIFormat\fP der zu komprimierenden oder dekomprimierenden Datei an: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +Dies ist die Voreinstellung. Bei der Kompression ist \fBauto\fP gleichbedeutend +mit \fBxz\fP. Bei der Dekompression wird das Format der Eingabedatei +automatisch erkannt. Beachten Sie, dass Rohdatenströme, wie sie mit +\fB\-\-format=raw\fP erzeugt werden, nicht automatisch erkannt werden können. +.TP +\fBxz\fP +Die Kompression erfolgt in das \fB.xz\fP\-Dateiformat oder akzeptiert nur +\&\fB.xz\fP\-Dateien bei der Dekompression. +.TP +\fBlzma\fP, \fBalone\fP +Die Kompression erfolgt in das veraltete \fB.lzma\fP\-Dateiformat oder +akzeptiert nur \fB.lzma\fP\-Dateien bei der Dekompression. Der alternative Name +\fBalone\fP dient der Abwärtskompatibilität zu den LZMA\-Dienstprogrammen. +.TP +\fBlzip\fP +Akzeptiert nur \fB.lz\fP\-Dateien bei der Dekompression. Kompression wird nicht +unterstützt. +.IP "" +The \fB.lz\fP format versions 0 and 1 are supported. Version 0 files were +produced by \fBlzip\fP 1.3 and older. Such files aren't common but may be +found from file archives as a few source packages were released in this +format. People might have old personal files in this format too. +Decompression support for the format version 0 was removed in \fBlzip\fP 1.18. +\fBlzip\fP 1.4 and later create files in the format version 1. +.TP +\fBraw\fP +Komprimiert oder dekomprimiert einen Rohdatenstrom (ohne Header). Diese +Option ist nur für fortgeschrittene Benutzer bestimmt. Zum Dekodieren von +Rohdatenströmen müssen Sie die Option \fB\-\-format=raw\fP verwenden und die +Filterkette ausdrücklich angeben, die normalerweise in den (hier fehlenden) +Container\-Headern gespeichert worden wäre. +.RE +.TP +\fB\-C\fP \fIPrüfung\fP, \fB\-\-check=\fP\fIPrüfung\fP +gibt den Typ der Integritätsprüfung an. Die Prüfsumme wird aus den +unkomprimierten Daten berechnet und in der \fB.xz\fP\-Datei gespeichert. Diese +Option wird nur bei der Kompression in das \fB.xz\fP\-Format angewendet, da das +\&\fB.lzma\fP\-Format keine Integritätsprüfungen unterstützt. Die eigentliche +Integritätsprüfung erfolgt (falls möglich), wenn die \fB.xz\fP\-Datei +dekomprimiert wird. +.IP "" +Folgende Typen von \fIPrüfungen\fP werden unterstützt: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +führt keine Integritätsprüfung aus. Dies ist eine eher schlechte +Idee. Dennoch kann es nützlich sein, wenn die Integrität der Daten auf +andere Weise sichergestellt werden kann. +.TP +\fBcrc32\fP +berechnet die CRC32\-Prüfsumme anhand des Polynoms aus IEEE\-802.3 (Ethernet). +.TP +\fBcrc64\fP +berechnet die CRC64\-Prüfsumme anhand des Polynoms aus ECMA\-182. Dies ist die +Voreinstellung, da beschädigte Dateien etwas besser als mit CRC32 erkannt +werden und die Geschwindigkeitsdifferenz unerheblich ist. +.TP +\fBsha256\fP +berechnet die SHA\-256\-Prüfsumme. Dies ist etwas langsamer als CRC32 und +CRC64. +.RE +.IP "" +Die Integrität der \fB.xz\fP\-Header wird immer mit CRC32 geprüft. Es ist nicht +möglich, dies zu ändern oder zu deaktivieren. +.TP +\fB\-\-ignore\-check\fP +verifiziert die Integritätsprüfsumme der komprimierten Daten bei der +Dekompression nicht. Die CRC32\-Werte in den \fB.xz\fP\-Headern werden weiterhin +normal verifiziert. +.IP "" +\fBVerwenden Sie diese Option nicht, außer Sie wissen, was Sie tun.\fP Mögliche +Gründe, diese Option zu verwenden: +.RS +.IP \(bu 3 +Versuchen, Daten aus einer beschädigten .xz\-Datei wiederherzustellen. +.IP \(bu 3 +Erhöhung der Geschwindigkeit bei der Dekompression. Dies macht sich meist +mit SHA\-256 bemerkbar, oder mit Dateien, die extrem stark komprimiert +sind. Wir empfehlen, diese Option nicht für diesen Zweck zu verwenden, es +sei denn, die Integrität der Datei wird extern auf andere Weise überprüft. +.RE +.TP +\fB\-0\fP … \fB\-9\fP +wählt eine der voreingestellten Kompressionsstufen, standardmäßig +\fB\-6\fP. Wenn mehrere Voreinstellungsstufen angegeben sind, ist nur die +zuletzt angegebene wirksam. Falls bereits eine benutzerdefinierte +Filterkette angegeben wurde, wird diese durch die Festlegung der +Voreinstellung geleert. +.IP "" +Die Unterschiede zwischen den Voreinstellungsstufen sind deutlicher als bei +\fBgzip\fP(1) und \fBbzip2\fP(1). Die gewählten Kompressionseinstellungen +bestimmen den Speicherbedarf bei der Dekompression, daher ist es auf älteren +Systemen mit wenig Speicher bei einer zu hoch gewählten Voreinstellung +schwer, eine Datei zu dekomprimieren. Insbesondere \fBist es keine gute Idee, blindlings \-9 für alles\fP zu verwenden, wie dies häufig mit \fBgzip\fP(1) und +\fBbzip2\fP(1) gehandhabt wird. +.RS +.TP +\fB\-0\fP … \fB\-3\fP +Diese Voreinstellungen sind recht schnell. \fB\-0\fP ist manchmal schneller als +\fBgzip \-9\fP, wobei aber die Kompression wesentlich besser ist. Die +schnelleren Voreinstellungen sind im Hinblick auf die Geschwindigkeit mit +\fBbzip2\fP(1) vergleichbar , mit einem ähnlichen oder besseren +Kompressionsverhältnis, wobei das Ergebnis aber stark vom Typ der zu +komprimierenden Daten abhängig ist. +.TP +\fB\-4\fP … \fB\-6\fP +Gute bis sehr gute Kompression, wobei der Speicherbedarf für die +Dekompression selbst auf alten Systemen akzeptabel ist. \fB\-6\fP ist die +Voreinstellung, welche üblicherweise eine gute Wahl für die Verteilung von +Dateien ist, die selbst noch auf Systemen mit nur 16\ MiB Arbeitsspeicher +dekomprimiert werden müssen (\fB\-5e\fP oder \fB\-6e\fP sind ebenfalls eine +Überlegung wert. Siehe \fB\-\-extreme\fP). +.TP +\fB\-7 … \-9\fP +Ähnlich wie \fB\-6\fP, aber mit einem höheren Speicherbedarf für die Kompression +und Dekompression. Sie sind nur nützlich, wenn Dateien komprimiert werden +sollen, die größer als 8\ MiB, 16\ MiB beziehungsweise 32\ MiB sind. +.RE +.IP "" +Auf der gleichen Hardware ist die Dekompressionsgeschwindigkeit ein nahezu +konstanter Wert in Bytes komprimierter Daten pro Sekunde. Anders +ausgedrückt: Je besser die Kompression, umso schneller wird üblicherweise +die Dekompression sein. Das bedeutet auch, dass die Menge der pro Sekunde +ausgegebenen unkomprimierten Daten stark variieren kann. +.IP "" +Die folgende Tabelle fasst die Eigenschaften der Voreinstellungen zusammen: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Voreinst.;Wörtb.Gr;KomprCPU;KompSpeich;DekompSpeich +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Spaltenbeschreibungen: +.RS +.IP \(bu 3 +Wörtb.Größe ist die Größe des LZMA2\-Wörterbuchs. Es ist +Speicherverschwendung, ein Wörterbuch zu verwenden, das größer als die +unkomprimierte Datei ist. Daher ist es besser, die Voreinstellungen \fB\-7\fP … +\fB\-9\fP zu vermeiden, falls es keinen wirklichen Bedarf dafür gibt. Mit \fB\-6\fP +und weniger wird üblicherweise so wenig Speicher verschwendet, dass dies +nicht ins Gewicht fällt. +.IP \(bu 3 +KomprCPU ist eine vereinfachte Repräsentation der LZMA2\-Einstellungen, +welche die Kompressionsgeschwindigkeit beeinflussen. Die Wörterbuchgröße +wirkt sich ebenfalls auf die Geschwindigkeit aus. Während KompCPU für die +Stufen \fB\-6\fP bis \fB\-9\fP gleich ist, tendieren höhere Stufen dazu, etwas +langsamer zu sein. Um eine noch langsamere, aber möglicherweise bessere +Kompression zu erhalten, siehe \fB\-\-extreme\fP. +.IP \(bu 3 +KompSpeich enthält den Speicherbedarf des Kompressors im +Einzel\-Thread\-Modus. Dieser kann zwischen den \fBxz\fP\-Versionen leicht +variieren. +.IP \(bu 3 +DekompSpeich enthält den Speicherbedarf für die Dekompression. Das bedeutet, +dass die Kompressionseinstellungen den Speicherbedarf bei der Dekompression +bestimmen. Der exakte Speicherbedarf bei der Dekompression ist geringfügig +größer als die Größe des LZMA2\-Wörterbuchs, aber die Werte in der Tabelle +wurden auf ganze MiB aufgerundet. +.RE +.IP "" + Der Speicherbedarf einiger der zukünftigen Multithread\-Modi kann dramatisch +höher sein als im Einzel\-Thread\-Modus. Mit dem Standardwert von +\fB\-\-block\-size\fP benötigt jeder Thread 3*3*Wörtb.Gr plus KompSpeich oder +DekompSpeich. Beispielsweise benötigen vier Threads mit der Voreinstellung +\fB\-6\fP etwa 660 bis 670 MiB Speicher. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +verwendet eine langsamere Variante der gewählten +Kompressions\-Voreinstellungsstufe (\fB\-0\fP … \fB\-9\fP), um hoffentlich ein etwas +besseres Kompressionsverhältnis zu erreichen, das aber in ungünstigen Fällen +auch schlechter werden kann. Der Speicherverbrauch bei der Dekompression +wird dabei nicht beeinflusst, aber der Speicherverbrauch der Kompression +steigt in den Voreinstellungsstufen \fB\-0\fP bis \fB\-3\fP geringfügig an. +.IP "" +Da es zwei Voreinstellungen mit den Wörterbuchgrößen 4\ MiB und 8\ MiB gibt, +verwenden die Voreinstellungsstufen \fB\-3e\fP und \fB\-5e\fP etwas schnellere +Einstellungen (niedrigere KompCPU) als \fB\-4e\fP beziehungsweise \fB\-6e\fP. Auf +diese Weise sind zwei Voreinstellungen nie identisch. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Voreinst.;Wörtb.Gr;KomprCPU;KompSpeich;DekompSpeich +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Zum Beispiel gibt es insgesamt vier Voreinstellungen, die ein 8\ MiB großes +Wörterbuch verwenden, deren Reihenfolge von der schnellsten zur langsamsten +\fB\-5\fP, \fB\-6\fP, \fB\-5e\fP und \fB\-6e\fP ist. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +sind etwas irreführende Aliase für \fB\-0\fP beziehungsweise \fB\-9\fP. Sie werden +nur zwecks Abwärtskompatibilität zu den LZMA\-Dienstprogrammen +bereitgestellt. Sie sollten diese Optionen besser nicht verwenden. +.TP +\fB\-\-block\-size=\fP\fIGröße\fP +teilt beim Komprimieren in das \fB.xz\fP\-Format die Eingabedaten in Blöcke der +angegebenen \fIGröße\fP in Byte. Die Blöcke werden unabhängig voneinander +komprimiert, was dem Multi\-Threading entgegen kommt und Zufallszugriffe bei +der Dekompression begrenzt. Diese Option wird typischerweise eingesetzt, um +die vorgegebene Blockgröße im Multi\-Thread\-Modus außer Kraft zu setzen, aber +sie kann auch im Einzel\-Thread\-Modus angewendet werden. +.IP "" +Im Multi\-Thread\-Modus wird etwa die dreifache \fIGröße\fP in jedem Thread zur +Pufferung der Ein\- und Ausgabe belegt. Die vorgegebene \fIGröße\fP ist das +Dreifache der Größe des LZMA2\-Wörterbuchs oder 1 MiB, je nachdem, was mehr +ist. Typischerweise ist das Zwei\- bis Vierfache der Größe des +LZMA2\-Wörterbuchs oder wenigstens 1 MB ein guter Wert. Eine \fIGröße\fP, die +geringer ist als die des LZMA2\-Wörterbuchs, ist Speicherverschwendung, weil +dann der LZMA2\-Wörterbuchpuffer niemals vollständig genutzt werden würde. Im +Multi\-Thread\-Modus wird die Größe der Blöcke wird in den Block\-Headern +gespeichert. Die Größeninformation wird für eine Multi\-Thread\-Dekompression +genutzt. +.IP "" +Im Einzel\-Thread\-Modus werden die Blöcke standardmäßig nicht geteilt. Das +Setzen dieser Option wirkt sich nicht auf den Speicherbedarf aus. In den +Block\-Headern werden keine Größeninformationen gespeichert, daher werden im +Einzel\-Thread\-Modus erzeugte Dateien nicht zu den im Multi\-Thread\-Modus +erzeugten Dateien identisch sein. Das Fehlen der Größeninformation bedingt +auch, dass \fBxz\fP nicht in der Lage sein wird, die Dateien im +Multi\-Thread\-Modus zu dekomprimieren. +.TP +\fB\-\-block\-list=\fP\fIBlöcke\fP +beginnt bei der Kompression in das \fB.xz\fP\-Format nach den angegebenen +Intervallen unkomprimierter Daten einen neuen Block, optional mit einer +benutzerdefinierten Filterkette. +.IP "" +Die \fIBlöcke\fP werden in einer durch Kommata getrennten Liste +angegeben. Jeder Block besteht aus einer optionalen Filterkettennummer +zwischen 0 und 9, gefolgt von einem Doppelpunkt (\fB:\fP) und der Größe der +unkomprimierten Daten (diese Angabe ist erforderlich). Überspringen eines +Blocks (zwei oder mehr aufeinander folgende Kommata) ist ein Kürzel dafür, +die Größe und die Filter des vorherigen Blocks zu verwenden. +.IP "" +Falls die Eingabedatei größer ist als die Summe der \fIBlöcke\fP, dann wird der +letzte in \fIVBlöcke\fP angegebene Wert bis zum Ende der Datei wiederholt. Mit +dem speziellen Wert \fB0\fP können Sie angeben, dass der Rest der Datei als +einzelner Block kodiert werden soll. +.IP "" +Eine alternative Filterkette für jeden Block kann in Kombination mit den +Optionen \fB\-\-filters1=\fP\fIFilter\fP \&…\& \fB\-\-filters9=\fP\fIFilter\fP angegeben +werden. Diese Optionen definieren Filterketten mit einem Bezeichner zwischen +1 und 9. Die Filterkette 0 bezeichnet hierbei die voreingestellte +Filterkette, was dem Nichtangeben einer Filterkette gleichkommt. Der +Filterkettenbezeichner kann vor der unkomprimierten Größe verwendet werden, +gefolgt von einem Doppelpunkt (\fB:\fP). Falls Sie beispielsweise +\fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP angeben, werden die Blöcke +folgendermaßen erstellt: +.RS +.IP \(bu 3 +Die durch \fB\-\-filters1\fP angegebene Filterkette und 2 MiB Eingabe +.IP \(bu 3 +Die durch \fB\-\-filters3\fP angegebene Filterkette und 2 MiB Eingabe +.IP \(bu 3 +Die durch \fB\-\-filters2\fP angegebene Filterkette und 4 MiB Eingabe +.IP \(bu 3 +Die durch \fB\-\-filters2\fP angegebene Filterkette und 4 MiB Eingabe +.IP \(bu 3 +Die vorgegebene Filterkette und 2 MiB Eingabe +.IP \(bu 3 +Die vorgegebene Filterkette und 4 MiB Eingabe für jeden Block bis zum Ende +der Eingabe. +.RE +.IP "" +Falls Sie eine Größe angeben, welche die Blockgröße des Encoders übersteigen +(entweder den Vorgabewert im Thread\-Modus oder den mit +\fB\-\-block\-size=\fP\fIGröße\fP angegebenen Wert), wird der Encoder zusätzliche +Blöcke erzeugen, wobei die in den \fIBlöcke\fP angegebenen Grenzen eingehalten +werden. Wenn Sie zum Beispiel \fB\-\-block\-size=10MiB\fP +\fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP angeben und die Eingabedatei 80 +MiB groß ist, erhalten Sie 11 Blöcke: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10 und +1 MiB. +.IP "" +Im Multi\-Thread\-Modus werden die Blockgrößen in den Block\-Headern +gespeichert. Dies geschieht im Einzel\-Thread\-Modus nicht, daher wird die +kodierte Ausgabe zu der im Multi\-Thread\-Modus nicht identisch sein. +.TP +\fB\-\-flush\-timeout=\fP\fIZeit\fP +löscht bei der Kompression die ausstehenden Daten aus dem Encoder und macht +sie im Ausgabedatenstrom verfügbar, wenn mehr als die angegebene \fIZeit\fP in +Millisekunden (als positive Ganzzahl) seit dem vorherigen Löschen vergangen +ist und das Lesen weiterer Eingaben blockieren würde. Dies kann nützlich +sein, wenn \fBxz\fP zum Komprimieren von über das Netzwerk eingehenden Daten +verwendet wird. Kleine \fIZeit\fP\-Werte machen die Daten unmittelbar nach dem +Empfang nach einer kurzen Verzögerung verfügbar, während große \fIZeit\fP\-Werte +ein besseres Kompressionsverhältnis bewirken. +.IP "" +Dieses Funktionsmerkmal ist standardmäßig deaktiviert. Wenn diese Option +mehrfach angegeben wird, ist die zuletzt angegebene wirksam. Für die Angabe +der \fIZeit\fP kann der spezielle Wert \fB0\fP verwendet werden, um dieses +Funktionsmerkmal explizit zu deaktivieren. +.IP "" +Dieses Funktionsmerkmal ist außerhalb von POSIX\-Systemen nicht verfügbar. +.IP "" +.\" FIXME +\fBDieses Funktionsmerkmal ist noch experimentell.\fP Gegenwärtig ist \fBxz\fP +aufgrund der Art und Weise, wie \fBxz\fP puffert, für Dekompression in Echtzeit +ungeeignet. +.TP +\fB\-\-no\-sync\fP +synchronisiert die Zieldatei und deren Verzeichnis auf dem Speichergerät +nicht, bevor die Quelldatei gelöscht wird. So kann die Performance beim +Komprimieren oder Dekomprimieren vieler kleiner Dateien verbessert +werden. Jedoch wäre es möglich, falls es kurz nach dem Löschen zu einem +Systemabsturz kommt, dass die Zieldatei noch nicht auf dem Speichergerät +geschrieben, aber der Löschvorgang bereits ausgeführt wurde. In diesem Fall +gehen sowohl die Quelldatei als auch die Zieldatei verloren. +.IP "" +Diese Option ist nur wirksam, wenn \fBxz\fP die Quelldatei löscht. In anderen +Fällen wird niemals synchronisiert. +.IP "" +Die Synchronisierung und \fB\-\-no\-sync\fP wurden in Version \fBxz\fP 5.7.1alpha +hinzugefügt. +.TP +\fB\-\-memlimit\-compress=\fP\fIGrenze\fP +legt eine Grenze für die Speichernutzung bei der Kompression fest. Wenn +diese Option mehrmals angegeben wird, ist die zuletzt angegebene wirksam. +.IP "" +Falls die Kompressionseinstellungen die \fIGrenze\fP überschreiten, versucht +\fBxz\fP, die Einstellungen nach unten anzupassen, so dass die Grenze nicht +mehr überschritten wird und zeigt einen Hinweis an, dass eine automatische +Anpassung vorgenommen wurde. Die Anpassungen werden in folgender Reihenfolge +angewendet: Reduzierung der Anzahl der Threads, Wechsel in den +Einzelthread\-Modus, falls sogar ein einziger Thread im Multithread\-Modus die +\fIGrenze\fP überschreitet, und schlussendlich die Reduzierung der Größe des +LZMA2\-Wörterbuchs. +.IP "" +Beim Komprimieren mit \fB\-\-format=raw\fP oder falls \fB\-\-no\-adjust\fP angegeben +wurde, wird nur die Anzahl der Threads reduziert, da nur so die komprimierte +Ausgabe nicht beeinflusst wird. +.IP "" +Falls die \fIGrenze\fP nicht anhand der vorstehend beschriebenen Anpassungen +gesetzt werden kann, wird ein Fehler angezeigt und \fBxz\fP wird mit dem +Exit\-Status 1 beendet. +.IP "" +Die \fIGrenze\fP kann auf verschiedene Arten angegeben werden: +.RS +.IP \(bu 3 +Die \fIGrenze\fP kann ein absoluter Wert in Byte sein. Ein Suffix wie \fBMiB\fP +kann dabei hilfreich sein. Beispiel: \fB\-\-memlimit\-compress=80MiB\fP. +.IP \(bu 3 +Die \fIGrenze\fP kann als Prozentsatz des physischen Gesamtspeichers (RAM) +angegeben werden. Dies ist insbesondere nützlich, wenn in einem +Shell\-Initialisierungsskript, das mehrere unterschiedliche Rechner gemeinsam +verwenden, die Umgebungsvariable \fBXZ_DEFAULTS\fP gesetzt ist. Auf diese Weise +ist die Grenze auf Systemen mit mehr Speicher höher. Beispiel: +\fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +Mit \fB0\fP kann die \fIGrenze\fP auf den Standardwert zurückgesetzt werden. Dies +ist gegenwärtig gleichbedeutend mit dem Setzen der \fIGrenze\fP auf \fBmax\fP +(keine Speicherbegrenzung). +.RE +.IP "" +Für die 32\-Bit\-Version von \fBxz\fP gibt es einen Spezialfall: Falls die Grenze +über \fB4020\ MiB\fP liegt, wird die \fIGrenze\fP auf \fB4020\ MiB\fP gesetzt. Auf +MIPS32 wird stattdessen \fB2000\ MB\fP verwendet (die Werte \fB0\fP und \fBmax\fP +werden hiervon nicht beeinflusst; für die Dekompression gibt es keine +vergleichbare Funktion). Dies kann hilfreich sein, wenn ein +32\-Bit\-Executable auf einen 4\ GiB großen Adressraum (2 GiB auf MIPS32) +zugreifen kann, wobei wir hoffen wollen, dass es in anderen Situationen +keine negativen Effekte hat. +.IP "" +Siehe auch den Abschnitt \fBSpeicherbedarf\fP. +.TP +\fB\-\-memlimit\-decompress=\fP\fIGrenze\fP +legt eine Begrenzung des Speicherverbrauchs für die Dekompression fest. Dies +beeinflusst auch den Modus \fB\-\-list\fP. Falls die Aktion nicht ausführbar ist, +ohne die \fIGrenze\fP zu überschreiten, gibt \fBxz\fP eine Fehlermeldung aus und +die Dekompression wird fehlschlagen. Siehe \fB\-\-memlimit\-compress=\fP\fIGrenze\fP +zu möglichen Wegen, die \fIGrenze\fP anzugeben. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fIGrenze\fP +legt eine Begrenzung des Speicherverbrauchs für Multithread\-Dekompression +fest. Dies beeinflusst lediglich die Anzahl der Threads; \fBxz\fP wird dadurch +niemals die Dekompression einer Datei verweigern. Falls die \fIGrenze\fP für +jegliches Multithreading zu niedrig ist, wird sie ignoriert und \fBxz\fP setzt +im Einzelthread\-modus fort. Beachten Sie auch, dass bei der Verwendung von +\fB\-\-memlimit\-decompress\fP dies stets sowohl auf den Einzelthread\-als auch auf +den Multithread\-Modus angewendet wird und so die effektive \fIGrenze\fP für den +Multithread\-Modus niemals höher sein wird als die mit +\fB\-\-memlimit\-decompress\fP gesetzte Grenze. +.IP "" +Im Gegensatz zu anderen Optionen zur Begrenzung des Speicherverbrauchs hat +\fB\-\-memlimit\-mt\-decompress=\fP\fIGrenze\fP eine systemspezifisch vorgegebene +\fIGrenze\fP. Mit \fBxz \-\-info\-memory\fP können Sie deren aktuellen Wert anzeigen +lassen. +.IP "" +Diese Option und ihr Standardwert existieren, weil die unbegrenzte +threadbezogene Dekompression bei einigen Eingabedateien zu unglaublich +großem Speicherverbrauch führen würde. Falls die vorgegebene \fIGrenze\fP auf +Ihrem System zu niedrig ist, können Sie die \fIGrenze\fP durchaus erhöhen, aber +setzen Sie sie niemals auf einen Wert größer als die Menge des nutzbaren +Speichers, da \fBxz\fP bei entsprechenden Eingabedateien versuchen wird, diese +Menge an Speicher auch bei einer geringen Anzahl von Threads zu +verwnden. Speichermangel oder Auslagerung verbessern die +Dekomprimierungsleistung nicht. +.IP "" +Siehe \fB\-\-memlimit\-compress=\fP\fIGrenze\fP für mögliche Wege zur Angabe der +\fIGrenze\fP. Sezen der \fIGrenze\fP auf \fB0\fP setzt die \fIGrenze\fP auf den +vorgegebenen systemspezifischen Wert zurück. +.TP +\fB\-M\fP \fIGrenze\fP, \fB\-\-memlimit=\fP\fIGrenze\fP, \fB\-\-memory=\fP\fIGrenze\fP +Dies ist gleichbedeutend mit \fB\-\-memlimit\-compress=\fP\fIGrenze\fP +\fB\-\-memlimit\-decompress=\fP\fIGrenze\fP \fB\-\-memlimit\-mt\-decompress=\fP\fIGrenze\fP. +.TP +\fB\-\-no\-adjust\fP +zeigt einen Fehler an und beendet, falls die Grenze der Speichernutzung +nicht ohne Änderung der Einstellungen, welche die komprimierte Ausgabe +beeinflussen, berücksichtigt werden kann. Das bedeutet, dass \fBxz\fP daran +gehindert wird, den Encoder vom Multithread\-Modus in den Einzelthread\-Modus +zu versetzen und die Größe des LZMA2\-Wörterbuchs zu reduzieren. Allerdings +kann bei Verwendung dieser Option dennoch die Anzahl der Threads reduziert +werden, um die Grenze der Speichernutzung zu halten, sofern dies die +komprimierte Ausgabe nicht beeinflusst. +.IP "" +Die automatische Anpassung ist beim Erzeugen von Rohdatenströmen +(\fB\-\-format=raw\fP) immer deaktiviert. +.TP +\fB\-T\fP \fIThreads\fP, \fB\-\-threads=\fP\fIThreads\fP +gibt die Anzahl der zu verwendenden Arbeits\-Threads an. Wenn Sie \fIThreads\fP +auf einen speziellen Wert \fB0\fP setzen, verwendet \fBxz\fP maximal so viele +Threads, wie der/die Prozessor(en) im System untestützen. Die tatsächliche +Anzahl kann geringer sein als die angegebenen \fIThreads\fP, wenn die +Eingabedatei nicht groß genug für Threading mit den gegebenen Einstellungen +ist oder wenn mehr Threads die Speicherbegrenzung übersteigen würden. +.IP "" +Die Multithread\- bzw. Einzelthread\-Kompressoren erzeugen unterschiedliche +Ausgaben. Der Einzelthread\-Kompressor erzeugt die geringste Dateigröße, aber +nur die Ausgabe des Multithread\-Kompressors kann mit mehreren Threads wieder +dekomprimiert werden. Das Setzen der Anzahl der \fIThreads\fP auf \fB1\fP wird den +Einzelthread\-Modus verwenden. Das Setzen der Anzahl der \fIThreads\fP auf +einen anderen Wert einschließlich \fB0\fP verwendet den Multithread\-Kompressor, +und zwar sogar dann, wenn das System nur einen einzigen Hardware\-Thread +unterstützt (\fBxz\fP 5.2.x verwendete in diesem Fall noch den +Einzelthread\-Modus). +.IP "" +Um den Multithread\-Modus mit nur einem einzigen Thread zu verwenden, setzen +Sie die Anzahl der \fIThreads\fP auf \fB+1\fP. Das Präfix \fB+\fP hat mit Werten +verschieden von \fB1\fP keinen Effekt. Eine Begrenzung des Speicherverbrauchs +kann \fBxz\fP dennoch veranlassen, den Einzelthread\-Modus zu verwenden, außer +wenn \fB\-\-no\-adjust\fP verwendet wird. Die Unterstützung für das Präfix \fB+\fP +wurde in \fBxz\fP 5.4.0 hinzugefügt. +.IP "" +Falls das automatische Setzen der Anzahl der Threads angefordert und keine +Speicherbegrenzung angegeben wurde, dann wird eine systemspezifisch +vorgegebene weiche Grenze verwendet, um eventuell die Anzahl der Threads zu +begrenzen. Es ist eine weiche Grenze im Sinne davon, dass sie ignoriert +wird, falls die Anzahl der Threads 1 ist; daher wird eine weiche Grenze +\fBxz\fP niemals an der Kompression oder Dekompression hindern. Diese +vorgegebene weiche Grenze veranlasst \fBxz\fP nicht, vom Multithread\-Modus in +den Einzelthread\-Modus zu wechseln. Die aktiven Grenzen können Sie mit dem +Befehl \fBxz \-\-info\-memory\fP anzeigen lassen. +.IP "" +Die gegenwärtig einzige Threading\-Methode teilt die Eingabe in Blöcke und +komprimiert diese unabhängig voneinander. Die vorgegebene Blockgröße ist von +der Kompressionsstufe abhängig und kann mit der Option +\fB\-\-block\-size=\fP\fIGröße\fP außer Kraft gesetzt werden. +.IP "" +Eine thread\-basierte Dekompression wird nur bei Dateien funktionieren, die +mehrere Blöcke mit Größeninformationen in deren Headern enthalten. Alle im +Multi\-Thread\-Modus komprimierten Dateien, die groß genug sind, erfüllen +diese Bedingung, im Einzel\-Thread\-Modus komprimierte Dateien dagegen nicht, +selbst wenn \fB\-\-block\-size=\fP\fIGröße\fP verwendet wurde. +.IP "" +Der Vorgabewert für \fIThreads\fP is \fB0\fP. In \fBxz\fP 5.4.x und älteren Versionen +ist der Vorgabewert \fB1\fP. +. +.SS "Benutzerdefinierte Filterketten für die Kompression" +Eine benutzerdefinierte Filterkette ermöglicht die Angabe detaillierter +Kompressionseinstellungen, anstatt von den Voreinstellungen auszugehen. Wenn +eine benutzerdefinierte Filterkette angegeben wird, werden die vorher in der +Befehlszeile angegebenen Voreinstellungsoptionen (\fB\-0\fP … \fB\-9\fP und +\fB\-\-extreme\fP) außer Kraft gesetzt. Wenn eine Voreinstellungsoption nach +einer oder mehreren benutzerdefinierten Filterkettenoptionen angegeben wird, +dann wird die neue Voreinstellung wirksam und die zuvor angegebenen +Filterkettenoptionen werden außer Kraft gesetzt. +.PP +Eine Filterkette ist mit dem Piping (der Weiterleitung) in der Befehlszeile +vergleichbar. Bei der Kompression gelangt die unkomprimierte Eingabe in den +ersten Filter, dessen Ausgabe wiederum in den zweiten Filter geleitet wird +(sofern ein solcher vorhanden ist). Die Ausgabe des letzten Filters wird in +die komprimierte Datei geschrieben. In einer Filterkette sind maximal vier +Filter zulässig, aber typischerweise besteht eine Filterkette nur aus einem +oder zwei Filtern. +.PP +Bei vielen Filtern ist die Positionierung in der Filterkette eingeschränkt: +Einige Filter sind nur als letzte in der Kette verwendbar, einige können +nicht als letzte Filter gesetzt werden, und andere funktionieren an +beliebiger Stelle. Abhängig von dem Filter ist diese Beschränkung entweder +auf das Design des Filters selbst zurückzuführen oder ist aus +Sicherheitsgründen vorhanden. +.PP +Eine benutzerdefinierte Filterkette kann auf zwei verschiedene Arten +angegeben werden. Die Optionen \fB\-\-filters=\fP\fIFilter\fP und +\fB\-\-filters1=\fP\fIFilter\fP \&…\& \fB\-\-filters9=\fP\fIFilter\fP ermöglichen die Angabe +einer ganzen Filterkette in einer einzelnen Option gemäß der +Liblzma\-Filterzeichenkettensyntax. Alternativ können Sie eine Filterkette +mit einer oder mehreren individuellen Filteroptionen in der Reihenfolge +angeben, in der sie in der Filterkette verwendet werden sollen. Daher ist +die Reihenfolge der individuellen Filteroptionen wichtig! Beim Dekodieren +von Rohdatenströmen (\fB\-\-format=raw\fP) muss die Filterkette in der gleichen +Reihenfolge wie bei der Komprimierung angegeben werden. Alle individuellen +Filter\- oder Voreinstellungsoptionen, die \fIvor\fP der vollen +Filterkettenoption (\fB\-\-filters=\fP\fIFilter\fP) angegeben werden, werden +verworfen. Individuelle Filter, die \fInach\fP der vollen Filterkettenoption +angegeben werden, setzen die Filterkette zurück +.PP +Sowohl vollständige als auch individuelle Filteroptionen akzeptieren +filterspezifische \fIOptionen\fP in einer durch Kommata getrennten +Liste. Zusätzliche Kommata in den \fIOptionen\fP werden ignoriert. Jede Option +hat einen Standardwert, daher brauchen Sie nur jene anzugeben, die Sie +ändern wollen. +.PP +Um die gesamte Filterkette und die \fIOptionen\fP anzuzeigen, rufen Sie \fBxz \-vv\fP auf (was gleichbedeutend mit der zweimaligen Angabe von \fB\-\-verbose\fP +ist). Dies funktioniert auch zum Betrachten der von den Voreinstellungen +verwendeten Filterkettenoptionen. +.TP +\fB\-\-filters=\fP\fIFilter\fP +gibt die vollständige Filterkette oder eine Voreinstellung in einer +einzelnen Option an. Mehrere Filter können durch Leerzeichen oder zwei +Minuszeichen (\fB\-\-\fP) voneinander getrennt werden. Es kann notwendig sein, +die \fIFilter\fP in der Shell\-Befehlszeile zu maskieren, so dass diese als +einzelne Option ausgewertet werden. Um Optionen Werte zuzuordnen, verwenden +Sie \fB:\fP oder \fB=\fP. Einer Voreinstellung kann ein \fB\-\fP vorangestellt werden, +dem keiner oder mehrere Schalter folgen. Der einzige unterstützte Schalter +ist \fBe\fP zum Anwenden der gleichen Optionen wie \fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIFilter\fP … \fB\-\-filters9\fP=\fIFilter\fP +gibt bis zu neun optionale Filterketten an, die mit \fB\-\-block\-list\fP +verwendet werden können. +.IP "" +Wenn Sie beispielsweise ein Archiv mit ausführbaren Dateien gefolgt von +Textdateien komprimieren, könnte der Teil mit den ausführbaren Dateien eine +Filterkette mit einem BCJ\-Filter und der Textdateiteil lediglich den +LZMA2\-Filter verwenden. +.TP +\fB\-\-filters\-help\fP +zeigt eine Hilfemeldung an, welche beschreibt, wie Voreinstellungen und +benutzerdefinierte Filterketten in den Optionen \fB\-\-filters\fP und +\fB\-\-filters1=\fP\fIFilter\fP \&… \& \fB\-\-filters9=\fP\fIFilter\fP angegeben werden und +beendet das Programm. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIOptionen\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIOptionen\fP] +.PD +fügt LZMA1\- oder LZMA2\-Filter zur Filterkette hinzu. Diese Filter können nur +als letzte Filter in der Kette verwendet werden. +.IP "" +LZMA1 ist ein veralteter Filter, welcher nur wegen des veralteten +\&\fB.lzma\fP\-Dateiformats unterstützt wird, welches nur LZMA1 unterstützt. LZMA2 +ist eine aktualisierte Version von LZMA1, welche einige praktische Probleme +von LZMA1 behebt. Das \fB.xz\fP\-Format verwendet LZMA2 und unterstützt LZMA1 +gar nicht. Kompressionsgeschwindigkeit und \-verhältnis sind bei LZMA1 und +LZMA2 praktisch gleich. +.IP "" +LZMA1 und LZMA2 haben die gleichen \fIOptionen\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIVoreinstellung\fP +setzt alle LZMA1\- oder LZMA2\-\fIOptionen\fP auf die \fIVoreinstellung\fP +zurück. Diese \fIVoreinstellung\fP wird in Form einer Ganzzahl angegeben, der +ein aus einem einzelnen Buchstaben bestehender Voreinstellungsmodifikator +folgen kann. Die Ganzzahl kann \fB0\fP bis \fB9\fP sein, entsprechend den +Befehlszeilenoptionen \fB\-0\fP … \fB\-9\fP. Gegenwärtig ist \fBe\fP der einzige +unterstützte Modifikator, was \fB\-\-extreme\fP entspricht. Wenn keine +\fBVoreinstellung\fP angegeben ist, werden die Standardwerte der LZMA1\- oder +LZMA2\-\fIOptionen\fP der Voreinstellung \fB6\fP entnommen. +.TP +\fBdict=\fP\fIGröße\fP +Die \fIGröße\fP des Wörterbuchs (Chronikpuffers) gibt an, wie viel Byte der +kürzlich verarbeiteten unkomprimierten Daten im Speicher behalten werden +sollen. Der Algorithmus versucht, sich wiederholende Byte\-Abfolgen +(Übereinstimmungen) in den unkomprimierten Daten zu finden und diese durch +Referenzen zu den Daten zu ersetzen, die sich gegenwärtig im Wörterbuch +befinden. Je größer das Wörterbuch, umso größer ist die Chance, eine +Übereinstimmung zu finden. Daher bewirkt eine Erhöhung der \fIGröße\fP des +Wörterbuchs üblicherweise ein besseres Kompressionsverhältnis, aber ein +Wörterbuch, das größer ist als die unkomprimierte Datei, wäre +Speicherverschwendung. +.IP "" +Typische Wörterbuch\-\fIGrößen\fP liegen im Bereich von 64\ KiB bis 64\ MiB. Das +Minimum ist 4\ KiB. Das Maximum für die Kompression ist gegenwärtig 1.5\ GiB +(1536\ MiB). Bei der Dekompression wird bereits eine Wörterbuchgröße bis zu +4\ GiB minus 1 Byte unterstützt, welche das Maximum für die LZMA1\- und +LZMA2\-Datenstromformate ist. +.IP "" +Die \fIGröße\fP des Wörterbuchs und der Übereinstimmungsfinder (\fIÜf\fP) +bestimmen zusammen den Speicherverbrauch des LZMA1\- oder +LZMA2\-Kodierers. Bei der Dekompression ist ein Wörterbuch der gleichen +\fIGröße\fP (oder ein noch größeres) wie bei der Kompression erforderlich, +daher wird der Speicherverbrauch des Dekoders durch die Größe des bei der +Kompression verwendeten Wörterbuchs bestimmt. Die \fB.xz\fP\-Header speichern +die \fIGröße\fP des Wörterbuchs entweder als 2^\fIn\fP oder 2^\fIn\fP + 2^(\fIn\fP\-1), +so dass diese \fIGrößen\fP für die Kompression etwas bevorzugt werden. Andere +\fIGrößen\fP werden beim Speichern in den \fB.xz\fP\-Headern aufgerundet. +.TP +\fBlc=\fP\fIlc\fP +gibt die Anzahl der literalen Kontextbits an. Das Minimum ist 0 und das +Maximum 4; der Standardwert ist 3. Außerdem darf die Summe von \fIlc\fP und +\fIlp\fP nicht größer als 4 sein. +.IP "" +Alle Bytes, die nicht als Übereinstimmungen kodiert werden können, werden +als Literale kodiert. Solche Literale sind einfache 8\-bit\-Bytes, die jeweils +für sich kodiert werden. +.IP "" +Bei der Literalkodierung wird angenommen, dass die höchsten \fIlc\fP\-Bits des +zuvor unkomprimierten Bytes mit dem nächsten Byte in Beziehung stehen. Zum +Beispiel folgt in typischen englischsprachigen Texten auf einen +Großbuchstaben ein Kleinbuchstabe und auf einen Kleinbuchstaben +üblicherweise wieder ein Kleinbuchstabe. Im US\-ASCII\-Zeichensatz sind die +höchsten drei Bits 010 für Großbuchstaben und 011 für Kleinbuchstaben. Wenn +\fIlc\fP mindestens 3 ist, kann die literale Kodierung diese Eigenschaft der +unkomprimierten Daten ausnutzen. +.IP "" +Der Vorgabewert (3) ist üblicherweise gut. Wenn Sie die maximale Kompression +erreichen wollen, versuchen Sie \fBlc=4\fP. Manchmal hilft es ein wenig, doch +manchmal verschlechtert es die Kompression. Im letzteren Fall versuchen Sie +zum Beispiel auch\& \fBlc=2\fP. +.TP +\fBlp=\fP\fIlp\fP +gibt die Anzahl der literalen Positionsbits an. Das Minimum ist 0 und das +Maximum 4; die Vorgabe ist 0. +.IP "" +\fILp\fP beeinflusst, welche Art der Ausrichtung der unkomprimierten Daten beim +Kodieren von Literalen angenommen wird. Siehe \fIpb\fP weiter unten für weitere +Informationen zur Ausrichtung. +.TP +\fBpb=\fP\fIAnzahl\fP +legt die Anzahl der Positions\-Bits fest. Das Minimum ist 0 und das Maximum +4; Standard ist 2. +.IP "" +\fIPb\fP beeinflusst, welche Art der Ausrichtung der unkomprimierten Daten +generell angenommen wird. Standardmäßig wird eine Vier\-Byte\-Ausrichtung +angenommen (2^\fIpb\fP=2^2=4), was oft eine gute Wahl ist, wenn es keine +bessere Schätzung gibt. +.IP "" +Wenn die Ausrichtung bekannt ist, kann das entsprechende Setzen von \fIpb\fP +die Dateigröße ein wenig verringern. Wenn Textdateien zum Beispiel eine +Ein\-Byte\-Ausrichtung haben (US\-ASCII, ISO\-8859\-*, UTF\-8), kann das Setzen +von \fBpb=0\fP die Kompression etwas verbessern. Für UTF\-16\-Text ist \fBpb=1\fP +eine gute Wahl. Wenn die Ausrichtung eine ungerade Zahl wie beispielsweise 3 +Byte ist, könnte \fBpb=0\fP die beste Wahl sein. +.IP "" +Obwohl die angenommene Ausrichtung mit \fIpb\fP und \fIlp\fP angepasst werden +kann, bevorzugen LZMA1 und LZMA2 noch etwas die 16\-Byte\-Ausrichtung. Das +sollten Sie vielleicht beim Design von Dateiformaten berücksichtigen, die +wahrscheinlich oft mit LZMA1 oder LZMA2 komprimiert werden. +.TP +\fBmf=\fP\fIÜf\fP +Der Übereinstimmungsfinder hat einen großen Einfluss auf die Geschwindigkeit +des Kodierers, den Speicherbedarf und das +Kompressionsverhältnis. Üblicherweise sind auf Hash\-Ketten basierende +Übereinstimmungsfinder schneller als jene, die mit Binärbäumen arbeiten. Die +Vorgabe hängt von der \fIVoreinstellungsstufe\fP ab: 0 verwendet \fBhc3\fP, 1\-3 +verwenden \fBhc4\fP und der Rest verwendet \fBbt4\fP. +.IP "" +Die folgenden Übereinstimmungsfinder werden unterstützt. Die Formeln zur +Ermittlung des Speicherverbrauchs sind grobe Schätzungen, die der Realität +am nächsten kommen, wenn \fIWörterbuch\fP eine Zweierpotenz ist. +.RS +.TP +\fBhc3\fP +Hash\-Kette mit 2\- und 3\-Byte\-Hashing +.br +Minimalwert für \fInice\fP: 3 +.br +Speicherbedarf: +.br +\fIdict\fP * 7,5 (falls \fIdict\fP <= 16 MiB); +.br +\fIdict\fP * 5,5 + 64 MiB (falls \fIdict\fP > 16 MiB) +.TP +\fBhc4\fP +Hash\-Kette mit 2\-, 3\- und 4\-Byte\-Hashing +.br +Minimaler Wert für \fInice\fP: 4 +.br +Speicherbedarf: +.br +\fIdict\fP * 7,5 (falls \fIdict\fP <= 32 MiB ist); +.br +\fIdict\fP * 6,5 (falls \fIdict\fP > 32 MiB ist) +.TP +\fBbt2\fP +Binärbaum mit 2\-Byte\-Hashing +.br +Minimaler Wert für \fInice\fP: 2 +.br +Speicherverbrauch: \fIdict\fP * 9.5 +.TP +\fBbt3\fP +Binärbaum mit 2\- und 3\-Byte\-Hashing +.br +Minimalwert für \fInice\fP: 3 +.br +Speicherbedarf: +.br +\fIdict\fP * 11,5 (falls \fIdict\fP <= 16 MiB ist); +.br +\fIdict\fP * 9,5 + 64 MiB (falls \fIdict\fP > 16 MiB ist) +.TP +\fBbt4\fP +Binärbaum mit 2\-, 3\- und 4\-Byte\-Hashing +.br +Minimaler Wert für \fInice\fP: 4 +.br +Speicherbedarf: +.br +\fIdict\fP * 11,5 (falls \fIdict\fP <= 32 MiB ist); +.br +\fIdict\fP * 10,5 (falls \fIdict\fP > 32 MiB ist) +.RE +.TP +\fBmode=\fP\fIModus\fP +gibt die Methode zum Analysieren der vom Übereinstimmungsfinder gelieferten +Daten an. Als \fIModi\fP werden \fBfast\fP und \fBnormal\fP unterstützt. Die Vorgabe +ist \fBfast\fP für die \fIVoreinstellungsstufen\fP 0\-3 und \fBnormal\fP für die +\fIVoreinstellungsstufen\fP 4\-9. +.IP "" +Üblicherweise wird \fBfast\fP mit Hashketten\-basierten Übereinstimmungsfindern +und \fBnormal\fP mit Binärbaum\-basierten Übereinstimmungsfindern verwendet. So +machen es auch die \fIVoreinstellungsstufen\fP. +.TP +\fBnice=\fP\fInice\fP +gibt an, was als annehmbarer Wert für eine Übereinstimmung angesehen werden +kann. Wenn eine Übereinstimmung gefunden wird, die mindestens diesen +\fInice\fP\-Wert hat, sucht der Algorithmus nicht weiter nach besseren +Übereinstimmungen. +.IP "" +Der \fInice\fP\-Wert kann 2\-273 Byte sein. Höhere Werte tendieren zu einem +besseren Kompressionsverhältnis, aber auf Kosten der Geschwindigkeit. Die +Vorgabe hängt von der \fIVoreinstellungsstufe\fP ab. +.TP +\fBdepth=\fP\fITiefe\fP +legt die maximale Suchtiefe im Übereinstimmungsfinder fest. Vorgegeben ist +der spezielle Wert 0, der den Kompressor veranlasst, einen annehmbaren Wert +für \fITiefe\fP aus \fIÜf\fP und \fInice\fP\-Wert zu bestimmen. +.IP "" +Die angemessene \fITiefe\fP für Hash\-Ketten ist 4\-100 und 16\-1000 für +Binärbäume. Hohe Werte für die \fITiefe\fP können den Kodierer bei einigen +Dateien extrem verlangsamen. Vermeiden Sie es, die \fITiefe\fP über einen Wert +von 100 zu setzen, oder stellen Sie sich darauf ein, die Kompression +abzubrechen, wenn sie zu lange dauert. +.RE +.IP "" +Beim Dekodieren von Rohdatenströmen (\fB\-\-format=raw\fP) benötigt LZMA2 nur die +Wörterbuch\-\fIGröße\fP. LZMA1 benötigt außerdem \fIlc\fP, \fIlp\fP und \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIOptionen\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIOptionen\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIOptionen\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIOptionen\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIOptionen\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIOptionen\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIOptionen\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIOptionen\fP] +.PD +fügt ein »Branch/Call/Jump«\-(BCJ\-)Filter zur Filterkette hinzu. Diese Filter +können nicht als letzter Filter in der Filterkette verwendet werden. +.IP "" +Ein BCJ\-Filter wandelt relative Adressen im Maschinencode in deren absolute +Gegenstücke um. Die Datengröße wird dadurch nicht geändert, aber die +Redundanz erhöht, was LZMA2 dabei helfen kann, eine um 10 bis 15% kleinere +\&\fB.xz\fP\-Datei zu erstellen. Die BCJ\-Filter sind immer reversibel, daher +verursacht die Anwendung eines BCJ\-Filters auf den falschen Datentyp keinen +Datenverlust, wobei aber das Kompressionsverhältnis etwas schlechter werden +könnte. Die BCJ\-Filter sind sehr schnell und verbrauchen nur wenig mehr +Speicher. +.IP "" +Diese BCJ\-Filter haben bekannte Probleme mit dem Kompressionsverhältnis: +.RS +.IP \(bu 3 +In einigen Dateitypen, die ausführbaren Code enthalten (zum Beispiel +Objektdateien, statische Bibliotheken und Linux\-Kernelmodule), sind die +Adressen in den Anweisungen mit Füllwerten gefüllt. Diese BCJ\-Filter führen +dennoch die Adressumwandlung aus, wodurch die Kompression bei diesen Dateien +schlechter wird. +.IP \(bu 3 +Falls ein BCJ\-Filter auf ein Archiv angewendet wird, ist es möglich, dass +das Kompressionsverhältnis schlechter als ohne Filter wird. Falls es +beispielsweise ähnliche oder sogar identische ausführbare Dateien gibt, dann +werden diese durch die Filterung wahrscheinlich »unähnlicher« und +verschlechtern dadurch das Kompressionsverhältnis. Der Inhalt +nicht\-ausführbarer Dateien im gleichen Archiv kann sich ebenfalls darauf +auswirken. In der Praxis werden Sie durch Versuche mit oder ohne BCJ\-Filter +selbst herausfinden müssen, was situationsbezogen besser ist. +.RE +.IP "" +Verschiedene Befehlssätze haben unterschiedliche Ausrichtungen: Die +ausführbare Datei muss in den Eingabedateien einem Vielfachen dieses Wertes +entsprechen, damit dieser Filter funktioniert. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Filter;Ausrichtung;Hinweise +x86;1;32\-Bit oder 64\-Bit x86 +ARM;4; +ARM\-Thumb;2; +ARM64;4;4096\-Byte\-Ausrichtung ist optimal +PowerPC;4;Nur Big Endian +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Da die BCJ\-gefilterten Daten üblicherweise mit LZMA2 komprimiert sind, kann +das Kompressionsverhältnis dadurch etwas verbessert werden, dass die +LZMA2\-Optionen so gesetzt werden, dass sie der Ausrichtung des gewählten +BCJ\-Filters entsprechen. Beispiele: +.RS +.IP \(bu 3 +Der IA\-64\-Filter hat eine 16\-Byte\-Ausrichtung, daher ist \fBpb=4,lp=4,lc=0\fP +für LZMA2 passend (2^4=16). +.IP \(bu 3 +RISC\-V\-Code hat eine 2\-Byte\- oder 4\-Byte\-Ausrichtung, abhängig davon, ob die +Datei 16\-bit\-komprimierte Instruktionen enthält (die C\-Erweiterung). Wenn +16\-bit\-Instruktionen verwendet werden, ist \fBpb=2,lp=1,lc=3\fP oder +\fBpb=1,lp=1,lc=3\fP passend. Wenn keine 16\-bit\-Instruktionen vorhanden sind, +ist \fBpb=2,lp=2,lc=2\fP am besten. Mit \fBreadelf \-h\fP können Sie überprüfen, ob +»RVC« in der »Flags«\-Zeile auftritt. +.IP \(bu 3 +ARM64 hat stets eine 4\-Byte\-Ausrichtung, daher ist \fBpb=2,lp=2,lc=2\fP am +besten. +.IP \(bu 3 +Der x86\-Filter stellt eine Ausnahme dar. Es ist üblicherweise eine gute +Wahl, bei den Voreinstellungen von LZMA2 (\fBpb=2,lp=0,lc=3\fP) zu bleiben, +wenn Sie ausführbare x86\-Dateien komprimieren +.RE +.IP "" +Alle BCJ\-Filter unterstützen die gleichen \fIOptionen\fP: +.RS +.TP +\fBstart=\fP\fIVersatz\fP +gibt den Start\-\fIVersatz\fP an, der bei der Umwandlung zwischen relativen und +absoluten Adressen verwendet wird. Der \fIVersatz\fP muss ein Vielfaches der +Filterausrichtung sein (siehe die Tabelle oben). Der Standardwert ist 0. In +der Praxis ist dieser Standardwert gut; die Angabe eines benutzerdefinierten +\fIVersatzes\fP ist fast immer unnütz. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIOptionen\fP] +fügt den Delta\-Filter zur Filterkette hinzu. Der Delta\-Filter kann nicht als +letzter Filter in der Filterkette verwendet werden. +.IP "" +Gegenwärtig wird nur eine einfache, Byte\-bezogene Delta\-Berechnung +unterstützt. Beim Komprimieren von zum Beispiel unkomprimierten +Bitmap\-Bildern oder unkomprimierten PCM\-Audiodaten kann es jedoch sinnvoll +sein. Dennoch können für spezielle Zwecke entworfene Algorithmen deutlich +bessere Ergebnisse als Delta und LZMA2 liefern. Dies trifft insbesondere auf +Audiodaten zu, die sich zum Beispiel mit \fBflac\fP(1) schneller und besser +komprimieren lassen. +.IP "" +Unterstützte \fIOptionen\fP: +.RS +.TP +\fBdist=\fP\fIAbstand\fP +gibt den \fIAbstand\fP der Delta\-Berechnung in Byte an. Zulässige Werte für den +\fIAbstand\fP sind 1 bis 256. Der Vorgabewert ist 1. +.IP "" +Zum Beispiel wird mit \fBdist=2\fP und der 8\-Byte\-Eingabe A1 B1 A2 B3 A3 B5 A4 +B7 die Ausgabe A1 B1 01 02 01 02 01 02 sein. +.RE +. +.SS "Andere Optionen" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +unterdrückt Warnungen und Hinweise. Geben Sie dies zweimal an, um auch +Fehlermeldungen zu unterdrücken. Diese Option wirkt sich nicht auf den +Exit\-Status aus. Das bedeutet, das selbst bei einer unterdrückten Warnung +der Exit\-Status zur Anzeige einer Warnung dennoch verwendet wird. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +bewirkt ausführliche Ausgaben. Wenn die Standardfehlerausgabe mit einem +Terminal verbunden ist, zeigt \fBxz\fP den Fortschritt an. Durch zweimalige +Angabe von \fB\-\-verbose\fP wird die Ausgabe noch ausführlicher. +.IP "" +Der Fortschrittsanzeiger stellt die folgenden Informationen dar: +.RS +.IP \(bu 3 +Der Prozentsatz des Fortschritts wird angezeigt, wenn die Größe der +Eingabedatei bekannt ist. Das bedeutet, dass der Prozentsatz in +Weiterleitungen (Pipes) nicht angezeigt werden kann. +.IP \(bu 3 +Menge der erzeugten komprimierten Daten (bei der Kompression) oder der +verarbeiteten Daten (bei der Dekompression). +.IP \(bu 3 +Menge der verarbeiteten unkomprimierten Daten (bei der Kompression) oder der +erzeugten Daten (bei der Dekompression). +.IP \(bu 3 +Kompressionsverhältnis, das mittels Dividieren der Menge der bisher +komprimierten Daten durch die Menge der bisher verarbeiteten unkomprimierten +Daten ermittelt wird. +.IP \(bu 3 +Kompressions\- oder Dekompressionsgeschwindigkeit. Diese wird anhand der +Menge der unkomprimierten verarbeiteten Daten (bei der Kompression) oder der +Menge der erzeugten Daten (bei der Dekompression) pro Sekunde gemessen. Die +Anzeige startet einige Sekunden nachdem \fBxz\fP mit der Verarbeitung der Datei +begonnen hat. +.IP \(bu 3 +Die vergangene Zeit im Format M:SS oder H:MM:SS. +.IP \(bu 3 +Die geschätzte verbleibende Zeit wird nur angezeigt, wenn die Größe der +Eingabedatei bekannt ist und bereits einige Sekunden vergangen sind, nachdem +\fBxz\fP mit der Verarbeitung der Datei begonnen hat. Die Zeit wird in einem +weniger präzisen Format ohne Doppelpunkte angezeigt, zum Beispiel 2 min 30 +s. +.RE +.IP "" +Wenn die Standardfehlerausgabe kein Terminal ist, schreibt \fBxz\fP mit +\fB\-\-verbose\fP nach dem Komprimieren oder Dekomprimieren der Datei in einer +einzelnen Zeile den Dateinamen, die komprimierte Größe, die unkomprimierte +Größe, das Kompressionsverhältnis und eventuell auch die Geschwindigkeit und +die vergangene Zeit in die Standardfehlerausgabe. Die Geschwindigkeit und +die vergangene Zeit werden nur angezeigt, wenn der Vorgang mindestens ein +paar Sekunden gedauert hat. Wurde der Vorgang nicht beendet, zum Beispiel +weil ihn der Benutzer abgebrochen hat, wird außerdem der Prozentsatz des +erreichten Verarbeitungsfortschritts aufgenommen, sofern die Größe der +Eingabedatei bekannt ist. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +setzt den Exit\-Status nicht auf 2, selbst wenn eine Bedingung erfüllt ist, +die eine Warnung gerechtfertigt hätte. Diese Option wirkt sich nicht auf die +Ausführlichkeitsstufe aus, daher müssen sowohl \fB\-\-quiet\fP als auch +\fB\-\-no\-warn\fP angegeben werden, um einerseits keine Warnungen anzuzeigen und +andererseits auch den Exit\-Status nicht zu ändern. +.TP +\fB\-\-robot\fP +gibt Meldungen in einem maschinenlesbaren Format aus. Dadurch soll das +Schreiben von Frontends erleichtert werden, die \fBxz\fP anstelle von Liblzma +verwenden wollen, was in verschiedenen Skripten der Fall sein kann. Die +Ausgabe mit dieser aktivierten Option sollte über mehrere +\fBxz\fP\-Veröffentlichungen stabil sein. Details hierzu finden Sie im Abschnitt +\fBROBOTER\-MODUS\fP. +.TP +\fB\-\-info\-memory\fP +zeigt in einem menschenlesbaren Format an, wieviel physischen Speicher (RAM) +und wie viele Prozessor\-Threads das System nach Annahme von \fBxz\fP hat, sowie +die Speicherbedarfsbegrenzung für Kompression und Dekompression, und beendet +das Programm erfolgreich. +.TP +\fB\-h\fP, \fB\-\-help\fP +zeigt eine Hilfemeldung mit den am häufigsten genutzten Optionen an und +beendet das Programm erfolgreich. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +zeigt eine Hilfemeldung an, die alle Funktionsmerkmale von \fBxz\fP beschreibt +und beendet das Programm erfolgreich. +.TP +\fB\-V\fP, \fB\-\-version\fP +zeigt die Versionsnummer von \fBxz\fP und Liblzma in einem menschenlesbaren +Format an. Um eine maschinell auswertbare Ausgabe zu erhalten, geben Sie +\fB\-\-robot\fP vor \fB\-\-version\fP an. +. +.SH ROBOTER\-MODUS +Der Roboter\-Modus wird mit der Option \fB\-\-robot\fP aktiviert. Er bewirkt, dass +die Ausgabe von \fBxz\fP leichter von anderen Programmen ausgewertet werden +kann. Gegenwärtig wird \fB\-\-robot\fP nur zusammen mit \fB\-\-list\fP, +\fB\-\-filters\-help\fP, \fB\-\-info\-memory\fP und \fB\-\-version\fP unterstützt. In der +Zukunft wird dieser Modus auch für Kompression und Dekompression +unterstützt. +. +.SS Listenmodus +\fBxz \-\-robot \-\-list\fP verwendet eine durch Tabulatoren getrennte Ausgabe. In +der ersten Spalte jeder Zeile bezeichnet eine Zeichenkette den Typ der +Information, die in dieser Zeile enthalten ist: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +Dies ist stets die erste Zeile, wenn eine Datei aufgelistet wird. Die zweite +Spalte in der Zeile enthält den Dateinamen. +.TP +\fBfile\fP +Diese Zeile enthält allgemeine Informationen zur \fB.xz\fP\-Datei. Diese Zeile +wird stets nach der \fBname\fP\-Zeile ausgegeben. +.TP +\fBstream\fP +Dieser Zeilentyp wird nur verwendet, wenn \fB\-\-verbose\fP angegeben wurde. Es +gibt genau so viele \fBstream\fP\-Zeilen, wie Datenströme in der \fB.xz\fP\-Datei +enthalten sind. +.TP +\fBblock\fP +Dieser Zeilentyp wird nur verwendet, wenn \fB\-\-verbose\fP angegeben wurde. Es +gibt so viele \fBblock\fP\-Zeilen, wie Blöcke in der \fB.xz\fP\-Datei. Die +\fBblock\fP\-Zeilen werden nach allen \fBstream\fP\-Zeilen angezeigt; verschiedene +Zeilentypen werden nicht verschachtelt. +.TP +\fBsummary\fP +Dieser Zeilentyp wird nur verwendet, wenn \fB\-\-verbose\fP zwei Mal angegeben +wurde. Diese Zeile wird nach allen \fBblock\fP\-Zeilen ausgegeben. Wie die +\fBfile\fP\-Zeile enthält die \fBsummary\fP\-Zeile allgemeine Informationen zur +\&\fB.xz\fP\-Datei. +.TP +\fBtotals\fP +Diese Zeile ist immer die letzte der Listenausgabe. Sie zeigt die +Gesamtanzahlen und \-größen an. +.PP +Die Spalten der \fBfile\fP\-Zeilen: +.PD 0 +.RS +.IP 2. 4 +Anzahl der Datenströme in der Datei +.IP 3. 4 +Gesamtanzahl der Blöcke in den Datenströmen +.IP 4. 4 +Komprimierte Größe der Datei +.IP 5. 4 +Unkomprimierte Größe der Datei +.IP 6. 4 +Das Kompressionsverhältnis, zum Beispiel \fB0.123\fP. Wenn das Verhältnis über +9.999 liegt, werden drei Minuszeichen (\fB\-\-\-\fP) anstelle des +Kompressionsverhältnisses angezeigt. +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Durch Kommata getrennte Liste der Namen der Integritätsprüfungen. Für die +bekannten Überprüfungstypen werden folgende Zeichenketten verwendet: +\fBNone\fP, \fBCRC32\fP, \fBCRC64\fP und \fBSHA\-256\fP. \fBUnknown\-\fP\fIN\fP wird verwendet, +wobei \fIN\fP die Kennung der Überprüfung als Dezimalzahl angibt (ein\- oder +zweistellig). +.IP 8. 4 +Gesamtgröße der Datenstromauffüllung in der Datei +.RE +.PD +.PP +Die Spalten der \fBstream\fP\-Zeilen: +.PD 0 +.RS +.IP 2. 4 +Datenstromnummer (der erste Datenstrom ist 1) +.IP 3. 4 +Anzahl der Blöcke im Datenstrom +.IP 4. 4 +Komprimierte Startposition +.IP 5. 4 +Unkomprimierte Startposition +.IP 6. 4 +Komprimierte Größe (schließt die Datenstromauffüllung nicht mit ein) +.IP 7. 4 +Unkomprimierte Größe +.IP 8. 4 +Kompressionsverhältnis +.IP 9. 4 +Name der Integritätsprüfung +.IP 10. 4 +Größe der Datenstromauffüllung +.RE +.PD +.PP +Die Spalten der \fBblock\fP\-Zeilen: +.PD 0 +.RS +.IP 2. 4 +Anzahl der in diesem Block enthaltenen Datenströme +.IP 3. 4 +Blocknummer relativ zum Anfang des Datenstroms (der erste Block ist 1) +.IP 4. 4 +Blocknummer relativ zum Anfang der Datei +.IP 5. 4 +Komprimierter Startversatz relativ zum Beginn der Datei +.IP 6. 4 +Unkomprimierter Startversatz relativ zum Beginn der Datei +.IP 7. 4 +Komprimierte Gesamtgröße des Blocks (einschließlich Header) +.IP 8. 4 +Unkomprimierte Größe +.IP 9. 4 +Kompressionsverhältnis +.IP 10. 4 +Name der Integritätsprüfung +.RE +.PD +.PP +Wenn \fB\-\-verbose\fP zwei Mal angegeben wurde, werden zusätzliche Spalten in +die \fBblock\fP\-Zeilen eingefügt. Diese werden mit einem einfachen \fB\-\-verbose\fP +nicht angezeigt, da das Ermitteln dieser Informationen viele Suchvorgänge +erfordert und daher recht langsam sein kann: +.PD 0 +.RS +.IP 11. 4 +Wert der Integritätsprüfung in hexadezimaler Notation +.IP 12. 4 +Block\-Header\-Größe +.IP 13. 4 +Block\-Schalter: \fBc\fP gibt an, dass die komprimierte Größe verfügbar ist, und +\fBu\fP gibt an, dass die unkomprimierte Größe verfügbar ist. Falls der +Schalter nicht gesetzt ist, wird stattdessen ein Bindestrich (\fB\-\fP) +angezeigt, um die Länge der Zeichenkette beizubehalten. In Zukunft könnten +neue Schalter am Ende der Zeichenkette hinzugefügt werden. +.IP 14. 4 +Größe der tatsächlichen komprimierten Daten im Block. Ausgeschlossen sind +hierbei die Block\-Header, die Blockauffüllung und die Prüffelder. +.IP 15. 4 +Größe des Speichers (in Byte), der zum Dekomprimieren dieses Blocks mit +dieser \fBxz\fP\-Version benötigt wird. +.IP 16. 4 +Filterkette. Beachten Sie, dass die meisten der bei der Kompression +verwendeten Optionen nicht bekannt sein können, da in den \fB.xz\fP\-Headern nur +die für die Dekompression erforderlichen Optionen gespeichert sind. +.RE +.PD +.PP +Die Spalten der \fBsummary\fP\-Zeilen: +.PD 0 +.RS +.IP 2. 4 +Größe des Speichers (in Byte), der zum Dekomprimieren dieser Datei mit +dieser \fBxz\fP\-Version benötigt wird. +.IP 3. 4 +\fByes\fP oder \fBno\fP geben an, ob in allen Block\-Headern sowohl die +komprimierte als auch die unkomprimierte Größe gespeichert ist. +.PP +\fISeit\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Minimale \fBxz\fP\-Version, die zur Dekompression der Datei erforderlich ist +.RE +.PD +.PP +Die Spalten der \fBtotals\fP\-Zeile: +.PD 0 +.RS +.IP 2. 4 +Anzahl der Datenströme +.IP 3. 4 +Anzahl der Blöcke +.IP 4. 4 +Komprimierte Größe +.IP 5. 4 +Unkomprimierte Größe +.IP 6. 4 +Durchschnittliches Kompressionsverhältnis +.IP 7. 4 +Durch Kommata getrennte Liste der Namen der Integritätsprüfungen, die in den +Dateien präsent waren. +.IP 8. 4 +Größe der Datenstromauffüllung +.IP 9. 4 +Anzahl der Dateien. Dies dient dazu, die Reihenfolge der vorigen Spalten an +die in den \fBfile\fP\-Zeilen anzugleichen. +.PD +.RE +.PP +Wenn \fB\-\-verbose\fP zwei Mal angegeben wird, werden zusätzliche Spalten in die +\fBtotals\fP\-Zeile eingefügt: +.PD 0 +.RS +.IP 10. 4 +Maximale Größe des Speichers (in Byte), der zum Dekomprimieren der Dateien +mit dieser \fBxz\fP\-Version benötigt wird. +.IP 11. 4 +\fByes\fP oder \fBno\fP geben an, ob in allen Block\-Headern sowohl die +komprimierte als auch die unkomprimierte Größe gespeichert ist. +.PP +\fISeit\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Minimale \fBxz\fP\-Version, die zur Dekompression der Datei erforderlich ist +.RE +.PD +.PP +Zukünftige Versionen könnten neue Zeilentypen hinzufügen, weiterhin könnten +auch in den vorhandenen Zeilentypen weitere Spalten hinzugefügt werden, aber +die existierenden Spalten werden nicht geändert. +. +.SS Filterhilfe +\fBxz \-\-robot \-\-filters\-help\fP gibt die unterstützten Filter im folgenden +Format aus: +.PP +\fIFilter\fP\fB:\fP\fIOption\fP\fB=<\fP\fIWert\fP\fB>,\fP\fIOption\fP\fB=<\fP\fIWert\fP\fB>\fP +… +.TP +\fIFilter\fP +Name des Filters +.TP +\fIOption\fP +Name der filterspezifischen Option +.TP +\fIWert\fP +Der numerische \fIWert\fP erscheint als Bereich +\fB<\fP\fIMinimum\fP\fB\-\fP\fIMaximum\fP\fB>\fP. Die Auswahl des +Zeichenketten\-\fIWert\fPs wird in \fB< >\fP eingeschlossen und durch \fB|\fP +getrennt. +.PP +Jeder Filter wird in einer separaten Zeile ausgegeben. +. +.SS "Informationen zur Speicherbedarfsbegrenzung" +\fBxz \-\-robot \-\-info\-memory\fP gibt eine einzelne Zeile mit mehreren durch +Tabulatoren getrennten Spalten aus: +.IP 1. 4 +Gesamter physischer Speicher (RAM) in Byte. +.IP 2. 4 +Speicherbedarfsbegrenzung für die Kompression in Byte +(\fB\-\-memlimit\-compress\fP). Ein spezieller Wert von \fB0\fP bezeichnet die +Standardeinstellung, die im Einzelthread\-Modus bedeutet, dass keine +Begrenzung vorhanden ist. +.IP 3. 4 +Speicherbedarfsbegrenzung für die Dekompression in Byte +(\fB\-\-memlimit\-decompress\fP). Ein spezieller Wert von \fB0\fP bezeichnet die +Standardeinstellung, die im Einzelthread\-Modus bedeutet, dass keine +Begrenzung vorhanden ist. +.IP 4. 4 +Seit \fBxz\fP 5.3.4alpha: Die Speichernutzung für Multithread\-Dekompression in +Byte (\fB\-\-memlimit\-mt\-decompress\fP). Dies ist niemals \fB0\fP, da ein +systemspezifischer Vorgabewert (gezeigt in Spalte 5) verwendet wird, falls +keine Grenze ausdrücklich angegeben wurde. Dies ist außerdem niemals größer +als der Wert in in Spalte 3, selbst wenn mit \fB\-\-memlimit\-mt\-decompress\fP ein +größerer Wert angegeben wurde. +.IP 5. 4 +Seit \fBxz\fP 5.3.4alpha: Eine systemspezifisch vorgegebene Begrenzung des +Speicherverbrauchs, die zur Begrenzung der Anzahl der Threads beim +Komprimieren mit automatischer Anzahl der Threads (\fB\-\-threads=0\fP) und wenn +keine Speicherbedarfsbegrenzung angegeben wurde (\fB\-\-memlimit\-compress\fP) +verwendet wird. Dies wird auch als Standardwert für +\fB\-\-memlimit\-mt\-decompress\fP verwendet. +.IP 6. 4 +Seit \fBxz\fP 5.3.4alpha: Anzahl der verfügbaren Prozessorthreads. +.PP +In der Zukunft könnte die Ausgabe von \fBxz \-\-robot \-\-info\-memory\fP weitere +Spalten enthalten, aber niemals mehr als eine einzelne Zeile. +. +.SS Version +\fBxz \-\-robot \-\-version\fP gibt die Versionsnummern von \fBxz\fP und Liblzma im +folgenden Format aus: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Hauptversion. +.TP +\fIYYY\fP +Unterversion. Gerade Zahlen bezeichnen eine stabile Version. Ungerade Zahlen +bezeichnen Alpha\- oder Betaversionen. +.TP +\fIZZZ\fP +Patch\-Stufe für stabile Veröffentlichungen oder einfach nur ein Zähler für +Entwicklungsversionen. +.TP +\fIS\fP +Stabilität. 0 ist Alpha, 1 ist Beta und 2 ist stabil. \fIS\fP sollte immer 2 +sein, wenn \fIYYY\fP eine gerade Zahl ist. +.PP +\fIXYYYZZZS\fP sind in beiden Zeilen gleich, sofern \fBxz\fP und Liblzma aus der +gleichen Veröffentlichung der XZ\-Utils stammen. +.PP +Beispiele: 4.999.9beta ist \fB49990091\fP und 5.0.0 is \fB50000002\fP. +. +.SH EXIT\-STATUS +.TP +\fB0\fP +Alles ist in Ordnung. +.TP +\fB1\fP +Ein Fehler ist aufgetreten. +.TP +\fB2\fP +Es ist etwas passiert, das eine Warnung rechtfertigt, aber es sind keine +tatsächlichen Fehler aufgetreten. +.PP +In die Standardausgabe geschriebene Hinweise (keine Warnungen oder Fehler), +welche den Exit\-Status nicht beeinflussen. +. +.SH UMGEBUNGSVARIABLEN +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP wertet eine durch Leerzeichen getrennte Liste von Optionen in den +Umgebungsvariablen \fBXZ_DEFAULTS\fP und \fBXZ_OPT\fP aus (in dieser Reihenfolge), +bevor die Optionen aus der Befehlszeile ausgewertet werden. Beachten Sie, +dass beim Auswerten der Umgebungsvariablen nur Optionen berücksichtigt +werden; alle Einträge, die keine Optionen sind, werden stillschweigend +ignoriert. Die Auswertung erfolgt mit \fBgetopt_long\fP(3), welches auch für +die Befehlszeilenargumente verwendet wird. +.PP +\fBWarnung:\fP Durch Setzen dieser Umgebungsvariablen könnte man effektiv +Programme und Skripte modifizieren, die \fBxz\fP ausführen. Meist ist es +sicher, die Speichernutzungsbegrenzung und Kompressionsoptionen über die +Umgebungsvariablen zu setzen. Dennoch können einige Optionen Skripte +beeinflussen. Ein typisches Beispiel ist die Option \fB\-\-help\fP, die einen +Hilfetext anzeigt, anstatt eine Datei zu komprimieren oder zu +dekomprimieren. Weniger augenfällige Beispiele sind die Optionen \fB\-\-quiet\fP +und \fB\-\-verbose\fP. In vielen Fällen funktioniert es gut, den +Fortschrittsindikator mit \fB\-\-verbose\fP zu aktivieren, aber in einigen +Situationen können die zusätzlichen Meldungen Probleme verursachen. Die +Ausführlichkeitsstufe beeinflusst auch das Verhalten von \fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +Benutzerspezifische oder systemweite Standardoptionen. Typischerweise werden +diese in einem Shell\-Initialisierungsskript gesetzt, um die +Speicherbedarfsbegrenzung von \fBxz\fP standardmäßig zu aktivieren oder die +Anzahl der Threads festzulegen. Außer bei Shell\-Initialisierungsskripten und +in ähnlichen Spezialfällen sollte die Variable \fBXZ_DEFAULTS\fP in Skripten +niemals gesetzt oder außer Kraft gesetzt werden. +.TP +\fBXZ_OPT\fP +Dies dient der Übergabe von Optionen an \fBxz\fP, wenn es nicht möglich ist, +die Optionen direkt in der Befehlszeile von \fBxz\fP zu übergeben. Dies ist der +Fall, wenn \fBxz\fP von einem Skript oder Dienstprogramm ausgeführt wird, zum +Beispiel GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +Skripte können \fBXZ_OPT\fP zum Beispiel zum Setzen skriptspezifischer +Standard\-Kompressionsoptionen verwenden. Es ist weiterhin empfehlenswert, +Benutzern die Außerkraftsetzung von \fBXZ_OPT\fP zu erlauben, falls dies +angemessen ist. Zum Beispiel könnte in \fBsh\fP(1)\-Skripten Folgendes stehen: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "KOMPATIBILITÄT ZU DEN LZMA\-UTILS" +Die Befehlszeilensyntax von \fBxz\fP ist praktisch eine Obermenge der von +\fBlzma\fP, \fBunlzma\fP und \fBlzcat\fP in den LZMA\-Utils der Versionen 4.32.x. In +den meisten Fällen sollte es möglich sein, die LZMA\-Utils durch die XZ\-Utils +zu ersetzen, ohne vorhandene Skripte ändern zu müssen. Dennoch gibt es +einige Inkompatibilitäten, die manchmal Probleme verursachen können. +. +.SS "Voreinstellungsstufen zur Kompression" +Die Nummerierung der Voreinstellungsstufen der Kompression ist in \fBxz\fP und +den LZMA\-Utils unterschiedlich. Der wichtigste Unterschied ist die Zuweisung +der Wörterbuchgrößen zu den verschiedenen Voreinstellungsstufen. Die +Wörterbuchgröße ist etwa gleich dem Speicherbedarf bei der Dekompression. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Stufe;xz;LZMA\-Utils +\-0;256 KiB;nicht verfügbar +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +Die Unterschiede in der Wörterbuchgröße beeinflussen auch den Speicherbedarf +bei der Kompression, aber es gibt noch einige andere Unterschiede zwischen +den LZMA\-Utils und den XZ\-Utils, die die Kluft noch vergrößern: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Stufe;xz;LZMA\-Utils 4.32.x +\-0;3 MiB;nicht verfügbar +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +Die standardmäßige Voreinstellungsstufe in den LZMA\-Utils ist \fB\-7\fP, während +diese in den XZ\-Utils \fB\-6\fP ist, daher verwenden beide standardmäßig ein 8 +MiB großes Wörterbuch. +. +.SS "Vor\- und Nachteile von .lzma\-Dateien als Datenströme" +Die unkomprimierte Größe der Datei kann in den \fB.lzma\fP\-Headern gespeichert +werden. Die LZMA\-Utils tun das beim Komprimieren gewöhnlicher Dateien. Als +Alternative kann die unkomprimierte Größe als unbekannt markiert und eine +Nutzdatenende\-Markierung (end\-of\-payload) verwendet werden, um anzugeben, wo +der Dekompressor stoppen soll. Die LZMA\-Utils verwenden diese Methode, wenn +die unkomprimierte Größe unbekannt ist, was beispielsweise in Pipes +(Befehlsverkettungen) der Fall ist. +.PP +\fBxz\fP unterstützt die Dekompression von \fB.lzma\fP\-Dateien mit oder ohne +Nutzdatenende\-Markierung, aber alle von \fBxz\fP erstellten \fB.lzma\fP\-Dateien +verwenden diesen Nutzdatenende\-Markierung, wobei die unkomprimierte Größe in +den \fB.lzma\fP\-Headern als unbekannt markiert wird. Das könnte in einigen +unüblichen Situationen ein Problem sein. Zum Beispiel könnte ein +\&\fB.lzma\fP\-Dekompressor in einem Gerät mit eingebettetem System nur mit +Dateien funktionieren, deren unkomprimierte Größe bekannt ist. Falls Sie auf +dieses Problem stoßen, müssen Sie die LZMA\-Utils oder das LZMA\-SDK +verwenden, um \fB.lzma\fP\-Dateien mit bekannter unkomprimierter Größe zu +erzeugen. +. +.SS "Nicht unterstützte .lzma\-Dateien" +Das \fB.lzma\fP\-Format erlaubt \fIlc\fP\-Werte bis zu 8 und \fIlp\fP\-Werte bis zu +4. Die LZMA\-Utils können Dateien mit beliebigem \fIlc\fP und \fIlp\fP +dekomprimieren, aber erzeugen immer Dateien mit \fBlc=3\fP und \fBlp=0\fP. Das +Erzeugen von Dateien mit anderem \fIlc\fP und \fIlp\fP ist mit \fBxz\fP und mit dem +LZMA\-SDK möglich. +.PP +Die Implementation des LZMA\-Filters in liblzma setzt voraus, dass die Summe +von \fIlc\fP und \fIlp\fP nicht größer als 4 ist. Daher können \fB.lzma\fP\-Dateien, +welche diese Begrenzung überschreiten, mit \fBxz\fP nicht dekomprimiert werden. +.PP +Die LZMA\-Utils erzeugen nur \fB.lzma\fP\-Dateien mit einer Wörterbuchgröße von +2^\fIn\fP (einer Zweierpotenz), aber akzeptieren Dateien mit einer beliebigen +Wörterbuchgröße. Liblzma akzeptiert nur \fB.lzma\fP\-Dateien mit einer +Wörterbuchgröße von 2^\fIn\fP oder 2^\fIn\fP + 2^(\fIn\fP\-1). Dies dient zum +Verringern von Fehlalarmen beim Erkennen von \fB.lzma\fP\-Dateien. +.PP +Diese Einschränkungen sollten in der Praxis kein Problem sein, da praktisch +alle \fB.lzma\fP\-Dateien mit Einstellungen komprimiert wurden, die Liblzma +akzeptieren wird. +. +.SS "Angehängter Datenmüll" +Bei der Dekompression ignorieren die LZMA\-Utils stillschweigend alles nach +dem ersten \fB.lzma\fP\-Datenstrom. In den meisten Situationen ist das ein +Fehler. Das bedeutet auch, dass die LZMA\-Utils die Dekompression verketteter +\&\fB.lzma\fP\-Dateien nicht unterstützen. +.PP +Wenn nach dem ersten \fB.lzma\fP\-Datenstrom Daten verbleiben, erachtet \fBxz\fP +die Datei als beschädigt, es sei denn, die Option \fB\-\-single\-stream\fP wurde +verwendet. Dies könnte die Ausführung von Skripten beeinflussen, die davon +ausgehen, dass angehängter Datenmüll ignoriert wird. +. +.SH ANMERKUNGEN +. +.SS "Die komprimierte Ausgabe kann variieren" +Die exakte komprimierte Ausgabe, die aus der gleichen unkomprimierten +Eingabedatei erzeugt wird, kann zwischen den Versionen der XZ\-Utils +unterschiedlich sein, selbst wenn die Kompressionsoptionen identisch +sind. Das kommt daher, weil der Kodierer verbessert worden sein könnte +(hinsichtlich schnellerer oder besserer Kompression), ohne das Dateiformat +zu beeinflussen. Die Ausgabe kann sogar zwischen verschiedenen Programmen +der gleichen Version der XZ\-Utils variieren, wenn bei der Erstellung des +Binärprogramms unterschiedliche Optionen verwendet wurden. +.PP +Sobald \fB\-\-rsyncable\fP implementiert wurde, bedeutet das, dass die sich +ergebenden Dateien nicht notwendigerweise mit Rsync abgeglichen werden +können, außer wenn die alte und neue Datei mit der gleichen \fBxz\fP\-Version +erzeugt wurden. Das Problem kann beseitigt werden, wenn ein Teil der +Encoder\-Implementierung eingefroren wird, um die mit Rsync abgleichbare +Ausgabe über \fBxz\fP\-Versionsgrenzen hinweg stabil zu halten. +. +.SS "Eingebettete .xz\-Dekompressoren" +Eingebettete \fB.xz\fP\-Dekompressor\-Implementierungen wie XZ Embedded +unterstützen nicht unbedingt Dateien, die mit anderen Integritätsprüfungen +(\fIPrüfung\fP\-Typen) als \fBnone\fP und \fBcrc32\fP erzeugt wurden. Da +\fB\-\-check=crc64\fP die Voreinstellung ist, müssen Sie \fB\-\-check=none\fP oder +\fB\-\-check=crc32\fP verwenden, wenn Sie Dateien für eingebettete Systeme +erstellen. +.PP +Außerhalb eingebetteter Systeme unterstützen die Dekompressoren des +\&\fB.xz\fP\-Formats alle \fIPrüfung\fP\-Typen oder sind mindestens in der Lage, die +Datei zu dekomprimieren, ohne deren Integrität zu prüfen, wenn die bestimmte +\fIPrüfung\fP nicht verfügbar ist. +.PP +XZ Embedded unterstützt BCJ\-Filter, aber nur mit dem vorgegebenen +Startversatz. +. +.SH BEISPIELE +. +.SS Grundlagen +Komprimiert die Datei \fIfoo\fP mit der Standard\-Kompressionsstufe (\fB\-6\fP) zu +\fIfoo.xz\fP und entfernt \fIfoo\fP nach erfolgreicher Kompression: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +\fIbar.xz\fP in \fIbar\fP dekomprimieren und \fIbar.xz\fP selbst dann nicht löschen, +wenn die Dekompression erfolgreich war: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +\fIbaz.tar.xz\fP mit der Voreinstellung \fB\-4e\fP (\fB\-4 \-\-extreme\fP) erzeugen, was +langsamer ist als die Vorgabe \fB\-6\fP, aber weniger Speicher für Kompression +und Dekompression benötigt (48\ MiB beziehungsweise 5\ MiB): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +Eine Mischung aus komprimierten und unkomprimierten Dateien kann mit einem +einzelnen Befehl dekomprimiert in die Standardausgabe geschrieben werden: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Parallele Kompression von vielen Dateien" +Auf GNU\- und *BSD\-Systemen können \fBfind\fP(1) und \fBxargs\fP(1) zum +Parallelisieren der Kompression vieler Dateien verwendet werden: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +Die Option \fB\-P\fP von \fBxargs\fP(1) legt die Anzahl der parallelen +\fBxz\fP\-Prozesse fest. Der beste Wert für die Option \fB\-n\fP hängt davon ab, wie +viele Dateien komprimiert werden sollen. Wenn es sich nur um wenige Dateien +handelt, sollte der Wert wahrscheinlich 1 sein; bei Zehntausenden von +Dateien kann 100 oder noch mehr angemessener sein, um die Anzahl der +\fBxz\fP\-Prozesse zu beschränken, die \fBxargs\fP(1) schließlich erzeugen wird. +.PP +Die Option \fB\-T1\fP für \fBxz\fP dient dazu, den Einzelthread\-Modus zu erzwingen, +da \fBxargs\fP(1) zur Steuerung des Umfangs der Parallelisierung verwendet +wird. +. +.SS Roboter\-Modus +Berechnen, wie viel Byte nach der Kompression mehrerer Dateien insgesamt +eingespart wurden: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Ein Skript könnte abfragen wollen, ob es ein \fBxz\fP verwendet, das aktuell +genug ist. Das folgende \fBsh\fP(1)\-Skript prüft, ob die Versionsnummer des +Dienstprogramms \fBxz\fP mindestens 5.0.0 ist. Diese Methode ist zu alten +Beta\-Versionen kompatibel, welche die Option \fB\-\-robot\fP nicht unterstützen: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Ihre Version von Xz ist zu alt." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Eine Speicherbedarfsbegrenzung für die Dekompression mit \fBXZ_OPT\fP setzen, +aber eine bereits gesetzte Begrenzung nicht erhöhen: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Benutzerdefinierte Filterketten für die Kompression" +Der einfachste Anwendungsfall für benutzerdefinierte Filterketten ist die +Anpassung von LZMA2\-Voreinstellungsstufen. Das kann nützlich sein, weil die +Voreinstellungen nur einen Teil der potenziell sinnvollen Kombinationen aus +Kompressionseinstellungen abdecken. +.PP +Die KompCPU\-Spalten der Tabellen aus den Beschreibungen der Optionen \fB\-0\fP … +\fB\-9\fP und \fB\-\-extreme\fP sind beim Anpassen der LZMA2\-Voreinstellungen +nützlich. Diese sind die relevanten Teile aus diesen zwei Tabellen: +.RS +.PP +.TS +tab(;); +c c +n n. +Voreinst.;KomprCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +Wenn Sie wissen, dass eine Datei für eine gute Kompression ein etwas +größeres Wörterbuch benötigt (zum Beispiel 32 MiB), aber Sie sie schneller +komprimieren wollen, als dies mit \fBxz \-8\fP geschehen würde, kann eine +Voreinstellung mit einem niedrigen KompCPU\-Wert (zum Beispiel 1) dahingehend +angepasst werden, ein größeres Wörterbuch zu verwenden: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +Mit bestimmten Dateien kann der obige Befehl schneller sein als \fBxz \-6\fP, +wobei die Kompression deutlich besser wird. Dennoch muss betont werden, dass +nur wenige Dateien von einem größeren Wörterbuch profitieren, wenn der +KompCPU\-Wert niedrig bleibt. Der offensichtlichste Fall, in dem ein größeres +Wörterbuch sehr hilfreich sein kann, ist ein Archiv, das einander sehr +ähnliche Dateien enthält, die jeweils wenigstens einige Megabyte groß +sind. Das Wörterbuch muss dann deutlich größer sein als die einzelne Datei, +damit LZMA2 den größtmöglichen Vorteil aus den Ähnlichkeiten der aufeinander +folgenden Dateien zieht. +.PP +Wenn hoher Speicherbedarf für Kompression und Dekompression kein Problem ist +und die zu komprimierende Datei mindestens einige Hundert Megabyte groß ist, +kann es sinnvoll sein, ein noch größeres Wörterbuch zu verwenden, als die 64 +MiB, die mit \fBxz \-9\fP verwendet werden würden: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +Die Verwendung von \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP) wie im obigen Beispiel +kann nützlich sein, um den Speicherbedarf für Kompressor und Dekompressor zu +sehen. Denken Sie daran, dass ein Wörterbuch, das größer als die +unkomprimierte Datei ist, Speicherverschwendung wäre. Daher ist der obige +Befehl für kleine Dateien nicht sinnvoll. +.PP +Manchmal spielt die Kompressionszeit keine Rolle, aber der Speicherbedarf +bei der Dekompression muss gering gehalten werden, zum Beispiel um die Datei +auf eingebetteten Systemen dekomprimieren zu können. Der folgende Befehl +verwendet \fB\-6e\fP (\fB\-6 \-\-extreme\fP) als Basis und setzt die Wörterbuchgröße +auf nur 64\ KiB. Die sich ergebende Datei kann mit XZ Embedded (aus diesem +Grund ist dort \fB\-\-check=crc32\fP) mit nur etwa 100\ KiB Speicher +dekomprimiert werden. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +Wenn Sie so viele Byte wie möglich herausquetschen wollen, kann die +Anpassung der Anzahl der literalen Kontextbits (\fIlc\fP) und der Anzahl der +Positionsbits (\fIpb\fP) manchmal hilfreich sein. Auch die Anpassung der Anzahl +der literalen Positionsbits (\fIlp\fP) könnte helfen, aber üblicherweise sind +\fIlc\fP und \fIpb\fP wichtiger. Wenn ein Quellcode\-Archiv zum Beispiel +hauptsächlich ASCII\-Text enthält, könnte ein Aufruf wie der folgende eine +etwas kleinere Datei (etwa 0,1\ %) ergeben als mit \fBxz \-6e\fP (versuchen Sie +es auch \fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +Die Verwendung eines anderen Filters mit LZMA2 kann die Kompression bei +verschiedenen Dateitypen verbessern. So könnten Sie eine gemeinsam genutzte +Bibliothek der Architekturen x86\-32 oder x86\-64 mit dem BCJ\-Filter für x86 +komprimieren: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +Beachten Sie, dass die Reihenfolge der Filteroptionen von Bedeutung +ist. Falls \fB\-\-x86\fP nach \fB\-\-lzma2\fP angegeben wird, gibt \fBxz\fP einen Fehler +aus, weil nach LZMA2 kein weiterer Filter sein darf und auch weil der +BCJ\-Filter für x86 nicht als letzter Filter in der Filterkette gesetzt +werden darf. +.PP +Der Delta\-Filter zusammen mit LZMA2 kann bei Bitmap\-Bildern gute Ergebnisse +liefern. Er sollte üblicherweise besser sein als PNG, welches zwar einige +fortgeschrittene Filter als ein simples delta bietet, aber für die +eigentliche Kompression »Deflate« verwendet. +.PP +Das Bild muss in einem unkomprimierten Format gespeichert werden, zum +Beispiel als unkomprimiertes TIFF. Der Abstandsparameter des Delta\-Filters +muss so gesetzt werden, dass er der Anzahl der Bytes pro Pixel im Bild +entspricht. Zum Beispiel erfordert ein 24\-Bit\-RGB\-Bitmap \fBdist=3\fP, außerdem +ist es gut, \fBpb=0\fP an LZMA2 zu übergeben, um die 3\-Byte\-Ausrichtung zu +berücksichtigen: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +Wenn sich mehrere Bilder in einem einzelnen Archiv befinden (zum Beispiel\& +\&\fB.tar\fP), funktioniert der Delta\-Filter damit auch, sofern alle Bilder im +Archiv die gleiche Anzahl Bytes pro Pixel haben. +. +.SH "SIEHE AUCH" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA\-SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/de/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/de/xzdec.1 new file mode 100644 index 0000000000..e2812d1812 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/de/xzdec.1 @@ -0,0 +1,88 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" German translation for xz-man. +.\" Mario Blättermann , 2015, 2019-2020, 2022-2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 "8. August 2024" Tukaani XZ\-Dienstprogramme +.SH BEZEICHNUNG +xzdec, lzmadec \- Kleine Dekompressoren für .xz und .lzma +.SH ÜBERSICHT +\fBxzdec\fP [\fIOption…\fP] [\fIDatei…\fP] +.br +\fBlzmadec\fP [\fIOption…\fP] [\fIDatei…\fP] +.SH BESCHREIBUNG +\fBxzdec\fP ist ein auf Liblzma basierendes Nur\-Dekompressionswerkzeug für +\&\fB.xz\fP\-Dateien (und \fBnur\fP für \fB.xz\fP\-Dateien). \fBxzdec\fP ist als direkter +Ersatz für \fBxz\fP(1) in jenen Situationen konzipiert, wo ein Skript \fBxz \-\-decompress \-\-stdout\fP (und eventuelle einige andere höufig genutzte +Optionen) zum Dekomprimieren von \fB.xz\fP\-Dateien. \fBlzmadec\fP ist weitgehend +identisch zu \fBxzdec\fP, mit der Ausnahme, dass \fBlzmadec\fP \fB.lzma\fP\-Dateien +anstelle von \fB.xz\fP\-Dateien unterstützt. +.PP +Um die Größe der ausführbaren Datei zu reduzieren, unterstützt \fBxzdec\fP +weder Multithreading noch Lokalisierung. Außerdem liest es keine Optionen +aus den Umgebungsvariablen \fBXZ_DEFAULTS\fP und \fBXZ_OPT\fP. \fBxzdec\fP +unterstützt keine zwischenzeitlichen Fortschrittsinformationen: Das Senden +von \fBSIGINFO\fP an \fBxzdec\fP hat keine Auswirkungen, jedoch beendet \fBSIGUSR1\fP +den Prozess, anstatt Fortschrittsinformationen anzuzeigen. +.SH OPTIONEN +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +ist zwecks Kompatibilität zu \fBxz\fP(1) vorhanden; wird ignoriert. \fBxzdec\fP +unterstützt nur Dekompression. +.TP +\fB\-k\fP, \fB\-\-keep\fP +ist zwecks Kompatibilität zu \fBxz\fP(1) vorhanden; wird ignoriert. \fBxzdec\fP +erzeugt oder entfernt niemals Dateien. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +ist zwecks Kompatibilität zu \fBxz\fP(1) vorhanden; wird ignoriert. \fBxzdec\fP +schreibt die dekomprimierten Daten immer in die Standardausgabe. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +hat bei einmaliger Angabe keine Wirkung, da \fBxzdec\fP niemals Warnungen oder +sonstige Meldungen anzeigt. Wenn Sie dies zweimal angeben, werden +Fehlermeldungen unterdrückt. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +ist zwecks Kompatibilität zu \fBxz\fP(1) vorhanden; wird ignoriert. \fBxzdec\fP +verwendet niemals den Exit\-Status 2. +.TP +\fB\-h\fP, \fB\-\-help\fP +zeigt eine Hilfemeldung an und beendet das Programm erfolgreich. +.TP +\fB\-V\fP, \fB\-\-version\fP +zeigt die Versionsnummer von \fBxzdec\fP und liblzma an. +.SH EXIT\-STATUS +.TP +\fB0\fP +Alles ist in Ordnung. +.TP +\fB1\fP +Ein Fehler ist aufgetreten. +.PP +\fBxzdec\fP gibt keine Warnmeldungen wie \fBxz\fP(1) aus, daher wird der +Exit\-Status 2 von \fBxzdec\fP nicht verwendet. +.SH ANMERKUNGEN +Verwenden Sie \fBxz\fP(1) anstelle von \fBxzdec\fP oder \fBlzmadec\fP im normalen +täglichen Gebrauch. \fBxzdec\fP oder \fBlzmadec\fP sind nur für Situationen +gedacht, in denen ein kleinerer Dekompressor statt des voll ausgestatteten +\fBxz\fP(1) wichtig ist. +.PP +\fBxzdec\fP und \fBlzmadec\fP sind nicht wirklich extrem klein. Die Größe kann +durch Deaktivieren von Funktionen bei der Kompilierung von Liblzma weiter +verringert werden, aber das sollte nicht für ausführbare Dateien getan +werden, die in typischen Betriebssystemen ausgeliefert werden, außer in den +Distributionen für eingebettete Systeme. Wenn Sie einen wirklich winzigen +Dekompressor für \fB.xz\fP\-Dateien brauchen, sollten Sie stattdessen XZ +Embedded in Erwägung ziehen. +.SH "SIEHE AUCH" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/de/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/de/xzdiff.1 new file mode 100644 index 0000000000..2e87925373 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/de/xzdiff.1 @@ -0,0 +1,59 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" German translation for xz-man. +.\" Mario Blättermann , 2015, 2019-2020, 2022-2025. +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 "6. März 2025" Tukaani XZ\-Dienstprogramme +.SH BEZEICHNUNG +xzcmp, xzdiff, lzcmp, lzdiff \- komprimierte Dateien vergleichen +. +.SH ÜBERSICHT +\fBxzcmp\fP [\fIOption …\fP] \fIDatei1\fP [\fIDatei2\fP] +.br +\fBxzdiff\fP \&… +.br +\fBlzcmp\fP \&… (VERALTET) +.br +\fBlzdiff\fP \&… (VERALTET) +. +.SH BESCHREIBUNG +\fBxzcmp\fP und \fBxzdiff\fP vergleichen den unkomprimierten Inhalt zweier +Dateien. Die unkomprimierten Daten und Optionen werden an \fBcmp\fP(1) oder +\fBdiff\fP(1) übergeben, sofern weder \fB\-\-help\fP noch \fB\-\-version\fP angegeben +wird. +.PP +Wenn sowohl \fIDatei1\fP als auch \fIDatei2\fP angegeben sind, können diese +unkomprimierte Dateien oder Dateien in Formaten sein, die \fBxz\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) oder \fBlz4\fP(1) +dekomprimieren können. Die erforderlichen Dekomprimierungsbefehle werden aus +den Dateiendungen von \fIDatei1\fP und \fIDatei2\fP abgeleitet. Für eine Datei mit +einer unbekannten Endung wird angenommen, dass sie entweder unkomprimiert +ist oder von \fBxz\fP(1) dekomprimiert werden kann. +.PP +Falls nur ein Dateiname angegeben wird, muss \fIDatei1\fP eine Endung eines +unterstützten Kompressionsformat haben und der Name von \fIDatei2\fP wird aus +\fIDatei1\fP abgeleitet, indem die Endung des Kompressionsformats entfernt +wird. +.PP +Die Befehle \fBlzcmp\fP und \fBlzdiff\fP dienen der Abwärtskompatibilität zu den +LZMA\-Dienstprogrammen. Sie werden als veraltet angesehen und werden in einer +zukünftigen Version entfernt. +. +.SH EXIT\-STATUS +Falls ein Dekompressionsfehler auftritt, ist der Exit\-Status +\fB2\fP. Anderenfalls wird der Exit\-Status von \fBcmp\fP(1) oder \fBdiff\fP(1) +verwendet. +. +.SH "SIEHE AUCH" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/de/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/de/xzgrep.1 new file mode 100644 index 0000000000..5b3f061764 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/de/xzgrep.1 @@ -0,0 +1,97 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" German translation for xz-man. +.\" Mario Blättermann , 2015, 2019-2020, 2022-2025. +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 "6. März 2025" Tukaani XZ\-Dienstprogramme +.SH BEZEICHNUNG +xzgrep \- möglicherweise komprimierte Dateien nach Mustern durchsuchen +. +.SH ÜBERSICHT +\fBxzgrep\fP [\fIOption …\fP] [\fIMusterliste\fP] [\fIDatei …\fP] +.br +\fBxzegrep\fP … +.br +\fBxzfgrep\fP … +.br +\fBlzgrep\fP \&… (VERALTET) +.br +\fBlzegrep\fP \&… (VERALTET) +.br +\fBlzfgrep\fP \&… (VERALTET) +. +.SH BESCHREIBUNG +\fBxzgrep\fP ruft \fBgrep\fP(1) mit dem unkomprimierten Inhalt von Dateien +auf. Die Formate der \fIDateien\fP werden aus den Dateiendungen +abgeleitet. Jede \fIDatei\fP mit einer Endung, die von \fBxz\fP(1), \fBgzip\fP(1), +\fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) oder \fBlz4\fP(1) unterstützt wird, wird +dekomprimiert; für andere Dateien wird angenommen, dass sie bereits in +unkomprimierter Form vorliegen. +.PP +Wenn keine \fIDateien\fP angegeben werden oder \fIDatei\fP als \fB\-\fP angegeben +wird, wird aus der Standardeingabe gelesen. Beim Lesen aus der +Standardeingabe werden nur die von \fBxz\fP(1) unterstützten Dateien +dekomprimiert. Für andere Dateien wird angenommen, dass sie bereits in +unkomprimierter Form vorliegen. +.PP +Die meisten \fIOptionen\fP von \fBgrep\fP(1) werden unterstützt, die folgenden +jedoch nicht: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIAktion\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIGlob\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIGlob\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIDatei\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIGlob\fP +.PP +\fBxzegrep\fP ist ein Alias für \fBxzgrep \-E\fP. \fBxzfgrep\fP ist ein Alias für +\fBxzgrep \-F\fP. +.PP +Die Befehle \fBlzgrep\fP, \fBlzegrep\fP und \fBlzfgrep\fP dienen der +Abwärtskompatibilität zu den LZMA\-Dienstprogrammen. Sie werden als veraltet +angesehen und werden in einer zukünftigen Version entfernt. +. +.SH EXIT\-STATUS +.TP +0 +In mindestens einer der Eingabedateien wurde mindestens ein Treffer +gefunden. Es sind keine Fehler aufgetreten. +.TP +1 +In keiner der Eingabedateien wurde ein Treffer gefunden. Es sind keine +Fehler aufgetreten. +.TP +>1 +Ein oder mehrere Fehler sind aufgetreten. Es ist unbekannt, ob Treffer +gefunden wurden. +. +.SH UMGEBUNGSVARIABLEN +.TP +\fBGREP\fP +Wenn die Umgebungsvariable \fBGREP\fP auf einen nicht\-leeren Wert gesetzt ist, +wird diese anstelle von \fBgrep\fP(1), \fBgrep \-E\fP oder \fBgrep \-F\fP verwendet. +. +.SH "SIEHE AUCH" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/de/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/de/xzless.1 new file mode 100644 index 0000000000..5dbd5fc077 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/de/xzless.1 @@ -0,0 +1,50 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" German translation for xz-man. +.\" Mario Blättermann , 2015, 2019-2020, 2022-2025. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 "6. März 2025" Tukaani XZ\-Dienstprogramme +.SH BEZEICHNUNG +xzless, lzless \- mit xz oder lzma komprimierte (Text\-)Dateien betrachten +.SH ÜBERSICHT +\fBxzless\fP [\fIDatei\fP …] +.br +\fBlzless\fP [\fIDatei\fP …] (VERALTET) +.SH BESCHREIBUNG +\fBxzless\fP ist ein Filter, der Text aus komprimierten Dateien in einem +Terminal anzeigt. Von \fBxz\fP(1) unterstützte Dateien werden dekomprimiert; +für andere Dateien wird angenommen, dass sie bereits in unkomprimierter Form +vorliegen. Wenn keine \fIDateien\fP angegeben werden, liest \fBxzless\fP aus der +Standardeingabe. +.PP +\fBxzless\fP verwendet \fBless\fP(1) zur Darstellung der Ausgabe. Im Gegensatz zu +\fBxzmore\fP können Sie das zu verwendende Textanzeigeprogramm nicht durch +Setzen einer Umgebungsvariable ändern. Die Befehle basieren auf \fBmore\fP(1) +und \fBvi\fP(1) und ermöglichen Vorwärts\- und Rückwärtssprünge sowie +Suchvorgänge. In der Handbuchseite zu \fBless\fP(1) finden Sie weitere +Informationen. +.PP +Der Befehl \fBlzless\fP dient der Abwärtskompatibilität zu den +LZMA\-Dienstprogrammen. Er wird als veraltet angesehen und wird in einer +zukünftigen Version entfernt. +.SH UMGEBUNGSVARIABLEN +.TP +\fBLESSMETACHARS\fP +Dies enthält eine Zeichenliste mit Bezug zur Shell. Wenn diese Variable +nicht bereits gesetzt ist, wird sie durch \fBxzless\fP gesetzt. +.TP +\fBLESSOPEN\fP +Dies ist auf die Befehlszeile zum Aufruf von \fBxz\fP(1) gesetzt, die zur +Vorverarbeitung der Eingabedateien für \fBless\fP(1) nötig ist. +.SH "SIEHE AUCH" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/de/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/de/xzmore.1 new file mode 100644 index 0000000000..91b850d837 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/de/xzmore.1 @@ -0,0 +1,52 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" German translation for xz-man. +.\" Mario Blättermann , 2015, 2019-2020, 2022-2025. +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 "6. März 2025" Tukaani XZ\-Dienstprogramme +.SH BEZEICHNUNG +xzmore, lzmore \- mit xz oder lzma komprimierte (Text\-)Dateien lesen +. +.SH ÜBERSICHT +\fBxzmore\fP [\fIDatei\fP …] +.br +\fBlzmore\fP [\fIDatei\fP …] (VERALTET) +. +.SH BESCHREIBUNG +\fBxzmore\fP zeigt Text aus komprimierten Dateien mit Hilfe des Pagers +(Textanzeigeprogramms) \fBmore\fP(1) in einem Terminal an. Von \fBxz\fP(1) +unterstützte Dateien werden dekomprimiert; für andere Dateien wird +angenommen, dass sie bereits in unkomprimierter Form vorliegen. Wenn keine +\fIDateien\fP angegeben werden, liest \fBxzmore\fP aus der Standardeingabe. Im +\fBmore\fP(1)\-Handbuch finden Sie Informationen zu den Tastaturbefehlen. +.PP +Beachten Sie, dass Zurückrollen nicht möglich sein könnte, abhängig von der +Implementierung von \fBmore\fP(1). Das kommt daher, dass \fBxzmore\fP eine Pipe +verwendet, um die dekomprimierten Daten an \fBmore\fP(1) zu +übergeben. \fBxzless\fP(1) verwendet \fBless\fP(1), welches fortgeschrittenere +Funktionen bietet. +.PP +Der Befehl \fBlzmore\fP dient der Abwärtskompatibilität zu den +LZMA\-Dienstprogrammen. Er wird als veraltet angesehen und wird in einer +zukünftigen Version entfernt. +. +.SH UMGEBUNGSVARIABLEN +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +Falls die Umgebungsvariable \fBPAGER\fP gesetzt ist, wird deren Wert als Pager +(Textanzeigeprogramm) anstelle von \fBmore\fP(1) verwendet. +. +.SH "SIEHE AUCH" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/fr/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/fr/lzmainfo.1 new file mode 100644 index 0000000000..bcba91850c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/fr/lzmainfo.1 @@ -0,0 +1,47 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" french translation of XZ Utils man +.\" Copyright (C) 2021 Debian French l10n team +.\" Translator +.\" bubu , 2021. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 30\-06\-2013 Tukaani "Utilitaires XZ" +.SH NOM +lzmainfo \- Afficher l'information stockée dans l'en\-tête du fichier .lzma +.SH SYNOPSIS +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIfichier...\fP] +.SH DESCRIPTION +\fBlzmainfo\fP affiche l'information stockée dans l'en\-tête du fichier +\&\fB.lzma\fP. Il lit les 13 premiers octets du \fIfichier\fP indiqué, décode +l'en\-tête, et l'écrit sur la sortie standard dans un format lisible par un +humain. Si aucun \fIfichier\fP n'est spécifié ou si \fIfichier\fP est \fB\-\fP, +l'entrée standard est lue. +.PP +Habituellement l'information la plus interressante est la taille non +compressée et la taille du dictionnaire. La taille ne peut être affichée que +si le fichier est dans la variante du format \fB.lzma\fP qui n'est pas en +flux. La quantité de mémoire requise pour décompresser le fichier est de +quelques douzaines de kilooctets en plus de la taille du dictionnaire. +.PP +\fBlzmainfo\fP est inclus dans les utilitaires XZ essentiellement pour des +besoins de rétrocompatibilité avec les utilitaires LZMA. +.SH "STATUT DE SORTIE" +.TP +\fB0\fP +Tout est bon. +.TP +\fB1\fP +Une erreur est survenue. +.SH BOGUES +\fBlzmainfo\fP utilise \fBMB\fP alors que le suffixe correct devrait être +\fBMiB\fP(2^20 octets). Cela pour garder la sortie compatible avec les +utilitaires LZMA. +.SH "VOIR AUSSI" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/fr/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/fr/xz.1 new file mode 100644 index 0000000000..297dc7c0d9 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/fr/xz.1 @@ -0,0 +1,2027 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" french translation of XZ Utils man +.\" Copyright (C) 2021 Debian French l10n team +.\" Translator +.\" bubu , 2021. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 2025\-03\-08 Tukaani "Utilitaires XZ" +. +.SH NOM +xz, unxz, xzcat, lzma, unlzma, lzcat \- Compresser ou décompresser des +fichiers .xz et .lzma +. +.SH SYNOPSIS +\fBxz\fP [\fIoption...\fP] [\fIfichier...\fP] +. +.SH "ALIAS DES COMMANDES" +\fBunxz\fP est équivalent à \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP est équivalent à \fBxz \-\-decompress \-\-stdout\fP +.br +\fBlzma\fP est équivalent à \fBxz \-\-format=lzma\fP +.br +\fBunlzma\fP est équivalent à \fBxz \-\-format=lzma \-\-decompress\fP +.br +\fBlzcat\fP est équivalent à \fBxz \-\-format=lzma \-\-decompress \-\- stdout\fP +.PP +Lors de l'écriture de scripts qui nécessitent de décompresser des fichiers, +il est recommandé de toujours utiliser la commande \fBxz\fP avec les arguments +appropriés (\fBxz \-d\fP ou \fBxz \-dc\fP) au lieu des commandes \fBunxz\fP et +\fBxzcat\fP. +. +.SH DESCRIPTION +\fBxz\fP is a general\-purpose data compression tool with command line syntax +similar to \fBgzip\fP(1) and \fBbzip2\fP(1). The native file format is the +\&\fB.xz\fP format, but the legacy \fB.lzma\fP format used by LZMA Utils and raw +compressed streams with no container format headers are also supported. In +addition, decompression of the \fB.lz\fP format used by \fBlzip\fP is supported. +.PP +\fBxz\fP compresse ou décompresse chaque \fIfichier\fP en fonction du mode +d'opération choisi. Si aucun \fIfichier\fP n'est donné ou \fIfichier\fP est \fB\-\fP, +\fBxz\fP lit depuis l'entrée standard et écrit les données traitées sur la +sortie standard. \fBxz\fP refusera (affichera une erreur et ignorera le +\fIfichier\fP) d'écrire les données compressées sur la sortie standard si c'est +un terminal. De même, \fBxz\fP refusera de lire des données compressées depuis +l'entrée standard si c'est un terminal. +.PP +A moins que \fB\-\-sdout\fP ne soit indiqué, les \fIfichiers\fP autres que \fB\-\fP sont +écrits dans un nouveau fichier dont le nom est dérivé du nom de \fIfichier\fP +source : +.IP \(bu 3 +Lors de la compression, le suffixe du format de fichier cible (\fB.xz\fP ou +\&\fB.lzma\fP) est ajouté au nom de fichier source pour obtenir le nom de fichier +cible. +.IP \(bu 3 +When decompressing, the \fB.xz\fP, \fB.lzma\fP, or \fB.lz\fP suffix is removed from +the filename to get the target filename. \fBxz\fP also recognizes the suffixes +\&\fB.txz\fP and \fB.tlz\fP, and replaces them with the \fB.tar\fP suffix. +.PP +Si le fichier cible existe déjà, une erreur est affichée et le \fIfichier\fP +est ignoré. +.PP +Sauf s'il écrit dans la sortie standard, \fBxz\fP affichera un avertissement et +ignorera le \fIfichier\fP dans les cas suivants : +.IP \(bu 3 +\fIfichier\fP n'est pas un fichier normal. Les liens symboliques ne sont pas +suivis et donc ne sont pas considérés comme des fichiers normaux. +.IP \(bu 3 +\fIfichier\fP a plusieurs liens physiques. +.IP \(bu 3 +\fIfichier\fP a un setuid, setgid ou sticky bit positionné. +.IP \(bu 3 +Le mode d'opération est défini pour compresser et le \fIfichier\fP a déjà un +suffixe du format de fichier cible (\fB.xz\fP ou \fB.txz\fP lors d'une compression +en format \fB.xz\fP, et \fB.lzma\fP ou \fB.tlz\fP lors d'une compression en format +\&\fB.lzma\fP). +.IP \(bu 3 +The operation mode is set to decompress and the \fIfile\fP doesn't have a +suffix of any of the supported file formats (\fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, +\&\fB.tlz\fP, or \fB.lz\fP). +.PP +Après la compression ou la décompression réussie du \fIfichier\fP, \fBxz\fP copie +les permissions du propriétaire, du groupe, la date d'accès, et les +modifications d'heure depuis le \fIfichier\fP source du fichier cible. Si la +copie du groupe échoue, les permissions sont modifiées pour que le fichier +cible ne soit pas accessible aux utilisateurs qui n'ont pas les droits +d'accès au \fIfichier\fP source. \fBxz\fP ne prend actuellement pas en charge la +copie d'autres métadonnées telles que les listes de contrôle d'accès ou les +attributs étendus. +.PP +Once the target file has been successfully closed, the source \fIfile\fP is +removed unless \fB\-\-keep\fP was specified. The source \fIfile\fP is never removed +if the output is written to standard output or if an error occurs. +.PP +Envoyer \fBSIGINFO\fP ou \fBSIGURSR1\fP au processus \fBxz\fP, lui fait afficher +l'information de progression sur l'erreur standard. Cela a un intérêt limité +car lorsque l'erreur standard est un terminal, utiliser \fB\-\-verbose\fP +affichera automatiquement un indicateur de progression du processus. +. +.SS "Utilisation de la mémoire" +L'utilisation de la mémoire par \fBxz\fP varie de quelques centaines de +kilo\-octets à plusieurs gigaoctects en fonction des paramètres de +compression. Les réglages utilisés lors de la compression d'un fichier +déterminent les besoins en mémoire pour la décompression. Habituellement la +décompression nécessite 5\% à 20\% de la quantité de mémoire utilisée pour +la compression du fichier. Par exemple, décompresser un fichier créé avec +\fBxz\-9\fP recquiert habituellement 65\ Mio de mémoire. Bien qu'il soit +possible d'avoir des fichiers \fB.xz\fP nécessitant plusieurs gigaoctets de +mémoire pour être décompressés. +.PP +Especially users of older systems may find the possibility of very large +memory usage annoying. To prevent uncomfortable surprises, \fBxz\fP has a +built\-in memory usage limiter, which is disabled by default. While some +operating systems provide ways to limit the memory usage of processes, +relying on it wasn't deemed to be flexible enough (for example, using +\fBulimit\fP(1) to limit virtual memory tends to cripple \fBmmap\fP(2)). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +The memory usage limiter can be enabled with the command line option +\fB\-\-memlimit=\fP\fIlimit\fP. Often it is more convenient to enable the limiter +by default by setting the environment variable \fBXZ_DEFAULTS\fP, for example, +\fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. It is possible to set the limits +separately for compression and decompression by using +\fB\-\-memlimit\-compress=\fP\fIlimit\fP and \fB\-\-memlimit\-decompress=\fP\fIlimit\fP. +Using these two options outside \fBXZ_DEFAULTS\fP is rarely useful because a +single run of \fBxz\fP cannot do both compression and decompression and +\fB\-\-memlimit=\fP\fIlimit\fP (or \fB\-M\fP \fIlimit\fP) is shorter to type on the +command line. +.PP +If the specified memory usage limit is exceeded when decompressing, \fBxz\fP +will display an error and decompressing the file will fail. If the limit is +exceeded when compressing, \fBxz\fP will try to scale the settings down so that +the limit is no longer exceeded (except when using \fB\-\-format=raw\fP or +\fB\-\-no\-adjust\fP). This way the operation won't fail unless the limit is very +small. The scaling of the settings is done in steps that don't match the +compression level presets, for example, if the limit is only slightly less +than the amount required for \fBxz \-9\fP, the settings will be scaled down only +a little, not all the way down to \fBxz \-8\fP. +. +.SS "Concaténation et remplissage avec des fichiers .xz" +Il est possible de concaténer les fichiers \fB.xz\fP tels quel. \fBxz\fP +décompressera de tels fichiers comme s'ils étaient un unique fichier \fB.xz\fP. +.PP +It is possible to insert padding between the concatenated parts or after the +last part. The padding must consist of null bytes and the size of the +padding must be a multiple of four bytes. This can be useful, for example, +if the \fB.xz\fP file is stored on a medium that measures file sizes in +512\-byte blocks. +.PP +La concaténation et le remplissage ne sont pas autorisés avec les fichiers +\&\fB.lzma\fP ou les flux bruts. +. +.SH OPTIONS +. +.SS "Suffixes entiers et valeurs spéciales." +Dans la plupart des endroits où un argument entier est attendu, un suffixe +optionel permet d'indiquer facilement les grands entiers. Il ne doit pas y +avoir d'espace entre l'entier et le suffixe. +.TP +\fBKiB\fP +Multiplier l'entier par 1024 (2^10). \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP et \fBKB\fP sont +acceptés comme synonymes de \fBKiB\fP. +.TP +\fBMiB\fP +Multiplier l'entier par 1 048 576 (2^20). \fBMi\fP, \fBm\fP, \fBM\fP et \fBMB\fP sont +acceptés comme synonymes de \fBMiB\fP. +.TP +\fBGiB\fP +Multiplier l'entier par 1 073 741 824 (2^30). \fBGi\fP, \fBg\fP, \fBG\fP et \fBGB\fP +sont acceptés comme synonymes de \fBGiB\fP. +.PP +La valeur spéciale \fBmax\fP peut être utilisée pour indiquer la valeur +maximale de l'entier prise en charge par l'option. +. +.SS "Mode d'opération" +Si plusieurs options de mode d'opération sont données, la dernière prend +effet. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Compresser. C'est le mode d'opération par défaut lorsque aucune option de +mode opératoire n'est spécifiée ou qu'aucun autre mode d'opération n'est +sous\-entendu par le nom de la commande (par exemple \fBunxz\fP sous\-entend +\fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +After successful compression, the source file is removed unless writing to +standard output or \fB\-\-keep\fP was specified. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Decompress. After successful decompression, the source file is removed +unless writing to standard output or \fB\-\-keep\fP was specified. +.TP +\fB\-t\fP, \fB\-\-test\fP +Tester l'intégrité des \fIfichiers\fP compressés. Cette option est équivalente +à \fB\-\-decompress \-\-stdout\fP sauf que les données décompressées sont rejetées +au lieu d'être écrites sur la sortie standard. Aucun fichier n'est créé ou +supprimé. +.TP +\fB\-l\fP, \fB\-\-list\fP +Afficher l'information sur les \fIfichiers\fP compressés. Aucune sortie +non\-compressée n'est produite et aucun fichier n'est créé ou supprimé. En +mode liste, le programme ne peut pas lire les données compressées depuis +l'entrée standard ou depuis d'autres sources non adressables. +.IP "" +The default listing shows basic information about \fIfiles\fP, one file per +line. To get more detailed information, use also the \fB\-\-verbose\fP option. +For even more information, use \fB\-\-verbose\fP twice, but note that this may be +slow, because getting all the extra information requires many seeks. The +width of verbose output exceeds 80 characters, so piping the output to, for +example, \fBless\ \-S\fP may be convenient if the terminal isn't wide enough. +.IP "" +La sortie exacte peut varier suivant les versions de \fBxz\fP et les différents +paramètres régionaux. Pour une sortie lisible par la machine, utiliser +\fB\-\-robot \-\-list\fP. +. +.SS "Modificateurs d'opération" +.TP +\fB\-k\fP, \fB\-\-keep\fP +Ne pas effacer les fichiers d'entrée. +.IP "" +Since \fBxz\fP 5.2.6, this option also makes \fBxz\fP compress or decompress even +if the input is a symbolic link to a regular file, has more than one hard +link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and +sticky bits are not copied to the target file. In earlier versions this was +only done with \fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Cette option a plusieurs effets : +.RS +.IP \(bu 3 +Si le fichier cible existe déjà, l'effacer avant de compresser ou +décompresser. +.IP \(bu 3 +Compresser ou décompresser même si l'entrée est un lien symbolique vers un +fichier normal, a plus qu'un lien physique, ou a le bit setuid, setgid ou +sticky défini. Les bits setuid, setgid et sticky bits ne sont pas copiés +dans le fichier cible. +.IP \(bu 3 +Lorsque \fBxz\fP est utilisé avec \fB\-\-decompress\fP \fB\-\-stdout\fP et qu'il ne peut +pas reconnaitre le type du fichier source, copier le fichier source tel quel +dans la sortie standard. Celà permet à \fBxzcat\fP \fB\-\-force\fP d'être utilisé +comme \fBcat\fP(1) pour les fichiers qui n'ont pas été compressé avec +\fBxz\fP. Remarquez que dans le futur, \fBxz\fP devrait prendre en charge de +nouveaux formats de fichiers compressés, ce qui permettra à \fBxz\fP de +décompresser plus de types de fichiers au lieu de les copier tels quels dans +la sortie standard. \fB\-\-format=\fP\fIformat\fP peut être utilisé pour contraindre +\fBxz\fP à décompresser seulement un format de fichier. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Écrire les données compressées ou décompressées sur la sortie standard +plutôt que dans un fichier. Cela necessite \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +Décompresser seulement le premier flux \fB.xz\fP et ignorer silencieusement les +possibles données d'entrée résiduelles qui suivent le flux. Normalement ces +déchets excédentaires provoquent l'affichage d'une erreur par \fBxz\fP. +.IP "" +\fBxz\fP ne décompresse jamais plus d'un flux à partir de fichiers \fB.lzma\fP ou +de flux bruts, mais cette option fait aussi que \fBxz\fP ignorera les données +résiduelles après le fichier \fB.lzma\fP ou le flux brut. +.IP "" +Cette option n'a aucun effet si le mode d'opération n'est pas +\fB\-\-decompress\fP ou \fB\-\-test\fP. +.IP "" +Since \fBxz\fP 5.7.1alpha, \fB\-\-single\-stream\fP implies \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +Désactiver la création de fichiers peu denses. Par défaut, lors de la +décompression en un fichier normal, \fBxz\fP essaie d'en faire un fichier creux +si les données décompressées contiennent de longues séquences de zéros +binaires. Cela fonctionne aussi lors de l'écriture sur la sortie standard +aussi longtemps que la sortie standard est connectée à un fichier normal et +que certaines conditions supplémentaires sont satisfaites pour le faire de +manière sécurisée. Créer des fichiers creux peut épargner de l'espace disque +et accélérer la décompression en réduisant la quantité d'entrées/sorties sur +le disque. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +Lors de la compression, utiliser \fB.suf\fP comme suffixe du fichier cible au +lieu de \fB.xz\fP ou \fB.lzma\fP. Si \fBxz\fP n'écrit pas sur la sortie standard et +si le fichier source a déja le suffixe \fB.suf\fP, un avertissement est affiché +et le fichier est ignoré. +.IP "" +When decompressing, recognize files with the suffix \fI.suf\fP in addition to +files with the \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP, or \fB.lz\fP suffix. If the +source file has the suffix \fI.suf\fP, the suffix is removed to get the target +filename. +.IP "" +Lors de la compression ou décompression de flux bruts (\fB\-\-fomat=raw\fP), le +suffixe doit toujours être spécifié à moins d'écrire sur la sortie standard, +car il n'y a pas de suffixe par défaut pour les flux bruts. +.TP +\fB\-\-files\fP[\fB=\fP\fIfichier\fP] +Lire les noms de fichier à traiter depuis \fIfichier\fP ; si \fIfichier\fP est +omis , les noms de fichier sont lus sur l'entrée standard. Les noms de +fichier doivent se terminer avec le caractère de nouvelle ligne. Un tiret +(\fB\-\fP) est considéré comme un nom de fichier normal ; ce qui ne signifie pas +entrée standard. Si les noms de fichier sont aussi donnés comme arguments de +ligne de commande, ils sont traités avant les noms de fichier lus depuis +\fIfichier\fP. +.TP +\fB\-\-files0\fP[\fB=\fP\fIfichier\fP] +Cela est identique à \fB\-\-files\fP[\fB=\fP\fIfichier\fP] sauf que chaque nom de +fichier doit se terminer par le caractère null. +. +.SS "Format de fichier basique et options de compression" +.TP +\fB\-F\fP \fIformat\fP, \fB\-\-format=\fP\fIformat\fP +Indiquer le \fIformat\fP de fichier à compresser ou décompresser : +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +C'est celui par défaut. Lors de la compression, \fBauto\fP est équivalent à +\fBxz\fP. Lors de la décompression, le format du fichier en entrée est détecté +automatiquement. Notez que les flux bruts (créés avec \fB\-\-format=raw\fP) ne +peuvent pas être détectés automatiquement. +.TP +\fBxz\fP +Compresser dans le format de fichier \fB.xz\fP ou n'accepter que les fichiers +\&\fB.xz\fP à décompresser. +.TP +\fBlzma\fP, \fBalone\fP +Compresser au format de fichier \fB.lzma\fP historique, ou n'accepter que les +fichiers \fB.lzma\fP lors de la décompression. Le nom alternatif \fBalone\fP est +fourni pour la rétrocompatibilité avec les utilitaires LZMA. +.TP +\fBlzip\fP +Accept only \fB.lz\fP files when decompressing. Compression is not supported. +.IP "" +The \fB.lz\fP format versions 0 and 1 are supported. Version 0 files were +produced by \fBlzip\fP 1.3 and older. Such files aren't common but may be +found from file archives as a few source packages were released in this +format. People might have old personal files in this format too. +Decompression support for the format version 0 was removed in \fBlzip\fP 1.18. +\fBlzip\fP 1.4 and later create files in the format version 1. +.TP +\fBraw\fP +Compresser ou décompresser un flux brut (sans en\-têtes). Cela est réservé +seulement aux utilisateurs aguerris. Pour décoder des flux bruts, vous devez +utiliser \fB\-\-format=raw\fP et spécifier explicitement la chaîne de filtre, qui +normalement aurait du être stockée dans les en\-têtes du conteneur. +.RE +.TP +\fB\-C\fP \fIvérif.\fP, \fB\-\-check=\fP\fIvérif.\fP +Spécifier le type d'intégrité à vérifier. La vérification est calculée à +partir des données non\-compressées et stockées dans le fichier \fB.xz\fP. Cette +option n'a effet que si la compression a été faite dans le format \fB.xz\fP ; +le format \fB.lzma\fP ne gère pas les vérifications d'intégrité. Le contrôle +d'intégrité (s'il y en a) est vérifié lorsque le fichier \fB.xz\fP est +décompressé. +.IP "" +Types de \fIvérification\fP pris en charge : +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +Ne pas calculer de vérification d'intégrité du tout. C'est généralement une +mauvaise idée. Cela peut être utile lorsque l'intégrité des données est +vérifiée de toute façon par d'autres manières. +.TP +\fBcrc32\fP +Calculer CRC32 en utilisant le polynôme de IEEE\-802.3 (Ethernet). +.TP +\fBcrc64\fP +Calculer CRC64 en utilisant le polynôme de ECMA\-182. C'est la manière +utilisée par défaut, car c'est légèrement mieux que CRC32 pour détecter les +fichiers endommagés et la différence de vitesse est négligeable. +.TP +\fBsha256\fP +Calculer SHA\-256. C'est quelque peu plus lent que CRC32 et CRC64. +.RE +.IP "" +L'intégrité des en\-têtes \fB.xz\fP est toujours vérifiée avec CRC32. Il n'est +pas possible de le changer ou de le désactiver. +.TP +\fB\-\-ignore\-check\fP +Ne pas contrôler la vérification d'intégrité des données lors de la +décompression. Les valeurs CRC32 dans les en\-têtes \fB.xz\fP seront normalement +toujours vérifiées. +.IP "" +\fBN'utilisez pas cette option à moins de savoir ce que vous faites.\fP Les +raisons possibles pour utiliser cette option : +.RS +.IP \(bu 3 +Essayer de récupérer des données d'un fichier .xz corrompu. +.IP \(bu 3 +Accélérer la décompression. Cela importe surtout avec SHA\-256 ou avec les +fichiers qui ont été compressés extrêmement bien. Il est recommandé de ne +pas utiliser cette option dans ce but à moins que l'intégrité du fichier ne +soit vérifiée extérieurement d'une autre manière. +.RE +.TP +\fB\-0\fP ... \fB\-9\fP +Choisir un niveau de compression prédéfini. La valeur par défaut est +\fB6\fP. Si plusieurs niveaux de préréglage sont spécifiés, c'est le dernier +qui sera pris en compte. Si une chaîne de filtres personnalisée a déjà été +choisie, définir un niveau de compression préréglé efface la chaîne de +filtres personnalisée. +.IP "" +Les différences entre les préréglages sont plus significatives qu'avec +\fBgzip\fP(1) et \fBbzip2\fP(1). les réglages de compression sélectionnés +déterminent les exigences en mémoire pour la décompression, ainsi, utiliser +un niveau de préréglage trop élevé peut rendre difficile à décompresser un +fichier sur un vieux système avec peu de RAM. Clairement, \fBce n'est pas une bonne idée d'utiliser \-9 aveuglément pour tout\fP comme ça l'est souvent avec +\fBgzip\fP(1) et \fBbzip2\fP(1). +.RS +.TP +\fB\-0\fP ... \fB\-3\fP +Ce sont des préréglages relativement rapides. \fB0\fP est parfois plus rapide +que \fBgzip \-9\fP tout en compressant bien mieux. Les réglages plus élevés ont +souvent une rapidité comparable à celle de \fBbzip2\fP(1) avec un taux de +compression comparable ou meilleur, même si les résultats dépendent beaucoup +du genre de données compressées. +.TP +\fB\-4\fP ... \fB\-6\fP +Good to very good compression while keeping decompressor memory usage +reasonable even for old systems. \fB\-6\fP is the default, which is usually a +good choice for distributing files that need to be decompressible even on +systems with only 16\ MiB RAM. (\fB\-5e\fP or \fB\-6e\fP may be worth considering +too. See \fB\-\-extreme\fP.) +.TP +\fB\-7 ... \-9\fP +C'est comme \fB\-6\fP mais avec des besoins en mémoire plus élevés pour la +compression et la décompression. Ce n'est utile que lorsque les fichiers +sont plus gros que 8\ Mio, 16\ Mio et 32\ Mio respectivement. +.RE +.IP "" +Sur le même matériel, la vitesse de décompression est sensiblement un nombre +constant d'octets de données compressées par seconde. En d'autres termes, +meilleure est la compression, plus rapide sera en général la +décompression. Cela signifie aussi que la quantité de sortie non compressée +produite par seconde peut varier beaucoup. +.IP "" +Le tableau suivant résume les caractéristiques des préréglages : +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Préréglage;DictSize;CompCPU;CompMem;DecMem +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Descriptions des colonnes : +.RS +.IP \(bu 3 +DictSize est la taille du dictionnaire de LZMA2. Utiliser un dictionnaire +plus gros que la taille du fichier non compressé est un gaspillage de +mémoire. C'est pourquoi il est bon d'éviter d'utiliser les préréglages de +\fB\-7\fP à \fB\-9\fP lorsqu'il n'y en a pas vraiment besoin. A \fB\-6\fP et plus bas, +la quantité de mémoire gaspillée est généralement assez basse pour ne pas +être un problème. +.IP \(bu 3 +CompCPU est une représentation des préréglages de LZMA2 qui affectent la +vitesse de compression. La taille du dictionnaire aussi affecte la vitesse, +alors comme CompCPU est le même pour les niveaux de \fB\-6\fP à \fB\-9\fP, les plus +haut niveaux tendent à être un peu moins rapides. Pour être encore moins +rapide et du coup obtenir peut être une meilleure compression, consultez +\fB\-\-extreme\fP. +.IP \(bu 3 +CompMem contains the compressor memory requirements in the single\-threaded +mode. It may vary slightly between \fBxz\fP versions. +.IP \(bu 3 +DecMem contient les besoins en mémoire du décompresseur. Ce sont les +réglages de la compression qui déterminent les besoins en mémoire de la +décompression. L'exacte utilisation de la mémoire est légèrement supérieure +à la taille du dictionnaire LZMA2, mais les valeurs dans la table ont été +arrondies au prochain Mio supérieur. +.RE +.IP "" +Memory requirements of the multi\-threaded mode are significantly higher than +that of the single\-threaded mode. With the default value of +\fB\-\-block\-size\fP, each thread needs 3*3*DictSize plus CompMem or DecMem. For +example, four threads with preset \fB\-6\fP needs 660\(en670\ MiB of memory. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +Utilisez un variant plus lent que les préréglages (\fB\-0\fP à \fB\-9\fP) pour +espérer avoir un taux de compression légèrement meilleur, mais en cas de +malchance cela peut être pire. L'utilisation mémoire du décompresseur n'est +pas affectée, mais l'utilisation mémoire du compresseur augmente un peu aux +niveaux de préréglages de \fB\-0\fP à \fB\-3\fP. +.IP "" +Depuis qu'il y a deux préréglages avec des tailles de dictionnaire de 4\ Mio +et 8 \Mio, les préréglages \fB\-3e\fP et \fB\-5e\fP utilisent des réglages +légèrement plus rapides que \fB\-4e\fP et \fB\-6e\fP, respectivement. De cette +manière, il n'y a pas deux préréglages identiques. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Préréglage;DictSize;CompCPU;CompMem;DecMem +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Par exemple, il y a un total de quatre préréglages qui utilisent un +dictionnaire de 8 Mio et qui sont dans l'ordre du plus rapide au plus lent : +\fB\-5\fP, \fB\-6\fP, \fB\-5e\fP et \fB\-6e\fP. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +Il y a néanmoins des alias trompeurs pour \fB\-0\fP et \fB\-9\fP, +respectivement. Ils ne sont fournis que pour des besoins de +rétro\-compatibilité avec les utilitaires LZMA. Evitez d'utiliser ces +options. +.TP +\fB\-\-block\-size=\fP\fItaille\fP +Lors de la compression dans le format \fB.xz\fP, les données de l'entrée sont +réparties en blocs de \fItaille\fP octets. Les blocs sont compressés +indépendamment les un des autres, ce qui aide avec le mode multithread +(multi\-threading) et rend possible la décompression à accès aléatoire +limité. Cette option est typiquement utilisée pour outrepasser la taille de +bloc en mode multithread, mais cette option peut aussi être utilisée en mode +single\-thread. +.IP "" +In multi\-threaded mode about three times \fIsize\fP bytes will be allocated in +each thread for buffering input and output. The default \fIsize\fP is three +times the LZMA2 dictionary size or 1 MiB, whichever is more. Typically a +good value is 2\(en4 times the size of the LZMA2 dictionary or at least 1 +MiB. Using \fIsize\fP less than the LZMA2 dictionary size is waste of RAM +because then the LZMA2 dictionary buffer will never get fully used. In +multi\-threaded mode, the sizes of the blocks are stored in the block +headers. This size information is required for multi\-threaded +decompression. +.IP "" +In single\-threaded mode no block splitting is done by default. Setting this +option doesn't affect memory usage. No size information is stored in block +headers, thus files created in single\-threaded mode won't be identical to +files created in multi\-threaded mode. The lack of size information also +means that \fBxz\fP won't be able decompress the files in multi\-threaded mode. +.TP +\fB\-\-block\-list=\fP\fIitems\fP +When compressing to the \fB.xz\fP format, start a new block with an optional +custom filter chain after the given intervals of uncompressed data. +.IP "" +The \fIitems\fP are a comma\-separated list. Each item consists of an optional +filter chain number between 0 and 9 followed by a colon (\fB:\fP) and a +required size of uncompressed data. Omitting an item (two or more +consecutive commas) is a shorthand to use the size and filters of the +previous item. +.IP "" +If the input file is bigger than the sum of the sizes in \fIitems\fP, the last +item is repeated until the end of the file. A special value of \fB0\fP may be +used as the last size to indicate that the rest of the file should be +encoded as a single block. +.IP "" +An alternative filter chain for each block can be specified in combination +with the \fB\-\-filters1=\fP\fIfilters\fP \&...\& \fB\-\-filters9=\fP\fIfilters\fP options. +These options define filter chains with an identifier between 1\(en9. +Filter chain 0 can be used to refer to the default filter chain, which is +the same as not specifying a filter chain. The filter chain identifier can +be used before the uncompressed size, followed by a colon (\fB:\fP). For +example, if one specifies \fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP +then blocks will be created using: +.RS +.IP \(bu 3 +The filter chain specified by \fB\-\-filters1\fP and 2 MiB input +.IP \(bu 3 +The filter chain specified by \fB\-\-filters3\fP and 2 MiB input +.IP \(bu 3 +The filter chain specified by \fB\-\-filters2\fP and 4 MiB input +.IP \(bu 3 +The filter chain specified by \fB\-\-filters2\fP and 4 MiB input +.IP \(bu 3 +The default filter chain and 2 MiB input +.IP \(bu 3 +The default filter chain and 4 MiB input for every block until end of input. +.RE +.IP "" +If one specifies a size that exceeds the encoder's block size (either the +default value in threaded mode or the value specified with +\fB\-\-block\-size=\fP\fIsize\fP), the encoder will create additional blocks while +keeping the boundaries specified in \fIitems\fP. For example, if one specifies +\fB\-\-block\-size=10MiB\fP \fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP and the +input file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, +10, 10, and 1 MiB. +.IP "" +En mode multi\-threadé les tailles de blocs sont stockées dans les en\-têtes +du bloc. Cela ne se fait pas en mode mono\-threadé, la sortie encodée ne sera +donc pas identique à celle faite en mode multi\-threadé. +.TP +\fB\-\-flush\-timeout=\fP\fItemps_d'attente\fP +Lors de la compression, si plus que \fItemps_d'attente\fP millisecondes (un +entier positif) se sont écoulées depuis le précédent vidage et que lire plus +de données bloquerait, toutes les données d'entrée en attente sont vidées de +l'encodeur et mises à disposition dans le flux de sortie. Cela peut être +utile si \fBxz\fP est utilisé pour compresser les données qui sont diffusées +sur un réseau. Des petites valeurs de \fItemps_d'attente\fP rendent les données +disponibles à l'extrémité réceptrice avec un léger retard, mais les grandes +valeurs de \fItemps_d'attente\fP donnent un meilleur taux de compression. +.IP "" +Cette option est désactivée par défaut. Si cette option est indiquée plus +d'une fois, la dernière prend effet. La valeur spéciale de +\fItemps_d'attente\fP de \fB0\fP peut être utilisée pour explicitement désactiver +cette option. +.IP "" +Cette option n'est pas disponible sur les systèmes qui ne sont pas POSIX. +.IP "" +.\" FIXME +\fBCette option est encore expérimentale.\fP Actuellement, \fBxz\fP ne convient +pas pour décompresser le flux en temps réel en raison de la façon dont \fBxz\fP +effectue la mise en mémoire tampon. +.TP +\fB\-\-no\-sync\fP +Do not synchronize the target file and its directory to the storage device +before removing the source file. This can improve performance if +compressing or decompressing many small files. However, if the system +crashes soon after the deletion, it is possible that the target file was not +written to the storage device but the delete operation was. In that case +neither the original source file nor the target file is available. +.IP "" +This option has an effect only when \fBxz\fP is going to remove the source +file. In other cases synchronization is never done. +.IP "" +The synchronization and \fB\-\-no\-sync\fP were added in \fBxz\fP 5.7.1alpha. +.TP +\fB\-\-memlimit\-compress=\fP\fIlimite\fP +Indiquer une limite d'utilisation de la mémoire pour la compression. Si +cette option est indiquée plusieurs fois, c'est la dernière qui est prise en +compte. +.IP "" +If the compression settings exceed the \fIlimit\fP, \fBxz\fP will attempt to +adjust the settings downwards so that the limit is no longer exceeded and +display a notice that automatic adjustment was done. The adjustments are +done in this order: reducing the number of threads, switching to +single\-threaded mode if even one thread in multi\-threaded mode exceeds the +\fIlimit\fP, and finally reducing the LZMA2 dictionary size. +.IP "" +When compressing with \fB\-\-format=raw\fP or if \fB\-\-no\-adjust\fP has been +specified, only the number of threads may be reduced since it can be done +without affecting the compressed output. +.IP "" +If the \fIlimit\fP cannot be met even with the adjustments described above, an +error is displayed and \fBxz\fP will exit with exit status 1. +.IP "" +La \fIlimite\fP peut être indiquée de plusieurs façons : +.RS +.IP \(bu 3 +La \fIlimite\fP peut être une valeur absolue en octets. Utiliser un suffixe +d'entier comme \fBMiB\fP peut être utile. Exemple : +\fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +La \fIlimite\fP peut être indiquée sous forme d'un pourcentage de la mémoire +physique totale (RAM). Cela peut être particulièrement utile quand la +variable d'environnement \fBXZ_DEFAULTS\fP est indiquée dans un script +d'initialisation de l'interpréteur partagé entre différents ordinateurs. De +cette façon la limite est automatiquement plus grande sur les systèmes avec +plus de mémoire. Exemple : \fB\-\-memlimit=70%\fP +.IP \(bu 3 +The \fIlimit\fP can be reset back to its default value by setting it to \fB0\fP. +This is currently equivalent to setting the \fIlimit\fP to \fBmax\fP (no memory +usage limit). +.RE +.IP "" +For 32\-bit \fBxz\fP there is a special case: if the \fIlimit\fP would be over +\fB4020\ MiB\fP, the \fIlimit\fP is set to \fB4020\ MiB\fP. On MIPS32 \fB2000\ MiB\fP +is used instead. (The values \fB0\fP and \fBmax\fP aren't affected by this. A +similar feature doesn't exist for decompression.) This can be helpful when +a 32\-bit executable has access to 4\ GiB address space (2 GiB on MIPS32) +while hopefully doing no harm in other situations. +.IP "" +Voir aussi la section \fButilisation de la mémoire\fP. +.TP +\fB\-\-memlimit\-decompress=\fP\fIlimite\fP +Régler une limite d'utilisation de la mémoire pour la décompression. Cela a +un effet sur le mode \fB\-\-list\fP. Si l'opération n'est pas possible sans +dépasser la \fIlimite\fP, \fBxz\fP affichera une erreur et la décompression +échouera. Voir \fB\-\-memlimit\-compress=\fP\fIlimite\fP pour les manières possibles +d'indiquer la \fIlimite\fP. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fIlimit\fP +Set a memory usage limit for multi\-threaded decompression. This can only +affect the number of threads; this will never make \fBxz\fP refuse to +decompress a file. If \fIlimit\fP is too low to allow any multi\-threading, the +\fIlimit\fP is ignored and \fBxz\fP will continue in single\-threaded mode. Note +that if also \fB\-\-memlimit\-decompress\fP is used, it will always apply to both +single\-threaded and multi\-threaded modes, and so the effective \fIlimit\fP for +multi\-threading will never be higher than the limit set with +\fB\-\-memlimit\-decompress\fP. +.IP "" +In contrast to the other memory usage limit options, +\fB\-\-memlimit\-mt\-decompress=\fP\fIlimit\fP has a system\-specific default +\fIlimit\fP. \fBxz \-\-info\-memory\fP can be used to see the current value. +.IP "" +This option and its default value exist because without any limit the +threaded decompressor could end up allocating an insane amount of memory +with some input files. If the default \fIlimit\fP is too low on your system, +feel free to increase the \fIlimit\fP but never set it to a value larger than +the amount of usable RAM as with appropriate input files \fBxz\fP will attempt +to use that amount of memory even with a low number of threads. Running out +of memory or swapping will not improve decompression performance. +.IP "" +See \fB\-\-memlimit\-compress=\fP\fIlimit\fP for possible ways to specify the +\fIlimit\fP. Setting \fIlimit\fP to \fB0\fP resets the \fIlimit\fP to the default +system\-specific value. +.TP +\fB\-M\fP \fIlimite\fP, \fB\-\-memlimit=\fP\fIlimite\fP, \fB\-\-memory=\fP\fIlimite\fP +This is equivalent to specifying \fB\-\-memlimit\-compress=\fP\fIlimit\fP +\fB\-\-memlimit\-decompress=\fP\fIlimit\fP \fB\-\-memlimit\-mt\-decompress=\fP\fIlimit\fP. +.TP +\fB\-\-no\-adjust\fP +Display an error and exit if the memory usage limit cannot be met without +adjusting settings that affect the compressed output. That is, this +prevents \fBxz\fP from switching the encoder from multi\-threaded mode to +single\-threaded mode and from reducing the LZMA2 dictionary size. Even when +this option is used the number of threads may be reduced to meet the memory +usage limit as that won't affect the compressed output. +.IP "" +Automatic adjusting is always disabled when creating raw streams +(\fB\-\-format=raw\fP). +.TP +\fB\-T\fP \fIthreads\fP, \fB\-\-threads=\fP\fIthreads\fP +Specify the number of worker threads to use. Setting \fIthreads\fP to a +special value \fB0\fP makes \fBxz\fP use up to as many threads as the processor(s) +on the system support. The actual number of threads can be fewer than +\fIthreads\fP if the input file is not big enough for threading with the given +settings or if using more threads would exceed the memory usage limit. +.IP "" +The single\-threaded and multi\-threaded compressors produce different +output. Single\-threaded compressor will give the smallest file size but +only the output from the multi\-threaded compressor can be decompressed using +multiple threads. Setting \fIthreads\fP to \fB1\fP will use the single\-threaded +mode. Setting \fIthreads\fP to any other value, including \fB0\fP, will use the +multi\-threaded compressor even if the system supports only one hardware +thread. (\fBxz\fP 5.2.x used single\-threaded mode in this situation.) +.IP "" +To use multi\-threaded mode with only one thread, set \fIthreads\fP to \fB+1\fP. +The \fB+\fP prefix has no effect with values other than \fB1\fP. A memory usage +limit can still make \fBxz\fP switch to single\-threaded mode unless +\fB\-\-no\-adjust\fP is used. Support for the \fB+\fP prefix was added in \fBxz\fP +5.4.0. +.IP "" +If an automatic number of threads has been requested and no memory usage +limit has been specified, then a system\-specific default soft limit will be +used to possibly limit the number of threads. It is a soft limit in sense +that it is ignored if the number of threads becomes one, thus a soft limit +will never stop \fBxz\fP from compressing or decompressing. This default soft +limit will not make \fBxz\fP switch from multi\-threaded mode to single\-threaded +mode. The active limits can be seen with \fBxz \-\-info\-memory\fP. +.IP "" +Actuellement, la seule méthode de gestion avec des threads consiste à +séparer l'entrée en blocs et de les compresser indépendamment les uns des +autres. La taille par défaut des blocs dépend du niveau de compression et +peut\-être remplacée avec l'option \fB\-\-block\-size=\fP\fItaille\fP. +.IP "" +Threaded decompression only works on files that contain multiple blocks with +size information in block headers. All large enough files compressed in +multi\-threaded mode meet this condition, but files compressed in +single\-threaded mode don't even if \fB\-\-block\-size=\fP\fIsize\fP has been used. +.IP "" +The default value for \fIthreads\fP is \fB0\fP. In \fBxz\fP 5.4.x and older the +default is \fB1\fP. +. +.SS "Chaînes de filtres de compresseur personnalisées" +A custom filter chain allows specifying the compression settings in detail +instead of relying on the settings associated to the presets. When a custom +filter chain is specified, preset options (\fB\-0\fP \&...\& \fB\-9\fP and +\fB\-\-extreme\fP) earlier on the command line are forgotten. If a preset +option is specified after one or more custom filter chain options, the new +preset takes effect and the custom filter chain options specified earlier +are forgotten. +.PP +Une chaîne de filtre est comparable à une redirection (pipe) sur la ligne de +commande. Lors de la compression, les entrées non compressées vont au +premier filtre, dont la sortie va au prochain filtre (s'il y en a). La +sortie du dernier filtre est écrite sur le fichier compressé. Le nombre +maximal de filtres dans la chaîne est quatre, mais habituellement, un chaîne +de filtre n'a qu'un ou deux filtres. +.PP +Beaucoup de filtres ont des limitations sur l'endroit où ils peuvent se +placer dans la chaîne de filtre : quelques filtres ne peuvent fonctionner +qu'en tant que dernier filtre dans la chaîne, quelques uns en tant que non +dernier filtre, et d'autres à n'importe quelle position dans la +chaîne. Suivant le filtre, cette limitation est soit inhérente au profil du +filtre, soit existe pour des raisons de sécurité. +.PP +A custom filter chain can be specified in two different ways. The options +\fB\-\-filters=\fP\fIfilters\fP and \fB\-\-filters1=\fP\fIfilters\fP \&...\& +\fB\-\-filters9=\fP\fIfilters\fP allow specifying an entire filter chain in one +option using the liblzma filter string syntax. Alternatively, a filter +chain can be specified by using one or more individual filter options in the +order they are wanted in the filter chain. That is, the order of the +individual filter options is significant! When decoding raw streams +(\fB\-\-format=raw\fP), the filter chain must be specified in the same order as +it was specified when compressing. Any individual filter or preset options +specified before the full chain option (\fB\-\-filters=\fP\fIfilters\fP) will be +forgotten. Individual filters specified after the full chain option will +reset the filter chain. +.PP +Both the full and individual filter options take filter\-specific \fIoptions\fP +as a comma\-separated list. Extra commas in \fIoptions\fP are ignored. Every +option has a default value, so specify those you want to change. +.PP +Pour voir l'entièreté de la chaîne de filtres et ses \fIoptions\fP, utilisez +\fBxz \-vv\fP (ce qui est comme utiliser \fB\-\-verbose\fP deux fois). Cela +fonctionne aussi pour voir les options de chaîne de filtres utilisées par +les préréglages. +.TP +\fB\-\-filters=\fP\fIfilters\fP +Specify the full filter chain or a preset in a single option. Each filter +can be separated by spaces or two dashes (\fB\-\-\fP). \fIfilters\fP may need to be +quoted on the shell command line so it is parsed as a single option. To +denote \fIoptions\fP, use \fB:\fP or \fB=\fP. A preset can be prefixed with a \fB\-\fP +and followed with zero or more flags. The only supported flag is \fBe\fP to +apply the same options as \fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIfilters\fP ... \fB\-\-filters9\fP=\fIfilters\fP +Specify up to nine additional filter chains that can be used with +\fB\-\-block\-list\fP. +.IP "" +For example, when compressing an archive with executable files followed by +text files, the executable part could use a filter chain with a BCJ filter +and the text part only the LZMA2 filter. +.TP +\fB\-\-filters\-help\fP +Display a help message describing how to specify presets and custom filter +chains in the \fB\-\-filters\fP and \fB\-\-filters1=\fP\fIfilters\fP \&...\& +\fB\-\-filters9=\fP\fIfilters\fP options, and exit successfully. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIoptions\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIoptions\fP] +.PD +Ajouter le filtre LZMA1 ou LZMA2 à la chaîne de filtres. Ces filtres ne +peuvent être utilisés que comme dernier filtre dans la chaîne. +.IP "" +LZMA1 est un filtre historique, qui n'est pris en charge presque uniquement +à cause de l'ancien format de fichier \fB.lzma\fP, qui ne prend en charge que +LZMA1. LZMA2 est une version mise à jour de LZMA1 pour régler certains +problèmes pratiques de LZMA1. Le format \fBxz\fP utilise LZMA2 et ne prend pas +du tout en charge LZMA1. Les taux et vitesses de compression de LZMA1 et +LZMA2 sont pratiquement identiques. +.IP "" +LZMA1 et LZMA2 partagent le même ensemble d'\fIoptions\fP : +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIpréréglage\fP +Reset all LZMA1 or LZMA2 \fIoptions\fP to \fIpreset\fP. \fIPreset\fP consist of an +integer, which may be followed by single\-letter preset modifiers. The +integer can be from \fB0\fP to \fB9\fP, matching the command line options \fB\-0\fP +\&...\& \fB\-9\fP. The only supported modifier is currently \fBe\fP, which matches +\fB\-\-extreme\fP. If no \fBpreset\fP is specified, the default values of LZMA1 or +LZMA2 \fIoptions\fP are taken from the preset \fB6\fP. +.TP +\fBdict=\fP\fItaille\fP +La \fItaille\fP du dictionnaire (historique du tampon) indique combien d'octets +des données récement décompressées sont gardés en mémoire. L'algorithme +essaie de trouver les séquences d'octets répétées (identiques) dans les +données décompressées et les remplace par les données actuellement dans le +dictionnaire. Plus gros est le dictionnaire, plus grande est la chance de +trouver une correspondance. Ainsi, l'augmentation de la \fItaille\fP du +dictionnaire augmente habituellement le taux de compression, mais un +dictionnaire plus gros que le fichier non compressé est un gachis de +mémoire. +.IP "" +Généralement la \fItaille\fP du dictionnaire est entre 64\ Kio et 64\ Mio. Le +minimum étant 4\ Kio. La \fItaille\fP maximale pour la compression est +habituellement 1,5\ Gio (1536\ Mio). Le décompresseur prend en charge les +dictionnaires jusqu'à un octet de moins que 4\ Gio, ce qui est le maximum +pour les formats de flux LZMA1 et LZMA2. +.IP "" +La \fItaille\fP du dictionnaire et le chercheur de correspondance (match +finder) (\fImf\fP) déterminent ensemble l'utilisation de la mémoire de +l'encodeur LZMA1 ou LZMA2. La même (ou une plus grosse) \fItaille\fP de +dictionnaire est requise pour décompresser que ce qui a été utilisé pour la +compression, ainsi l'utilisation de la mémoire du décodeur est déterminée +par la taille du dictionnaire utilisée lors de la compression. Les en\-têtes +de \fB.xz\fP stockent la \fItaille\fP de dictionnaire sous la forme 2^\fIn\fP ou +2^\fIn\fP + 2^(\fIn\fP\-1), de sorte que ces \fItailles\fP sont quelque peu préférées +pour la compression. Les autres \fItailles\fP seront arrondies à la hausse +lorsque stockées dans les en\-têtes de \fB.xz\fP. +.TP +\fBlc=\fP\fIlc\fP +Spécifiez le nombre d'octets de contexte littéraux. Le minimum est \fB0\fP et +le maximum est \fB4\fP. La valeur par défaut est \fB3\fP. En plus, la somme de +\fIlc\fP et \fIlp\fP ne doit pas excéder \fB4\fP. +.IP "" +Tous les octets qui ne peuvent pas être codés comme des correspondances sont +codés comme des littéraux. C'est à dire que les littéraux sont simplement +des octets 8 bits encodés un à la fois. +.IP "" +The literal coding makes an assumption that the highest \fIlc\fP bits of the +previous uncompressed byte correlate with the next byte. For example, in +typical English text, an upper\-case letter is often followed by a lower\-case +letter, and a lower\-case letter is usually followed by another lower\-case +letter. In the US\-ASCII character set, the highest three bits are 010 for +upper\-case letters and 011 for lower\-case letters. When \fIlc\fP is at least +3, the literal coding can take advantage of this property in the +uncompressed data. +.IP "" +The default value (3) is usually good. If you want maximum compression, +test \fBlc=4\fP. Sometimes it helps a little, and sometimes it makes +compression worse. If it makes it worse, test \fBlc=2\fP too. +.TP +\fBlp=\fP\fIlp\fP +Indiquer le nombre de bits de position littérale. Le minimum est \fB0\fP et le +maximum \fB4\fP; par défaut c'est \fB0\fP. +.IP "" +\fILp\fP affecte le type d'alignement dans les données décompressées qui est +présumé lors de l'encodage des littéraux. Voir \fIpb\fP ci dessous pour plus +d'information sur l'alignement. +.TP +\fBpb=\fP\fIpb\fP +Indiquer le nombre de bits de position. Le minimum est \fB0\fP et le maximum +\fB4\fP; par défaut \fB2\fP. +.IP "" +\fIPb\fP affecte quel genre d'alignement est présumé en général dans les +données non compressées. Par défaut c'est un alignement de quatre octets +(2^\fIpb\fP=2^2=4), ce qui est généralement un bon choix lorsqu'il n'y a pas de +meilleure estimation. +.IP "" +When the alignment is known, setting \fIpb\fP accordingly may reduce the file +size a little. For example, with text files having one\-byte alignment +(US\-ASCII, ISO\-8859\-*, UTF\-8), setting \fBpb=0\fP can improve compression +slightly. For UTF\-16 text, \fBpb=1\fP is a good choice. If the alignment is +an odd number like 3 bytes, \fBpb=0\fP might be the best choice. +.IP "" +Même si l'alignement présumé peut être ajusté avec \fIpb\fP et \fIlp\fP, LZMA1 et +LZMA2 favorisent toujours légèrement l'alignement sur 16 octets. Il peut +être utile d'en tenir compte lors de la conception de formats de fichiers +susceptibles d'être souvent compressés avec LZMA1 ou LZMA2. +.TP +\fBmf=\fP\fImf\fP +Match finder has a major effect on encoder speed, memory usage, and +compression ratio. Usually Hash Chain match finders are faster than Binary +Tree match finders. The default depends on the \fIpreset\fP: 0 uses \fBhc3\fP, +1\(en3 use \fBhc4\fP, and the rest use \fBbt4\fP. +.IP "" +Les chercheurs de correspondance suivants sont pris en charge. Les formules +d'utilisation de la mémoire ci\-dessous sont des approximations grossières +qui sont les plus proches de la réalité lorsque \fIdict\fP est une puissance de +deux. +.RS +.TP +\fBhc3\fP +Chaîne de hachage avec hachage de 2 et 3 octets +.br +Valeur minimale pour \fInice\fP : \fB3\fP +.br +Utilisation de la mémoire : +.br +\fIdict\fP * 7.5 (if \fIdict\fP <= 16 Mio); +.br +\fIdict\fP * 5.5 + 64 MiB (si \fIdict\fP > 16 Mio) +.TP +\fBhc4\fP +Chaîne de hachage avec hachage de 2, 3 et 4 octets +.br +Valeur minimale pour \fInice\fP : \fB4\fP +.br +Utilisation de la mémoire : +.br +\fIdict\fP * 7.5 (si \fIdict\fP <= 32 Mio); +.br +\fIdict\fP * 6.5 (si \fIdict\fP > 32 Mio) +.TP +\fBbt2\fP +Arbre binaire avec hachage de 2 octets +.br +Valeur minimale pour \fInice\fP : \fB2\fP +.br +Utilisation de la mémoire : \fIdict\fP * 9.5 +.TP +\fBbt3\fP +Arbre binaire avec hachage de 2 et 3 octets +.br +Valeur minimale pour \fInice\fP : \fB3\fP +.br +Utilisation de la mémoire : +.br +\fIdict\fP * 11.5 (si \fIdict\fP <= 16 Mio); +.br +\fIdict\fP * 9.5 + 64 MiB (si \fIdict\fP > 16 Mio) +.TP +\fBbt4\fP +Arbre binaire avec hachage 2, 3 et 4 octets +.br +Valeur minimale pour \fInice\fP : \fB4\fP +.br +Utilisation de la mémoire : +.br +\fIdict\fP * 11.5 (si \fIdict\fP <= 32 Mio); +.br +\fIdict\fP * 10.5 (si \fIdict\fP > 32 Mio) +.RE +.TP +\fBmode=\fP\fImode\fP +Compression \fImode\fP specifies the method to analyze the data produced by the +match finder. Supported \fImodes\fP are \fBfast\fP and \fBnormal\fP. The default is +\fBfast\fP for \fIpresets\fP 0\(en3 and \fBnormal\fP for \fIpresets\fP 4\(en9. +.IP "" +Habituellement, \fBfast\fP est utilisé avec les chercheurs de correspondance de +chaîne de hachage et \fBnormal\fP avec les chercheurs de correspondance d'arbre +binaire. C'est aussi ce que font les \fIpréréglages\fP. +.TP +\fBnice=\fP\fInice\fP +Spécifier ce qui est considéré comme une bonne longueur pour une +correspondance. Une fois que la correspondance d'au moins \fInice\fP octets est +trouvée, l'algorithme arrête de chercher de meilleures correspondances +possibles. +.IP "" +\fINice\fP can be 2\(en273 bytes. Higher values tend to give better +compression ratio at the expense of speed. The default depends on the +\fIpreset\fP. +.TP +\fBdepth=\fP\fIprofondeur\fP +Spécifier la profondeur de recherche maximale dans l'outil de recherche de +correspondances. La valeur par défaut est \fB0\fP, ce qui fait que le +compresseur détermine une \fIprofondeur\fP raisonnable en fonction de \fImf\fP et +\fInice\fP. +.IP "" +Reasonable \fIdepth\fP for Hash Chains is 4\(en100 and 16\(en1000 for Binary +Trees. Using very high values for \fIdepth\fP can make the encoder extremely +slow with some files. Avoid setting the \fIdepth\fP over 1000 unless you are +prepared to interrupt the compression in case it is taking far too long. +.RE +.IP "" +Lors du décodage des flux bruts (\fB\-\-format=raw\fP), LZMA2 nécessite seulement +la \fItaille\fP du dictionnaire. LZMA1 nécessite aussi \fIlc\fP, \fIlp\fP et \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIoptions\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIoptions\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIoptions\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIoptions\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIoptions\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIoptions\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIoptions\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIoptions\fP] +.PD +Ajouter un filtre branch/call/jump (BCJ) à la chaîne de filtres. Ces filtres +ne peuvent être utilisés que s'ils ne sont pas le dernier filtre de la +chaîne de filtrage. +.IP "" +A BCJ filter converts relative addresses in the machine code to their +absolute counterparts. This doesn't change the size of the data but it +increases redundancy, which can help LZMA2 to produce 0\(en15\ % smaller +\&\fB.xz\fP file. The BCJ filters are always reversible, so using a BCJ filter +for wrong type of data doesn't cause any data loss, although it may make the +compression ratio slightly worse. The BCJ filters are very fast and use an +insignificant amount of memory. +.IP "" +Ces filtres BCJ présentent des problèmes connus liés au taux de +compression : +.RS +.IP \(bu 3 +Some types of files containing executable code (for example, object files, +static libraries, and Linux kernel modules) have the addresses in the +instructions filled with filler values. These BCJ filters will still do the +address conversion, which will make the compression worse with these files. +.IP \(bu 3 +If a BCJ filter is applied on an archive, it is possible that it makes the +compression ratio worse than not using a BCJ filter. For example, if there +are similar or even identical executables then filtering will likely make +the files less similar and thus compression is worse. The contents of +non\-executable files in the same archive can matter too. In practice one +has to try with and without a BCJ filter to see which is better in each +situation. +.RE +.IP "" +Different instruction sets have different alignment: the executable file +must be aligned to a multiple of this value in the input data to make the +filter work. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Filtre;Alignement;Notes +x86;1;32 bits ou 64 bits x86 +ARM;4; +ARM\-Thumb;2; +ARM64;4;4096\-byte alignment is best +PowerPC;4;Grand boutiste seulement +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Since the BCJ\-filtered data is usually compressed with LZMA2, the +compression ratio may be improved slightly if the LZMA2 options are set to +match the alignment of the selected BCJ filter. Examples: +.RS +.IP \(bu 3 +IA\-64 filter has 16\-byte alignment so \fBpb=4,lp=4,lc=0\fP is good with LZMA2 +(2^4=16). +.IP \(bu 3 +RISC\-V code has 2\-byte or 4\-byte alignment depending on whether the file +contains 16\-bit compressed instructions (the C extension). When 16\-bit +instructions are used, \fBpb=2,lp=1,lc=3\fP or \fBpb=1,lp=1,lc=3\fP is good. When +16\-bit instructions aren't present, \fBpb=2,lp=2,lc=2\fP is the best. +\fBreadelf \-h\fP can be used to check if "RVC" appears on the "Flags" line. +.IP \(bu 3 +ARM64 is always 4\-byte aligned so \fBpb=2,lp=2,lc=2\fP is the best. +.IP \(bu 3 +The x86 filter is an exception. It's usually good to stick to LZMA2's +defaults (\fBpb=2,lp=0,lc=3\fP) when compressing x86 executables. +.RE +.IP "" +Tous les filtres BCJ prennent en charge les mêmes \fIoptions\fP : +.RS +.TP +\fBstart=\fP\fIdécalage\fP +Spécifier le \fIdécalage\fP de départ qui est utilisé lors de la conversion +entre les adresses relatives et absolues. Le \fIdécalage\fP doit être un +multiple de l'alignement du filtre (voir la table ci\-dessus). Sa valeur par +défaut est zéro. En pratique, cette dernière convient ; indiquer un +\fIdécalage\fP personnalisé est la plupart du temps inutile. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIoptions\fP] +Ajouter le filtre Delta à la chaîne de filtres. Le filtre Delta ne peut être +utilisé que s'il n'est pas le dernier filtre dans la chaîne. +.IP "" +Currently only simple byte\-wise delta calculation is supported. It can be +useful when compressing, for example, uncompressed bitmap images or +uncompressed PCM audio. However, special purpose algorithms may give +significantly better results than Delta + LZMA2. This is true especially +with audio, which compresses faster and better, for example, with +\fBflac\fP(1). +.IP "" +\fIoptions\fP prises en charge : +.RS +.TP +\fBdist=\fP\fIdistance\fP +Specify the \fIdistance\fP of the delta calculation in bytes. \fIdistance\fP must +be 1\(en256. The default is 1. +.IP "" +Par exemple, avec \fBdist=2\fP et une entrée huit octets A1 B1 A2 B3 A3 B5 A4 +B7, la sortie sera A1 B1 01 02 01 02 01 02. +.RE +. +.SS "Autres options" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Supprimer les avertissements et les notifications. Indiquer cela deux fois +supprimera aussi les erreurs. Cette option n'a aucun effet sur le statut de +sortie. Cela dit, même si un avertissement était supprimé, le statut de +sortie indiquant un avertissement sera encore utilisé. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +Être bavard. Si l'erreur standard est connectée à un terminal, \fBxz\fP +affichera une barre de progression. Indiquer \fB\-\-verbose\fP deux fois donnera +une sortie encore plus bavarde. +.IP "" +La barre de progression montre l'information suivante : +.RS +.IP \(bu 3 +Le pourcentage de complétion est montré si la taille du fichier en entrée +est connue. Néanmoins, le pourcentage ne peut pas être montré en cas de +redirection. +.IP \(bu 3 +Quantité de données compressées produites (compression) ou consommées +(décompression). +.IP \(bu 3 +Quantité de données non compressées consommées (compression) ou produites +(décompression). +.IP \(bu 3 +Le taux de compression, calculé en divisant la quantité de données +compréssées déjà traitées par la quantité de données décompressées déjà +traitées. +.IP \(bu 3 +Vitesse de compression ou de décompression. Elle correspond à la quantité de +données non compressées consommées (compression) ou produites +(décompression) par seconde. Elle apparait quelques secondes après le début +du traitement du fichier par \fBxz\fP. +.IP \(bu 3 +Temps écoulé dans le format M:SS ou H:MM:SS. +.IP \(bu 3 +Estimated remaining time is shown only when the size of the input file is +known and a couple of seconds have already passed since \fBxz\fP started +processing the file. The time is shown in a less precise format which never +has any colons, for example, 2 min 30 s. +.RE +.IP "" +When standard error is not a terminal, \fB\-\-verbose\fP will make \fBxz\fP print +the filename, compressed size, uncompressed size, compression ratio, and +possibly also the speed and elapsed time on a single line to standard error +after compressing or decompressing the file. The speed and elapsed time are +included only when the operation took at least a few seconds. If the +operation didn't finish, for example, due to user interruption, also the +completion percentage is printed if the size of the input file is known. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Ne pas mettre l'état de sortie à \fB2\fP même si une condition méritant un +avertissement a été détectée. Cette option n'affecte pas le niveau de +verbosité, néanmoins, les deux options \fB\-\-quiet\fP et \fB\-\-no\-warn\fP doivent +être utilisées pour ne pas afficher d'avertissements, ni altérer le statut +de sortie. +.TP +\fB\-\-robot\fP +Afficher les messages dans un format analysable par une machine. Ceci est +destiné à faciliter l'écriture des frontaux qui voudraient utiliser \fBxz\fP +plutôt que liblzma, ce qui pourrait être le cas pour différents scripts. La +sortie avec cette option activée est destinée à rester stable sur les +différentes versions de \fBxz\fP. Consulter le paragraphe \fBROBOT MODE\fP pour +les détails. +.TP +\fB\-\-info\-memory\fP +Display, in human\-readable format, how much physical memory (RAM) and how +many processor threads \fBxz\fP thinks the system has and the memory usage +limits for compression and decompression, and exit successfully. +.TP +\fB\-h\fP, \fB\-\-help\fP +Afficher un message d'aide décrivant les options les plus couramment +utilisées et quitter. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +Afficher un message d'aide décrivant toutes les options de \fBxz\fP et quitter. +.TP +\fB\-V\fP, \fB\-\-version\fP +Afficher le numéro de version de \fBxz\fP et de liblzma dans un format lisible +par un humain. Pour obtenir une sortie analysable par la machine, spécifiez +\fB\-\-robot\fP avant \fB\-\-version\fP. +. +.SH "MODE ROBOT" +The robot mode is activated with the \fB\-\-robot\fP option. It makes the output +of \fBxz\fP easier to parse by other programs. Currently \fB\-\-robot\fP is +supported only together with \fB\-\-list\fP, \fB\-\-filters\-help\fP, \fB\-\-info\-memory\fP, +and \fB\-\-version\fP. It will be supported for compression and decompression in +the future. +. +.SS "Mode liste" +\fBxz \-\-robot \-\-list\fP utilise une sortie séparée par des tabulations. La +première colonne de toutes les lignes possède une chaîne qui indique le type +d'information trouvée sur cette ligne : +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +C'est toujours la première ligne au début de la liste d'un fichier. La +seconde colonne de la ligne est le nom de fichier. +.TP +\fBfile\fP +Cette ligne contient l'information globale sur le fichier \fB.xz\fP. Cette +ligne est toujours écrite après la ligne \fBname\fP. +.TP +\fBstream\fP +Ce type de ligne n'est utilisée que lorsque \fB \-\-verbose\fP a été indiquée. Il +y a autant de lignes \fBstream\fP qu'il y a de flux dans le fichier \fB.xz\fP. +.TP +\fBblock\fP +Ce type de ligne n'est utilisé seulement lorsque \fB\-\-verbose\fP a été +indiquée. Il y a autant de lignes \fBblock\fP qu'il y a de blocs dans le +fichier \fB.xz\fP. Les lignes \fBblock\fP sont affichées après toutes les lignes +\fBstream\fP ; les différents types de lignes ne sont pas imbriqués. +.TP +\fBsummary\fP +Ce type de ligne n'est utilisé que lorsque \fB\-\-verbose\fP a été indiqué deux +fois. Cette ligne est affichée après toutes les lignes \fBblock\fP. Comme la +ligne \fBfile\fP, la ligne \fBsummary\fP contient l'information globale sur le +fichier \fB.xz\fP. +.TP +\fBtotals\fP +Cette ligne est toujours la toute dernière ligne de la sortie. Elle affiche +les comptes et les tailles totaux. +.PP +Les colonnes des lignes \fBfile\fP : +.PD 0 +.RS +.IP 2. 4 +Nombre de flux dans le fichier +.IP 3. 4 +Nombre total de blocs dans le ou les flux. +.IP 4. 4 +Taille compressée du fichier +.IP 5. 4 +Taille décompressée du fichier +.IP 6. 4 +Compression ratio, for example, \fB0.123\fP. If ratio is over 9.999, three +dashes (\fB\-\-\-\fP) are displayed instead of the ratio. +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Liste de noms de contrôles d'intégrité séparés par des virgules. Les chaînes +suivantes sont utilisées pour les types de vérification connus : \fBNone\fP, +\fBCRC32\fP, \fBCRC64\fP et \fBSHA256\fP. Pour le types de vérification inconnus, +\fBUnknown\-\fP\fIN\fP est utilisé, où \fIN\fP est un identifiant de vérification sous +la forme d'un nombre décimal (un ou deux chiffres). +.IP 8. 4 +Taille totale du remplissage du flux dans le fichier +.RE +.PD +.PP +Les colonnes des lignes \fBstream\fP : +.PD 0 +.RS +.IP 2. 4 +Numéro de flux (le premier flux a le numéro 1) +.IP 3. 4 +Nombre de blocs dans le flux +.IP 4. 4 +Décalage de départ compressé +.IP 5. 4 +Décalage de départ décompressé +.IP 6. 4 +Taille compressée (ne comprend pas le remplissage du flux) +.IP 7. 4 +Taille décompressée +.IP 8. 4 +Taux de compression +.IP 9. 4 +Nom de la vérification d'intégrité +.IP 10. 4 +Taille du remplissage de flux +.RE +.PD +.PP +Les colonnes des lignes \fBblock\fP : +.PD 0 +.RS +.IP 2. 4 +Numéro du flux qui contient ce bloc +.IP 3. 4 +Numéro du bloc relatif au commencement du flux (le premier bloc a pour +numéro 1) +.IP 4. 4 +Numéro du bloc relatif au début du fichier +.IP 5. 4 +Décalage de départ compressé relatif au début du fichier +.IP 6. 4 +Décalage de départ décompressé relatif au début du fichier +.IP 7. 4 +Taille compressée totale du bloc (en\-têtes inclus) +.IP 8. 4 +Taille décompressée +.IP 9. 4 +Taux de compression +.IP 10. 4 +Nom de la vérification d'intégrité +.RE +.PD +.PP +Si \fB\-\-verbose\fP a été indiqué deux fois, les colonnes additionnelles sont +inclues sur les lignes \fBblock\fP. Elles ne sont pas affichées avec un seul +\fB\-\-verbose\fP, car l'obtention de ces informations nécessite de nombreuses +recherches et peut donc être lente : +.PD 0 +.RS +.IP 11. 4 +Valeur de la vérification d'intégrité en hexadécimal +.IP 12. 4 +Taille d'en\-tête de bloc +.IP 13. 4 +Drapeaux du bloc : \fBc\fP indique que la taille compressée est présente, et +\fBu\fP indique que la taille décompréssée est présente. Si le drapeau n'est +pas indiqué, un tiret (\fB\-\fP) est affiché à la place pour que la longueur de +la chaîne reste fixe. De nouveaux drapeaux pourraient être ajoutés à la fin +de la chaîne dans le futur. +.IP 14. 4 +Taille des données effectivement compressées dans le bloc (en excluant +l'en\-tête de bloc, le remplissage de bloc et les champs de vérification). +.IP 15. 4 +Quantité de mémoire (en octets) nécessaire pour décompresser ce bloc avec +cette version de \fBxz\fP. +.IP 16. 4 +Chaîne de filtrage. Remarquez que la plupart des options utilisées au moment +de la compression ne peuvent pas être connues, car seules les options +nécessaires pour la décompression sont stockées dans les en\-têtes \fB.xz\fP. +.RE +.PD +.PP +Les colonnes des lignes \fBsummary\fP : +.PD 0 +.RS +.IP 2. 4 +Quantité de mémoire (en octets) nécessaire pour décompresser ce fichier avec +cette version de \fBxz\fP. +.IP 3. 4 +\fByes\fP ou \fBno\fP indique si tous les en\-têtes de bloc stockent à la fois la +taille compressée et la taille décompressée. +.PP +\fIDepuis\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Version minimale de \fBxz\fP nécessaire pour décompresser le fichier. +.RE +.PD +.PP +Les colonnes de la ligne \fBtotals\fP : +.PD 0 +.RS +.IP 2. 4 +Nombre de flux +.IP 3. 4 +Nombre de blocs +.IP 4. 4 +Taille compressée +.IP 5. 4 +Taille décompressée +.IP 6. 4 +Taux de compression moyen +.IP 7. 4 +Liste séparée par des virgules des noms de vérification d'intégrité qui +étaient présents dans les fichiers +.IP 8. 4 +Taille de remplissage de flux +.IP 9. 4 +Nombre de fichiers. Permet de garder l'ordre des colonnes précédentes comme +sur les lignes \fBfile\fP. +.PD +.RE +.PP +Si \fB\-\-verbose\fP a été indiqué deux fois, des colonnes supplémentaires sont +incluses sur la ligne \fBtotals\fP : +.PD 0 +.RS +.IP 10. 4 +Quantité maximale de mémoire (en octets) nécessaire pour décompresser les +fichiers avec cette version de \fBxz\fP. +.IP 11. 4 +\fByes\fP ou \fBno\fP indique si tous les en\-têtes de bloc stockent à la fois la +taille compressée et la taille décompressée. +.PP +\fIDepuis\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Version minimale de \fBxz\fP nécessaire pour décompresser le fichier. +.RE +.PD +.PP +Les versions futures pourront ajouter de nouveaux types de lignes et de +nouvelles colonnes pourront être ajoutées aux types de lignes existants, +mais les colonnes existantes ne seront pas modifiées. +. +.SS "Filters help" +\fBxz \-\-robot \-\-filters\-help\fP prints the supported filters in the following +format: +.PP +\fIfilter\fP\fB:\fP\fIoption\fP\fB=<\fP\fIvalue\fP\fB>,\fP\fIoption\fP\fB=<\fP\fIvalue\fP\fB>\fP... +.TP +\fIfilter\fP +Name of the filter +.TP +\fIoption\fP +Name of a filter specific option +.TP +\fIvalue\fP +Numeric \fIvalue\fP ranges appear as \fB<\fP\fImin\fP\fB\-\fP\fImax\fP\fB>\fP. String +\fIvalue\fP choices are shown within \fB< >\fP and separated by a \fB|\fP +character. +.PP +Each filter is printed on its own line. +. +.SS "Information de limite de mémoire" +\fBxz \-\-robot \-\-info\-memory\fP prints a single line with multiple tab\-separated +columns: +.IP 1. 4 +Total amount of physical memory (RAM) in bytes. +.IP 2. 4 +Memory usage limit for compression in bytes (\fB\-\-memlimit\-compress\fP). A +special value of \fB0\fP indicates the default setting which for +single\-threaded mode is the same as no limit. +.IP 3. 4 +Memory usage limit for decompression in bytes (\fB\-\-memlimit\-decompress\fP). A +special value of \fB0\fP indicates the default setting which for +single\-threaded mode is the same as no limit. +.IP 4. 4 +Since \fBxz\fP 5.3.4alpha: Memory usage for multi\-threaded decompression in +bytes (\fB\-\-memlimit\-mt\-decompress\fP). This is never zero because a +system\-specific default value shown in the column 5 is used if no limit has +been specified explicitly. This is also never greater than the value in the +column 3 even if a larger value has been specified with +\fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +Since \fBxz\fP 5.3.4alpha: A system\-specific default memory usage limit that is +used to limit the number of threads when compressing with an automatic +number of threads (\fB\-\-threads=0\fP) and no memory usage limit has been +specified (\fB\-\-memlimit\-compress\fP). This is also used as the default value +for \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +Since \fBxz\fP 5.3.4alpha: Number of available processor threads. +.PP +Dans le futur, la sortie de \fBxz \-\-robot \-\-info\-memory\fP pourrait avoir plus +de colonnes, mais jamais plus qu'une ligne unique. +. +.SS Version +\fBxz \-\-robot \-\-version\fP prints the version number of \fBxz\fP and liblzma in +the following format: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Version majeure. +.TP +\fIYYY\fP +Version mineure. Les numéros pairs sont stables. Les numéros impairs sont +des versions alpha ou beta. +.TP +\fIZZZ\fP +Niveau de correctif pour les options stables ou juste un compteur pour les +options de développement. +.TP +\fIS\fP +Stabilité. 0 est alpha, 1 est bêta et 2 est stable. \fIS\fP devrait toujours +être 2 quand \fIYYY\fP est pair. +.PP +\fIXYYYZZZS\fP sont identiques sur les deux lignes si \fBxz\fP et liblzma sont +issus de la même version d'utilitaires XZ. +.PP +Exemples : 4.999.9beta est \fB49990091\fP et 5.0.0 est \fB50000002\fP. +. +.SH "STATUT DE SORTIE" +.TP +\fB0\fP +Tout est bon. +.TP +\fB1\fP +Une erreur est survenue. +.TP +\fB2\fP +Quelquechose méritant un avertissement s'est produit, mais aucune erreur +véritable n'est survenue. +.PP +Les notifications (pas les avertissements ou les erreurs) affichées sur +l'erreur standard n'affectent pas le statut de sortie. +. +.SH ENVIRONNEMENT +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP analyse les listes d'options séparées par des espaces à partir des +variables d'environnement \fBXZ_DEFAULTS\fP et \fBXZ_OPT\fP, dans cet ordre, avant +d'analyser les options de la ligne de commandes. Remarquez que seules les +options sont analysées depuis l'environnement des variables ; toutes les +non\-options sont ignorées silencieusement. L'analyse est faite avec +\fBgetopt_long\fP(3) qui est aussi utilisé pour les arguments de la ligne de +commandes. +.PP +\fBWarning:\fP By setting these environment variables, one is effectively +modifying programs and scripts that run \fBxz\fP. Most of the time it is safe +to set memory usage limits, number of threads, and compression options via +the environment variables. However, some options can break scripts. An +obvious example is \fB\-\-help\fP which makes \fBxz\fP show the help text instead of +compressing or decompressing a file. More subtle examples are \fB\-\-quiet\fP +and \fB\-\-verbose\fP. In many cases it works well to enable the progress +indicator using \fB\-\-verbose\fP, but in some situations the extra messages +create problems. The verbosity level also affects the behavior of +\fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +User\-specific or system\-wide default options. Typically this is set in a +shell initialization script to enable \fBxz\fP's memory usage limiter by +default or set the default number of threads. Excluding shell +initialization scripts and similar special cases, scripts should never set +or unset \fBXZ_DEFAULTS\fP. +.TP +\fBXZ_OPT\fP +This is for passing options to \fBxz\fP when it is not possible to set the +options directly on the \fBxz\fP command line. This is the case when \fBxz\fP is +run by a script or tool, for example, GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +Scripts may use \fBXZ_OPT\fP, for example, to set script\-specific default +compression options. It is still recommended to allow users to override +\fBXZ_OPT\fP if that is reasonable. For example, in \fBsh\fP(1) scripts one may +use something like this: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "Compatibilité des utilitaires LZMA" +La syntaxe de la ligne de commande de \fBxz\fP est quasimment un sur\-ensemble +de \fBlzma\fP, \fBunlzma\fP et \fBlzcat\fP comme ils sont trouvés dans les +utilitaires LZMA 4.32.x . Dans la pluspart des cas, il est possible de +remplacer les outils LZMA par les outils XZ sans casser les scripts +existants. Il existe cependant certaines incompatibilités qui peuvent +parfois poser des problèmes. +. +.SS "Niveaux de préréglage de la compression" +La numérotation des préréglages de niveau de compression est différente +entre les outils \fBxz\fP et LZMA. La différence la plus importante est la +manière dont les tailles de dictionnaire sont affectées aux différents +préréglages. La taille de dictionnaire est à peu près égale à celle +d'utilisation de la mémoire de la décompression. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Niveau;xz;Utilitaires LZMA +\-0;256 KiB;N/A +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +Les différences de tailles des dictionnaires affectent aussi l'utilisation +de la mémoire du compresseur, mais il y a quelques autres différences entre +les outils LZMA et les outils XZ, qui rendent la différence encore plus +grande : +.RS +.PP +.TS +tab(;); +c c c +c n n. +Niveau;xz;Utilitaires LZMA 4.32.x +\-0;3 MiB;N/A +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +Le niveau de préréglage par défaut dans les outils LZMA est \fB\-7\fP alors que +pour les outils XZ c'est \fB\-6\fP, les deux utilisent ainsi un dictionnaire de +8 Mio par défaut. +. +.SS "Fichiers .lzma en flux ou non" +The uncompressed size of the file can be stored in the \fB.lzma\fP header. +LZMA Utils does that when compressing regular files. The alternative is to +mark that uncompressed size is unknown and use end\-of\-payload marker to +indicate where the decompressor should stop. LZMA Utils uses this method +when uncompressed size isn't known, which is the case, for example, in +pipes. +.PP +\fBxz\fP prend en charge la décompression des fichiers \fB.lzma\fP avec ou sans +marqueur de fin de charge utile, mais tous les fichiers \fB.lzma\fP créés par +\fBxz\fP utiliseront un marqueur de fin de charge utile et ont la taille non +compréssée marquée comme inconnue dans l'en\-tête \fB.lzma\fP. Cela peut être un +problème dans quelques situations inhabituelles. Par exemple, un +décompresseur \fB.lzma\fP dans un périphérique embarqué pourrait ne fonctionner +qu'avec des fichiers dont la taille non comprimée est connue. Si vous vous +heurtez à ce problème, vous devez utiliser les utilitaires LZMA ou LZMA SDK +pour créer des fichiers \fB.lzma\fP avec une taille non compressée connue. +. +.SS "Fichiers .lzma non pris en charge" +Le format \fB.lzma\fP autorise des valeurs \fIlc\fP jusqu'à 8, et des valeurs +\fIlp\fP jusqu'à 4. Les outils LZMA peuvent décompresser des fichiers avec tous +les \fIlc\fP et \fIlp\fP, mais créez toujours les fichiers avec \fBlc=3\fP et +\fBlp=0\fP. Créer des fichiers avec d'autres valeurs \fIlc\fP et \fIlp\fP est +possible avec \fBxz\fP et avec LZMA SDK. +.PP +L'implémentation du filtre LZMA1 dans liblzma nécessite que la somme de +\fIlc\fP et \fIlp\fP soit inférieure ou égale à 4. Ainsi, les fichiers \fB.lzma\fP +qui excèdent cette limitation ne peuvent pas être décompressés avec \fBxz\fP. +.PP +Les outils LZMA créent seulement des fichiers \fB.lzma\fP qui ont une taille de +dictionnaire de 2^\fIn\fP (une puissance de 2) mais acceptent les fichiers avec +toutes les tailles de dictionnaire. Libzlma n'accepte que les fichiers +\&\fB.lzma\fP qui ont une taille dictionnaire de 2^\fIn\fP ou +2^\fIn\fP + 2^(\fIn\fP\-1). Cela afin de diminuer les faux positifs lors de la +détection des fichiers \fB.lzma\fP. +.PP +Ces limitations ne devraient pas poser problème en pratique, car +pratiquement tous les fichiers \fB.lzma\fP ont été compressés avec des réglages +que liblzma accepte. +. +.SS "Déchets excédentaires" +Lors de la décompession, l'utilitaire LZMA ignore silencieusement tout ce +qui est après le premier flux \fB.lzma\fP. Dans la majorité des situations, +c'est un bogue. Cela veut dire aussi que les outils LZMA ne gèrent pas la +décompression de fichiers \fB.lzma\fP concaténés. +.PP +S'il reste des données après le premier flux \fB.lzma\fP, \fBxz\fP considère que +le fichier est corrompu sauf si \fB\-\-single\-stream\fP a été utilisé. Cela peut +casser des scripts obscurs qui ont supposé que les déchets de fin de ligne +sont ignorés. +. +.SH NOTES +. +.SS "La sortie compressée peut varier" +La sortie compressée exacte produite par les même fichiers non compressés en +entrée peut varier en fonction des différentes versions de l'utilitaire XZ, +même si les options de compression sont identiques. En effet, il est +possible d'améliorer l'encodeur (compression plus rapide ou meilleure) sans +affecter le format du fichier. La sortie peut même varier entre différentes +compilations de la même version d'utilitaire XZ, si des options de +construction différentes sont utilisées. +.PP +Cela signifie qu'une fois que \fB\-\-rsyncable\fP a été implémenté, les fichiers +résultants ne seront pas nécessairement synchronisables avec rsync à moins +que les nouveaux et anciens fichiers n'aient été compressés avec la même +version de xz. Ce problème peut être résolu si une partie de +l'implémentation est gelée pour garantir la stabilité de la sortie rsyncable +à travers les versions de xz. +. +.SS "Décompresseurs .xz embarqués" +Les implémentations de décompresseur embarqué comme XZ Embedded ne gèrent +pas nécessairement les fichiers créés avec d'autres types de \fIvérification\fP +d'intégrité que \fBnone\fP et \fBCRC32\fP. Comme la valeur par défaut est +\fB\-\-check=crc64\fP, vous devez utiliser \fB\-\-check=none\fP ou \fB\-\-check=crc32\fP +lors de la création de fichiers pour les systèmes embarqués. +.PP +En dehors des systèmes embarqués, tous les décompresseurs de format \fB.xz\fP +gèrent tous les types de \fIvérification\fP ou sont au moins capables de +décompresser le fichier sans effectuer la vérification d'intégrité si ce +type de \fIvérification\fP particulière n'est pas pris en charge. +.PP +XZ Embedded prend en charge les filtres BCJ, mais seulement avec le décalage +de départ par défaut. +. +.SH EXEMPLES +. +.SS Bases +Compresser le fichier \fItoto\fP en \fItoto.xz\fP en utilisant le niveau de +compression par défaut (\fB\-6\fP) et supprimer \fItoto\fP si la compression +réussit : +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +Décompresser \fIbidule.xz\fP en \fIbidule\fP et ne pas supprimer \fIbidule.xz\fP même +si la compression réussit : +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +Create \fIbaz.tar.xz\fP with the preset \fB\-4e\fP (\fB\-4 \-\-extreme\fP), which is +slower than the default \fB\-6\fP, but needs less memory for compression and +decompression (48\ MiB and 5\ MiB, respectively): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +Un mélange de fichiers compressés et non compressés peuvent être +décompressés vers la sortie standard avec une simple commande : +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Compression en parallèle de plusieurs fichiers" +Sur GNU et *BSD, \fBfind\fP(1) et \fBxargs\fP(1) peuvent être utilisés pour mettre +en parallèle la compression de plusieurs fichiers : +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +L'option \fBP\fP passée à \fBxargs\fP(1) fixe le nombre de processus \fBxz\fP en +parallèles. La meilleure valeur pour l'option \fBn\fP dépend du nombre de +fichiers à compresser. S\-il n'y a que quelques fichiers, la valeur sera +probablement 1 ; avec des dizaines de milliers de fichiers, 100 ou même plus +serait approprié pour réduire le nombre de processus \fBxz\fP que \fBxargs\fP(1) +créera éventuellement. +.PP +L'option \fB\-T1\fP de \fBxz\fP est là pour le forcer en mode mono\-thread, car +\fBxargs\fP(1) est utilisé pour contrôler la quantité de mise en parallèle. +. +.SS "Mode robot" +Calculer combien d'octets ont été économisés au total après avoir compressé +plusieurs fichiers : +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Un script peut vouloir savoir qu'il utilise une version suffisamment récente +de \fBxz\fP. Le script \fBsh\fP(1) suivant vérifie que le numéro de version de +l'outil \fBxz\fP soit au minimum 5.0.0. Cette méthode est compatible avec les +vieilles versions bêta, qui ne gèrent pas l'option \fB\-\-robot\fP : +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Your xz is too old." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Régler une limite d'utilisation de la mémoire pour la décompression en +utilisant \fBXZ_OPT\fP, mais si une limite a déjà été définie, ne pas +l'augmenter : +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Chaînes de filtres de compresseur personnalisées" +L'utilisation la plus simple des chaînes de filtres personnalisées est la +personnalisation d'un préréglage LZMA2. Cela peut être utile, car les +préréglages ne couvrent qu'un sous\-ensemble des réglages de compression +potentiellement utiles. +.PP +Les colonnes CompCPU des tableaux des descriptions des options \fB\-0\fP à \fB\-9\fP +et \fB\-\-extreme\fP sont utiles lors de la personnalisation des préréglages +LZMA2. Voici les parties pertinentes recueillies à partir de ces deux +tableaux : +.RS +.PP +.TS +tab(;); +c c +n n. +Préréglage;CompCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +If you know that a file requires somewhat big dictionary (for example, 32\ MiB) to compress well, but you want to compress it quicker than \fBxz \-8\fP +would do, a preset with a low CompCPU value (for example, 1) can be +modified to use a bigger dictionary: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +Avec certains fichiers, la commande ci\-dessus peut être plus rapide que +\fBxz\-6\fP tout en compressant bien mieux. Cependant, il faut souligner que +seuls certains fichiers bénéficient d'un grand dictionnaire tout en gardant +la valeur de CompCPU faible. La siutation la plus évidente où un gros +dictionnaire peut baucoup aider, est une archive contenant des fichiers très +similaires de quelques megaoctets chacun. La taille de dictionnaire doit +être significativement plus grosse que tout fichier individuel pour +permettre à LZMA2 de tirer pleinement partie des similarités entre des +fichiers consécutifs. +.PP +Si une utilisation de la mémoire élevée pour la compression et décompression +convient, et que le fichier à compresser a une taille de plusieurs centaines +de megaoctets, il peut être utile d'utiliser un plus gros dictionnaire que +celui fourni par \fBxz\-9\fP (64 Mio) : +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +Utiliser \fB\-vv\fP (\fB\-\-verbose\-\-verbose\fP) comme dans l'exemple ci\-dessus peut +être utile pour voir les besoins en mémoire du compresseur et du +décompresseur. Rappelez\-vous qu'utiliser un dictionnaire plus gros que la +taille du fichier non compressé est un gachis de mémoire, donc la commande +ci\-dessus n'est pas utile pour les petits fichiers. +.PP +Sometimes the compression time doesn't matter, but the decompressor memory +usage has to be kept low, for example, to make it possible to decompress the +file on an embedded system. The following command uses \fB\-6e\fP (\fB\-6 \-\-extreme\fP) as a base and sets the dictionary to only 64\ KiB. The +resulting file can be decompressed with XZ Embedded (that's why there is +\fB\-\-check=crc32\fP) using about 100\ KiB of memory. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +If you want to squeeze out as many bytes as possible, adjusting the number +of literal context bits (\fIlc\fP) and number of position bits (\fIpb\fP) can +sometimes help. Adjusting the number of literal position bits (\fIlp\fP) +might help too, but usually \fIlc\fP and \fIpb\fP are more important. For +example, a source code archive contains mostly US\-ASCII text, so something +like the following might give slightly (like 0.1\ %) smaller file than \fBxz \-6e\fP (try also without \fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +Using another filter together with LZMA2 can improve compression with +certain file types. For example, to compress a x86\-32 or x86\-64 shared +library using the x86 BCJ filter: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +Notez que l'ordre des options de filtre est significatif. Si \fB\-\-x86\fP est +indiqué après \fB\-\-lzma2\fP, \fBxz\fP donnera une erreur, car il ne peut y avoir +aucun filtre après LZMA2, et aussi parce que le filtre BCJ x86 ne peut pas +être utilisé comme dernier filtre dans la chaîne. +.PP +Le filtre Delta associé à LZMA2 peut donner de bons résultats avec les +images bitmap. Cela devrait habituellement battre PNG, qui a quelques +filtres avancés supplémentaires qu'un simple delta, mais qui utilise Deflate +pour la compression effective. +.PP +The image has to be saved in uncompressed format, for example, as +uncompressed TIFF. The distance parameter of the Delta filter is set to +match the number of bytes per pixel in the image. For example, 24\-bit RGB +bitmap needs \fBdist=3\fP, and it is also good to pass \fBpb=0\fP to LZMA2 to +accommodate the three\-byte alignment: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +If multiple images have been put into a single archive (for example, +\&\fB.tar\fP), the Delta filter will work on that too as long as all images have +the same number of bytes per pixel. +. +.SH "VOIR AUSSI" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/fr/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/fr/xzdec.1 new file mode 100644 index 0000000000..cd31d6c9fa --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/fr/xzdec.1 @@ -0,0 +1,90 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" french translation of XZ Utils man +.\" Copyright (C) 2021 Debian French l10n team +.\" Translator +.\" bubu , 2021. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 2024\-04\-08 Tukaani "Utilitaires XZ" +.SH NOM +xzdec, lzmadec \- Small .xz et .lzma decompresseurs +.SH SYNOPSIS +\fBxzdec\fP [\fIoption...\fP] [\fIfichier...\fP] +.br +\fBlzmadec\fP [\fIoption...\fP] [\fIfichier...\fP] +.SH DESCRIPTION +\fBxzdec\fP est un outil uniquement de décompression, basé sur liblzma pour les +fichiers \fB.xz\fP (et seulement \fB.xz\fP). \fBxzdec\fP est destiné à remplacer +\fBxz\fP(1) dans les situations les plus courantes où un script a été écrit +pour utiliser \fBxz \-\-decompress \-\-stdout\fP (et possiblement quelques autres +options courantes) pour décompresser des fichiers \fB.xz\fP. \fBlzmadec\fP est +identique à \fBxzdec\fP, sauf que \fBlzmadec\fP prend en charge les fichiers +\&\fB.lzma\fP au lieu des fichiers \fB.xz\fP. +.PP +Pour réduire la taille de l'exécutable, \fBxzdec\fP ne prend en charge ni le +multithreading ni la localisation et ne lit pas les options des variables +d'environnement \fBXZ_DEFAULTS\fP et \fBXZ_OPT\fP. \fBxzdec\fP ne gère pas +l'affichage d'information sur la progression du traitement : envoyer +\fBSIGINFO\fP à \fBxzdec\fP ne fait rien, mais envoyer \fBSIGUSR1\fP termine le +processus au lieu d'afficher de l'information sur la progression. +.SH OPTIONS +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +Ignoré pour la compatibilité avec \fBxz\fP(1), \fBxzdec\fP ne gère que la +décompression. +.TP +\fB\-k\fP, \fB\-\-keep\fP +Ignoré pour la compatibilité avec \fBxz\fP(1), \fBxzdec\fP ne crée ni ne supprime +jamais aucun fichier. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Ignoré pour la compatibilité avec \fBxz\fP(1), \fBxzdec\fP écrit toujours les +données décompressées sur la sortie standard. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Spécifier cela une fois ne fait rien, car \fBxzdec\fP n'affiche jamais aucun +avertissement ou notification. Spécifier cela deux fois pour supprimer les +erreurs. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Ignoré pour la compatibilité avec \fBxz\fP(1), \fBxzdec\fP n'utilise jamais le +satut de sortie 2. +.TP +\fB\-h\fP, \fB\-\-help\fP +Afficher un message d'aide et quitter. +.TP +\fB\-V\fP, \fB\-\-version\fP +Afficher le numéro de version de \fBxzdec\fP et liblzma. +.SH "STATUT DE SORTIE" +.TP +\fB0\fP +Tout s'est bien passé. +.TP +\fB1\fP +Une erreur est survenue. +.PP +A la différence de \fBxz\fP(1),\fBxzdec\fP n'a pas de messages d'avertissement, et +donc le statut de sortie 2 n'est pas utilisé par \fBxzdec\fP. +.SH NOTES +Utilisez \fBxz\fP(1) au lieu de \fBxzdec\fP ou \fBlzmadec\fP pour un usage normal de +tous les jours. \fBxzdec\fP ou \fBlzmadec\fP ne sont utiles que pour les +situations où il est important d'avoir un plus petit décompresseur que le +\fBxz\fP(1) complet. +.PP +\fBxzdec\fP et \fBlzmadec\fP ne sont en fait pas vraiment si petits. La taille +peut être encore réduite en abandonnant des fonctionnalités de liblzma au +moment de la compilation, mais cela ne devrait pas être fait pour des +exécutables distribués sur des systèmes d'exploitation classique non +embarqués. Si vous avez besoin d'un décompresseur vraiment petit, pensez à +utiliser XZ Embedded. +.SH "VOIR AUSSI" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/fr/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/fr/xzless.1 new file mode 100644 index 0000000000..797382bd51 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/fr/xzless.1 @@ -0,0 +1,49 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" french translation of XZ Utils man +.\" Copyright (C) 2021 Debian French l10n team +.\" Translator +.\" bubu , 2021. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 2025\-03\-06 Tukaani "Utilitaires XZ" +.SH NOM +xzless, lzless \- Voir le contenu des fichiers (texte) compressés xz ou lzma +.SH SYNOPSIS +\fBxzless\fP [\fIfichier\fP...] +.br +\fBlzless\fP [\fIfile\fP...] (DEPRECATED) +.SH DESCRIPTION +\fBxzless\fP is a filter that displays text from compressed files to a +terminal. Files supported by \fBxz\fP(1) are decompressed; other files are +assumed to be in uncompressed form already. If no \fIfiles\fP are given, +\fBxzless\fP reads from standard input. +.PP +\fBxzless\fP utilise \fBless\fP(1) pour afficher sa sortie. Contrairement à +\fBxzmore\fP, son choix d'afficheur ne peut pas être modifié en indiquant une +variable d'environnement. Les commandes sont basées sur \fBmore\fP(1) et +\fBvi\fP(1) et permettent des déplacements en avant et en arrière et des +recherches. Voir le manuel de \fBless\fP(1) pour plus d'information. +.PP +The command named \fBlzless\fP is provided for backward compatibility with LZMA +Utils. It is deprecated and will be removed in a future version. +.SH ENVIRONNEMENT +.TP +\fBLESSMETACHARS\fP +Une liste de caractères spéciaux pour l'interpréteur. Définis par \fBxzless\fP +à moins qu'ils ne l'aient déjà été dans l'environnement. +.TP +\fBLESSOPEN\fP +Définir en ligne de commande le décompresseur \fBxz\fP(1) à invoquer pour +préparer les fichiers en entrée pour \fBless\fP(1). +.SH "VOIR AUSSI" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/it/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/it/lzmainfo.1 new file mode 100644 index 0000000000..dadc8a8486 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/it/lzmainfo.1 @@ -0,0 +1,45 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Italian translations for xz-man package +.\" Luca Vercelli , 2024-2025 +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 30/06/2013 Tukaani "XZ Utils" +.SH NOME +lzmainfo \- mostra le informazioni nell'intestazione di file .lzma +.SH SINOSSI +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIFILE...\fP] +.SH DESCRIZIONE +\fBlzmainfo\fP mostra le informazioni contenute nell'intestazione del file +\&\fB.lzma\fP. Legge i primi 13 byte del \fIFILE\fP specificato, decodifica +l'intestazione, e la stampa su standard output in formato leggibile +dall'uomo. Se nessun \fIFILE\fP è specificato o se \fIFILE\fP è \fB\-\fP, viene letto +lo standard input. +.PP +Di solito le informazioni più interessanti sono la dimensione non compressa +e la dimensione del dizionario. Le dimensioni non compresse possono essere +visualizzate solo se il file è nella variante di formato \fB.lzma\fP "senza +flussi". La quantità di memoria necessaria per decomprimere il file è di +alcune dozzine di kilobyte più la dimensione del dizionario. +.PP +\fBlzmainfo\fP è incluso nelle XZ Utils principalmente per retrocompatibilità +con le LZMA Utils. +.SH "CODICE DI USCITA" +.TP +\fB0\fP +Tutto bene. +.TP +\fB1\fP +È avvenuto un errore. +.SH BUG +\fBlzmainfo\fP usa \fBMB\fP mentre il suffisso corretto dovrebbe essere \fBMiB\fP +(2^20 byte). Questo serve per rendere l'output compatibile con quello delle +LZMA Utils. +.SH "VEDERE ANCHE" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/it/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/it/xz.1 new file mode 100644 index 0000000000..53a915947b --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/it/xz.1 @@ -0,0 +1,2080 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Italian translations for xz-man package +.\" Luca Vercelli , 2024-2025 +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 08/03/2025 Tukaani "XZ Utils" +. +.SH NOME +xz, unxz, xzcat, lzma, unlzma, lzcat \- Comprime o decomprime file .xz e +\&.lzma +. +.SH SINOSSI +\fBxz\fP [\fIOPZIONE...\fP] [\fIFILE...\fP] +. +.SH "ALIAS DEI COMANDI" +\fBunxz\fP è equivalente a \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP è equivalente a \fBxz \-\-decompress \-\-stdout\fP. +.br +\fBlzma\fP è equivalente a \fBxz \-\-format=lzma\fP. +.br +\fBunlzma\fP è equivalente a \fBxz \-\-format=lzma \-\-decompress\fP. +.br +\fBlzcat\fP è equivalente a \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP. +.PP +Quando si scrivono script che richiedono di decomprimere file, si raccomanda +di utilizzare sempre il comando \fBxz\fP con argomenti appropriati (\fBxz \-d\fP o +\fBxz \-dc\fP) al posto degli alias \fBunxz\fP e \fBxzcat\fP. +. +.SH DESCRIZIONE +\fBxz\fP è uno strumento di compressione dati generico con sintassi della riga +di comando simile a \fBgzip\fP(1) e \fBbzip2\fP(1). Il formato file nativo è +\&\fB.xz\fP, ma sono supportati anche il formato tradizionale \fB.lzma\fP usato +dalle LZMA Utils e i flussi grezzi (raw) compressi senza intestazioni di +formato contenitore. In più, è supportata la decompressione del formato +\&\fB.lz\fPusato da \fBlzip\fP. +.PP +\fBxz\fP comprime o decomprime ogni \fIFILE\fP a seconda della modalità di +funzionamento selezionata. Se nessun \fIFILE\fP è indicato o se \fIFILE\fP è \fB\-\fP, +\fBxz\fP legge dallo standard input e scrive i dati processati sullo standard +output. \fBxz\fP si rifiuterà (stamperà un errore e salterà il \fIFILE\fP) di +scrivere dati compressi sullo standard output se è il +terminale. Analogamente, \fBxz\fP si rifiuterà di leggere dati compressi dallo +standard input se è il terminale. +.PP +A meno che non sia specificato \fB\-\-stdout\fP, i \fIFILE\fP diversi da \fB\-\fP +vengono scritti in un nuovo file il cui nome deriva dal nome del \fIFILE\fP +sorgente: +.IP \(bu 3 +Quando si comprime, il suffisso del file destinazione (\fB.xz\fP or \fB.lzma\fP) +viene accodato al nome del file sorgente per ottenere il nome del file +destinazione. +.IP \(bu 3 +Quando si decomprime, i suffissi \fB.xz\fP, \fB.lzma\fP, o \fB.lz\fP vengono rimossi +dal nome del file per ottenere il nome del file destinazione. \fBxz\fP +riconosce anche i suffissi \fB.txz\fP e \fB.tlz\fP, e li sostituisce con il +suffisso \fB.tar\fP. +.PP +Se il file di destinazione esiste già, viene visualizzato un errore e +\fIFILE\fP viene saltato. +.PP +A meno che non si scriva nello standard output, \fBxz\fP visualizzerà un +avvertimento e salterà il \fIFILE\fP se si verifica una delle seguenti +condizioni: +.IP \(bu 3 +\fIFILE\fP non è un file regolare. I collegamenti simbolici non vengono +seguiti, quindi non sono considerati file regolari. +.IP \(bu 3 +\fIFILE\fP ha più di un collegamento "hard". +.IP \(bu 3 +\fIFILE\fP ha impostati i bit setuid, setgid, o sticky. +.IP \(bu 3 +La modalità di funzionamento è impostata sulla compressione e il \fIFILE\fP ha +già un suffisso del formato di file di destinazione (\fB.xz\fP o \fB.txz\fP quando +si comprime nel formato \fB.xz\fP e \fB.lzma\fP o \fB.tlz\fP quando si comprime nel +formato \fB.lzma\fP). +.IP \(bu 3 +La modalità di funzionamento è impostata sulla decompressione e il \fIFILE\fP +non ha un suffisso di nessuno dei formati di file supportati (\fB.xz\fP, +\&\fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP, o \fB.lz\fP). +.PP +Dopo aver compresso o decompresso correttamente il \fIFILE\fP, \fBxz\fP copia il +proprietario, il gruppo, le autorizzazioni, l'ora di accesso e l'ora di +modifica dal \fIFILE\fP di origine al file di destinazione. Se la copia del +gruppo fallisce, le autorizzazioni vengono modificate in modo che il file di +destinazione non diventi accessibile agli utenti che non disponevano +dell'autorizzazione per accedere al \fIFILE\fP di origine. \fBxz\fP non supporta +ancora la copia di altri metadati, ad esempio elenchi di controllo degli +accessi o attributi estesi. +.PP +Una volta che il file di destinazione è stato chiuso con successo, il +\fIFILE\fP sorgente viene rimosso, a meno che sia stato specificato +\fB\-\-keep\fP. Il \fIFILE\fP sorgente non viene mai rimosso se l'output è scritto +sullo standard output, né se si verifica un errore. +.PP +L'invio di \fBSIGINFO\fP o \fBSIGUSR1\fP al processo \fBxz\fP comporta la stampa +delle informazioni sullo stato di avanzamento sullo standard error. Questo +ha solo un uso limitato poiché quando lo standard error è un terminale, +utilizzando \fB\-\-verbose\fP verrà visualizzato un indicatore di avanzamento che +si aggiorna automaticamente. +. +.SS "Utilizzo memoria" +L'utilizzo della memoria di \fBxz\fP varia da poche centinaia di kilobyte a +diversi gigabyte a seconda delle impostazioni di compressione. Le +impostazioni utilizzate durante la compressione di un file determinano i +requisiti di memoria del decompressore. In genere il decompressore richiede +dal 5\% al 20\% della quantità di memoria necessaria al compressore durante +la creazione del file. Ad esempio, la decompressione di un file creato con +\fBxz \-9\fP al momento richiede 65\ MiB di memoria. Ancora, è possibile avere +file \fB.xz\fP che richiedono diversi gigabyte di memoria per la +decompressione. +.PP +Soprattutto gli utenti di sistemi più vecchi possono trovare fastidiosa +l'eventualità di un utilizzo molto elevato di memoria. Per evitare +spiacevoli sorprese, \fBxz\fP dispone di un limitatore di utilizzo della +memoria incorporato, che è disabilitato per impostazione predefinita. Anche +se alcuni sistemi operativi forniscono modi per limitare l'utilizzo della +memoria dei processi, fare affidamento su questi non è stato ritenuto +sufficientemente flessibile (ad esempio, l'uso di \fBulimit\fP(1) per limitare +la memoria virtuale tende a paralizzare \fBmmap\fP(2)). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +Il limitatore di utilizzo della memoria può essere abilitato con l'opzione +della riga di comando \fB\-\-memlimit=\fP\fILIMITE\fP. Spesso è più conveniente +abilitare il limitatore per impostazione predefinita impostando la variabile +d'ambiente \fBXZ_DEFAULTS\fP, ad esempio, \fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. È +possibile impostare separatamente i limiti per la compressione e la +decompressione utilizzando \fB\-\-memlimit\-compress=\fP\fILIMITE\fP and +\fB\-\-memlimit\-decompress=\fP\fILIMITE\fP. L'uso di queste due opzioni al di fuori +di \fBXZ_DEFAULTS\fP è raramente utile perché una singola esecuzione di \fBxz\fP +non può eseguire sia la compressione che la decompressione e +\fB\-\-memlimit=\fP\fILIMITE\fP (or \fB\-M\fP \fILIMITE\fP) è più breve da digitare sulla +riga di comando. +.PP +Se il limite di utilizzo della memoria specificato viene superato durante la +decompressione, \fBxz\fP visualizzerà un errore e la decompressione del file +fallirà. Se il limite viene superato durante la compressione, \fBxz\fP tenterà +di ridimensionare le impostazioni in modo che il limite non venga più +superato (tranne quando si usa \fB\-\-format=raw\fP o \fB\-\-no\-adjust\fP). In questo +modo l'operazione non fallirà a meno che il limite sia molto basso. Il +ridimensionamento delle impostazioni viene eseguito in piccole differenze +che non corrispondono ai livelli di compressione preimpostati, ad esempio, +se il limite è solo leggermente inferiore alla quantità richiesta per \fBxz \-9\fP, le impostazioni saranno ridimensionate solo un poco, non proprio fino a +\fBxz \-8\fP. +. +.SS "Concatenazione e padding con file .xz" +È possibile concatenare i file \fB.xz\fP così come sono. \fBxz\fP decomprimerà +tali file come se fossero un singolo file \fB.xz\fP. +.PP +È possibile inserire un padding tra le parti concatenate o dopo l'ultima +parte. Il padding deve essere costituito da byte "null" e la dimensione del +padding deve essere un multiplo di quattro byte. Questo può essere utile, ad +esempio, se il file \fB.xz\fP è memorizzato su un supporto che misura le +dimensioni dei file in blocchi di 512 byte. +.PP +Concatenazione e padding non sono permessi con file \fB.lzma\fP o con flussi +grezzi. +. +.SH OPZIONI +. +.SS "Suffissi interi e valori speciali" +Nella maggior parte dei casi in cui è previsto un argomento intero, è +supportato un suffisso facoltativo per indicare facilmente numeri interi di +grandi dimensioni. Non deve esserci alcuno spazio tra il numero intero e il +suffisso. +.TP +\fBKiB\fP +Moltiplica l'intero per 1024 (2^10). \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP, e \fBKB\fP +sono accettati come sinonimi di \fBKiB\fP. +.TP +\fBMiB\fP +Moltiplica l'intero per 1.048.576 (2^20). \fBMi\fP, \fBm\fP, \fBM\fP, e \fBMB\fP sono +accettati come sinonimi di \fBMiB\fP. +.TP +\fBGiB\fP +Moltiplica l'intero per 1.073.741.824 (2^30). \fBGi\fP, \fBg\fP, \fBG\fP, e \fBGB\fP +sono accettati come sinonimi di \fBGiB\fP. +.PP +Il valore speciale \fBmax\fP può essere utilizzato per indicare il valore +intero massimo supportato dall'opzione. +. +.SS "Modalità operativa" +Se vengono fornite più opzioni di modalità operativa, l'ultima ha effetto. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Compressione. Questa è la modalità operativa predefinita quando non viene +specificata alcuna opzione della modalità operativa e non è determinata +nessun'altra modalità operativa dal nome del comando (ad esempio, \fBunxz\fP +implica \fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Dopo che la compressione è terminata con successo, il file origine viene +rimosso a meno che si stia scrivendo su standard output o che venga +specificato \fB\-\-keep\fP. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Decompressione. Dopo che la decompressione è terminata con successo, il file +origine viene rimosso a meno che si stia scrivendo su standard output o che +venga specificato \fB\-\-keep\fP. +.TP +\fB\-t\fP, \fB\-\-test\fP +Testa l'integrità dei \fIFILE\fP compressi. Questa opzione è equivalente a +\fB\-\-decompress \-\-stdout\fP tranne per il fatto che i dati decompressi vengono +scartati invece di essere scritti nello standard output. Nessun file viene +creato o rimosso. +.TP +\fB\-l\fP, \fB\-\-list\fP +Stampa le informazioni sul \fIFILE\fP compresso. Non viene prodotto alcun +output non compresso e non viene creato o rimosso alcun file. In modalità +elenco, il programma non è in grado di leggere i dati compressi dallo +standard input o da altre fonti che non permettano la ricerca. +.IP "" +Il tracciato predefinito mostra le informazioni di base sui \fIFILE\fP, un file +per riga. Per ottenere informazioni più dettagliate, usare anche l'opzione +\fB\-\-verbose\fP. Per avere ancora più informazioni, usare \fB\-\-verbose\fP due +volte, ma si noti che questo può essere lento, perché ottenere tutte le +informazioni extra richiede molte estrazioni. La larghezza dell'output +dettagliato supera gli 80 caratteri, quindi il reindirizzamento dell'output, +ad esempio, a \fBless\ \-S\fP può essere utile se il terminale non è +sufficientemente ampio. +.IP "" +L'output esatto può variare tra le versioni di \fBxz\fP e le diverse +impostazioni locali. Per un output leggibile dalla macchina si dovrebbe +utilizzare \fB\-\-robot \-\-list\fP. +. +.SS "Modificatori dell'operazione" +.TP +\fB\-k\fP, \fB\-\-keep\fP +Non elimina i file input. +.IP "" +A partire da \fBxz\fP 5.2.6, questa opzione fa sì che \fBxz\fP comprima o +decomprima anche se l'input è un collegamento simbolico a un file regolare, +ha più di un collegamento fisico o ha il bit setuid, setgid o sticky +impostato. I bit setuid, setgid e sticky non vengono copiati nel file di +destinazione. Nelle versioni precedenti questo veniva fatto solo con +\fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Questa opzione ha diverse conseguenze: +.RS +.IP \(bu 3 +Se il file di destinazione esiste già, lo elimina prima di comprimere o +decomprimere. +.IP \(bu 3 +Comprime o decomprime anche se l'input è un collegamento simbolico a un file +regolare, ha più di un collegamento "hard", o ha il bit setuid, setgid o +sticky impostato. I bit setuid, setgid e sticky non sono copiati sul file +destinazione. +.IP \(bu 3 +Quando usato con \fB\-\-decompress\fP \fB\-\-stdout\fP e \fBxz\fP non riesce a +riconoscere il tipo di file sorgente, copia il file sorgente così com'è +sullo standard output. Questo permette a \fBxzcat\fP \fB\-\-force\fP di essere usato +come \fBcat\fP(1) per file che non siano stati compressi con \fBxz\fP. Si noti che +in futuro \fBxz\fP potrebbe supportare nuovi formati di file compressi, il che +potrebbe portare \fBxz\fP a decomprimere più tipi di file anziché copiarli come +sono sullo standard output. \fB\-\-format=\fP\fIFORMATO\fP può essere usato per +forzare \fBxz\fP a decomprimere solo un singolo formato di file. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Scrive i dati compressi o decompressi nello standard output anziché in un +file. Implica \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +Decomprime solo il primo flusso \fB.xz\fP, e ignora automaticamente i possibili +dati di input rimanenti che seguono il flusso. Normalmente questi dati +sporchi finali portano \fBxz\fP a visualizzare un errore. +.IP "" +\fBxz\fP non decomprime mai più di un flusso dai file \fB.lzma\fP o dai flussi +grezzi, ma questa opzione fa comunque in modo che \fBxz\fP ignori i possibili +dati finali dopo il file \fB.lzma\fP o il flusso grezzo. +.IP "" +Questa opzione non ha effetto se la modalità operativa non è \fB\-\-decompress\fP +o \fB\-\-test\fP. +.IP "" +Dalla versione \fBxz\fP 5.7.1alpha, \fB\-\-single\-stream\fP implica \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +Disabilita la creazione di file sparsi. Per impostazione predefinita, se si +esegue la decompressione in un file regolare, \fBxz\fP tenta di rendere il file +sparso se i dati decompressi contengono lunghe sequenze di zeri +binari. Funziona anche quando si scrive su standard output, purché lo +standard output sia collegato a un file regolare e siano soddisfatte alcune +condizioni aggiuntive per renderlo sicuro. La creazione di file sparsi può +risparmiare spazio su disco e velocizzare la decompressione riducendo la +quantità di I/O su disco. +.TP +\fB\-S\fP \fI.SUFFISSO\fP, \fB\-\-suffix=\fP\fI.SUFFISSO\fP +Durante la compressione, utilizzare \fI.suf\fP come suffisso per il file di +destinazione anziché \fB.xz\fP o \fB.lzma\fP. Se non si scrive nello standard +output e il file di origine ha già il suffisso \fI.suf\fP, viene visualizzato +un avvertimento e il file viene ignorato. +.IP "" +Quando si decomprime, accetta i file con suffisso \fI.suf\fP in aggiunta a +quelli con suffisso \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP, o \fB.lz\fP. Se il file +sorgente ha suffisso \fI.suf\fP, il suffisso viene rimosso per ottenere il nome +del file destinazione. +.IP "" +Quando si comprimono o decomprimono flussi grezzi (\fB\-\-format=raw\fP), il +suffisso deve sempre essere specificato, a meno che si scriva sullo standard +output, perché non esiste un suffisso predefinito per i flussi grezzi. +.TP +\fB\-\-files\fP[\fB=\fP\fIFILE\fP] +Legge i nomi dei file da processare da \fIFILE\fP; se \fIFILE\fP è omesso, i nomi +dei file vengono letti dallo standard input. I nomi dei file devono essere +terminati da un carattere "a capo". Un trattino (\fB\-\fP) è considerato come un +nome di file regolare; non indica lo standard input. Se vengono forniti +anche dei nomi di file come argomenti della riga di comando, questi sono +processati prima di quelli letti da \fIFILE\fP. +.TP +\fB\-\-files0\fP[\fB=\fP\fIFILE\fP] +Questo è identico a \fB\-\-files\fP[\fB=\fP\fIFILE\fP] tranne per il fatto che ogni +nome di file deve terminare con il carattere null. +. +.SS "Formato file di base e opzioni di compressione" +.TP +\fB\-F\fP \fIFORMATO\fP, \fB\-\-format=\fP\fIFORMATO\fP +Specifica il \fIFORMATO\fP del file da comprimere o decomprimere: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +Questa è l'impostazione predefinita. Quando si comprime, \fBauto\fP è +equivalente a \fBxz\fP. Quando si decomprime, il formato del file input viene +rilevato automaticamente. Si noti che per i flussi grezzi (creati con +\fB\-\-format=raw\fP) non è possibile il rilevamento automatico. +.TP +\fBxz\fP +Comprime nel formato di file \fB.xz\fP, oppure accetta solo file \fB.xz\fP durante +la decompressione. +.TP +\fBlzma\fP, \fBalone\fP +Comprime nel formato tradizionale \fB.lzma\fP, oppure accetta solo file +\&\fB.lzma\fP per la decompressione. Il nome alternativo \fBalone\fP è fornito per +retrocompatibilità con le LZMA Utils. +.TP +\fBlzip\fP +Accetta solo file \fB.lz\fP per la decompressione. La compressione non è +supportata. +.IP "" +Sono supportate le versioni 0 e 1 del formato \fB.lz\fP. I file in versione 0 +sono stati prodotti da \fBlzip\fP 1.3 e precedenti. Questi file non sono +comuni, ma possono essere trovati negli archivi di file, perché alcuni +pacchetti sorgente erano stati rilasciati in questo formato. Qualcuno +potrebbe anche avere vecchi file personali in questo formato. Il supporto +alla decompressione per la versione di formato 0 è stato rimosso in \fBlzip\fP +1.18. \fBlzip\fP 1.4 e successivi creano i file nella versione di formato 1. +.TP +\fBraw\fP +Comprime o decomprime un flusso grezzo (senza intestazione). Questo è inteso +solamente per utenti avanzati. Per decodificare flussi grezzi, occorre usare +\fB\-\-format=raw\fP e specificare esplicitamente la catena dei filtri, che +normalmente sarebbero conservati nell'intestazione. +.RE +.TP +\fB\-C\fP \fICONTROLLO\fP, \fB\-\-check=\fP\fICONTROLLO\fP +Specifica il tipo di controllo di integrità. Il controllo viene calcolato +dai dati non compressi e memorizzato nel file \fB.xz\fP. Questa opzione ha +effetto solo quando si comprime nel formato \fB.xz\fP; il formato \fB.lzma\fP non +supporta i controlli di integrità. Il controllo di integrità (se presente) +viene verificato quando il file \fB.xz\fP viene decompresso. +.IP "" +Tipi di \fICONTROLLI\fP supportati: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +Non calcola proprio il controllo di integrità. Questo in genere è una +pessima idea. Può essere utile quando l'integrità dei dati viene comunque +verificata con altri mezzi. +.TP +\fBcrc32\fP +Calcola la firma CRC32 usando il polinomio di IEEE\-802.3 (Ethernet). +.TP +\fBcrc64\fP +Calcola la firma CRC64 usando il polinomio di ECMA\-182. Questa è +l'impostazione predefinita, perché è leggermente migliore della CRC32 nel +rilevare i file danneggiati e la differenza di velocità è trascurabile. +.TP +\fBsha256\fP +Calcola la firma SHA\-256. Questo è un po' più lento che CRC32 e CRC64. +.RE +.IP "" +L'integrità delle intestazioni \fB.xz\fP viene sempre verificata con CRC32. Non +è possibile modificarlo o disabilitarlo. +.TP +\fB\-\-ignore\-check\fP +Non verifica il controllo di integrità dei dati compressi durante la +decompressione. Il valore CRC3 nelle intestazioni \fB.xz\fP sarà ancora +verificata normalmente. +.IP "" +\fBNon usare questa opzione se non si è consci di cosa si sta facendo.\fP +Possibili ragioni per utilizzare questa opzione: +.RS +.IP \(bu 3 +Tentativo di recupero dei dati da un file .xz corrotto. +.IP \(bu 3 +Accelerazione della decompressione. Questo è importante soprattutto con +SHA\-256 o con i file che sono stati compressi molto bene. Si consiglia di +non utilizzare questa opzione per questo scopo, a meno che l'integrità del +file non venga verificata esternamente in altro modo. +.RE +.TP +\fB\-0\fP ... \fB\-9\fP +Selezionare un livello di compressione preimpostato. Il valore predefinito è +\fB\-6\fP. Se vengono specificati più livelli preimpostati, l'ultimo ha +effetto. Se è già stata specificata una catena di filtri personalizzata, +l'impostazione di un livelli preimpostati cancella la catena di filtri +personalizzata. +.IP "" +Le differenze tra i livelli preimpostati sono più significative rispetto a +\fBgzip\fP(1) e \fBbzip2\fP(1). Le impostazioni di compressione selezionate +determinano i requisiti di memoria del decompressore, quindi l'utilizzo di +un livello preimpostato troppo alto potrebbe rendere difficile la +decompressione del file su un vecchio sistema con poca RAM. Specificamente, +\fBnon è una buona idea utilizzare ciecamente \-9 per tutto\fP come spesso +accade per \fBgzip\fP(1) e \fBbzip2\fP(1). +.RS +.TP +\fB\-0\fP ... \fB\-3\fP +Questi sono livelli preimpostati piuttosto veloci. \fB\-0\-\fP a volte è più +veloce di \fBgzip \-9\fP e comprime molto meglio. Quelli più alti hanno spesso +una velocità paragonabile a \fBbzip2\fP(1) con un rapporto di compressione +comparabile o migliore, anche se i risultati dipendono molto dal tipo di +dati che vengono compressi. +.TP +\fB\-4\fP ... \fB\-6\fP +Compressione da buona a molto buona, mantenendo l'utilizzo della memoria del +decompressore ragionevole anche per vecchi sistemi. \fB\-6\fP è il valore +predefinito, che di solito è una buona scelta per distribuire file che +debbano essere decompressi anche su sistemi con solo 16\ MiB di +RAM. (Potrebbe valere la pena di considerare anche \fB\-5e\fP o \fB\-6e\fP. Si veda +\fB\-\-extreme\fP.) +.TP +\fB\-7 ... \-9\fP +Questi sono come \fB\-6\fP ma con requisiti di memoria di compressore e +decompressore più elevati. Sono utili solo quando si comprimono file di +dimensioni superiori a 8\ MiB, 16\ MiB e 32\ MiB, rispettivamente. +.RE +.IP "" +A parità di hardware, la velocità di decompressione è approssimativamente un +numero costante di byte di dati compressi al secondo. In altre parole, +migliore è la compressione, più veloce sarà di solito la decompressione. Ciò +significa anche che la quantità di output non compresso prodotta al secondo +può variare notevolmente. +.IP "" +La tabella seguente riassume le caratteristiche dei livelli preimpostati: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Livello preimpostato;DictSize;CompCPU;CompMem;DecMem +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Descrizioni delle colonne: +.RS +.IP \(bu 3 +DictSize è la dimensione del dizionario LZMA2. È uno spreco di memoria usare +un dizionario più grande della dimensione del file non compresso. Ecco +perché è una buona cosa evitare di usare i livelli preimpostati \fB\-7\fP +\&... \fB\-9\fP quando non c'è reale necessità. Con \fB\-6\fP e inferiori, la quantità +di memoria sprecata in genere è sufficientemente bassa da essere +trascurabile. +.IP \(bu 3 +CompCPU è una rappresentazione semplificata delle impostazioni di LZMA2 che +influenzano la velocità di compressione. Anche la dimensione del dizionario +influenza la velocità, quindi mentre CompCPU è lo stesso per i livelli \fB\-6\fP +\&... \fB\-9\fP, i livelli più alti tendono ancora ad essere un po' più lenti. Per +avere una compressione ancora più lenta e quindi potenzialmente migliore, +utilizzare \fB\-\-extreme\fP. +.IP \(bu 3 +CompMem contiene i requisiti di memoria del compressore in modalità a +singola thread. Può variare leggermente tra le versioni di \fBxz\fP. +.IP \(bu 3 +DecMem contiene i requisiti di memoria del decompressore. In altre parole, +le impostazioni di compressione determinano i requisiti di memoria del +decompressore. L'utilizzo esatto della memoria del decompressore è +leggermente superiore alla dimensione del dizionario LZMA2, ma i valori +nella tabella sono stati arrotondati per eccesso al successivo MiB completo. +.RE +.IP "" +I requisiti di memoria per la modalità a thread multiple sono +significativamente più alti che per la modalità thread singola. Con il +valore predefinito di \fB\-\-block\-size\fP, ogni thread richiede 3*3*dimensione +del dizionario più CompMem oppure DecMem. Ad esempio, 4 thread con il +livello preimpostato \fB\-6\fP hanno bisogno di 660\(en670\ MiB di memoria. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +Utilizzare una variante più lenta del livello preimpostato selezionato +(\fB\-0\fP ... \fB\-9\fP) nella speranza di ottenere un rapporto di compressione +leggermente migliore, ma con un po' di sfortuna questo potrebbe anche +renderlo peggiore. L'utilizzo della memoria del decompressore non è +influenzato, ma l'utilizzo della memoria del compressore aumenta leggermente +ai livelli preimpostati \fB\-0\fP ... \fB\-3\fP. +.IP "" +Dal momento che ci sono due livelli preimpostati con dimensione del +dizionario di 4\ MiB e 8\ MiB, i livelli preimpostati \fB\-3e\fP e \fB\-5e\fP usano +impostazioni leggermente più veloci (minore CompCPU) di \fB\-4e\fP e \fB\-6e\fP, +rispettivamente. In questo modo non ci sono due livelli preimpostati +identici. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Livello preimpostato;DictSize;CompCPU;CompMem;DecMem +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Ad esempio, ci sono un totale di quattro livelli preimpostati che utilizzano +un dizionario da 8\ MiB, il cui ordine dal più veloce al più lento è \fB\-5\fP, +\fB\-6\fP, \fB\-5e\fP, e \fB\-6e\fP. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +Questi sono alias in qualche modo fuorvianti per \fB\-0\fP e \fB\-9\fP, +rispettivamente. Sono forniti solo per retrocompatibilità con le LZMA +Utils. Evitare di utilizzare queste opzioni. +.TP +\fB\-\-block\-size=\fP\fIDIMENSIONE\fP +Quando si comprime in formato \fB.xz\fP, divide i dati input in blocchi da +\fIDIMENSIONE\fP byte. I blocchi vengo compressi indipendentemente l'uno +dall'altro, cosa che aiuta con le thread multiple e rende possibile la +decompressione con accessi casuali limitati. Questa opzione viene usata +tipicamente per sovrascrivere la dimensione predefinita dei blocchi in +modalità a thread multiple, ma può essere utilizzata anche in modalità +thread singola. +.IP "" +In modalità a thread multiple verranno allocati circa il triplo di +\fIDIMENSIONE\fP di byte in ogni thread per il buffering dell'input e +dell'output. La \fIDIMENSIONE\fP predefinita è tre volte la dimensione del +dizionario LZMA2 e comunque almeno 1 MiB. Tipicamente un buon valore è +2\(en4 volte la dimensione del dizionario LZMA2 oppure almeno 1 MiB. Usare +una \fIDIMENSIONE\fP inferiore della dimensione del dizionario LZMA2 causa uno +spreco di RAM, in quanto il buffer del dizionario LZMA2 non verrà mai +riempito completamente. In modalità a thread multiple, la dimensione dei +blocchi è conservata nelle intestazioni dei blocchi. L'informazione sulla +dimensione è richiesta per la decompressione a thread multiple. +.IP "" +Nella modalità a thread singola, per impostazione predefinita non viene +eseguita alcuna suddivisione in blocchi. L'impostazione di questa opzione +non influisce sull'utilizzo della memoria. Nessuna informazione sulle +dimensioni viene memorizzata nelle intestazioni di blocco, quindi i file +creati in modalità a thread singola non saranno identici ai file creati in +modalità a thread multiple. La mancanza di informazioni sulle dimensioni +significa anche che \fBxz\fP non sarà in grado di decomprimere i file in +modalità a thread multiple. +.TP +\fB\-\-block\-list=\fP\fIELEMENTI\fP +Quando si comprime nel formato \fB.xz\fP, inizia un nuovo blocco con una catena +di filtri personalizzata dopo gli intervalli indicati di dati non compressi. +.IP "" +Gli \fIELEMENTI\fP sono un elenco separato da virgole. Ogni elemento è +costituito da un numero di catena di filtri opzionale compreso tra 0 e 9 +seguito da due punti (\fB:\fP) e da una dimensione richiesta di dati non +compressi. L'omissione di un elemento (due o più virgole consecutive) è una +scorciatoia per utilizzare le dimensioni e i filtri dell'elemento +precedente. +.IP "" +Se il file di input è più grande della somma delle dimensioni in +\fIELEMENTI\fP, l'ultimo elemento viene ripetuto fino alla fine del file. Il +valore speciale \fB0\fP può essere utilizzato come ultima dimensione per +indicare che il resto del file deve essere codificato come un singolo +blocco. +.IP "" +È possibile specificare una catena di filtri alternativa per ogni blocco in +combinazione con le opzioni \fB\-\-filters1=\fP\fIFILTRI\fP \&...\& +\fB\-\-filters9=\fP\fIFILTRI\fP. Queste opzioni definiscono catene di filtri con un +identificatore compreso tra 1\(en9. La catena di filtri 0 può essere +utilizzata per indicare la catena di filtri predefinita, che equivale a non +specificare una catena di filtri. L'identificatore della catena di filtri +può essere utilizzato prima della dimensione non compressa, seguita da due +punti (\fB:\fP). Ad esempio, se si specifica +\fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP allora i blocchi verranno +creati utilizzando: +.RS +.IP \(bu 3 +La catena dei filtri specificata da \fB\-\-filters1\fP e un input di 2 MiB +.IP \(bu 3 +La catena dei filtri specificata da \fB\-\-filters3\fP e un input di 2 MiB +.IP \(bu 3 +La catena dei filtri specificata da \fB\-\-filters2\fP e un input di 4 MiB +.IP \(bu 3 +La catena dei filtri specificata da \fB\-\-filters2\fP e un input di 4 MiB +.IP \(bu 3 +La catena di filtri predefinita e l'input di 2 MiB +.IP \(bu 3 +La catena di filtri predefinita e l'input di 4 MiB per ogni blocco fino alla +fine dell'input. +.RE +.IP "" +Se si specifica una dimensione che supera la dimensione del blocco del +codificatore (il valore predefinito in modalità thread oppure il valore +specificato con \fB\-\-block\-size=\fP\fIDIMENSIONE\fP), il codificatore creerà +blocchi aggiuntivi mantenendo i limiti specificati in \fIELEMENTI\fP. Ad +esempio, se si indica \fB\-\-block\-size=10MiB\fP +\fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP e il file input è di 80 MiB, si +otterranno 11 blocchi: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and 1 MiB. +.IP "" +In modalità a thread multiple, le dimensioni dei blocchi vengono memorizzate +nelle intestazioni dei blocchi. Questo non avviene in modalità thread +singola, quindi l'output codificato non sarà identico a quello della +modalità a thread multiple. +.TP +\fB\-\-flush\-timeout=\fP\fITIMEOUT\fP +Quando si comprime, se sono passati più di \fITIMEOUT\fP millisecondi (un +intero positivo) dallo scaricamento precedente e la lettura di ulteriori +input si bloccherebbe, tutti i dati di input in sospeso vengono scaricati +dal codificatore e resi disponibili nel flusso di output. Questo può essere +utile se \fBxz\fP viene usato per comprimere dati in streaming dalla +rete. Piccoli valori del \fITIMEOUT\fP rendono disponibili i dati al ricevente +con un ritardo minimo, mentre valori di \fITIMEOUT\fP grandi danno un miglior +rapporto di compressione. +.IP "" +Questa funzionalità è disabilitata per impostazione predefinita. Se questa +opzione viene specificata più di una volta, l'ultima ha effetto. Il valore +speciale \fITIMEOUT\fP di \fB0\fP può essere utilizzato per disabilitare +esplicitamente questa funzionalità. +.IP "" +Questa funzionalità non è disponibile sui sistemi non\-POSIX. +.IP "" +.\" FIXME +\fBQuesta funzionalità è sperimentale.\fP Attualmente \fBxz\fP non è adatto per +decomprimere il flusso in tempo reale, a causa di come effettua il +buffering. +.TP +\fB\-\-no\-sync\fP +Non sincronizzare il file target e la sua directory sull'unità di +archiviazione prima di rimuovere il file sorgente. Questo può migliorare le +performance se si sta comprimendo o decomprimendo tanti piccoli +file. Tuttavia, se il sistema dovesse andare in crash subito dopo +l'eliminazione, è possibile che il file destinazione non sia ancora stato +scritto sull'unità di archiviazione mentre l'operazione di eliminazione +sì. In questo caso non saranno più disponibili né il file sorgente originale +né il file di destinazione. +.IP "" +Questa opzione ha effetto solamente quando \fBxz\fP deve rimuovere il file +sorgente. Negli altri casi la sincronizzazione non viene eseguita. +.IP "" +La sincronizzazione e \fB\-\-no\-sync\fP sono stati aggiunti nella versione \fBxz\fP +5.7.1alpha. +.TP +\fB\-\-memlimit\-compress=\fP\fILIMITE\fP +Imposta un limite di utilizzo della memoria per la compressione. Se questa +opzione viene specificata più volte, ha effetto l'ultima. +.IP "" +Se le impostazioni di compressione superano il valore \fILIMITE\fP, \fBxz\fP +tenterà di regolare le impostazioni verso il basso in modo che il limite non +venga più superato e visualizzerà un avviso che indica che è stata eseguita +una regolazione automatica. Le regolazioni vengono eseguite in questo +ordine: riduzione del numero di thread, passaggio alla modalità a thread +singola se anche un solo thread in modalità a thread multiple supera il +\fILIMITE\fP, e infine riducendo la dimensione del dizionario LZMA2. +.IP "" +Quando si comprime con \fB\-\-format=raw\fP oppure se si è specificato +\fB\-\-no\-adjust\fP, è possibile ridurre solo il numero di thread, poiché questo +può essere fatto senza influire sull'output compresso. +.IP "" +Se non è possibile soddisfare il \fILIMITE\fP anche con le regolazioni sopra +descritte, viene visualizzato un errore e \fBxz\fP uscirà con lo stato di +uscita 1. +.IP "" +Il \fILIMITE\fP può essere specificato in diversi modi: +.RS +.IP \(bu 3 +Il \fILIMITE\fP può essere un valore assoluto in byte. Usare un suffisso intero +come \fBMiB\fP può essere utile. Ad esempio: \fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +Il \fILIMITE\fP può essere specificato come percentuale della memoria fisica +(RAM) totale. Questo può essere utile specialmente quando si imposta la +variabile di ambiente \fBXZ_DEFAULTS\fP in uno script di inizializzazione di +shell che è condiviso tra computer diversi. In questo modo il limite è +automaticamente più grande sui sistemi con più memoria. Ad esempio: +\fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +Il \fILIMITE\fP può essere reimpostato al suo valore predefinito impostandolo a +\fB0\fP.Questo attualmente equivale a impostare il \fILIMITE\fP a \fBmax\fP (nessun +limite nell'utilizzo di memoria). +.RE +.IP "" +Per \fBxz\fP a 32\-bit esiste un caso particolare: se il \fILIMITE\fP fosse oltre +\fB4020\ MiB\fP, il \fILIMITE\fP viene impostato a \fB4020\ MiB\fP. Su MIPS32 invece +viene usato \fB2000\ MiB\fP. (I valori \fB0\fP e \fBmax\fP non sono influenzati da +questo. Un comportamento simile non esiste per la decompressione). Questo +può essere utile quando un eseguibile a 32 bit ha accesso a uno spazio di +indirizzi da 4\ GiB (2 GiB su MIPS32), e si spera che non faccia danni in +altre situazioni. +.IP "" +Vedere anche la sezione \fBUtilizzo memoria\fP +.TP +\fB\-\-memlimit\-decompress=\fP\fILIMITE\fP +Imposta un limite di utilizzo della memoria per la decompressione. Questo +influisce anche sulla modalità \fB\-\-list\fP. Se l'operazione non è possibile +senza oltrepassare il \fILIMITE\fP, \fBxz\fP mostrerà un errore e la +decompressione del file fallirà. Si veda \fB\-\-memlimit\-compress=\fP\fILIMITE\fP +per possibili modi per specificare il \fILIMITE\fP. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fILIMITE\fP +Imposta un limite di utilizzo della memoria per la decompressione +multi\-thread. Questo può influire solo sul numero di thread; non indurrà mai +\fBxz\fP a rifiutarsi di decomprimere un file. Se \fILIMITE\fP è troppo basso per +consentire le thread multiple, il \fILIMITE\fP viene ignorato e \fBxz\fP +continuerà in modalità a thread singola. Si noti che se viene utilizzato +anche \fB\-\-memlimit\-decompress\fP, si applicherà sempre sia alla modalità a +thread singola che a quella a thread multiple, e quindi il \fILIMITE\fP +effettivo per le thread multiple non sarà mai superiore a quello impostato +con \fB\-\-memlimit\-decompress\fP. +.IP "" +In contrasto con le altre opzioni di limite di utilizzo della memoria, +\fB\-\-memlimit\-mt\-decompress=\fP\fILIMITE\fP ha un \fILIMITE\fP predefinito specifico +per il sistema. \fBxz \-\-info\-memory\fP può essere utilizzato per vedere il +valore corrente. +.IP "" +Questa opzione e il suo valore predefinito esistono perché, senza un limite, +il decompressore a thread multiple potrebbe finire per allocare una quantità +folle di memoria per alcuni file input. Se il valore predefinito \fILIMITE\fP è +troppo basso sul proprio sistema, è possibile aumentarlo liberamente, ma non +deve essere mai impostato a un valore più grande della quantità di RAM +utilizzabile, in quanto con file di input appropriati \fBxz\fP cercherà di +utilizzare quella quantità di memoria anche con un basso numero di +thread. Esaurire la memoria o fare swap non migliorerà le performance della +decompressione. +.IP "" +Vedi \fB\-\-memlimit\-compress=\fP\fILIMITE\fP per possibili modi per specificare il +\fILIMITE\fP. Impostando \fILIMITE\fP su \fB0\fP si ripristina il valore predefinito +\fILIMITE\fP specifico del sistema. +.TP +\fB\-M\fP \fILIMITE\fP, \fB\-\-memlimit=\fP\fILIMITE\fP, \fB\-\-memory=\fP\fILIMITE\fP +Questo equivale a specificare \fB\-\-memlimit\-compress=\fP\fILIMITE\fP +\fB\-\-memlimit\-decompress=\fP\fILIMITE\fP \fB\-\-memlimit\-mt\-decompress=\fP\fILIMITE\fP. +.TP +\fB\-\-no\-adjust\fP +Visualizza un errore e esce se non è possibile soddisfare il limite di +utilizzo della memoria senza regolare le impostazioni che influiscono +sull'output compresso. In altre parole, ciò impedisce a \fBxz\fP di passare il +codificatore dalla modalità multi\-thread alla modalità a thread singola e di +ridurre le dimensioni del dizionario LZMA2. Anche quando viene usata questa +opzione, il numero di thread può essere ridotto per soddisfare il limite di +utilizzo della memoria, in quanto ciò non influirà sull'output compresso. +.IP "" +La regolazione automatica è sempre disabilitata quando si creano flussi raw +(\fB\-\-format=raw\fP). +.TP +\fB\-T\fP \fITHREADS\fP, \fB\-\-threads=\fP\fITHREADS\fP +Specifica il numero di thread di lavoro da utilizzare. L'impostazione di +\fITHREADS\fP al valore speciale \fB0\fP fa sì che \fBxz\fP utilizzi fino a un numero +di thread che il processore/i del sistema supportano. Il numero effettivo di +thread può essere inferiore a \fITHREADS\fP se il file di input non è +sufficientemente grande per il threading con le impostazioni specificate o +se l'utilizzo di più thread supera il limite di utilizzo della memoria. +.IP "" +I compressori a thread singola e a thread multiple producono output +diversi. Il compressore a thread singola produrrà la dimensione del file più +piccola, ma solo l'output del compressore a thread multiple può essere +decompresso utilizzando più thread. Impostando \fITHREADS\fP su \fB1\fP verrà +utilizzata la modalità a thread singola. L'impostazione di \fITHREADS\fP su +qualsiasi altro valore, incluso \fB0\fP, utilizzerà il compressore a thread +multiple anche se il sistema supporta un solo thread hardware. (\fBxz\fP 5.2.x +utilizzava la modalità a thread singola in questa situazione.) +.IP "" +Per utilizzare la modalità a thread multiple con un solo thread, impostare +\fITHREADS\fP su \fB+1\fP. Il prefisso \fB+\fP non ha alcun effetto con valori +diversi da \fB1\fP. Un limite di utilizzo della memoria può comunque far +passare \fBxz\fP alla modalità a thread singola a meno che non venga utilizzato +\fB\-\-no\-adjust\fP. Il supporto per il prefisso \fB+\fP è stato aggiunto in \fBxz\fP +5.4.0. +.IP "" +Se è stato richiesto un numero automatico di thread e non è stato +specificato alcun limite di utilizzo della memoria, verrà utilizzato un +limite "soft" predefinito, specifico del sistema, per limitare eventualmente +il numero di thread. È un limite "soft" nel senso che viene ignorato se il +numero di thread diventa uno, quindi un limite soft non impedirà mai a \fBxz\fP +di comprimere o decomprimere. Questo limite soft predefinito non farà +passare \fBxz\fP dalla modalità a thread multiple alla modalità thread +singola. I limiti attivi possono essere visualizzati con \fBxz \-\-info\-memory\fP. +.IP "" +Attualmente l'unico metodo di threading consiste nel dividere l'input in +blocchi e comprimerli indipendentemente l'uno dall'altro. La dimensione +predefinita del blocco dipende dal livello di compressione e può essere +sovrascritta con l'opzione \fB\-\-block\-size=\fP\fIDIMENSIONE\fP. +.IP "" +La decompressione a thread multiple funziona solo su file che contengano più +blocchi con l'informazione della dimensione nelle intestazioni del +blocco. Tutti i file sufficientemente grandi compressi in modalità a thread +multiple soddisfano questa condizione, mentre i file compressi in modalità +thread singola no, neanche se si è utilizzato \fB\-\-block\-size=\fP +\fIDIMENSIONE\fP. +.IP "" +Il valore predefinito per \fITHREADS\fP è \fB0\fP. In \fBxz\fP 5.4.x e precedenti il +valore predefinito era \fB1\fP. +. +.SS "Catene di filtri di compressione personalizzate" +Una catena di filtri personalizzata consente di specificare in dettaglio le +impostazioni di compressione invece di fare affidamento sulle impostazioni +associate ai livelli preimpostati. Quando viene specificata una catena di +filtri personalizzata, le opzioni relative ai livelli preimpostati (\fB\-0\fP +\&...\& \fB\-9\fP e \fB\-\-extreme\fP) specificate in precedenza sulla riga di +comando vengono dimenticate. Se un'opzione livello preimpostato viene +specificata dopo una o più opzioni della catena di filtri personalizzata, il +nuovo livello preimpostato ha effetto e le opzioni della catena di filtri +personalizzate specificate in precedenza vengono dimenticate. +.PP +Una catena di filtri è paragonabile a una pipe sulla riga di +comando. Durante la compressione, l'input non compresso va al primo filtro, +il cui output va al filtro successivo (se presente). L'output dell'ultimo +filtro viene scritto nel file compresso. Il numero massimo di filtri nella +catena è quattro, ma in genere una catena di filtri ha solo uno o due +filtri. +.PP +Molti filtri hanno limitazioni su dove possono trovarsi nella catena di +filtri: alcuni filtri possono funzionare solo come ultimo filtro della +catena, altri solo come filtro non ultimo e alcuni funzionano in qualsiasi +posizione nella catena. A seconda del filtro, questa limitazione è inerente +alla struttura del filtro oppure esiste per evitare problemi di sicurezza. +.PP +Una catena di filtri personalizzata può essere specificata in due modi +diversi. Le opzioni \fB\-\-filters=\fP\fIFILTRI\fP and \fB\-\-filters1=\fP\fIFILTRI\fP +\&...\& \fB\-\-filters9=\fP\fIFILTRI\fP permettono di specificare un'intera catena +di filtri in una opzione utilizzando la sintassi della stringa del filtro di +lzma. In alternativa, una catena di filtri può essere specificata +utilizzando una o più singole opzioni di filtro nell'ordine desiderato nella +catena di filtri. Questo significa che l'ordine delle singole opzioni di +filtro è importante! Quando si decodificano i flussi grezzi +(\fB\-\-format=raw\fP), la catena di filtri deve essere specificata nello stesso +ordine in cui è stata specificata durante la compressione. Qualsiasi filtro +individuale o opzione livello preimpostato specificata prima dell'opzione +della catena completa (\fB\-\-filters=\fP\fIFILTRI\fP) verrà dimenticata. I singoli +filtri specificati dopo l'opzione della catena completa reimposteranno la +catena di filtri. +.PP +Sia l'opzione di filtro completo che quella individuale accettano \fIOPZIONI\fP +specifiche del filtro come un elenco separato da virgole. Virgole in eccesso +nelle \fIOPZIONI\fP vengono ignorate. Ogni opzione ha un valore di default, +quindi occorre specificare solamente quelle che si desidera modificare. +.PP +Per vedere l'intera catena di filtri e \fIOPZIONI\fP, usa \fBxz \-vv\fP (ossia, usa +\fB\-\-verbose\fP due volte). Questo funziona anche per visualizzare le opzioni +della catena di filtri utilizzate dai livelli preimpostati. +.TP +\fB\-\-filters=\fP\fIFILTRI\fP +Specifica l'intera catena dei filtri oppure un livello preimpostato in una +singola opzione. Ogni filtro può essere separato da spazi o da due trattini +(\fB\-\-\fP). Potrebbe essere necessario mettere tra virgolette i \fIFILTRI\fP sulla +riga di comando della shell in modo che vengano analizzati come una singola +opzione. Per indicare \fIOPZIONI\fP, usa \fB:\fP o \fB=\fP. Un livello preimpostato +può essere preceduto da un \fB\-\fP e seguito da zero o più flag. L'unico flag +supportato è \fBe\fP per applicare le stesse opzioni di \fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIFILTRI\fP ... \fB\-\-filters9\fP=\fIFILTRI\fP +Specifica fino a nove catene di filtri aggiuntive che possono essere +utilizzate con \fB\-\-block\-list\fP. +.IP "" +Ad esempio, quando si comprime un archivio con file eseguibili seguiti da +file di testo, la parte eseguibile potrebbe utilizzare una catena di filtri +con un filtro BCJ e la parte di testo solo il filtro LZMA2. +.TP +\fB\-\-filters\-help\fP +Mostra un messaggio di aiuto che descrive come specificare livelli +preimpostati e catene di filtri personalizzati nelle opzioni \fB\-\-filters\fP e +\fB\-\-filters1=\fP\fIFILTRI\fP \&...\& \fB\-\-filters9=\fP\fIFILTRI\fP, e termina con +successo. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIOPZIONI\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIOPZIONI\fP] +.PD +Aggiunge un filtro LZMA1 o LZMA2 alla catena dei filtri. Questi filtri +possono essere usati solo come ultimo filtro della catena. +.IP "" +LZMA1 è un filtro obsoleto, supportato quasi esclusivamente a causa del +formato obsoleto di file \fB.lzma\fP, che supporta solo LZMA1. LZMA2 è una +versione aggiornata di LZMA1 che risolve alcuni problemi pratici di +LZMA1. Il formato \fB.xz\fP utilizza LZMA2 e non supporta LZMA1. La velocità e +i rapporti di compressione di LZMA1 e LZMA2 sono praticamente gli stessi. +.IP "" +LZMA1 e LZMA2 condividono lo stesso insieme di \fIOPZIONI\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIPRESET\fP +Reimposta tutte le \fIOPZIONI\fP LZMA1 o LZMA2 a \fIPRESET\fP. Il \fIPRESET\fP +(livello preimpostato) consiste di un numero intero, che può essere seguito +da modificatori costituiti da una singola lettera. Il numero intero può +andare da \fB0\fP a \fB9\fP, corrispondenti alle opzioni della riga di comando +\fB\-0\fP \&...\& \fB\-9\fP. L'unico modificatore attualmente supportato è \fBe\fP, che +corrisponde a \fB\-\-extreme\fP. Se non viene specificato alcun \fIPRESET\fP, i +valori predefiniti delle \fIOPZIONI\fP LZMA1 o LZMA2 sono presi dal livello +preimpostato \fB6\fP. +.TP +\fBdict=\fP\fIDIMENSIONE\fP +La \fIDIMENSIONE\fPdel dizionario (buffer di cronologia) indica quanti byte dei +dati non compressi elaborati di recente vengono mantenuti in +memoria. L'algoritmo tenta di trovare sequenze di byte ripetute +(corrispondenze) nei dati non compressi e di sostituirle con riferimenti ai +dati attualmente presenti nel dizionario. Più grande è il dizionario, +maggiore è la possibilità di trovare una corrispondenza. Quindi, l'aumento +della \fIDIMENSIONE\fP del dizionario di solito migliora il rapporto di +compressione, ma un dizionario più grande del file non compresso è uno +spreco di memoria. +.IP "" +Una \fIDIMENSIONE\fP tipica per un dizionario è da 64\ KiB a 64\ MiB. Il minimo +è 4\ KiB. Il massimo per la compressione è attualmente 1.5\ GiB (1536\ MiB). La decompressione supporta già dizionari fino a 4\ GiB meno 1 byte, +che è il massimo per i formati di flusso LZMA1 e LZMA2. +.IP "" +La \fIDIMENSIONE\fP del dizionario e il cercatore di corrispondenze +(\fICERCATORE\fP) insieme determinano l'utilizzo della memoria del codificatore +LZMA1 o LZMA2. Per la decompressione è necessaria la stessa \fIDIMENSIONE\fP +del dizionario utilizzata durante la compressione (o più grande), quindi +l'utilizzo della memoria del decodificatore è determinato dalla dimensione +del dizionario utilizzato durante la compressione. Le intestazioni \fB.xz\fP +memorizzano la \fIDIMENSIONE\fP del dizionario come 2^\fIn\fP o 2^\fIn\fP + 2^( +\fIn\fP\-1), quindi queste \fIDIMENSIONI\fP sono in qualche modo preferite per la +compressione. Altre \fIDIMENSIONI\fP verranno arrotondate per eccesso quando +memorizzate nelle intestazioni \fB.xz\fP. +.TP +\fBlc=\fP\fIlc\fP +Specificare il numero di bit di contesto letterali. Il minimo è 0 e il +massimo è 4; Il valore predefinito è 3. Inoltre, la somma di \fIlc\fP e \fIlp\fP +non deve superare 4. +.IP "" +Tutti i byte che non possono essere codificati come corrispondenze vengono +codificati come valori letterali. In altre parole, i valori letterali sono +semplicemente byte a 8 bit codificati uno alla volta. +.IP "" +La codifica letterale presuppone che i bit di \fIlc\fP più alti del byte non +compresso precedente siano correlati al byte successivo. Ad esempio, in un +tipico testo inglese, una lettera maiuscola è spesso seguita da una lettera +minuscola e una lettera minuscola è solitamente seguita da un'altra lettera +minuscola. Nel set di caratteri US\-ASCII, i tre bit più alti sono 010 per le +lettere maiuscole e 011 per le lettere minuscole. Quando \fIlc\fP è almeno 3, +la codifica letterale può sfruttare questa proprietà nei dati non compressi. +.IP "" +Il valore predefinito (3) solitamente è buono. Se si desidera la +compressione massima, provare con \fBlc=4\fP. A volte aiuta un po', e a volte +rende la compressione peggiore. Se la rende peggiore, provare anche \fBlc=2\fP. +.TP +\fBlp=\fP\fIlp\fP +Specificare il numero di bit di posizione letterale. Il minimo è 0 e il +massimo è 4; Il valore predefinito è 0. +.IP "" +Il parametro \fIlp\fP influisce sul tipo di allineamento nei dati non compressi +presunto durante la codifica dei valori letterali. Vedi \fIpb\fP di seguito per +ulteriori informazioni sull'allineamento. +.TP +\fBpb=\fP\fIpb\fP +Specificare il numero di bit di posizione. Il minimo è 0 e il massimo è 4; +Il valore predefinito è 2. +.IP "" +Il parametro \fIpb\fP influisce su quale tipo di allineamento nei dati non +compressi sia assunto in generale. L'impostazione predefinita indica un +allineamento a quattro byte (2^\fIpb\fP =2^2=4), che è spesso una buona scelta +se non c'è un'ipotesi migliore. +.IP "" +Quando l'allineamento è noto, impostare \fIpb\fP concordemente può ridurre un +po' le dimensioni del file. Ad esempio, con file di testo con 1 byte di +allineamento (US\-ASCII, ISO\-8859\-*, UTF\-8), impostare \fBpb=0\fP può migliorare +leggermente la compressione. Per il testo UTF\-16, \fBpb=1\fP è una buona +scelta. Se l'allineamento è un numero dispari, come 3 byte, \fBpb=0\fP potrebbe +essere la scelta migliore. +.IP "" +Anche se l'allineamento assunto può essere regolato con \fIpb\fP e \fIlp\fP, LZMA1 +e LZMA2 favoriscono ancora leggermente l'allineamento a 16 byte. Potrebbe +valere la pena tenerlo in considerazione quando si progettano formati di +file che possono essere spesso compressi con LZMA1 o LZMA2. +.TP +\fBmf=\fP\fICERCATORE\fP +Il cercatore di corrispondenze ha un effetto importante sulla velocità del +codificatore, sull'utilizzo della memoria e sul rapporto di compressione. Di +solito i cercatori di corrispondenze a catena hash sono più veloci dei +cercatori di corrispondenze ad albero binario. Il valore predefinito dipende +da \fIPRESET\fP : 0 usa \fBhc3\fP, 1\(en3 usa \fBhc4\fP e il resto usa \fBbt4\fP. +.IP "" +Sono supportati i seguenti cercatori di corrispondenze. Le formule di +utilizzo della memoria riportate di seguito sono approssimazioni, che sono +le più vicine alla realtà quando \fIDIZIONARIO\fP è una potenza di due. +.RS +.TP +\fBhc3\fP +Catena hash con hashing da 2 e 3 byte +.br +Minimo valore per \fINICE\fP: 3 +.br +Utilizzo memoria: +.br +\fIDIZIONARIO\fP * 7.5 (se \fIDIZIONARIO\fP <= 16 MiB); +.br +\fIDIZIONARIO\fP * 5.5 + 64 MiB (se \fIDIZIONARIO\fP > 16 MiB) +.TP +\fBhc4\fP +Catena hash con hash da 2, 3 e 4 byte +.br +Minimo valore per \fINICE\fP: 4 +.br +Utilizzo memoria: +.br +\fIDIZIONARIO\fP * 7.5 (se \fIDIZIONARIO\fP <= 32 MiB); +.br +\fIDIZIONARIO\fP * 6.5 (se \fIDIZIONARIO\fP > 32 MiB) +.TP +\fBbt2\fP +Albero binario con hashing da 2 byte +.br +Valore minimo per \fINICE\fP: 2 +.br +Utilizzo di memoria: \fIDIZIONARIO\fP * 9.5 +.TP +\fBbt3\fP +Albero binario con hashing da 2 e 3 byte +.br +Minimo valore per \fINICE\fP: 3 +.br +Utilizzo memoria: +.br +\fIDIZIONARIO\fP * 11.5 (se \fIDIZIONARIO\fP <= 16 MiB); +.br +\fIDIZIONARIO\fP * 9.5 + 64 MiB (se \fIDIZIONARIO\fP > 16 MiB) +.TP +\fBbt4\fP +Albero binario con hashing da 2, 3 e 4 byte +.br +Minimo valore per \fINICE\fP: 4 +.br +Utilizzo memoria: +.br +\fIDIZIONARIO\fP * 11.5 (se \fIDIZIONARIO\fP <= 32 MiB); +.br +\fIDIZIONARIO\fP * 10.5 (se \fIDIZIONARIO\fP > 32 MiB) +.RE +.TP +\fBmode=\fP\fIMODALITÀ\fP +La \fIMODALITÀ\fP di compressione specifica il metodo per analizzare i dati +prodotti dal cercatore di corrispondenze. Le \fIMODALITÀ\fP supportate sono +\fBfast\fP e \fBnormal\fP. Il predefinito è \fBfast\fP per i \fIPRESET\fP 0\(en3 e +\fBnormal\fP per i \fIPRESET\fP 4\(en9. +.IP "" +Di solito \fBfast\fP viene utilizzato con i cercatori di corrispondenze a +catena hash e \fBnormal\fP con i cercatori di corrispondenze a albero +binario. Questo è anche quello che fanno i \fIPRESET\fP. +.TP +\fBnice=\fP\fINICE\fP +Specifica quella che si considera una lunghezza accettabile ("nice") per una +corrispondenza. Una volta trovata una corrispondenza di almeno \fINICE\fP byte, +l'algoritmo smette di cercare corrispondenze potenzialmente migliori. +.IP "" +\fINICE\fP può valere 2\(en273 byte. Valori più alti tendono a dare un miglior +rapporto di compressione ai danni della velocità. Il valore predefinito +dipende dal \fIPRESET\fP. +.TP +\fBdepth=\fP\fIPROFONDITÀ\fP +Specificare la profondità di ricerca massima nel cercatore di +corrispondenze. Il valore predefinito è il valore speciale 0, che dice al +compressore di determinare una \fIPROFONDITÀ\fP ragionevole da \fICERCATORE\fP e +\fINICE\fP. +.IP "" +Una \fIPROFONDITÀ\fP ragionevole per le catene hash è 4\(en100 e 16\(en1000 per +gli alberi binari. Utilizzando valori di \fIPROFONDITÀ\fP molto alti si può +rendere il codificatore estremamente lento con alcuni file. Evitare di +impostare la \fIPROFONDITÀ\fP oltre 1000 a meno che si sia preparati a +interrompere la compressione nel caso in cui richieda troppo tempo. +.RE +.IP "" +Quando si decomprime un flusso grezzo (\fB\-\-format=raw\fP), LZMA2 ha bisogno +solamente della \fIDIMENSIONE\fP del dizionario. LZMA1 ha anche bisogno di +\fIlc\fP, \fIlp\fP, e \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIOPZIONI\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIOPZIONI\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIOPZIONI\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIOPZIONI\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIOPZIONI\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIOPZIONI\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIOPZIONI\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIOPZIONI\fP] +.PD +Aggiunge un filtro branch/call/jump (BCJ) alla catena dei filtri. Questi +filtri non possono essere utilizzati come ultimo filtro nella catena di +filtri. +.IP "" +Un filtro BCJ converte gli indirizzi relativi in codice macchina nelle loro +controparti assolute. Questo non cambia la dimensione dei dati ma aumenta la +ridondanza, cosa che può aiutare LZMA2 a produrre \fB.xz\fP file 0\(en15\ % più +piccoli. I filtri BCJ sono sempre reversibili, quindi usare un filtro BCJ +per il tipo di dati sbagliato non causa perdita di dati, al massimo può +determinare un rapporto di compressione leggermente peggiore. I filtri BCJ +sono molto veloci e usano una quantità di memoria minima. +.IP "" +Questi filtri BCJ presentano problemi noti relativi al rapporto di +compressione: +.RS +.IP \(bu 3 +Alcuni tipi di file contenenti codice eseguibile (ad esempio, file oggetto, +librerie statiche e moduli del kernel Linux) hanno gli indirizzi nelle +istruzioni riempiti con valori di riempimento. Questi filtri BCJ eseguiranno +comunque la conversione degli indirizzi, il che peggiorerà la compressione +con questi file. +.IP \(bu 3 +Se un filtro BCJ viene applicato a un archivio, è possibile che renda il +rapporto di compressione peggiore rispetto a non usare un filtro BCJ. Ad +esempio, se ci sono eseguibili simili o addirittura identici, il filtraggio +probabilmente renderà i file meno simili e quindi la compressione sarà +peggiore. Anche il contenuto dei file non eseguibili nello stesso archivio +può essere importante. In pratica bisogna provare con e senza filtro BCJ per +vedere quale sia il migliore in ogni situazione. +.RE +.IP "" +Insiemi diversi di istruzioni hanno diversi allineamenti: il file eseguibile +deve essere allineato a un multiplo di questo valore nei dati di input per +far funzionare il filtro. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Filtro;Allineamento;Note +x86;1;32\-bit o 64\-bit x86 +ARM;4; +ARM\-Thumb;2; +ARM64;4;L'allineamento migliore è a 4096 byte +PowerPC;4;Solo big\-endian +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Dal momento che i dati filtrati da BCJ solitamente sono compressi con LZMA2, +il rapporto di compressione può essere migliorato leggermente se le opzioni +LZMA2 sono impostate in modo che corrispondano all'allineamento del filtro +BCJ selezionato. Esempi: +.RS +.IP \(bu 3 +Il filtro IA\-64 ha un allineamento a 16 byte, quindi \fBpb=4,lp=4,lc=0\fP è una +buona scelta per LZMA2 (2^4=16). +.IP \(bu 3 +Il codice RISC\-V ha un allineamento a 2 o 4 byte a seconda che il file +contenga o meno istruzioni 16 bit compresse (cosiddetta estensione +C). Quando sono usate istruzioni a 16 bit, va bene \fBpb=2,lp=1,lc=3\fP o +\fBpb=1,lp=1,lc=3\fP. Quando le istruzioni a 16 bit non sono presenti, è meglio +\fBpb=2,lp=2,lc=2\fP. Si può usare \fBreadelf \-h\fP per controllare se "RVC" +appare sulla riga del "Flag". +.IP \(bu 3 +ARM64 è sempre allineato a 4 byte, quindi \fBpb=2,lp=2,lc=2\fP è la scelta +migliore. +.IP \(bu 3 +Il filtro x86 è un'eccezione. Di solito è bene attenersi alle impostazioni +predefinite di LZMA2 (\fBpb=2,lp=0,lc=3\fP) quando si comprimono gli eseguibili +x86. +.RE +.IP "" +Tutti i filtri BCJ supportano le stesse \fIOPZIONI\fP: +.RS +.TP +\fBstart=\fP\fIOFFSET\fP +Specifica l'\fIOFFSET\fP iniziale utilizzato per la conversione tra indirizzi +relativi e assoluti. L'\fIOFFSET\fP deve essere un multiplo dell'allineamento +del filtro (vedere la tabella sopra). Il valore predefinito è zero. In +pratica, l'impostazione predefinita è buona; specificare un \fIOFFSET\fP +personalizzato non è quasi mai utile. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIOPZIONI\fP] +Aggiunge un filtro Delta alla catena dei filtri. I filtri Delta non possono +essere utilizzati come ultimo filtro nella catena di filtri. +.IP "" +Al momento è supportato solo un semplice calcolo delta byte\-per\-byte. Può +essere utile quando si comprime, per esempio, immagini bitmap non compresse +o file audio PCM non compressi. Tuttavia, speciali algoritmi ad\-hoc +potrebbero dare risultati significativamente migliori che Delta + +LZMA2. Questo è vero specialmente per l'audio, che comprime più velocemente +e meglio, ad esempio, con \fBflac\fP(1). +.IP "" +\fIOPZIONI\fP supportate: +.RS +.TP +\fBdist=\fP\fIDISTANZA\fP +Specifica la \fIDISTANZA\fP del calcolo delta in byte. \fIDISTANZA\fP deve essere +nel range 1\(en256. Il valore predefinito è 1. +.IP "" +Per esempio, con \fBdist=2\fP e un input di 8 byte A1 B1 A2 B3 A3 B5 A4 B7, +l'output sarà A1 B1 01 02 01 02 01 02. +.RE +. +.SS "Altre opzioni" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Sopprime avvertimenti e avvisi. Specificarlo due volte per eliminare anche +gli errori. Questa opzione non ha alcun effetto sullo stato di uscita. In +altre parole, anche se un avvertimento è stato eliminato, lo stato di uscita +che indica un avvertimento viene comunque utilizzato. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +Sii prolisso. Se lo standard error è collegato a un terminale, \fBxz\fP +visualizzerà un indicatore di avanzamento. Specificando \fB\-\-verbose\fP due +volte si otterrà un output ancora più dettagliato. +.IP "" +L'indicatore di avanzamento mostra le seguenti informazioni: +.RS +.IP \(bu 3 +La percentuale di avanzamento è mostrata se la dimensione del file input è +nota. Quindi, la percentuale non può essere mostrata nei pipe. +.IP \(bu 3 +Quantità di dati compressi prodotti (in compressione) o utilizzati (in +decompressione). +.IP \(bu 3 +Quantità di dati non compressi consumati (in compressione) o prodotti (in +decompressione). +.IP \(bu 3 +Rapporto di compressione, calcolato dividendo la quantità di dati compressi +processati finora con la quantità di dati non compressi processati finora. +.IP \(bu 3 +Velocità di compressione o decompressione. Questa è misurata come la +quantità di dati non compressi consumati (in compressione) o prodotti (in +decompressione) al secondo. Viene mostrata dopo che è trascorso qualche +secondo da quando \fBxz\fP ha iniziato a processare il file. +.IP \(bu 3 +Tempo trascorso nel formato M:SS o H:MM:SS. +.IP \(bu 3 +Il tempo residuo stimato è mostrato solo quando la dimensione del file in +ingresso è nota e sono già passati un paio di secondi da quando \fBxz\fP ha +iniziato a processare il file. Il tempo è mostrato in un formato meno +preciso che non ha mai i due punti, ad esempio 2 min 30 s. +.RE +.IP "" +Quando lo standard error non è un terminale, \fB\-\-verbose\fP farà stampare a +\fBxz\fP il nome del file, la dimensione compressa, la dimensione non +compressa, il rapporto di compressione, e potendo anche la velocità e il +tempo trascorso, su una singola riga dello standard error, dopo aver +compresso o decompresso il file. La velocità e il tempo trascorso sono +inclusi solo se l'operazione è durata almeno un paio di secondi. Se +l'operazione non è conclusa, ad esempio a causa dell'interruzione da parte +dell'utente, viene stampata anche la percentuale di completamento, a patto +che la dimensione del file input sia nota. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Non impostare lo stato di uscita a 2 anche se è stata rilevata una +condizione che merita un avvertimento. Questa opzione non influisce sul +livello di dettaglio, quindi sia \fB\-\-quiet\fP che \fB\-\-no\-warn\fP devono essere +utilizzati per non visualizzare avvertimenti e per non alterare lo stato di +uscita. +.TP +\fB\-\-robot\fP +Stampa i messaggi in un formato analizzabile dal computer. Questo ha lo +scopo di facilitare la scrittura dei frontend che vogliono usare \fBxz\fP +invece di liblzma, che potrebbe essere il caso di vari script. Si intende +che con questa opzione abilitata l'output dovrebbe rimanere stabile tra le +versioni di \fBxz\fP. Per ulteriori informazioni, vedere la sezione \fBMODALITÀ ROBOT\fP. +.TP +\fB\-\-info\-memory\fP +Mostra, in un formato leggibile da umani, quanta memoria fisica (RAM) e +quante thread \fBxz\fP pensa che il sistema abbia e i limiti di utilizzo di +memoria per la compressione e la decompressione, quindi termina con +successo. +.TP +\fB\-h\fP, \fB\-\-help\fP +Mostra un messaggio di aiuto che descrive le opzioni usate più comunemente, +e termina con successo. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +Mostra un messaggio di aiuto che descrive tutte le funzionalità di \fBxz\fP, e +termina con successo +.TP +\fB\-V\fP, \fB\-\-version\fP +Mostra il numero di versione di \fBxz\fP e liblzma in un formato leggibile +dagli umani. Per ottenere un output analizzabile da una macchina specificare +\fB\-\-robot\fP prima di \fB\-\-version\fP. +. +.SH "MODALITÀ ROBOT" +La "modalità robot" viene attivata con l'opzione \fB\-\-robot\fP. Rende l'output +di \fBxz\fP più facile da analizzare da altri programmi. Attualmente \fB\-\-robot\fP +è supportato solo insieme a \fB\-\-list\fP, \fB\-\-filters\-help\fP, \fB\-\-info\-memory\fP e +\fB\-\-version\fP. In futuro sarà supportato per la compressione e la +decompressione. +. +.SS "Modalità stampa" +\fBxz \-\-robot \-\-list\fP usa un output separato da tabulazione. La prima colonna +di ogni riga contiene una stringa che indica il tipo di informazione +contenuta in quella riga: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +Questa è sempre la prima riga quando si inizia a elencare un file. La +seconda colonna della riga è il nome del file. +.TP +\fBfile\fP +Questa riga contiene informazioni generali sul file \fB.xz\fP. Questa riga +viene sempre stampata dopo la riga \fBname\fP. +.TP +\fBstream\fP +Questo tipo di riga viene utilizzato solo quando è stato specificato +\fB\-\-verbose\fP. Sono presenti tante righe \fBstream\fP quanti sono i flussi nel +file \fB.xz\fP. +.TP +\fBblock\fP +Questo tipo di riga viene utilizzato solo quando è stato specificato +\fB\-\-verbose\fP. Ci sono tante righe \fBblock\fP quanti sono i blocchi nel file +\&\fB.xz\fP. Le righe \fBblock\fP vengono visualizzate dopo tutte le righe +\fBstream\fP; i diversi tipi di riga non vengono interlacciati. +.TP +\fBsummary\fP +Questo tipo di riga viene utilizzato solo quando \fB\-\-verbose\fP è stato +specificato due volte. Questa riga viene stampata dopo tutte le righe +\fBblock\fP. Come la riga \fBfile\fP, la riga \fBsummary\fP contiene informazioni +generali sul file \fB.xz\fP. +.TP +\fBtotals\fP +Questa riga è sempre l'ultima riga dell'output dell'elenco. Mostra i +conteggi totali e le dimensioni. +.PP +Le colonne delle righe \fBfile\fP: +.PD 0 +.RS +.IP 2. 4 +Numero di flussi nel file +.IP 3. 4 +Numero totale di blocchi nel flusso/i. +.IP 4. 4 +Dimensione compressa del file +.IP 5. 4 +Dimensione non compressa del file +.IP 6. 4 +Rapporto di compressione, es. \fB0.123\fP. Se il rapporto è oltre 9999, al +posto del rapporto vengono mostrati tre trattini (\fB\-\-\-\fP). +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Elenco separato da virgole dei nomi dei controlli di integrità. Le stringhe +seguenti vengono utilizzate per i tipi di controllo conosciuti: \fBNone\fP, +\fBCRC32\fP, \fBCRC64\fP, e \fBSHA\-256\fP. Per i tipi di controllo non conosciuti +viene utilizzato \fBUnknown\-\fP\fIN\fP, dove \fIN\fP è l'ID del controllo come numero +decimale (una o due cifre). +.IP 8. 4 +Dimensione totale del padding del flusso nel file +.RE +.PD +.PP +Le colonne delle righe \fBstream\fP: +.PD 0 +.RS +.IP 2. 4 +Numero di flusso (il primo è 1) +.IP 3. 4 +Numero di blocchi nel flusso +.IP 4. 4 +Offset iniziale compressione +.IP 5. 4 +Offset iniziale decompressione +.IP 6. 4 +Dimensione compressa (non include il padding del flusso) +.IP 7. 4 +Dimensione non compressa +.IP 8. 4 +Rapporto di compressione +.IP 9. 4 +Nome del controllo di integrità +.IP 10. 4 +Dimensione del padding del flusso +.RE +.PD +.PP +Le colonne delle righe \fBblock\fP: +.PD 0 +.RS +.IP 2. 4 +Numero di flussi che contengono questo blocco +.IP 3. 4 +Numero del blocco relativo all'inizio del flusso (il primo blocco è 1) +.IP 4. 4 +Numero del blocco relativo all'inizio del file +.IP 5. 4 +Offset iniziale compressione relativo all'inizio del file +.IP 6. 4 +Offset iniziale decompressione relativo all'inizio del file +.IP 7. 4 +Dimensione totale compressa del blocco (incluse le intestazioni) +.IP 8. 4 +Dimensione non compressa +.IP 9. 4 +Rapporto di compressione +.IP 10. 4 +Nome del controllo di integrità +.RE +.PD +.PP +Se \fB\-\-verbose\fP viene specificato due volte, sono incluse colonne aggiuntive +nelle righe \fBblock\fP. Queste non sono mostrate con un \fB\-\-verbose\fP singolo, +perché recuperare queste informazioni richiede molte ricerche e quindi può +essere lento: +.PD 0 +.RS +.IP 11. 4 +Valore del controllo di integrità in formato esadecimale +.IP 12. 4 +Dimensione intestazione blocco +.IP 13. 4 +Flag del blocco: \fBc\fPindica che è presente la dimensione compressa, \fBu\fP +indica che è presente la dimensione non compressa. Se il flag non è +impostato, viene mostrato un trattino (\fB\-\fP) per mantenere fissa la +lunghezza della stringa. Nuovi flag potrebbero essere aggiunti alla fine +della stringa in futuro. +.IP 14. 4 +Dimensione dei dati compressi effettivi nel blocco (sono esclusi +l'intestazione del blocco, il padding del blocco e i campi di controllo) +.IP 15. 4 +Quantità di memoria (in byte) necessaria per decomprimere questo blocco con +questa versione \fBxz\fP +.IP 16. 4 +Catena di filtri. Si noti che la maggior parte delle opzioni utilizzate al +momento della compressione non è nota, perché solo le opzioni necessarie per +la decompressione sono memorizzate nelle intestazioni \fB.xz\fP. +.RE +.PD +.PP +Le colonne delle righe \fBsummary\fP: +.PD 0 +.RS +.IP 2. 4 +Quantità di memoria (in byte) necessaria per decomprimere questo file con +questa versione \fBxz\fP +.IP 3. 4 +\fByes\fP o \fBno\fP indica se tutte le intestazioni di blocco contengono +all'interno sia dimensioni compresse che dimensioni non compresse +.PP +\fIA partire da\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Versione minima di \fBxz\fP richiesta per decomprimere il file +.RE +.PD +.PP +Le colonne delle righe \fBtotali\fP: +.PD 0 +.RS +.IP 2. 4 +Numero di flussi +.IP 3. 4 +Numero di blocchi +.IP 4. 4 +Dimensione compressa +.IP 5. 4 +Dimensione non compressa +.IP 6. 4 +Rapporto di compressione medio +.IP 7. 4 +Elenco separato da virgole dei nomi dei controlli di integrità presenti nei +file +.IP 8. 4 +Dimensione del padding dello stream +.IP 9. 4 +Numero di file. Questo serve a mantenere l'ordine delle colonne precedenti +uguale a quello delle righe del \fBfile\fP. +.PD +.RE +.PP +Se \fB\-\-verbose\fP viene specificato due volte, sono incluse colonne aggiuntive +nella riga \fBtotali\fP: +.PD 0 +.RS +.IP 10. 4 +Quantità massima di memoria (in byte) necessaria per decomprimere i file con +questa versione \fBxz\fP +.IP 11. 4 +\fByes\fP o \fBno\fP indica se tutte le intestazioni di blocco contengono +all'interno sia dimensioni compresse che dimensioni non compresse +.PP +\fIA partire da\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Versione minima di \fBxz\fP richiesta per decomprimere il file +.RE +.PD +.PP +Versioni future potrebbero aggiungere nuovi tipi di riga e nuove colonne +possono essere aggiunte ai tipi di riga esistenti, ma le colonne esistenti +non verranno modificate. +. +.SS "Aiuto sui filtri" +\fBxz \-\-robot \-\-filters\-help\fP stampa i filtri supportati nel seguente +formato: +.PP +\fIFILTRO\fP\fB:\fP\fIOPZIONE\fP\fB=<\fP\fIVALORE\fP\fB>,\fP\fIOPZIONE\fP\fB=<\fP\fIVALORE\fP\fB>\fP... +.TP +\fIFILTRO\fP +Nome del filtro +.TP +\fIOPZIONE\fP +Nome di un'opzione specifica del filtro +.TP +\fIVALORE\fP +Gli intervalli del \fIVALORE\fP numerico appaiono come +\fB<\fP\fIMIN\fP\fB\-\fP\fIMAX\fP\fB>\fP. Le scelte per i \fIVALORI\fP stringa sono +mostrati in \fB< >\fP e separati dal carattere \fB|\fP. +.PP +Ogni filtro è mostrato su una riga dedicata. +. +.SS "Informazione limite memoria" +\fBxz \-\-robot \-\-info\-memory\fP stampa una singola riga con più colonne separate +da tabulazione: +.IP 1. 4 +Quantità totale di memoria fisica (RAM) in byte. +.IP 2. 4 +Limite utilizzo memoria per la compressione in byte +(\fB\-\-memlimit\-compress\fP). Il valore speciale \fB0\fP indica l'impostazione +predefinita, che in modalità thread singola equivale a nessun limite. +.IP 3. 4 +Limite utilizzo memoria per la decompressione in byte +(\fB\-\-memlimit\-decompress\fP). Il valore speciale \fB0\fP indica l'impostazione +predefinita, che in modalità thread singola equivale a nessun limite. +.IP 4. 4 +A partire da \fBxz\fP 5.3.4alpha: Utilizzo della memoria per la decompressione +a thread multiple in byte (\fB\-\-memlimit\-mt\-decompress\fP). Questo valore non è +mai zero perché viene utilizzato un valore predefinito specifico del sistema +mostrato nella colonna 5, se non è stato specificato alcun limite in modo +esplicito. Inoltre, non è mai maggiore del valore nella colonna 3, anche se +è stato specificato un valore maggiore con \fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +A partire da \fBxz\fP 5.3.4alpha: un limite di utilizzo della memoria +predefinito specifico del sistema, che viene utilizzato per limitare il +numero di thread durante la compressione con un numero automatico di thread +(\fB\-\-threads=0\fP) e non è stato specificato alcun limite di utilizzo della +memoria (\fB\-\-memlimit\-compress\fP). Questo viene utilizzato anche come valore +predefinito per \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +A partire da \fBxz\fP 5.3.4alpha: Numero di thread del processore disponibili. +.PP +In futuro, l'output di \fBxz \-\-robot \-\-info\-memory\fP potrebbe avere più +colonne, ma mai più di una singola riga. +. +.SS Versione +\fBxz \-\-robot \-\-version\fP stampa il numero di versione di \fBxz\fP e liblzma nel +seguente formato: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Versione major. +.TP +\fIYYY\fP +Versione minor. I numeri pari sono stabili. I numeri dispari sono versioni +alfa o beta. +.TP +\fIZZZ\fP +Livello di patch per le versioni stabili o solo un contatore per le versioni +di sviluppo. +.TP +\fIS\fP +Stabilità. 0 è alfa, 1 è beta e 2 è stabile. \fIS\fP dovrebbe essere sempre 2 +quando \fIYYY\fP è pari. +.PP +\fIXYYYZZZS\fP sono uguali su entrambe le righe se \fBxz\fP e liblzma appartengono +allo stesso rilascio delle XZ Utils. +.PP +Esempi: 4.999.9beta è \fB49990091\fP e 5.0.0 è \fB50000002\fP. +. +.SH "CODICE DI USCITA" +.TP +\fB0\fP +Tutto bene. +.TP +\fB1\fP +È avvenuto un errore. +.TP +\fB2\fP +Si è verificato qualcosa che merita un avvertimento, ma non si sono +verificati errori effettivi. +.PP +Gli avvisi (non gli avvertimenti o gli errori) stampati sullo standard error +non influiscono sullo stato di uscita. +. +.SH AMBIENTE +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP analizza elenchi di opzioni separate da spazi dalle variabili +d'ambiente \fBXZ_DEFAULTS\fP e \fBXZ_OPT\fP, in questo ordine, analizzando prima +le opzioni dalla riga di comando. Si noti che solo le opzioni vengono +analizzate dalle variabili d'ambiente; tutte le non\-opzioni vengono ignorate +silenziosamente. L'analisi viene eseguita con \fBgetopt_long\fP(3) che viene +utilizzato anche per gli argomenti della riga di comando. +.PP +\fBAttenzione:\fP Impostando queste variabili di ambiente, si sta di fatto +modificando programmi e script che lanciano \fBxz\fP. La maggior parte delle +volte va bene impostare i limiti di utilizzo della memoria, il numero di +thread e le opzioni di compressione tramite variabili d'ambiente. Tuttavia, +alcune opzioni possono rompere degli script. Un esempio banale è \fB\-\-help\fP +che forza \fBxz\fP a mostrare la pagina di aiuto anziché comprimere o +decomprimere file. Esempi meno ovvi sono \fB\-\-quiet\fP e \fB\-\-verbose\fP. In +molti casi funziona bene abilitare l'indicatore di avanzamento usando +\fB\-\-verbose\fP, ma in alcune situazioni i messaggi extra creano problemi. Il +livello di prolissità influisce anche sul comportamento di \fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +Opzioni predefinite specifiche dell'utente o a livello di sistema. In genere +questo viene impostato in uno script di inizializzazione della shell per +abilitare il valore predefinito del limitatore di utilizzo della memoria di +\fBxz\fP, o per impostare il numero di thread predefinito. Escludendo gli +script di inizializzazione della shell e analoghi casi particolari, gli +script non dovrebbero mai impostare o annullare l'impostazione di +\fBXZ_DEFAULTS\fP. +.TP +\fBXZ_OPT\fP +Questo serve per passare le opzioni a \fBxz\fP quando non sia possibile +impostare le opzioni direttamente sulla riga di comando di \fBxz\fP. Questo è +il caso quando \fBxz\fP viene eseguito da uno script o da uno strumento, ad +esempio GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +Gli script possono usare \fBXZ_OPT\fP, per esempio, per impostare opzioni di +compressione predefinite specifiche per lo script. Si raccomanda comunque di +permettere agli utenti di sovrascrivere \fBXZ_OPT\fPse questo è ragionevole. Ad +esempio, negli script \fBsh\fP(1) si può usare qualcosa come questo: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "COMPATIBILITÀ LZMA UTILS" +La sintassi della riga di comando di \fBxz\fP è essenzialmente un sopra\-insieme +di \fBlzma\fP, \fBunlzma\fP, e \fBlzcat\fP come trovati nelle LZMA Utils +4.32.x. Nella maggior parte dei casi è possibili sostituire le LZMA Utils +con le XZ Utils senza rompere gli script esistenti. Ci sono però alcune +incompatibilità, che in alcuni casi potrebbero causare problemi. +. +.SS "Livelli di compressione preimpostati" +La numerazione dei livelli di compressione preimpostati non è identica in +\fBxz\fP e nelle LZMA Utils. La differenza più importante è il modo in cui le +dimensioni del dizionario vengono mappate sulle diverse preimpostazioni. La +dimensione del dizionario è approssimativamente uguale all'utilizzo della +memoria del decompressore. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Livello;xz;LZMA Utils +\-0;256 KiB;N/A +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +Le differenze di dimensione del dizionario influiscono anche sull'utilizzo +della memoria del compressore, ma ci sono alcune altre differenze tra le +LZMA Utils e le XZ Utils, che rendono la differenza ancora più grande: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Livello;xz;LZMA Utils 4.32.x +\-0;3 MiB;N/A +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +Il livello preimpostato predefinito nelle LZMA Utils è \fB\-7\fP mentre nelle XZ +Utils è \fB\-6\fP, quindi entrambi utilizzano un dizionario da 8 MiB per +impostazione predefinita. +. +.SS "File .lzma con flussi vs. senza flussi" +La dimensione non compressa del file può essere memorizzata +nell'intestazione \fB.lzma\fP. Le LZMA Utils lo fanno durante la compressione +di file regolari. L'alternativa consiste nel memorizzare che la dimensione +non compressa è sconosciuta e utilizzare l'indicatore di fine carico utile +per indicare il punto in cui il decompressore deve fermarsi. Le LZMA Utils +utilizzano questo metodo quando le dimensioni non compresse non sono note, +come nel caso, ad esempio, delle pipe. +.PP +\fBxz\fP supporta la decompressione di file \fB.lzma\fP con o senza il marcatore +di fine payload, ma tutti i file \fB.lzma\fP creati da \fBxz\fP utilizzeranno il +marcatore di fine payload e avranno dimensioni non compresse contrassegnate +come sconosciute nell'intestazione \fB.lzma\fP. Questo può essere un problema +in alcune situazioni non comuni. Ad esempio, un decompressore \fB.lzma\fP in un +dispositivo embedded potrebbe funzionare solo con file con dimensioni non +compresse note. Se si incorre in questo problema, occorre utilizzare le LZMA +Utils oppure l'LZMA SDK per creare dei file \fB.lzma\fP con dimensioni non +compresse note. +. +.SS "File .lzma non supportati" +Il formato \fB.lzma\fP permette valori \fIlc\fP fino a 8, e valori \fIlp\fP fino a +4. Le LZMA Utils possono decomprimere file con qualunque \fIlc\fP e \fIlp\fP, ma +creeranno sempre file con \fBlc=3\fP e \fBlp=0\fP. Creare file con altri \fIlc\fP e +\fIlp\fP è possibile con \fBxz\fP e con l'LZMA SDK. +.PP +L'implementazione del filtro LZMA1 in liblzma richiede che la somma di \fIlc\fP +e \fIlp\fP non debba superare 4. Pertanto, i file \fB.lzma\fP che superano questa +limitazione non possono essere decompressi con \fBxz\fP. +.PP +Le LZMA Utils creano solo file \fB.lzma\fP con dimensione del dizionario 2^\fIn\fP +(una potenza di 2) ma accettano file con qualsiasi dimensione di +dizionario. liblzma accetta solo file \fB.lzma\fP con dimensione del dizionario +2^\fIn\fP o 2^\fIn\fP + 2^(\fIn\fP\-1). Questo serve a limitare i falsi positivi +quando si cerca di identificare i file \fB.lzma\fP. +.PP +All'atto pratico queste limitazioni non dovrebbero essere un problema, +perché praticamente tutti i file \fB.lzma\fP sono stati compressi con +impostazioni che liblzma accetterà. +. +.SS "Dati sporchi finali" +Quando si decomprime, le LZMA Utils ignorano automaticamente tutto quello +che c'è dopo il primo flusso \fB.lzma\fP. Nella maggior parte delle situazioni +questo è un baco. Questo significa anche che le LZMA Utils non supportano la +decompressione di file \fB.lzma\fP concatenati. +.PP +Se sono rimasti dati dopo il primo flusso \fB.lzma\fP, \fBxz\fP considera il file +corrotto a meno che sia stato utilizzato \fB\-\-single\-stream\fP. Questo può far +rompere script incomprensibili che hanno assunto che i dati sporchi finali +vengano ignorati. +. +.SH NOTE +. +.SS "L'output compresso può variare" +L'esatto output compresso prodotto dallo stesso file di input non compresso +può variare tra le versioni delle XZ Utils, anche se le opzioni di +compressione sono le stesse. Questo perché il codificatore può essere stato +migliorato (compressione più veloce o migliore) senza influire sul formato +del file. L'output può variare anche tra diverse build della stessa versione +delle XZ Utils, se vengono utilizzate opzioni di build differenti. +.PP +Quanto sopra significa che una volta che \fB\-\-rsyncable\fP è stato +implementato, i file risultanti non saranno necessariamente rsync\-abili a +meno che sia i vecchi che i nuovi file non siano stati compressi con la +stessa versione di xz. Questo problema può essere risolto se una parte +dell'implementazione del codificatore viene congelata per mantenere stabile +l'output rsync\-abile tra le versioni di xz. +. +.SS "Abilita i decompressori .xz" +Le implementazioni dei decompressori \fB.xz\fP embedded, come XZ Embedded, non +necessariamente supportano file creati con tipi di integrità \fICONTROLLO\fP +diversi da \fBnone\fP e \fBcrc32\fP. Dal momento che il valore predefinito è +\fB\-\-check=crc64\fP, occorre specificare \fB\-\-check=none\fP o \fB\-\-check=crc32\fP +quando si creano file per sistemi embedded. +.PP +Al di fuori dei sistemi embedded, tutti i decompressori in formato \fB.xz\fP +supportano tutti i tipi di \fICONTROLLO\fP, o almeno sono in grado di +decomprimere il file senza verificare il controllo di integrità se il +particolare \fICONTROLLO\fP non è supportato. +.PP +XZ Embedded supporta i filtri BCJ, ma solo con offset iniziale predefinito. +. +.SH ESEMPI +. +.SS "Informazioni di base" +Comprime il file \fIfoo\fP in \fIfoo.xz\fP utilizzando il livello di compressione +predefinito (\fB\-6\fP) e rimuove \fIfoo\fP se la compressione ha esito positivo: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +Decomprime \fIbar.xz\fP in \fIbar\fP e non rimuove \fIbar.xz\fP anche se la +decompressione ha successo: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +Crea \fIbaz.tar.xz\fP con il preset \fB\-4e\fP (\fB\-4 \-\-extreme\fP), che è più lenta +della predefinita \fB\-6\fP, ma ha bisogno di meno memoria per la compressione e +decompressione (48\ MiB e 5\ MiB, rispettivamente): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +Una combinazione di file compressi e non compressi può essere decompressa +sullo output standard con un singolo comando: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Compressione parallela di più file" +Su GNU e *BSD, \fBfind\fP(1) e \fBxargs\fP(1) possono essere usati per +parallelizzare la compressione di più file: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +L'opzione \fB\-p\fP di \fBxargs\fP(1) imposta il numero di processi \fBxz\fP +paralleli. Il valore migliore per l'opzione \fB\-n\fP dipende dal numero di file +da comprimere. Se sono presenti solo un paio di file, il valore dovrebbe +probabilmente essere 1; con decine di migliaia di file, 100 o anche di più +può essere appropriato per ridurre il numero di processi \fBxz\fP che +\fBxargs\fP(1) alla fine creerà. +.PP +L'opzione \fB\-T1\fP per \fBxz\fP serve a forzare la modalità a thread singola, +perché \fBxargs\fP (1) viene utilizzato per controllare la quantità di +parallelizzazione. +. +.SS "Modalità robot" +Calcola quanti byte sono stati salvati in totale dopo la compressione di più +file: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Uno script potrebbe voler sapere se si sta utilizzando una versione di \fBxz\fP +sufficientemente recente. Il seguente script \fBsh\fP(1) controlla che il +numero di versione dello strumento \fBxz\fP sia almeno 5.0.0. Questo metodo è +compatibile con le vecchie versioni beta, che non supportavano l'opzione +\fB\-\-robot\fP: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Your xz is too old." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Imposta un limite di utilizzo della memoria per la decompressione +utilizzando \fBXZ_OPT\fP, ma se è già stato impostato un limite, non lo +aumenta: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Catene di filtri di compressione personalizzate" +L'uso più semplice delle catene di filtri personalizzate è la +personalizzazione di un preset di LZMA2. Questo può essere utile, perché i +preset coprono solamente un sottoinsieme di tutte le combinazioni di +impostazioni di compressione potenzialmente utili. +.PP +Le colonne CompCPU delle tabelle dalle descrizioni delle opzioni \fB\-0\fP +\&... \fB\-9\fP e \fB\-\-extreme\fP sono utili quando si personalizzano i preset di +LZMA2. Di seguito sono riportate le parti rilevanti raccolte da queste due +tabelle: +.RS +.PP +.TS +tab(;); +c c +n n. +Livello preimpostato;CompCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +Se si sa che un file richiede un dizionario piuttosto grande (ad esempio, +32\ MiB) per essere compresso bene, ma si desidera comprimerlo più +velocemente di quanto farebbe \fBxz \-8\fP, è possibile modificare un preset con +un basso valore CompCPU (ad esempio, 1) per utilizzare un dizionario più +grande: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +Con alcuni file, il comando sopra potrebbe essere più veloce di \fBxz \-6\fP e +la compressione significativamente migliore. Tuttavia, si deve sottolineare +che solo alcuni file traggono beneficio da un dizionario grande e mantengono +basso il valore di CompCPU. La situazione più ovvia in cui un dizionario +grande può aiutare molto è un archivio contenente file molto simili di +almeno un paio di megabyte ciascuno. La dimensione del dizionario deve +essere significativamente più grande di ogni singolo file per permettere a +LZMA2 di trarre pieno vantaggio dalle somiglianze tra file consecutivi. +.PP +Se l'utilizzo molto elevato della memoria del compressore e del +decompressore è accettabile, e il file da comprimere è almeno di diverse +centinaia di megabyte, potrebbe essere utile utilizzare un dizionario ancora +più grande dei 64 MiB che \fBxz \-9\fP utilizzerebbe: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +L'uso di \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP) come nell'esempio precedente può +essere utile per vedere i requisiti di memoria del compressore e del +decompressore. Tenere presente che l'utilizzo di un dizionario più grande +della dimensione del file non compresso è uno spreco di memoria, quindi il +comando precedente non è utile per i file di piccole dimensioni. +.PP +A volte il tempo di compressione non importa, ma l'utilizzo di memoria del +decompressore deve essere tenuta bassa, per esempio, per permettere di +decomprimere il file in un sistema embedded. Il comando seguente usa \fB\-6e\fP +(\fB\-6 \-\-extreme\fP) come base e imposta il dizionario a soli 64\ KiB. Il file +risultante può essere decompresso con XZ Embedded (ecco perché c'è +\fB\-\-check=crc32\fP) usando circa 100\ KiB di memoria. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +Se si desidera spremere il maggior numero possibile di byte, a volte può +essere utile regolare il numero di bit di contesto letterale (\fIlc\fP) e il +numero di bit di posizione (\fIpb\fP). Anche la regolazione del numero di bit +di posizione letterale (\fIlp\fP) potrebbe essere d'aiuto, ma di solito \fIlc\fP e +\fIpb\fP sono più importanti. Per esempio, un archivio di codici sorgente +contiene principalmente testo US\-ASCII, quindi qualcosa come il seguente +potrebbe produrre un file leggermente (0,1\ %) più piccolo di \fBxz \-6e\fP +(provare anche senza \fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +Usare un altro filtro insieme a LZMA2 può migliorare la compressione per +alcuni tipi di file. Ad esempio, per comprimere una libreria condivisa +x86\-32 o x86\-64 usare il filtro BCJ: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +Si noti che l'ordine delle opzioni di filtro è significativo. Se viene +specificato \fB\-\-x86\fP dopo \fB\-\-lzma2\fP, \fBxz\fP darà un errore, perché non può +esserci alcun filtro dopo LZMA2 e anche perché il filtro BCJ x86 non può +essere utilizzato come ultimo filtro della catena. +.PP +Il filtro Delta insieme con LZMA2 può dare buoni risultati sulle immagini +bitmap. Di solito dovrebbe battere il PNG, il quale ha alcuni filtri più +avanzati rispetto al semplice delta ma utilizza Deflate per la compressione +effettiva. +.PP +L'immagine deve essere salvata in un formato non compresso, ad esempio un +TIFF non compresso. Il parametro distanza del filtro Delta è impostato in +modo che corrisponda al numero di byte per pixel nell'immagine. Per esempio, +un bitmap a 24 bit richiede \fBdist=3\fP, e va anche bene passare \fBpb=0\fP a +LZMA2 per adattarsi all'allineamento a tre byte: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +Se più immagini sono state inserite in un singolo archivio (ad esempio, +\&\fB.tar\fP), il filtro Delta funzionerà anche su questo purché tutte le +immagini abbiano lo stesso numero di byte per pixel. +. +.SH "VEDERE ANCHE" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/it/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/it/xzdec.1 new file mode 100644 index 0000000000..e3ff6ec043 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/it/xzdec.1 @@ -0,0 +1,88 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Italian translations for xz-man package +.\" Luca Vercelli , 2024-2025 +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 08/04/2024 Tukaani "XZ Utils" +.SH NOME +xzdec, lzmadec \- Piccoli compressori .xz e .lzma +.SH SINOSSI +\fBxzdec\fP [\fIOPZIONE...\fP] [\fIFILE...\fP] +.br +\fBlzmadec\fP [\fIOPZIONE...\fP] [\fIFILE...\fP] +.SH DESCRIZIONE +\fBxzdec\fP è uno strumento di sola decompressione basato su liblzma per i file +\&\fB.xz\fP (e solo \fB.xz\fP). \fBxzdec\fP è destinato a funzionare come sostituto +drop\-in di \fBxz\fP (1) nelle situazioni più comuni in cui è stato scritto uno +script che utilizza \fBxz \-\-decompress \-\-stdout\fP (e possibilmente alcune +altre opzioni di uso comune) per decomprimere i file \fB.xz\fP. \fBlzmadec\fP è +identico a \fBxzdec\fP tranne nel fatto che supporta file \fB.lzma\fP invece di +\&\fB.xz\fP. +.PP +Per ridurre la dimensione dell'eseguibile, \fBxzdec\fP non supporta né il +multi\-thread né la localizzazione, e non legge le opzioni dalle variabili di +ambiente \fBXZ_DEFAULTS\fP e \fBXZ_OPT\fP. \fBxzdec\fP non supporta la +visualizzazione delle informazioni di avanzamento: inviare \fBSIGINFO\fP a +\fBxzdec\fP non fa nulla mentre inviare \fBSIGUSR1\fP termina il processo anziché +mostrare le informazioni di avanzamento. +.SH OPZIONI +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +Ignorato per compatibilità con \fBxz\fP(1). \fBxzdec\fP supporta solo la +decompressione. +.TP +\fB\-k\fP, \fB\-\-keep\fP +Ignorato per compatibilità con \fBxz\fP(1). \fBxzdec\fP non crea né rimuove mai +file. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Ignorato per compatibilità con \fBxz\fP(1). \fBxzdec\fP scrive sempre i dati +decompressi sullo standard output. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Specificare questa opzione una sola volta non ha effetto, poiché \fBxzdec\fP +non visualizza mai alcun avvertimento né avviso. Specificare questa opzione +due volte per eliminare gli errori. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Ignorato per compatibilità con \fBxz\fP(1). \fBxzdec\fP non utilizza mai il codice +di uscita 2. +.TP +\fB\-h\fP, \fB\-\-help\fP +Mostra un messaggio di aiuto e termina con successo. +.TP +\fB\-V\fP, \fB\-\-version\fP +Mostra il numero di versione di \fBxzdec\fP e liblzma. +.SH "CODICE DI USCITA" +.TP +\fB0\fP +Andava tutto bene. +.TP +\fB1\fP +È avvenuto un errore. +.PP +\fBxzdec\fP non ha alcun messaggio di avvertimento come \fBxz\fP (1), quindi lo +stato di uscita 2 non viene utilizzato da \fBxzdec\fP. +.SH NOTE +Utilizzare \fBxz\fP(1) al posto di \fBxzdec\fP o \fBlzmadec\fP per l'utilizzo +normale abituale. \fBxzdec\fP e \fBlzmadec\fP sono pensati solo per situazioni in +cui sia importante avere un decompressore più piccolo rispetto a quello con +funzionalità complete \fBxz\fP(1). +.PP +\fBxzdec\fP e \fBlzmadec\fP non sono veramente così piccoli. La dimensione può +essere ridotta ulteriormente eliminando delle funzionalità da liblzma al +momento della compilazione, ma questo di solito non dovrebbe essere fatto +per gli eseguibili distribuiti nelle tipiche distribuzioni di sistemi +operativi non embedded. Se c'è bisogno di un decompressore \fB.xz\fP veramente +piccolo, si consideri l'utilizzo di XZ Embedded. +.SH "VEDERE ANCHE" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/it/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/it/xzdiff.1 new file mode 100644 index 0000000000..dc0d9758b7 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/it/xzdiff.1 @@ -0,0 +1,55 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Italian translations for xz-man package +.\" Luca Vercelli , 2024-2025 +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 06/03/2025 Tukaani "XZ Utils" +.SH NOME +xzcmp, xzdiff, lzcmp, lzdiff \- confronto tra file compressi +. +.SH SINOSSI +\fBxzcmp\fP [\fIOPZIONE...\fP] \fIFILE1\fP [\fIFILE2\fP] +.br +\fBxzdiff\fP \&... +.br +\fBlzcmp\fP \&... (DEPRECATO) +.br +\fBlzdiff\fP \&... (DEPRECATO) +. +.SH DESCRIZIONE +\fBxzcmp\fP e \fBxzdiff\fP confrontano i contenuti non compressi di due file. I +dati non compressi e le opzioni sono passate a \fBcmp\fP(1) o \fBdiff\fP(1) a +meno che sia specificato \fB\-\-help\fP o \fB\-\-version\fP. +.PP +Se sono indicati sia \fIFILE1\fP che \fIFILE2\fP, essi possono essere file non +compressi oppure file nei formati che \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), +\fBlzop\fP(1), \fBzstd\fP(1), o \fBlz4\fP(1) possono decomprimere. I comandi di +decompressione necessari sono dedotti dai suffissi dei nomi dei file +\fIFILE1\fP e \fIFILE2\fP. Un file con un suffisso non riconosciuto viene +considerato o non compresso oppure in un formato che \fBxz\fP(1) può +decomprimere. +.PP +Se viene fornito un solo nome di file, \fIFILE1\fP deve avere un suffisso di un +formato di compressione supportato e il nome di \fIFILE2\fP si assume che sia +\fIFILE1\fP senza il suffisso del formato di compressione. +.PP +I comandi \fBlzcmp\fP, e \fBlzdiff\fP sono forniti per retrocompatibilità con le +LZMA Utils. Sono deprecati e saranno rimosso in una versione futura. +. +.SH "CODICE DI USCITA" +Se avviene un errore nella decompressione, lo stato di uscita è +\fB2\fP. Altrimenti viene usato lo stato di uscita di \fBcmp\fP(1) o \fBdiff\fP(1) +. +.SH "VEDERE ANCHE" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/it/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/it/xzgrep.1 new file mode 100644 index 0000000000..778054dc4c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/it/xzgrep.1 @@ -0,0 +1,94 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Italian translations for xz-man package +.\" Luca Vercelli , 2024-2025 +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 06/03/2025 Tukaani "XZ Utils" +.SH NOME +xzgrep \- Cerca pattern in file potenzialmente compressi +. +.SH SINOSSI +\fBxzgrep\fP [\fIOPZIONE...\fP] [\fILISTA_PATTERN\fP] [\fIFILE...\fP] +.br +\fBxzegrep\fP \&... +.br +\fBxzfgrep\fP \&... +.br +\fBlzgrep\fP \&... (DEPRECATO) +.br +\fBlzegrep\fP \&... (DEPRECATO) +.br +\fBlzfgrep\fP \&... (DEPRECATO) +. +.SH DESCRIZIONE +\fBxzgrep\fP invoca \fBgrep\fP(1) sui contenuti non compressi dei file. I formati +dei \fIFILE\fP sono dedotti dai suffissi dei nomi dei file. Sarà decompresso +qualsiasi file con un suffisso supportato da \fBxz\fP(1), \fBgzip\fP(1), +\fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), o \fBlz4\fP(1); tutti gli altri file +saranno considerati non compressi. +.PP +Se non sono specificati \fIFILE\fP, o se \fIFILE\fP è \fB\-\fP, viene letto lo +standard input. Quando si legge da standard input vengono decompressi +solamente i file supportati da \fBxz\fP(1). Gli altri file sono considerati già +non compressi. +.PP +Sono supportate la maggior parte delle \fIOPZIONI\fP di \fBgrep\fP(1). Tuttavia, +le opzioni seguenti non sono supportate: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIAZIONE\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIGLOB\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIGLOB\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIFILE\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIGLOB\fP +.PP +\fBxzegrep\fP è un alias per \fBxzgrep \-E\fP. \fBxzfgrep\fP è un alias per \fBxzgrep \-F\fP. +.PP +I comandi \fBlzgrep\fP, \fBlzegrep\fP, e \fBlzfgrep\fP sono forniti per +retrocompatibilità con le LZMA Utils. Sono deprecati e saranno rimosso in +una versione futura. +. +.SH "CODICE DI USCITA" +.TP +0 +Almeno una corrispondenza è stata trovata in almeno uno dei file +input. Nessun errore è avvenuto. +.TP +1 +Non sono state trovate corrispondenze in nessuno dei file di input. Non si +sono verificati errori. +.TP +>1 +Sono avvenuti uno o più errori. Non è noto se sono state trovate delle +corrispondenze. +. +.SH AMBIENTE +.TP +\fBGREP\fP +Se \fBGREP\fP è impostato a un valore non vuoto, verrà usato al posto di +\fBgrep\fP, \fBgrep \-E\fP, o \fBgrep \-F\fP. +. +.SH "VEDERE ANCHE" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/it/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/it/xzless.1 new file mode 100644 index 0000000000..03fcb0de8d --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/it/xzless.1 @@ -0,0 +1,47 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Italian translations for xz-man package +.\" Luca Vercelli , 2024-2025 +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 06/03/2025 Tukaani "XZ Utils" +.SH NOME +xzless, lzless \- mostra file (testuali) compressi xz o lzma +.SH SINOSSI +\fBxzless\fP [\fIFILE\fP...] +.br +\fBlzless\fP [\fIFILE\fP...] (DEPRECATO) +.SH DESCRIZIONE +\fBxzless\fP è un filtro che visualizza testo da file compressi a un +terminale. I file supportati da \fBxz\fP(1) vengono decompressi; gli altri +file sono considerati già non compressi. Se non viene dato alcun \fIFILE\fP, +\fBxzless\fP legge dallo standard input. +.PP +\fBxzless\fP usa \fBless\fP(1) per mostrare il suo output. A differenza di +\fBxzmore\fP, la scelta del paginatore non può essere modificata impostando una +variabile d'ambiente. I comandi si basano sia su \fBmore\fP (1) che su \fBvi\fP +(1) e consentono il movimento in avanti e all'indietro e la ricerca. Per +ulteriori informazioni vedere il manuale di \fBless\fP(1). +.PP +Il comando chiamato \fBlzless\fP è fornito per retrocompatibilità con le LZMA +Utils. È deprecato e sarà rimosso in una versione futura. +.SH AMBIENTE +.TP +\fBLESSMETACHARS\fP +Un elenco di caratteri speciali per la shell. Impostato da \fBxzless\fP a meno +che sia già impostato nell'ambiente. +.TP +\fBLESSOPEN\fP +Valorizzare con una riga di comando per lanciare il decompressore \fBxz\fP(1) +per preprocessare i file input per \fBless\fP(1). +.SH "VEDERE ANCHE" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/it/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/it/xzmore.1 new file mode 100644 index 0000000000..60fca91601 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/it/xzmore.1 @@ -0,0 +1,50 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Italian translations for xz-man package +.\" Luca Vercelli , 2024-2025 +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 06/03/2025 Tukaani "XZ Utils" +.SH NOME +xzmore, lzmore \- mostra file (testuali) compressi xz o lzma +. +.SH SINOSSI +\fBxzmore\fP [\fIFILE\fP...] +.br +\fBlzmore\fP [\fIFILE\fP...] (DEPRECATO) +. +.SH DESCRIZIONE +\fBxzmore\fP visualizza il testo da file non compressi a un terminale usando +\fBmore\fP(1). I file supportati da \fBxz\fP(1) vengono decompressi; gli altri +file sono considerati non compressi. Se non viene dato alcun \fIFILE\fP, +\fBxzmore\fP legge dallo standard input. Si veda il manuale di \fBmore\fP(1) per i +comandi da tastiera. +.PP +Si noti che lo scorrimento all'indietro potrebbe non essere possibile a +seconda dell'implementazione di \fBmore\fP(1). Ciò è dovuto al fatto che +\fBxzmore\fP utilizza una pipe per passare i dati decompressi a +\fBmore\fP(1). \fBxzless\fP(1) utilizza \fBless\fP(1) che fornisce funzionalità più +avanzate. +.PP +Il comando \fBlzmore\fP è fornito per retrocompatibilità con le LZMA Utils. È +deprecato e sarà rimosso in una versione futura. +. +.SH AMBIENTE +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +Se \fBPAGER\fP è impostato, il suo valore è usato come paginatore al posto di +\fBmore\fP(1). +. +.SH "VEDERE ANCHE" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ko/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/ko/lzmainfo.1 new file mode 100644 index 0000000000..718ad0a7c3 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ko/lzmainfo.1 @@ -0,0 +1,38 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Korean translation for the xz-man +.\" Seong-ho Cho , 2023, 2024. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 2013\-06\-30 Tukaani "XZ 유틸리티" +.SH 이름 +lzmainfo \- .lzma 파일 헤더에 들어있는 정보를 보여줍니다 +.SH 요약 +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fI<파일>...\fP] +.SH 설명 +\fBlzmainfo\fP 는 \fB.lzma\fP 파일 헤더에 들어있는 정보를 보여줍니다. 지정 \fI<파일>\fP에서 13바이트를 +우선 읽어 헤더를 디코딩한 후, 가독 형식으로 표준 출력에 보여줍니다. \fI<파일>\fP을 지정하지 않거나 +\fI<파일>\fP 값이 \fI\-\fP 이면 표준 입력을 읽습니다. +.PP +보통 대부분 관심있는 정보는 압축 해제 용량과 딕서너리 크기입니다. 압축 해제 용량의 경우 파일이 비스트림 \fB.lzma\fP 형식 계열인 +경우에만 나타납니다. 파일 압축 해제 필요 메모리 용량은 수십 킬로바이트에 딕셔너리 크기를 합친 값입니다. +.PP +\fBlzmainfo\fP 는 LZMA 유틸리티 하위 호환성을 목적으로 XZ 유틸리티에 기본으로 들어있습니다. +.SH "종료 상태" +.TP +\fB0\fP +모든 상태 양호. +.TP +\fB1\fP +오류 발생. +.SH 버그 +\fBlzmainfo\fP 프로그램은 \fBMiB\fP (2^20 바이트) 용량 단위인데 (실제로) \fBMB\fP를 사용합니다. LZMA 유틸리티 +출력 호환 유지가 목적입니다. +.SH "추가 참조" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ko/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/ko/xz.1 new file mode 100644 index 0000000000..631a9a7cc8 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ko/xz.1 @@ -0,0 +1,1585 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Korean translation for the xz-man +.\" Seong-ho Cho , 2023, 2024. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 2025\-03\-08 Tukaani "XZ 유틸리티" +. +.SH 이름 +xz, unxz, xzcat, lzma, unlzma, lzcat \- .xz 파일과 .lzma 파일을 압축 또는 압축 해제합니다 +. +.SH 요약 +\fBxz\fP [\fI<옵션>...\fP] [\fI<파일>...\fP] +. +.SH "명령 별칭" +\fBunxz\fP 명령은 \fBxz \-\-decompress\fP 명령과 동일합니다. +.br +\fBxzcat\fP 명령은 \fBxz \-\-decompress \-\-stdout\fP 명령과 동일합니다. +.br +\fBlzma\fP 명령은 \fBxz \-\-format=lzma\fP 명령과 동일합니다. +.br +\fBunlzma\fP 명령은 \fBxz \-\-format=lzma \-\-decompress\fP 명령과 동일합니다. +.br +\fBlzcat\fP 명령은 \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP 명령과 동일합니다. +.PP +파일 압축을 해제해야 하는 셸 스크립트를 작성할 때, \fBunxz\fP 와 \fBxzcat\fP 이름 대신 \fBxz\fP 명령과 적절한 인자 +값(\fBxz \-d\fP 또는 \fBxz \-dc\fP)의 사용을 추천드립니다. +. +.SH 설명 +\fBxz\fP는 \fBgzip\fP(1) 과 \fBbzip2\fP(1) 과 비슷한 명령행 문법을 지닌 범용 데이터 압축 도구입니다. 자체 파일 +형식은 \fB.xz\fP 형식이나, LZMA 유틸리티에서 사용하는 예전 \fB.lzma\fP 형식과 형식 헤더가 없는 RAW 압축 스트림도 +지원합니다. 게다가, \fBlzip\fP에서 활용하는 \fB.lz\fP 형식 압축 해제도 지원합니다. +.PP +각 \fI파일\fP 에 대한 \fBxz\fP 압축 또는 압축 해제는 선택 동작 모드에 따릅니다. \fI<파일>\fP 값이 주어졌거나 +\fI<파일>\fP 값이 \fB\-\fP이면, \fBxz\fP 명령에서 표준 입력을 읽고 처리한 데이터를 표준 출력에 기록합니다. +\fBxz\fP 에서는 터미널에서 활용할 경우 압축 데이터를 표준 압축으로 기록하는 동작을 거절(오류를 출력하고 \fI<파일>\fP을 +건너뜀)합니다. 이와 비슷하게, \fBxz\fP 유틸리티를 터미널에서 실행하면 표준 입력의 압축 데이터 읽기를 거절합니다. +.PP +\fB\-\-stdout\fP 을 지정하지 않는 한, \fB\-\fP가 아닌 \fI<파일>\fP을 원본 \fI<파일>\fP 이름에서 +가져온 새 파일 이름으로 기록합니다: +.IP \(bu 3 +압축할 때, 대상 파일 형식의 접미사(\fB.xz\fP or \fB.lzma\fP) 는 원본 파일 이름 뒤에 붙어 대상 파일이름이 됩니다. +.IP \(bu 3 +압축 해제할 때, \fB.xz\fP, \fB.lzma\fP, \fB.lz\fP 접미사를 파일 이름에서 제거하고 대상 파일 이름을 알아냅니다. +\fBxz\fP에서는 \fB.txz\fP, \fB.tlz\fP 접미사도 인식하며, \fB.tar\fP 접미사로 치환합니다. +.PP +대상 파일이 이미 있으면, 오류를 나타내고 \fI<파일>\fP을 건너뜁니다. +.PP +표준 출력으로 기록하기 전에는, \fBxz\fP는 경고를 나타내며, 다음 조건에 만족할 경우 \fI<파일>\fP을 건너뜁니다: +.IP \(bu 3 +\fI<파일>\fP이 일반 파일이 아닐 때. 심볼릭 링크는 따라가지 않기에, 일반 파일로 간주하지 않습니다. +.IP \(bu 3 +\fI<파일>\fP이 하나 이상의 하드 링크일 떄. +.IP \(bu 3 +\fI<파일>\fP에 setuid, setgid, 끈적이 비트 집합이 붙어있을 떄. +.IP \(bu 3 +동작 모드를 압축으로 설정하고, \fI<파일>\fP은 대상 파일 형식의 접미사를 이미 붙였을 때(\fB.xz\fP 형식으로 압축하면 +\&\fB.xz\fP 또는 \fB.txz\fP, \fB.lzma\fP 형식으로 압축하면 \fB.lzma\fP 또는 \fB.tlz\fP). +.IP \(bu 3 +동작 모드를 압축 해제로 설정하고, \fI<파일>\fP에 지원 파일 형식 접미사(\fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, +\&\fB.tlz\fP, \fB.lz\fP)를 붙이지 않았을 때. +.PP +\fI<파일>\fP 의 압축 또는 압축 해제를 성공하고 나면, \fBxz\fP는 소유자, 소유그룹, 권한, 접근 시각, 수정 시각 +정보를 원본 \fI<파일>\fP에서 대상 파일로 그대로 복사합니다. 그룹 정보 복사에 실패하면, 권한을 수정하여 원본 +\fI<파일>\fP에 접근 권한이 없는 사용자가 대상 파일로 접근하지 못하게 합니다. \fBxz\fP는 아직 접근 제어 목록이나 +확장 속성 등의 기타 메타데이터를 복사하는 기능은 지원하지 않습니다. +.PP +대상 파일을 온전히 닫고 나면, \fB\-\-keep\fP 옵션을 지원하지 않았을 경우 원본 \fI<파일>\fP을 제거합니다. 원본 +\fI<파일>\fP은 출력을 표준 출력으로 기록했거나 오류가 발생했을 경우 제거하지 않습니다. +.PP +\fBxz\fP 프로세스에 \fBSIGINFO\fP 시그널 또는 \fBSIGUSR1\fP 시그널을 보내면 표준 출력으로 진행 정보를 출력합니다. 표준 +오류가 터미널일 경우일 경우에만 제한하며 \fB\-\-verbose\fP 옵션을 지정하면 진행 표시줄을 자동으로 나타냅니다. +. +.SS "메모리 사용" +\fBxz\fP 메모리 사용은 수백 킬로바이트로 시작하여 수 기가바이트까지 압축 설정에 따라 다릅니다. 압축 해제 프로그램이 필요로 하는 +메모리 공간을 결정하는 파일 압축시에 설정 값을 활용합니다. 보통 압축 해제 프로그램은 파일을 만들 때, 압축 프로그램 메모리 사용량의 +5% 에서 20% 정도 필요합니다. 예를 들면, \fBxz \-9\fP로 압축한 파일 압축 해제시 현재 65MiB 메모리 용량이 필요합니다. +여전하게도, 압축 해제시 수 기가 바이트의 메모리가 필요한 \fB.xz\fP 파일에도 가능한 이야기입니다. +.PP +특히 이전 시스템 사용자의 경우 메모리 사용량이 엄청나게 늘어나는 점에 짜증이 날 수 있습니다. 이런 불편한 상황을 피하기 위해, +\fBxz\fP에 기본적으로 비활성 상태인 내장 메모리 사용 제한 기능을 넣었습니다. 일부 운영체제에서 처리 중 메모리 사용을 제한하는 +수단을 제공하긴 하지만, 여기에 의지하기에는 충분히 유연하지 않습니다(예를 들면, \fBulimit\fP(1)을 사용하면 가상 메모리를 +제한하여 \fBmmap\fP(2)을 먹통으로 만듭니다). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +메모리 사용 제한 기능은 \fB\-\-memlimit=\fP\fI<제한용량>\fP 명령행 옵션으로 사용할 수 있습니다. 종종 +\fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP와 같이 \fBXZ_DEFAULTS\fP 환경 변수를 설정하여 제한 기능을 켜는게 더 +편합니다. \fB\-\-memlimit\-compress=\fP\fI<제한용량>\fP 옵션과 +\fB\-\-memlimit\-decompress=\fP\fI<제한용량>\fP 옵션을 활용하여 압축 및 압축 해제시 별도로 한계 값을 +설정할 수 있습니다. 이 두 가지 옵션의 \fBXZ_DEFAULTS\fP 환경 변수 밖에서의 사용은, \fBxz\fP를 단일 실행할 때 압축 및 +압축 해제 동작을 동시에 수행하지 않으며, 앞서 언급한 두가지 옵션을 명령행에 입력하기에는 +\fB\-\-memlimit=\fP\fI<제한용량>\fP(또는 \fB\-M\fP \fI<제한용량>\fP)이 더 짧기 때문에 별로 쓸모가 +없습니다. +.PP +압축 해제시 메모리 사용 제한 지정 한계를 초과하면, \fBxz\fP 유틸리티에서 오류를 나타내며 파일 압축 해제는 실패합니다. 압축을 +실행할 때 사용 제한 지정 한계를 넘어서면 \fBxz\fP에서는 설정 값을 줄여서 어쨌든 한계를 넘지 못하게 +합니다(\fB\-\-format=raw\fP 옵션 또는 \fB\-\-no\-adjust\fP 옵션 사용시 제외). 설정 한계 값이 엄청 작지 않은 이상 이 +방식대로 처리하면 어쨌든 실패하지 않습니다. 설정 값조정은 압축 래벨 사전 설정과 일치하지 않을 때 단계적으로 진행하는데, 이를테면, +\fBxz \-9\fP 명령 수행에 필요한 양보다 한계 값이 약간 작으면, 설정 값을 \fBxz \-8\fP에 못미치게 약간 줄여서 진행합니다. +. +.SS ".xz 파일 결합 및 패딩" +\&\fB.xz\fP 파일을 있는 그대로 합칠 수 있습니다. \fBxz\fP는 \fB.xz\fP 파일을 단독 파일일 때 처럼 압축해제합니다. +.PP +결합 부분과 마지막 부분 뒤에 패딩을 추가할 수 있습니다. 패딩은 널 바이트로 구성해야 하며 패딩 길이는 4바이트로 구성해야 합니다. +512 바이트 블록으로 파일 크기를 이루는 매체에 \fB.xz\fP 파일을 저장했을 경우에 요긴할 수 있습니다. +.PP +\&\fB.lzma\fP 파일 또는 원시 스트림의 경우 결합과 패딩을 허용하지 않습니다. +. +.SH 옵션 +. +.SS "정수 접두사와 별도 값" +정수 인자값이 필요한 대부분 위치에서는, 큰 정수값을 나타내기 쉽게 하도록 추가 접미사를 지원합니다. 정수와 접미사 사이에 어떤 공백이 +있으면 안됩니다. +.TP +\fBKiB\fP +1,024 (2^10) 배수 정수값. \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP, \fBKB\fP 단위를 \fBKiB\fP 동의어로 받아들입니다. +.TP +\fBMiB\fP +1,048,576 (2^20) 배수 정수값. \fBMi\fP, \fBm\fP, \fBM\fP, \fBMB\fP 단위를 \fBMiB\fP 동의어로 받아들입니다. +.TP +\fBGiB\fP +1,073,741,824 (2^30) 배수 정수값. \fBGi\fP, \fBg\fP, \fBG\fP, \fBGB\fP 단위를 \fBGiB\fP 동의어로 +받아들입니다. +.PP +특수 값 \fBmax\fP는 옵션에서 지원하는 정수 최대 값을 나타낼 때 사용할 수 있습니다. +. +.SS "동작 모드" +여러 동작 모드를 보여드리겠습니다만, 마지막에 주어진 동작 모드로 동작합니다. +.TP +\fB\-z\fP, \fB\-\-compress\fP +압축합니다. 어떤 동작 모드 옵션도 지정하지 않고 다른 동작 모드를 명령행에 따로 지정하지 않았다면 이 동작 모드는 기본입니다(예: +\fBunxz\fP 는 \fB\-\-decompress\fP를 암시). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +압축을 제대로 끝내고 나면, 표준 출력에 기록하거나 \fB\-\-keep\fP 옵션을 지정하지 않았다면 원본 파일을 제거합니다. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +압축 해제입니다. 압축 해제를 제대로 끝내고 나면, 표준 출력에 기록하거나 \fB\-\-keep\fP 옵션을 지정하지 않았다면 원본 파일을 +제거합니다. +.TP +\fB\-t\fP, \fB\-\-test\fP +압축 \fI<파일>\fP의 무결성을 시험해봅니다. 이 옵션은 압축 해제 데이터를 표준 출력으로 기록하는 대신 버린다는 점을 +제외하고 \fB\-\-decompress \-\-stdout\fP과 동일합니다. 어떤 파일도 만들거나 제거하지 않습니다. +.TP +\fB\-l\fP, \fB\-\-list\fP +압축 \fI<파일>\fP 정보를 출력합니다. 압축 해제 출력을 내보내지 않으며, 어떤 파일도 만들거나 제거하지 않습니다. 이 +조회 모드에서, 프로그램은 표준 입력 또는 기타 탐색 불가능한 원본에서 압축 데이터를 읽을 수 없습니다. +.IP "" +\fI<파일>\fP 기본 정보를 파일 당 한 줄 씩 기본으로 보여줍니다. 더 자세한 정보를 보려면 \fB\-\-verbose\fP +옵션을 사용하십시오. 더 자세한 정보는 \fB\-\-verbose\fP 옵션을 두번 사용하면 되지만, 추가 정보를 더 많이 가져오면서 탐색 +횟수가 늘어나는 문제로 인해 느려질 수 있습니다. 세부 출력 너비는 80 문자를 초과하며, 예를 들어 출력을 파이핑한다면, 터미널이 +충분히 너비가 넓지 못할 경우 \fBless\ \-S\fP 명령이 편리할 수 있습니다. +.IP "" +정확한 출력은 \fBxz\fP 버전과 다른 로캘에 따라 바뀔 수 있습니다. 기계 판독용 출력시 \fB\-\-robot \-\-list\fP 옵션을 +사용합니다. +. +.SS "동작 수정자" +.TP +\fB\-k\fP, \fB\-\-keep\fP +입력 파일을 삭제하지 않습니다. +.IP "" +\fBxz\fP 5.2.6 부터는 이 옵션으로 입력 파일이 일반 파일을 참조하는 심볼릭 링크나 하나 이상의 하드 링크, 내지는 setuid, +setgid, 끈적이 비트 세트를 설정한 상태라도 압축하거나 압축을 풀 수 있습니다. setuid, setgid, 끈적이 비트는 대상 +파일에 복사하지 않습니다. 이전 버전에서는 \fB\-\-force\fP 옵션을 지정했을 때만 가능했습니다. +.TP +\fB\-f\fP, \fB\-\-force\fP +이 옵션은 몇가지 동작에 영향을 줍니다: +.RS +.IP \(bu 3 +대상 파일이 이미 있으면, 압축 또는 압축 해제 전 삭제합니다. +.IP \(bu 3 +입력 파일이 일반 파일을 참조하는 심볼릭 링크나 하나 이상의 하드 링크, 내지는 setuid, setgid, 끈적이 비트 세트를 설정한 +상태라도 압축 또는 압축 해제를 진행합니다. setuid, setgid, 끈적이 비트는 대상 파일에 복사하지 않습니다. +.IP \(bu 3 +\fB\-\-decompress\fP \fB\-\-stdout\fP 옵션을 같이 사용하는 상황에서 \fBxz\fP 명령이 원본 파일의 형식을 알아내지 못할 때, +원본 파일의 사본을 표준 출력으로 보냅니다. 이렇게 하면 \fBxzcat\fP \fB\-\-force\fP 명령을 \fBxz\fP 명령으로 압축하지 않은 +파일에 대해 \fBcat\fP(1) 을 사용하는 것처럼 사용할 수 있습니다. 참고로 나중에, \fBxz\fP에서 \fBxz\fP로 하여금 여러 형식의 +파일을 표준 출력으로 복사하는 대신 압축을 해제하도록 새 압축 파일 형식을 지원할 예정입니다. +\fB\-\-format=\fP\fI<형식>\fP 옵션은 \fBxz\fP 명령에 단일 파일 형식만 압축 해제하도록 제한할 때 사용할 수 +있습니다. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +파일 대신 표준 출력으로 압축 또는 압축 해제한 데이터를 기록합니다. \fB\-\-keep\fP를 생략했습니다. +.TP +\fB\-\-single\-stream\fP +처음 \fB.xz\fP 스트림만 압축 해제하며, 스트림에 뒤따라오는 나머지 입력 데이터는 조용히 무시합니다. 보통 뒤따라오는 쓰레기 값에 +대해서는 \fBxz\fP 에서 오류를 나타냅니다. +.IP "" +\fBxz\fP는 \fB.lzma\fP 파일 또는 원시 스트림에서 온 하나 이상의 스트림에 대해 압축 해제동작을 취하지 않지만, 이 옵션을 사용하면 +\fBxz\fP에서 \fB.lzma\fP 파일 또는 원시 스트림을 처리한 다음에 뒤따라오는 데이터를 무시하도록 합니다. +.IP "" +이 옵션은 동작 모드가 \fB\-\-decompress\fP 또는 \fB\-\-test\fP가 아니면 동작에 아무런 영향을 주지 않습니다. +.IP "" +\fBxz\fP 5.7.1alpha 부터는 \fB\-\-single\-stream\fP 옵션의 동작에 \fB\-\-keep\fP 동작이 들어갑니다. +.TP +\fB\-\-no\-sparse\fP +희소 파일을 만들지 않습니다. 기본적으로 일반 파일로 압축 해제할 경우 \fBxz\fP 에서는 압축 해제한 파일에 이진 0값이 길게 늘어질 +경우 희소 배열 파일을 만들려고 합니다. 표준 출력의 내용 길이만큼 연결한 일반 파일로 기록할 때도 동작하며 희소 파일을 만드는 동안 +아무런 문제가 나타나지 않게 각각의 추가 조건을 만족합니다. 희소 파일을 만들면 디스크 공간을 절약할 수 있으며 디스크 입출력을 줄여 +압축 해제 속도를 올릴 수 있습니다. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +압축할 때, 대상 파일의 접두사를 \fB.xz\fP 또는 \fB.lzma\fP 대신 \fI.suf\fP로 사용하십시오. 표준 출력으로 기록하지 않고 +원본 파일에 \fI.suf\fP 접두사가 붙어있으면, 경고를 나타내고 해당 파일을 건너뜁니다. +.IP "" +압축 해제할 때, \fI.suf\fP 접미사로 파일을 인식하기도 하고, \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP, +\&\fB.lz\fP 접미사가 붙은 파일도 인식합니다. 원본 파일에 \fI.suf\fP 접미사가 붙어있으면, 해당 접미사를 제거하여 대상 파일 이름을 +알아냅니다. +.IP "" +원시 스트림 압축 및 압축 해제시(\fB\-\-format=raw\fP) 원시 스트림에 기본 접미사가 없기 때문에, 표준 출력으로 기록하지 않는 +한 접미사를 반드시 지정해야 합니다. +.TP +\fB\-\-files\fP[\fB=\fP\fI<파일>\fP] +\fI<파일>\fP에서 처리할 파일 이름을 읽습니다. \fI<파일>\fP을 생략하면 파일 이름은 표준 입력에서 +불러옵니다. 파일 이름은 개행 문자로 끝나야 합니다. 대시 문자(\fB\-\fP)는 일반 파일 이름으로 취급하며 표준 입력을 의미하지 +않습니다. 파일 이름을 명령행 인자로 지정하면, \fI<파일>\fP에서 파일 이름을 읽어들이기 전 해당 명령행 인자를 먼저 +처리합니다. +.TP +\fB\-\-files0\fP[\fB=\fP\fI<파일>\fP] +각 파일 이름이 널 문자로 끝나야 한다는 점만 제외하면 \fB\-\-files\fP[\fB=\fP\fI<파일>\fP] 옵션과 동일합니다. +. +.SS "기본 파일 형식 및 압축 옵션" +.TP +\fB\-F\fP \fIformat\fP, \fB\-\-format=\fP\fI<형식>\fP +압축 또는 압축해제 파일 \fI<형식>\fP을 지정합니다: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +기본 값입니다. 압축할 때, \fBauto\fP는 \fBxz\fP의 기본 동작과 동일합니다. 압축을 해제할 때, 입력 파일 형식을 자동으로 +찾습니다. 참고로 원시 스트림(\fB\-\-format=raw\fP)의 경우 자동으로 찾을 수 없습니다. +.TP +\fBxz\fP +\&\fB.xz\fP 파일 형식으로 압축하거나, 압축 해제시 \fB.xz\fP 파일만 받아들입니다. +.TP +\fBlzma\fP, \fBalone\fP +이전 \fB.lzma\fP 파일 형식으로 압축하거나, 압축 해제시 \fB.lzma\fP 파일만 받아들입니다. \fBalone\fP 대체 명령은 LZMA +유틸리티 하위 호환성을 목적으로 제공합니다. +.TP +\fBlzip\fP +압축 해제시 \fB.lz\fP 파일만 받아들입니다. 압축은 지원하지 않습니다. +.IP "" +\&\fB.lz\fP 형식 버전 0과 1을 지원합니다. 버전 0파일은 \fBlzip\fP 1.3 이전에서만 만듭니다. 일반적이진 않지만 일부 파일의 +경우 이 형식의 원본 패키지로 보관한 파일을 찾을 수도 있습니다. 개인적으로 이 형식으로 압축한 오래된 개인 파일을 가지고 있을 수도 +있습니다. 형식 버전 0 압축 해제 지원은 \fBlzip\fP 1.18에서 제거했습니다. \fBlzip\fP 1.4 이후의 버전에서는 버전 1 +형식 파일을 만듭니다. +.TP +\fBraw\fP +원시 스트림으로 압축하거나 압축을 해제합니다(헤더 없음). 고급 사용자 전용입니다. 원시 스트림을 디코딩하려면, +\fB\-\-format=raw\fP 옵션을 사용하고 분명하게 필터 체인을 지정하여 컨테이너 헤더에 필요한 정보를 저장하게 끔 해야합니다. +.RE +.TP +\fB\-C\fP \fI<검사방식>\fP, \fB\-\-check=\fP\fI<검사방식>\fP +무결성 검사 방식을 지정합니다. 검사 방식은 \fB.xz\fP 파일에 저장하며 압축 해제 데이터를 계산합니다. 이 옵션은 \fB.xz\fP +형식으로 압축할 때만 효력이 있습니다: \fB.lzma\fP 형식은 무결성 겁사를 지원하지 않습니다. 무결성 검사는 \fB.xz\fP 파일 압축을 +풀었을 때에 검사합니다. +.IP "" +지원 \fI검사\fP 형식: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +어떤 경우에도 무결성 검사 계산을 수행하지 않습니다. 보통 바람직하지 못한 생각입니다. 데이터 무결성을 다른 방식으로라도 검증해야 +하는 상황이면 쓸만할 수 있습니다. +.TP +\fBcrc32\fP +IEEE\-802.3 (이더넷)의 다항 연산으로 CRC32를 계산합니다. +.TP +\fBcrc64\fP +ECMA\-182의 다항식 연산으로 CRC64를 계산합니다. 이 동작이 기본 동작이기 때문에 CRC32가 깨진 파일을 찾을 때보다는 좀 +낮은 편이며 속도 차이도 거의 없습니다. +.TP +\fBsha256\fP +SHA\-256 해시를 계산합니다. CRC32와 CRC64 보다는 좀 느립니다. +.RE +.IP "" +\&\fB.xz\fP 헤더 무결성은 항상 CRC32로 검증하빈다. 이를 바꾸거나 It is not possible to change or +disable it. +.TP +\fB\-\-ignore\-check\fP +압축 데이터를 압축해제할 경우 압축 데이터의 무결성 검증을 진행하지 않습니다. \fB.xz\fP 헤더의 CRC32 값은 그래도 여전히 보통 +방식으로 검증합니다. +.IP "" +\fB이 옵션이 정확히 무슨 동작을 하는지 알기 전에는 사용하지 마십시오.\fP 이 옵션을 사용하는 타당한 이유로: +.RS +.IP \(bu 3 +깨진 .xz 파일에서 데이터 복구를 시도합니다. +.IP \(bu 3 +압축 해제 속도를 늘립니다. SHA\-256 또는 압축 파일에 들어간 그 무언가를 엄청 빨리 처리합니다. 다른 방식으로 파일 무결성을 +검증해야 하는 목적이 아니라면 이 옵션을 사용하지 않는게 좋습니다. +.RE +.TP +\fB\-0\fP ... \fB\-9\fP +압축 사전 설정 수준을 선택합니다. 기본값은 \fB\-6\fP입니다. 다중 수준을 지정하면 가장 마지막 수준 옵션을 적용합니다. 개별 필터 +체인을 이미 지정했다면, 압축 사전 설정 수준 값을 설정할 때 개별 필터 체인을 정리합니다. +.IP "" +사전 설정간 차이는 \fBgzip\fP(1)과 \fBbzip2\fP(1)을 사용할 때보다 더 비중을 차지합니다. 선택한 압축 설정은 압축 해제시 +필요한 메모리 사용량을 셜정하므로 사전 설정 수준 값을 너무 높게 지정하면 RAM 용량이 적은 오래된 시스템에서 파일 압축 해제시 실패할 +수 있습니다. 게다가, \fBgzip\fP(1) 과 \fBbzip2\fP(1)에서 처럼 종종 \fB모든 동작에 \-9를 몰래 활용하는건 바람직하지 않습니다\fP. +.RS +.TP +\fB\-0\fP ... \fB\-3\fP +동작이 빠른 사전 설정 부류입니다. \fB\-0\fP은 때로는 \fBgzip \-9\fP 명령보다 압축율이 훨씬 우수하면서도 더 빠릅니다. 더 큰 +값은 보통 \fBbzip2\fP(1) 명령과 비교했을 떄 압축 결과가 압축 데이터에 따라 달라지더라도, 비교할 법한 속도 또는 더 나은 +압축율을 보입니다. +.TP +\fB\-4\fP ... \fB\-6\fP +오래된 시스템에서 조차도 압축 해제 프로그램의 적절한 메모리 사용량을 보이면서 양호하거나 최적의 압축율을 보여줍니다. \fB\-6\fP 옵션은 +압축 해제시 메모리 사용량이 16MiB 밖에 안되기 때문에 파일을 배포할 때 최적의 선택인 기본 값입니다. (\fB\-5e\fP 또는 +\fB\-6e\fP도 역시 고려할 만합니다. \fB\-\-extreme\fP을 참고하십시오.) +.TP +\fB\-7 ... \-9\fP +\fB\-6\fP과 비슷하지만 압축 및 압축 해제시 요구 메모리 사용량이 더 높습니다. 압축 파일이 각각 8MiB, 16MiB, 32MiB +보다 클 경우에만 쓸만한 옵션입니다. +.RE +.IP "" +동일한 하드웨어에서, 압축 해제 속도는 압축한 데이터의 초당 정적 바이트 처리 수의 어림 평균입니다. 다시 말해, 압축율을 더 올리면, +압축 해제 속도도 역시 올라갑니다. 이는 곧 초당 비압축 데이터 출력 양이 달라질 수 있단 뜻입니다. +.IP "" +다음 표에 사전 설정 기능을 정리했습니다: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Preset;DictSize;CompCPU;CompMem;DecMem +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +컬럼 설명: +.RS +.IP \(bu 3 +DictSize는 LZMA2 딕셔너리 크기입니다. 압축 해제 파일의 크기보다 딕셔너리에서 사용하는 낭비 메모리 용량입니다. 실제로 +필요하지 않은 \fB\-7\fP ... \fB\-9\fP 사전 설정값을 피해야 하는 적절한 이유이기도 합니다. \fB\-6\fP 이하에서는 소모 메모리 양이 +충분히 적거나 따로 신경쓸 필요가 없습니다. +.IP \(bu 3 +CompCPU는 압축 속도에 영향을 주는 LZMA2 설정의 단순화 표기 값입니다. 딕셔너리 크기는 속도에도 영향을 주기 때문에 +CompCPU는 \fB\-6\fP ... \fB\-9\fP 수준값과 동일한데, 고수준 값은 여전히 조금 더 느려질 수 있습니다. 느려지는 만큼 +압축율은 가능한 한 더 좋아집니다. \fB\-\-extreme\fP을 참고하십시오. +.IP \(bu 3 +CompMem은 단일\-스레드 모드에서 필요한 압축 프로그램의 메모리 점유 용량입니다. \fBxz\fP 버전에 따라 다를 수 있습니다. +.IP \(bu 3 +DecMem은 압축 해제 프로그램의 메모리 점유용량입니다. 이는 곧, 압축 해제 프로그램에서 필요한 메모리 사용량을 압축 설정에서 +결정한다는 의미가 들어있습니다. 정확한 압축 해제 프로그램의 메모리 사용량은 LZMA2 딕셔너리 크기 보다는 조금 많지만 테이블의 값은 +MiB 용량으로 완전히 반올림한 값입니다. +.RE +.IP "" +다중\-스레드 모드에서 필요한 메모리 용량은 단일\-스레드 모드보단 약간 더 많습니다. \fB\-\-block\-size\fP 기본값에 따라, 각 +스레드에서는 3*3*딕셔녀리_크기 + 압축시_메모리용량 또는 압축_해제시_메모리용량 정도가 필요합니다. 예를 들면, 스레드 넷에 사전 +설정 옵션 \fB\-6\fP을 사용한다면, 660\(en670 MiB 메모리 용량이 필요합니다. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +기대하는 만큼의 좀 더 나은 압축율을 확보하려 선택한 압축 사전 설정 수준의 느린 변형 옵션을 사용하지만, 재수 없는 와중에 골로 가는 +경우가 생기기도 합니다. 압축 해제 프로그램의 메모리 사용에는 영향을 주지 않지만, 압축 프로그램의 메모리 사용량은 \fB\-0\fP +\&... \fB\-3\fP 사전 설정 수준에서 약간 더 올라갈 뿐입니다. +.IP "" +4MiB와 8MiB 두 가지 딕셔너리 용량 설정이 있기 때문에 \fB\-3e\fP 와 \fB\-5e\fP 사전 설정을 (CompCPU 수치를 낮춰서) +각각 \fB\-4e\fP 와 \fB\-6e\fP 보다 약간 더 빠르게 설정할 수 있습니다. 이런 식으로 두 사전 설정이 동일하지 않습니다. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Preset;DictSize;CompCPU;CompMem;DecMem +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +예를 들면, 8MiB 딕셔너리를 활용하는 네가지 사전 설정이 있다고 할 때, 빠른 순으로 설정을 나열하자면, \fB\-5\fP, \fB\-6\fP, +\fB\-5e\fP, \fB\-6e\fP 입니다. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +이 옵션은 \fB\-0\fP 과 \fB\-9\fP의 별칭으로 각각 오해할 수 있습니다. LZMA 유틸리티의 하위 호환성을 목적으로 제공합니다. 이 +옵션 사용은 피하십시오. +.TP +\fB\-\-block\-size=\fP\fI<크기>\fP +\&\fB.xz\fP 형식으로 압축할 때, 입력 데이터를 \fI<크기>\fP 바이트 블록으로 입력 데이터를 쪼갭니다. 각각의 블록은 +다중\-스레드 방식으로 처리할 수 있고 임의 접근 압축 해제 가능성을 제한할 수 있게 개별적으로 압축 처리합니다. 이 옵션은 보통 +다중\-스레드 모드에서 기본 블록 크기를 지정할 때 사용하지만, 단일\-스레드 모드에서도 사용할 수 있습니다. +.IP "" +다중\-스레드 모드에서는 약 3배 용량의 \fI<크기>\fP 바이트만큼 각 스레드 별로 입출력 버퍼링용 공간을 할당합니다. 기본 +\fI<크기>\fP는 LZMA2 딕셔너리 크기 또는 1MiB 중 가장 큰 쪽의 세 배입니다. 보통 적절한 값으로 LZMA2 +딕셔너리 크기 또는 최소한 1MiB 용량의 2\(en4배입니다. LZMA2 딕셔너리 크기보다 작은 \fI<크기>\fP는 램의 +소모적 사용 공간으로 할당하는데 LZMA2 딕셔너리 버퍼를 할당한 용량 크기 전체를 다 사용하지 않기 때문입니다. 다중\-스레드 모드에서 +블록 크기는 블록 헤더에 저장하며, 이 크기 정보는 다중\-스레드 압축 해제시 필요합니다. +.IP "" +단일\-스레드 모드에서는 기본적으로 블록 쪼개기를 하지 않습니다. 이 옵션을 설정한다고 해서 메모리 사용에 영향을 주지는 않습니다. +블록 헤더에 크기 정보를 저장하지 않기 때문에 단일\-스레드 모드에서 만든 파일은 다중\-스레드 모드에서 만든 파일과 동일하지 않습니다. +크기 정보의 누락은 또한 \fBxz\fP에서 다중\-스레드 모드로 압축 해제를 진행할 수 없음을 의미하기도 합니다. +.TP +\fB\-\-block\-list=\fP\fI<항목>\fP +\&\fB.xz\fP 형식으로 압축할 때, 압축하지 않은 데이터로 부터 일정 간격 이후에 새 블록 처리를 시작합니다. +.IP "" +\fI<항목>\fP은 쉼표로 구분한 목록으로 지정합니다. 각 항목은 콜론 (\fB:\fP)으로 구분한 0부터 9까지의 추가 필터 +체인 번호 값으로 이루어져 있으며, 압축하지 않은 데이터의 크기 값이 필요합니다. 항목을 생략하면(둘 이상의 쉼표 연속 표기) 이전 +항목의 크기와 필터를 활용하겠다는 함축 의미를 넣을 수 있습니다. +.IP "" +입력 파일이 \fI<항목>\fP 크기의 합보다 크면, 마지막 항목을 파일의 끝까지 반복합니다. 특별히 \fB0\fP 값을 마지막 +값으로 사용하여 파일 나머지 부분을 단일 블록으로 인코딩해야 한다는 의미를 나타낼 수도 있습니다. +.IP "" +\fB\-\-filters1=\fP\fI<필터>\fP \&...\& \fB\-\-filters9=\fP\fI<필터>\fP 옵션 조합으로 +각 블록별 별도 필터 체인을 지정할 수 있습니다. 이 옵션은 1\(en9번 필터 체인을 지정합니다. 필터 체인 0번은 필터 체인을 +지정하지 않았을 때와 동일한 기본 필터 체인으로 참조할 수 있습니다. 필터 체인 식별 번호는 비 압축 크기 앞에 콜론(\fB:\fP)을 붙여 +사용할 수 있습니다. 예를 들면, \fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP 옵션을 +지정했을 경우 다음 규칙대로 블록을 만듭니다: +.RS +.IP \(bu 3 +\fB\-\-filters1\fP 필터 체인에서는 2MiB 입력을 +.IP \(bu 3 +\fB\-\-filters3\fP 필터 체인에서는 2MiB 입력을 +.IP \(bu 3 +\fB\-\-filters2\fP 필터 체인에서는 4MiB 입력을 +.IP \(bu 3 +\fB\-\-filters2\fP 필터 체인에서는 4MiB 입력을 +.IP \(bu 3 +기본 필터 체인에서는 2MiB 입력을 +.IP \(bu 3 +입력이 끝나기 전의 모든 블록에는 기본 필터 체인과 4MiB 입력을 적용합니다. +.RE +.IP "" +인코더 블록 크기를 초과하는 크기 값을 지정하면(스레드 모드 기본값 또는 \fB\-\-block\-size=\fP\fI<크기>\fP +옵션으로 지정한 값), 인코더는 \fI<크기>\fP 지정 용량 범위는 유지하면서 추가 블록을 만듭니다. 예를 들면 +\fB\-\-block\-size=10MiB\fP \fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP 옵션을 지정하고 +입력 파일을 80MiB 용량으로 전달하면, 각각 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, 1 MiB 용량을 +차지하는 블록 11개를 결과물로 내줍니다. +.IP "" +다중\-스레드 모드에서 블록 크기는 블록 헤더에 저장합니다. 단일\-스레드 모드에서는 저장하지 않기 때문에 인코딩 처리한 출력은 +다중\-스레드 모드의 출력 결과물과는 다릅니다. +.TP +\fB\-\-flush\-timeout=\fP\fI<제한시간>\fP +압축할 때, 이전 데이터를 소거하고 다음 입력을 블록 단위로 더 읽는데 \fI<제한시간>\fP 밀리초(양의 정수값)가 지났을 +경우, 대기중이던 모든 입력 데이터를 인코더에서 소거한 다음 출력 스트림에 전달합니다. 이런 동작은 네트워크로 스트리밍한 데이터를 +\fBxz\fP로 압축할 때 쓸만합니다. \fI<제한시간>\fP 값을 적게 지정하면 적은 지연 시간에 데이터를 받아낼 수 있지만 +\fI<제한시간>\fP 값을 크게 하면 압축율을 높일 수 있습니다. +.IP "" +이 기능은 기본적으로 꺼져있습니다. 이 옵션을 한번 이상 지정하면, 마지막 옵션의 값대로 동작합니다. 특별히 +\fI<제한시간>\fP 값을 \fB0\fP으로 설정하면 이 설정을 완전히 끌 수 있습니다. +.IP "" +이 기능은 POSIX 시스템이 아닌 곳에서는 사용할 수 없습니다. +.IP "" +.\" FIXME +\fB이 기능은 여전히 시험중입니다\fP. 현재로서는, \fBxz\fP 버퍼링 처리 방식 때문에 \fBxz\fP의 실시간 스트림 압축 해제 기능 활용은 +적절하지 않습니다. +.TP +\fB\-\-no\-sync\fP +원본 파일을 제거하기 전까지는 스토릿지 장치에 대상 파일과 디렉터리를 동기화하지 않습니다. 작은 여러 파일을 압축하거나 압축해제할 때 +성능을 개선할 수 있습니다. 그러나, 삭제 과정을 진행한 다음 시스템이 바로 치명적인 오류가 나타난다면, 대상 파일을 스토릿지 장치에 +저장하지 않았지만 삭제 동작이 이루어졌을 수도 있습니다. 이 경우 원본 파일 뿐만 아니라 대상 파일도 나타나지 않습니다. +.IP "" +이 옵션은 \fBxz\fP 프로그램이 원본 파일을 삭제할 때만 동작합니다. 다른 경우에는 전혀 동기화가 이루어지지 않습니다. +.IP "" +동기화 동작과 \fB\-\-no\-sync\fP 옵션은 \fBxz\fP 5.7.1alpha에 추가했습니다. +.TP +\fB\-\-memlimit\-compress=\fP\fI<제한용량>\fP +압축 수행시 메모리 사용 한계를 지정합니다. 이 옵션을 여러번 지정하면 마지막 값을 취합니다. +.IP "" +압축 설정이 \fI<제한용량>\fP을 초과하면, \fBxz\fP는 설정 값의 하향 조정을 시도하여 한계 값을 더이상 넘치지 않게 하고 +자동 조절을 끝냈다는 알림을 표시합니다. 조정은 다음 순서대로 진행합니다. 스레드 수를 줄입니다. 다중\-스레드 모드에서 스레드 하나의 +할당 한계치가 \fI<제한용량>\fP을 넘으면 단일\-스레드 모드로 전환합니다. 그 다음 마지막으로 LZMA2 딕셔너리 크기를 +줄입니다. +.IP "" +\fB\-\-format=raw\fP 또는 \fB\-\-no\-adjust\fP 미지정 상황에서 압축할 때, 압축 데이터 출력에 영향을 주지 않고 스레드 +처리 수만 줄일 수 있습니다. +.IP "" +\fI<제한용량>\fP 값이 아래 설명한 조건에 맞지 않으면, 오류가 나타나고 \fBxz\fP 명령은 종료 상태 1번을 반환하며 +빠져나갑니다. +.IP "" +\fI<제한용량>\fP 값은 여러 방식으로 지정할 수 있습니다: +.RS +.IP \(bu 3 +\fI<제한용량>\fP 값은 바이트 용량 절대값입니다. 정수 값을 사용하되 \fBMiB\fP와 같은 접미사를 사용하는게 좋습니다. +예: \fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +\fI<제한용량>\fP 값은 총 물리 메모리(RAM) 용량의 백분율로 지정할 수도 있습니다. 다른 컴퓨터끼리 공유하는 셸 +초기화 스크립트의 \fBXZ_DEFAULTS\fP 환경 변수에 값을 설정할 때 특히 쓸만합니다. 이런 방식으로 설정하면 시스템의 메모리 설치 +용량에 따라 자동으로 늘어납니다. 예: \fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +\fI<제한용량>\fP 값은 \fB0\fP 기본값으로 설정하여 초기화할 수 있습니다. 현재로서는 \fI<제한용량>\fP +값이 \fImax\fP(최대) (메모리 사용 한계 없음) 인 상태와 동일합니다. +.RE +.IP "" +\fBxz\fP 32비트 버전에서는 몇가지 특별한 경우가 있습니다. \fI<제한용량>\fP 값이 \fB4020MiB\fP를 넘으면 +\fI<제한용량>\fP을 \fB4020MiB\fP로 고정합니다. MIPS32에서는 \fB2000MiB\fP로 대신 고정합니다. +(\fB0\fP과 \fBmax\fP는 이 경우에 해당하지 않습니다. 압축 해제시 비슷한 기능은 없습니다.) 이 경우 32비트 실행 파일이 +4GiB(MIPS32의 경우 2GiB) 주소 영역에 접근할 때 매우 용이하며, 다른 경우에는 원하는대로 문제를 일으키지 않습니다. +.IP "" +\fB메모리 활용\fP 섹션도 참고하십시오. +.TP +\fB\-\-memlimit\-decompress=\fP\fI<제한용량>\fP +압축 해제시 메모리 사용 한계 용량을 설정합니다. \fB\-\-list\fP 모드에도 영향을 줍니다. \fI<제한용량>\fP을 넘기지 +않고서는 동작이 진행이 안될 경우, \fBxz\fP 에서는 오류를 나타내고 파일 압축 해제를 실패로 +간주합니다. \fI<제한용량>\fP을 지정하는 가능한 방법에 대해서는 +\fB\-\-memlimit\-compress=\fP\fI<제한용량>\fP 옵션을 참고하십시오. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fI<제한용량>\fP +다중\-스레드 모드 압축 해제시 메모리 사용 한계 용량을 설정합니다. 스레드 수에 영향을 줄 수도 있습니다. \fBxz\fP에서 파일 압축 +해제를 거부하게 하진 않습니다. \fI<제한용량>\fP 수치가 다중\-스레드로 처리하기에 너무 낮다면, +\fI<제한용량>\fP 값을 무시하고 \fBxz\fP 동작을 단일\-스레드 모드로 계속 진행합니다. 참고로 +\fB\-\-memlimit\-decompress\fP 옵션도 사용하면, 단일\-스레드 모드와 다중\-스레드 모드 두 경우에 모두 적용하기에, +다중\-스레드 모드에 적용할 \fI<제한용량>\fP 값은 \fB\-\-memlimit\-decompress\fP에 설정하는 제한 값보다 더 +크면 안됩니다. +.IP "" +다른 메모리 사용 용량 제한 옵션과는 달리, \fB\-\-memlimit\-mt\-decompress=\fP\fI<제한용량>\fP 옵션은 +시스템별 기본 \fI<제한용량>\fP 값을 지닙니다. 현재 설정 값은 \fBxz \-\-info\-memory\fP 명령으로 확인해볼 수 +있습니다. +.IP "" +이 옵션과 기본 값은 한계 값을 주지 않으면 스레드 기반 압축 해제 프로그램이 일부 입력 파일에 대해 정신나간 수준의 메모리 용량을 +할당해서 동작이 끝나버릴 수 있습니다. 기본 \fI<제한용량>\fP이 시스템의 사양에 비해 낮다면, +\fI<제한용량>\fP 값을 자유롭게 올리시되, \fBxz\fP 에서 적은 스레드 수에도 메모리 공간 할당을 시도하는 만큼, 입력 +파일에 적절한 수준으로 가용 RAM 용량을 넘는 큰 값을 설정하지 마십시오. 메모리나 스와핑 영역 공간이 줄어들면 압축해제 성능을 +개선하지 못합니다. +.IP "" +\fI<제한용량>\fP 값을 지정하는 가능한 방법을 보려면 +\fB\-\-memlimit\-compress=\fP\fI<제한용량>\fP 옵션을 참고하십시오. \fI<제한용량>\fP 값을 +\fB0\fP으로 설정하면 \fI<제한용량>\fP 값이 시스템 지정 기본값으로 바뀝니다. +.TP +\fB\-M\fP \fI<제한용량>\fP, \fB\-\-memlimit=\fP\fI<제한용량>\fP, \fB\-\-memory=\fP\fI<제한용량>\fP +\fB\-\-memlimit\-compress=\fP\fI<제한용량>\fP +\fB\-\-memlimit\-decompress=\fP\fI<제한용량>\fP +\fB\-\-memlimit\-mt\-decompress=\fP\fI<제한용량>\fP 지정과 동일합니다. +.TP +\fB\-\-no\-adjust\fP +압축 출력 결과에 영향을 주는 설정을 조정하지 않고는 메모리 사용 용량 제한 조건이 맞지 않으면 오류를 표시하고 빠져나갑니다. 이 +옵션은 \fBxz\fP가 다중\-스레드 모드에서 단일\-스레드 모드로 전환하고 LZMA2 딕셔너리 크기를 줄이는 동작을 막아줍니다. 심지어 이 +옵션을 사용하면 메모리 사용 한계를 만족하도록 스레드 수를 줄여 압축 결과물 출력에 영향이 가지 않게 합니다. +.IP "" +원시 스트림(\fB\-\-format=raw\fP)을 만들 떄 자동 조정은 항상 꺼집니다. +.TP +\fB\-T\fP \fI<스레드수>\fP, \fB\-\-threads=\fP\fI<스레드수>\fP +활용할 작업 스레드 수를 지정합니다. \fI<스레드수>\fP 값을 \fB0\fP 값으로 설정하면, \fBxz\fP는 시스템에서 지원하는 +최대 프로세서 스레드 수를 모두 확보합니다. 실제 스레드 수는 입력 파일이 주어진 설정대로 스레드 처리를 할 만큼 그렇게 크지 않을 +경우, 내지는 더 많은 스레드를 사용했을 때 메모리 사용량 한계를 초과할 경우 \fI<스레드수>\fP 보다 적을 수 있습니다. +.IP "" +단일\-스레드와 다중\-스레드 압축 프로그램은 다른 출력 결과물을 냅니다. 단일\-스레드 압축 프로그램은 작은 파일 크기 결과물을 내놓지만, +다중\-스레드 압축 프로그램의 경우 다중\-스레드 압축 프로그램에서 내놓은 결과물은 다중\-스레드로만 압축을 해제할 수 있습니다. +\fI<스레드수>\fP를 \fB1\fP로 설정하면 단일\-스레드 모드를 사용합니다. \fI<스레드수>\fP를 \fB0\fP과 다른 +값으로 설정하면, 시스템에서 실제로 하드웨어 스레드가 1개만 지원한다 하더라도, 다중\-스레드 압축 프로그램을 사용합니다. (\fBxz\fP +5.2.x에서는 이 경우 단일\-스레드 모드를 활용합니다.) +.IP "" +단일\-스레드로 다중\-스레드 모드를 사용하려면, \fI<스레드수>\fP를 \fB+1\fP로 설정하십시오. \fB+\fP 접두사는 \fB1\fP +이외의 값에는 영향을 주지 않습니다. 메모리 사용량 한계 설정은 \fBxz\fP을 \fB\-\-no\-adjust\fP 옵션을 쓰기 전까지는 +단일\-스레드로 전환하게 합니다. \fB+\fP 접두사 지원은 \fBxz\fP 5.4.0에 추가했습니다. +.IP "" +자동 스레드 수를 요청했고 메모리 사용 한계를 지정하지 않았다면, 시스템에 맞게끔 가능한 스레드 수를 제한하는 기본 소프트 제한 값을 +사용합니다. 스레드 수가 한개가 되면 무시하는 이런 개념이 소프트 제한이기에, \fBxz\fP로 하여금 압축 동작 및 압축 해제 동작 수행시 +멈추지 않습니다. 이 가본 소프트 제한 값은 \fBxz\fP 실행 도중 다중\-스레드 모드에서 단일\-스레드 모드로 바뀌게 하지는 않습니다. +활성 제한 값은 \fBxz \-\-info\-memory\fP 명령으로 볼 수 있습니다. +.IP "" +현재 스레딩 처리 방식은 입력을 블록 단위로 쪼개고 각각의 블록을 독립적으로 압축하는 동작을 취합니다. 기본 블록 크기는 압축 수준에 +따라 다르며 \fB\-\-block\-size=\fP\fI<크기>\fP 옵션으로 재지정할 수 있습니다. +.IP "" +스레드 압축 해제 방식은 여러 블록이 블록 헤더에 넣은 크기 정보와 함께 들어간 파일에만 동작합니다. 다중\-스레드 모드에서 압축한 +충분히 큰 모든 파일은 이 조건에 만족하지만, 단일\-스레드 모드에서 압축한 파일은 +\fB\-\-block\-size=\fP\fI<크기>\fP 옵션을 지정하더라도 조건에 만족하지 않습니다. +.IP "" +\fI스레드\fP 기본 값은 \fB0\fP입니다. \fBxz\fP 5.4.x 이전의 기본값은 \fB1\fP입니다. +. +.SS "개별 압축 필터 체인 설정" +개별 필터 체인은 사전 설정에 엮인 설정에 의존하는 대신 압축 설정을 세부적으로 하나하나 설정할 수 있게 합니다. 개별 필터 체인을 +지정하면, 명령행에 앞서 지정한 사전 설정 옵션(\fB\-0\fP \&...\& \fB\-9\fP 과 \fB\-\-extreme\fP)은 무시합니다. 사전 +설정 옵션을 하나 이상의 필터 체인 옵션 다음에 지정하면, 새 사전 설정을 취하며, 앞서 지정한 개별 필터 체인 옵션은 무시합니다. +.PP +필터 체인은 명령행 파이핑에 비교할 수 있습니다. 압축할 때, 압축하지 않은 입력을 첫번째 필터로 놓고, 출력 대상(이 있으면)을 다음 +필터로 지정합니다. 최종 필터의 출력은 압축 파일로 기옥합니다. 체인의 최대 필터 수는 4이지만, 필터 체인상 필터 갯수는 보통 +1~2개입니다. +.PP +수많은 필터가 필터 체인 상에서 제약점을 가지고 있습니다. 일부 필터는 체인의 마지막 필터로만 동작하며, 일부 다른 필터는 마지막이 아닌 +필터로, 어떤 동작은 체인의 어떤 위치에든 둡니다. 필터에 따라, 이 제한은 필터 설계를 따르거나 보안 문제를 막기 위해 존재하기도 +합니다. +.PP +개별 필터 체인은 두가지 방식으로 지정할 수 있습니다. \fB\-\-filters=\fP\fI<필터>\fP와 +\fB\-\-filters1=\fP\fI<필터>\fP \&...\& \fB\-\-filters9=\fP\fI<필터>\fP 옵션으로 +liblzma 필터 문자열 문법에 따라 한가지 옵션을 필터 체인 전체를 지정할 수 있습니다. 대신, 하나 이상의 개별 필터 옵션을 +원하는 필터 체인 순서대로 지정할 수도 있습니다. 이 말인 즉슨, 개별 필터 옵션의 순서가 중요하단 뜻입니다! 원시 스트림을 디코딩할 +때(\fB\-\-format=raw\fP), 압축했을 때 지정했던 필터와 같은 순서로 필터 체인을 지정해야 합니다. 전체 체인 +옵션(\fB\-\-filters=\fP\fI<필터>\fP) 보다 우선 지정한 개별 필터 또는 사전 설정 옵션은 까먹을 수도 있습니다. +전체 체인 옵션 다음에 개별 필터를 지정할 경우 필터 체인의 동작을 무효로 합니다. +.PP +필터는 쉼표로 구분하는 필터별 \fI<옵션>\fP이 있습니다. \fI<옵션>\fP에 추가로 입력한 쉼표는 +무시합니다. 모든 옵션 값에는 기본값이 있어, 값을 바꾸려면 지정해야합니다. +.PP +전체 필터 체인과 \fI<옵션>\fP을 보려면 \fBxz \-vv\fP (\fB\-\-verbose\fP 두 번)명령을 사용하십시오. 이 +명령은 사전 설정이 사용하는 필터 체인 옵션도 볼 수 있습니다. +.TP +\fB\-\-filters=\fP\fI<필터>\fP +전체 필터 체인 또는 사전 설정을 단일 옵션으로 지정합니다. 각 필터는 공백 문자 또는 대시 문자 두번 입력(\fB\-\-\fP)으로 +구분합니다. 셸 명령행에서 \fI필터\fP는 따옴표로 감싸서 단일 옵션으로 해석하도록 해야 합니다. \fI옵션\fP을 표기하려면 \fB:\fP 또는 +\fB=\fP을 활용하십시오. 사전 설정 앞에 \fB\-\fP를 붙일 수 있고 0개 또는 하나 이상의 플래그를 붙일 수 있습니다. 유일하게 +지원하는 플래그는 \fB\-\-extreme\fP과 동일한 \fBe\fP입니다. +.TP +\fB\-\-filters1\fP=\fI<필터>\fP ... \fB\-\-filters9\fP=\fI<필터>\fP +\fB\-\-block\-list\fP와 사용할 수 있는 추가 필터 체인을 최대 9개까지 지정합니다. +.IP "" +예를 들어 텍스트 파일과 실행 파일의 아카이브를 압축할 때 실행 부분에 BCJ 필터 체인을 사용하고 텍스트 부분은 LZMA2 필터를 +사용할 수 있습니다. +.TP +\fB\-\-filters\-help\fP +\fB\-\-filters\fP와 \fB\-\-filters1=\fP\fI<필터>\fP \&...\& +\fB\-\-filters9=\fP\fI<필터>\fP 옵션의 사전 설정 필터와 개별 설정 필터 체인을 지정하는 방법을 설명하는 도움말 +메시지를 출력하고 완전히 빠져나갑니다. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fI<옵션>\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fI<옵션>\fP] +.PD +LZMA1 또는 LZMA2 필터를 필터 체인에 추가합니다. 이 필터는 필터 체인의 마지막 요소로만 사용할 수 있습니다. +.IP "" +LZMA1은 고전 필터로, LZMA1만 지원하는 고전 \fB.lzma\fP 파일 형식에서만 지원합니다. LZMA2는 LZMA1의 업데이트 +버전으로 LZMA1의 실질적 문제를 해결했습니다. \fB.xz\fP 형식은 LZMA2 필터를 사용하며 LZMA1 필터는 전적으로 지원하지 +않습니다. 압축 속도와 압축율은 LZMA1과 LZMA2가 실질적으로 동일합니다. +.IP "" +LZMA1과 LZMA2는 동일한 \fI<옵션>\fP 집합을 공유합니다: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fI<사전설정>\fP +LZMA1 또는 LZMA2의 모든 \fI<옵션>\fP을 \fI<사전설정>\fP으로 +초기화합니다. \fI<사전설정>\fP 값은 정수 값으로 이루어져 있으며, 사전 설정에 변형을 줄 떄 단일 문자가 따라올 수도 +있습니다. 정수 값은 \fB0\fP에서 \fB9\fP 까지이며, 명령행 옵션에서 \fB\-0\fP \&...\& \fB\-9\fP로 대응합니다. 변형 옵션으로 +지원하는 문자는 현재 \fBe\fP 뿐이며, \fB\-\-extreme\fP에 대응합니다. \fI<사전설정>\fP 값을 지정하지 않으면, +LZMA1 또는 LZMA2 기본값을 사전 설정 \fB6\fP에서 가져온 \fI<옵션>\fP으로 취합니다. +.TP +\fBdict=\fP\fI<크기>\fP +딕셔너리(기록 버퍼) \fI<크기>\fP는 최근 처리한 비압축 데이터를 바이트 단위로 메모리에 얼마나 유지하는지 나타냅니다. +알고리즘은 비압축 데이터상 바이트 시퀀스(일치 항목) 반복 탐색을 시도하며, 해당 부분을 딕셔너리의 현재 참조로 치환합니다. 딕셔너리가 +크면 일치하는 항목을 찾을 기회가 더 많아집니다. 따라서, 딕셔너리 \fI<크기>\fP를 더욱 크게 설정하면 압축율을 증가할 +수는 있지만, 압축하지 않은 파일보다 딕셔너리가 크면 메모리 낭비율이 올라갑니다. +.IP "" +보통 딕셔너리 \fI<크기>\fP는 64KiB 에서 64MiB 정도 됩니다. 최소 4KiB 입니다. 압축시 최대 용량은 현재 +1.5GiB(1536MiB)로 나타납니다. 압축 해제 프로그램에도 4GiB 미만으로 딕셔너리 크기를 이미 지원하며 4GiB 라는 수치는 +LZMA1과 LZMA2 스트림 형식의 최대값입니다. +.IP "" +딕셔너리 \fI<크기>\fP와 검색기(\fImf\fP)는 LZMA1 또는 LZMA 인코더의 메모리 사용량을 함께 결정합니다. +동일한(또는 더 큰) 딕셔너리 \fI<크기>\fP가 데이터를 압축했을 때만큼 압축 해제할 떄 필요하기 때문에, 디코더의 메모리 +사용량은 압축할 때의 딕셔너리 크기로 결정합니다. \fB.xz\fP 헤더에는 딕셔너리 \fI<크기>\fP를 2^\fIn\fP 또는 +2^\fIn\fP + 2^(\fIn\fP\-1) 으로 저장하기에, 이 \fI<크기>\fP 값을 압축할 때 선호하는 편입니다. 다른 +\fI<크기>\fP 값은 \fB.xz\fP 헤더에 저장할 때 반올림합니다. +.TP +\fBlc=\fP\fIlc\fP +리터럴 컨텍스트 비트 수를 지정합니다. 최소 값은 0이고 최대 값은 4입니다. 기본 값은 3입니다. 추가로, \fIlc\fP 값과 +\fIlp\fP 값의 합은 4를 넘으면 안됩니다. +.IP "" +조건이 일치하지 않아 인코딩할 수 없는 모든 바이트는 리터럴로 인코딩합니다. 이 말인 즉슨, 간단히 8비트 바이트로서의 리터럴을 한번에 +하나씩 인코딩합니다. +.IP "" +리터럴 코딩을 할 때 이전 비압축 바이트와 다음 바이트와의 관련성을 가진 가장 많은 \fIlc\fP 비트 수를 가정합니다. 예를 들면, 보통 +영문 문장의 경우 대문자 다음에 종종 소문자가 오고, 소문자 다음에 다른 소문자가 따라옵니다. US\-ASCII 문자 세트에서는 가장 긴 +비트 3개는 대문자에 대해 010, 소문자에 대해 011입니다. \fIlc\fP 값이 최소한 3이면, 리터럴 코딩시 비압축 데이터에 대해 +이런 속성의 장점을 취할 수 있습니다. +.IP "" +(어쨌거나) 기본값 (3)은 보통 적절합니다. 최대 압축을 원한다면 \fBlc=4\fP 값을 시험해보십시오. 때로는 약간 도움이 되기도 +하겠지만, 오히려 결과가 안좋을 수도 있습니다. 결과가 엄한 방향으로 간다면, \fBlc=2\fP 값도 시험해보십시오. +.TP +\fBlp=\fP\fIlp\fP +리터럴 위치 비트 수를 지정하빈다. 최소 값은 0이고 최대 값은 4입니다. 기본 값은 0입니다. +.IP "" +\fIlp\fP 값은 리터럴 인코딩 진행시 비압축 데이터 정렬 방식 고려에 영향을 줍니다. 정렬 방식에 대한 자세한 정보는 하단 \fIpb\fP를 +참고하십시오. +.TP +\fBpb=\fP\fIpb\fP +위치 비트 수를 지정합니다. 최소 값은 0이며 최대 값은 4입니다. 기본값은 2입니다. +.IP "" +\fIpb\fP 값은 보통 압축하지 않은 데이터에 어떤 정렬 방식을 고려하느냐에 영향을 줍니다. 기본적으로 4바이트 +정렬(2^\fIpb\fP=2^2=4)을 의미하는데, 이보다 더 나은 추측 값이 없어서 종종 최적의 선택으로 간주합니다. +.IP "" +정렬 상태를 알지 못할 경우, \fIpb\fP 설정 값이 파일 크기를 조금 줄일 수 있습니다. 예를 들면, 텍스트 파일이 단일 바이트 단위로 +정돈된 상태(US\-ASCII, ISO\-8859\-*, UTF\-8)라면, \fBpb=0\fP 설정 값으로 압축율을 조금 개선할 수 있습니다. +UTF\-16 텍스트의 경우, \fBpb=1\fP 설정 값이 좋은 선택입니다. 정렬 바이트가 3 바이트 같은 홀수 바이트일 경우, +\fBpb=0\fP 설정 값이 최적의 선택일지도 모릅니다. +.IP "" +가정 정렬을 \fIpb\fP 값과 \fIlp\fP 값으로 조정하긴 하지만, LZMA1과 LZMA2는 여전히 16바이트 정렬 방식으로 선호합니다. +LZMA1 또는 LZMA2로 종종 압축하는 파일 형식이라고 하면 고려해볼만 합니다. +.TP +\fBmf=\fP\fImf\fP +일치 검색기는 인코더 속도, 메모리 사용량, 압축율에 주된 영향을 줍니다. 보통 해시 체인 검색기는 이진 트리 검색기보다 빠르긴 +합니다. 기본 값은 \fI<사전설정>\fP에 따라 다릅니다. 0은 \fBhc3\fP을, 1\(en3은 \fBhc4\fP를, 나머지는 +\fBbt4\fP를 활용합니다. +.IP "" +다음 검색 필터를 지원합니다. 메모리 사용 공식은 \fIdict\fP 값이 2의 승수일 경우 실제에 가까운 근사치입니다. +.RS +.TP +\fBhc3\fP +2바이트, 3바이트 해싱 체인 +.br +\fInice\fP 최소값: 3 +.br +메모리 사용: +.br +\fIdict\fP * 7.5 (조건: \fIdict\fP <= 16 MiB); +.br +\fIdict\fP * 5.5 + 64 MiB (조건: \fIdict\fP > 16 MiB) +.TP +\fBhc4\fP +2바이트, 3바이트, 4바이트 해싱 체인 +.br +\fInice\fP 최소값: 4 +.br +메모리 사용: +.br +\fIdict\fP * 7.5 (조건: \fIdict\fP <= 32 MiB); +.br +\fIdict\fP * 6.5 (조건: \fIdict\fP > 32 MiB) +.TP +\fBbt2\fP +2바이트 해싱 이진 트리 +.br +\fInice\fP 최소값: 2 +.br +메모리 사용: \fIdict\fP * 9.5 +.TP +\fBbt3\fP +2바이트, 3바이트 해싱 이진트리 +.br +\fInice\fP 최소값: 3 +.br +메모리 사용: +.br +\fIdict\fP * 11.5 (조건: \fIdict\fP <= 16 MiB); +.br +\fIdict\fP * 9.5 + 64 MiB (조건: \fIdict\fP > 16 MiB) +.TP +\fBbt4\fP +2바이트, 3바이트, 4바이트 해싱 이진 트리 +.br +\fInice\fP 최소값: 4 +.br +메모리 사용: +.br +\fIdict\fP * 11.5 (조건: \fIdict\fP <= 32 MiB); +.br +\fIdict\fP * 10.5 (조건: \fIdict\fP > 32 MiB) +.RE +.TP +\fBmode=\fP\fI<모드>\fP +압축 \fI<모드>\fP 값은 일치 검색기에서 생산하는 데이터 분석 방식을 지정합니다. 지원하는 \fI<모드>\fP는 +\fBfast\fP와 \fBnormal\fP 입니다. 기본값은 \fI<사전설정>\fP값 0\(en3에 대해 \fBfast\fP, +\fI<사전설정>\fP값 4\(en9에 대해 \fBnormal\fP입니다. +.IP "" +보통 \fBfast\fP는 해시 체인 검색기에서 사용하며 \fBnormal\fP은 이진 트리 검색기에서 사용합니다. 이 동작은 또한 +\fI<사전설정>\fP 값이 할 일이기도 합니다. +.TP +\fBnice=\fP\fInice\fP +일치하는 nice 길이를 지정합니다. 최소한 \fInice\fP 바이트 정도 일치하면, 알고리즘이 가능한 최선의 부분을 찾는 동작을 +멈춥니다. +.IP "" +\fInice\fP 값은 2\(en273 바이트입니다. 값이 클 수록 속도 면에서는 손해를 보겠지만 압축율은 더욱 올라갑니다. 기본 값은 +\fI<사전설정>\fP값에 따라 다릅니다. +.TP +\fBdepth=\fP\fI<깊이>\fP +일치 검색기에서의 최대 검색 깊이를 지정합니다. 기본값은 특별한 값 0으로 지정하며, 이 값으로 압축 프로그램이 \fImf\fP 와 +\fInice\fP간 적절한 \fI<깊이>\fP 값을 결정합니다. +.IP "" +적절한 해시 체인 \fI<깊이>\fP 값은 이진 트리에서 4\(en100 그리고 16\(en1000 입니다. 상당히 큰 값을 +\fI<깊이>\fP 값으로 사용하면 일부 파일에 대해 인코더가 매우 느리게 동작할 수가 있습니다. 압축 시간이 너무 오래걸려서 +동작을 중간에 끊을 준비가 되지 않은 이상 \fI<깊이>\fP 설정 값은 1000을 넘지 않게하십시오. +.RE +.IP "" +원시 스트림(\fB\-\-format=raw\fP)을 디코딩할 때, LZMA2는 딕셔너리 \fI<크기>\fP만 필요합니다. LZMA1는 +\fIlc\fP, \fIlp\fP, \fIpb\fP 값이 모두 필요합니다. +.TP +\fB\-\-x86\fP[\fB=\fP\fI<옵션>\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fI<옵션>\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fI<옵션>\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fI<옵션>\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fI<옵션>\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fI<옵션>\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fI<옵션>\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIoptions\fP] +.PD +브랜치/호출/점프(BCJ) 필터를 필터 체인에 추가합니다. 이 필터는 필터 체인의 비종결 필터로만 사용할 수 있습니다. +.IP "" +BCJ 필터는 머신 코드의 상대 주소를 절대 주소로 변환합니다. 데이터 크기를 바꾸지는 않지만 LZMA2에서 \fB.xz\fP 파일을 +0\(en15% 정도 줄여주게 하는 중복성이 늘어납니다. BCJ 필터는 언제든 뒤집을 수 있어, 데이터에 적절하지 않은 BCJ 필터 +형식을 활용하면, 그냥 가만히 두면 압축율이 약간 떨어지게 한다 하더라도, 데이터를 잃을 수가 있습니다. BCJ 필터는 굉장히 빠르며 +메모리 공간을 적게 활용합니다. +.IP "" +이 BCJ 필터에는 압축율 관련 몇가지 문제가 있습니다: +.RS +.IP \(bu 3 +실행 코드가 들어있는 몇가지 파일 형식(예: 목적 파일, 정적 라이브러리, 리눅스 커널 모듈)의 경우 필터 값으로 채운 명령 주소가 +있습니다. 여기 BCJ 필터의 경우 파일의 압축율을 떨어뜨리는 주소 변환을 수행합니다. +.IP \(bu 3 +BCJ 필터를 아카이브에 적용하면, BCJ 필터를 사용하지 않았을 때보다 압축율이 떨어질 수가 있습니다. 예를 들면, 유사하거나 동일한 +실행 파일 여럿이 있으면 필터를 사용하여 파일을 덜 비슷하게 만들어 압축율이 떨어지게 합니다. 동일한 아카이브 파일에서 비 실행 파일의 +내용에 대해서도 비슷한 일이 벌어질 수 있습니다. 실제로 하나는 BCJ 필터를 걸고 하나는 제외하여 각 경우에 대해 어떤 경우가 결과가 +우수한 지 살펴보겠습니다. +.RE +.IP "" +다른 명령 세트는 다른 정렬 상태에 놓여있습니다. 실행 파일은 필터가 제대로 동작하게 하려면 입력 데이터에 있는 이 값의 배수로 +정돈해야합니다. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +필터;정렬;참고 +x86;1;32\-bit 또는 64\-bit x86 +ARM;4; +ARM\-Thumb;2; +ARM64;4;4096 바이트 정렬이 가장 좋습니다 +PowerPC;4;빅엔디안 전용 +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +BCJ 필터를 사용한 데이터는 LZMA2로 보통 압축하기 때문에 LZMA2 옵션을 선택한 BCJ 필터의 정렬기준에 맞추도록 설정하면 +압축율을 좀 더 개선할 수 있습니다. 예를 들면: +.RS +.IP \(bu 3 +IA\-64 필터는 16\-바이트 정렬 방식으로 동작하기에 LZMA2 필터에 \fBpb=4,lp=4,lc=0\fP 옵션(2^4=16)을 주는게 +좋습니다. +.IP \(bu 3 +RISC\-V 코드에는 16\-비트 압축 명령(C 확장) 적재 여부에 따라 2\-바이트 또는 4\-바이트 정렬 방식을 채택합니다. 16\-비트 +명령을 사용하면, \fBpb=2,lp=1,lc=3\fP 또는 \fBpb=1,lp=1,lc=3\fP 옵션 값 사용이 바람직합니다. 16\-비트 명령이 +없다면, \fBpb=2,lp=2,lc=2\fP 옵션 값을 활용하는게 좋습니다. "RVC"가 "Flags"행에 나타나는지 확인할 때 +\fBreadelf \-h\fP 명령을 사용할 수 있습니다. +.IP \(bu 3 +ARM64는 항상 4\-바이트 정렬 방식을 택하기에 \fBpb=2,lp=2,lc=2\fP 옵션 값을 활용하는게 좋습니다. +.IP \(bu 3 +x86 필터는 예외입니다. x86 실행 파일을 압축할 경우에는 보통 LZMA2 기본 옵션 값(\fBpb=2,lp=0,lc=3\fP)을 그대로 +사용하는게 좋습니다. +.RE +.IP "" +모든 BCJ 필터는 동일한 \fI옵션\fP을 지원합니다: +.RS +.TP +\fBstart=\fP\fI<오프셋>\fP +상대 주소와 절대 주소를 변환할 때 사용할 시작 \fI<오프셋>\fP을 지정합니다. \fI<오프셋>\fP에는 필터 +정렬 배수여야 합니다(상단 테이블 참조). 기본값은 0입니다. 실제로 기본값이 낫습니다. 개별 \fI<오프셋>\fP 지정 +값은 거의 쓸모가 없습니다. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fI<옵션>\fP] +필터 체인에 델타 필터를 추가합니다. 델타 필터는 필터 체인에서 마지막에 지정하지 않은 필터로만 사용할 수 있습니다. +.IP "" +현재로서는 바이트 단위 단순 델타계산 결과만 보여줍니다. 예를 들면, 압축하지 않은 비트맵 그림 또는 압축하지 않은 PCM 오디오를 +압축할 때 쓸만합니다. 그러나 특별한 목적으로 활용하는 알고리즘은 델타 + LZMA2 보다 더 나은 결과를 가져다 주기도 합니다. +이는 특히 오디오의 경우 맞는 이야기인데, \fBflac\fP(1)의 경우 더 빠르고 우수한 압축율을 보여줍니다. +.IP "" +지원 \fI옵션\fP: +.RS +.TP +\fBdist=\fP\fI<차이>\fP +바이트 단위 델터 계산 \fI<차이>\fP를 지정합니다. \fI<차이>\fP값은 1\(en256 이어야합니다. 기본 +값은 1입니다. +.IP "" +예를 들어, \fBdist=2\fP 옵션과 A1 B1 A2 B3 A3 B5 A4 B7 입력 값을 주면, 출력 값은 A1 B1 01 02 01 +02 01 02 입니다. +.RE +. +.SS "기타 옵션" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +경고 및 알림을 끕니다. 두 번 지정하면 오류 메시지 표시도 끕니다. 이 옵션은 종료 상태에 영향을 주지 않습니다. 경고 표시를 +끄더라도, 종료 상태에서는 여전히 경고가 나타났음을 알려줍니다. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +출력 내용이 많아집니다. 표준 오류를 터미널에 연결했다면 \fBxz\fP는 진행 표시를 나타냅니다. \fB\-\-verbose\fP를 두번 지정하면 +더 많은 내용을 표시합니다. +.IP "" +진행 표시에서는 다음 정보를 나타냅니다: +.RS +.IP \(bu 3 +입력 파일의 크기를 알고 있을 경우 완료 백분율. 파이프 처리시에는 백분율을 나타낼 수 없습니다. +.IP \(bu 3 +산출 압축 데이터 용량 (압축) 또는 소모 공간 용량 (압축 해제). +.IP \(bu 3 +비압축 데이터 소모 용량 (압축) 또는 산출 용량 (압축 해제). +.IP \(bu 3 +압축 데이터 산출 용량을 비압축 데이터 처리 용량으로 나누어 계산한 압축율. +.IP \(bu 3 +압축 또는 압축 해제 속도. 초당 비압축 데이터 소모량(압축) 또는 산출 용량(압축 해제)를 측정한 값입니다. \fBxz\fP에서 파일 +처리를 시작한 몇 초 후 나타납니다. +.IP \(bu 3 +경과 시간 형식은 M:SS 또는 H:MM:SS 입니다. +.IP \(bu 3 +추산 여분 시간은 \fBxz\fP가 파일을 처리하기 시작한 이후 입력 파일의 크기를 알고 몇 초가 지난 후에야 보여줍니다. 시간은 콜론 +문자를 사용하지 않고 덜 자세한 형식으로, 예를 들면, 2분 30초 와 같은 형식으로 보여줍니다. +.RE +.IP "" +표준 오류가 터미널이 아니라면 \fB\-\-verbose\fP는 \fBxz\fP에서 파일 이름, 압축 크기, 압축 해제 용량, 압축율, 그리고 +가능하다면 파일을 압축 또는 압축 해제한 후 표준 오류로 속도와 걸린 시간을 나타내도록 합니다. 속도와 걸린 시간 정보는 동작을 +처리하는데 최소한 몇초 정도 소요했을 경우에만 들어갑니다. 동작이 끝나지 않았다면, 이를테면 사용자의 중단 요청이 있었을 경우 입력 +파일의 크기를 알고 있을 때 압축 백분율 정보도 들어갑니다. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +경고로 알릴 만한 상황을 만났다 하더라도 종료 상태 2번을 설정하지 않습니다. 이 옵션은 출력 수준에 영향을 주지 않기 때문에, +\fB\-\-quiet\fP 옵션과 \fB\-\-no\-warn\fP 옵션을 경고 표시를 막고 종료 상태를 바꾸지 않을 목적으로 사용합니다. +.TP +\fB\-\-robot\fP +머신에서 해석할 형식으로 메시지를 나타냅니다. liblzma 대신 \fBxz\fP를 활용하려는 다양상 스크립트로서의 프론트엔드를 쉽게 +작성하도록 하기 위함입니다. 이 옵션을 지정한 출력은 \fBxz\fP 릴리스가 어떻게 되든 안정 버전이란 의미입니다. 자세한 내용은 +\fB로봇 모드\fP 섹션을 참고하십시오. +.TP +\fB\-\-info\-memory\fP +압축 및 압축 해제시 물리 메모리 용량 (RAM), \fBxz\fP에서 파악하는 프로세서 스레드 갯수, 메모리 사용량 한계를 파악하기 쉬운 +형식으로 나타내고 무사히 나갑니다. +.TP +\fB\-h\fP, \fB\-\-help\fP +보통 사용하는 옵션을 설명하는 도움말 메시지를 출력한 후, 완전히 빠져나갑니다. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +\fBxz\fP의 모든 기능을 설명하는 도움말 메시지를 출력한 후, 완전히 빠져나갑니다 +.TP +\fB\-V\fP, \fB\-\-version\fP +\fBxz\fP와 liblzma 버전 번호를 가독 형식으로 출력합니다. 기계 해석 가능 형식을 가져오려면 \fB\-\-version\fP 앞에 +\fB\-\-robot\fP을 지정하십시오. +. +.SH "로봇 모드" +로봇 모드는 \fB\-\-robot\fP 옵션으로 동작합니다. \fBxz\fP 출력을 다른 프로그램에서 해석하기 쉽게 해줍니다. 현재로서는 +\fB\-\-robot\fP 옵션은 \fB\-\-list\fP, \fB\-\-filters\-help\fP, \fB\-\-info\-memory\fP, \fB\-\-version\fP +옵션하고만 사용할 수 있습니다. 앞으로는 압축 및 압축 해제 동작에 대해서도 지원합니다. +. +.SS "목록 모드" +\fBxz \-\-robot \-\-list\fP 명령은 탭으로 구분한 출력 형태를 활용합니다. 모든 행의 첫번째 컬럼에는 해당 행에서 찾을 수 +있는 정보의 형식을 나타냅니다: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +이 행은 항상 파일 목록 시작 부분의 첫번째 줄에 있습니다. 이 행의 두번째 컬럼에 파일 이름이 들어있습니다. +.TP +\fBfile\fP +이 행에는 \fB.xz\fP 파일의 전반적인 정보가 들어있습니다. 이 행은 항상 \fBname\fP 행 다음에 있습니다. +.TP +\fBstream\fP +이 행 형식은 \fB\-\-verbose\fP 옵션을 지정했을 때만 사용합니다. \fB.xz\fP 파일의 \fBstream\fP 행 수만큼 나타납니다. +.TP +\fBblock\fP +이 행 형식은 \fB\-\-verbose\fP 옵션을 지정했을 때만 사용합니다. \fB.xz\fP 파일의 블록 수만큼 \fBblock\fP 행이 +나타납니다. \fBblock\fP 행은 모든 \fBstream\fP 행 다음에 나타납니다. 다른 형식의 행이 끼어들지는 않습니다. +.TP +\fBsummary\fP +이 행 형식은 \fB\-\-verbose\fP 옵션을 두번 지정했을 때만 사용합니다. 이 행은 모든 \fBblock\fP 행 다음에 출력합니다. +\fBfile\fP 행과 비슷하게, \fBsummary\fP 행에는 \fB.xz\fP 파일의 전반적인 정보가 담겨있습니다. +.TP +\fBtotals\fP +이 행은 목록 출력의 가장 마지막에 항상 나타납니다. 총 갯수와 크기를 나타냅니다. +.PP +\fBfile\fP 행 컬럼: +.PD 0 +.RS +.IP 2. 4 +파일 스트림 갯수 +.IP 3. 4 +스트림의 블록 총 갯수 +.IP 4. 4 +파일 압축 크기 +.IP 5. 4 +파일 압축 해제 크기 +.IP 6. 4 +예를 들면, \fB0.123\fP과 같은 압축율 입니다. 비율이 9.999라면, 대시 문자 3개 (\fB\-\-\-\fP)를 비율 값 대신 나타냅니다. +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +쉼표로 구분한 무결성 검사 이름 목록입니다. \fBNone\fP, \fBCRC32\fP, \fBCRC64\fP, \fBSHA\-256\fP 문자열을 알려진 +검사 형식으로 사용합니다. 알 수 없는 검사 형식에 대해서는 \fBUnknown\-\fP\fIN\fP을 사용하며, 여기서 \fIN\fP은 (한 두자리) +정수형 숫자값으로 이루어진 검사 ID 입니다. +.IP 8. 4 +파일의 스트림 패딩 총 길이 +.RE +.PD +.PP +\fBstream\fP 행 컬럼: +.PD 0 +.RS +.IP 2. 4 +스트림 번호 (첫 스트림은 1번) +.IP 3. 4 +스트림의 블록 총 갯수 +.IP 4. 4 +압축 시작 오프셋 +.IP 5. 4 +비압축 시작 오프셋 +.IP 6. 4 +압축 크기 (스트림 패딩 미포함) +.IP 7. 4 +압축 해제 용량 +.IP 8. 4 +압축율 +.IP 9. 4 +무결성 검사 이름 +.IP 10. 4 +스트림 패딩 길이 +.RE +.PD +.PP +\fBblock\fP 행 컬럼: +.PD 0 +.RS +.IP 2. 4 +이 블록이 들어간 스트림 갯수 +.IP 3. 4 +스트림 시작 부분의 블록 번호 (첫번째 블록은 1번) +.IP 4. 4 +파일 시작 부분의 블록 번호 +.IP 5. 4 +파일 시작 부분의 압축 시작 오프셋 +.IP 6. 4 +파일 시작 부분의 비압축 시작 오프셋 +.IP 7. 4 +총 블록 압축 크기 (헤더 포함) +.IP 8. 4 +압축 해제 용량 +.IP 9. 4 +압축율 +.IP 10. 4 +무결성 검사 이름 +.RE +.PD +.PP +\fB\-\-verbose\fP를 두 번 지정하면, 추가 컬럼을 \fBblock\fP 행에 넣습니다. \fB\-\-verbose\fP 단일 지정시에는 이 +정보를 볼 때 탐색을 여러번 수행해야 하기 때문에 실행 과정이 느려질 수 있어서 나타내지 않습니다: +.PD 0 +.RS +.IP 11. 4 +16진수 무결성 검사값 +.IP 12. 4 +블록 헤더 크기 +.IP 13. 4 +블록 플래그: \fBc\fP는 압축 크기가 현재 값임을 나타내고, \fBu\fP는 압축 전 원본 크기가 현재 값임을 나타냅니다. 플래그를 설정하지 +않았다면, 문자열 길이를 유지할 목적으로 대시 \fB\-\fP 를 대신 나타냅니다. 새 플래그는 나중에 문자열 끝 부분에 추가할 예정입니다. +.IP 14. 4 +블록에 압축 해서 넣은 데이터의 실제 츠기 (블록 헤더, 블록 패딩, 검사 필드 제외) +.IP 15. 4 +이 \fBxz\fP 버전에서 이 블록의 압축을 해제할 때 필요한 (바이트 단위) 메모리 용량 +.IP 16. 4 +필터 체인. 대부분 사용하는 옵션은 압축 해제시 필요한 옵션만을 \fB.xz\fP 헤더에 저장하기 때문에 압축 시간에 알 수 없습니다. +.RE +.PD +.PP +\fBsummary\fP 행 컬럼: +.PD 0 +.RS +.IP 2. 4 +이 \fBxz\fP 버전에서 이 파일 압축을 해제할 때 필요한 (바이트 단위) 메모리 용량 +.IP 3. 4 +모든 블록 헤더에 압축 크기와 압축 전 원본 크기 정보가 들어갔는지 여부를 나타내는 \fByes\fP 또는 \fBno\fP 값 +.PP +\fBxz\fP \fI5.1.2alpha\fP \fI부터:\fP +.IP 4. 4 +파일 압축 해제시 필요한 최소 \fBxz\fP 버전 +.RE +.PD +.PP +\fBtotals\fP 행 컬럼: +.PD 0 +.RS +.IP 2. 4 +스트림 갯수 +.IP 3. 4 +블록 갯수 +.IP 4. 4 +압축 크기 +.IP 5. 4 +압축 해제 용량 +.IP 6. 4 +평균 압축율 +.IP 7. 4 +파일에 들어 있어 쉼표로 구분한 무결성 검사 이름 목록 +.IP 8. 4 +스트림 패딩 길이 +.IP 9. 4 +파일 갯수. \fBfile\fP 행의 컬럼 순서를 따라갑니다. +.PD +.RE +.PP +\fB\-\-verbose\fP 옵션을 두 번 지정하면, \fBtotals\fP 행에 추가 컬럼이 들어갑니다: +.PD 0 +.RS +.IP 10. 4 +이 \fBxz\fP 버전에서 파일 압축을 해제할 떄 필요한 (바이트 단위) 최대 메모리 사용량 +.IP 11. 4 +모든 블록 헤더에 압축 크기와 압축 전 원본 크기 정보가 들어갔는지 여부를 나타내는 \fByes\fP 또는 \fBno\fP 값 +.PP +\fBxz\fP \fI5.1.2alpha\fP \fI부터:\fP +.IP 12. 4 +파일 압축 해제시 필요한 최소 \fBxz\fP 버전 +.RE +.PD +.PP +차후 버전에서는 새 행 형식을 추가하고 기존 행 형식에 추가할 수 있는 새 컬럼을 넣기 까지는 알 수 있겠지만, 기존 컬럼은 바꾸지 않을 +예정입니다. +. +.SS "필터 도움말" +\fBxz \-\-robot \-\-filters\-help\fP 는 다음 형식의 지원 필터 목록을 출력합니다: +.PP +\fI<필터>\fP\fB:\fP\fI<옵션>\fP\fB=<\fP\fI값\fP\fB>,\fP\fI<옵션>\fP\fB=<\fP\fI값\fP\fB>\fP... +.TP +\fI<필터>\fP +필터 이름 +.TP +\fI<옵션>\fP +필터별 옵션 이름 +.TP +\fI<값>\fP +숫자 \fI값\fP 범위는 \fB<\fP\fI최소\fP\fB\-\fP\fI최대\fP\fB>\fP입니다. 문자열 \fI값\fP은 \fB< >\fP 범위 +내에서 선택하며 \fB|\fP 문자로 구분합니다. +.PP +각 필터는 한 줄에 하나씩 출력합니다. +. +.SS "메모리 제한 정보" +\fBxz \-\-robot \-\-info\-memory\fP 명령은 탭으로 나뉜 여러 컬럼을 단일 행으로 나타냅니다: +.IP 1. 4 +물리 메모리(RAM)의 바이트 단위 총량. +.IP 2. 4 +압축 진행시 바이트 단위 메모리 사용 한계값 (\fB\-\-memlimit\-compress\fP). 특수 값 \fB0\fP은 단일\-스레드 모드에서 +제한을 두지 않는 기본 설정임을 나타냅니다. +.IP 3. 4 +압축 해제시 바이트 단위 메모리 사용 한계값 (\fB\-\-memlimit\-decompress\fP). 특수 값 \fB0\fP은 단일\-스레드 모드에서 +제한을 두지 않는 기본 설정임을 나타냅니다. +.IP 4. 4 +\fBxz\fP 5.3.4alpha 이후: 다중\-스레드 기반 압축 해제시 바이트 단위 메모리 +사용량(\fB\-\-memlimit\-mt\-decompress\fP). 분명하게 제한을 걸어두지 않았을 경우 5번째 컬럼에 나타난 시스템별 +기본값을 사용하기 때문에 0 값을 지정하면 안됩니다. 또한 \fB\-\-memlimit\-mt\-decompress\fP로 세번째 컬럼 값보다 더 +크게 지정을 한다 할지라도 이 값이 세번째 컬럼 값보다 크면 안됩니다. +.IP 5. 4 +\fBxz\fP 5.3.4alpha 이후: A system\-specific default memory usage limit that is +used to limit the number of threads when compressing with an automatic +number of threads (\fB\-\-threads=0\fP) and no memory usage limit has been +specified (\fB\-\-memlimit\-compress\fP). This is also used as the default value +for \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +\fBxz\fP 5.3.4alpha 이후: Number of available processor threads. +.PP +차후, \fBxz \-\-robot \-\-info\-memory\fP 출력에는 더 많은 내용이 들어가지만, 한 줄 이상은 넘어가지 않습니다. +. +.SS 버전 +\fBxz \-\-robot \-\-version\fP 은 \fBxz\fP 와 liblzma의 버전 번호를 다음 형식으로 나타냅니다: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +주 버전. +.TP +\fIYYY\fP +부 버전. 짝수가 안정 버전입니다. 홀수는 알파 또는 베타 버전입니다. +.TP +\fIZZZ\fP +안정 릴리스의 패치 수준 또는 개발 릴리스의 횟수입니다. +.TP +\fIS\fP +안정도. 0은 알파 버전, 1은 베타 버전을 나타내며, 2는 안정 버전을 나타냅니다. \fIS\fP는 \fIYYY\fP 값이 짝수라 해도 항상 +2여야 합니다. +.PP +\fBxz\fP 명령과 liblzma이 동일한 XZ 유틸리티 릴리스에서 나왔다면 두 행의 \fIXYYYZZZS\fP 값은 같습니다. +.PP +예제: 4.999.9beta는 \fB49990091\fP이며, 5.0.0은 \fB50000002\fP입니다. +. +.SH "종료 상태" +.TP +\fB0\fP +모든 상태 양호. +.TP +\fB1\fP +오류 발생. +.TP +\fB2\fP +눈여겨볼 경고가 나타났지만, 실제 오류는 일어나지 않음. +.PP +표준 오류에 출력하는 알림(경고 또는 오류 아님)는 종료 상태에 영향을 주지 않습니다. +. +.SH 환경 +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP는 빈칸으로 구분한 옵션 값 목록을 \fBXZ_DEFAULTS\fP, \fBXZ_OPT\fP 환경 변수에서 순서대로, 명령행에서 옵션을 +해석하기 전에 불러옵니다. 참고로 환경 변수에서 옵션만 해석하며, 옵션이 아닌 부분은 조용히 무시합니다. 해석은 +\fBgetopt_long\fP(3)으로 가능하며, 명령행 인자로 활용하기도 합니다. +.PP +\fB경고:\fP 환경 변수를 설정하면, 프로그램과 \fBxz\fP를 실행하는 스크립트의 동작이 바뀝니다. 대부분의 경우 메모리 사용 제한량, +스레드 수, 압축 옵션을 환경 변수로 설정하는게 안전합니다. 그러나 일부 옵션은 스크립트의 동작을 망가뜨릴 수 있습니다. 분명한 +예제로는 \fBxz\fP에서 파일의 압축 및 해제 대신 도움말 내용을 표시하는 \fB\-\-help\fP 옵션이 있습니다. 좀 더 묘한 예제로는 +\fB\-\-quiet\fP 와 \fB\-\-verbose\fP 옵션이 있습니다. 대부분의 경우 \fB\-\-verbose\fP 옵션을 사용하여 프로세스 상황을 +표시하는데 잘 동작하지만, 어떤 경우에는 추가 메시지가 나타나는 문제가 있습니다. 출력 상세 수준은 \fB\-\-list\fP의 동작에도 영향을 +줍니다. +.TP +\fBXZ_DEFAULTS\fP +사용자별, 시스템 범위 기본 옵션입니다. 보통 \fBxz\fP의 메모리 사용량 제한을 기본으로 걸어두거나 기본 스레드 수를 설정할 경우 셸 +초기화 스크립트에 설정합니다. 셸 초기화 스크립트와 별도의 유사한 경우를 제외하고라면, 스크립트에서는 \fBXZ_DEFAULTS\fP 환경 +변수를 설정하지 않거나 설정을 해제해야합니다. +.TP +\fBXZ_OPT\fP +\fBxz\fP 명령행으로 옵션 설정 값을 직접 전달할 수 없을 경우 \fBxz\fP에 옵션을 전달하는 환경 변수입니다. 예를 들어, \fBxz\fP를 +스크립트 또는 도구에서 실행할 경우 GNU \fBtar\fP(1) 라면: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +예를 들면, 스크립트에서 \fBXZ_OPT\fP 를 활용하여, 스크립트별로 기본 압축 옵션을 지정할 수 있습니다. 적절한 이유가 있다면 +\fBXZ_OPT\fP 옵션 값을 사용자가 바꾸는걸 추천합니다. 예를 들면, \fBsh\fP(1) 스크립트에서 다음처럼 활용할 수도 있습니다: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "LZMA 유틸리티 호환성" +\fBxz\fP의 명령행 문법은 실제로 LZMA 유틸리티 4.32.x에서 찾을 수 있는 \fBlzma\fP, \fBunlzma\fP \fBlzcat\fP의 +상위 집합입니다. 대부분의 경우 LZMA 유틸리티를 XZ 유틸리티로 기존에 작성한 스크립트를 깨지 않고도 바꿀 수 있습니다. 몇가지 +비호환성 문제 때문에 문제가 일어날 수는 있습니다. +. +.SS "압축 사전 설정 단계" +압축 수준 사전 설정의 번호 부여 방식은 \fBxz\fP와 LZMA 유틸리티가 동일하지 않습니다. 가장 중요한 차이는 다른 사전 설정에 대해 +딕셔너리 크기를 어떻게 대응했느냐 여부입니다. 딕셔너리 크기는 압축 해제시 메모리 사용량과 거의 비슷합니다. +.RS +.PP +.TS +tab(;); +c c c +c n n. +단계;xz;LZMA 유틸리티 +\-0;256 KiB;없음 +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +딕셔너리 크기 차이는 압축 프로그램 메모리 사용에 영향을 주지만, LZMA 유틸리티와 XZ 유틸리티에서 사용량이 늘어나는 다른 차이점이 +있습니다: +.RS +.PP +.TS +tab(;); +c c c +c n n. +단계;xz;LZMA 유틸리티 4.32.x +\-0;3 MiB;없음 +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +XZ 유틸리티의 기본 사전 설정 수준값은 \fB\-6\fP이지만 LZMA 유틸리티의 기본 사전 설정 수준값은 \fB\-7\fP입니다. 두 프로그램의 +딕셔너리 메모리 기본 사용량은 8MiB입니다. +. +.SS "스트림 vs 비스트림 .lzma 파일" +파일을 압축하지 않은 크기는 \fB.lzma\fP 헤더에 저장합니다. LZMA 유틸리티는 일반 파일을 압축할 때 압축하지 않은 파일의 크기를 +저장합니다. 이 대신 압축하지 않은 크기를 '알 수 없음' 으로 저장하고 압축 해제 프로그램이 멈춰야 할 지점에 +end\-of\-payload 마커를 사용하는 방법도 있습니다. LZMA 유틸리티는 파이프로 들어온 입력과 같이 압축하지 않은 파일의 +크기를 알 수 없을 때 이런 방식을 활용합니다. +.PP +\fBxz\fP는 \fB.lzma\fP 파일을 end\-of\-payload 마커의 유무와 관계없이 압축 해제 방식을 모두 지원하지만, \fBxz\fP로 +만든 모든 \fB.lzma\fP 파일은 end\-of\-payload 마커를 사용하며, \fB.lzma\fP 헤더에 압축하지 않은 파일 크기를 '알 수 +없음'으로 표기합니다. 이 방식은 드문 상황에서 문제를 야기할 수 있습니다. 예를 들면, 임베디드 장치의 \fB.lzma\fP 압축 해제 +프로그램은 압축을 해제했을 때 크기를 알아야 동작합니다. 이 문제를 만나면, LZMA 유틸리티 또는 LZMA SDK를 활용하여 +\&\fB.lzma\fP 파일에 압축 전 파일 크기 정보를 저장해야합니다. +. +.SS "지원하지 않는 .lzma 파일" +\&\fB.lzma\fP 형식은 \fIlc\fP 값을 8까지 받아들이며, \fIlp\fP 값은 4까지 받아들입니다. LZMA 유틸리티는 어떤 \fIlc\fP 값과 +\fIlp\fP 값을 받아들이고도 압축을 해제할 수 있지만, 파일을 만들 때는 늘 \fBlc=3\fP 값과 \fBlp=0\fP 값을 활용합니다. 다른 +\fIlc\fP 값과 \fIlp\fP 값으로의 파일 압축은 \fBxz\fP와 LZMA SDK에서만 가능합니다. +.PP +liblzma의 LZMA1 필터 구현체에서는 \fIlc\fP 값과 \fIlp\fP 값의 합이 4를 넘어가면 안됩니다. 그래서 \fB.lzma\fP +파일의 경우 이 제한을 넘어가면 \fBxz\fP로 압축을 해제할 수 없습니다. +.PP +LZMA 유틸리티는 2^\fIn\fP (2의 승수)크기를 지닌 딕셔너리를 가진 \fB.lzma\fP 파일만 만들지만 받아들이는 파일의 딕셔너리 +크기는 어떤 크기든 상관 없습니다. liblzma에서는 2^\fIn\fP, 2^\fIn\fP + 2^(\fIn\fP\-1) 딕셔너리 크기를 가진 +\&\fB.lzma\fP 파일 만 받아들입니다. 이로 인해 \fB.lzma\fP 파일을 확인할 때 거짓 양성율이 늘어납니다. +.PP +모든 \fB.lzma\fP 파일을 liblzma 에서 받아들일 수 있도록 압축하기 때문에 이 제한이 실제로는 문제가 되지 않습니다. +. +.SS "뒤따라오는 쓰레기 값" +압축 해제할 때, LZMA 유틸리티는 \fB.lzma\fP 스트림 처음 부분 다음 나머지를 다 조용히 무시합니다. 대부분의 경우, +버그입니다. LZMA 유틸리티에서 \fB.lzma\fP 결합 파일 압축 해제를 지원하지 않음을 의미하기도 합니다. +.PP +\&\fB.lzma\fP 스트림 처음부분 바로 다음에 데이터가 남아있을 경우, \fBxz\fP 에서는 \fB\-\-single\-stream\fP 옵션을 사용하지 +않으면 깨진 파일로 간주합니다. 이 동작으로 하여금 뒤따라오는 쓰레기 값을 무시하도록 간주하는 애매한 스크립트 동작을 깰 수가 +있습니다. +. +.SH 참고 +. +.SS "출력 결과물이 달라짐" +압축하지 않은 입력 파일로부터 얻어낸 정확한 압축 출력 결과물은 압축 옵션이 완전히 동일하더라도 XZ 유틸리티의 버전에 따라 달라질 수 +있습니다. 파일 형식에 영향을 주지 않고 인코더 그 자체를 개선(더 빠르게 하거나 더 나은 압축율로)하기 때문입니다. XZ 유틸리티 +버전이 동일하더라도 빌드 옵션을 달리하여 빌드 상태가 제각각인 경우 출력 결과물이 달라질 수 있습니다. +.PP +\fB\-\-rsyncable\fP 기능을 넣었을 경우 동일한 xz 버전에서 이전 파일과 새 파일로 별도로 압축하지 않는 한 결과 파일을 (두 +파일이 서로 다른 파일이 아니므로) rsync 처리할 필요가 없습니다. 이 문제는 인코더 구현체 기능 개발이 끝나서 xz 버전이 +다르더라도 안정적인 rsync 가능한 출력 결과물을 유지할 수 있을 때여야 해결할 수 있습니다. +. +.SS "내장 .xz 압축 해제 프로그램" +XZ 임베디드와 같은 내장 \fB.xz\fP 압축 해제 구현체는 지원 파일의 무결성 \fI검사\fP 형식을 \fInone\fP과 \fIcrc32\fP 이외의 +설정으로 만들 필요가 없습니다. 기본값이 \fB\-\-check=crc64\fP일 경우에만, 임베디드 시스템에서 파일을 만들 때 +\fB\-\-check=none\fP 또는 \fB\-\-check=crc32\fP 옵션을 사용해야합니다. +.PP +임베디드 시스템이 아니라면, 모든 \fB.xz\fP 형식 압축 해제 프로그램에서는 모든 \fI검사\fP 형식을 지원하거나, 일부 \fI검사\fP 방식을 +지원하지 않는다면, 최소한, 무결성 검사로 검증하지 않고 압축을 해제할 수 있습니다. +.PP +XZ 임베디드는 BCJ 필터를 지원하지만, 기본 시작 오프셋만 지정할 수 있습니다. +. +.SH 예제 +. +.SS 기본 +\fIfoo\fP 파일을 기본 압축 수준 (\fB\-6\fP) 으로 \fIfoo.xz\fP 파일에 압축해 넣고, 압축 과정이 무사히 끝나면 \fIfoo\fP를 +삭제합니다: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +\fIbar.xz\fP를 \fIbar\fP 에 압축을 해제한 후 압축 해제가 무사히 끝나도 \fIbar.xz\fP를 삭제하지 않습니다: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +기본 사전 설정 \fB\-6\fP 보다는 느리지만, 압축 및 압축 해제시 메모리를 적게 차지(각각 48\ Mib, 5\MiB)는 \fB\-4e\fP +사전 설정(\fB\-4 \-\-extreme\fP)을 활용하여 \fIbaz.tar.xz\fP 파일을 만듭니다: +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +압축 및 비압축 파일을 단일 명령으로 표준 출력에 압축해제할 수 있습니다: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "다중 파일 병렬 압축" +GNU와 *BSD에서는 \fBfind\fP(1) 명령과 \fBxargs\fP(1) 명령으로 여러 파일의 압축을 병렬 처리할 수 있습니다: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +\fBxargs\fP(1) 의 \fB\-P\fP 옵션으로 \fBxz\fP 프로세스의 병렬 처리 갯수를 지정합니다. \fB\-n\fP 옵션의 최적 값은 압축할 +파일 수에 달려있습니다. 압축할 파일이 몇개밖에 없다면 1이어야합니다. 파일이 수천 수만개 정도 된다면 \fBxargs\fP(1) 이 +어쨌든지간에 만들어낼 \fBxz\fP 프로세스의 겟수를 100으로 하거나 아니면 적당한 값을 지정하여 줄이는게 좋습니다. +.PP +\fBxz\fP에 \fB\-T1\fP옵션을 지정하면 단일\-스레드 모드로 강제합니다. \fBxargs\fP(1) 에서 병렬 처리 갯수를 제어할 수 있기 +때문입니다. +. +.SS "로봇 모드" +여러 파일을 압축한 후 저장할 바이트 용량을 계산합니다: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +이 스크립트에서는 충분히 최신의 \fBxz\fP 명령을 사용하는지 알아보려 합니다. 다음 \fBsh\fP(1) 스크립트에서는 \fBxz\fP 도구의 +버전 번호가 최소한 5.0.0인지 여부를 검사합니다. 이 방식은 \fB\-\-robot\fP 옵션을 지원하지 않는 오래된 베타 버전과도 호환성이 +있습니다: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Your xz is too old." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +\fBXZ_OPT\fP 환경 변수로 압축 해제시 메뢰 사용량 한계를 설정하지만, 한계 값을 이미 설정했다면, 값을 늘리지 않습니다: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "개별 압축 필터 체인 설정" +개별 설정 필터 체인의 초단순 사용방식은 LZMA2 사전 설정 값을 별도로 설정하는 방식입니다. 사전 설정은 잠재적으로 쓸만한 압축 +설정 조합만 다루기 때문에 꽤 쓸모가 있을 수도 있습니다. +.PP +\fB\-0\fP ... \fB\-9\fP 옵션의 설명에서 테이블의 CompCPU 컬럼과 \fB\-\-extreme\fP 옵션은 LZMA2 사전 설정을 +개별적으로 맞췄을 때 쓸만할 수도 있습니다. 여기 관련내용을 테이블 둘로 정리해서 모아보았습니다: +.RS +.PP +.TS +tab(;); +c c +n n. +Preset;CompCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +어떤 파일을 압축할 때 상당히 큰 딕셔너리(예: 32MiB)가 필요 하다는걸 알아채셨지만, \fBxz \-8\fP 명령이 압축할 때보다 더 빠른 +속도로 압축하려 한다면, 더 큰 딕셔너리 사용을 위해 더 낮은 CompCPU 사전 설정 값(예: 1)으로 수정할 수 있습니다: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +각 파일에 대해, 위 명령은 압축율이 더 좋아지면서도 \fBxz \-6\fP보다 더 빨라집니다. 그러나, CompCPU 값을 낮게 유지하는 +대신 큰 딕셔너리에서 일부 파일을 강조해야 합니다. 큰 딕셔너리가 대부분의 도움을 주는 매우 명백한 상황에서는 최소한 몇 메가바이트의 +매우 유사한 각 파일이 아카이브에 들어갑니다. 딕셔너리 크기는 LZMA2가 연속으로 존재하는 각 파일의 유사성으로부터 얻는 장점을 취할 +수 있을 때 일부 개별 파일보다 훨씬 더 커집니다. +.PP +압축 프로그램과 압축 해제 프로그램에서 메모리를 엄청 많이 사용해도 상관 없고, 파일을 수백 메가 바이트 메모리 용량을 활용하여 +압축한다면, \fBxz \-9\fP 명령에 64MiB 용량을 초과하는 딕셔너리를 사용할 수 있게 하는 방법도 쓸만할 지도 모릅니다: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +위 예제에서와 같이 \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP) 옵션을 사용하면 압축 및 압축 해제 과정에서 필요한 메모리 +용량을 살펴보는데 요긴할 수 있습니다. 압축 해제한 파일 크기보다 더 큰 딕셔너리를 사용하면 불필요한 메모리 소모량이 발생하여 위 +명령이 작은 파일에는 쓸모 없음을 기억하십시오. +.PP +때로는 압축 시간이 딱히 상관이 없을 수도 있습니다만, 압축 해제시 메모리 사용량을 적게 유지해야 할 수도 있습니다. 예를 들면, +임베디드 시스템에서 파일 압축을 해제할 수도 있습니다. 다음 명령의 경우 \fB\-6e\fP (\fB\-6 \-\-extreme\fP) 옵션을 기반 +옵션을 사용하며 딕셔너리 크기를 64KiB만 사용하도록 제한합니다. 결과 파일은 XZ 임베디드(이게 \fB\-\-check=crc32\fP +옵션이 있는 이유)로 100KiB 메모리 용량을 활용하여 풀어낼 수 있습니다. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +가능한 한 수 바이트를 더 쥐어 짜내고 싶을 때, 리터럴 문맥 비트 수(\fIlc\fP)와 위치 비트 수(\fIpb\fP)를 조정하면 도움이 될 +수도 있습니다. 리터럴 위치 비트 수(\fIlp\fP)를 조금 건드리는 것 또한 도움이 될 지도 모르겠지만 보통 \fIlc\fP 값과 \fIpb\fP +값이 더 중요합니다. 예를 들면, 소스 코드 저장 파일에는 US\-ASCII 텍스트가 대부분이기에, 다음과 같은 경우는 \fBxz \-6e\fP +명령을 실행했을 때부다는 아주 약간(거의 0.1% 수준) 작은 파일을 얻어낼 수도 있습니다(\fBlc=4\fP를 빼고도 시도해보십시오): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +LZMA2와 다른 필터를 함께 사용하면 일부 파일 형식에 대해 압축율을 개선할 수 있습니다. 예를 들면 x86\-32 또는 x86\-64 +공유 라이브러리를 x86 BCJ 필터를 활용하여 압축할 경우: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +참고로 필터 옵션의 순서는 상당히 중요합니다. \fB\-\-x86\fP을 \fB\-\-lzma\fP 이전에 지정하면 \fBxz\fP에서 오류가 나는데, +LZMA2 다음에는 어떤 필터든 설정할 수 없고, 옵션 체인상 마지막 필터로 x86 BCJ 필터를 사용할 수 없기 때문입니다. +.PP +LZMA2와 델타 필터는 비트맵 그림에 최적의 결과를 가져다줄 수 있습니다. PNG에 보통 안성맞춥인데, PNG에는 단순 델타 필터보단 +약간 더 고급진 필터를 사용하지만, 실제 압축을 진행할 때는 Deflate를 사용하기 때문입니다. +.PP +예를 들어 이미지를 압축하지 않은 비압축 TIFF로 저장해야 하는 경우가 있습니다. 델타 필터의 거리 매개변수는 그림에서 픽셀당 바이트 +수에 일치하도록 설정합니다. 예를 들면, 24비트 RGB 비트맵의 경우 \fBdist=3\fP 거리 매개변수 값을 설정해야 하며, LZMA2 +압축시 3바이트 정렬을 따르도록 \fBpb=0\fP 값을 전달하는 방법도 바람직합니다: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +여러 이미지를 단일 아카이브로 넣고 싶다면(예: \fB.tar\fP), 모든 이미지에 대해 동일한 픽셀당 바이트 수가 들어가는 경우에도 델타 +필터가 동작합니다. +. +.SH "추가 참조" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ 유틸리티: +.br +XZ 임베디드: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ko/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzdec.1 new file mode 100644 index 0000000000..a9e112792d --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzdec.1 @@ -0,0 +1,72 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Korean translation for the xz-man +.\" Seong-ho Cho , 2023, 2024. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 2024\-04\-08 Tukaani "XZ 유틸리티" +.SH 이름 +xzdec, lzmadec \- .xz와 .lzma용 작은 압축 해제 프로그램 +.SH 요약 +\fBxzdec\fP [\f\fI옵션\fP...\fP] [\fI<파일>...\fP] +.br +\fBlzmadec\fP [\f\fI옵션\fP...\fP] [\fI<파일>...\fP] +.SH 설명 +\fBxzdec\fP은 liblzma 기반 \fB.xz\fP (그리고 \fB.xz\fP 확장자만) 파일 압축 해제 전용 도구 프로그램입니다. +\fBxzdec\fP 은 \fBxz\fP(1) 명령을 활용하여 \fB.xz\fP 파일의 압축을 해제할 때 쓰던 \fBxz \-\-decompress \-\-stdout\fP (그리고 일반적으로 쓰던 몇가지 다른 옵션도 같이) 명령을 작성하던 일상적인 경우를 대신하려 만든 결과물입니다. +\fBlzmadec\fP 는 \fB.xz\fP 파일 대신 \fB.lzma\fP 파일을 지원하는 점만 다르며, 나머지는 \fBxzdec\fP과 동일합니다. +.PP +실행 파일 크기를 줄이려는 목적으로, \fBxzdec\fP 에서는 다중\-스레드 실행 또는 현지 언어 표기를 지원하지 않으며 +\fBXZ_DEFAULTS\fP 환경 변수와 \fBXZ_OPT\fP 환경 변수의 옵션 값을 읽지 않습니다. \fBxzdec\fP은 단계별 진행 정보를 +표시하지 않습니다. \fBxzdec\fP 명령어로 \fBSIGINFO\fP 시그널을 보내면 아무 동작도 취하지 않지만, \fBSIGUSR1\fP 시그널을 +보내면 프 정보를 표시하는 대신 프로세스를 끝냅니다. +.SH 옵션 +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +\fBxz\fP(1) 호환성을 문제로 무시합니다. \fBxzdec\fP은 압축 해제 기능만 지원합니다. +.TP +\fB\-k\fP, \fB\-\-keep\fP +\fBxz\fP(1) 호환성을 문제로 무시합니다. \fBxzdec\fP은 어떤 파일도 만들거나 제거하지 않습니다. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +\fBxz\fP(1) 호환성을 문제로 무시합니다. \fBxzdec\fP은 항상 압축 해제한 데이터를 표준 출력으로만 기록합니다. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +이 옵션을 한번 지정하면 \fBxzdec\fP에서 어떤 경고나 알림을 표시하지 않기 때문에 아무런 동작도 취하지 않습니다. 오류 메시지를 +표시하지 않으려면 이 옵션을 두번 지정하십시오. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +\fBxz\fP(1) 호환성을 문제로 무시합니다. \fBxzdec\fP은 종료 코드 2번을 사용하지 않습니다. +.TP +\fB\-h\fP, \fB\-\-help\fP +도움말 메시지를 나타내고 무사히 나갑니다. +.TP +\fB\-V\fP, \fB\-\-version\fP +\fBxzdec\fP과 liblzma의 버전 번호를 나타냅니다. +.SH "종료 상태" +.TP +\fB0\fP +모든 상태 양호. +.TP +\fB1\fP +오류 발생. +.PP +\fBxzdec\fP 은 \fBxz\fP에 있는 경고 메시지를 출력하지 않기 때문에 \fBxzdec\fP 에서는 종료 코드 2번을 사용하지 않습니다. +.SH 참고 +보통 매일 사용하실 목적이라면 \fBxzdec\fP 또는 \fBlzmadec\fP 대신 \fBxz\fP 명령을 사용하십시오. \fBxzdec\fP 또는 +\fBlzmadec\fP은 완전한 기능을 갖춘 \fBxz\fP(1) 보다는 작은 압축 해제 프로그램을 사용해야 할 경우에만 사용하라고 있는 +명령입니다. +.PP +\fBxzdec\fP 과 \fBlzmadec\fP 은 실제로 그렇게 작은건 아닙니다. 컴파일 시간에 liblzma에서 얼마나 기능을 떨궈내느냐에 +따라 더 줄어들 수도 있습니다만, 보통 임베디드 운영체제 배포판이 아닌 경우는 이렇게 할 수가 없습니다. 실제로 작은 \fB.xz\fP 압축 +해제 프로그램이 필요하다면 XZ 임베디드 사용을 고려하십시오. +.SH "추가 참조" +\fBxz\fP(1) +.PP +XZ 임베디드: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ko/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzdiff.1 new file mode 100644 index 0000000000..8921034b87 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzdiff.1 @@ -0,0 +1,52 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Korean translation for the xz-man +.\" Seong-ho Cho , 2023, 2024. +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 2025\-03\-06 Tukaani "XZ 유틸리티" +.SH 이름 +xzcmp, xzdiff, lzcmp, lzdiff \- 압축 파일을 비교합니다 +. +.SH 요약 +\fBxzcmp\fP [\fI<옵션>...\fP] \fI<파일1>\fP [\fI<파일2>\fP] +.br +\fBxzdiff\fP \&... +.br +\fBlzcmp\fP \&... (사용 안 함) +.br +\fBlzdiff\fP \&... (사용 안 함) +. +.SH 설명 +\fBxzcmp\fP 와 \fBxzdiff\fP 명령은 압축 해제한 두 파일의 내용을 비교합니다. 압축 해제한 파일의 데이터와 옵션은 +\fB\-\-help\fP 옵션 또는 \fB\-\-version\fP 옵션을 지정하지 않는다면, \fBcmp\fP(1) 또는 \fBdiff\fP(1) 명령으로 +전달합니다. +.PP +\fI<파일1>\fP 과 \fI<파일2>\fP를 모두 지정했다면, 지정한 파일은 이미 압축해제한 파일이거나, +\fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), \fBlz4\fP(1) 명령으로 +압축해제할 수 있는 형식의 파일일 수 있습니다. 필요한 압축 해제 명령은 \fI<파일1>\fP 과 +\fI<파일2>\fP의 파일 이름 확장자로 결정합니다. 알 수 없는 확장자를 지닌 파일은 이미 압축을 해제했거나 +\fBxz\fP(1) 명령으로 압축 해제할 수 있는 형식으로 간주합니다. +.PP +파일 이름을 하나만 지정한다면, \fI<파일1>\fP의 확장자는 지원 압축 형식의 확장자여야 하며, +\fI<파일2>\fP는 \fI<파일1>\fP에서 압축 파일 확장자를 제거한 파일로 간주합니다. +.PP +\fBlzcmp\fP와 \fBlzdiff\fP 명령은 LZMA 유틸리티 하위 호환용으로 제공합니다. 해당 명령은 오래되어 이후 버전에서 +제거합니다. +. +.SH "종료 상태" +압축 해제 오류가 나타나는 경우, 종료 코드는 \fB2\fP입니다. 그렇지 않을 경우 \fBcmp\fP(1) 또는 \fBdiff\fP(1) 명령의 +종료 코드를 활용합니다. +. +.SH "추가 참조" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ko/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzgrep.1 new file mode 100644 index 0000000000..1953e55b7c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzgrep.1 @@ -0,0 +1,85 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Korean translation for the xz-man +.\" Seong-ho Cho , 2023, 2024. +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 2025\-03\-06 Tukaani "XZ 유틸리티" +.SH 이름 +xzgrep \- 패턴을 활용하여 가능한 방식으로 압축한 파일의 내용을 검색합니다 +. +.SH 요약 +\fBxzgrep\fP [\fI<옵션>...\fP] [\fI<패턴목록>\fP] [\fI<파일>...\fP] +.br +\fBxzegrep\fP \&... +.br +\fBxzfgrep\fP \&... +.br +\fBlzgrep\fP \&... (사용 안 함) +.br +\fBlzegrep\fP \&... (사용 안 함) +.br +\fBlzfgrep\fP \&... (사용 안 함) +. +.SH 설명 +\fBxzgrep\fP은 압축 해제한 파일의 내용에 \fBgrep\fP(1)을 실행합니다. \fI<파일>\fP 형식은 파일 이름 확장으로 +결정합니다. \fI<파일>\fP에서 지원하는 확장자는 \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), +\fBlzop\fP(1), \fBzstd\fP(1), \fBlz4\fP(1)로 압축 해제할 수 있는 파일의 확장자입니다. 다른 파일은 이미 압축을 해제한 +파일로 간주합니다. +.PP +지정한 \fI<파일>\fP이 없거나 \fI<파일>\fP 값이 \fB\-\fP이라면 표준 입력을 읽어들입니다. 표준 입력을 +읽어들일 때, \fBxz\fP(1) 방식으로 압축을 해제하는 파일만 지원합니다. 다른 파일은 이미 압축을 해제한 파일로 간주합니다. +.PP +대부분의 \fBgrep\fP(1)의 \fI<옵션>\fP을 지원합니다. 그러나 다음 옵션은 지원하지 않습니다: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIaction\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIfile\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIglob\fP +.PP +\fBxzegrep\fP은 \fBxzgrep \-E\fP 명령의 별칭입니다. \fBxzfgrep\fP은 \fBxzgrep \-F\fP 명령의 별칭입니다. +.PP +\fBlzgrep\fP, \fBlzegrep\fP, \fBlzfgrep\fP 명령은 LZMA 유틸리티 하위 호환용으로 제공합니다. 해당 명령은 오래되어 +이후 버전에서 제거합니다. +. +.SH "종료 상태" +.TP +0 +최소한 하나 이상의 파일에서 하나 이상의 일치하는 결과를 찾았습니다. 오류가 없습니다. +.TP +1 +어떤 입력 파일에서든 일치하는 내용이 없습니다. 오류가 없습니다. +.TP +>1 +하나 이상의 오류가 나타납니다. 일치하는 항목을 찾아낼 지 여부는 알 수 없습니다. +. +.SH 환경 +.TP +\fBGREP\fP +\fBGREP\fP 환경변수 값이 비어있지 않으면, \fBgrep\fP, \fBgrep \-E\fP, \fBgrep \-F\fP 명령 대신 활용합니다. +. +.SH "추가 참조" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ko/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzless.1 new file mode 100644 index 0000000000..b439e657fe --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzless.1 @@ -0,0 +1,41 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Korean translation for the xz-man +.\" Seong-ho Cho , 2023, 2024. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 2025\-03\-06 Tukaani "XZ 유틸리티" +.SH 이름 +xzless, lzless \- xz 또는 lzma 압축 (텍스트) 파일을 봅니다 +.SH 요약 +\fBxzless\fP [\fI<파일>\fP...] +.br +\fBlzless\fP [\fIfile\fP...] (사용 안 함) +.SH 설명 +\fBxzless\fP는 압축 파일 내용을 터미널에 나타내는 필터 프로그램입니다. \fBxz\fP(1) 방식으로 압축을 해제하는 파일만 +지원합니다. 다른 파일은 이미 압축을 해제한 파일로 간주합니다. 주어진 \fI<파일>\fP 값이 없다면, \fBxzless\fP는 +표준 입력을 읽어들입니다. +.PP +\fBxzless\fP 는 \fBless\fP(1) 를 사용하여 출력을 막습니다. \fBxzmore\fP 와는 다르게, 환경 변수 설정으로 선택한 +페이저를 바꿀 수 없습니다. 명령은 \fBmore\fP(1) 와 \fBvi\fP(1) 가 기반이며, 앞뒤로 움직이고 검색할 수 있습니다. +자세한 정보는 \fBless\fP(1) 설명서를 참고하십시오. +.PP +\fBlzless\fP 명령은 LZMA 유틸리티 하위 호환용으로 제공합니다. 해당 명령은 오래되어 이후 버전에서 제거합니다. +.SH 환경 +.TP +\fBLESSMETACHARS\fP +셸에서 동작할 수도 있는 특수 문자 목록입니다. 환경에 미리 설정해두지 않았다면 \fBxzless\fP에서 설정합니다. +.TP +\fBLESSOPEN\fP +입력 파일을 \fBless\fP(1) 에 전달하기 전에 \fBxz\fP(1) 압축 해제 프로그램을 실행해서 미리 처리하는 명령행을 설정합니다. +.SH "추가 참조" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ko/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzmore.1 new file mode 100644 index 0000000000..1c6ab445fe --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ko/xzmore.1 @@ -0,0 +1,44 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Korean translation for the xz-man +.\" Seong-ho Cho , 2023, 2024. +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 2025\-03\-06 Tukaani "XZ 유틸리티" +.SH 이름 +xzmore, lzmore \- xz 압축 (텍스트) 파일 또는 lzma 압축 (텍스트) 파일을 봅니다 +. +.SH 요약 +\fBxzmore\fP [\fI<파일>\fP...] +.br +\fBlzmore\fP [\fIfile\fP...] (사용 안 함) +. +.SH 설명 +\fBxzmore\fP 명령은 압축 파일에 들어있는 텍스트를 \fBmore\fP(1) 명령으로 터미널에 나타냅니다. \fBxz\fP(1) 방식으로 +압축을 해제하는 파일만 지원합니다. 다른 파일은 이미 압축을 해제한 파일로 간주합니다. \fI<파일>\fP을 지정하지 +않으면, \fBxzmore\fP 프로그램에서는 표준 입력을 읽어들입니다. 키보드 명령 정보는 \fBmore\fP(1) 설명서를 참고하십시오. +.PP +참고로 \fBmore\fP(1) 명령 구현체에 따라 반대 방향(윗방향)으로의 스크롤은 못할 수도 있습니다. \fBxzmore\fP 명령이 +\fBmore\fP(1) 명령에 압축 해제한 데이터를 파이프로 전달하기 때문입니다. \fBxzless\fP(1)는 좀 더 나은 기능을 가진 +\fBless\fP(1) 명령을 활용합니다. +.PP +\fBlzmore\fP 명령은 LZMA 유틸리티 하위 호환용으로 제공합니다. 해당 명령은 오래되어 이후 버전에서 제거합니다. +. +.SH 환경 +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +\fBPAGER\fP 환경변수 값을 설정했다면, \fBmore\fP(1) 대신 해당 환경변수 값을 화면 표시 프로그램으로 사용합니다. +. +.SH "추가 참조" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/lzmainfo.1 new file mode 100644 index 0000000000..5566566aaa --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/lzmainfo.1 @@ -0,0 +1,45 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Brazilian Portuguese translations for xz package +.\" Traduções em português brasileiro para o pacote xz. +.\" Rafael Fontenelle , 2022-2023. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 2013\-06\-30 Tukaani "XZ Utils" +.SH NOME +lzmainfo \- mostra informações armazenadas no cabeçalho do arquivo .lzma +.SH SINOPSE +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIarquivo...\fP] +.SH DESCRIÇÃO +\fBlzmainfo\fP mostra as informações armazenadas no cabeçalho do arquivo +\&\fB.lzma\fP. Ele lê os primeiros 13 bytes do \fIarquivo\fP especificado, +decodifica o cabeçalho e o imprime na saída padrão em formato legível por +humanos. Se nenhum \fIarquivo\fP for fornecido ou \fIarquivo\fP for \fB\-\fP, a +entrada padrão será lida. +.PP +Normalmente, as informações mais interessantes são o tamanho descompactado e +o tamanho do dicionário. O tamanho não compactado pode ser mostrado apenas +se o arquivo estiver na variante de formato \fB.lzma\fP não transmitido. A +quantidade de memória necessária para descompactar o arquivo é de algumas +dezenas de kilobytes mais o tamanho do dicionário. +.PP +\fBlzmainfo\fP está incluído no XZ Utils principalmente para compatibilidade +com versões anteriores do LZMA Utils. +.SH "STATUS DE SAÍDA" +.TP +\fB0\fP +Está tudo bem. +.TP +\fB1\fP +Ocorreu um erro. +.SH BUGS +\fBlzmainfo\fP usa \fBMB\fP enquanto o sufixo correto seria \fBMiB\fP (2^20 +bytes). Isso é para manter a saída compatível com LZMA Utils. +.SH "VEJA TAMBÉM" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xz.1 new file mode 100644 index 0000000000..0f85fc96ac --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xz.1 @@ -0,0 +1,1994 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Brazilian Portuguese translations for xz package +.\" Traduções em português brasileiro para o pacote xz. +.\" Rafael Fontenelle , 2022-2023. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 2025\-03\-08 Tukaani "XZ Utils" +. +.SH NOME +xz, unxz, xzcat, lzma, unlzma, lzcat \- Compacta ou descompacta arquivos .xz +e .lzma +. +.SH SINOPSE +\fBxz\fP [\fIopção...\fP] [\fIarquivo...\fP] +. +.SH "COMANDOS APELIDOS" +\fBunxz\fP é equivalente a \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP é equivalente a \fBxz \-\-decompress \-\-stdout\fP. +.br +\fBlzma\fP é equivalente a \fBxz \-\-format=lzma\fP. +.br +\fBunlzma\fP é equivalente a \fBxz \-\-format=lzma \-\-decompress\fP. +.br +\fBlzcat\fP é equivalente a \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP. +.PP +Ao escrever scripts que precisam descompactar arquivos, é recomendável +sempre usar o nome \fBxz\fP com os argumentos apropriados (\fBxz \-d\fP ou \fBxz \-dc\fP) em vez dos nomes \fBunxz\fP e \fBxzcat\fP. +. +.SH DESCRIÇÃO +\fBxz\fP é uma ferramenta de compactação de dados de uso geral com sintaxe de +linha de comando semelhante ao \fBgzip\fP(1) e ao \fBbzip2\fP(1). O formato de +arquivo nativo é o formato \fB.xz\fP, mas o formato legado \fB.lzma\fP usado por +LZMA Utils e fluxos compactados brutos sem cabeçalhos de formato de +contêiner também são suportados. Além disso, a descompactação do formato +\&\fB.lz\fP usado por \fBlzip\fP é suportada. +.PP +\fBxz\fP compacta ou descompacta cada \fIarquivo\fP de acordo com o modo de +operação selecionado. Se nenhum \fIarquivo\fP for fornecido ou \fIarquivo\fP for +\fB\-\fP, \fBxz\fP lê da entrada padrão e grava os dados processados na saída +padrão. \fBxz\fP recusará (exibirá um erro e ignorará o \fIarquivo\fP) para gravar +dados compactados na saída padrão se for um terminal. Da mesma forma, \fBxz\fP +se recusará a ler dados compactados da entrada padrão se for um terminal. +.PP +A menos que \fB\-\-stdout\fP seja especificado, \fIarquivos\fP diferentes de \fB\-\fP +são gravados em um novo arquivo cujo nome é derivado do nome \fIarquivo\fP de +origem: +.IP \(bu 3 +Ao compactar, o sufixo do formato de arquivo de destino (\fB.xz\fP ou \fB.lzma\fP) +é anexado ao nome do arquivo de origem para obter o nome do arquivo de +destino. +.IP \(bu 3 +Ao descompactar, o sufixo \fB.xz\fP, \fB.lzma\fP ou \fB.lz\fP é removido do nome do +arquivo para obter o nome do arquivo de destino. \fBxz\fP também reconhece os +sufixos \fB.txz\fP e \fB.tlz\fP e os substitui pelo sufixo \fB.tar\fP. +.PP +Se o arquivo de destino já existir, um erro será exibido e \fIarquivo\fP será +ignorado. +.PP +A menos que grave na saída padrão, \fBxz\fP exibirá um aviso e pulará o +\fIarquivo\fP se qualquer um dos seguintes se aplicar: +.IP \(bu 3 +\fIArquivo\fP não é um arquivo normal. Links simbólicos não são seguidos e, +portanto, não são considerados arquivos comuns. +.IP \(bu 3 +\fIArquivo\fP tem mais de um link físico. +.IP \(bu 3 +\fIFile\fP tem setuid, setgid ou sticky bit definido. +.IP \(bu 3 +O modo de operação está definido para compactar e o \fIarquivo\fP já possui um +sufixo do formato de arquivo de destino (\fB.xz\fP ou \fB.txz\fP ao compactar para +o formato \fB.xz\fP e \fB.lzma \fP ou \fB.tlz\fP ao compactar para o formato +\&\fB.lzma\fP). +.IP \(bu 3 +O modo de operação está definido para descompactar e o \fIarquivo\fP não possui +um sufixo de nenhum dos formatos de arquivo suportados (\fB.xz\fP, \fB.txz\fP, +\&\fB.lzma\fP, \fB.tlz\fP , ou \fB.lz\fP). +.PP +Depois de compactar ou descompactar com êxito o \fIarquivo\fP, o \fBxz\fP copia o +dono, grupo, permissões, horário de acesso e horário de modificação do +\fIarquivo\fP de origem para o arquivo de destino. Se a cópia do grupo falhar, +as permissões serão modificadas para que o arquivo de destino não se torne +acessível a usuários que não têm permissão para acessar o \fIarquivo\fP de +origem. \fBxz\fP ainda não oferece suporte à cópia de outros metadados, como +listas de controle de acesso ou atributos estendidos. +.PP +Depois que o arquivo de destino for fechado com êxito, o \fIarquivo\fP de +origem será removido, a menos que \fB\-\-keep\fP tenha sido especificado. O +\fIarquivo\fP de origem nunca é removido se a saída for gravada na saída padrão +ou se ocorrer um erro. +.PP +O envio de \fBSIGINFO\fP ou \fBSIGUSR1\fP para o processo do \fBxz\fP faz com que ele +imprima informações de andamento para erro padrão. Isso tem uso limitado, +pois quando o erro padrão é um terminal, usar \fB\-\-verbose\fP exibirá um +indicador de progresso de atualização automática. +. +.SS "Uso de memória" +O uso de memória de \fBxz\fP varia de algumas centenas de kilobytes a vários +gigabytes, dependendo das configurações de compactação. As configurações +usadas ao compactar um arquivo determinam os requisitos de memória do +descompactador. Normalmente, o descompactador precisa de 5\ % a 20\ % da +quantidade de memória que o compactador precisou ao criar o arquivo. Por +exemplo, descompactar um arquivo criado com \fBxz \-9\fP atualmente requer 65\ MiB de memória. Ainda assim, é possível ter arquivos \fB.xz\fP que requerem +vários gigabytes de memória para descompactar. +.PP +Especialmente os usuários de sistemas mais antigos podem achar irritante a +possibilidade de uso de memória muito grande. Para evitar surpresas +desconfortáveis, o \fBxz\fP possui um limitador de uso de memória embutido, que +está desabilitado por padrão. Embora alguns sistemas operacionais forneçam +maneiras de limitar o uso de memória dos processos, confiar nele não foi +considerado flexível o suficiente (por exemplo, usar \fBulimit\fP(1) para +limitar a memória virtual tende a prejudicar \fBmmap\fP(2)). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +O limitador de uso de memória pode ser ativado com a opção de linha de +comando \fB\-\-memlimit=\fP\fIlimite\fP. Geralmente é mais conveniente habilitar o +limitador por padrão definindo a variável de ambiente \fBXZ_DEFAULTS\fP, por +exemplo, \fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. É possível definir os limites +separadamente para compactação e descompactação usando +\fB\-\-memlimit\-compress=\fP\fIlimite\fP e \fB\-\-memlimit\-decompress=\fP\fIlimite\fP. Usar +essas duas opções fora de \fBXZ_DEFAULTS\fP raramente é útil porque uma única +execução de \fBxz\fP não pode fazer compactação e descompactação e +\fB\-\-memlimit=\fP\fIlimite\fP (ou \fB\-M\fP \fIlimite\fP ) é mais curto para digitar na +linha de comando. +.PP +Se o limite de uso de memória especificado for excedido durante a +descompactação, \fBxz\fP exibirá um erro e a descompactação do arquivo +falhará. Se o limite for excedido durante a compactação, \fBxz\fP tentará +reduzir as configurações para que o limite não seja mais excedido (exceto ao +usar \fB\-\-format=raw\fP ou \fB\-\-no\-adjust\fP). Dessa forma, a operação não +falhará, a menos que o limite seja muito pequeno. A escala das configurações +é feita em etapas que não correspondem às predefinições do nível de +compactação, por exemplo, se o limite for apenas um pouco menor que o valor +necessário para \fBxz \-9\fP, as configurações serão reduzidas apenas um pouco , +não até \fBxz \-8\fP. +. +.SS "Concatenação e preenchimento com arquivos .xz" +É possível concatenar arquivos \fB.xz\fP como estão. \fBxz\fP irá descompactar +tais arquivos como se fossem um único arquivo \fB.xz\fP. +.PP +É possível inserir preenchimento entre as partes concatenadas ou após a +última parte. O preenchimento deve consistir em bytes nulos e o tamanho do +preenchimento deve ser um múltiplo de quatro bytes. Isso pode ser útil, por +exemplo, se o arquivo \fB.xz\fP for armazenado em uma mídia que mede tamanhos +de arquivo em blocos de 512 bytes. +.PP +Concatenação e preenchimento não são permitidos com arquivos \fB.lzma\fP ou +fluxos brutos. +. +.SH OPÇÕES +. +.SS "Sufixos inteiros e valores especiais" +Na maioria dos lugares onde um argumento inteiro é esperado, um sufixo +opcional é suportado para indicar facilmente números inteiros grandes. Não +deve haver espaço entre o número inteiro e o sufixo. +.TP +\fBKiB\fP +Multiplica o inteiro por 1.024 (2^10). \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP e \fBKB\fP são +aceitos como sinônimos de \fBKiB\fP. +.TP +\fBMiB\fP +Multiplica o número inteiro por 1.048.576 (2^20). \fBMi\fP, \fBm\fP, \fBM\fP e \fBMB\fP +são aceitos como sinônimos de \fBMiB\fP. +.TP +\fBGiB\fP +Multiplica o número inteiro por 1.073.741.824 (2^30). \fBGi\fP, \fBg\fP, \fBG\fP e +\fBGB\fP são aceitos como sinônimos de \fBGiB\fP. +.PP +O valor especial \fBmax\fP pode ser usado para indicar o valor inteiro máximo +suportado pela opção. +. +.SS "Modo de operação" +Se várias opções de modo de operação forem dadas, a última entrará em vigor. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Compacta. Este é o modo de operação padrão quando nenhuma opção de modo de +operação é especificada e nenhum outro modo de operação está implícito no +nome do comando (por exemplo, \fBunxz\fP implica em \fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +After successful compression, the source file is removed unless writing to +standard output or \fB\-\-keep\fP was specified. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Decompress. After successful decompression, the source file is removed +unless writing to standard output or \fB\-\-keep\fP was specified. +.TP +\fB\-t\fP, \fB\-\-test\fP +Testa a integridade de \fIarquivos\fP compactados. Esta opção é equivalente a +\fB\-\-decompress \-\-stdout\fP exceto que os dados descompactados são descartados +em vez de serem gravados na saída padrão. Nenhum arquivo é criado ou +removido. +.TP +\fB\-l\fP, \fB\-\-list\fP +Imprime informações sobre \fIarquivos\fP compactados. Nenhuma saída +descompactada é produzida e nenhum arquivo é criado ou removido. No modo de +lista, o programa não pode ler os dados compactados da entrada padrão ou de +outras fontes não pesquisáveis. +.IP "" +A listagem padrão mostra informações básicas sobre \fIarquivos\fP, um arquivo +por linha. Para obter informações mais detalhadas, use também a opção +\fB\-\-verbose\fP. Para obter ainda mais informações, use \fB\-\-verbose\fP duas +vezes, mas observe que isso pode ser lento, porque obter todas as +informações extras requer muitas buscas. A largura da saída detalhada excede +80 caracteres, portanto, canalizar a saída para, por exemplo, \fBless\ \-S\fP +pode ser conveniente se o terminal não tiver largura o suficiente. +.IP "" +A saída exata pode variar entre versões \fBxz\fP e localidades diferentes. Para +saída legível por máquina, \fB\-\-robot \-\-list\fP deve ser usado. +. +.SS "Modificadores de operação" +.TP +\fB\-k\fP, \fB\-\-keep\fP +Não exclui os arquivos de entrada. +.IP "" +Desde \fBxz\fP 5.2.6, esta opção também faz \fBxz\fP compactar ou descompactar +mesmo se a entrada for um link simbólico para um arquivo comum, tiver mais +de um link físico ou tiver o setuid, setgid ou sticky bit definir. Os bits +setuid, setgid e sticky não são copiados para o arquivo de destino. Nas +versões anteriores, isso era feito apenas com \fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Esta opção tem vários efeitos: +.RS +.IP \(bu 3 +Se o arquivo de destino já existir, o exclui antes de compactar ou +descompactar. +.IP \(bu 3 +Compacta ou descompacta, mesmo que a entrada seja um link simbólico para um +arquivo normal, tenha mais de um link físico ou tenha setuid, setgid ou +sticky bit definido. Os bits setuid, setgid e sticky não são copiados para o +arquivo de destino. +.IP \(bu 3 +Quando usado com \fB\-\-decompress\fP \fB\-\-stdout\fP e \fBxz\fP não consegue reconhecer +o tipo do arquivo de origem, copia o arquivo de origem como está na saída +padrão. Isso permite que \fBxzcat\fP \fB\-\-force\fP seja usado como \fBcat\fP(1) para +arquivos que não foram compactados com \fBxz\fP. Observe que, no futuro, o +\fBxz\fP pode oferecer suporte a novos formatos de arquivo compactado, o que +pode fazer com que o \fBxz\fP descompacte mais tipos de arquivos em vez de +copiá\-los como na saída padrão. \fB\-\-format=\fP\fIformato\fP pode ser usado para +restringir \fBxz\fP para descompactar apenas um único formato de arquivo. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Grava os dados compactados ou descompactados na saída padrão em vez de em um +arquivo. Isso implica em \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +Descompacta apenas o primeiro fluxo de \fB.xz\fP e ignora silenciosamente +possíveis dados de entrada restantes após o fluxo. Normalmente, esse +restante posterior sem uso faz com que \fBxz\fP exiba um erro. +.IP "" +\fBxz\fP nunca descompacta mais de um fluxo de arquivos \fB.lzma\fP ou fluxos +brutos, mas esta opção ainda faz \fBxz\fP ignorar os possíveis dados +posteriores após o arquivo \fB.lzma\fP ou fluxo bruto. +.IP "" +Esta opção não tem efeito se o modo de operação não for \fB\-\-decompress\fP ou +\fB\-\-test\fP. +.IP "" +Since \fBxz\fP 5.7.1alpha, \fB\-\-single\-stream\fP implies \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +Desativa a criação de arquivos esparsos. Por padrão, ao descompactar em um +arquivo normal, \fBxz\fP tenta tornar o arquivo esparso se os dados +descompactados contiverem longas sequências de zeros binários. Ele também +funciona ao gravar na saída padrão, desde que a saída padrão esteja +conectada a um arquivo normal e certas condições adicionais sejam atendidas +para torná\-la segura. A criação de arquivos esparsos pode economizar espaço +em disco e acelerar a descompactação, reduzindo a quantidade de E/S do +disco. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +Ao compactar, usa \fI.suf\fP como sufixo para o arquivo de destino em vez de +\&\fB.xz\fP ou \fB.lzma\fP. Se não estiver gravando na saída padrão e o arquivo de +origem já tiver o sufixo \fI.suf\fP, um aviso será exibido e o arquivo será +ignorado. +.IP "" +Ao descompactar, reconhece arquivos com o sufixo \fI.suf\fP além de arquivos +com o sufixo \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP ou \fB.lz\fP . Se o arquivo de +origem tiver o sufixo \fI.suf\fP, o sufixo será removido para obter o nome do +arquivo de destino. +.IP "" +Ao compactar ou descompactar fluxos brutos (\fB\-\-format=raw\fP), o sufixo +sempre deve ser especificado, a menos que seja gravado na saída padrão, +porque não há sufixo padrão para fluxos brutos. +.TP +\fB\-\-files\fP[\fB=\fP\fIarquivo\fP] +Lê os nomes dos arquivos a serem processados em \fIarquivo\fP; se \fIarquivo\fP +for omitido, os nomes dos arquivos serão lidos da entrada padrão. Os nomes +de arquivo devem terminar com o caractere de nova linha. Um traço (\fB\-\fP) é +considerado um nome de arquivo regular; não significa entrada padrão. Se os +nomes de arquivo forem fornecidos também como argumentos de linha de +comando, eles serão processados antes da leitura dos nomes de arquivo de +\fIarquivo\fP. +.TP +\fB\-\-files0\fP[\fB=\fP\fIarquivo\fP] +Isso é idêntico a \fB\-\-files\fP[\fB=\fP\fIarquivo\fP], exceto que cada nome de +arquivo deve ser finalizado com o caractere nulo. +. +.SS "Opções básicas de formato de arquivo e de compactação" +.TP +\fB\-F\fP \fIformato\fP, \fB\-\-format=\fP\fIformato\fP +Especifica o \fIformato\fP de arquivo para compactar ou descompactar: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +Este é o padrão. Ao compactar, \fBauto\fP é equivalente a \fBxz\fP. Ao +descompactar, o formato do arquivo de entrada é detectado +automaticamente. Observe que os fluxos brutos (criados com \fB\-\-format=raw\fP) +não podem ser detectados automaticamente. +.TP +\fBxz\fP +Compacta no formato de arquivo \fB.xz\fP ou aceite apenas arquivos \fB.xz\fP ao +descompactar. +.TP +\fBlzma\fP, \fBalone\fP +Compacta no formato de arquivo legado \fB.lzma\fP ou aceite apenas arquivos +\&\fB.lzma\fP ao descompactar. O nome alternativo \fBalone\fP é fornecido para +compatibilidade com versões anteriores do LZMA Utils. +.TP +\fBlzip\fP +Aceita apenas arquivos \fB.lz\fP ao descompactar. Sem suporte a compactação. +.IP "" +The \fB.lz\fP format versions 0 and 1 are supported. Version 0 files were +produced by \fBlzip\fP 1.3 and older. Such files aren't common but may be +found from file archives as a few source packages were released in this +format. People might have old personal files in this format too. +Decompression support for the format version 0 was removed in \fBlzip\fP 1.18. +\fBlzip\fP 1.4 and later create files in the format version 1. +.TP +\fBraw\fP +Compacta ou descompacta um fluxo bruto (sem cabeçalhos). Isso é destinado +apenas a usuários avançados. Para decodificar fluxos brutos, você precisa +usar \fB\-\-format=raw\fP e especificar explicitamente a cadeia de filtros, que +normalmente seria armazenada nos cabeçalhos do contêiner. +.RE +.TP +\fB\-C\fP \fIverificação\fP, \fB\-\-check=\fP\fIverificação\fP +Especifica o tipo de verificação de integridade. A verificação é calculada a +partir dos dados descompactados e armazenados no arquivo \fB.xz\fP. Esta opção +tem efeito somente ao compactar no formato \fB.xz\fP; o formato \fB.lzma\fP não +oferece suporte a verificações de integridade. A verificação de integridade +(se for o caso) é verificada quando o arquivo \fB.xz\fP é descompactado. +.IP "" +Tipos de \fIverificação\fP suportados: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +Não calcula uma verificação de integridade. Isso geralmente é uma má +ideia. Pode ser útil quando a integridade dos dados é verificada por outros +meios. +.TP +\fBcrc32\fP +Calcula CRC32 usando o polinômio do IEEE\-802.3 (Ethernet). +.TP +\fBcrc64\fP +Calcula CRC64 usando o polinômio de ECMA\-182. Este é o padrão, pois é um +pouco melhor que o CRC32 na detecção de arquivos danificados e a diferença +de velocidade é insignificante. +.TP +\fBsha256\fP +Calcula SHA\-256. Isso é um pouco mais lento do que CRC32 e CRC64. +.RE +.IP "" +A integridade dos cabeçalhos de \fB.xz\fP é sempre verificada com CRC32. Não é +possível alterá\-la ou desativá\-la. +.TP +\fB\-\-ignore\-check\fP +Não confere a verificação de integridade dos dados compactados ao +descompactar. Os valores CRC32 nos cabeçalhos \fB.xz\fP ainda serão conferidos +normalmente. +.IP "" +\fBNão use esta opção a menos que saiba o que está fazendo.\fP Possíveis razões +para usar esta opção: +.RS +.IP \(bu 3 +Tentativa de recuperar dados de um arquivo .xz corrompido. +.IP \(bu 3 +Acelerar a descompactação. Isso é importante principalmente com SHA\-256 ou +com arquivos extremamente bem compactados. É recomendável não usar essa +opção para essa finalidade, a menos que a integridade do arquivo seja +verificada externamente de alguma outra forma. +.RE +.TP +\fB\-0\fP ... \fB\-9\fP +Seleciona um nível de predefinição de compactação. O padrão é \fB\-6\fP. Se +vários níveis de predefinição forem especificados, o último terá efeito. Se +uma cadeia de filtro personalizada já foi especificada, especificar um nível +de predefinição de compactação limpa a cadeia de filtro personalizada. +.IP "" +As diferenças entre as predefinições são mais significativas do que com +\fBgzip\fP(1) e \fBbzip2\fP(1). As configurações de compactação selecionadas +determinam os requisitos de memória do descompactador, portanto, usar um +nível de predefinição muito alto pode dificultar a descompactação do arquivo +em um sistema antigo com pouca RAM. Especificamente, \fBnão é uma boa ideia usar cegamente \-9 para tudo\fP como costuma acontecer com \fBgzip\fP(1) e +\fBbzip2\fP(1). +.RS +.TP +\fB\-0\fP ... \fB\-3\fP +Estas são predefinições um tanto rápidas. \fB\-0\fP às vezes é mais rápida que +\fBgzip \-9\fP ao mesmo tempo que compacta muito melhor. As mais altas +geralmente têm velocidade comparável ao \fBbzip2\fP(1) com taxa de compactação +comparável ou melhor, embora os resultados dependam muito do tipo de dados +que estão sendo compactados. +.TP +\fB\-4\fP ... \fB\-6\fP +Compactação boa a muito boa, mantendo o uso de memória do descompactador +razoável mesmo para sistemas antigos. \fB\-6\fP é o padrão, que geralmente é uma +boa escolha para distribuir arquivos que precisam ser descompactáveis, mesmo +em sistemas com apenas 16\ MiB de RAM. (\fB\-5e\fP ou \fB\-6e\fP também vale a pena +considerar. Veja \fB\-\-extreme\fP.) +.TP +\fB\-7 ... \-9\fP +Eles são como \fB\-6\fP, mas com requisitos de memória de compressor e +descompressor mais altos. Eles são úteis apenas ao compactar arquivos +maiores que 8\ MiB, 16\ MiB e 32\ MiB, respectivamente. +.RE +.IP "" +No mesmo hardware, a velocidade de descompactação é aproximadamente um +número constante de bytes de dados compactados por segundo. Em outras +palavras, quanto melhor a compactação, mais rápida será a +descompactação. Isso também significa que a quantidade de saída não +compactada produzida por segundo pode variar muito. +.IP "" +A tabela a seguir resume os recursos das predefinições: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Predefinição;DicTam;CompCPU;CompMem;DecMem +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Descrições das colunas: +.RS +.IP \(bu 3 +DicTam é o tamanho do dicionário LZMA2. É desperdício de memória usar um +dicionário maior que o tamanho do arquivo descompactado. É por isso que é +bom evitar usar as predefinições \fB\-7\fP ... \fB\-9\fP quando não há real +necessidade deles. Em \fB\-6\fP e inferior, a quantidade de memória desperdiçada +geralmente é baixa o suficiente para não importar. +.IP \(bu 3 +CompCPU é uma representação simplificada das configurações LZMA2 que afetam +a velocidade de compactação. O tamanho do dicionário também afeta a +velocidade, portanto, embora o CompCPU seja o mesmo para os níveis \fB\-6\fP +\&... \fB\-9\fP, níveis mais altos ainda tendem a ser um pouco mais lentos. Para +obter uma compactação ainda mais lenta e possivelmente melhor, consulte +\fB\-\-extreme\fP. +.IP \(bu 3 +CompMem contains the compressor memory requirements in the single\-threaded +mode. It may vary slightly between \fBxz\fP versions. +.IP \(bu 3 +DecMem contém os requisitos de memória do descompactador. Ou seja, as +configurações de compactação determinam os requisitos de memória do +descompactador. O uso exato da memória do descompactador é um pouco maior do +que o tamanho do dicionário LZMA2, mas os valores na tabela foram +arredondados para o próximo MiB completo. +.RE +.IP "" +Memory requirements of the multi\-threaded mode are significantly higher than +that of the single\-threaded mode. With the default value of +\fB\-\-block\-size\fP, each thread needs 3*3*DictSize plus CompMem or DecMem. For +example, four threads with preset \fB\-6\fP needs 660\(en670\ MiB of memory. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +Usa uma variante mais lenta do nível de predefinição de compactação +selecionado (\fB\-0\fP ... \fB\-9\fP) para obter uma taxa de compactação um pouco +melhor, mas, com azar, isso também pode piorar. O uso da memória do +descompressor não é afetado, mas o uso da memória do compactador aumenta um +pouco nos níveis de predefinição \fB\-0\fP ... \fB\-3\fP. +.IP "" +Como existem duas predefinições com tamanhos de dicionário 4\ MiB e 8\ MiB, +as predefinições \fB\-3e\fP e \fB\-5e\fP usam configurações um pouco mais rápidas +(CompCPU inferior) do que \fB\-4e\fP e \fB\-6e\fP, respectivamente. Dessa forma, não +há duas predefinições idênticas. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Predefinição;DicTam;CompCPU;CompMem;DecMem +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Por exemplo, há um total de quatro predefinições que usam o dicionário 8\ MiB, cuja ordem do mais rápido ao mais lento é \fB\-5\fP, \fB\-6\fP, \fB\-5e\fP e +\fB\-6e\fP. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +Esses são apelidos um tanto enganosos para \fB\-0\fP e \fB\-9\fP, +respectivamente. Eles são fornecidos apenas para compatibilidade com versões +anteriores do LZMA Utils. Evite usar essas opções. +.TP +\fB\-\-block\-size=\fP\fItamanho\fP +Ao compactar para o formato \fB.xz\fP, divida os dados de entrada em blocos de +\fItamanho\fP bytes. Os blocos são compactados independentemente uns dos +outros, o que ajuda no multi\-threading e torna possível a descompactação +limitada de acesso aleatório. Essa opção normalmente é usada para substituir +o tamanho de bloco padrão no modo multi\-thread, mas também pode ser usada em +thread única. +.IP "" +In multi\-threaded mode about three times \fIsize\fP bytes will be allocated in +each thread for buffering input and output. The default \fIsize\fP is three +times the LZMA2 dictionary size or 1 MiB, whichever is more. Typically a +good value is 2\(en4 times the size of the LZMA2 dictionary or at least 1 +MiB. Using \fIsize\fP less than the LZMA2 dictionary size is waste of RAM +because then the LZMA2 dictionary buffer will never get fully used. In +multi\-threaded mode, the sizes of the blocks are stored in the block +headers. This size information is required for multi\-threaded +decompression. +.IP "" +In single\-threaded mode no block splitting is done by default. Setting this +option doesn't affect memory usage. No size information is stored in block +headers, thus files created in single\-threaded mode won't be identical to +files created in multi\-threaded mode. The lack of size information also +means that \fBxz\fP won't be able decompress the files in multi\-threaded mode. +.TP +\fB\-\-block\-list=\fP\fIitems\fP +When compressing to the \fB.xz\fP format, start a new block with an optional +custom filter chain after the given intervals of uncompressed data. +.IP "" +The \fIitems\fP are a comma\-separated list. Each item consists of an optional +filter chain number between 0 and 9 followed by a colon (\fB:\fP) and a +required size of uncompressed data. Omitting an item (two or more +consecutive commas) is a shorthand to use the size and filters of the +previous item. +.IP "" +If the input file is bigger than the sum of the sizes in \fIitems\fP, the last +item is repeated until the end of the file. A special value of \fB0\fP may be +used as the last size to indicate that the rest of the file should be +encoded as a single block. +.IP "" +An alternative filter chain for each block can be specified in combination +with the \fB\-\-filters1=\fP\fIfilters\fP \&...\& \fB\-\-filters9=\fP\fIfilters\fP options. +These options define filter chains with an identifier between 1\(en9. +Filter chain 0 can be used to refer to the default filter chain, which is +the same as not specifying a filter chain. The filter chain identifier can +be used before the uncompressed size, followed by a colon (\fB:\fP). For +example, if one specifies \fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP +then blocks will be created using: +.RS +.IP \(bu 3 +The filter chain specified by \fB\-\-filters1\fP and 2 MiB input +.IP \(bu 3 +The filter chain specified by \fB\-\-filters3\fP and 2 MiB input +.IP \(bu 3 +The filter chain specified by \fB\-\-filters2\fP and 4 MiB input +.IP \(bu 3 +The filter chain specified by \fB\-\-filters2\fP and 4 MiB input +.IP \(bu 3 +The default filter chain and 2 MiB input +.IP \(bu 3 +The default filter chain and 4 MiB input for every block until end of input. +.RE +.IP "" +If one specifies a size that exceeds the encoder's block size (either the +default value in threaded mode or the value specified with +\fB\-\-block\-size=\fP\fIsize\fP), the encoder will create additional blocks while +keeping the boundaries specified in \fIitems\fP. For example, if one specifies +\fB\-\-block\-size=10MiB\fP \fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP and the +input file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, +10, 10, and 1 MiB. +.IP "" +No modo multi\-thread, os tamanhos dos blocos são armazenados nos cabeçalhos +dos blocos. Isso não é feito no modo de thread única, portanto, a saída +codificada não será idêntica à do modo multi\-thread. +.TP +\fB\-\-flush\-timeout=\fP\fItempo_limite\fP +Ao compactar, se mais de \fItempo_limite\fP milissegundos (um número inteiro +positivo) se passaram desde a liberação anterior e a leitura de mais entrada +seria bloqueada, todos os dados de entrada pendentes serão liberados do +codificador e disponibilizados no fluxo de saída. Isso pode ser útil se +\fBxz\fP for usado para compactar dados transmitidos por uma rede. Valores +\fItempo_limite\fP pequenos tornam os dados disponíveis na extremidade +receptora com um pequeno atraso, mas valores \fItempo_limite\fP grandes +oferecem melhor taxa de compactação. +.IP "" +Esse recurso está desabilitado por padrão. Se esta opção for especificada +mais de uma vez, a última terá efeito. O valor especial \fItempo_limite\fP de +\fB0\fP pode ser usado para desabilitar explicitamente esse recurso. +.IP "" +Este recurso não está disponível em sistemas não\-POSIX. +.IP "" +.\" FIXME +\fBEste recurso ainda é experimental.\fP Atualmente, \fBxz\fP não é adequado para +descompactar o fluxo em tempo real devido à forma como \fBxz\fP faz o buffer. +.TP +\fB\-\-no\-sync\fP +Do not synchronize the target file and its directory to the storage device +before removing the source file. This can improve performance if +compressing or decompressing many small files. However, if the system +crashes soon after the deletion, it is possible that the target file was not +written to the storage device but the delete operation was. In that case +neither the original source file nor the target file is available. +.IP "" +This option has an effect only when \fBxz\fP is going to remove the source +file. In other cases synchronization is never done. +.IP "" +The synchronization and \fB\-\-no\-sync\fP were added in \fBxz\fP 5.7.1alpha. +.TP +\fB\-\-memlimit\-compress=\fP\fIlimite\fP +Define um limite de uso de memória para compactação. Se esta opção for +especificada várias vezes, a última entrará em vigor. +.IP "" +Se as configurações de compactação excederem o \fIlimite\fP, \fBxz\fP tentará +ajustar as configurações para baixo para que o limite não seja mais excedido +e exibirá um aviso de que o ajuste automático foi feito. Os ajustes são +feitos nesta ordem: reduzindo o número de encadeamentos, alternando para o +modo sigle\-thread se até mesmo uma thread no modo multi\-thread exceder o +\fIlimite\fP e, finalmente, reduzindo o tamanho do dicionário LZMA2. +.IP "" +Ao compactar com \fB\-\-format=raw\fP ou se \fB\-\-no\-adjust\fP tiver sido +especificado, apenas o número de threads pode ser reduzido, pois isso pode +ser feito sem afetar a saída compactada. +.IP "" +Se o \fIlimite\fP não puder ser alcançado mesmo com os ajustes descritos acima, +um erro será exibido e \fBxz\fP sairá com status de saída 1. +.IP "" +O \fIlimite\fP pode ser especificado de várias maneiras: +.RS +.IP \(bu 3 +O \fIlimite\fP pode ser um valor absoluto em bytes. Usar um sufixo inteiro como +\fBMiB\fP pode ser útil. Exemplo: \fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +O \fIlimite\fP pode ser especificado como uma porcentagem da memória física +total (RAM). Isso pode ser útil especialmente ao definir a variável de +ambiente \fBXZ_DEFAULTS\fP em um script de inicialização de shell que é +compartilhado entre diferentes computadores. Dessa forma o limite é +automaticamente maior em sistemas com mais memória. Exemplo: +\fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +O \fIlimite\fP pode ser redefinido para seu valor padrão, definindo\-o como +\fB0\fP. Atualmente, isso equivale a definir \fIlimite\fP como \fBmax\fP (sem limite +de uso de memória). +.RE +.IP "" +Para \fBxz\fP de 32 bits, há um caso especial: se o \fIlimite\fP estiver acima de +\fB4020\ MiB\fP, o \fIlimite\fP é definido como \fB4020\ MiB\fP. No MIPS32 \fB2000\ MiB\fP é usado em seu lugar. (Os valores \fB0\fP e \fBmax\fP não são afetados por +isso. Um recurso semelhante não existe para descompactação.) Isso pode ser +útil quando um executável de 32 bits tem acesso a espaço de endereço de 4\ GiB (2 GiB no MIPS32) enquanto espero não causar danos em outras situações. +.IP "" +Consulte também a seção \fBUso de memória\fP. +.TP +\fB\-\-memlimit\-decompress=\fP\fIlimite\fP +Define um limite de uso de memória para descompactação. Isso também afeta o +modo \fB\-\-list\fP. Se a operação não for possível sem exceder o \fIlimite\fP, +\fBxz\fP exibirá um erro e a descompactação do arquivo falhará. Consulte +\fB\-\-memlimit\-compress=\fP\fIlimite\fP para possíveis maneiras de especificar o +\fIlimite\fP. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fIlimite\fP +Define um limite de uso de memória para descompactação multi\-thread. Isso +pode afetar apenas o número de threads; isso nunca fará com que \fBxz\fP se +recuse a descompactar um arquivo. Se \fIlimite\fP for muito baixo para permitir +qualquer multi\-thread, o \fIlimite\fP será ignorado e \fBxz\fP continuará no modo +de thread única. Observe que se \fB\-\-memlimit\-decompress\fP também for usado, +ele sempre se aplicará aos modos de thread única e multi\-thread e, portanto, +o \fIlimite\fP efetivo para multi\-threading nunca será maior que o limite +definido com \fB\-\-memlimit\-decompress\fP. +.IP "" +Em contraste com as outras opções de limite de uso de memória, +\fB\-\-memlimit\-mt\-decompress=\fP\fIlimite\fP tem um padrão \fIlimite\fP específico do +sistema. \fBxz \-\-info\-memory\fP pode ser usado para ver o valor atual. +.IP "" +Esta opção e seu valor padrão existem porque, sem qualquer limite, o +descompactador usando threads pode acabar alocando uma quantidade insana de +memória com alguns arquivos de entrada. Se o \fIlimite\fP padrão for muito +baixo em seu sistema, sinta\-se à vontade para aumentar o \fIlimite\fP, mas +nunca defina\-o para um valor maior que a quantidade de RAM utilizável, pois +com os arquivos de entrada apropriados \fBxz\fP tentará usar essa quantidade de +memória mesmo com um baixo número de threads. Ficar sem memória ou trocar +não melhorará o desempenho da descompactação. +.IP "" +Consulte \fB\-\-memlimit\-compress=\fP\fIlimite\fP para possíveis maneiras de +especificar o \fIlimite\fP. Definir \fIlimite\fP como \fB0\fP redefine \fIlimite\fP para +o valor padrão específico do sistema. +.TP +\fB\-M\fP \fIlimite\fP, \fB\-\-memlimit=\fP\fIlimite\fP, \fB\-\-memory=\fP\fIlimite\fP +Isso é equivalente a especificar \fB\-\-memlimit\-compress=\fP\fIlimite\fP +\fB\-\-memlimit\-decompress=\fP\fIlimite\fP \fB\-\-memlimit\-mt\-decompress=\fP\fIlimite\fP. +.TP +\fB\-\-no\-adjust\fP +Exibe um erro e saia se o limite de uso de memória não puder ser atendido +sem ajustar as configurações que afetam a saída compactada. Ou seja, isso +evita que \fBxz\fP alterne o codificador do modo multi\-thread para o modo +encadeado único e reduza o tamanho do dicionário LZMA2. Mesmo quando esta +opção é usada, o número de threads pode ser reduzido para atender ao limite +de uso de memória, pois isso não afetará a saída compactada. +.IP "" +O ajuste automático é sempre desativado ao criar fluxos brutos +(\fB\-\-format=raw\fP). +.TP +\fB\-T\fP \fIthreads\fP, \fB\-\-threads=\fP\fIthreads\fP +Especifica o número de threads de trabalho a serem usados. Definir +\fIthreads\fP para um valor especial \fB0\fP faz com que \fBxz\fP use tantos threads +quanto o(s) processador(es) no suporte do sistema. O número real de +encadeamentos pode ser menor que \fIthreads\fP se o arquivo de entrada não for +grande o suficiente para subdividir em threads com as configurações +fornecidas ou se o uso de mais threads exceder o limite de uso de memória. +.IP "" +Os compactadores usando thread única e várias threads produzem saídas +diferentes. O compactador de thread única fornecerá o menor tamanho de +arquivo, mas apenas a saída do compactador de várias threads pode ser +descompactada usando várias threads. Definir \fIthreads\fP como \fB1\fP usará o +modo de thread única. Definir \fIthreads\fP para qualquer outro valor, +incluindo \fB0\fP, usará o compressor de várias threads, mesmo que o sistema +tenha suporte a apenas uma thread de hardware. (\fBxz\fP 5.2.x usou o modo de +thread única nesta situação.) +.IP "" +Para usar o modo de várias threads com apenas uma thread, defina \fIthreads\fP +como \fB+1\fP. O prefixo \fB+\fP não tem efeito com valores diferentes de \fB1\fP. Um +limite de uso de memória ainda pode fazer \fBxz\fP alternar para o modo de +thread única, a menos que \fB\-\-no\-adjust\fP seja usado. O suporte para o +prefixo \fB+\fP foi adicionado no \fBxz\fP 5.4.0. +.IP "" +Se um número automático de threads foi solicitado e nenhum limite de uso de +memória foi especificado, um limite flexível padrão específico do sistema +será usado para possivelmente limitar o número de threads. É um limite +flexível no sentido de que é ignorado se o número de threads se tornar um, +portanto, um limite flexível nunca impedirá \fBxz\fP de compactar ou +descompactar. Este limite flexível padrão não fará com que \fBxz\fP alterne do +modo de várias threads para o modo de thread única. Os limites ativos podem +ser vistos com \fBxz \-\-info\-memory\fP. +.IP "" +Atualmente, o único método de threading é dividir a entrada em blocos e +comprimi\-los independentemente um do outro. O tamanho padrão do bloco +depende do nível de compactação e pode ser substituído com a opção +\fB\-\-block\-size=\fP\fItamanho\fP. +.IP "" +A descompactação em threads funciona apenas em arquivos que contêm vários +blocos com informações de tamanho nos cabeçalhos dos blocos. Todos os +arquivos grandes o suficiente compactados no modo de várias thread atendem a +essa condição, mas os arquivos compactados no modo de thread única não +atendem, mesmo se \fB\-\-block\-size=\fP\fItamanho\fP tiver sido usado. +.IP "" +The default value for \fIthreads\fP is \fB0\fP. In \fBxz\fP 5.4.x and older the +default is \fB1\fP. +. +.SS "Cadeias de filtro de compressor personalizadas" +Uma cadeia de filtro personalizada permite especificar as configurações de +compactação em detalhes, em vez de confiar nas configurações associadas às +predefinições. Quando uma cadeia de filtro personalizada é especificada, as +opções predefinidas (\fB\-0\fP \&...\& \fB\-9\fP e \fB\-\-extreme\fP) anteriores na linha +de comando são esquecidas. Se uma opção predefinida for especificada após +uma ou mais opções de cadeia de filtros personalizados, a nova predefinição +entrará em vigor e as opções de cadeia de filtros personalizados +especificadas anteriormente serão esquecidas. +.PP +Uma cadeia de filtro é comparável à tubulação na linha de comando. Ao +compactar, a entrada descompactada vai para o primeiro filtro, cuja saída +vai para o próximo filtro (se houver). A saída do último filtro é gravada no +arquivo compactado. O número máximo de filtros na cadeia é quatro, mas +normalmente uma cadeia de filtros tem apenas um ou dois filtros. +.PP +Muitos filtros têm limitações sobre onde podem estar na cadeia de filtros: +alguns filtros podem funcionar apenas como o último filtro na cadeia, alguns +apenas como filtro não\-último e alguns funcionam em qualquer posição na +cadeia. Dependendo do filtro, essa limitação é inerente ao projeto do filtro +ou existe para evitar problemas de segurança. +.PP +A custom filter chain can be specified in two different ways. The options +\fB\-\-filters=\fP\fIfilters\fP and \fB\-\-filters1=\fP\fIfilters\fP \&...\& +\fB\-\-filters9=\fP\fIfilters\fP allow specifying an entire filter chain in one +option using the liblzma filter string syntax. Alternatively, a filter +chain can be specified by using one or more individual filter options in the +order they are wanted in the filter chain. That is, the order of the +individual filter options is significant! When decoding raw streams +(\fB\-\-format=raw\fP), the filter chain must be specified in the same order as +it was specified when compressing. Any individual filter or preset options +specified before the full chain option (\fB\-\-filters=\fP\fIfilters\fP) will be +forgotten. Individual filters specified after the full chain option will +reset the filter chain. +.PP +Both the full and individual filter options take filter\-specific \fIoptions\fP +as a comma\-separated list. Extra commas in \fIoptions\fP are ignored. Every +option has a default value, so specify those you want to change. +.PP +Para ver toda a cadeia de filtros e \fIopções\fP, use \fBxz \-vv\fP (isto é, use +\fB\-\-verbose\fP duas vezes). Isso também funciona para visualizar as opções da +cadeia de filtros usadas pelas predefinições. +.TP +\fB\-\-filters=\fP\fIfilters\fP +Specify the full filter chain or a preset in a single option. Each filter +can be separated by spaces or two dashes (\fB\-\-\fP). \fIfilters\fP may need to be +quoted on the shell command line so it is parsed as a single option. To +denote \fIoptions\fP, use \fB:\fP or \fB=\fP. A preset can be prefixed with a \fB\-\fP +and followed with zero or more flags. The only supported flag is \fBe\fP to +apply the same options as \fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIfilters\fP ... \fB\-\-filters9\fP=\fIfilters\fP +Specify up to nine additional filter chains that can be used with +\fB\-\-block\-list\fP. +.IP "" +For example, when compressing an archive with executable files followed by +text files, the executable part could use a filter chain with a BCJ filter +and the text part only the LZMA2 filter. +.TP +\fB\-\-filters\-help\fP +Display a help message describing how to specify presets and custom filter +chains in the \fB\-\-filters\fP and \fB\-\-filters1=\fP\fIfilters\fP \&...\& +\fB\-\-filters9=\fP\fIfilters\fP options, and exit successfully. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIopções\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIopções\fP] +.PD +Adiciona o filtro LZMA1 ou LZMA2 à cadeia de filtros. Esses filtros podem +ser usados apenas como o último filtro na cadeia. +.IP "" +LZMA1 é um filtro legado, que é suportado quase exclusivamente devido ao +formato de arquivo legado \fB.lzma\fP, que suporta apenas LZMA1. LZMA2 é uma +versão atualizada do LZMA1 para corrigir alguns problemas práticos do +LZMA1. O formato \fB.xz\fP usa LZMA2 e não suporta LZMA1. A velocidade de +compactação e as proporções de LZMA1 e LZMA2 são praticamente as mesmas. +.IP "" +LZMA1 e LZMA2 compartilham o mesmo conjunto de \fIopções\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIpredefinição\fP +Redefine todas as \fIopções\fP de LZMA1 ou LZMA2 para +\fIpredefinição\fP. \fIPredefinição\fP consiste em um número inteiro, que pode ser +seguido por modificadores de predefinição de uma única letra. O inteiro pode +ser de \fB0\fP a \fB9\fP, correspondendo às opções de linha de comando \fB\-0\fP +\&...\& \fB\-9\fP. O único modificador suportado atualmente é \fBe\fP, que +corresponde a \fB\-\-extreme\fP. Se nenhum \fBpreset\fP for especificado, os valores +padrão das \fIopções\fP LZMA1 ou LZMA2 serão obtidos da predefinição \fB6\fP. +.TP +\fBdict=\fP\fItamanho\fP +O \fItamanho\fP do dicionário (buffer de histórico) indica quantos bytes dos +dados não compactados processados recentemente são mantidos na memória. O +algoritmo tenta encontrar sequências de bytes repetidos (correspondências) +nos dados não compactados e substituí\-los por referências aos dados +atualmente no dicionário. Quanto maior o dicionário, maior a chance de +encontrar uma correspondência. Portanto, aumentar o dicionário \fItamanho\fP +geralmente melhora a taxa de compactação, mas um dicionário maior que o +arquivo não compactado é um desperdício de memória. +.IP "" +Um \fItamanho\fP de dicionário típico é de 64\ KiB a 64\ MiB. O mínimo é 4\ KiB. O máximo para compactação é atualmente 1,5\ GiB (1536\ MiB). O +descompactador já oferece suporte a dicionários de até um byte a menos de 4\ GiB, que é o máximo para os formatos de fluxo LZMA1 e LZMA2. +.IP "" +O \fItamanho\fP de dicionário e o localizador de correspondência (\fImf\fP) juntos +determinam o uso de memória do codificador LZMA1 ou LZMA2. O mesmo (ou +maior) \fItamanho\fP de dicionário é necessário para descompactar que foi usado +durante a compactação, portanto, o uso de memória do decodificador é +determinado pelo tamanho do dicionário usado durante a compactação. Os +cabeçalhos \fB.xz\fP armazenam o \fItamanho\fP de dicionário como 2^\fIn\fP ou 2^\fIn\fP ++ 2^(\fIn\fP\-1), então esses \fItamanhos\fP são um tanto preferidos para +compactação. Outros \fItamanhos\fP serão arredondados quando armazenados nos +cabeçalhos \fB.xz\fP. +.TP +\fBlc=\fP\fIlc\fP +Especifica o número de bits de contexto literais. O mínimo é 0 e o máximo é +4; o padrão é 3. Além disso, a soma de \fIlc\fP e \fIlp\fP não deve exceder 4. +.IP "" +Todos os bytes que não podem ser codificados como correspondências são +codificados como literais. Ou seja, literais são simplesmente bytes de 8 +bits que são codificados um de cada vez. +.IP "" +A codificação literal assume que os bits \fIlc\fP mais altos do byte não +compactado anterior se correlacionam com o próximo byte. Por exemplo, em um +texto típico em inglês, uma letra maiúscula geralmente é seguida por uma +letra minúscula, e uma letra minúscula geralmente é seguida por outra letra +minúscula. No conjunto de caracteres US\-ASCII, os três bits mais altos são +010 para letras maiúsculas e 011 para letras minúsculas. Quando \fIlc\fP é pelo +menos 3, a codificação literal pode aproveitar essa propriedade nos dados +não compactados. +.IP "" +O valor padrão (3) geralmente é bom. Se você deseja compactação máxima, +experimente \fBlc=4\fP. Às vezes ajuda um pouco, às vezes piora a +compactação. Se piorar, experimente \fBlc=2\fP também. +.TP +\fBlp=\fP\fIlp\fP +Especifica o número de bits de posição literal. O mínimo é 0 e o máximo é 4; +o padrão é 0. +.IP "" +\fILp\fP afeta que tipo de alinhamento nos dados não compactados é assumido ao +codificar literais. Consulte \fIpb\fP abaixo para obter mais informações sobre +alinhamento. +.TP +\fBpb=\fP\fIpb\fP +Especifica o número de bits de posição. O mínimo é 0 e o máximo é 4; o +padrão é 2. +.IP "" +\fIPb\fP afeta que tipo de alinhamento nos dados não compactados é assumido em +geral. O padrão significa alinhamento de quatro bytes (2^\fIpb\fP=2^2=4), que +geralmente é uma boa escolha quando não há melhor estimativa. +.IP "" +Quando o alinhamento é conhecido, definir \fIpb\fP adequadamente pode reduzir +um pouco o tamanho do arquivo. Por exemplo, com arquivos de texto com +alinhamento de um byte (US\-ASCII, ISO\-8859\-*, UTF\-8), a configuração \fBpb=0\fP +pode melhorar um pouco a compactação. Para texto UTF\-16, \fBpb=1\fP é uma boa +escolha. Se o alinhamento for um número ímpar como 3 bytes, \fBpb=0\fP pode ser +a melhor escolha. +.IP "" +Embora o alinhamento assumido possa ser ajustado com \fIpb\fP e \fIlp\fP, LZMA1 e +LZMA2 ainda favorecem ligeiramente o alinhamento de 16 bytes. Pode valer a +pena levar em consideração ao projetar formatos de arquivo que provavelmente +serão compactados com LZMA1 ou LZMA2. +.TP +\fBmf=\fP\fImf\fP +O localizador de correspondência tem um efeito importante na velocidade do +codificador, uso de memória e taxa de compactação. Normalmente, os +localizadores de correspondência de Hash Chain são mais rápidos do que os +localizadores de correspondência de árvore binária. O padrão depende do +\fIpredefinição\fP: 0 usa \fBhc3\fP, 1\(en3 usa \fBhc4\fP e o resto usa \fBbt4\fP. +.IP "" +Os seguintes localizadores de correspondência são suportados. As fórmulas de +uso de memória abaixo são aproximações aproximadas, que estão mais próximas +da realidade quando \fIdict\fP é uma potência de dois. +.RS +.TP +\fBhc3\fP +Cadeia de hashs com hashing de 2 e 3 bytes +.br +Valor mínimo para \fInice\fP: 3 +.br +Uso de memória: +.br +\fIdict\fP * 7.5 (if \fIdict\fP <= 16 MiB); +.br +\fIdict\fP * 5.5 + 64 MiB (if \fIdict\fP > 16 MiB) +.TP +\fBhc4\fP +Cadeia de hashs com hashing de 2, 3 e 4 bytes +.br +Valor mínimo para \fInice\fP: 4 +.br +Uso de memória: +.br +\fIdict\fP * 7.5 (if \fIdict\fP <= 32 MiB); +.br +\fIdict\fP * 6.5 (if \fIdict\fP > 32 MiB) +.TP +\fBbt2\fP +Árvore binária com hashing de 2 bytes +.br +Valor mínimo para \fInice\fP: 2 +.br +Uso de memória: \fIdict\fP * 9.5 +.TP +\fBbt3\fP +Árvore binária com hashing de 2 e 3 bytes +.br +Valor mínimo para \fInice\fP: 3 +.br +Uso de memória: +.br +\fIdict\fP * 11.5 (if \fIdict\fP <= 16 MiB); +.br +\fIdict\fP * 9.5 + 64 MiB (if \fIdict\fP > 16 MiB) +.TP +\fBbt4\fP +Árvore binária com hashing de 2, 3 e 4 bytes +.br +Valor mínimo para \fInice\fP: 4 +.br +Uso de memória: +.br +\fIdict\fP * 11.5 (if \fIdict\fP <= 32 MiB); +.br +\fIdict\fP * 10.5 (if \fIdict\fP > 32 MiB) +.RE +.TP +\fBmode=\fP\fImodo\fP +O \fImodo\fP de compactação especifica o método para analisar os dados +produzidos pelo localizador de correspondência. Os \fImodos\fP suportados são +\fBfast\fP e \fBnormal\fP. O padrão é \fBfast\fP para \fIpredefinições\fP 0\(en3 e +\fBnormal\fP para \fIpredefinições\fP 4\(en9. +.IP "" +Normalmente, \fBfast\fP é usado com localizadores de correspondência cadeia de +hashs e \fBnormal\fP com localizadores de correspondência de árvore +binária. Isso também é o que os \fIpredefinições\fP fazem. +.TP +\fBnice=\fP\fInice\fP +Especifica o que é considerado um bom comprimento para uma +correspondência. Uma vez que uma correspondência de pelo menos \fInice\fP bytes +é encontrada, o algoritmo para de procurar correspondências possivelmente +melhores. +.IP "" +\fINice\fP pode ser 2\(en273 bytes. Valores mais altos tendem a fornecer melhor +taxa de compactação em detrimento da velocidade. O padrão depende do +\fIpredefinição\fP. +.TP +\fBdepth=\fP\fIprofundidade\fP +Especifica a profundidade máxima de pesquisa no localizador de +correspondências. O padrão é o valor especial de 0, que faz com que o +compressor determine um \fIprofundidade\fP razoável de \fImf\fP e \fInice\fP. +.IP "" +Uma \fIprofundidade\fP razoável para cadeias de hash é 4\(en100 e 16\(en1000 +para árvores binárias. Usar valores muito altos para \fIprofundidade\fP pode +tornar o codificador extremamente lento com alguns arquivos. Evite definir +\fIprofundidade\fP acima de 1000 a menos que você esteja preparado para +interromper a compactação caso ela esteja demorando muito. +.RE +.IP "" +Ao decodificar fluxos brutos (\fB\-\-format=raw\fP), o LZMA2 precisa apenas do +dicionário \fItamanho\fP. LZMA1 também precisa de \fIlc\fP, \fIlp\fP e \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIopções\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIopções\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIopções\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIopções\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIopções\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIopções\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIopções\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIopções\fP] +.PD +Adiciona um filtro de ramificação/chamada/salto (BCJ) à cadeia de +filtros. Esses filtros podem ser usados apenas como um filtro não último na +cadeia de filtros. +.IP "" +Um filtro BCJ converte endereços relativos no código de máquina em suas +contrapartes absolutas. Isso não altera o tamanho dos dados, mas aumenta a +redundância, o que pode ajudar o LZMA2 a produzir um arquivo \fB.xz\fP 0\(en15\ % menor. Os filtros BCJ são sempre reversíveis, portanto, usar um filtro BCJ +para o tipo errado de dados não causa nenhuma perda de dados, embora possa +piorar um pouco a taxa de compactação.Os filtros BCJ são muito rápidos e +usam uma quantidade insignificante de memória. +.IP "" +Esses filtros BCJ têm problemas conhecidos relacionados à taxa de +compactação: +.RS +.IP \(bu 3 +Alguns tipos de arquivos contendo código executável (por exemplo, arquivos +de objeto, bibliotecas estáticas e módulos do kernel do Linux) têm os +endereços nas instruções preenchidos com valores de preenchimento. Esses +filtros BCJ ainda vão fazer a conversão de endereço, o que vai piorar a +compactação desses arquivos. +.IP \(bu 3 +Se um filtro BCJ for aplicado em um arquivo, é possível que isso torne a +taxa de compactação pior do que não usar um filtro BCJ. Por exemplo, se +houver executáveis semelhantes ou mesmo idênticos, a filtragem provavelmente +tornará os arquivos menos semelhantes e, portanto, a compactação será +pior. O conteúdo de arquivos não executáveis no mesmo arquivo também pode +ser importante. Na prática tem que tentar com e sem filtro BCJ para ver qual +é melhor em cada situação. +.RE +.IP "" +Conjuntos de instruções diferentes têm alinhamento diferente: o arquivo +executável deve ser alinhado a um múltiplo desse valor nos dados de entrada +para fazer o filtro funcionar. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Filtro;Alinhamento;Observações +x86;1;x86 32 bits ou 64 bits +ARM;4; +ARM\-Thumb;2; +ARM64;4;Alinhamento de 4096 bytes +;;é melhor +PowerPC;4;Somente big endian +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Since the BCJ\-filtered data is usually compressed with LZMA2, the +compression ratio may be improved slightly if the LZMA2 options are set to +match the alignment of the selected BCJ filter. Examples: +.RS +.IP \(bu 3 +IA\-64 filter has 16\-byte alignment so \fBpb=4,lp=4,lc=0\fP is good with LZMA2 +(2^4=16). +.IP \(bu 3 +RISC\-V code has 2\-byte or 4\-byte alignment depending on whether the file +contains 16\-bit compressed instructions (the C extension). When 16\-bit +instructions are used, \fBpb=2,lp=1,lc=3\fP or \fBpb=1,lp=1,lc=3\fP is good. When +16\-bit instructions aren't present, \fBpb=2,lp=2,lc=2\fP is the best. +\fBreadelf \-h\fP can be used to check if "RVC" appears on the "Flags" line. +.IP \(bu 3 +ARM64 is always 4\-byte aligned so \fBpb=2,lp=2,lc=2\fP is the best. +.IP \(bu 3 +The x86 filter is an exception. It's usually good to stick to LZMA2's +defaults (\fBpb=2,lp=0,lc=3\fP) when compressing x86 executables. +.RE +.IP "" +Todos os filtros BCJ suportam as mesmas \fIopções\fP: +.RS +.TP +\fBstart=\fP\fIdeslocamento\fP +Especifica o \fIdeslocamento\fP inicial que é usado na conversão entre +endereços relativos e absolutos. O \fIdeslocamento\fP deve ser um múltiplo do +alinhamento do filtro (ver tabela acima). O padrão é zero. Na prática, o +padrão é bom; especificar um \fIdeslocamento\fP personalizado quase nunca é +útil. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIopções\fP] +Adiciona o filtro Delta à cadeia de filtros. O filtro Delta só pode ser +usado como filtro não\-último na cadeia de filtros. +.IP "" +Atualmente, apenas o cálculo simples de delta byte a byte é suportado. Pode +ser útil ao compactar, por exemplo, imagens bitmap não compactadas ou áudio +PCM não compactado. No entanto, algoritmos de propósito especial podem +fornecer resultados significativamente melhores do que Delta + LZMA2. Isso é +verdade especialmente com áudio, que compacta mais rápido e melhor, por +exemplo, com \fBflac\fP(1). +.IP "" +\fIOpções\fP suportadas: +.RS +.TP +\fBdist=\fP\fIdistância\fP +Especifica a \fIdistância\fP do cálculo delta em bytes. \fIdistância\fP deve ser +1\(en256. O padrão é 1. +.IP "" +Por exemplo, com \fBdist=2\fP e entrada de oito bytes A1 B1 A2 B3 A3 B5 A4 B7, +a saída será A1 B1 01 02 01 02 01 02. +.RE +. +.SS "Outras opções" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Suprime avisos e avisos. Especifique isso duas vezes para suprimir erros +também. Esta opção não tem efeito no status de saída. Ou seja, mesmo que um +aviso tenha sido suprimido, o status de saída para indicar um aviso ainda é +usado. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +Ser detalhado. Se o erro padrão estiver conectado a um terminal, \fBxz\fP +exibirá um indicador de progresso. Especifique \fB\-\-verbose\fP duas vezes dará +uma saída ainda mais detalhada. +.IP "" +O indicador de progresso mostra as seguintes informações: +.RS +.IP \(bu 3 +A porcentagem de conclusão é mostrada se o tamanho do arquivo de entrada for +conhecido. Ou seja, a porcentagem não pode ser mostrada em encadeamentos +(pipe). +.IP \(bu 3 +Quantidade de dados compactados produzidos (compactando) ou consumidos +(descompactando). +.IP \(bu 3 +Quantidade de dados não compactados consumidos (compactação) ou produzidos +(descompactação). +.IP \(bu 3 +Taxa de compactação, que é calculada dividindo a quantidade de dados +compactados processados até o momento pela quantidade de dados não +compactados processados até o momento. +.IP \(bu 3 +Velocidade de compactação ou descompactação. Isso é medido como a quantidade +de dados não compactados consumidos (compactação) ou produzidos +(descompactação) por segundo. É mostrado após alguns segundos desde que +\fBxz\fP começou a processar o arquivo. +.IP \(bu 3 +Tempo decorrido no formato M:SS ou H:MM:SS. +.IP \(bu 3 +O tempo restante estimado é mostrado apenas quando o tamanho do arquivo de +entrada é conhecido e alguns segundos já se passaram desde que \fBxz\fP começou +a processar o arquivo. A hora é mostrada em um formato menos preciso que +nunca tem dois pontos, por exemplo, 2 min 30 s. +.RE +.IP "" +Quando o erro padrão não é um terminal, \fB\-\-verbose\fP fará com que \fBxz\fP +imprima o nome do arquivo, tamanho compactado, tamanho não compactado, taxa +de compactação e possivelmente também a velocidade e o tempo decorrido em +uma única linha para o erro padrão após a compactação ou descompactando o +arquivo. A velocidade e o tempo decorrido são incluídos apenas quando a +operação leva pelo menos alguns segundos. Se a operação não foi concluída, +por exemplo, devido à interrupção do usuário, também é impressa a +porcentagem de conclusão se o tamanho do arquivo de entrada for conhecido. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Não define o status de saída como 2, mesmo que uma condição digna de um +aviso tenha sido detectada. Esta opção não afeta o nível de detalhamento, +portanto, tanto \fB\-\-quiet\fP quanto \fB\-\-no\-warn\fP devem ser usados para não +exibir avisos e não alterar o status de saída. +.TP +\fB\-\-robot\fP +Imprime mensagens em um formato analisável por máquina. Isso visa facilitar +a criação de frontends que desejam usar \fBxz\fP em vez de liblzma, o que pode +ser o caso de vários scripts. A saída com esta opção habilitada deve ser +estável em versões \fBxz\fP. Consulte a seção \fBMODO ROBÔ\fP para obter detalhes. +.TP +\fB\-\-info\-memory\fP +Exibe, em formato legível por humanos, quanta memória física (RAM) e quantos +threads de processador \fBxz\fP acredita que o sistema possui e os limites de +uso de memória para compactação e descompactação e saia com êxito. +.TP +\fB\-h\fP, \fB\-\-help\fP +Exibe uma mensagem de ajuda descrevendo as opções mais usadas e sai com +sucesso. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +Exibe uma mensagem de ajuda descrevendo todos os recursos de \fBxz\fP e sai com +sucesso +.TP +\fB\-V\fP, \fB\-\-version\fP +Exibe o número da versão de \fBxz\fP e liblzma em formato legível por +humanos. Para obter uma saída analisável por máquina, especifique \fB\-\-robot\fP +antes de \fB\-\-version\fP. +. +.SH "MODO ROBÔ" +The robot mode is activated with the \fB\-\-robot\fP option. It makes the output +of \fBxz\fP easier to parse by other programs. Currently \fB\-\-robot\fP is +supported only together with \fB\-\-list\fP, \fB\-\-filters\-help\fP, \fB\-\-info\-memory\fP, +and \fB\-\-version\fP. It will be supported for compression and decompression in +the future. +. +.SS "Modo lista" +\fBxz \-\-robot \-\-list\fP usa saída separada por tabulações. A primeira coluna de +cada linha possui uma string que indica o tipo de informação encontrada +naquela linha: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +Esta é sempre a primeira linha ao começar a listar um arquivo. A segunda +coluna na linha é o nome do arquivo. +.TP +\fBfile\fP +Esta linha contém informações gerais sobre o arquivo \fB.xz\fP. Esta linha é +sempre impressa após a linha \fBname\fP. +.TP +\fBstream\fP +Este tipo de linha é usado somente quando \fB\-\-verbose\fP foi +especificado. Existem tantas linhas de \fBstream\fP quanto fluxos no arquivo +\&\fB.xz\fP. +.TP +\fBblock\fP +Este tipo de linha é usado somente quando \fB\-\-verbose\fP foi +especificado. Existem tantas linhas \fBblock\fP quanto blocos no arquivo +\&\fB.xz\fP. As linhas \fBblock\fP são mostradas após todas as linhas \fBstream\fP; +diferentes tipos de linha não são intercalados. +.TP +\fBsummary\fP +Este tipo de linha é usado apenas quando \fB\-\-verbose\fP foi especificado duas +vezes. Esta linha é impressa após todas as linhas de \fBblock\fP. Assim como a +linha \fBarquivo\fP, a linha \fBsummary\fP contém informações gerais sobre o +arquivo \fB.xz\fP. +.TP +\fBtotals\fP +Esta linha é sempre a última linha da saída da lista. Ele mostra as +contagens totais e tamanhos. +.PP +As colunas das linhas \fBfile\fP: +.PD 0 +.RS +.IP 2. 4 +Número de fluxos no arquivo +.IP 3. 4 +Número total de blocos no(s) fluxo(s) +.IP 4. 4 +Tamanho compactado do arquivo +.IP 5. 4 +Uncompressed size of the file +.IP 6. 4 +Taxa de compactação, por exemplo, \fB0.123\fP. Se a proporção for superior a +9.999, serão exibidos três traços (\fB\-\-\-\fP) em vez da proporção. +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Lista separada por vírgulas de nomes de verificação de integridade. As +seguintes strings são usadas para os tipos de verificação conhecidos: +\fBNone\fP, \fBCRC32\fP, \fBCRC64\fP e \fBSHA\-256\fP. Para tipos de verificações +desconhecidos, \fBUnknown\-\fP\fIN\fP é usado, onde \fIN\fP é o ID do cheque como um +número decimal (um ou dois dígitos). +.IP 8. 4 +Tamanho total do preenchimento de fluxo no arquivo +.RE +.PD +.PP +As colunas das linhas \fBstream\fP: +.PD 0 +.RS +.IP 2. 4 +Número do fluxo (o primeiro fluxo é 1) +.IP 3. 4 +Número de blocos no fluxo +.IP 4. 4 +Deslocamento inicial compactado +.IP 5. 4 +Deslocamento inicial descompactado +.IP 6. 4 +Tamanho compactado (não inclui preenchimento de fluxo) +.IP 7. 4 +Tamanho descompactado +.IP 8. 4 +Taxa de compactação +.IP 9. 4 +Nome da verificação de integridade +.IP 10. 4 +Tamanho do preenchimento do fluxo +.RE +.PD +.PP +As colunas das linhas \fBblock\fP: +.PD 0 +.RS +.IP 2. 4 +Número do fluxo que contém este bloco +.IP 3. 4 +Número do bloco relativo ao início do fluxo (o primeiro bloco é 1) +.IP 4. 4 +Número do bloco relativo ao início do arquivo +.IP 5. 4 +Deslocamento inicial compactado em relação ao início do arquivo +.IP 6. 4 +Deslocamento inicial descompactado em relação ao início do arquivo +.IP 7. 4 +Tamanho total compactado do bloco (inclui cabeçalhos) +.IP 8. 4 +Tamanho descompactado +.IP 9. 4 +Taxa de compactação +.IP 10. 4 +Nome da verificação de integridade +.RE +.PD +.PP +Se \fB\-\-verbose\fP for especificado duas vezes, colunas adicionais serão +incluídas nas linhas \fBblock\fP. Eles não são exibidos com um único +\fB\-\-verbose\fP, porque obter essas informações requer muitas buscas e, +portanto, pode ser lento: +.PD 0 +.RS +.IP 11. 4 +Valor da verificação de integridade em hexadecimal +.IP 12. 4 +Tamanho do cabeçalho do bloco +.IP 13. 4 +Sinalizadores de bloco: \fBc\fP indica que o tamanho compactado está presente e +\fBu\fP indica que o tamanho não compactado está presente. Se o sinalizador não +estiver definido, um traço (\fB\-\fP) será exibido para manter o comprimento da +string fixo. Novos sinalizadores podem ser adicionados ao final da string no +futuro. +.IP 14. 4 +Tamanho dos dados reais compactados no bloco (isso exclui o cabeçalho do +bloco, o preenchimento do bloco e os campos de verificação) +.IP 15. 4 +Quantidade de memória (em bytes) necessária para descompactar este bloco com +esta versão \fBxz\fP +.IP 16. 4 +Cadeia de filtro. Observe que a maioria das opções usadas no momento da +compactação não pode ser conhecida, pois apenas as opções necessárias para a +descompactação são armazenadas nos cabeçalhos \fB.xz\fP. +.RE +.PD +.PP +As colunas das linhas \fBsummary\fP: +.PD 0 +.RS +.IP 2. 4 +Quantidade de memória (em bytes) necessária para descompactar este arquivo +com esta versão do \fBxz\fP +.IP 3. 4 +\fByes\fP ou \fBno\fP indicando se todos os cabeçalhos de bloco têm tamanho +compactado e tamanho não compactado armazenados neles +.PP +\fIDesde\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Versão mínima do \fBxz\fP necessária para descompactar o arquivo +.RE +.PD +.PP +As colunas da linha \fBtotals\fP: +.PD 0 +.RS +.IP 2. 4 +Número de fluxos +.IP 3. 4 +Número de blocos +.IP 4. 4 +Tamanho compactado +.IP 5. 4 +Tamanho descompactado +.IP 6. 4 +Taxa de compactação média +.IP 7. 4 +Lista separada por vírgulas de nomes de verificação de integridade que +estavam presentes nos arquivos +.IP 8. 4 +Tamanho do preenchimento do fluxo +.IP 9. 4 +Número de arquivos. Isso está aqui para manter a ordem das colunas +anteriores a mesma das linhas \fBfile\fP. +.PD +.RE +.PP +Se \fB\-\-verbose\fP for especificado duas vezes, colunas adicionais serão +incluídas na linha \fBtotals\fP: +.PD 0 +.RS +.IP 10. 4 +Quantidade máxima de memória (em bytes) necessária para descompactar os +arquivos com esta versão do \fBxz\fP +.IP 11. 4 +\fByes\fP ou \fBno\fP indicando se todos os cabeçalhos de bloco têm tamanho +compactado e tamanho não compactado armazenados neles +.PP +\fIDesde\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Versão mínima do \fBxz\fP necessária para descompactar o arquivo +.RE +.PD +.PP +Versões futuras podem adicionar novos tipos de linha e novas colunas podem +ser adicionadas aos tipos de linha existentes, mas as colunas existentes não +serão alteradas. +. +.SS "Filters help" +\fBxz \-\-robot \-\-filters\-help\fP prints the supported filters in the following +format: +.PP +\fIfilter\fP\fB:\fP\fIoption\fP\fB=<\fP\fIvalue\fP\fB>,\fP\fIoption\fP\fB=<\fP\fIvalue\fP\fB>\fP... +.TP +\fIfilter\fP +Name of the filter +.TP +\fIoption\fP +Name of a filter specific option +.TP +\fIvalue\fP +Numeric \fIvalue\fP ranges appear as \fB<\fP\fImin\fP\fB\-\fP\fImax\fP\fB>\fP. String +\fIvalue\fP choices are shown within \fB< >\fP and separated by a \fB|\fP +character. +.PP +Each filter is printed on its own line. +. +.SS "Informações de limite de memória" +\fBxz \-\-robot \-\-info\-memory\fP prints a single line with multiple tab\-separated +columns: +.IP 1. 4 +Quantidade total de memória física (RAM) em bytes. +.IP 2. 4 +Limite de uso de memória para compactação em bytes +(\fB\-\-memlimit\-compress\fP). Um valor especial de \fB0\fP indica a configuração +padrão que para o modo de thread única é o mesmo que sem limite. +.IP 3. 4 +Limite de uso de memória para descompactação em bytes +(\fB\-\-memlimit\-decompress\fP). Um valor especial de \fB0\fP indica a configuração +padrão que para o modo de thread única é o mesmo que sem limite. +.IP 4. 4 +Desde \fBxz\fP 5.3.4alpha: Uso de memória para descompactação com várias thread +em bytes (\fB\-\-memlimit\-mt\-decompress\fP). Isso nunca é zero porque um valor +padrão específico do sistema mostrado na coluna 5 é usado se nenhum limite +for especificado explicitamente. Isso também nunca é maior que o valor na +coluna 3, mesmo que um valor maior tenha sido especificado com +\fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +Desde \fBxz\fP 5.3.4alpha: Um limite de uso de memória padrão específico do +sistema que é usado para limitar o número de threads ao compactar com um +número automático de threads (\fB\-\-threads=0\fP) e nenhum limite de uso de +memória foi especificado (\fB\-\-memlimit\-compress\fP). Isso também é usado como +o valor padrão para \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +Desde \fBxz\fP 5.3.4alpha: Número de threads de processador disponíveis. +.PP +No futuro, a saída de \fBxz \-\-robot \-\-info\-memory\fP pode ter mais colunas, mas +nunca mais do que uma única linha. +. +.SS Versão +\fBxz \-\-robot \-\-version\fP prints the version number of \fBxz\fP and liblzma in +the following format: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Versão principal. +.TP +\fIYYY\fP +Versão menor. Números pares são estáveis. Os números ímpares são versões +alfa ou beta. +.TP +\fIZZZ\fP +Nível de patch para versões estáveis ou apenas um contador para versões de +desenvolvimento. +.TP +\fIS\fP +Estabilidade. 0 é alfa, 1 é beta e 2 é estável. \fIS\fP deve ser sempre 2 +quando \fIYYY\fP for par. +.PP +\fIXYYYZZZS\fP são iguais em ambas as linhas se \fBxz\fP e liblzma forem da mesma +versão do XZ Utils. +.PP +Exemplos: 4.999.9beta é \fB49990091\fP e 5.0.0 é \fB50000002\fP. +. +.SH "STATUS DE SAÍDA" +.TP +\fB0\fP +Está tudo bem. +.TP +\fB1\fP +Ocorreu um erro. +.TP +\fB2\fP +Algo digno de um aviso ocorreu, mas ocorreu nenhum erro real. +.PP +Observações (não avisos ou erros) impressas no erro padrão não afetam o +status de saída. +. +.SH AMBIENTE +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP analisa listas de opções separadas por espaços das variáveis de +ambiente \fBXZ_DEFAULTS\fP e \fBXZ_OPT\fP, nesta ordem, antes de analisar as +opções da linha de comando. Observe que apenas as opções são analisadas a +partir das variáveis de ambiente; todas as não opções são silenciosamente +ignoradas. A análise é feita com \fBgetopt_long\fP(3) que também é usado para +os argumentos da linha de comando. +.PP +\fBWarning:\fP By setting these environment variables, one is effectively +modifying programs and scripts that run \fBxz\fP. Most of the time it is safe +to set memory usage limits, number of threads, and compression options via +the environment variables. However, some options can break scripts. An +obvious example is \fB\-\-help\fP which makes \fBxz\fP show the help text instead of +compressing or decompressing a file. More subtle examples are \fB\-\-quiet\fP +and \fB\-\-verbose\fP. In many cases it works well to enable the progress +indicator using \fB\-\-verbose\fP, but in some situations the extra messages +create problems. The verbosity level also affects the behavior of +\fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +User\-specific or system\-wide default options. Typically this is set in a +shell initialization script to enable \fBxz\fP's memory usage limiter by +default or set the default number of threads. Excluding shell +initialization scripts and similar special cases, scripts should never set +or unset \fBXZ_DEFAULTS\fP. +.TP +\fBXZ_OPT\fP +Isso é para passar opções para \fBxz\fP quando não é possível definir as opções +diretamente na linha de comando \fBxz\fP. Este é o caso quando \fBxz\fP é +executado por um script ou ferramenta, por exemplo, GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +Os scripts podem usar \fBXZ_OPT\fP, por exemplo, para definir opções de +compactação padrão específicas do script. Ainda é recomendável permitir que +os usuários substituam \fBXZ_OPT\fP se isso for razoável. Por exemplo, em +scripts \fBsh\fP(1) pode\-se usar algo assim: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "COMPATIBILIDADE COM LZMA UTILS" +A sintaxe da linha de comando do \fBxz\fP é praticamente um superconjunto de +\fBlzma\fP, \fBunlzma\fP e \fBlzcat\fP conforme encontrado no LZMA Utils 4.32.x. Na +maioria dos casos, é possível substituir LZMA Utils por XZ Utils sem +interromper os scripts existentes. Existem algumas incompatibilidades, +porém, que às vezes podem causar problemas. +. +.SS "Níveis de predefinição de compactação" +A numeração das predefinições de nível de compactação não é idêntica em +\fBxz\fP e LZMA Utils. A diferença mais importante é como os tamanhos dos +dicionários são mapeados para diferentes predefinições. O tamanho do +dicionário é aproximadamente igual ao uso de memória do descompactador. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Nível;xz;LZMA Utils +\-0;256 KiB;N/D +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +As diferenças de tamanho do dicionário também afetam o uso da memória do +compressor, mas existem algumas outras diferenças entre LZMA Utils e XZ +Utils, que tornam a diferença ainda maior: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Nível;xz;LZMA Utils 4.32.x +\-0;3 MiB;N/D +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +O nível de predefinição padrão no LZMA Utils é \fB\-7\fP enquanto no XZ Utils é +\fB\-6\fP, então ambos usam um dicionário de 8 MiB por padrão. +. +.SS "Arquivos .lzma em um fluxo versus sem ser em um fluxo" +O tamanho descompactado do arquivo pode ser armazenado no cabeçalho de +\&\fB.lzma\fP. O LZMA Utils faz isso ao compactar arquivos comuns. A alternativa +é marcar que o tamanho não compactado é desconhecido e usar o marcador de +fim de carga útil para indicar onde o descompactador deve parar. O LZMA +Utils usa este método quando o tamanho não compactado não é conhecido, como +é o caso, por exemplo, de encadeamentos (pipes). +.PP +\fBxz\fP oferece suporte à descompactação de arquivos \fB.lzma\fP com ou sem +marcador de fim de carga útil, mas todos os arquivos \fB.lzma\fP criados por +\fBxz\fP usarão marcador de fim de carga útil e terão o tamanho descompactado +marcado como desconhecido no cabeçalho de \fB.lzma\fP. Isso pode ser um +problema em algumas situações incomuns. Por exemplo, um descompactador de +\&\fB.lzma\fP em um dispositivo embarcado pode funcionar apenas com arquivos que +tenham tamanho descompactado conhecido. Se você encontrar esse problema, +precisará usar o LZMA Utils ou o LZMA SDK para criar arquivos \fB.lzma\fP com +tamanho descompactado conhecido. +. +.SS "Arquivos .lzma não suportados" +O formato \fB.lzma\fP permite valores \fIlc\fP até 8 e valores \fIlp\fP até 4. LZMA +Utils pode descompactar arquivos com qualquer \fIlc\fP e \fIlp\fP, mas sempre cria +arquivos com \fBlc=3\fP e \fBlp=0\fP. Criar arquivos com outros \fIlc\fP e \fIlp\fP é +possível com \fBxz\fP e com LZMA SDK. +.PP +A implementação do filtro LZMA1 em liblzma requer que a soma de \fIlc\fP e +\fIlp\fP não exceda 4. Assim, arquivos \fB.lzma\fP, que excedam esta limitação, +não podem ser descompactados com \fBxz\fP. +.PP +LZMA Utils cria apenas arquivos \fB.lzma\fP que possuem um tamanho de +dicionário de 2^\fIn\fP (uma potência de 2), mas aceita arquivos com qualquer +tamanho de dicionário. liblzma aceita apenas arquivos \fB.lzma\fP que tenham um +tamanho de dicionário de 2^\fIn\fP ou 2^\fIn\fP + 2^(\fIn\fP\-1). Isso é para diminuir +os falsos positivos ao detectar arquivos \fB.lzma\fP. +.PP +Essas limitações não devem ser um problema na prática, já que praticamente +todos os arquivos \fB.lzma\fP foram compactados com configurações que o liblzma +aceitará. +. +.SS "Lixo à direita" +Ao descompactar, o LZMA Utils silenciosamente ignora tudo após o primeiro +fluxo \fB.lzma\fP. Na maioria das situações, isso é um bug. Isso também +significa que o LZMA Utils não oferece suporte a descompactação de arquivos +\&\fB.lzma\fP concatenados. +.PP +Se houver dados restantes após o primeiro fluxo de \fB.lzma\fP, \fBxz\fP considera +o arquivo corrompido, a menos que \fB\-\-single\-stream\fP tenha sido usado. Isso +pode quebrar scripts obscuros que presumiram que o lixo à direita é +ignorado. +. +.SH NOTAS +. +.SS "A saída compactada pode variar" +A saída compactada exata produzida a partir do mesmo arquivo de entrada não +compactado pode variar entre as versões do XZ Utils, mesmo se as opções de +compactação forem idênticas. Isso ocorre porque o codificador pode ser +aprimorado (compactação mais rápida ou melhor) sem afetar o formato do +arquivo. A saída pode variar mesmo entre diferentes compilações da mesma +versão do XZ Utils, se diferentes opções de compilação forem usadas. +.PP +A informação acima significa que, uma vez que \fB\-\-rsyncable\fP tenha sido +implementado, os arquivos resultantes não serão necessariamente +"rsyncáveis", a menos que os arquivos antigos e novos tenham sido +compactados com a mesma versão xz. Esse problema pode ser corrigido se uma +parte da implementação do codificador for congelada para manter a saída de +rsyncable estável nas versões do xz. +. +.SS "Descompactadores .xz embarcados" +As implementações do descompactador \fB.xz\fP embarcados, como o XZ Embedded, +não oferecem necessariamente suporte a arquivos criados com tipos de +\fIverificações\fP de integridade diferentes de \fBnone\fP e \fBcrc32\fP. Como o +padrão é \fB\-\-check=crc64\fP, você deve usar \fB\-\-check=none\fP ou +\fB\-\-check=crc32\fP ao criar arquivos para sistemas embarcados. +.PP +Fora dos sistemas embarcados, todos os descompactadores de formato \fB.xz\fP +oferecem suporte a todos os tipos de \fIverificação\fP ou, pelo menos, são +capazes de descompactar o arquivo sem verificar a verificação de integridade +se a \fIverificação\fP específica não for suportada. +.PP +XZ Embedded oferece suporte a filtros BCJ, mas apenas com o deslocamento +inicial padrão. +. +.SH EXEMPLOS +. +.SS Básico +Compactar o arquivo \fIfoo\fP em \fIfoo.xz\fP usando o nível de compactação padrão +(\fB\-6\fP) e remover \fIfoo\fP se a compactação for bem\-sucedida: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +Descompactar \fIbar.xz\fP em \fIbar\fP e não remover \fIbar.xz\fP mesmo se a +descompactação for bem\-sucedida: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +Criar \fIbaz.tar.xz\fP com a predefinição \fB\-4e\fP (\fB\-4 \-\-extreme\fP), que é mais +lenta que o padrão \fB\-6\fP, mas precisa de menos memória para compactação e +descompactação (48 \ MiB e 5\ MiB, respectivamente): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +Uma mistura de arquivos compactados e descompactados pode ser descompactada +para a saída padrão com um único comando: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Compactação paralela de muitos arquivos" +No GNU e *BSD, \fBfind\fP(1) e \fBxargs\fP(1) podem ser usados para paralelizar a +compactação de muitos arquivos: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +A opção \fB\-P\fP para \fBxargs\fP(1) define o número de processos paralelos do +\fBxz\fP. O melhor valor para a opção \fB\-n\fP depende de quantos arquivos devem +ser compactados. Se houver apenas alguns arquivos, o valor provavelmente +deve ser 1; com dezenas de milhares de arquivos, 100 ou até mais podem ser +apropriados para reduzir o número de processos de \fBxz\fP que \fBxargs\fP(1) +eventualmente criará. +.PP +A opção \fB\-T1\fP para \fBxz\fP existe para forçá\-lo ao modo de thread única, +porque \fBxargs\fP(1) é usado para controlar a quantidade de paralelização. +. +.SS "Modo robô" +Calcular quantos bytes foram salvos no total depois de compactar vários +arquivos: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Um script pode querer saber que está usando \fBxz\fP novo o suficiente. O +seguinte script \fBsh\fP(1) verifica se o número da versão da ferramenta \fBxz\fP +é pelo menos 5.0.0. Este método é compatível com versões beta antigas, que +não suportavam a opção \fB\-\-robot\fP: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Your xz is too old." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Definir um limite de uso de memória para descompactação usando \fBXZ_OPT\fP, +mas se um limite já tiver sido definido, não o aumentar: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Cadeias de filtro de compressor personalizadas" +O uso mais simples para cadeias de filtro personalizadas é personalizar uma +predefinição LZMA2. Isso pode ser útil, porque as predefinições abrangem +apenas um subconjunto das combinações potencialmente úteis de configurações +de compactação. +.PP +As colunas CompCPU das tabelas das descrições das opções \fB\-0\fP ... \fB\-9\fP e +\fB\-\-extreme\fP são úteis ao personalizar as predefinições LZMA2. Aqui estão as +partes relevantes coletadas dessas duas tabelas: +.RS +.PP +.TS +tab(;); +c c +n n. +Predefinição;CompCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +Se você sabe que um arquivo requer um dicionário um tanto grande (por +exemplo, 32\ MiB) para compactar bem, mas deseja comprimi\-lo mais +rapidamente do que \fBxz \-8\fP faria, uma predefinição com um valor CompCPU +baixo (por exemplo, 1) pode ser modificado para usar um dicionário maior: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +Com certos arquivos, o comando acima pode ser mais rápido que \fBxz \-6\fP +enquanto compacta significativamente melhor. No entanto, deve\-se enfatizar +que apenas alguns arquivos se beneficiam de um grande dicionário, mantendo o +valor CompCPU baixo. A situação mais óbvia, onde um grande dicionário pode +ajudar muito, é um arquivo contendo arquivos muito semelhantes de pelo menos +alguns megabytes cada. O tamanho do dicionário deve ser significativamente +maior do que qualquer arquivo individual para permitir que o LZMA2 aproveite +ao máximo as semelhanças entre arquivos consecutivos. +.PP +Se o uso muito alto de memória do compactador e do descompactador for bom e +o arquivo que está sendo compactado tiver pelo menos várias centenas de +megabytes, pode ser útil usar um dicionário ainda maior do que os 64 MiB que +o \fBxz \-9\fP usaria: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +Usar \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP) como no exemplo acima pode ser útil +para ver os requisitos de memória do compactador e do +descompactador. Lembre\-se que usar um dicionário maior que o tamanho do +arquivo descompactado é desperdício de memória, então o comando acima não é +útil para arquivos pequenos. +.PP +Às vezes, o tempo de compactação não importa, mas o uso de memória do +descompactador deve ser mantido baixo, por exemplo, para possibilitar a +descompactação do arquivo em um sistema embarcado. O comando a seguir usa +\fB\-6e\fP (\fB\-6 \-\-extreme\fP) como base e define o dicionário como apenas 64\ KiB. O arquivo resultante pode ser descompactado com XZ Embedded (é por isso +que existe \fB\-\-check=crc32\fP) usando cerca de 100\ KiB de memória. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +Se você deseja espremer o máximo de bytes possível, ajustar o número de bits +de contexto literal (\fIlc\fP) e o número de bits de posição (\fIpb\fP) às vezes +pode ajudar. Ajustar o número de bits de posição literal (\fIlp\fP) também pode +ajudar, mas geralmente \fIlc\fP e \fIpb\fP são mais importantes. Por exemplo, um +arquivo de código\-fonte contém principalmente texto US\-ASCII, então algo +como o seguinte pode fornecer um arquivo ligeiramente (como 0,1\ %) menor +que \fBxz \-6e\fP (tente também sem \fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +O uso de outro filtro junto com o LZMA2 pode melhorar a compactação com +determinados tipos de arquivo. Por exemplo, para compactar uma biblioteca +compartilhada x86\-32 ou x86\-64 usando o filtro x86 BCJ: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +Observe que a ordem das opções de filtro é significativa. Se \fB\-\-x86\fP for +especificado após \fB\-\-lzma2\fP, \fBxz\fP dará um erro, porque não pode haver +nenhum filtro após LZMA2 e também porque o filtro x86 BCJ não pode ser usado +como o último filtro em a corrente. +.PP +O filtro Delta junto com LZMA2 pode dar bons resultados com imagens +bitmap. Ele geralmente deve superar o PNG, que possui alguns filtros mais +avançados do que o delta simples, mas usa Deflate para a compactação real. +.PP +A imagem deve ser salva em formato não compactado, por exemplo, como TIFF +não compactado. O parâmetro de distância do filtro Delta é definido para +corresponder ao número de bytes por pixel na imagem. Por exemplo, bitmap RGB +de 24 bits precisa de \fBdist=3\fP, e também é bom passar \fBpb=0\fP para LZMA2 +para acomodar o alinhamento de três bytes: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +Se várias imagens foram colocadas em um único arquivo (por exemplo, +\&\fB.tar\fP), o filtro Delta também funcionará, desde que todas as imagens +tenham o mesmo número de bytes por pixel. +. +.SH "VEJA TAMBÉM" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzdec.1 new file mode 100644 index 0000000000..996139d902 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzdec.1 @@ -0,0 +1,87 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Brazilian Portuguese translations for xz package +.\" Traduções em português brasileiro para o pacote xz. +.\" Rafael Fontenelle , 2022-2023. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 2024\-04\-08 Tukaani "XZ Utils" +.SH NOME +xzdec, lzmadec \- Pequenos descompactadores .xz e .lzma +.SH SINOPSE +\fBxzdec\fP [\fIopção...\fP] [\fIarquivo...\fP] +.br +\fBlzmadec\fP [\fIopção...\fP] [\fIarquivo...\fP] +.SH DESCRIÇÃO +\fBxzdec\fP é uma ferramenta de descompactação baseada em liblzma somente para +arquivos \fB.xz\fP (e somente \fB.xz\fP). \fBxzdec\fP destina\-se a funcionar como um +substituto para \fBxz\fP(1) nas situações mais comuns em que um script foi +escrito para usar \fBxz \-\-decompress \-\-stdout\fP (e possivelmente alguns outras +opções comumente usadas) para descompactar arquivos \fB.xz\fP. \fBlzmadec\fP é +idêntico a \fBxzdec\fP exceto que \fBlzmadec\fP tem suporte a arquivos \fB.lzma\fP em +vez de arquivos \fB.xz\fP. +.PP +Para reduzir o tamanho do executável, \fBxzdec\fP não tem suporte ao uso de +várias threads ou a localização, e não lê opções de variáveis de ambiente +\fBXZ_DEFAULTS\fP e \fBXZ_OPT\fP. \fBxzdec\fP não tem suporte à exibição de +informações de progresso intermediárias: enviar \fBSIGINFO\fP para \fBxzdec\fP não +faz nada, mas enviar \fBSIGUSR1\fP encerra o processo em vez de exibir +informações de progresso. +.SH OPÇÕES +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +Ignorada para compatibilidade \fBxz\fP(1). \fBxzdec\fP tem suporte a apenas +descompactação. +.TP +\fB\-k\fP, \fB\-\-keep\fP +Ignorada para compatibilidade \fBxz\fP(1). \fBxzdec\fP nunca cria ou remove +quaisquer arquivos. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Ignorada para compatibilidade \fBxz\fP(1). \fBxzdec\fP sempre grava os dados +descompactados para a saída padrão. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Especificar isso uma vez não faz nada, pois \fBxzdec\fP nunca exibe nenhum +aviso ou notificação. Especifique isso duas vezes para suprimir erros. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Ignorada para compatibilidade \fBxz\fP(1). \fBxzdec\fP nunca usa o status de saída +2. +.TP +\fB\-h\fP, \fB\-\-help\fP +Exibe uma mensagem de ajuda e sai com sucesso. +.TP +\fB\-V\fP, \fB\-\-version\fP +Mostra o número da versão do \fBxzdec\fP e liblzma. +.SH "STATUS DE SAÍDA" +.TP +\fB0\fP +Correu tudo bem. +.TP +\fB1\fP +Ocorreu um erro. +.PP +\fBxzdec\fP não possui nenhuma mensagem de aviso como o \fBxz\fP(1), portanto, o +status de saída 2 não é usado por \fBxzdec\fP. +.SH NOTAS +Use \fBxz\fP(1) em vez de \fBxzdec\fP ou \fBlzmadec\fP para uso diário +normal. \fBxzdec\fP ou \fBlzmadec\fP destinam\-se apenas a situações em que é +importante ter um descompactador menor do que o \fBxz\fP(1) completo. +.PP +\fBxzdec\fP e \fBlzmadec\fP não são realmente tão pequenos. O tamanho pode ser +reduzido ainda mais eliminando recursos do liblzma no tempo de compilação, +mas isso geralmente não deve ser feito para executáveis distribuídos em +distribuições típicas de sistemas operacionais não embarcados. Se você +precisa de um descompactador \fB.xz\fP realmente pequeno, considere usar o XZ +Embedded. +.SH "VEJA TAMBÉM" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzless.1 new file mode 100644 index 0000000000..a39dabb94a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/pt_BR/xzless.1 @@ -0,0 +1,48 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Brazilian Portuguese translations for xz package +.\" Traduções em português brasileiro para o pacote xz. +.\" Rafael Fontenelle , 2022-2023. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 2025\-03\-06 Tukaani "XZ Utils" +.SH NOME +xzless, lzless \- visualiza arquivos (texto) compactados em xz ou lzma +.SH SINOPSE +\fBxzless\fP [\fIarquivo\fP...] +.br +\fBlzless\fP [\fIfile\fP...] (DEPRECATED) +.SH DESCRIÇÃO +\fBxzless\fP is a filter that displays text from compressed files to a +terminal. Files supported by \fBxz\fP(1) are decompressed; other files are +assumed to be in uncompressed form already. If no \fIfiles\fP are given, +\fBxzless\fP reads from standard input. +.PP +\fBxzless\fP usa \fBless\fP(1) para apresentar sua saída. Ao contrário de +\fBxzmore\fP, sua escolha de pager não pode ser alterada pela configuração de +uma variável de ambiente. Os comandos são baseados em \fBmore\fP(1) e \fBvi\fP(1) +e permitem movimento e busca para frente e para trás. Consulte o manual +\fBless\fP(1) para obter mais informações. +.PP +The command named \fBlzless\fP is provided for backward compatibility with LZMA +Utils. It is deprecated and will be removed in a future version. +.SH AMBIENTE +.TP +\fBLESSMETACHARS\fP +Uma lista de caracteres especiais para o shell. Definido por \fBxzless\fP a +menos que já esteja definido no ambiente. +.TP +\fBLESSOPEN\fP +Defina como uma linha de comando para invocar o descompactador \fBxz\fP(1) para +pré\-processar os arquivos de entrada para \fBless\fP(1). +.SH "VEJA TAMBÉM" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ro/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/ro/lzmainfo.1 new file mode 100644 index 0000000000..7a533bd6e3 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ro/lzmainfo.1 @@ -0,0 +1,57 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Romanian translation for xz-man. +.\" Mesajele în limba română pentru manualul pachetului XZ Utils. +.\" Remus-Gabriel Chelu , 2022 - 2025. +.\" Cronologia traducerii fișierului „xz-man”: +.\" Traducerea inițială, făcută de R-GC, pentru versiunea xz-man 5.4.0-pre1. +.\" Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +.\" Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +.\" Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025. +.\" Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 30.06.2013 Tukaani "Utilități XZ" +.SH NUME +lzmainfo \- afișează informațiile stocate în antetul fișierului .lzma +.SH REZUMAT +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIfișier...\fP] +.SH DESCRIERE +\fBlzmainfo\fP afișează informațiile stocate în antetul fișierului +\&\fB.lzma\fP. Citește primii 13 octeți din \fIfișierul\fP specificat, decodifică +antetul și îl afișează la ieșirea standard în format care poate fi citit de +om. Dacă nu sunt date \fIfișiere\fP sau dacă \fIfișier\fP este \fB\-\fP, se citește +intrarea standard. +.PP +De obicei, cele mai interesante informații sunt dimensiunea necomprimată și +dimensiunea dicționarului. Dimensiunea necomprimată poate fi afișată numai +dacă fișierul este în varianta formatului \fB.lzma\fP netransmis în +flux. Cantitatea de memorie necesară pentru a decomprima fișierul este de +câteva zeci de kiloocteți plus dimensiunea dicționarului. +.PP +\fBlzmainfo\fP este inclus în XZ Utils în primul rând pentru compatibilitatea +cu LZMA Utils. +.SH "STARE DE IEȘIRE" +.TP +\fB0\fP +Totul este bine. +.TP +\fB1\fP +A apărut o eroare. +.SH ERORI +\fBlzmainfo\fP folosește sufixul \fBMB\fP în timp ce sufixul corect ar fi \fBMiB\fP +(2^20 octeți). Acest lucru este pentru a menține ieșirea compatibilă cu LZMA +Utils. +.SH "CONSULTAȚI ȘI" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ro/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/ro/xz.1 new file mode 100644 index 0000000000..1555445592 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ro/xz.1 @@ -0,0 +1,2111 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Romanian translation for xz-man. +.\" Mesajele în limba română pentru manualul pachetului XZ Utils. +.\" Remus-Gabriel Chelu , 2022 - 2025. +.\" Cronologia traducerii fișierului „xz-man”: +.\" Traducerea inițială, făcută de R-GC, pentru versiunea xz-man 5.4.0-pre1. +.\" Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +.\" Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +.\" Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025. +.\" Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 "8 martie 2025" Tukaani "Utilități XZ" +. +.SH NUME +xz, unxz, xzcat, lzma, unlzma, lzcat \- Comprimă sau decomprimă fișiere .xz +și .lzma +. +.SH REZUMAT +\fBxz\fP [\fIopțiune...\fP] [\fIfișier...\fP] +. +.SH "ALIAS COMENZI" +\fBunxz\fP este echivalent cu \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP este echivalent cu \fBxz \-\-decompress \-\-stdout\fP. +.br +\fBlzma\fP este echivalent cu \fBxz \-\-format=lzma\fP. +.br +\fBunlzma\fP este echivalent cu \fBxz \-\-format=lzma \-\-decompress\fP. +.br +\fBlzcat\fP este echivalent cu \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP. +.PP +Când scrieți scripturi care trebuie să decomprime fișiere, este recomandat +să folosiți întotdeauna comanda \fBxz\fP cu argumentele adecvate (\fBxz \-d\fP sau +\fBxz \-dc\fP) în loc de comenzile \fBunxz\fP și \fBxzcat\fP. +. +.SH DESCRIERE +\fBxz\fP este un instrument de comprimare a datelor de uz general cu sintaxă de +linie de comandă similară cu \fBgzip\fP(1) și \fBbzip2\fP(1). Formatul de fișier +nativ este formatul \fB.xz\fP, dar formatul vechi \fB.lzma\fP folosit de LZMA +Utils și fluxurile comprimate brute fără anteturi de format container sunt +de asemenea acceptate. În plus, este acceptată decomprimarea formatului +\&\fB.lz\fP folosit de \fBlzip\fP. +.PP +\fBxz\fP comprimă sau decomprimă fiecare \fIfișier\fP în funcție de modul de +operare selectat. Dacă nu sunt date \fIfișiere\fP sau \fIfișier\fP este \fB\-\fP, +\fBxz\fP citește de la intrarea standard și scrie datele procesate la ieșirea +standard. \fBxz\fP va refuza (afișează o eroare și omite \fIfișier\fP) să scrie +date comprimate la ieșirea standard dacă este un terminal. În mod similar, +\fBxz\fP va refuza să citească datele comprimate de la intrarea standard dacă +este un terminal. +.PP +Cu excepția cazului în care este specificată opțiunea \fB\-\-stdout\fP, +\fIfișierele\fP altele decât \fB\-\fP sunt scrise într\-un fișier nou al cărui nume +este derivat din numele \fIfișierului\fP sursă: +.IP \(bu 3 +La comprimare, sufixul formatului de fișier țintă (\fB.xz\fP sau \fB.lzma\fP) este +atașat la numele fișierului sursă pentru a se obține numele fișierului +țintă. +.IP \(bu 3 +La decomprimare, sufixul \fB.xz\fP, \fB.lzma\fP sau \fB.lz\fP este eliminat din +numele fișierului pentru a se obține numele fișierului țintă. \fBxz\fP +recunoaște și sufixele \fB.txz\fP și \fB.tlz\fP și le înlocuiește cu sufixul +\&\fB.tar\fP. +.PP +Dacă fișierul țintă există deja, este afișată o eroare și \fIfișier\fP este +omis. +.PP +Cu excepția cazului în care scrie la ieșirea standard, \fBxz\fP va afișa un +avertisment și va omite \fIfișier\fPul dacă se aplică oricare dintre +următoarele: +.IP \(bu 3 +\fIFișierul\fP nu este un fișier obișnuit. Legăturile simbolice nu sunt urmate +și, prin urmare, nu sunt considerate fișiere obișnuite. +.IP \(bu 3 +\fIFișierul\fP are mai mult de o legătură dură. +.IP \(bu 3 +\fIFișierul\fP are activat bitul «setuid», «setgid» sau cel lipicios(sticky). +.IP \(bu 3 +Modul de operare este stabilit la comprimare și \fIfișier\fP are deja un sufix +al formatului de fișier țintă (\fB.xz\fP sau \fB.txz\fP când se comprimă în +formatul \fB.xz\fP și \fB.lzma\fP sau \fB.tlz\fP când se comprimă în formatul +\&\fB.lzma\fP). +.IP \(bu 3 +Modul de operare este stabilit la decomprimare și \fIfișierul\fP nu are un +sufix al niciunui format de fișier acceptat (\fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, +\&\fB.tlz\fP, sau \fB.lz\fP). +.PP +După comprimarea sau decomprimarea cu succes a \fIfișierului\fP, \fBxz\fP copiază +proprietarul, grupul, permisiunile, timpul de acces și timpul de modificare +din \fIfișierul\fP sursă în fișierul țintă. Dacă copierea grupului eșuează, +permisiunile sunt modificate astfel încât fișierul țintă să nu devină +accesibil utilizatorilor care nu aveau permisiunea de a accesa \fIfișierul\fP +sursă. \fBxz\fP nu acceptă încă copierea altor metadate, cum ar fi listele de +control al accesului sau atributele extinse. +.PP +Odată ce fișierul țintă a fost închis cu succes, \fIfișierul\fP sursă este +eliminat dacă nu a fost specificată opțiunea \fB\-\-keep\fP. \fIFișierul\fP sursă nu +este niciodată eliminat dacă rezultatul este scris la ieșirea standard sau +dacă apare o eroare. +.PP +Trimiterea unui semnal \fBSIGINFO\fP sau \fBSIGUSR1\fP către procesul \fBxz\fP face +ca acesta să imprime informații despre progres la ieșirea de eroare +standard. Acest lucru are o utilizare limitată, deoarece atunci când ieșirea +de eroare standard este un terminal, folosind opțiunea \fB\-\-verbose\fP va afișa +un indicator de progres de actualizare automată. +. +.SS "Utilizarea memoriei" +Cantitatea de memorie utilizată de \fBxz\fP variază de la câteva sute de +kiloocteți la câțiva gigaocteți, în funcție de opțiunile de +comprimare. Opțiunile utilizate la comprimarea unui fișier determină +cerințele de memorie ale instrumentului de decomprimare. De obicei, +instrumentul de decomprimare are nevoie de 5% până la 20% din cantitatea de +memorie de care a avut nevoie instrumentul de comprimare la crearea +fișierului. De exemplu, decomprimarea unui fișier creat cu \fBxz \-9\fP necesită +în prezent 65Mio de memorie. Totuși, este posibil să aveți fișiere \fB.xz\fP +care necesită câțiva gigaocteți de memorie pentru decomprimare. +.PP +În special utilizatorii de sisteme mai vechi pot considera deranjantă +posibilitatea unei utilizări foarte mari a memoriei. Pentru a preveni +surprizele neplăcute, \fBxz\fP are încorporat un limitator de utilizare a +memoriei, care este dezactivat implicit. În timp ce unele sisteme de operare +oferă modalități de a limita utilizarea memoriei proceselor, bazarea pe +aceasta nu a fost considerată a fi suficient de flexibilă (de exemplu, +utilizarea \fBulimit\fP(1) pentru a limita memoria virtuală tinde să paralizeze +\fBmmap\fP(2)). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +Limitatorul de utilizare a memoriei poate fi activat cu opțiunea din linia +de comandă \fB\-\-memlimit=\fP\fIlimita\fP. Adesea este mai convenabil să activați +limitatorul în mod implicit prin definirea variabilei de mediu +\fBXZ_DEFAULTS\fP, de exemplu, \fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. Este posibil +să stabiliți limitele separat pentru comprimare și decomprimare folosind +\fB\-\-memlimit\-compress=\fP\fIlimita\fP și +\fB\-\-memlimit\-decompress=\fP\fIlimita\fP. Utilizarea acestor două opțiuni în afara +\fBXZ_DEFAULTS\fP este foarte rar utilă, deoarece o singură rulare a \fBxz\fP nu +poate face atât comprimarea, cât și decomprimarea și \fB\-\-memlimit=\fP\fIlimita\fP +(sau \fB\-M\fP \fIlimita\fP ) este mai scurt de tastat pe linia de comandă. +.PP +Dacă limita de utilizare a memoriei specificată este depășită la +decomprimare, \fBxz\fP va afișa o eroare și decomprimarea fișierului va +eșua. Dacă limita este depășită la comprimare, \fBxz\fP va încerca să reducă +valorile stabilite astfel încât limita să nu mai fie depășită (cu excepția +cazului în care se utilizează opțiunea \fB\-\-format=raw\fP sau +\fB\-\-no\-adjust\fP). În acest fel, operațiunea nu va eșua decât dacă limita +stabilită este foarte mică. Scalarea valorilor stabilite se face în pași +care nu se potrivesc cu valorile prestabilite ale nivelului de comprimare, +de exemplu, dacă limita este doar puțin mai mică decât cantitatea necesară +pentru \fBxz \-9\fP, valorile stabilite vor fi reduse doar puțin , nu până la +valoarea prestabilită a lui \fBxz \-8\fP. +. +.SS "Concatenare și completare (prin umplere cu octeți nuli) cu fișiere .xz" +Este posibil să concatenați fișierele \fB.xz\fP așa cum sunt. \fBxz\fP va +decomprima astfel de fișiere ca și cum ar fi un singur fișier \fB.xz\fP. +.PP +Este posibil să se introducă umplutură între părțile concatenate sau după +ultima parte. Umplutura trebuie să fie compusă din octeți nuli, iar +dimensiunea umpluturii trebuie să fie un multiplu de patru octeți. Acest +lucru poate fi util, de exemplu, dacă fișierul \fB.xz\fP este stocat pe un +mediu care măsoară dimensiunile fișierelor în blocuri de 512 de octeți. +.PP +Concatenarea și completarea nu sunt permise cu fișierele \fB.lzma\fP sau +fluxurile brute. +. +.SH OPȚIUNI +. +.SS "Sufixe de numere întregi și valori speciale" +În majoritatea locurilor în care este de așteptat un număr întreg ca +argument, un sufix opțional este acceptat pentru a indica cu ușurință +numerele întregi mari. Nu trebuie să existe spațiu între numărul întreg și +sufix. +.TP +\fBKiB\fP +Înmulțește numărul întreg cu 1.024 (2^10). \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP și +\fBKB\fP sunt acceptate ca sinonime pentru \fBKiB\fP. +.TP +\fBMiB\fP +Înmulțește numărul întreg cu 1,048,576 (2^20). \fBMi\fP, \fBm\fP, \fBM\fP, și \fBMB\fP +sunt acceptate ca sinonime pentru \fBMiB\fP. +.TP +\fBGiB\fP +Înmulțește numărul întreg cu 1,073,741,824 (2^30). \fBGi\fP, \fBg\fP, \fBG\fP, și +\fBGB\fP sunt acceptate ca sinonime pentru \fBGiB\fP. +.PP +Valoarea specială \fBmax\fP poate fi utilizată pentru a indica valoarea maximă +întreagă suportată de opțiune. +. +.SS "Mod de operare" +Dacă sunt date mai multe opțiuni de mod de funcționare, ultima dintre ele, +este cea care va avea efect. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Comprimare. Acesta este modul de operare implicit atunci când nu este +specificată nicio opțiune de mod de funcționare și nici un alt mod de +operare nu este implicat din numele comenzii (de exemplu, \fBunxz\fP implică +\fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +După o comprimare reușită, fișierul sursă este eliminat, cu excepția cazului +în care a fost specificată scrierea la ieșirea standard sau opțiunea +\fB\-\-keep\fP. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Decomprimare. După o decomprimare reușită, fișierul sursă este eliminat, cu +excepția cazului în care a fost specificată scrierea la ieșirea standard sau +opțiunea \fB\-\-keep\fP. +.TP +\fB\-t\fP, \fB\-\-test\fP +Testează integritatea \fIfișierelor\fP comprimate. Această opțiune este +echivalentă cu \fB\-\-decompress \-\-stdout\fP cu excepția faptului că datele +decomprimate sunt înlăturate în loc să fie scrise la ieșirea standard. Nu +sunt create sau eliminate fișiere. +.TP +\fB\-l\fP, \fB\-\-list\fP +Afișează informații despre \fIfișiere\fP comprimate. Nu are loc nicio +decomprimare la ieșire și nu sunt create sau eliminate fișiere. În modul +listă, programul nu poate citi datele comprimate din intrarea standard sau +din alte surse care nu pot fi explorate. +.IP "" +Listarea implicită arată informații de bază despre \fIfișiere\fP, câte un +fișier pe linie. Pentru a obține informații mai detaliate, utilizați și +opțiunea \fB\-\-verbose\fP. Pentru și mai multe informații, utilizați opțiunea +\fB\-\-verbose\fP de două ori, dar rețineți că acest lucru poate fi lent, +deoarece obținerea tuturor informațiilor suplimentare necesită multe +căutări. Lățimea ieșirii detaliate depășește 80 de caractere, deci +canalizarea ieșirii către, de exemplu, \fBless\ \-S\fP poate fi convenabilă dacă +terminalul nu este suficient de lat. +.IP "" +Ieșirea exactă poate varia între versiunile \fBxz\fP și diferitele +localizări(configurările regionale). Pentru ieșiri care pot fi citite de +mașină, ar trebui utilizată opțiunea \fB\-\-robot \-\-list\fP. +. +.SS "Modificatori de operare" +.TP +\fB\-k\fP, \fB\-\-keep\fP +Nu șterge fișierele de intrare. +.IP "" +Începând cu \fBxz\fP 5.2.6, această opțiune face ca \fBxz\fP să comprime sau să +decomprime, chiar dacă intrarea este o legătură simbolică către un fișier +obișnuit, are mai mult de\-o legătură dură sau are marcați biții setuid, +setgid sau bitul lipicios. Biții setuid, setgid și bitul lipicios nu sunt +copiați în fișierul țintă. În versiunile anterioare acest lucru se făcea +numai cu ajutorul opțiunii \fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Această opțiune are mai multe efecte: +.RS +.IP \(bu 3 +Dacă fișierul țintă există deja, îl șterge înainte de comprimare sau +decomprimare. +.IP \(bu 3 +Comprimă sau decomprimă chiar dacă intrarea este o legătură simbolică către +un fișier obișnuit, are mai mult de\-o legătură dură sau are marcați biții +setuid, setgid sau bitul lipicios. Biții setuid, setgid și bitul lipicios nu +sunt copiați în fișierul țintă. +.IP \(bu 3 +Când este utilizată cu opțiunile \fB\-\-decompress\fP și \fB\-\-stdout\fP, comanda +\fBxz\fP nu poate recunoaște tipul fișierului sursă, și copiază fișierul sursă +așa cum este la ieșirea standard. Acest lucru permite comenzii \fBxzcat\fP +\fB\-\-force\fP să fie folosită drept comanda \fBcat\fP(1) pentru fișierele care nu +au fost comprimate cu \fBxz\fP. Rețineți că, în viitor, \fBxz\fP ar putea să +accepte noi formate de fișiere comprimate, ceea ce poate face ca \fBxz\fP să +decomprime mai multe tipuri de fișiere în loc să le copieze așa cum sunt la +ieșirea standard. Opțiunea \fB\-\-format=\fP\fIformat\fP poate fi folosită pentru a +restricționa \fBxz\fP să decomprime doar un singur format de fișier. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Scrie datele comprimate sau decomprimate la ieșirea standard în loc de +într\-un fișier. Aceasta implică \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +Decomprimă numai primul flux \fB.xz\fP și ignoră în tăcere posibilele date de +intrare rămase în urma fluxului. În mod normal, astfel de resturi rămase +face ca \fBxz\fP să afișeze o eroare. +.IP "" +\fBxz\fP nu decomprimă niciodată mai mult de un flux din fișierele \fB.lzma\fP sau +din fluxurile brute, dar această opțiune face ca \fBxz\fP să ignore posibilele +resturi de date rămase după fișierul \fB.lzma\fP sau fluxul brut. +.IP "" +Această opțiune nu are efect dacă modul de funcționare nu este +\fB\-\-decompress\fP sau \fB\-\-test\fP. +.IP "" +Începând cu \fBxz\fP 5.7.1alpha, \fB\-\-single\-stream\fP implică \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +Dezactivează crearea de fișiere dispersate. În mod implicit, dacă decomprimă +într\-un fișier obișnuit, \fBxz\fP încearcă să facă fișierul dispersat dacă +datele decomprimate conțin secvențe lungi de zerouri binare. De asemenea, +funcționează atunci când scrie la ieșirea standard, atâta timp cât ieșirea +standard este conectată la un fișier obișnuit și sunt îndeplinite anumite +condiții suplimentare pentru a o face în siguranță. Crearea de fișiere +dispersate poate economisi spațiu pe disc și poate accelera decomprimarea +prin reducerea cantității de date de In/Ieș pe disc. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +Când comprimă, utilizează \fI.suf\fP ca sufix pentru fișierul țintă în loc de +\&\fB.xz\fP sau \fB.lzma\fP. Dacă nu scrie la ieșirea standard și fișierul sursă are +deja sufixul \fI.suf\fP, este afișat un avertisment și fișierul este omis. +.IP "" +Când decomprimă, recunoaște fișierele cu sufixul \fI.suf\fP în plus față de +fișierele cu sufixul \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP sau \fB.lz\fP. Dacă +fișierul sursă are sufixul \fI.suf\fP, sufixul este eliminat pentru a obține +numele fișierului țintă. +.IP "" +La comprimarea sau decomprimarea fluxurilor brute (\fB\-\-format=raw\fP), sufixul +trebuie să fie întotdeauna specificat, cu excepția cazului în care se scrie +la ieșirea standard, deoarece nu există un sufix implicit pentru fluxurile +brute. +.TP +\fB\-\-files\fP[\fB=\fP\fIfișier\fP] +Citește numele fișierelor de procesat din \fIfișier\fP; dacă \fIfișierul\fP este +omis, numele fișierelor sunt citite de la intrarea standard. Numele de +fișiere trebuie să fie terminate cu caracterul de linie nouă. O liniuță +(\fB\-\fP) este luată ca nume de fișier obișnuit; nu înseamnă intrarea +standard. Dacă numele de fișiere sunt date și ca argumente în linia de +comandă, ele sunt procesate înainte ca numele fișierelor să fie citite din +\fIfișier\fP. +.TP +\fB\-\-files0\fP[\fB=\fP\fIfișier\fP] +Această opțiune este identică cu \fB\-\-files\fP[\fB=\fP\fIfișier\fP], cu excepția +faptului că fiecare nume de fișier trebuie să fie terminat cu caracterul +nul. +. +.SS "Formatul de bază al fișierului și opțiunile de comprimare" +.TP +\fB\-F\fP \fIformat\fP, \fB\-\-format=\fP\fIformat\fP +Specifică \fIformatul\fP fișierului pentru comprimare sau decomprimare: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +Aceasta este valoarea implicită. La comprimare, \fBauto\fP este echivalent cu +\fBxz\fP. La decomprimare, formatul fișierului de intrare este detectat +automat. Rețineți că fluxurile brute (create cu \fB\-\-format=raw\fP) nu pot fi +detectate automat. +.TP +\fBxz\fP +Comprimă în formatul de fișier \fB.xz\fP sau acceptă numai fișierele \fB.xz\fP +când decomprimă. +.TP +\fBlzma\fP, \fBalone\fP +Comprimă în formatul de fișier \fB.lzma\fP vechi sau acceptă numai fișierele +\&\fB.lzma\fP când decomprimă. Numele alternativ \fBalone\fP este furnizat pentru +compatibilitatea cu versiunile mai vechi de LZMA Utils. +.TP +\fBlzip\fP +Acceptă numai fișierele \fB.lz\fP când decomprimă. Comprimarea nu este +acceptată. +.IP "" +Sunt acceptate versiunile 0 și 1 ale formatului \fB.lz\fP. Fișierele versiunii +0 au fost create cu \fBlzip\fP 1.3 și versiuni mai vechi. Astfel de fișiere nu +sunt comune, dar pot fi găsite în arhivele de fișiere, deoarece câteva +pachete sursă au fost lansate în acest format. Este posibil ca oamenii să +aibă și fișiere personale vechi în acest format. Suportul pentru +decomprimare pentru versiunea 0 a formatului a fost eliminat în \fBlzip\fP +1.18. \fBlzip\fP 1.4 și versiunile ulterioare creează fișiere în versiunea 1 a +formatului. +.TP +\fBraw\fP +Comprimă sau decomprimă un flux brut (fără anteturi). Acest lucru este +destinat doar utilizatorilor avansați. Pentru a decodifica fluxurile brute, +trebuie să utilizați opțiunea \fB\-\-format=raw\fP și să specificați în mod +explicit lanțul de filtre, care în mod normal ar fi fost stocat în +anteturile containerului. +.RE +.TP +\fB\-C\fP \fIverificarea\fP, \fB\-\-check=\fP\fIverificarea\fP +Specifică tipul verificării integrității. Verificarea este calculată din +datele necomprimate și stocată în fișierul \fB.xz\fP. Această opțiune are efect +numai la comprimarea în format \fB.xz\fP; formatul \fB.lzma\fP nu acceptă +verificări de integritate. Verificarea integrității (dacă există) este +efectuată atunci când fișierul \fB.xz\fP este decomprimat. +.IP "" +Tipuri de \fIverificare\fP acceptate: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +Nu calculează deloc o verificare a integrității. Aceasta este de obicei o +idee proastă. Acest lucru poate fi util atunci când integritatea datelor +este oricum verificată prin alte mijloace. +.TP +\fBcrc32\fP +Calculează CRC32 folosind polinomul din IEEE\-802.3 (Ethernet). +.TP +\fBcrc64\fP +Calculează CRC64 folosind polinomul din ECMA\-182. Aceasta este valoarea +implicită, deoarece este ceva mai bună decât CRC32 la detectarea fișierelor +deteriorate, iar diferența de viteză este neglijabilă. +.TP +\fBsha256\fP +Calculează SHA\-256. Acest lucru este oarecum mai lent decât CRC32 și CRC64. +.RE +.IP "" +Integritatea antetelor \fB.xz\fP este întotdeauna verificată cu CRC32. Nu este +posibilă modificarea sau dezactivarea acesteia. +.TP +\fB\-\-ignore\-check\fP +Nu efectuează verificarea integrității datelor comprimate la +decomprimare. Valorile CRC32 din antetele \fB.xz\fP vor fi însă verificate +normal. +.IP "" +\fBNu utilizați această opțiune decât dacă știți ce faceți\fP. Motive posibile +pentru a utiliza această opțiune: +.RS +.IP \(bu 3 +Încercarea de a recupera datele dintr\-un fișier .xz corupt. +.IP \(bu 3 +Accelerarea decomprimării. Acest lucru contează mai ales cu SHA\-256 sau cu +fișierele care s\-au comprimat extrem de bine. Este recomandat să nu +utilizați această opțiune în acest scop decât dacă integritatea fișierului +este verificată extern într\-un alt mod. +.RE +.TP +\fB\-0\fP ... \fB\-9\fP +Selectează un nivel prestabilit de comprimare. Valoarea implicită este +\fB\-6\fP. Dacă sunt specificate mai multe niveluri prestabilite, ultimul are +efect. Dacă a fost deja specificat un lanț de filtre personalizat, +specificarea unui nivel prestabilit de comprimare șterge lanțul de filtre +personalizat. +.IP "" +Diferențele dintre valorile prestabilite sunt mai semnificative decât cu +\fBgzip\fP(1) și \fBbzip2\fP(1). Valorile de comprimare selectate determină +cerințele de memorie ale instrumentului de decomprimare, astfel încât +utilizarea unui nivel prea mare prestabilit ar putea face „dureroasă” +decomprimarea fișierului pe un sistem vechi cu puțină memorie RAM. Mai +exact, \fBnu este o idee bună să folosiți orbește \-9 pentru tot\fP așa cum se +întâmplă adesea cu \fBgzip\fP(1) și \fBbzip2\fP(1). +.RS +.TP +\fB\-0\fP ... \fB\-3\fP +Acestea sunt valorile prestabilite oarecum rapide. \fB\-0\fP este uneori mai +rapid decât \fBgzip \-9\fP în timp ce comprimă mult mai bine. Cele mai ridicate +au adesea viteza comparabilă cu \fBbzip2\fP(1) cu un raport de comprimare +comparabil sau mai bun, deși rezultatele depind foarte mult de tipul de date +care sunt comprimate. +.TP +\fB\-4\fP ... \fB\-6\fP +Comprimare bună spre foarte bună, păstrând în același timp utilizarea +memoriei de către instrumentul de decomprimare la un nivel rezonabil chiar +și pentru sistemele vechi. \fB\-6\fP este valoarea implicită, care este de +obicei o alegere bună pentru distribuirea fișierelor care trebuie să poată +fi decomprimate chiar și pe sisteme cu doar 16Mio de memorie RAM. Opțiunile +(\fB\-5e\fP sau \fB\-6e\fP ar putea fi demne de luat în considerare. A se vedea +opțiunea \fB\-\-extreme\fP.) +.TP +\fB\-7 ... \-9\fP +Acestea sunt precum \fB\-6\fP, dar cu cerințe mai mari de memorie pentru +comprimare și decomprimare. Acestea sunt utile numai atunci când comprimați +fișiere mai mari de 8Mio, 16Mio și, respectiv, 32Mio. +.RE +.IP "" +Pe același hardware, viteza de decomprimare este aproximativ un număr +constant de octeți de date comprimate pe secundă. Cu alte cuvinte, cu cât +comprimarea este mai bună, cu atât decomprimarea va fi de obicei mai +rapidă. Aceasta înseamnă, de asemenea, că valoarea de la ieșire a cantității +de date necomprimate produsă pe secundă poate varia foarte mult. +.IP "" +Următorul tabel rezumă caracteristicile valorilor prestabilite: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +ValPrestab;DimDict;CPUComp;MemComp;MemDec +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Descrieri coloane: +.RS +.IP \(bu 3 +DimDict este dimensiunea dicționarului LZMA2. Este o risipă de memorie să +folosești un dicționar mai mare decât dimensiunea fișierului necomprimat. De +aceea este bine să evitați utilizarea valorilor prestabilite \fB\-7\fP ... \fB\-9\fP +atunci când nu este nevoie cu adevărat de ele. Pentru valoarea prestabilită +\fB\-6\fP sau alta mai mică, cantitatea de memorie irosită este de obicei +suficient de mică pentru a nu conta. +.IP \(bu 3 +CPUComp este o reprezentare simplificată a configurărilor LZMA2 care +afectează viteza de comprimare. Dimensiunea dicționarului afectează și +viteza, așa că, în timp ce CPUComp este aceeași pentru nivelurile \fB\-6\fP +\&... \fB\-9\fP, nivelurile mai mari tind să fie puțin mai lente. Pentru a obține +o comprimare și mai lentă și, astfel, posibil mai bună, consultați opțiunea +\fB\-\-extreme\fP. +.IP \(bu 3 +MemComp conține cerințele de memorie ale comprimării în modul cu un singur +fir de execuție. Poate varia ușor între versiunile \fBxz\fP. +.IP \(bu 3 +MemDec conține cerințele de memorie pentru decomprimare. Adică, +configurările de comprimare determină cerințele de memorie ale +decomprimării. Cantitatea exactă a memoriei utilizate la decomprimare este +puțin mai mare decât dimensiunea dicționarului LZMA2, dar valorile din tabel +au fost rotunjite la următorul Mio. +.RE +.IP "" +Cerințele de memorie ale modului cu mai multe fire de execuție sunt +semnificativ mai mari decât cele ale modului cu un singur fir de +execuție. Cu valoarea implicită a lui \fB\-\-block\-size\fP, fiecare fir are +nevoie de 3*3*DictSize plus MemComp sau MemDec. De exemplu, patru fire de +execuție cu valoarea prestabilită \fB\-6\fP au nevoie de 660\(en670\ Mio de +memorie. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +Utilizează o variantă mai lentă a nivelului prestabilit de comprimare +selectat (\fB\-0\fP ... \fB\-9\fP) pentru a obține un raport de comprimare puțin mai +bun, dar din nefericire, acest lucru îl poate înrăutăți. Utilizarea memoriei +pentru decomprimare nu este afectată, dar utilizarea memoriei la comprimare +crește puțin la nivelurile prestabilite \fB\-0\fP ... \fB\-3\fP. +.IP "" +Deoarece există două valori prestabilite cu dimensiuni ale dicționarului de +4Mio și 8Mio, valorile prestabilite \fB\-3e\fP și \fB\-5e\fP folosesc configurări +puțin mai rapide (CPUComp mai mic) decât \fB\-4e\fP și \fB\-6e\fP, respectiv. În +acest fel, nu există două nivele prestabilite identice. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +ValPrestab;DimDict;CPUComp;MemComp;MemDec +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +De exemplu, există un total de patru nivele prestabilite care folosesc +dicționarul 8Mio, a căror ordine de la cel mai rapid la cel mai lent este +\fB\-5\fP, \fB\-6\fP, \fB\-5e\fP și \fB\-6e\fP . +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +Acestea sunt alias de opțiuni, oarecum înșelătoare pentru \fB\-0\fP și, +respectiv, \fB\-9\fP. Acestea sunt furnizate numai pentru compatibilitatea cu +LZMA Utils. Evitați utilizarea acestor opțiuni. +.TP +\fB\-\-block\-size=\fP\fIdimensiunea\fP +Când comprimă în formatul \fB.xz\fP, împarte datele de intrare în blocuri de +\fIdimensiunea\fP octeți. Blocurile sunt comprimate independent unul de +celălalt, ceea ce ajută în modul cu mai multe fire de execuție și face +posibilă decomprimarea cu acces aleatoriu limitat. Această opțiune este de +obicei folosită pentru a suprascrie dimensiunea implicită a blocului în +modul cu mai multe fire de execuție, dar această opțiune poate fi folosită +și în modul cu un singur fir de execuție. +.IP "" +În modul cu mai multe fire de execuție, aproximativ de trei ori +\fIdimensiunea\fP de octeți vor fi alocați în fiecare fir pentru stocarea +intrării și ieșirii. \fIDimensiunea\fP implicită este de trei ori dimensiunea +dicționarului LZMA2 sau 1Mio, oricare dintre acestea este mai mare. În mod +obișnuit, o valoare bună este de două la patru ori dimensiunea dicționarului +LZMA2 sau de cel puțin 1Mio. Utilizarea unei \fIdimensiuni\fP mai mici decât +dimensiunea dicționarului LZMA2 este o risipă de memorie RAM, deoarece +atunci memoria tampon a dicționarului LZMA2 nu va fi niciodată utilizată pe +deplin. În modul cu mai multe fire de execuție, dimensiunile blocurilor sunt +stocate în anteturile blocurilor. Aceste informații privind dimensiunea sunt +necesare pentru decomprimarea cu mai multe fire. +.IP "" +În modul cu un singur fir de execuție, nicio divizare a blocurilor nu se +face în mod implicit. Folosirea acestei opțiuni nu afectează utilizarea +memoriei. Nu sunt stocate informații despre dimensiune în antetele +blocurilor, astfel încât fișierele create în modul cu un singur fir de +execuție nu vor fi identice cu fișierele create în modul cu mai multe fire +de execuție. Lipsa informațiilor privind dimensiunea înseamnă, de asemenea, +că \fBxz\fP nu va putea decomprima fișierele în modul cu mai multe fire. de +execuție. +.TP +\fB\-\-block\-list=\fP\fIelemente\fP +Când comprimă în formatul \fB.xz\fP, începe un nou bloc cu un lanț de filtre +personalizat opțional după intervalele specificate de date necomprimate. +.IP "" +\fIelementele\fP sunt o listă separată prin virgule. Fiecare element este +format dintr\-un număr opțional de lanț de filtrare între 0 și 9, urmat de +două puncte (\fB:\fP) și de o dimensiune cerută a datelor +necomprimate. Omiterea unui element (două sau mai multe virgule consecutive) +este o prescurtare pentru a utiliza dimensiunea și filtrele din elementul +anterior. +.IP "" +În cazul în care fișierul de intrare este mai mare decât suma dimensiunilor +din \fIelemente\fP, ultimul element se repetă până la sfârșitul fișierului. O +valoare specială de \fB0\fP poate fi utilizată ca ultimă dimensiune pentru a +indica faptul că restul fișierului trebuie să fie codificat ca un singur +bloc. +.IP "" +Un lanț de filtre alternativ pentru fiecare bloc poate fi specificat în +combinație cu opțiunile \fB\-\-filters1=\fP\fIfiltre\fP \&...\& +\fB\-\-filters9=\fP\fIfiltre\fP. Aceste opțiuni definesc lanțuri de filtre cu un +identificator cuprins între 1\(en9. Lanțul de filtre 0 poate fi utilizat +pentru a se referi la lanțul de filtre implicit, ceea ce este același lucru +cu a nu specifica un lanț de filtre. Identificatorul lanțului de filtre +poate fi utilizat înaintea dimensiunii necomprimate, urmat de două puncte +(\fB:\fP). De exemplu, dacă se specifică +\fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP, atunci blocurile vor fi +create folosind: +.RS +.IP \(bu 3 +Lanțul de filtre specificat de \fB\-\-filters1\fP și 2 Mio de intrare +.IP \(bu 3 +Lanțul de filtre specificat de \fB\-\-filters3\fP și 2 Mio de intrare +.IP \(bu 3 +Lanțul de filtre specificat de \fB\-\-filters2\fP și 4 Mio de intrare +.IP \(bu 3 +Lanțul de filtre specificat de \fB\-\-filters2\fP și 4 Mio de intrare +.IP \(bu 3 +Lanțul de filtre implicit și 2 MiB de intrare +.IP \(bu 3 +Lanțul de filtre implicit și 4 MiB de intrare pentru fiecare bloc până la +sfârșitul intrării. +.RE +.IP "" +Dacă se specifică o dimensiune care depășește dimensiunea blocului +codificatorului (fie valoarea implicită în modul cu fire de execuție, fie +valoarea specificată cu \fB\-\-block\-size=\fP\fIdimensiune\fP), codificatorul va +crea blocuri suplimentare, păstrând limitele specificate în \fIelemente\fP. De +exemplu, dacă se specifică \fB\-\-block\-size=10MiB\fP +\fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP și fișierul de intrare este de +80 MiB, se vor obține 11 blocuri: 5, 10, 8, 10, 10, 2, 10, 10, 10, 4, 10, +10, 10 și 1 Mio. +.IP "" +În modul cu mai multe fire de execuție, dimensiunile blocurilor sunt stocate +în antetele blocurilor. Acest lucru nu se face în modul cu un singur fir de +execuție, astfel încât ieșirea codificată nu va fi identică cu cea a modului +cu mai multe fire de execuție. +.TP +\fB\-\-flush\-timeout=\fP\fItimp_limită\fP +La comprimare, dacă au trecut mai mult de \fItimp_limită\fP milisecunde (un +întreg pozitiv) de la curățarea anterioară și citirea mai multor intrări +s\-ar bloca, toate datele de intrare în așteptare sunt eliminate din +codificator și puse la dispoziție în fluxul de ieșire. Acest lucru poate să +fie util dacă \fBxz\fP este utilizat pentru a comprima datele care sunt +transmise în flux printr\-o rețea. Valorile mici de \fItimp_limită\fP fac datele +disponibile la capătul de recepție cu o mică întârziere, dar valorile mari +de \fItimp_limită\fP oferă un raport de comprimare mai bun. +.IP "" +Această caracteristică este dezactivată în mod implicit. Dacă această +opțiune este specificată de mai multe ori, ultima este cea care se ia în +considerare. Valoarea specială a lui \fItimp_limită\fP de \fB0\fP, poate fi +utilizată pentru a dezactiva în mod explicit această caracteristică. +.IP "" +Această caracteristică nu este disponibilă în sistemele non\-POSIX. +.IP "" +.\" FIXME +\fBAceastă caracteristică este încă experimentală\fP. În prezent, \fBxz\fP este +nepotrivit pentru decomprimarea fluxului în timp real datorită modului în +care \fBxz\fP utilizează memoria tampon. +.TP +\fB\-\-no\-sync\fP +Nu sincronizează fișierul țintă și directorul acestuia cu dispozitivul de +stocare înainte de a elimina fișierul sursă. Acest lucru poate îmbunătăți +performanța în cazul comprimării sau decomprimării multor fișiere mici. Cu +toate acestea, dacă sistemul se blochează imediat după ștergere, este +posibil ca fișierul țintă să nu fi fost scris pe dispozitivul de stocare, +dar operația de ștergere să fi fost. În acest caz, nici fișierul sursă +original, nici fișierul țintă nu sunt disponibile. +.IP "" +Această opțiune are efect numai atunci când \fBxz\fP urmează să elimine +fișierul sursă. În alte cazuri, sincronizarea nu se face niciodată. +.IP "" +Sincronizarea și \fB\-\-no\-sync\fP au fost adăugate în \fBxz\fP 5.7.1alpha. +.TP +\fB\-\-memlimit\-compress=\fP\fIlimita\fP +Stabilește o limită de utilizare a memoriei pentru comprimare. Dacă această +opțiune este specificată de mai multe ori, ultima va avea efect. +.IP "" +Dacă parametrii de comprimare depășesc \fIlimita\fP, \fBxz\fP va încerca să +ajusteze parametrii scăzând valorile acestora, astfel încât limita să nu mai +fie depășită și va afișa o notificare că ajustarea automată a fost +efectuată. Ajustările se fac în această ordine: reducerea numărului de fire, +trecerea la modul un singur fir de execuție dacă chiar și un singur fir în +modul cu mai multe fire de execuție depășește \fIlimita\fP și, în final, +reducerea dimensiunii dicționarului LZMA2. +.IP "" +Când comprimă cu opțiunea \fB\-\-format=raw\fP sau dacă a fost specificată +opțiunea \fB\-\-no\-adjust\fP, numai numărul de fire poate fi redus, deoarece se +poate face fără a afecta rezultatul comprimării. +.IP "" +Dacă \fIlimita\fP nu poate fi îndeplinită chiar și cu ajustările descrise mai +sus, este afișată o eroare și \fBxz\fP va ieși cu starea de ieșire 1. +.IP "" +\fILimita\fP poate fi specificata în mai multe moduri: +.RS +.IP \(bu 3 +\fILimita\fP poate fi o valoare absolută în octeți. Utilizarea unui sufix +întreg precum \fBMiB\fP poate fi utilă. De exemplu: +\fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +\fILimita\fP poate fi specificată ca procent din memoria fizică totală +(RAM). Acest lucru poate fi util mai ales atunci când definiți variabila de +mediu \fBXZ_DEFAULTS\fP într\-un script de inițializare shell care este partajat +între diferite calculatoare. În acest fel, limita este automat mai mare pe +sistemele cu mai multă memorie. De exemplu: \fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +\fILimita\fP poate fi restabilită la valoarea implicită dându\-i valoarea +\fB0\fP. În prezent, aceasta este echivalentă cu stabilirea \fIlimitei\fP la +\fBmax\fP (fără limită de utilizare a memoriei). +.RE +.IP "" +Pentru \fBxz\fP pe 32 de biți există un caz special: dacă \fIlimita\fP ar fi peste +\fB4020MiB\fP, \fIlimita\fP este stabilită la \fB4020MiB\fP. Pe MIPS32 este +stabilită în schimb la \fB2000MiB\fP; (valorile \fB0\fP și \fBmax\fP nu sunt afectate +de acest lucru \-\- o caracteristică similară nu există pentru +decomprimare). Acest lucru poate fi util atunci când un executabil pe 32 de +biți are acces la un spațiu de adrese de 4Gio (2Gio pe MIPS32), se speră că +nu produce daune în alte situații. +.IP "" +Consultați și secțiunea \fBUtilizarea memoriei\fP. +.TP +\fB\-\-memlimit\-decompress=\fP\fIlimita\fP +Stabilește o limită de utilizare a memoriei pentru decomprimare. Acest lucru +afectează și modul \fB\-\-list\fP. Dacă operațiunea nu este posibilă fără a +depăși \fIlimita\fP, \fBxz\fP va afișa o eroare și decomprimarea fișierului va +eșua. Consultați \fB\-\-memlimit\-compress=\fP\fIlimita\fP pentru modalitățile +posibile de a specifica \fIlimita\fP. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fIlimita\fP +Stabilește o limită de utilizare a memoriei pentru decomprimarea cu mai +multe fire de execuție. Acest lucru poate afecta doar numărul de fire de +execuție; acest lucru nu îl va face niciodată pe \fBxz\fP să refuze +decomprimarea unui fișier. Dacă \fIlimita\fP este prea scăzută pentru a permite +orice mod cu mai multe fire de execuție, \fIlimita\fP este ignorată și \fBxz\fP va +continua în modul cu un singur fir de execuție. Rețineți că, dacă se +folosește și opțiunea \fB\-\-memlimit\-decompress\fP, se va aplica întotdeauna +atât modurilor cu un singur fir de execuție, cât și modurilor cu mai multe +fire de execuție și astfel \fIlimita\fP efectivă pentru modul cu mai multe fire +de execuție nu va fi niciodată mai mare decât limita stabilită cu opțiunea +\fB\-\-memlimit\-decompress\fP. +.IP "" +Spre deosebire de celelalte opțiuni de limită de utilizare a memoriei, +opțiunea \fB\-\-memlimit\-mt\-decompress=\fP\fIlimita\fP are o \fIlimită\fP implicită +specifică sistemului. Comanda \fBxz \-\-info\-memory\fP poate fi folosită pentru a +vedea valoarea curentă. +.IP "" +Această opțiune și valoarea ei implicită există deoarece, fără nicio limită, +decomprimarea cu (mai multe) fire de execuție ar putea ajunge să aloce o +cantitate „nebună” de memorie cu unele fișiere de intrare. Dacă \fIlimita\fP +implicită este prea scăzută pe sistemul dumneavoastră, nu ezitați să +creșteți \fIlimita\fP, dar niciodată să nu o stabiliți la o valoare mai mare +decât cantitatea de memorie RAM utilizabilă și cu niște fișiere de intrare +adecvate, \fBxz\fP va încerca să utilizeze acea cantitate de memorie chiar și +cu un număr redus de fire de execuție. Rularea lui \fBxz\fP cu depășirea +cantității de memorie fizice(RAM) sau a celei de interschimb(swap) nu va +îmbunătăți performanța de decomprimare. +.IP "" +Consultați opțiunea \fB\-\-memlimit\-compress=\fP\fIlimita\fP pentru modalități +posibile de a specifica \fIlimita\fP. Stabilirea \fIlimitei\fP la \fB0\fP +restabilește \fIlimita\fP la valoarea implicită specifică sistemului. +.TP +\fB\-M\fP \fIlimita\fP, \fB\-\-memlimit=\fP\fIlimita\fP, \fB\-\-memory=\fP\fIlimita\fP +Aceasta este echivalentă cu specificarea opțiunilor: +\fB\-\-memlimit\-compress=\fP\fIlimita\fP \fB\-\-memlimit\-decompress=\fP\fIlimita\fP +\fB\-\-memlimit\-mt\-decompress=\fP\fIlimita\fP. +.TP +\fB\-\-no\-adjust\fP +Afișează o eroare și iese dacă limita de utilizare a memoriei nu poate fi +îndeplinită fără ajustarea parametrilor care afectează ieșirea +comprimată. Adică, acest lucru împiedică \fBxz\fP să comute codificatorul din +modul cu mai multe fire de execuție în modul cu un singur fir de execuție și +să reducă dimensiunea dicționarului LZMA2. Chiar și atunci când această +opțiune este utilizată, numărul de fire de execuție poate fi redus pentru a +îndeplini limita de utilizare a memoriei, deoarece aceasta nu va afecta +comprimarea. +.IP "" +Ajustarea automată este întotdeauna dezactivată la crearea fluxurilor brute +(\fB\-\-format=raw\fP). +.TP +\fB\-T\fP \fInumăr\fP, \fB\-\-threads=\fP\fInumăr\fP +Specifică numărul de fire de execuție de utilizat. Stabilirea \fInumărului\fP +la valoarea specială \fB0\fP, face ca \fBxz\fP să utilizeze până la atâtea fire de +execuție câte procesoare sunt în sistem. Numărul real de fire de execuție +poate fi mai mic decât \fInumăr\fP dacă fișierul de intrare nu este suficient +de mare pentru a trece la modul cu mai multe fire de execuție cu parametrii +dați, sau dacă folosirea mai multor fire de execuție ar depăși limita de +utilizare a memoriei. +.IP "" +Operațiile de comprimare cu un singur fir de execuție și cele cu mai multe +fire de execuție produc ieșiri diferite. Comprimarea cu un singur fir de +execuție va oferi cea mai mică dimensiune a fișierului, dar numai ieșirea de +la comprimarea cu mai multe fire de execuție poate fi decomprimată folosind +mai multe fire. Stabilirea \fInumărului\fP la \fB1\fP va determina ca \fBxz\fP să +folosească modul cu un singur fir de execuție. Stabilirea \fInumărului\fP la +orice altă valoare, inclusiv \fB0\fP, va determina ca \fBxz\fP să folosească +comprimarea cu mai multe fire de execuție chiar dacă sistemul acceptă doar +un fir hardware; (\fBxz\fP 5.2.x folosește modul cu un singur fir de execuție +în această situație). +.IP "" +Pentru a utiliza modul cu mai multe fire de execuție cu un singur fir, +stabiliți \fInumărul\fP la \fB+1\fP. Prefixul \fB+\fP nu are efect cu alte valori +decât \fB1\fP. O limită de utilizare a memoriei poate face în continuare \fBxz\fP +să treacă în modul cu un singur fir, cu excepția cazului în care este +utilizată opțiunea \fB\-\-no\-adjust\fP. Suportul pentru prefixul \fB+\fP a fost +adăugat în \fBxz\fP 5.4.0. +.IP "" +Dacă a fost solicitat un număr automat de fire și nu a fost specificată +nicio limită de utilizare a memoriei, atunci o limită „maleabilă” implicită +specifică sistemului va fi utilizată pentru a limita eventual numărul de +fire de execuție. Este o limită „maleabilă” în sensul că este ignorată dacă +numărul de fire devine unul, astfel o limită „maleabilă” nu va opri +niciodată \fBxz\fP să comprime sau să decomprime. Această limită „maleabilă” +implicită nu va face \fBxz\fP să treacă de la modul cu mai multe fire de +execuție la modul cu un singur fir de execuție. Limitele active pot fi +văzute rulând comanda \fBxz \-\-info\-memory\fP. +.IP "" +În prezent, singura metodă de procesare cu fire de execuție este împărțirea +intrării în blocuri și comprimarea lor independent unul de +celălalt. Dimensiunea implicită a blocului depinde de nivelul de comprimare +și poate fi înlocuită cu opțiunea \fB\-\-block\-size=\fP\fIdimensiune\fP. +.IP "" +Decomprimarea cu fire de execuție funcționează numai pe fișierele care +conțin mai multe blocuri cu informații despre dimensiune în antetele +blocurilor. Toate fișierele suficient de mari comprimate în modul cu mai +multe fire de execuție îndeplinesc această condiție, dar fișierele +comprimate în modul cu un singur fir de execuție nu o îndeplinesc chiar dacă +a fost folosită opțiunea \fB\-\-block\-size=\fP\fIdimensiune\fP. +.IP "" +Valoarea implicită pentru \fIfire de execuție\fP este \fB0\fP. În \fBxz\fP 5.4.x și +mai vechi, valoarea implicită este \fB1\fP. +. +.SS "Lanțuri de filtrare personalizate pentru instrumentul de comprimare" +Un lanț de filtrare personalizat permite specificarea parametrilor de +comprimare în detaliu, în loc să se bazeze pe cei asociați opțiunilor +prestabilite. Când este specificat un lanț de filtrare personalizat, +opțiunile prestabilite (\fB\-0\fP \&...\& \fB\-9\fP și \fB\-\-extreme\fP) de mai devreme +din linia de comandă sunt uitate. Dacă o opțiune prestabilită este +specificată după una sau mai multe opțiuni de lanț de filtrare personalizat, +noua prestabilire intră în vigoare și opțiunile lanțului de filtrare +personalizat, specificate mai devreme sunt uitate. +.PP +Un lanț de filtrare este comparabil cu conductele din linia de comandă. La +comprimare, intrarea necomprimată merge la primul filtru, a cărui ieșire +merge la următorul filtru (dacă există). Ieșirea ultimului filtru este +scrisă în fișierul comprimat. Numărul maxim de filtre din lanț este de +patru, dar de obicei un lanț de filtrare are doar unul sau două filtre. +.PP +Multe filtre au limitări în ceea ce privește locul în care se pot afla în +lanțul de filtrare: unele filtre pot funcționa doar ca ultimul filtru din +lanț, altele doar ca non\-ultim filtru și unele funcționează în orice poziție +din lanț. În funcție de filtru, această limitare este fie inerentă +proiectării filtrului, fie există pentru a preveni problemele de securitate. +.PP +Un lanț de filtre personalizat poate fi specificat în două moduri +diferite. Opțiunile \fB\-\-filters=\fP\fIfiltre\fP și \fB\-\-filters1=\fP\fIfiltre\fP +\&...\& \fB\-\-filters9=\fP\fIfiltre\fP permit specificarea unui întreg lanț de +filtre într\-o singură opțiune, folosind sintaxa șirului de filtre +liblzma. Alternativ, un lanț de filtre poate fi specificat prin utilizarea +uneia sau mai multor opțiuni de filtrare individuale în ordinea în care sunt +dorite în lanțul de filtre. Adică, ordinea opțiunilor de filtrare +individuale este semnificativă! La decodificarea fluxurilor brute +(\fB\-\-format=raw\fP), lanțul de filtre trebuie să fie specificat în aceeași +ordine în care a fost specificat la comprimare. Orice filtru individual sau +opțiuni presetate specificate înainte de opțiunea de lanț complet +(\fB\-\-filters=\fP\fIfiltre\fP) vor fi uitate. Filtrele individuale specificate +după opțiunea „lanț complet” vor reinițializa lanțul de filtre. +.PP +Atât opțiunile de filtrare completă, cât și cele de filtrare individuală +acceptă \fIopțiuni\fP specifice filtrului sub forma unei liste separate prin +virgule. Se ignoră virgulele suplimentare din \fIopțiuni\fP. Fiecare opțiune +are o valoare implicită, deci specificați\-le pe cele pe care doriți să le +modificați. +.PP +Pentru a vedea întregul lanț de filtre și \fIopțiuni\fP, utilizați \fBxz \-vv\fP +(adică folosiți \fB\-\-verbose\fP de două ori). Acest lucru funcționează și +pentru vizualizarea opțiunilor lanțului de filtre utilizate de valorile +prestabilite. +.TP +\fB\-\-filters=\fP\fIfiltre\fP +Specificați întregul lanț de filtre sau o presetare într\-o singură +opțiune. Fiecare filtru poate fi separat prin spații sau două liniuțe +(\fB\-\-\fP). Este posibil să fie necesar ca \fIfiltrele\fP să fie puse între +ghilimele în linia de comandă a shell\-ului pentru a fi analizate ca o +singură opțiune. Pentru a indica \fIopțiuni\fP, utilizați \fB:\fP sau \fB=\fP. O +presetare poate fi prefixată cu un \fB\-\fP și urmată de zero sau mai multe +indicatoare. Singurul indicator suportat este \fBe\fP pentru a aplica aceleași +opțiuni ca și \fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIfiltre\fP ... \fB\-\-filters9\fP=\fIfiltre\fP +Specifică până la nouă lanțuri de filtre suplimentare care pot fi utilizate +cu \fB\-\-block\-list\fP. +.IP "" +De exemplu, atunci când se comprimă o arhivă cu fișiere executabile urmate +de fișiere text, partea executabilă ar putea utiliza un lanț de filtre cu un +filtru BCJ, iar partea de text doar filtrul LZMA2. +.TP +\fB\-\-filters\-help\fP +Afișează un mesaj de ajutor care descrie modul de specificare a presetărilor +și a lanțurilor de filtre personalizate în opțiunile \fB\-\-filters\fP și +\fB\-\-filters1=\fP\fIfiltre\fP \&...\& \fB\-\-filters9=\fP\fIfiltre\fP și iese. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIopțiuni\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIopțiuni\fP] +.PD +Adaugă filtrul LZMA1 sau LZMA2 la lanțul de filtre. Aceste filtre pot fi +folosite doar ca ultimul filtru din lanț. +.IP "" +LZMA1 este un filtru vechi, care este acceptat aproape exclusiv datorită +formatului de fișier vechi \fB.lzma\fP, care acceptă numai LZMA1. LZMA2 este o +versiune actualizată a LZMA1 pentru a rezolva unele probleme practice ale +LZMA1. Formatul \fB.xz\fP folosește LZMA2 și nu acceptă deloc LZMA1. Viteza de +comprimare și rapoartele LZMA1 și LZMA2 sunt practic aceleași. +.IP "" +LZMA1 și LZMA2 au același set de \fIopțiuni\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIprestabilit\fP +Reconfigurează toate \fIopțiunile\fP LZMA1 sau LZMA2 la +\fIprestabilit\fP. \fIprestabilit\fP constă dintr\-un număr întreg, care poate fi +urmat de modificatori prestabiliți cu o singură literă. Numărul întreg +poate fi de la \fB0\fP la \fB9\fP, potrivindu\-se cu opțiunile liniei de comandă +\fB\-0\fP \&...\& \fB\-9\fP. Singurul modificator acceptat în prezent este \fBe\fP, +care se potrivește cu \fB\-\-extreme\fP. Dacă nu este specificat \fBprestabilit\fP, +valorile implicite ale \fIopțiunilor\fP LZMA1 sau LZMA2 sunt preluate din +prestabilirea \fB6\fP. +.TP +\fBdict=\fP\fIdimensiunea\fP +\fIDimensiunea\fP dicționarului (istoricul memoriei tampon) indică câți octeți +din datele necomprimate recent procesate sunt păstrați în +memorie. Algoritmul încearcă să găsească secvențe de octeți care se repetă +(potriviri) în datele necomprimate și să le înlocuiască cu referințe la +datele aflate în prezent în dicționar. Cu cât dicționarul este mai mare, cu +atât este mai mare șansa de a găsi o potrivire. Astfel, creșterea +\fIdimensiunii\fP dicționarului îmbunătățește de obicei raportul de comprimare, +dar un dicționar mai mare decât fișierul necomprimat este risipă de memorie. +.IP "" +\fIDimensiunea\fPtipică a dicționarului este de la 64Kio până la 64Mio. Minimul +este de 4Kio. Maximul pentru compresie este în prezent de 1,5Gio +(1536Mio). Decomprimarea acceptă deja dicționare cu până la un octet mai +puțin de 4Gio, care este maximul pentru formatele de flux LZMA1 și LZMA2. +.IP "" +\fIDimensiunea\fP dicționarului și găsitorul de potriviri (match finder) → +(\fImf\fP) determină împreună utilizarea memoriei de către codificatorul LZMA1 +sau LZMA2. Aceeași \fIdimensiune\fP a dicționarului (sau mai mare) care a fost +utilizată la comprimare, este necesară pentru decomprimare, astfel încât +utilizarea memoriei de către decodificator este determinată de dimensiunea +dicționarului utilizată la comprimare. Antetele \fB.xz\fP stochează +\fIdimensiunea\fP dicționarului fie ca 2^\fIn\fP, fie ca 2^\fIn\fP + 2^(\fIn\fP\-1), deci +aceste \fIdimensiuni\fP sunt oarecum preferate pentru comprimare. Alte +\fIdimensiuni\fP vor fi rotunjite atunci când sunt stocate în anteturile +\&\fB.xz\fP. +.TP +\fBlc=\fP\fIlc\fP +Specifică numărul de biți de context literal. Minimul este 0 și maximul este +4; implicit este 3. În plus, suma \fIlc\fP și \fIlp\fP nu trebuie să depășească +4. +.IP "" +Toți octeții care nu pot fi codificați ca potriviri sunt codificați ca +literali. Adică, literalii sunt pur și simplu octeți de 8 biți care sunt +codificați unul câte unul. +.IP "" +Codificarea literală presupune că cei mai mari biți \fIlc\fP ai octetului +anterior necomprimat se corelează cu octetul următor. De exemplu, în textul +tipic englezesc, o literă mare este adesea urmată de o literă mică, iar o +literă mică este urmată de obicei de o altă literă mică. În setul de +caractere US\-ASCII, cei mai mari trei biți sunt 010 pentru literele mari și +011 pentru literele mici. Când \fIlc\fP este cel puțin 3, codificarea literală +poate profita de această proprietate în datele necomprimate. +.IP "" +Valoarea implicită (3) este de obicei bună. Dacă doriți o comprimare maximă, +testați \fBlc=4\fP. Uneori ajută puțin, iar uneori înrăutățește comprimarea +\&. Dacă o agravează, încercați de\-asemeni cu \fBlc=2\fP. +.TP +\fBlp=\fP\fIlp\fP +Specifică numărul de biți de poziție literală. Minimul este 0 și maximul +este 4; implicit este 0. +.IP "" +\fILp\fP afectează ce fel de aliniere în datele necomprimate este presupusă la +codificarea literalelor. Consultați argumentul \fIpb\fP de mai jos pentru mai +multe informații despre aliniere. +.TP +\fBpb=\fP\fIpb\fP +Specifică numărul de biți de poziție. Minimul este 0 și maximul este 4; +implicit este 2. +.IP "" +\fIPb\fP afectează ce fel de aliniere în datele necomprimate este presupusă în +general. Valoarea implicită înseamnă alinierea pe patru octeți +(2^\fIpb\fP=2^2=4), care este adesea o alegere bună atunci când nu există o +ipoteză mai bună. +.IP "" +Când alinierea este cunoscută, definirea lui \fIpb\fP în mod corespunzător +poate reduce puțin dimensiunea fișierului. De exemplu, cu fișierele text cu +aliniere pe un octet (US\-ASCII, ISO\-8859\-*, UTF\-8), definirea \fBpb=0\fP poate +îmbunătăți ușor comprimarea. Pentru textul UTF\-16, \fBpb=1\fP este o alegere +bună. Dacă alinierea este un număr impar, cum ar fi 3 octeți, \fBpb=0\fP ar +putea fi cea mai bună alegere. +.IP "" +Chiar dacă alinierea presupusă poate fi ajustată cu \fIpb\fP și \fIlp\fP, LZMA1 și +LZMA2 încă favorizează ușor alinierea pe 16 octeți. Ar putea fi demn de luat +în considerare atunci când proiectați formate de fișiere care pot fi adesea +comprimate cu LZMA1 sau LZMA2. +.TP +\fBmf=\fP\fImf\fP +Căutarea potrivirilor are un efect major asupra vitezei codificatorului, +utilizării memoriei și raportului de comprimare. De obicei, găsitorii de +potriviri din lanțul sumelor de control sunt mai rapizi decât găsitorii de +potriviri din arborele binar. Valoarea implicită depinde de \fIprestabilit\fP: +0 folosește \fBhc3\fP, 1\(en3 folosește \fBhc4\fP, iar restul folosește \fBbt4\fP. +.IP "" +Sunt acceptate următoarele opțiuni de căutare de potriviri. Formulele de +utilizare a memoriei de mai jos sunt aproximări estimative, care se apropie +cel mai mult de realitate atunci când \fIdict\fP este o putere a lui doi. +.RS +.TP +\fBhc3\fP +Lanț de sumă de control, cu suma de control de 2 și 3 octeți +.br +Valoarea minimă pentru \fInice\fP: 3 +.br +Utilizarea memoriei: +.br +\fIdict\fP * 7.5 (dacă \fIdict\fP <= 16 Mio); +.br +\fIdict\fP * 5.5 + 64 MiB (dacă \fIdict\fP > 16 Mio) +.TP +\fBhc4\fP +Lanț de sumă de control, cu suma de control de 2, 3 și 4 octeți +.br +Valoarea minimă pentru \fInice\fP: 4 +.br +Utilizarea memoriei: +.br +\fIdict\fP * 7.5 (dacă \fIdict\fP <= 32 Mio); +.br +\fIdict\fP * 6.5 (dacă \fIdict\fP > 32 Mio) +.TP +\fBbt2\fP +Arbore binar cu suma de control de 2 octeți +.br +Valoarea minimă pentru \fInice\fP: 2 +.br +Utilizarea memoriei: \fIdict\fP * 9.5 +.TP +\fBbt3\fP +Arbore binar cu suma de control de 2 și 3 octeți +.br +Valoarea minimă pentru \fInice\fP: 3 +.br +Utilizarea memoriei: +.br +\fIdict\fP * 11.5 (dacă \fIdict\fP <= 16 Mio); +.br +\fIdict\fP * 9.5 + 64 MiB (dacă \fIdict\fP > 16 Mio) +.TP +\fBbt4\fP +Arbore binar cu suma de control de 2, 3 și 4 octeți +.br +Valoarea minimă pentru \fInice\fP: 4 +.br +Utilizarea memoriei: +.br +\fIdict\fP * 11.5 (dacă \fIdict\fP <= 32 Mio); +.br +\fIdict\fP * 10.5 (dacă \fIdict\fP > 32 Mio) +.RE +.TP +\fBmode=\fP\fImod\fP +Comprimarea \fImod\fP specifică metoda de analiză a datelor produse de +găsitorul de potriviri. \fIModurile\fP acceptate sunt \fBfast\fP(rapid) și +\fBnormal\fP. Valoarea implicită este \fBfast\fP pentru \fIprestabiliri\fP 0\(en3 și +\fBnormal\fP pentru \fIprestabiliri\fP 4\(en9. +.IP "" +De obicei, \fBfast\fP este folosit cu instrumentele de căutare de potriviri ale +lanțului de sume de control, și \fBnormal\fP cu instrumentele de căutare de +potriviri din arborele binar. Aceasta este și ceea ce fac \fIprestabiririle\fP. +.TP +\fBnice=\fP\fInice\fP +Specifică ceea ce este considerat a fi o lungime bună(nice) pentru o +potrivire. Odată ce este găsită o potrivire de cel puțin \fInice\fP octeți, +algoritmul nu mai caută după potriviri posibile mai bune. +.IP "" +\fINice\fP poate fi de 2\(en273 octeți. Valorile mai mari tind să ofere un +raport de comprimare mai bun în detrimentul vitezei. Valoarea implicită +depinde de \fIprestabilit\fP. +.TP +\fBdepth=\fP\fIadâncimea\fP +Specifică adâncimea maximă de căutare în găsitorul de potriviri. Valoarea +implicită este valoarea specială de 0, ceea ce face ca instrumentul de +comprimare să determine o \fIadâncime\fP rezonabilă pornind de la valorile +\fImf\fP și \fInice\fP. +.IP "" +\fIAdâncimea\fP rezonabilă pentru lanțuri de sumă de control este 4\(en100 și +16\(en1000 pentru arbori binari. Folosirea unor valori foarte mari pentru +\fIadâncime\fP poate face codificatorul extrem de lent cu unele +fișiere. Evitați să stabiliți \fIadâncimea\fP la valori peste 1000, cu excepția +cazului în care sunteți pregătit să întrerupeți comprimarea în cazul în care +durează prea mult. +.RE +.IP "" +La decodificarea fluxurilor brute (\fB\-\-format=raw\fP), LZMA2 are nevoie doar +de \fIdimensiunea\fP dicționarului. LZMA1 are nevoie de asemenea de \fIlc\fP, +\fIlp\fP și \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIopțiuni\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIopțiuni\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIopțiuni\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIopțiuni\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIopțiuni\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIopțiuni\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIopțiuni\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIopțiuni\fP] +.PD +Adaugă un filtru de ramură/apel/salt (branch/call/jump ⟶ „BCJ”) la lanțul de +filtre. Aceste filtre pot fi utilizate numai ca un filtru care nu este +ultimul din lanțul de filtrare. +.IP "" +Un filtru BCJ convertește adresele relative din codul mașinii în omoloagele +lor absolute. Acest lucru nu modifică dimensiunea datelor, dar crește +redundanța, ceea ce poate ajuta LZMA2 să producă fișier \fB.xz\fP cu 0\(en15\ % +mai mic. Filtrele BCJ sunt întotdeauna reversibile, deci folosind un filtru +BCJ pentru tipul greșit de date nu provoacă nicio pierdere de date, deși +poate înrăutăți puțin raportul de comprimare. Filtrele BCJ sunt foarte +rapide și folosesc o cantitate nesemnificativă de memorie. +.IP "" +Aceste filtre BCJ au probleme cunoscute legate de raportul de comprimare: +.RS +.IP \(bu 3 +Unele tipuri de fișiere care conțin cod executabil (de exemplu, fișiere +obiect, biblioteci statice și module de kernel Linux) au adresele din +instrucțiuni completate cu valori de umplere. Aceste filtre BCJ vor face în +continuare conversia adresei, ceea ce va înrăutăți comprimarea cu aceste +fișiere. +.IP \(bu 3 +Dacă pe o arhivă este aplicat un filtru BCJ, este posibil ca raportul de +comprimare să fie mai rău decât la neutilizarea unui filtru BCJ. De exemplu, +dacă există executabile similare sau chiar identice, filtrarea va face +probabil fișierele mai puțin asemănătoare și astfel comprimarea este mai +proastă. Conținutul fișierelor neexecutabile din aceeași arhivă poate conta +și el. În practică, trebuie să încercați cu și fără filtru BCJ pentru a +vedea care rezultat este mai bun în fiecare situație. +.RE +.IP "" +Seturi de instrucțiuni diferite au o aliniere diferită: fișierul executabil +trebuie aliniat la un multiplu al acestei valori în datele de intrare pentru +ca filtrul să funcționeze. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Filtru;Aliniere;Note +x86;1;x86 pe 32 de biți +;;sau 64 de biți +ARM;4; +ARM\-Thumb;2; +ARM64;4;alinierea pe 4096\-octeți +;;este cea mai bună +PowerPC;4;Doar big endian +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Deoarece datele filtrate prin BCJ sunt de obicei comprimate cu LZMA2, +raportul de comprimare poate fi ușor îmbunătățit dacă opțiunile LZMA2 sunt +definite pentru a se potrivi cu alinierea filtrului BCJ selectat. Exemple: +.RS +.IP \(bu 3 +Filtrul IA\-64 are o aliniere de 16 octeți, astfel încât \fBpb=4,lp=4,lc=0\fP +este alegere adecvată cu LZMA2 (2^4=16). +.IP \(bu 3 +Codul RISC\-V are o aliniere pe 2 sau 4 octeți, depinzând de faptul că +fișierul conține instrucțiuni comprimate pe 16 biți (extensia C) sau +nu. Atunci când se utilizează instrucțiuni pe 16 biți, \fBpb=2,lp=1,lc=3\fP sau +\fBpb=1,lp=1,lc=3\fP este o alegere bună. Atunci când nu sunt prezente +instrucțiuni pe 16 biți, \fBpb=2,lp=2,lc=2\fP este cea mai bună +alegere. \fBreadelf \-h\fP poate fi utilizată pentru a verifica dacă „RVC” apare +în linia „Indicatori". +.IP \(bu 3 +ARM64 este întotdeauna aliniat pe 4 octeți, astfel încât \fBpb=2,lp=2,lc=2\fP +este cea mai bună alegere. +.IP \(bu 3 +Filtrul x86 este o excepție. De obicei, este bine să rămâneți la valorile +implicite ale LZMA2 (\fBpb=2,lp=0,lc=3\fP) atunci când comprimați executabile +x86. +.RE +.IP "" +Toate filtrele BCJ acceptă același \fIopțiuni\fP: +.RS +.TP +\fBstart=\fP\fIpoziție\fP +Specifică \fIpoziția\fP de pornire care este utilizată la conversia între +adresele relative și absolute. \fIPoziția\fP trebuie să fie un multiplu al +alinierii filtrului (consultați tabelul de mai sus). Valoarea implicită +este zero. În practică, valoarea implicită este bună; specificarea unei +\fIpoziții\fP personalizate nu este aproape niciodată utilă. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIopțiuni\fP] +Adaugă filtrul Delta în lanțul de filtrare. Filtrul Delta poate fi folosit +doar ca un filtru care nu este ultimul în lanțul de filtrare. +.IP "" +În prezent, este acceptat doar calculul delta simplu de octeți. Poate fi +util la comprimarea, de exemplu, a imaginilor bitmap necomprimate sau a +sunetului PCM necomprimat. Cu toate acestea, algoritmii cu scop special pot +da rezultate semnificativ mai bune decât Delta + LZMA2. Acest lucru este +valabil mai ales în cazul audio, care se comprimă mai repede și mai bine, de +exemplu, cu \fBflac\fP(1). +.IP "" +\fIOpțiuni\fP acceptate: +.RS +.TP +\fBdist=\fP\fIdistanța\fP +Specifică \fIdistanța\fP calculului delta în octeți. \fIDistanța\fP trebuie să fie +1\(en256. Valoarea implicită este 1. +.IP "" +De exemplu, cu \fBdist=2\fP și intrare de opt octeți: A1 B1 A2 B3 A3 B5 A4 B7, +ieșirea va fi: A1 B1 01 02 01 02 01 02. +.RE +. +.SS "Alte opțiuni" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Suprimă avertismentele și notificările. Specificați acest lucru de două ori +pentru a suprima și erorile. Această opțiune nu are niciun efect asupra +stării de ieșire. Adică, chiar dacă o avertizare a fost suprimată, starea de +ieșire pentru a indica o avertizare este încă utilizată. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +Oferă informații detaliate. Dacă ieșirea de eroare standard este conectată +la un terminal, \fBxz\fP va afișa un indicator de progres. Specificarea +opțiunii \fB\-\-verbose\fP de două ori, va avea ca rezultat oferirea de +informații și mai detaliate. +.IP "" +Indicatorul de progres afișează următoarele informații: +.RS +.IP \(bu 3 +Procentul de completare este afișat dacă se cunoaște dimensiunea fișierului +de intrare. Adică, procentul nu poate fi afișat la procesarea fișierului +prin conducte(pipe). +.IP \(bu 3 +Cantitatea de date comprimate produse (comprimare) sau consumate +(decomprimare). +.IP \(bu 3 +Cantitatea de date necomprimate consumate (comprimare) sau produse +(decomprimare). +.IP \(bu 3 +Raportul de comprimare, care se calculează împărțind cantitatea de date +comprimate procesate până acum la cantitatea de date necomprimate procesate +până acum. +.IP \(bu 3 +Viteza de comprimare sau decomprimare. Aceasta este măsurată drept +cantitatea de date necomprimate consumate (comprimare) sau produse +(decomprimare) pe secundă. Este afișată după ce au trecut câteva secunde de +când \fBxz\fP a început procesarea fișierului. +.IP \(bu 3 +Timpul scurs în format M:SS sau H:MM:SS. +.IP \(bu 3 +Timpul rămas estimat este afișat numai atunci când dimensiunea fișierului de +intrare este cunoscută și au trecut deja câteva secunde de când \fBxz\fP a +început procesarea fișierului. Ora este afișată într\-un format mai puțin +precis, care nu are niciodată două puncte, de exemplu, 2 min 30 s. +.RE +.IP "" +Când ieșirea de eroare standard nu este un terminal, \fB\-\-verbose\fP va face +\fBxz\fP să imprime numele fișierului, dimensiunea comprimată, dimensiunea +necomprimată, raportul de comprimare și, eventual, de asemenea, viteza și +timpul scurs pe o singură linie la ieșirea de eroare standard după +comprimarea sau decomprimarea fișierului. Viteza și timpul scurs sunt +incluse numai atunci când operațiunea a durat cel puțin câteva secunde. Dacă +operațiunea nu s\-a încheiat, de exemplu, din cauza întreruperii din partea +utilizatorului, se imprimă și procentul de completare dacă se cunoaște +dimensiunea fișierului de intrare. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Nu comută starea de ieșire la 2 chiar dacă a fost detectată o condiție care +merită avertizată. Această opțiune nu afectează nivelul de detaliere al +informațiilor, astfel încât atât \fB\-\-quiet\fP cât și \fB\-\-no\-warn\fP trebuie +folosite pentru a nu afișa avertismente și pentru a nu modifica starea de +ieșire. +.TP +\fB\-\-robot\fP +Afișează mesajele într\-un format care poate fi analizat de mașină. Acest +lucru are scopul de a ușura scrierea interfețelor în care se dorește să se +folosească \fBxz\fP în loc de liblzma, ceea ce poate fi cazul cu diferite +scripturi. Ieșirea cu această opțiune activată este menită să fie stabilă în +toate versiunile \fBxz\fP. Consultați secțiunea \fBMOD ROBOT\fP pentru detalii. +.TP +\fB\-\-info\-memory\fP +Afișează, într\-un format care poate fi citit de om, câtă memorie fizică +(RAM) și câte fire de execuție de procesor \fBxz\fP crede că are sistemul și +limitele de utilizare a memoriei pentru comprimare și decomprimare și iese +cu succes. +.TP +\fB\-h\fP, \fB\-\-help\fP +Afișează un mesaj de ajutor care descrie opțiunile cele mai frecvent +utilizate și iese cu succes. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +Afișează un mesaj de ajutor care descrie toate caracteristicile \fBxz\fP și +iese cu succes +.TP +\fB\-V\fP, \fB\-\-version\fP +Afișează numărul versiunii \fBxz\fP și liblzma într\-un format care poate fi +citit de om. Pentru a obține rezultate analizabile de mașină, specificați +\fB\-\-robot\fP înainte de \fB\-\-version\fP. +. +.SH "MOD ROBOT" +Modul robot este activat cu opțiunea \fB\-\-robot\fP. Face ieșirea lui \fBxz\fP mai +ușor de analizat de către alte programe. În prezent, opțiunea \fB\-\-robot\fP +este acceptată numai împreună cu opțiunile \fB\-\-list\fP, \fB\-\-filters\-help\fP, +\fB\-\-info\-memory\fP, și \fB\-\-version\fP. Va fi acceptată pentru comprimare și +decomprimare în viitor. +. +.SS "Modul listă" +\fBxz \-\-robot \-\-list\fP utilizează o ieșire separată de tabulatori. Prima +coloană a fiecărei linii are un șir care indică tipul de informații găsite +pe acea linie: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +Aceasta este întotdeauna prima linie când începe să se listeze un fișier. A +doua coloană de pe linie este numele fișierului. +.TP +\fBfile\fP +Această linie conține informații generale despre fișierul \fB.xz\fP. Această +linie este întotdeauna tipărită după linia \fBname\fP. +.TP +\fBstream\fP +Acest tip de linie este utilizat numai atunci când a fost specificată +opțiunea \fB\-\-verbose\fP. Există tot atâtea linii \fBstream\fP câte fluxuri există +în fișierul \fB.xz\fP. +.TP +\fBblock\fP +Acest tip de linie este utilizat numai atunci când a fost specificată +opțiunea \fB\-\-verbose\fP. Există tot atâtea linii \fBblock\fP câte blocuri există +în fișierul \fB.xz\fP. Liniile \fBblock\fP sunt afișate după toate liniile +\fBstream\fP; tipurile diferite de linii nu sunt intercalate. +.TP +\fBsummary\fP +Acest tip de linie este folosit numai atunci când opțiunea \fB\-\-verbose\fP a +fost specificată de două ori. Această linie este afișată după toate liniile +\fBblock\fP. Ca și linia \fBfile\fP, linia \fBsummary\fP conține informații generale +despre fișierul \fB.xz\fP. +.TP +\fBtotals\fP +Această linie este întotdeauna ultima linie din lista afișată la +ieșire. Aceasta arată numărul total și dimensiunile. +.PP +Coloanele din liniile \fBfile\fP: +.PD 0 +.RS +.IP 2. 4 +Numărul de fluxuri din fișier +.IP 3. 4 +Numărul total de blocuri din fluxuri +.IP 4. 4 +Dimensiunea comprimată a fișierului +.IP 5. 4 +Dimensiunea necomprimată a fișierului +.IP 6. 4 +Raportul de comprimare, de exemplu, \fB0,123\fP. Dacă raportul este peste +9,999, în locul raportului sunt afișate trei liniuțe (\fB\-\-\-\fP). +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Lista de nume de verificare a integrității, separate prin +virgule. Următoarele șiruri sunt utilizate pentru tipurile de verificare +cunoscute: \fBNone\fP, \fBCRC32\fP, \fBCRC64\fP și \fBSHA\-256\fP. Pentru tipurile de +verificări necunoscute, se utilizează \fBUnknown\-\fP\fIN\fP, unde \fIN\fP este ID\-ul +de verificare ca număr zecimal (una sau două cifre). +.IP 8. 4 +Dimensiunea totală a umpluturii fluxului din fișier +.RE +.PD +.PP +Coloanele din liniile \fBstream\fP: +.PD 0 +.RS +.IP 2. 4 +Numărul fluxului (primul flux este 1) +.IP 3. 4 +Numărul de blocuri din flux +.IP 4. 4 +Poziția de pornire a comprimării +.IP 5. 4 +Poziția de pornire a decomprimării +.IP 6. 4 +Dimensiune comprimată (nu include umplutura fluxului) +.IP 7. 4 +Dimensiune necomprimată +.IP 8. 4 +Raport de comprimare +.IP 9. 4 +Numele verificării de integritate +.IP 10. 4 +Dimensiunea umpluturii fluxului +.RE +.PD +.PP +Coloanele din liniile \fBblock\fP: +.PD 0 +.RS +.IP 2. 4 +Numărul fluxului care conține acest bloc +.IP 3. 4 +Numărul blocului în raport cu începutul fluxului (primul bloc este 1) +.IP 4. 4 +Numărul blocului în raport cu începutul fișierului +.IP 5. 4 +Poziția de pornire a comprimării în raport cu începutul fișierului +.IP 6. 4 +Poziția de pornire necomprimată în raport cu începutul fișierului +.IP 7. 4 +Dimensiunea totală comprimată a blocului (include antetele) +.IP 8. 4 +Dimensiune necomprimată +.IP 9. 4 +Raport de comprimare +.IP 10. 4 +Numele verificării de integritate +.RE +.PD +.PP +Dacă opțiunea \fB\-\-verbose\fP a fost specificată de două ori, coloane +suplimentare sunt incluse pe liniile \fBblock\fP. Acestea nu sunt afișate cu o +singură specificare a opțiunii \fB\-\-verbose\fP, deoarece obținerea acestor +informații necesită multe căutări și, prin urmare, poate fi lentă: +.PD 0 +.RS +.IP 11. 4 +Valoarea verificării integrității în hexazecimal +.IP 12. 4 +Dimensiunea antetului blocului +.IP 13. 4 +Indicatori de bloc: \fBc\fP indică faptul că este prezentă dimensiunea +comprimată, iar \fBu\fP indică faptul că este prezentă dimensiunea +necomprimată. Dacă indicatorul nu este determinat, este afișată o liniuță +(\fB\-\fP) pentru a menține lungimea șirului fixă. Pot fi adăugate noi +indicatoare la sfârșitul șirului, în viitor. +.IP 14. 4 +Dimensiunea datelor comprimate reale din bloc (acest lucru exclude antetul +blocului, umplutura blocului și câmpurile de verificare) +.IP 15. 4 +Cantitatea de memorie (în octeți) necesară pentru a decomprima acest bloc cu +această versiune \fBxz\fP +.IP 16. 4 +Lanț de filtrare. Rețineți că majoritatea opțiunilor utilizate în timpul +comprimării nu pot fi cunoscute, deoarece doar opțiunile necesare pentru +decomprimare sunt stocate în anteturile \fB.xz\fP. +.RE +.PD +.PP +Coloanele din liniile \fBsummary\fP: +.PD 0 +.RS +.IP 2. 4 +Cantitatea de memorie (în octeți) necesară pentru a decomprima acest fișier +cu această versiune \fBxz\fP +.IP 3. 4 +\fByes\fP sau \fBno\fP indicând dacă toate antetele blocurilor au atât dimensiunea +comprimată, cât și dimensiunea necomprimată stocate în ele +.PP +\fIÎncepând cu\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Versiunea \fBxz\fP minimă necesară pentru a decomprima fișierul +.RE +.PD +.PP +Coloanele din linia \fBtotals\fP: +.PD 0 +.RS +.IP 2. 4 +Numărul de fluxuri +.IP 3. 4 +Numărul de blocuri +.IP 4. 4 +Dimensiunea comprimată +.IP 5. 4 +Dimensiune necomprimată +.IP 6. 4 +Raportul mediu de comprimare +.IP 7. 4 +Lista de nume de verificare a integrității, separate prin virgule, care au +fost prezente în fișiere +.IP 8. 4 +Dimensiunea umpluturii fluxului +.IP 9. 4 +Numărul de fișiere. Aceasta este aici pentru a păstra ordinea coloanelor +anterioare la fel ca pe liniile \fBfile\fP. +.PD +.RE +.PP +Dacă opțiunea \fB\-\-verbose\fP a fost specificată de două ori, pe linia +\fBtotals\fP sunt incluse coloane suplimentare: +.PD 0 +.RS +.IP 10. 4 +Cantitatea maximă de memorie (în octeți) necesară pentru a decomprima +fișierele cu această versiune \fBxz\fP +.IP 11. 4 +\fByes\fP sau \fBno\fP indicând dacă toate antetele blocurilor au atât dimensiunea +comprimată, cât și dimensiunea necomprimată stocate în ele +.PP +\fIÎncepând cu\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Versiunea \fBxz\fP minimă necesară pentru a decomprima fișierul +.RE +.PD +.PP +Versiunile viitoare pot adăuga noi tipuri de linii și pot fi adăugate +coloane noi la tipurile de linii existente, dar coloanele existente nu vor +fi modificate. +. +.SS "Ajutor pentru filtrare" +\fBxz \-\-robot \-\-filters\-help\fP afișează filtrele acceptate în următorul +format: +.PP +\fIfiltru\fP\fB:\fP\fIopțiune\fP\fB=<\fP\fIvaloare\fP\fB>,\fP\fIopțiune\fP\fB=<\fP\fIvaloare\fP\fB>\fP... +.TP +\fBfiltru\fP +Numele filtrului +.TP +\fIopțiune\fP +Numele unei opțiuni specifice unui filtru +.TP +\fIvaloare\fP +Intervalele numerice \fIvaloare\fP apar ca +\fB<\fP\fImin\fP\fB\-\fP\fImax\fP\fB>\fP. Alegerile \fIvaloare\fP de tip șir de +caractere sunt afișate în cadrul \fB< >\fP și separate de un caracter +\fB|\fP. +.PP +Fiecare filtru este afișat pe propria linie. +. +.SS "Informații privind limita memoriei" +\fBxz \-\-robot \-\-info\-memory\fP afișează o singură linie cu multiple coloane +separate prin tabulatoare: +.IP 1. 4 +Cantitatea totală de memorie fizică (RAM) în octeți. +.IP 2. 4 +Limita de utilizare a memoriei pentru comprimare în octeți +(\fB\-\-memlimit\-compress\fP). O valoare specială de \fB0\fP indică configurarea +implicită, care pentru modul cu un singur fir este la fel ca fără limită. +.IP 3. 4 +Limita de utilizare a memoriei pentru decomprimare în octeți +(\fB\-\-memlimit\-decompress\fP). O valoare specială de \fB0\fP indică configurarea +implicită, care pentru modul cu un singur fir este la fel ca fără limită. +.IP 4. 4 +Începând cu \fBxz\fP 5.3.4alpha: Utilizarea memoriei pentru decomprimarea cu +mai multe fire în octeți (\fB\-\-memlimit\-mt\-decompress\fP). Acesta nu este +niciodată zero, deoarece o valoare implicită specifică sistemului afișată în +coloana 5 este utilizată dacă nu a fost specificată în mod explicit nicio +limită. De asemenea, aceasta nu este niciodată mai mare decât valoarea din +coloana 3, chiar dacă a fost specificată o valoare mai mare cu +\fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +Începând cu \fBxz\fP 5.3.4alpha: o limită implicită de utilizare a memoriei +specifică sistemului, care este utilizată pentru a limita numărul de fire de +execuție atunci când se comprimă cu un număr automat de fire de execuție +(\fB\-\-threads=0\fP) și nicio limită de utilizare a memoriei nu fost specificată +cu (\fB\-\-memlimit\-compress\fP). Aceasta este, de asemenea, utilizată ca valoare +implicită pentru \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +Începând cu \fBxz\fP 5.3.4alpha: numărul de fire de execuție de procesor +disponibile. +.PP +În viitor, rezultatul \fBxz \-\-robot \-\-info\-memory\fP poate avea mai multe +coloane, dar niciodată mai mult de o singură linie. +. +.SS Versiunea +\fBxz \-\-robot \-\-version\fP va afișa numărul versiunii \fBxz\fP și liblzma în +următorul format: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Versiunea majoră. +.TP +\fIYYY\fP +Versiunea minoră. Numerele pare sunt prezente în versiunile +stabile. Numerele impare sunt prezente în versiunile alfa sau beta. +.TP +\fIZZZ\fP +Nivelul de plasture(patch) pentru versiunile stabile sau doar un contor +pentru versiunile de dezvoltare. +.TP +\fIS\fP +Stabilitate. 0 este alfa, 1 este beta și 2 este stabil. \fIS\fP trebuie să fie +întotdeauna 2 atunci când \fIAAA\fP este par. +.PP +\fIXYYYZZZS\fP sunt aceleași pe ambele linii dacă \fBxz\fP și liblzma sunt din +aceeași versiune XZ Utils. +.PP +Exemple: 4.999.9beta este \fB49990091\fP și 5.0.0 este \fB50000002\fP. +. +.SH "STARE DE IEȘIRE" +.TP +\fB0\fP +Totul este bine. +.TP +\fB1\fP +A apărut o eroare. +.TP +\fB2\fP +A apărut ceva care merită să fie avertizat, dar nu au apărut erori reale. +.PP +Notificările (nu avertismentele sau erorile) afișate la ieșirea de eroare +standard nu afectează starea de ieșire. +. +.SH "VARIABILE DE MEDIU" +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP analizează liste de opțiuni separate prin spații din variabilele de +mediu \fBXZ_DEFAULTS\fP și \fBXZ_OPT\fP, în această ordine, înainte de a analiza +opțiunile din linia de comandă. Rețineți că numai opțiunile sunt analizate +din variabilele de mediu; toate non\-opțiunile sunt ignorate în +tăcere. Analiza se face cu funcția \fBgetopt_long\fP(3) care este folosită și +pentru argumentele liniei de comandă. +.PP +\fBAvertisment:\fP Prin definirea acestor variabile de mediu, se modifică +efectiv programele și scripturile care rulează \fBxz\fP. De cele mai multe ori +este sigur să se definească limitele de utilizare a memoriei, numărul de +fire și opțiunile de comprimare prin intermediul variabilelor de mediu. Cu +toate acestea, unele opțiuni pot întrerupe scripturile. Un exemplu evident +este \fB\-\-help\fP care face ca \fBxz\fP să afișeze textul de ajutor în loc să +comprime sau să decomprime un fișier. Exemple mai subtile sunt \fB\-\-quiet\fP și +\fB\-\-verbose\fP. În multe cazuri funcționează bine activarea indicatorului de +progres folosind \fB\-\-verbose\fP, dar în unele situații mesajele suplimentare +creează probleme. Nivelul de detaliere al mesajelor afectează, de asemenea, +comportamentul lui \fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +Opțiuni implicite specifice utilizatorului sau la nivelul întregului +sistem. De obicei, acest lucru este specificat într\-un script de +inițializare shell pentru a activa limitatorul de utilizare a memoriei lui +\fBxz\fP implicit sau pentru a stabili numărul implicit de fire. Excluzând +scripturile de inițializare shell și cazurile speciale similare, scripturile +nu trebuie niciodată să modifice sau să dezactiveze \fBXZ_DEFAULTS\fP. +.TP +\fBXZ_OPT\fP +Acest lucru este pentru transmiterea opțiunilor către \fBxz\fP atunci când nu +este posibil să definiți opțiunile direct în linia de comandă a +\fBxz\fP. Acesta este cazul când \fBxz\fP este rulat de un script sau de un +instrument, de exemplu, GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +Scripturile pot folosi \fBXZ_OPT\fP, de exemplu, pentru a configura opțiunile +implicite de comprimare specifice scriptului. Se recomandă totuși să se +permită utilizatorilor să înlocuiască \fBXZ_OPT\fP dacă acest lucru este +rezonabil. De exemplu, în scripturile \fBsh\fP(1) se poate folosi ceva de genul +acesta: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "COMPATIBILITATE CU LZMA\-UTILS" +Sintaxa liniei de comandă a lui \fBxz\fP este practic o super\-colecție de +\fBlzma\fP, \fBunlzma\fP și \fBlzcat\fP așa cum se găsește în LZMA Utils 4.32.x. În +cele mai multe cazuri, este posibil să înlocuiți LZMA Utils cu XZ Utils fără +a întrerupe scripturile existente. Există totuși unele incompatibilități, +care uneori pot cauza probleme. +. +.SS "Niveluri de comprimare prestabilite" +Numerotarea nivelurilor de comprimare prestabilite nu este identică în \fBxz\fP +și LZMA Utils. Cea mai importantă diferență este modul în care dimensiunile +dicționarului sunt atribuite diferitelor niveluri prestabilite. Dimensiunea +dicționarului este aproximativ egală cu memoria utilizată la decomprimare. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Nivel;xz;LZMA Utils +\-0;256 KiB;N/A +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +Diferențele de dimensiune a dicționarului afectează deasemenea cantitatea de +memorie utilizată la comprimare dar există și alte diferențe între LZMA +Utils și XZ Utils, care fac diferența și mai mare: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Nivel;xz;LZMA Utils 4.32.x +\-0;3 MiB;N/A +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +Nivelul prestabilit implicit în LZMA Utils este \fB\-7\fP, în timp ce în XZ +Utils este \fB\-6\fP, deci ambele folosesc un dicționar de 8Mio în mod implicit. +. +.SS "Fișiere .lzma transmise în flux vs. netransmise în flux" +Dimensiunea necomprimată a fișierului poate fi stocată în antetul +\&\fB.lzma\fP. LZMA Utils face asta atunci când comprimă fișiere +obișnuite. Alternativa este să marcați că dimensiunea necomprimată este +necunoscută și să folosiți marcajul de sfârșit de încărcare pentru a indica +unde ar trebui să se oprească decomprimarea. LZMA Utils folosește această +metodă atunci când dimensiunea necomprimată nu este cunoscută, ceea ce este +cazul, de exemplu, când se folosesc conducte. +.PP +\fBxz\fP acceptă decomprimarea fișierelor \fB.lzma\fP cu sau fără marcaj de +sfârșit de încărcare, dar toate fișierele \fB.lzma\fP create de \fBxz\fP vor +folosi marcajul de sfârșit de încărcare și vor avea dimensiunea necomprimată +marcată ca necunoscută în antetul \fB.lzma\fP. Aceasta poate fi o problemă în +unele situații mai puțin frecvente. De exemplu, un instrument de +decomprimare \fB.lzma\fP încorporat într\-un dispozitiv poate funcționa numai cu +fișiere care au dimensiunea necomprimată cunoscută. Dacă întâmpinați această +problemă, trebuie să utilizați LZMA Utils sau LZMA SDK pentru a crea fișiere +\&\fB.lzma\fP cu dimensiunea necomprimată cunoscută. +. +.SS "Fișiere .lzma neacceptate" +Formatul \fB.lzma\fP permite valori \fIlc\fP de până la 8 și valori \fIlp\fP de până +la 4. LZMA Utils poate decomprima fișiere cu orice \fIlc\fP și \fIlp\fP, dar +creează întotdeauna fișiere cu \fBlc=3\fP și \fBlp=0\fP. Crearea de fișiere cu +alte \fIlc\fP și \fIlp\fP este posibilă cu \fBxz\fP și cu LZMA SDK. +.PP +Implementarea filtrului LZMA1 în liblzma necesită ca suma \fIlc\fP și \fIlp\fP să +nu depășească 4. Altfel, fișierele \fB.lzma\fP, care depășesc această limitare, +nu pot fi decomprimate cu \fBxz\fP. +.PP +LZMA Utils creează numai fișiere \fB.lzma\fP care au o dimensiune de dicționar +de 2^\fIn\fP (o putere de 2), dar acceptă fișiere cu orice dimensiune de +dicționar. liblzma acceptă numai fișierele \fB.lzma\fP care au dimensiunea de +dicționar de 2^\fIn\fP sau 2^\fIn\fP + 2^(\fIn\fP\-1). Acest lucru este pentru a +reduce numărul de „fals pozitiv” atunci când se detectează fișiere \fB.lzma\fP. +.PP +Aceste limitări nu ar trebui să fie o problemă în practică, deoarece practic +toate fișierele \fB.lzma\fP au fost comprimate cu opțiuni pe care liblzma le va +accepta. +. +.SS "Resturi rămase" +Când decomprimă, LZMA Utils ignoră în tăcere totul după primul flux +\&\fB.lzma\fP. În majoritatea situațiilor, aceasta este o eroare. Aceasta +înseamnă, de asemenea, că LZMA Utils nu acceptă decomprimarea fișierelor +\&\fB.lzma\fP concatenate. +.PP +Dacă au rămas date după primul flux \fB.lzma\fP, \fBxz\fP consideră că fișierul +este corupt, cu excepția cazului în care a fost utilizată opțiunea +\fB\-\-single\-stream\fP. Acest lucru poate rupe scripturile obscure(scrise +deficitar) care presupun că resturile rămase sunt ignorate. +. +.SH NOTE +. +.SS "Rezultatul comprimării poate varia" +Ieșirea exactă comprimată produsă din același fișier de intrare necomprimat +poate varia între versiunile XZ Utils, chiar dacă opțiunile de comprimare +sunt identice. Acest lucru se datorează faptului că instrumentul codificator +poate fi îmbunătățit (comprimare mai rapidă sau mai bună) fără a afecta +formatul fișierului. Ieșirea poate varia chiar și între compilările diferite +ale aceleiași versiuni XZ Utils, dacă sunt utilizate opțiuni diferite de +compilare. +.PP +Cele de mai sus înseamnă că odată ce opțiunea \fB\-\-rsyncable\fP a fost +utilizată, fișierele rezultate nu vor fi neapărat sincronizate cu rsync +decât dacă atât fișierele vechi, cât și cele noi au fost comprimate cu +aceeași versiune xz. Această problemă poate fi remediată dacă o parte a +implementării codificatorului este înghețată pentru a menține stabilă +ieșirea „rsyncabilă” între versiunile xz. +. +.SS "Instrumente de decomprimare .xz încorporate" +Implementările instrumentului de decomprimare \fB.xz\fP încorporat, cum ar fi +XZ Embedded, nu acceptă neapărat fișiere create cu tipuri de \fIverificare\fP a +integrității, altele decât \fBnone\fP și \fBcrc32\fP. Deoarece valoarea implicită +este \fB\-\-check=crc64\fP, trebuie să utilizați \fB\-\-check=none\fP sau +\fB\-\-check=crc32\fP atunci când creați fișiere pentru sistemele încorporate. +.PP +În afara sistemelor încorporate, toate instrumentele de decomprimare în +format \fB.xz\fP acceptă toate tipurile de \fIverificare\fP sau cel puțin pot +decomprima fișierul fără a efectua verificarea integrității dacă acel tip de +\fIverificare\fP nu este acceptat. +.PP +XZ Embedded acceptă filtre BCJ, dar numai cu poziție de pornire implicită. +. +.SH EXEMPLE +. +.SS Bazice +Comprimă fișierul \fIfoo\fP în \fIfoo.xz\fP folosind nivelul de comprimare +implicit (\fB\-6\fP) și elimină fișierul \fIfoo\fP dacă comprimarea are succes: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +Decomprimă \fIbar.xz\fP în \fIbar\fP și nu elimină \fIbar.xz\fP chiar dacă +decomprimarea este efectuată cu succes: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +Creează \fIbaz.tar.xz\fP cu nivelul prestabilit \fB\-4e\fP (\fB\-4 \-\-extreme\fP), care +este mai lent decât nivelul prestabilit implicit \fB\-6\fP, dar necesită mai +puțină memorie pentru comprimare și decomprimare (48Mio și, respectiv, +5Mio): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +Un amestec de fișiere comprimate și necomprimate poate fi decomprimat la +ieșirea standard cu o singură comandă: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Comprimarea în paralel a mai multor fișiere" +În sisteme GNU și *BSD, \fBfind\fP(1) și \fBxargs\fP(1) pot fi utilizate pentru a +paraleliza comprimarea mai multor fișiere: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +Opțiunea \fB\-P\fP pentru comanda \fBxargs\fP(1) stabilește numărul de procese +paralele \fBxz\fP. Cea mai bună valoare pentru opțiunea \fB\-n\fP depinde de câte +fișiere trebuie să fie comprimate. Dacă există doar câteva fișiere, valoarea +ar trebui probabil să fie 1; cu zeci de mii de fișiere, 100 sau chiar mai +mult poate să fie valoarea potrivită pentru a reduce numărul de procese +\fBxz\fP pe care \fBxargs\fP(1) le va crea în final. +.PP +Opțiunea \fB\-T1\fP pentru \fBxz\fP este acolo pentru a\-l forța să ruleze în modul +cu un singur fir de execuție, deoarece \fBxargs\fP(1) este folosit pentru a +controla cantitatea de paralelizare. +. +.SS "Modul robot" +Calculează câți octeți au fost salvați în total după comprimarea mai multor +fișiere: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Un script poate dori să afle dacă folosește o versiune \fBxz\fP suficient de +nouă. Următorul script \fBsh\fP(1) verifică dacă numărul versiunii +instrumentului \fBxz\fP este cel puțin 5.0.0. Această metodă este compatibilă +cu versiunile beta vechi, care nu acceptau opțiunea \fB\-\-robot\fP: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Versiunea dumneavoastră de „xz” este prea veche!" +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Stabilește o limită de utilizare a memoriei pentru decomprimare folosind +variabila de mediu \fBXZ_OPT\fP, dar dacă o limită a fost deja stabilită, nu o +mărește: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Lanțuri de filtrare personalizate pentru instrumentul de comprimare" +Cea mai simplă utilizare a lanțurilor de filtrare personalizate este +personalizarea unei opțiuni prestabilite LZMA2. Acest lucru poate fi util, +deoarece opțiunile prestabilite acoperă doar un subset al combinațiilor +potențial utile de opțiuni de comprimare. +.PP +Coloanele CPUComp din tabelele de descriere a opțiunilor \fB\-0\fP ... \fB\-9\fP și +\fB\-\-extreme\fP sunt utile atunci când personalizați opțiunilor prestabilite +LZMA2. Iată părțile relevante colectate din aceste două tabele: +.RS +.PP +.TS +tab(;); +c c +n n. +ValPrestab;CPUComp +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +Dacă știți că un fișier necesită un dicționar oarecum mare (de exemplu, +32Mio) pentru a se comprima bine, dar doriți să\-l comprimați mai repede +decât ar face \fBxz \-8\fP, o opțiune prestabilită cu o valoare CPUComp scăzută +(de exemplu, 1) poate fi modificată pentru a utiliza un dicționar mai mare: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +Cu anumite fișiere, comanda de mai sus poate fi mai rapidă decât \fBxz \-6\fP în +timp ce comprimă semnificativ mai bine. Cu toate acestea, trebuie subliniat +că doar unele fișiere se beneficiază de un dicționar mare, păstrând în +același timp valoarea CPUComp scăzută. Cea mai evidentă situație, în care un +dicționar mare poate ajuta foarte mult, este o arhivă care conține fișiere +foarte asemănătoare de cel puțin câțiva megaocteți fiecare. Dimensiunea +dicționarului trebuie să fie semnificativ mai mare decât orice fișier +individual pentru a permite LZMA2 să profite din plin de asemănările dintre +fișierele consecutive. +.PP +Dacă utilizarea unei mari cantități de memorie pentru comprimare și +decomprimare este în regulă, iar fișierul comprimat are cel puțin câteva +sute de megaocteți, poate fi util să folosiți un dicționar și mai mare decât +cei 64Mio pe care i\-ar folosi \fBxz \-9\fP: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +Utilizarea opțiunii \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP) ca în exemplul de mai +sus, poate fi utilă pentru a vedea cerințele de memorie la comprimare și +decomprimare. Amintiți\-vă că utilizarea unui dicționar mai mare decât +dimensiunea fișierului necomprimat este risipă de memorie, de aceea, comanda +de mai sus nu este utilă pentru fișiere mici. +.PP +Uneori, timpul de comprimare nu contează, dar utilizarea memoriei la +decomprimare trebuie menținută la un nivel scăzut, de exemplu, pentru a face +posibilă decomprimarea fișierului pe un sistem încorporat. Următoarea +comandă folosește \fB\-6e\fP (\fB\-6 \-\-extreme\fP) ca bază și fixează dimensiunea +dicționarului la doar 64Kio. Fișierul rezultat poate fi decomprimat cu XZ +Embedded (de aceea există \fB\-\-check=crc32\fP) folosind aproximativ 100Kio de +memorie. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +Dacă doriți să stoarceți cât mai mulți octeți posibil, ajustarea numărului +de biți de context literal (\fIlc\fP) și a numărului de biți de poziție (\fIpb\fP) +poate ajuta uneori. Ajustarea numărului de biți de poziție literală (\fIlp\fP) +ar putea ajuta, de asemenea, dar de obicei \fIlc\fP și \fIpb\fP sunt mai +importante. De exemplu, o arhivă de cod sursă conține în mare parte text +US\-ASCII, așa că ceva precum comanda următoare, ar putea oferi un fișier +„mai slăbuț” (aproximativ cu 0,1%) mai mic decât cu \fBxz \-6e\fP (încercați și +fără \fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 fișierul_sursă.tar\fR +.fi +.RE +.PP +Utilizarea unui alt filtru împreună cu LZMA2 poate îmbunătăți comprimarea cu +anumite tipuri de fișiere. De exemplu, pentru a comprima o bibliotecă +partajată x86 pe 32 de biți sau x86 pe 64 de biți folosind filtrul BCJ x86: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +Rețineți că ordinea opțiunilor de filtrare este semnificativă. Dacă \fB\-\-x86\fP +este specificată după \fB\-\-lzma2\fP, \fBxz\fP va da o eroare, deoarece nu poate +exista niciun filtru după LZMA2 și, de asemenea, pentru că filtrul x86 BCJ +nu poate fi utilizat ca ultimul filtru din lanțul de filtrare. +.PP +Filtrul Delta împreună cu LZMA2 pot da rezultate bune cu imagini bitmap. De +obicei, ar trebui să întreacă comprimarea PNG, care are câteva filtre mai +avansate decât delta simplă, dar utilizează Deflate pentru comprimarea +reală. +.PP +Imaginea trebuie să fie salvată în format necomprimat, de exemplu, ca TIFF +necomprimat. Parametrul de distanță al filtrului Delta este fixat să se +potrivească cu numărul de octeți per pixel din imagine. De exemplu, +bitmap\-ul RGB pe 24 de biți necesită \fBdist=3\fP și este, de asemenea, bine să +pasați \fBpb=0\fP la LZMA2 pentru a se adapta alinierii pe trei octeți: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +Dacă mai multe imagini au fost introduse într\-o singură arhivă (de exemplu, +\&\fB.tar\fP), filtrul Delta va funcționa și pe aceasta atâta timp cât toate +imaginile au același număr de octeți per pixel. +. +.SH "CONSULTAȚI ȘI" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ro/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzdec.1 new file mode 100644 index 0000000000..2ba0113bc2 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzdec.1 @@ -0,0 +1,101 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Romanian translation for xz-man. +.\" Mesajele în limba română pentru manualul pachetului XZ Utils. +.\" Remus-Gabriel Chelu , 2022 - 2025. +.\" Cronologia traducerii fișierului „xz-man”: +.\" Traducerea inițială, făcută de R-GC, pentru versiunea xz-man 5.4.0-pre1. +.\" Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +.\" Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +.\" Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025. +.\" Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 "8 aprilie 2024" Tukaani "Utilități XZ" +.SH NUME +xzdec, lzmadec \- Programe de decomprimare mici de fișiere .xz și .lzma +.SH REZUMAT +\fBxzdec\fP [\fIopțiune...\fP] [\fIfișier...\fP] +.br +\fBlzmadec\fP [\fIopțiune...\fP] [\fIfișier...\fP] +.SH DESCRIERE +\fBxzdec\fP este un instrument de decomprimare bazat pe liblzma pentru +fișierele \fB.xz\fP (și numai \fB.xz\fP). \fBxzdec\fP este destinat să funcționeze ca +un înlocuitor pentru \fBxz\fP(1) în cele mai frecvente situații în care un +script a fost scris pentru a utiliza \fBxz \-\-decompress \-\-stdout\fP (și posibil +câteva alte opțiuni frecvent utilizate) pentru a decomprima fișierele +\&\fB.xz\fP. \fBlzmadec\fP este identic cu \fBxzdec\fP cu excepția faptului că +\fBlzmadec\fP acceptă fișierele \fB.lzma\fP în loc de fișierele \fB.xz\fP. +.PP +Pentru a reduce dimensiunea executabilului, \fBxzdec\fP nu acceptă modul cu mai +multe fire de execuție sau localizarea(afișarea mesajelor în limba stabilită +de configurările regionale) și nu citește opțiunile din variabilele de mediu +\fBXZ_DEFAULTS\fP și \fBXZ_OPT\fP. \fBxzdec\fP nu acceptă afișarea informațiilor +intermediare de progres: trimiterea semnalului \fBSIGINFO\fP la \fBxzdec\fP nu +face nimic, iar trimiterea semnalului \fBSIGUSR1\fP încheie procesul în loc să +afișeze informații despre progres. +.SH OPȚIUNI +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +Ignorat pentru compatibilitate cu \fBxz\fP(1). \fBxzdec\fP acceptă numai +decomprimarea. +.TP +\fB\-k\fP, \fB\-\-keep\fP +Ignorat pentru compatibilitate cu \fBxz\fP(1). \fBxzdec\fP nu creează sau elimină +niciodată niciun fișier. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Ignorat pentru compatibilitate cu \fBxz\fP(1). \fBxzdec\fP scrie întotdeauna +datele decomprimate la ieșirea standard. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Specificarea acestui lucru o dată nu face nimic, deoarece \fBxzdec\fP nu +afișează niciodată avertismente sau notificări. Specificați acest lucru de +două ori pentru a suprima erorile. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Ignorat pentru compatibilitate cu \fBxz\fP(1). \fBxzdec\fP nu folosește niciodată +starea de ieșire 2. +.TP +\fB\-h\fP, \fB\-\-help\fP +Afișează un mesaj de ajutor și iese cu succes. +.TP +\fB\-V\fP, \fB\-\-version\fP +Afișează numărul versiunii \fBxzdec\fP și liblzma. +.SH "STARE DE IEȘIRE" +.TP +\fB0\fP +Toate au fost bine. +.TP +\fB1\fP +A apărut o eroare. +.PP +\fBxzdec\fP nu are niciun mesaj de avertizare precum \fBxz\fP(1), astfel că starea +de ieșire 2 nu este folosită de \fBxzdec\fP. +.SH NOTE +Utilizați \fBxz\fP(1) în loc de \fBxzdec\fP sau \fBlzmadec\fP pentru utilizarea +normală de zi cu zi. \fBxzdec\fP sau \fBlzmadec\fP sunt destinate numai +situațiilor în care este important să aveți un instrument de decomprimare +mai mic decât \fBxz\fP(1), cu funcții complete. +.PP +\fBxzdec\fP și \fBlzmadec\fP nu sunt chiar atât de mici. Dimensiunea poate fi +redusă și mai mult prin eliminarea caracteristicilor din liblzma în timpul +compilării, dar acest lucru nu ar trebui să se facă de obicei pentru +executabilele distribuite în distribuții tipice de sisteme de operare +neîncorporate. Dacă aveți nevoie de un instrument de decomprimare \fB.xz\fP cu +adevărat mic, luați în considerare utilizarea XZ Embedded. +.SH "CONSULTAȚI ȘI" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ro/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzdiff.1 new file mode 100644 index 0000000000..cebad3bb3a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzdiff.1 @@ -0,0 +1,70 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Romanian translation for xz-man. +.\" Mesajele în limba română pentru manualul pachetului XZ Utils. +.\" Remus-Gabriel Chelu , 2022 - 2025. +.\" Cronologia traducerii fișierului „xz-man”: +.\" Traducerea inițială, făcută de R-GC, pentru versiunea xz-man 5.4.0-pre1. +.\" Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +.\" Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +.\" Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025. +.\" Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 "6 martie 2025" Tukaani "Utilități XZ" +.SH NUME +xzcmp, xzdiff, lzcmp, lzdiff \- compară fișierele comprimate +. +.SH REZUMAT +\fBxzcmp\fP [\fIopțiune...\fP] \fIfișier1\fP [\fIfișier2\fP] +.br +\fBxzdiff\fP \&... +.br +\fBlzcmp\fP \&... (DEPRECIATĂ) +.br +\fBlzdiff\fP \&... (DEPRECIATĂ) +. +.SH DESCRIERE +\fBxzcmp\fP și \fBxzdiff\fP compară conținutul necomprimat a două fișiere. Datele +necomprimate și opțiunile sunt transmise la \fBcmp\fP(1) sau \fBdiff\fP(1), cu +excepția cazului în care se specifică \fB\-\-help\fP sau \fB\-\-version\fP. +.PP +Dacă sunt specificate atât \fIfișier1\fP, cât și \fIfișier2\fP, acestea pot fi +fișiere necomprimate sau fișiere în formate pe care \fBxz\fP(1), \fBgzip\fP(1), +\fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) sau \fBlz4\fP(1) le poate +decomprima. Comenzile de decomprimare necesare sunt determinate de sufixele +numelor de fișiere \fIfișier1\fP și \fIfișier2\fP. Se presupune că un fișier cu un +sufix necunoscut este fie necomprimat, fie într\-un format pe care \fBxz\fP(1) +îl poate decomprima. +.PP +În cazul în care se furnizează un singur nume de fișier, \fIfișier1\fP trebuie +să aibă un sufix al unui format de comprimare acceptat, iar numele pentru +\fIfișier2\fP se presupune că este \fIfișier1\fP fără sufixul formatului de +comprimare. +.PP +Comenzile \fBlzcmp\fP și \fBlzdiff\fP sunt furnizate pentru compatibilitate +retroactivă cu LZMA Utils. Acestea sunt depreciate și vor fi eliminate +într\-o versiune viitoare. +. +.SH "STARE DE IEȘIRE" +În cazul în care apare o eroare de decomprimare, starea de ieșire este +\fB2\fP. În caz contrar, se utilizează starea de ieșire \fBcmp\fP(1) sau +\fBdiff\fP(1). +. +.SH "CONSULTAȚI ȘI" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ro/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzgrep.1 new file mode 100644 index 0000000000..fc411dfa1f --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzgrep.1 @@ -0,0 +1,107 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Romanian translation for xz-man. +.\" Mesajele în limba română pentru manualul pachetului XZ Utils. +.\" Remus-Gabriel Chelu , 2022 - 2025. +.\" Cronologia traducerii fișierului „xz-man”: +.\" Traducerea inițială, făcută de R-GC, pentru versiunea xz-man 5.4.0-pre1. +.\" Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +.\" Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +.\" Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025. +.\" Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 "6 martie 2025" Tukaani "Utilități XZ" +.SH NUME +xzgrep \- caută modele în fișiere posibil comprimate +. +.SH REZUMAT +\fBxzgrep\fP [\fIopțiune...\fP] \fIlistă\-modele\fP [\fIfișier...\fP] +.br +\fBxzegrep\fP \&... +.br +\fBxzfgrep\fP \&... +.br +\fBlzgrep\fP \&... (DEPRECIATĂ) +.br +\fBlzegrep\fP \&... (DEPRECIATĂ) +.br +\fBlzfgrep\fP \&... (DEPRECIATĂ) +. +.SH DESCRIERE +\fBxzgrep\fP invocă \fBgrep\fP(1) asupra conținutului necomprimat al +fișierelor. Formatele \fIfișierelor\fP sunt determinate de sufixele numelor de +fișiere. Orice \fIfișier\fP cu un sufix acceptat de \fBxz\fP(1), \fBgzip\fP(1), +\fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) sau \fBlz4\fP(1) va fi decomprimat; toate +celelalte fișiere sunt presupuse a fi necomprimate. +.PP +Dacă nu se specifică niciun \fIfișier\fP sau dacă \fIfișier\fP este \fB\-\fP, se +citește intrarea standard. Atunci când se citește de la intrarea standard, +sunt decomprimate numai fișierele acceptate de \fBxz\fP(1). Se presupune că +celelalte fișiere sunt deja în format necomprimat. +.PP +Sunt acceptate majoritatea \fIopțiunilor\fP din \fBgrep\fP(1). Cu toate acestea, +următoarele opțiuni nu sunt acceptate: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIacțiune\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIglobal\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIglobal\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIfișier\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIglobal\fP +.PP +\fBxzegrep\fP este un alias pentru \fBxzgrep \-E\fP. \fBxzfgrep\fP este un alias +pentru \fBxzgrep \-F\fP. +.PP +Comenzile \fBlzgrep\fP, \fBlzegrep\fP și \fBlzfgrep\fP sunt furnizate pentru +compatibilitate retroactivă cu LZMA Utils. Acestea sunt depreciate și vor fi +eliminate într\-o versiune viitoare. +. +.SH "STARE DE IEȘIRE" +.TP +0 +A fost găsită cel puțin o potrivire din cel puțin unul dintre fișierele de +la intrare. Nu au apărut erori. +.TP +1 +Nu au fost găsite potriviri din niciunul dintre fișierele de la intrare. Nu +au apărut erori. +.TP +>1 +A apărut una sau mai multe erori. Nu se cunoaște dacă au fost găsite +potriviri. +. +.SH "VARIABILE DE MEDIU" +.TP +\fBGREP\fP +Dacă variabila de mediu \fBGREP\fP este stabilită la o valoare nevidă, aceasta +este utilizată în locul lui \fBgrep\fP, \fBgrep \-E\fP sau \fBgrep \-F\fP. +. +.SH "CONSULTAȚI ȘI" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ro/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzless.1 new file mode 100644 index 0000000000..9bd9b2c296 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzless.1 @@ -0,0 +1,60 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Romanian translation for xz-man. +.\" Mesajele în limba română pentru manualul pachetului XZ Utils. +.\" Remus-Gabriel Chelu , 2022 - 2025. +.\" Cronologia traducerii fișierului „xz-man”: +.\" Traducerea inițială, făcută de R-GC, pentru versiunea xz-man 5.4.0-pre1. +.\" Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +.\" Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +.\" Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025. +.\" Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 "6 martie 2025" Tukaani "Utilități XZ" +.SH NUME +xzless, lzless \- vizualizează fișierele (text) comprimate xz sau lzma +.SH REZUMAT +\fBxzless\fP [\fIfișier\fP...] +.br +\fBlzless\fP [\fIfișier\fP...] (DEPRECIATĂ) +.SH DESCRIERE +\fBxzless\fP este un filtru care afișează textul din fișierele comprimate pe un +terminal. Fișierele acceptate de \fBxz\fP(1) sunt decomprimate; se presupune că +celelalte fișiere sunt deja în format necomprimat. Dacă nu se dă nici un +\fIfișier\fP, \fBxzless\fP citește de la intrarea standard. +.PP +\fBxzless\fP folosește \fBless\fP(1) pentru a\-și prezenta rezultatul. Spre +deosebire de \fBxzmore\fP, alegerea sa de pager nu poate fi modificată prin +definirea unei variabile de mediu. Comenzile se bazează atât pe \fBmore\fP(1) +cât și pe \fBvi\fP(1) și permit mișcarea înainte și înapoi și +căutarea. Consultați manualul \fBless\fP(1) pentru mai multe informații. +.PP +Comanda numită \fBlzless\fP este furnizată pentru compatibilitatea cu LZMA +Utils. Aceasta este depreciată și va fi eliminată într\-o versiune viitoare. +.SH "VARIABILE DE MEDIU" +.TP +\fBLESSMETACHARS\fP +O listă de caractere speciale pentru shell. Definită de \fBxzless\fP, cu +excepția cazului în care este deja definită în mediu. +.TP +\fBLESSOPEN\fP +Aceasta este definită în linia de comandă pentru a invoca instrumentul de +decomprimare \fBxz\fP(1) pentru preprocesarea fișierelor de intrare pentru +\fBless\fP(1). +.SH "CONSULTAȚI ȘI" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/ro/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzmore.1 new file mode 100644 index 0000000000..dbc1541830 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/ro/xzmore.1 @@ -0,0 +1,62 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Romanian translation for xz-man. +.\" Mesajele în limba română pentru manualul pachetului XZ Utils. +.\" Remus-Gabriel Chelu , 2022 - 2025. +.\" Cronologia traducerii fișierului „xz-man”: +.\" Traducerea inițială, făcută de R-GC, pentru versiunea xz-man 5.4.0-pre1. +.\" Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +.\" Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +.\" Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +.\" Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +.\" Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025. +.\" Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 "6 martie 2025" Tukaani "Utilități XZ" +.SH NUME +xzmore, lzmore \- vizualizează fișierele (text) comprimate xz sau lzma +. +.SH REZUMAT +\fBxzmore\fP [\fIfișier\fP...] +.br +\fBlzmore\fP [\fIfișier\fP...] (DEPRECIATĂ) +. +.SH DESCRIERE +\fBxzmore\fP afișează textul din fișierele comprimate pe un terminal folosind +\fBmore\fP(1). Fișierele acceptate de \fBxz\fP(1) sunt decomprimate; se presupune +că celelalte fișiere sunt deja în format necomprimat. Dacă nu se dă nici un +\fIfișiere\fP, \fBxzmore\fP citește de la intrarea standard. Consultați manualul +\fBmore\fP(1) pentru comenzile de la tastatură. +.PP +Rețineți că este posibil ca derularea înapoi să nu fie posibilă în funcție +de implementarea lui \fBmore\fP(1). Acest lucru se datorează faptului că +\fBxzmore\fP utilizează o conductă pentru a transmite datele decomprimate către +\fBmore\fP(1). \fBxzless\fP(1) utilizează \fBless\fP(1) care oferă caracteristici mai +avansate. +.PP +Comanda \fBlzmore\fP este furnizată pentru compatibilitate retroactivă cu LZMA +Utils. Aceasta este depreciată și va fi eliminată într\-o versiune viitoare. +. +.SH "VARIABILE DE MEDIU" +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +Dacă variabila de mediu \fBPAGER\fP, este definită, valoarea sa este utilizată +ca paginator în loc de \fBmore\fP(1). +. +.SH "CONSULTAȚI ȘI" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sr/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/sr/lzmainfo.1 new file mode 100644 index 0000000000..600a0dc79c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sr/lzmainfo.1 @@ -0,0 +1,42 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Serbian translation of xz-man. +.\" Мирослав Николић , 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 30.06.2013. Tukaani "XZ Utils" +.SH НАЗИВ +lzmainfo – приказује информације смештене у заглављу .lzma датотеке +.SH САЖЕТАК +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIдатотека...\fP] +.SH ОПИС +\fBlzmainfo\fP приказује информације које се налазе у заглављу \fB.lzma\fP +датотеке. Чита првих 13 бајтова из наведене \fIдатотеке\fP, дешифрује заглавље +и исписује га на стандардни излаз у облику читљивом људима. Ако ни једна +\fIдатотека\fP није дата или је \fIдатотека\fP \fB\-\fP, чита се стандардни улаз. +.PP +Обично најзанимљивије информације су незапакована величина и величина +речника. Незапакована величина може се приказати само ако је датотека у +варијанти формата \fB.lzma\fP која није ток. Количина меморије потребне за +распакивање датотеке је неколико десетина килобајта плус величина речника. +.PP +\fBlzmainfo\fP је садржано у XZ Utils\-у првенствено због повратне сагласности +са LZMA Utils\-ом. +.SH "СТАЊЕ ИЗЛАЗА" +.TP +\fB0\fP +Све је у реду. +.TP +\fB1\fP +Дошло је до грешке. +.SH ГРЕШКЕ +\fBlzmainfo\fP користи \fBMB\fP док тачан суфикс треба да буде \fBMiB\fP (2^20 +бајтова). Ово је зато да би се задржала сагласност излаза са LZMA Utils\-ом. +.SH "ВИДИТЕ ТАКОЂЕ" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sr/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/sr/xz.1 new file mode 100644 index 0000000000..82d831001e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sr/xz.1 @@ -0,0 +1,1928 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Serbian translation of xz-man. +.\" Мирослав Николић , 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 08.03.2025. Tukaani "XZ Utils" +. +.SH НАЗИВ +xz, unxz, xzcat, lzma, unlzma, lzcat – Запакује или распакује „.xz“ и „.lzma +датотеке +. +.SH САЖЕТАК +\fBxz\fP [\fIопција...\fP] [\fIдатотека...\fP] +. +.SH "АЛИЈАСИ НАРЕДБЕ" +\fBunxz\fP је исто као и \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP је исто као и \fBxz \-\-decompress \-\-stdout\fP. +.br +\fBlzma\fP је исто као и \fBxz \-\-format=lzma\fP. +.br +\fBunlzma\fP је исто као и \fBxz \-\-format=lzma \-\-decompress\fP. +.br +\fBlzcat\fP је исто као и \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP. +.PP +Приликом писања скрипти које треба да распакују датотеке, препоручује се да +се увек користи назив \fBxz\fP са одговарајућим аргументима (\fBxz \-d\fP или \fBxz \-dc\fP) уместо назива \fBunxz\fP и \fBxzcat\fP. +. +.SH ОПИС +\fBxz\fP је алат опште употребе за запакивање података са синтаксом линије +наредби сличан као \fBgzip\fP(1) и \fBbzip2\fP(1). Изворни формат датотеке је +\&\fB.xz\fP формат, али стари \fB.lzma\fP формат који користи LZMA Utils и сирови +запаковани токови без заглавља формата су такође подржани. Уз то, +распакивање \fB.lz\fP формата који користи \fBlzip\fP је подржано. +.PP +\fBxz\fP запакује или распакује сваку \fIдатотеку\fP у складу са изабраним режимом +рада. Ако није дата ни једна \fIдатотека\fP или је датотека \fIfile\fP \fB\-\fP, +\fBxz\fP чита са стандардног улаза и записује обрађене податке на стандардни +излаз. \fBxz\fP ће одбити (приказаће грешку и прескочити \fIдатотеку\fP) да пише +запаковане податке на стандардни излаз ако је то терминал. Слично, \fBxz\fP ће +одбити да чита запаковане податке са стандардног улаза ако је то терминал. +.PP +Осим ако није наведено \fB\-\-stdout\fP, \fIдатотеке\fP које нису \fB\-\fP се пишу у +нову датотеку чији назив је проистекао из назива изворне \fIдатотеке\fP: +.IP \(bu 3 +Приликом запакивања, суфикс формата циљне датотеке (\fB.xz\fP или \fB.lzma\fP) се +додаје на назив изворне датотеке да би се добио назив циљне датотеке. +.IP \(bu 3 +Приликом распакивања, суфикс \fB.xz\fP, \fB.lzma\fP или \fB.lz\fP се уклања из назива +датотеке да би се добио назив циљне датотеке. \fBxz\fP такође препознаје +суфиксе \fB.txz\fP и \fB.tlz\fP и замењује их суфиксом \fB.tar\fP. +.PP +Ако циљна датотека већ пстоји, приказује се грешка а \fIдатотека\fP се +прескаче. +.PP +Осим ако не пише на стандардни излаз, \fBxz\fP ће приказати упозорење и +прескочити \fIдатотеку\fP ако се нешто од следећег примењује: +.IP \(bu 3 +\fIДатотека\fP није обична датотека. Симболичке везе се не прате, и стога се +не сматра да су обичне датотеке. +.IP \(bu 3 +\fIДатотека\fP има више од једне чврсте везе. +.IP \(bu 3 +\fIДатотека\fP има постављен „setuid, setgid“ или лепљиви бит. +.IP \(bu 3 +Режим рада је постављен на запакивање а \fIдатотека\fP већ има суфикс формата +циљне датотеке (\fB.xz\fP или \fB.txz\fP приликом запакивања у \fB.xz\fP формат, а +\&\fB.lzma\fP или \fB.tlz\fP приликом запакивања у \fB.lzma\fP формат). +.IP \(bu 3 +Режим радње је постављен за распакивање а \fIдатотека\fP нема суфикс ни једног +од подржаних формата датотеке (\fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP или +\&\fB.lz\fP). +.PP +Након успешног сажимања или распакивања \fIдатотеке\fP, \fBxz\fP умножава +власника, групу, дозволе, време приступа и време измене из изворне +\fIдатотеке\fP у циљну датотеку. Ако умножавање групе не успе, дозволе су +измењене тако да циљна датотека не постане доступна корисницима који нису +имали дозволу за приступ изворној \fIдатотеци\fP. \fBxz\fP не подржава умножавање +других метаподатака попут списка контрола приступа или проширених атрибута. +.PP +Једном када је циљна датотека успешно затворена, изворна \fIдатотека\fP се +уклања осим ако се \fB\-keep\fP не наведе. Изворна \fIдатотека\fP се никада не +уклања ако се излаз пише на стандардни излаз или ако дође до грешке. +.PP +Слање \fBSIGINFO\fP или \fBSIGUSR1\fP ка \fBxz\fP процесу чини да испише информације +напредовања на стандардну грешку. Ово има ограничено коришћење све док +стандардна грешка јесте терминал, коришћење \fB\-\-verbose\fP приказаће +аутоматски указивач напретка освежавања. +. +.SS "Коришћење меморије" +Коришћење меморије \fBxz\fP се мења од неколико стотина килобајта до неколико +гигабајта у зависности од поставки запакивања. Поставке коришћене приликом +запакивања датотеке одређују захтеве меморије распакивача. Обично +распакивачу треба 5\ % до 20\ % количине меморије која је потребна +запакивачу приликом прављења датотеке. На пример, распакивање датотеке +направљене са \fBxz \-9\fP тренутно захтева 65\ MiB меморије. Још увек, могуће +је имати \fB.xz\fP датотеке које захтевају неколико гигабајта меморије за +распакивање. +.PP +Нарочито корисници старијих система могу наћи досадном могућност коришћења +врло велике меморије. Да би се спречила нежељена изненађења, \fBxz\fP има +уграђен ограничавач коришћења меморије, који је искључен по основи. Док +неки оперативни системи пружају начин за ограничавање коришћење меморије за +процесе, ослањање на то сматра се да није довољно прилагодљиво (на пример, +коришћење \fBulimit\fP(1) за ограничавање виртуелне меморије тежи да обогаљи +\fBmmap\fP(2)). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +Ограничавач коришћења меморије се може укључити опцијом линије наредби +\fB\-\-memlimit=\fP\fIограничење\fP. Често је најпогодније укључити ограничавач по +основи постављањем променљиве окружења \fBXZ_DEFAULTS\fP, на пример, +\fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. Могуће је поставити ограничења засебно за +запакивање и распакивање коришћењем \fB\-\-memlimit\-compress=\fP\fIограничење\fP и +\fB\-\-memlimit\-decompress=\fP\fIограничење\fP. Коришћење ове две опције ван +\fBXZ_DEFAULTS\fP је ретко корисно јер једно покретање \fBxz\fP не може да ради и +запакивање и распакивање а \fB\-\-memlimit=\fP\fIограничење\fP (или \fB\-M\fP +\fIограничење\fP) је краће за куцање на линији наредби. +.PP +Ако је прекорачено наведено ограничење коришћења меморије, \fBxz\fP ће +приказати грешку а распакивање датотеке неће успети. Ако је ограничење +прекорачено приликом запакивања, \fBxz\fP ће покушати да умањи поставке тако да +се ограничење више не прекорачује (оси када се користи \fB\-\-format=raw\fP или +\fB\-\-no\-adjust\fP). На тај начин радња неће бити неуспешна осим ако је +ограничење врло мало. Смањење поставке се ради у корацима који се не +подударају са предподешеностима нивоа запакивања, на пример, ако је +ограничење само незнатно мање од износа потребног за \fBxz \-9\fP, поставке ће +бити смањене само мало, а не све до \fBxz \-8\fP. +. +.SS "Надовезивање и попуњавање са „.xz“ датотекама" +Могуће је додати \fB.xz\fP датотеке као то. \fBxz\fP ће распаковати такве +датотеке као да су биле једна \fB.xz\fP датотека. +.PP +Могуће је уметнути попуњавање између придодатих делова или након последњег +дела. Попуњавање мора да се састоји од празних бајтова а величина +попуњавања мора бити умножак четири бајта. Ово може бити корисно, на +пример, ако је \fB.xz\fP датотека смештена на медијуму који мери величине +датотека у блоковима од 512 бајтова. +.PP +Надовезивање и попуњавање нису дозвољени са \fB.lzma\fP датотекама или сировим +токовима. +. +.SH ОПЦИЈЕ +. +.SS "Суфикси целог броја и специјалне вредности" +На већини места где се очекује аргумент целог броја, опционални суфикс је +подржан да би се лако назначили велики цели бројеви. Не сме бити размака +између целог броја и суфикса. +.TP +\fBKiB\fP +Множи цео број са 1.024 (2^10). \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP, и \fBKB\fP се +прихватају као синоними за \fBKiB\fP. +.TP +\fBMiB\fP +Множи цео број са 1.048.576 (2^20). \fBMi\fP, \fBm\fP, \fBM\fP, и \fBMB\fP се +прихватају као синоними за \fBMiB\fP. +.TP +\fBGiB\fP +Множи цео број са 1.073.741.824 (2^30). \fBGi\fP, \fBg\fP, \fBG\fP, и \fBGB\fP се +прихватају као синоними за \fBGiB\fP. +.PP +Посебна вредност \fBmax\fP се може користити да укаже на највећу вредност целог +броја подржану опцијом. +. +.SS "Режим рада" +Ако је дато више опција режима рада, последња има дејства. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Запакује. Ово је основни режим радње када није наведена опција режима радње +и ниједан други режим радње се не подразумева са линије радње (на пример, +\fBunxz\fP подразумева \fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Након успешног запакивања, изворна датотека се уклања осим ако се не пише на +стандардни излаз или је наведено \fB\-\-keep\fP. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Распакује. Након успешног распакивања, изворна датотека се уклања осим ако +се не пише на стандардни излаз или је наведено \fB\-\-keep\fP. +.TP +\fB\-t\fP, \fB\-\-test\fP +Тестира целовитост запакованих \fIдатотека\fP. Ова опција је исто што и +\fB\-\-decompress \-\-stdout\fP осим тога што се распаковани подаци одбацују уместо +да се пишу на стандардни излаз. Датотеке се не праве нити уклањају. +.TP +\fB\-l\fP, \fB\-\-list\fP +Исписује информације о запакованим \fIдатотекама\fP. Никакав незапакован излаз +се не добија, а ниједна датотека није направљена или уклоњена. У режиму +списка, програм не може читати запаковане податке са стандардног улаза или +из других нетраживих извора. +.IP "" +Основни списак приказује основне информације о \fIдатотекама\fP, једна датотека +у једном реду. Да добијете подробније информације, користите такође опцију +\fB\-\-verbose\fP. За чак и више информација, користите \fB\-\-verbose\fP два пуа, +али знајте да то може бити споро, јер да би се добиле све додатне +информације потребно је много тражења. Ширина опширног излаза премашује 80 +знакова, тако да преспајање излаза на, на пример, \fBless\ \-S\fP може бити +прикладно ако терминал није довољно широк. +.IP "" +Тачан излаз може варирати између \fBxz\fP издања и различитих језика. За излаз +читљив машинама треба да користите \fB\-\-robot \-\-list\fP. +. +.SS "Измењивачи рада" +.TP +\fB\-k\fP, \fB\-\-keep\fP +Не брише улазне датотеке. +.IP "" +Од \fBxz\fP 5.2.6, ова опција такође чини да \fBxz\fP запакује или распакује чак и +ако је улаз симболичка веза ка обичној датотеци, има више од једне чврсте +везе или има постављен „setuid“, „setgid“ или лепљиви бит. „setuid“, +„setgid“ и лепљиви битови се не умножавају у циљну датотеку. У ранијим +издањима ово се могло урадити само са \fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Ова опција има неколико дејстава: +.RS +.IP \(bu 3 +Ако циљна датотека већ постоји, брише је пре запакивања или распакивања. +.IP \(bu 3 +Запакује или распакује чак и ако је улаз симболичка веза ка обичној +датотеци, има више од једне чврсте везе или има постављен „setgid“, „setgid“ +или лепљиви бит. „setgid“, „setgid“ или лепљиви бит се не умножавају у +циљну датотеку. +.IP \(bu 3 +Када се користи са \fB\-\-decompress\fP \fB\-\-stdout\fP и \fBxz\fP не може да препозна +врсту изворне датотеке, умножава изворну датотеку као такву на стандардни +излаз. Ово омогућава да се \fBxzcat\fP \fB\-\-force\fP користи као \fBcat\fP(1) за +датотекекоје нису запаковане са \fBxz\fP. Знајте да ће у будућности, \fBxz\fP +моћи да подржава нове формате запаковане датотеке, који могу учинити да +\fBxz\fP распакује још врста датотека уместо да их умножи какве јесу на +стандардни излаз. \fB\-\-format=\fP\fIформат\fP се може користити да ограничи \fBxz\fP +да распакује само формат једне датотеке. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Пише запаковане или распаковане податке на стандардни излаз уместо у +датотеку, Ово подразумева \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +Распакује само први \fB.xz\fP ток, и тихо занемарује могуће преостале улазне +податке који следе ток. Нормално такво пратеће смеће чини да \fBxz\fP прикаже +грешку. +.IP "" +\fBxz\fP никада не распакује више од једног тока из \fB.lzma\fP датотека или +сирових токова, али ова опција чини да \fBxz\fP још увек занемари могуће +пратеће податке након \fB.lzma\fP датотеке или сировог тока. +.IP "" +Ова опција нема дејства ако режим рада није \fB\-\-decompress\fP или \fB\-\-test\fP. +.IP "" +Од \fBxz\fP 5.7.1alpha, \fB\-\-single\-stream\fP подразумева \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +Искључује стварање развучених датотека. По основи, ако распакује у обичну +датотеку, \fBxz\fP покушава да учини датотеку развученом ако распаковани подаци +садрже дуге низове бинарних нула. Такође ради приликом писања на стандардни +излаз све док је стандардни излаз повезан са обичном датотеком а одређени +додатни услови су испуњени да је учине безбедном. Стварање развучених +датотека може уштедети простор на диску и убрзати распакивање смањењем +количине У/И диска. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +Приликом запакивања, користите \fI.suf\fP као суфикс за циљну датотеку уместо +\&\fB.xz\fP или \fB.lzma\fP. Ако се не пише на стандардни излаз а изворна датотека +већ има суфикс \fI.suf\fP, приказује се упозорење и датотека се прескаче. +.IP "" +Приликом распакивања, препознаје датотеке са суфиксом \fI.suf\fP поред датотека +са суфиксом \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP, or \fB.lz\fP. Ако изворна +датотека има суфикс \fI.suf\fP, суфикс се уклања да би се добио назив циљне +датотеке. +.IP "" +Приликом запакивања или распакивања сирових токова (\fB\-\-format=raw\fP), суфикс +мора увек бити наведен осим ако се не пише на стандардни излаз, јер не +постоји основни суфикс за сирове токове. +.TP +\fB\-\-files\fP[\fB=\fP\fIдатотека\fP] +Чита називе датотека за обраду из \fIдатотеке\fP; ако се \fIдатотека\fP изостави, +називи датотека се читају са стандардног улаза. Називи датотека се морају +завршавати знаком новог реда. Цртица (\fB\-\fP) се узима као редован назив +датотеке; а не стандардни улаз. Ако су називи датотека дати такође као +аргументи линије наредби, обрађују се пре него што се називи датотека +прочитају из \fIдатотеке\fP. +.TP +\fB\-\-files0\fP[\fB=\fP\fIдатотека\fP] +Ово је исто као и \fB\-\-files\fP[\fB=\fP\fIдатотека\fP] изузев тога што сваки назив +датотеке мора да се завршава „null“ знаком. +. +.SS "Основни формат датотеке и опције запакивања" +.TP +\fB\-F\fP \fIформат\fP, \fB\-\-format=\fP\fIформат\fP +Наводи \fIформат\fP датотеке за запакивање или распакивање: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +Ово је основно. Приликом запакивања, \fBauto\fP је исто што и \fBxz\fP. Приликом +распакивања, формат улазне датотеке се аутоматски препознаје. Знајте да +сирови токови (направљени са \fB\-\-format=raw\fP) не могу бити аутоматски +препознати. +.TP +\fBxz\fP +Пакује у \fB.xz\fP формат датотеке, или прихвата само \fB.xz\fP датотеке приликом +распакивања. +.TP +\fBlzma\fP, \fBalone\fP +Пакује у стари \fB.lzma\fP формат датотеке, или прихвата само \fB.lzma\fP датотеке +приликом распакивања. Алтернативни назив \fBalone\fP се доставља зарад +повратне сагласности са LZMA помагалима. +.TP +\fBlzip\fP +Прихвата само \fB.lz\fP датотеке приликом распакивања. Запакивање није +подржано. +.IP "" +Формат \fB.lz\fP издања 0 и 1 је подржан. Датотеке издања 0 су настале са +\fBlzip\fP 1.3 и старијим. Такве датотеке нису уобичајене али се могу наћи у +архивама датотека јер је неколико пакета извора издато у овом формату. +Такође можда неко има старе личне датотеке у овом формату. Подршка +распакивања за формат издања 0 је уклоњена у \fBlzip\fP 1.18. \fBlzip\fP 1.4 и +новији ствара датотеке у формату издања 1. +.TP +\fBraw\fP +Запакује или распакује сирови ток (без заглавља). Ово је замишљено само за +напредне кориснике. Да дешифрујете сирове токове, треба да користите +\fB\-\-format=raw\fP и да изричито наведете ланац филтера, што би обично требало +да буде смештено у заглављима контејнера. +.RE +.TP +\fB\-C\fP \fIпровера\fP, \fB\-\-check=\fP\fIпровера\fP +Наводи врсту провере целовитости. Провера се израчунава из незапакованих +података и смештених у \fB.xz\fP датотеци. Ова опција има дејства само +приликом запакивања у \fB.xz\fP формат; \fB.lzma\fP формат не подржава провере +целовитости. Провера целовитости (ако је има) се проверава када је \fB.xz\fP +датотека распакована. +.IP "" +Подржане врсте \fIпровере\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +Уопште не израчунава проверу целовитости. Ово је обично лоша идеја. Ово +може бити корисно када се целовитост података ипак проверава на друге +начине. +.TP +\fBcrc32\fP +Израчунава CRC32 користећи полином из IEEE\-802.3 (Етернет). +.TP +\fBcrc64\fP +Израчунава CRC64 користећи полином из ECMA\-182. Ово је основно, јер је +незнатно боље од CRC32 у откривању оштећених датотека а разлика брзине је +занемарљива. +.TP +\fBsha256\fP +Израчунава SHA\-256. Ово је нешто спорије од CRC32 и CRC64. +.RE +.IP "" +Целовитост \fB.xz\fP заглавља се увек проверава са CRC32. Не може се изменити +нити искључити. +.TP +\fB\-\-ignore\-check\fP +Не проверава проверу целовитости запакованих података приликом распакивања. +CRC32 вредности у \fB.xz\fP заглављима биће још увек нормално проверене. +.IP "" +\fBНемојте користити ову опцију осим ако стварно знате шта радите.\fP Могући +разлози за коришћење ове опције: +.RS +.IP \(bu 3 +Покушава да опорави податке из оштећене „.xz“ датотеке. +.IP \(bu 3 +Убрзава распакивање. Ово има значаја углавном са SHA\-256 или са датотекама +које су запаковане стварно добро. Препоручује се да не користите ову опцију +за ову сврху осим ако је целовитост датотеке проверена споља на неки други +начин. +.RE +.TP +\fB\-0\fP ... \fB\-9\fP +Бира ниво преподешености запакивања. Подразумевано је \fB\-6\fP. Ако је +наведено више нивоа преподешености, последња има дејства. Ако је произвољни +ланац филтера већ наведен, постављање нивоа преподешености запакивања уклања +произвољни ланац филтера. +.IP "" +Разлике између предподешености су још значајније него са \fBgzip\fP(1) и +\fBbzip2\fP(1). Изабране поставке запакивања одређују захтеве меморије +распакивача, стога коришћење превисоког нивоа предподешености може отежати +распакивање датотеле на старом систему са мало RAM\-а. Нарочито, \fBније добра замисао слепо користити \-9 за било шта\fP као што је често са \fBgzip\fP(1) +и \fBbzip2\fP(1). +.RS +.TP +\fB\-0\fP ... \fB\-3\fP +Ово су некако брзе предподешености. \fB\-0\fP је понекад брже од \fBgzip \-9\fP док +запакује много боље. Оне више често имају брзину упоредиву са \fBbzip2\fP(1) +са упоредивом или бољом стопом запакивања, иако резултати зависе много од +врсте података који се запакују. +.TP +\fB\-4\fP ... \fB\-6\fP +Добро до врло добро запакивање које одржава коришћење меморије распакивача +разумним чак и за старе системе. \fB\-6\fP је основно, што је обично добар +избор за расподелу датотека које треба да могу да се распакују чак и на +системима са само 16\ MiB RAM\-а. (\fB\-5e\fP или \fB\-6e\fP може бити вредно +узимања у обзир. Видите \fB\-\-extreme\fP.) +.TP +\fB\-7 ... \-9\fP +Као \fB\-6\fP али са већим захтевима меморије запакивача и распакивача. Корисне +су само приликом запакивања датотека већих од 8\ MiB, 16\ MiB и 32\ MiB. +.RE +.IP "" +На истом хардверу, брзина распакивања је приближно сталан број бајтова +запакованих података у секунди. Другим речима, биће боље запакивање, брже +распакивање. То такође значи да количина незапакованог излаза произведеног +у секунди може много да се разликује. +.IP "" +Следећа табела резимира функције предподешености: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Преподешеност;ВлчРчнка;ЗапакЦПЈ;ЗапакМем;РаспМем +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Описи колона: +.RS +.IP \(bu 3 +ВлчРчнка је величина LZMA2 речника. Коришћење речника већег од величине +незапаковане датотеке је губитак меморије. Зато је добро избегавати +коришћење предподешености \fB\-7\fP ... \fB\-9\fP када за њима нема стварне +потребе. Са \fB\-6\fP и нижим, количина изгубљене меморије је обично довољно +ниска да нема значаја. +.IP \(bu 3 +ЗапакЦПЈ је поједностављено представљање LZMA2 поставки које утичу на брзину +запакивања. Величина речника такође утиче на брзину, тако док је ЗапакЦПЈ +исто за нивое \fB\-6\fP ... \fB\-9\fP, виши нивои још увек теже да буду спорији. Да +добијете још спорије и самим тим можда боље запакивање, видите \fB\-\-extreme\fP. +.IP \(bu 3 +ЗапакМем садржи захтеве меморије запакивача у режиму једне нити. Може +незнатно да се разликује између \fBxz\fP издања. +.IP \(bu 3 +РаспМем садржи захтеве меморије распакивача. Тако је, поставке запакивања +одређују захтеве меморије распакивача. Тачно коришћење меморије распакивача +је незнатно веће од величине LZMA2 речника, али су вредности у табели +заокружене на следећи цео MiB. +.RE +.IP "" +Захтеви меморије режима са више нити су значајно већи него ли режима једне +нити. Са основном вредношћу \fB\-\-block\-size\fP, свакој нити треба 3*3*ВлчРчнка +плус ЗапакМем или РаспМем. На пример, за четири нити са предподешавањем +\fB\-6\fP потребно је 660\(en670\ MiB меморије. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +Користите спорију варијанту изабраног нивоа предподешености запакивања +(\fB\-0\fP ... \fB\-9\fP) у нади да ћете добити мало бољу стопу запакивања, али уз +лошу срећу ово је може учинити гором. Не утиче на коришћење меморије +распакивача, али се коришћење меморије запакивача мало повећава на нивоима +предподешености \fB\-0\fP ... \fB\-3\fP. +.IP "" +Како постоје две предподешености са величинама речника од 4\ MiB и 8\ MiB, +предподешености \fB\-3e\fP и \fB\-5e\fP користе незнатно брже поставке (ниже +CompCPU) него \fB\-4e\fP и \fB\-6e\fP. На тај начин нема две истоветне +предподешености. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Преподешеност;ВлчРчнка;ЗапакЦПЈ;ЗапакМем;РаспМем +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +На пример, има укупно четири предподешавања која користе 8\ MiB речник, чији +поредак од најбржег до најспоријег је \fB\-5\fP, \fB\-6\fP, \fB\-5e\fP и \fB\-6e\fP. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +Ово су помало погрешни алијаси за \fB\-0\fP и \fB\-9\fP. Достављени су само зарад +повратне сагласности са LZMA Utils\-ом. Избегавајте коришћење ових опција. +.TP +\fB\-\-block\-size=\fP\fIвеличина\fP +Приликом запакивања у \fB.xz\fP формат, дели улазне податке на блокове +\fIвеличина\fP бајта. Блокови се запакују независно један од другог, што +помаже у раду са више нити и чини ограничено распакивање насумичног приступа +могућим. Ова опција се обично користи да се препише основна величина блока +у режиму са више нити, али се ова опција може такође користити и у режиму +једне нити. +.IP "" +У режиму више нити око три пута \fIвеличина\fP бајтова биће додељено у свакој +нити за међумеморисање улаза и излаза. Основна \fIвеличина\fP је три пута +величине LZMA2 речника или 1 MiB, шта год да је више. Обично добра вредност +је 2\(en4 пута величина LZMA2 речника или барем 1 MiB. Коришћење +\fIвеличине\fP мање од величине LZMA2 речника је трошење RAM\-а јер тада +међумеморија LZMA2 речника никада неће бити потпуно коришћена. У режиму +више нити, величине блокова се чувају у заглављима блока. Ова информација +величине је потребна за распакивање са више нити. +.IP "" +У режиму једне нити никаква подела блока се не ради по основи. Постављање +ове опције не утиче на коришћење меморије. Никакве информације о величини +се не чувају у заглављима блока, стога датотеке направљене у режиму једне +нити неће бити исте као датотеке направљене у режиму више нити. Недостатак +информација о величини такође значи да \fBxz\fP неће моћи да распакује датотеке +у режиму више нити. +.TP +\fB\-\-block\-list=\fP\fIставке\fP +Приликом запакивања у \fB.xz\fP формат, почиње нови блок са изборним +произвољним ланцем филтера након датих интервала незапакованих података. +.IP "" +\fIСтавке\fP су списак одвојен зарезом. Свака ставка се састоји од изборног +броја ланца филтера између 0 и 9 за којим следи двотачка (\fB:\fP) и захтевана +величина незапакованих података . Изостављање неке ставке (два или више +узастопна зареза) је пречица за коришћење величине и филтера претходне +ставке. +.IP "" +Ако је улазна датотека већа од збира величина у \fIставкама\fP, последња ставка +се понавља све до краја датотеке. Специјална вредност \fB0\fP може се +користити као последња величина да назначи да остатак датотеке треба да буде +шифрован као један блок. +.IP "" +Алтернативни ланац филтера за сваки блок се може навести у комбинацији са +опцијама \fB\-\-filters1=\fP\fIфилтера\fP \&...\& \fB\-\-filters9=\fP\fIфилтери\fP. Ове +опције дефинишу ланце филтера са одредником између 1\(en9. Ланац филтера 0 +се може користити да упућује на основно ланац филтера, који је исти јер се +ланац филтера не наводи. Одредник ланца филтера се може користити пре +незапаковане величине, за којим следи двотачка (\fB:\fP). На пример, ако +наведемо \fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP тада ће се за +прављење блокова користити: +.RS +.IP \(bu 3 +Ланац филтера наведен са \fB\-\-filters1\fP и 2 MiB улазом +.IP \(bu 3 +Ланац филтера наведен са \fB\-\-filters3\fP и 2 MiB улазом +.IP \(bu 3 +Ланац филтера наведен са \fB\-\-filters2\fP и 4 MiB улазом +.IP \(bu 3 +Ланац филтера наведен са \fB\-\-filters2\fP и 4 MiB улазом +.IP \(bu 3 +Основни ланац филтера и 2 MiB улаз +.IP \(bu 3 +Основни ланац филтера и 4 MiB улаз за сваки блок до краја улаза. +.RE +.IP "" +Ако наведемо величину која премашује величину блока шифрера (било основну +вредност у режиму нити или вредност наведену са +\fB\-\-block\-size=\fP\fIвеличина\fP), шифрер ће направити додатне блокове док ће +задржати границе наведене у \fIставкама\fP. На пример, ако наведемо +\fB\-\-block\-size=10MiB\fP \fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP а улазна +датотека је 80 MiB, добићемо 11 блокова: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10 +и 1 MiB. +.IP "" +У режиму са више нити величине блокова се чувају у заглављима блока. Ово се +не ради у режиму једне нити, тако да шифровани излаз неће бити истоветан +ономе у режиму са више нити. +.TP +\fB\-\-flush\-timeout=\fP\fIистек_времена\fP +Приликом запакивања, ако је више од \fIвреме_истека\fP милисекунди (позитиван +цео број) прошло од претходног испирања и читање више улаза ће блокирати, +сви заказани улазни подаци се испирају из шифрера и чине доступним у +излазном току. Ово може бити корисно ако је \fBxz\fP коришћен за запакивање +података који су слати преко мреже. Мала вредност \fIвременског_истека\fP чини +податке доступним на пријемни крај са малим закашњењем, али велика вредност +\fIвремена_истека\fP даје бољу стопу запакивања. +.IP "" +Ова функција је искључена по основи. Ако је ова опција наведена више пута, +последња има дејства. Нарочита вредност \fIвременског истека\fP \fB0\fP може се +користити за изричито искључивање ове функције. +.IP "" +Ова функција је доступна само на POSIX системима. +.IP "" +.\" FIXME +\fBОва функција је још увек експериментална.\fP Тренутно \fBxz\fP није погодан за +распакивање тока у реалном времену због начина на који \fBxz\fP ради +међумеморисање. +.TP +\fB\-\-no\-sync\fP +Не усклађује циљну датотеку и њену фасциклу на смештајном уређају пре +уклањања изворне датотеке. Ово може побољшати учинковитост ако се запакује +или распакује много малих датотека. Међутим, ако се систем уруши одмах +након брисања, може бити да циљна датотека не буде уписана на смештајном +уређају али радња брисања јесте. У том случају неће бити доступна ни +оригинална изворна ни циљна датотека. +.IP "" +Ова опција има дејство само када се \fBxz\fP спрема да уклони изворну +датотеку. У осталим случајевима усклађивање се не ради никада. +.IP "" +Синхронизација и \fB\-\-no\-sync\fP су додате у \fBxz\fP 5.7.1alpha. +.TP +\fB\-\-memlimit\-compress=\fP\fIограничење\fP +Поставља ограничење коришћења меморије запакивања. Ако је ова опција +наведена више пута, последња ступа у дејство. +.IP "" +Ако поставке запакивања премаше \fIограничење\fP, \fBxz\fP ће покушати да врати +назад поставке тако да ограничење више није прекорачено и приказаће +обавештење да је урађено аутоматско дотеривање. Дотеривања се раде следећим +редом: смањење броја нити, пребацивање на режим једне нити ако чак и једна +нит у режиму више нити премаши \fIограничење\fP и на крају смањење величине +LZMA2 речника. +.IP "" +Приликом запакивања са \fB\-\-format=raw\fP или ако је наведено \fB\-\-no\-adjust\fP, +само број нити може бити умањен јер може да се уради а да се не делује на +излаз запакованог. +.IP "" +Ако \fIограничење\fP не може бити задовољено чак и са поравнањима описаним +изнад, приказује се грешка и \fBxz\fP ће изаћи са излазним стањем 1. +.IP "" +\fIОграничење\fP се може навести на више начина: +.RS +.IP \(bu 3 +\fIОграничење\fP може бити апсолутна величина у бајтима. Коришћење суфикса +целог броја као \fBMiB\fP може бити корисно. Пример: +\fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +\fIОграничење\fP се може навести као проценат укупне физичке меморије (RAM). +Ово може бити корисно нарочито приликом постављања променљиве окружења +\fBXZ_DEFAULTS\fP у скрпти покретања конзоле која се дели између различитих +рачунара. На тај начин ограничење је аутоматски веће на системима са више +меморије. Пример: \fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +\fIОграничење\fP се може вратити на своју основну вредност његовим постављањем +на \fB0\fP. Ово је тренутно исто што и постављање \fIограничења\fP на \fBmax\fP (без +ограничења коришћења меморије). +.RE +.IP "" +За \fBxz\fP 32\-бита имамо посебан случај: ако \fIограничење\fP треба да буде преко +\fB4020\ MiB\fP, \fIограничење\fP се поставља на \fB4020\ MiB\fP. Али на MIPS32 +користи се \fB2000\ MiB\fP. (На вредности \fB0\fP и \fBmax\fP ово не утиче. Слична +функција не постоји за распакивање.) Ово може бити од помоћи када извршна +од 32\-бита има приступ адресном простору од 4\ GiB (2 GiB на MIPS32) док +срећом не чини ништа лоше у осталим приликама. +.IP "" +Видите такође одељак \fBКоришћење меморије\fP. +.TP +\fB\-\-memlimit\-decompress=\fP\fIограничење\fP +Поставља ограничење коришћења меморије за распакивање. Ово такође утиче на +\fB\-\-list\fP режим. Ако радња није могућа а да се не премаши \fIограничење\fP, +\fBxz\fP ће приказати грешку а распакивање датотеке неће успети. Видите +\fB\-\-memlimit\-compress=\fP\fIограничење\fP за могуће начине о навођењу +\fIограничења\fP. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fIограничење\fP +Поставља ограничење коришћења меморије за распакивање са више нити. Ово +може утицати само на број нити; ово никада неће учинити да \fBxz\fP одбије да +распакује датотеке. Ако је \fIограничење\fP превише ниско да омогући било који +рад са више нити, \fIограничење\fP се занемарује а \fBxz\fP ће наставити у режиму +једне нити. Знајте да ако се такође користи \fB\-\-memlimit\-decompress\fP, увек +ће се применити и на режим једне и на режим више нити, и тако да стварно +\fIограничење\fP за више нити никада неће бити више од ограничења постављеног +са \fB\-\-memlimit\-decompress\fP. +.IP "" +У супротности са другим опцијама ограничења коришћења меморије, +\fB\-\-memlimit\-mt\-decompress=\fP\fIограничење\fP има систему специфично основно +\fIограничење\fP. \fBxz \-\-info\-memory\fP се може користити да видите тренутну +вредност. +.IP "" +Ова опција и њена основна вредност постоје јер без икаквог ограничења нитни +распакивач ће завршити са додељивањем неразумног износа меморије са неким +улазним датотекама. Ако је основно \fIограничење\fP превише ниско на вашем +систему, слободно повећајте \fIограничење\fP али га никада не постављајте на +вредност већу од износа употребљивог RAM\-а јер са одговарајућим улазним +датотекама \fBxz\fP ће покушати да користи тај износ меморије чак и са малим +бројем нити. Остајући без меморије или разменом неће се побољшати +учинковитост распакивања. +.IP "" +Видите \fB\-\-memlimit\-compress=\fP\fIограничење\fP за могуће начине за навођење +\fIограничења\fP. Постављање \fIограничења\fP на \fB0\fP враћа \fIограничење\fP на +систему специфичну основну вредност. +.TP +\fB\-M\fP \fIограничење\fP, \fB\-\-memlimit=\fP\fIограничење\fP, \fB\-\-memory=\fP\fIограничење\fP +Ово је исто као и навођење \fB\-\-memlimit\-compress=\fP\fIограничење\fP +\fB\-\-memlimit\-decompress=\fP\fIограничење\fP +\fB\-\-memlimit\-mt\-decompress=\fP\fIограничење\fP. +.TP +\fB\-\-no\-adjust\fP +Приказује грешку и излази ако ограничење коришћења меморије не може бити +задовољено без дотеривања поставки које утичу на запаковани излаз. Тако је, +ово спречава \fBxz\fP да промени шифрера из режима више нити у режим једне нити +и да смањи величину LZMA2 речника. Чак и када се ова опција користи број +нити се може смањити да задовољи ограничење коришћења меморије јер то неће +утицати на запаковани излаз. +.IP "" +Аутоматско дотеривање је увек искључено приликом стварања сирових токова +(\fB\-\-format=raw\fP). +.TP +\fB\-T\fP \fIнити\fP, \fB\-\-threads=\fP\fIнити\fP +Наводи број нити радника за коришћење. Постављање \fIнити\fP на посебну +вредност \fB0\fP чини да \fBxz\fP користи онолико нити колико процесор на систему +подржава. Стварни број нити може бити мањи од \fIнити\fP ако улазна датотека +није довољно велика за нитисање са датим поставкама или ако ће коришћење +више нити премашити ограничење коришћења меморије. +.IP "" +Запакивачи једне нити и више нити дају различите излазе. запакивач једне +нити даће мању величину датотеке али само излаз из запакивача више нити може +бити распакован коришћењем више нити. Постављање \fIнити\fP на \fB1\fP користиће +режим једне нити. Постављање \fIнити\fP на неку другу вредност, укључујући +\fB0\fP, користиће запакивач више нити чак и ако систем подржава само једну нит +хардвера. (\fBxz\fP 5.2.x је користио режим једне нити у овој прилици.) +.IP "" +Да користите вишенитни режим са само једном нити, поставите \fIнити\fP на +\fB+1\fP. Префикс \fB+\fP нема дејства са вредностима које нису \fB1\fP. Ограничење +коришћења меморије може још увек учинити да се \fBxz\fP пребаци на режим једне +нити осим ако се не користи \fB\-\-no\-adjust\fP. Подршка за префикс \fB+\fP је +додата у \fBxz\fP 5.4.0. +.IP "" +Ако је затражен аутоматски број нити и није наведено ограничење коришћења +меморије, тада ће се користити основно меко ограничење специфично за систем +за могуће ограничење броја нити. То је меко ограничење у смислу да се +занемарује ако број нити постане један, дакле меко ограничење никада неће +зауставити \fBxz\fP од запакивања или распакивања. Ово основно меко ограничење +неће учинити да се \fBxz\fP пребаци из режима више нити у режим једне нити. +Активно ограничење се може видети са + \fBxz \-\-info\-memory\fP. +.IP "" +Тренутно једина метода нитисања је да се подели улаз на блокове и да се +запакују независно један од другог. Основна величина блока зависи од нивоа +запакивања и може се преписати опцијом \fB\-\-block\-size=\fP\fIвеличина\fP. +.IP "" +Нитно распакивање ради само на датотекама које садрже више блокова са +информацијом величине у заглављима блока. Све довољно велике датотеке +запаковане у вишенитном режиму задовољавају овај услов, али датотеке +запаковане у једнонитном режиму не чак и ако је коришћено +\fB\-\-block\-size=\fP\fIвеличина\fP. +.IP "" +Основна вредност за \fIнити\fP је \fB0\fP. У \fBxz\fP 5.4.x и старијим основно је +\fB1\fP. +. +.SS "Произвољни ланци филтера запакивача" +Произвољни ланац филтера омогућава детаљно одређивање подешавања сажимања +уместо да се ослања на подешавања повезана са предподешавањима. Када је +произвољни ланац филтера наведен, опције предподешавања (\fB\-0\fP \&...\& \fB\-9\fP +и \fB\-extreme\fP) раније на линији наредби се заборављају. Ако је опција +предподешавања наведена након једне или више опција произвољног ланца +филтера, ново предподешавање ступа на снагу а раније наведене опције +произвољног ланца филтера се заборављају. +.PP +Ланац филтера је упоредив са спојкама на линији наредби. Приликом сажимања, +несажети улаз иде на први филтер, чији излаз иде на следећи филтер (ако фа +има). Излаз последњег филтера бива записан у сажету датотеку. Највећи број +филтера у ланцу је четири, али обично ланац филтера има само један или два +филтера. +.PP +Многи филтери имају ограничења о томе где могу бити у ланцу филтера: неки +филтери могу радити само као последњи филтер у ланцу, неки само као +не\-последњи филтер, а неки раде на било ком месту у ланцу. Овисно о +филтеру, ово ограничење је или својствено дизајну филтера или постоји како +би се спречили проблеми безбедности. +.PP +Произвољни ланац филтера се може навести на два различита начина. Опције +\fB\-\-filters=\fP\fIфилтери\fP и \fB\-\-filters1=\fP\fIфилтери\fP \&...\& +\fB\-\-filters9=\fP\fIфилтери\fP омогућавају навођење читавог ланца опција у једној +опцији коришћењем синтаксу ниске „liblzma“ филтера. Другачије, ланац +филтера се може навести коришћењем једне или више појединачних опција +филтера редом како се траже у ланцу филтера. То је то, редослед +појединачних опција филтера је важан! Приликом дешифровања сирових токова +(\fB\-\-format=raw\fP), ланац филтера мора бити наведен истим редом као када је +био наведен приликом сажимања. Било који појединачни филтер или опције +предподешавања наведене пре опције читавог ланца (\fB\-\-filters=\fP\fIфилтери\fP) +биће заборављене. Појединачни филтери наведени после опције читавог ланца +ће поништити поставку ланца филтера. +.PP +Обе опције и пуног и појединачног филтера узимају филтеру специфичне +\fIопције\fP као зарезом раздвојен списак. Додатни зарези у \fIопцијама\fP се +занемарују. Свака опција има основну вредност, тако да треба да наведете +оне које желите да измените. +.PP +Да видите читав ланац филтера и \fIопције\fP, користите \fBxz \-vv\fP (тако је, +користите \fB\-\-verbose\fP два пута). Ово ради такође за преглед опција ланца +филтера коришћених од стране предподешености. +.TP +\fB\-\-filters=\fP\fIфилтери\fP +Наводи цео ланац филтера или предподешеност у једној опцији. Сваки филтер +се може одвојити размацима или са две цртице (\fB\-\-\fP). \fIФилтери\fP можда +треба да буду под наводницима на линији наредби конзоле тако да се +прослеђују као једна опција. Да означите \fIопције\fP, користите \fB:\fP или +\fB=\fP. Предподешености се може додати префикс \fB\-\fP и може га пратити нула +или још заставица. Једина подржана заставица је \fBe\fP за примену истих +опција као \fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIфилтери\fP ... \fB\-\-filters9\fP=\fIфилтери\fP +Наводи до девет додатних ланаца филтера који се могу користити са +\fB\-\-block\-list\fP. +.IP "" +На пример, приликом запакивања архиве са извршним датотекама за којима следе +текстуалне датотеке, извршни део треба да користи ланац филтера са BCJ +филтером а текстуални део само LZMA2 филтер. +.TP +\fB\-\-filters\-help\fP +Приказује поруку помоћи описујући како се наводе предподешавања и произвољни +ланци филтера у опцијама \fB\-\-filters\fP и \fB\-\-filters1=\fP\fIфилтери\fP \&...\& +\fB\-\-filters9=\fP\fIфилтери\fP, и успешно излази. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIопције\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIопције\fP] +.PD +Додаје LZMA1 или LZMA2 филтер у ланац филтера. Ови филтери се могу +користити само као последњи филтер у ланцу. +.IP "" +LZMA1 је стари филтер, који је подржан углавном само због старог формата +\&\fB.lzma\fP датотеке, који подржава само LZMA1. LZMA2 је освежено издање LZMA1 +које поправља неке практичне проблеме LZMA1. \fB.xz\fP формат користи LZMA2 и +не подржава LZMA1 уопште. Брзина запакивања и односи LZMA1 и LZMA2 су +практично исти. +.IP "" +LZMA1 и LZMA2 деле исти скуп \fIопција\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIпредподешавање\fP +Враћа све LZMA1 или LZMA2 \fIопције\fP на \fIпредподешеност\fP. \fIПредпдешеност\fP +се састоји од целог броја, за којим може да следи једнословни измењивач +предподешености. Цео број може бити од \fB0\fP до \fB9\fP, поклапајући опције +линије наредби \fB\-0\fP \&...\& \fB\-9\fP. Једини тренутно подржани измењивач је +\fBe\fP, који се поклапа са \fB\-\-extreme\fP. Ако \fBpreset\fP није наведено, основне +вредности LZMA1 или LZMA2 \fIопција\fP се узимају из предподешености \fB6\fP. +.TP +\fBdict=\fP\fIвеличина\fP +\fIВеличина\fP речника (међумеморија историјата) указује на то колико је +бајтова недавно обрађених нераспакованих података задржано у меморији. +Алгоритам покушава да нађе понављајуће низове бајтова (поклапања) у +нераспакованим подацима, и да их замени са упутама ка подацима који су +тренутно у речнику. Што је већи речник, већа је вероватноћа за налажење +поклапања. Стога, повећање \fIвеличине \fP речника обично побољшава стопу +запакивања, али речник већи од незапаковане датотеке јесте утрошак меморије. +.IP "" +Уобичајена \fIвеличина\fP речника је од 64\ KiB до 64\ MiB. Најмање је 4\ KiB. Највише за запакивање тренутно је 1.5\ GiB (1536\ MiB). Распакивач +већ подржава речнике до једног бајта мање од 4\ GiB, што је максимум за +формате LZMA1 и LZMA2 тока. +.IP "" +\fIВеличина\fP речника и налазач поклапања (\fImf\fP) заједно одређују коришћење +меморије за LZMA1 или LZMA2 шифрере. Иста (или већа) \fIвеличина\fP речника је +потребна за распакивање као она која је коришћена за запаквање, стога се +коришћење меморије дешифрера одређује према величини речника коришћеног за +запакивање. \fB.xz\fP заглавља чувају \fIвеличину\fP речника или као 2^\fIn\fP или +2^\fIn\fP + 2^(\fIn\fP\-1), тако да су те \fIвеличине\fP некако пожељније за +запакивање. Друге \fIвеличине\fP биће заокружене приликом чувања у \fB.xz\fP +заглављима. +.TP +\fBlc=\fP\fIlc\fP +Наводи број битова контекста литерала. Најмање је 0 а највише је 4; основно +је 3. Као додатак, збир \fIlc\fP и \fIlp\fP не сме да премаши 4. +.IP "" +Сви бајтови који се не могу шифровати јер су поклапања шифрована као +литерали. То је то, литерали су једноставно 8\-битни бајтови који су +шифровани један по један. +.IP "" +Кодирање литерала врши претпоставку да највећи \fIlc\fP битови претходног +незапакованог бајта су у узајамној вези са следећим бајтом. На пример, у +уобичајеном енглеском тексту, за великим словом често следи мало слово, а за +малим словом обично следи још једно мало слово. У скупу US\-ASCII знакова, +највиша три бита су 010 за велика слова и 011 за мала слова. Када је \fIlc\fP +барем 3, кодирање литерала може имати предност овог својства у незапакованим +подацима. +.IP "" +Основна вредност (3) је обично добра. Ако желите највеће запакивање, +испробајте \fBlc=4\fP. Некад то мало помогне а некад чини запакивање горим. +Ако га учини горим, испробајте такође \fBlc=2\fP. +.TP +\fBlp=\fP\fIlp\fP +Наводи број битова положаја литерала. Најмање је 0 а највише је 4; основно +је 0. +.IP "" +\fILp\fP утиче на то која врста поравнања у незапакованим подацима се +подразумева приликом шифровања литерала. Видите \fIpb\fP испод за више +информација о поравнању. +.TP +\fBpb=\fP\fIpb\fP +Наводи број битова положаја. Најмање је 0 а највише је 4; основно је 2. +.IP "" +\fIPb\fP утиче на то која врста поравнања у незапакованим подацима се +подразумева у опште. Основно значи четворобајтно поравнање (2^\fIpb\fP=2^2=4), +што је често добар избор када нема бољег решења. +.IP "" +Када је поравнање познато, постављање одговарајућег \fIpb\fP може мало да смањи +величину датотеке. На пример, са датотекама текста које имају поравнање +једног бајта (US\-ASCII, ISO\-8859\-*, UTF\-8), постављање \fBpb=0\fP може незнатно +да побољша запакивање. За UTF\-16 текст, \fBpb=1\fP је добар избор. Ако је +поравнање непаран број као 3 бајта, \fBpb=0\fP може бити најбољи избор. +.IP "" +Иако се претпостављено поравнање може подесити са \fIpb\fP и \fIlp\fP, LZMA1 и +LZMA2 и даље незнатно фаворизују 16\-бајтно поравнање. То би могло бити +вредно узети у обзир приликом дизајнирања формата датотека које ће вероватно +бити често запаковане са LZMA1 или LZMA2. +.TP +\fBmf=\fP\fImf\fP +Налазач поклапања има главни утицај на брзину шифрера, коришћење меморије и +стопу запакивања. Обично Hash Chain налазачи поклапања су бржи од Binary +Tree налазача поклапања. Основност зависи од \fIпредподешености\fP: 0 користи +\fBhc3\fP, 1\(en3 користи \fBhc4\fP, а остало користи \fBbt4\fP. +.IP "" +Следећи налазачи поклапања су подржани. Формуле коришћења меморије испод су +грубе апроксимације које су ближе стварности када је \fIречник\fP степен +двојке. +.RS +.TP +\fBhc3\fP +Ланац хеша са хеширањем 2\- и 3\-бајта +.br +Најмања вредност за \fIфино\fP: 3 +.br +Коришћење меморије: +.br +\fIречник\fP * 7.5 (ако је \fIречник\fP <= 16 MiB); +.br +\fIречник\fP * 5.5 + 64 MiB (if \fIречник\fP > 16 MiB) +.TP +\fBhc4\fP +Ланац хеша са хеширањем 2\-, 3\- и 4\-бајта +.br +Најмања вредност за \fIфино\fP: 4 +.br +Коришћење меморије: +.br +\fIречник\fP * 7.5 (ако је \fIречник\fP <= 32 MiB); +.br +\fIречник\fP * 6.5 (ако је \fIречник\fP > 32 MiB) +.TP +\fBbt2\fP +Бинарно стабло са 2\-бајта хеширања +.br +Најмања вредност за \fIфино\fP: 2 +.br +Коришћење меморије: \fIречник\fP * 9.5 +.TP +\fBbt3\fP +Бинарно стабло са 2\- и 3\-бајта хеширања +.br +Најмања вредност за \fIфино\fP: 3 +.br +Коришћење меморије: +.br +\fIречник\fP * 11.5 (if \fIречник\fP <= 16 MiB); +.br +\fIречник\fP * 9.5 + 64 MiB (ако је \fIречник\fP > 16 MiB) +.TP +\fBbt4\fP +Бинарно стабло са 2\-, 3\-, и 4\-бајта хеширања +.br +Најмања вредност за \fIфино\fP: 4 +.br +Коришћење меморије: +.br +\fIречник\fP * 11.5 (if \fIречник\fP <= 32 MiB); +.br +\fIречник\fP * 10.5 (if \fIречник\fP > 32 MiB) +.RE +.TP +\fBmode=\fP\fIрежим\fP +\fIРежим\fP запакивања наводи методу за анализу података које произведе налазач +поклапања. Подржани \fIрежими\fP су \fBfast\fP и \fBnormal\fP. Подразумева се +\fBfast\fP за \fIпредподешавања\fP 0\(en3 и \fBnormal\fP за \fIпредподешавања\fP 4\(en9. +.IP "" +Обично се \fBfast\fP користи са налазачима Hash Chain поклапања а \fBnormal\fP са +налазачима Binary Tree поклапања. Ово је исто што раде и +\fIпредподешености\fP. +.TP +\fBnice=\fP\fIфино\fP +Наводи оно што се сматра да је фина дужина за поклапање. Када се поклапање +од барем \fInice\fP бајтова нађе, алгоритам зауставља тражење могућих бољих +поклапања. +.IP "" +\fIФино\fP може бити 2\(en273 бајта. Веће вредности теже да дају бољу стопу +запакивања на уштрб брзине. Основно зависи од \fIпредподешавања\fP. +.TP +\fBdepth=\fP\fIдубина\fP +Наводи највећу дубину претраге у налазачу поклапања. Основно је посебна +вредност 0, која чини да запакивач одреди разумљиву \fIдубину\fP из \fImf\fP и +\fInice\fP. +.IP "" +Разумљива \fIдубина\fP за ланце хеша је 4\(en100 и 16\(en1000 за стабло +извршних. Коришћење врло великих вредности за \fIдубину\fP може учинити шифрер +врло спорим са неким датотекама. Избегавајте постављање \fIдубине\fP преко +1000 осим ако нисте спремни да прекинете запакивање у случају да потраје +превише дуго. +.RE +.IP "" +Приликом дешифровања сирових токова (\fB\-\-format=raw\fP), LZMA2 треба само +\fIвеличина\fP речника. LZMA1 треба такође \fIlc\fP, \fIlp\fP и \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIопције\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIопције\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIопције\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIопције\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIопције\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIопције\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIопције\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIопције\fP] +.PD +Додаје „branch/call/jump“ (BCJ) филтер ланцу филтера. Ови филтери могу се +користити само ако нису последњи филтер у ланцу филтера. +.IP "" +BCJ филтер претвара релативне адресе у машинском коду на њихове апсолутне +двојнике. Ово не мења величину података, али повећава сувишност, што може +помоћи LZMA2 да произведе 0\(en15\% мању \fB.xz\fP датотеку. BCJ филтери су +увек реверзибилни, стога коришћење BCJ филтера за погрешну врсту података не +доводи ни до каквог губитка података, мада може да учини степен сажимања +нешто лошијим. BCJ филтери су врло брзи и користе безначајну количину +меморије. +.IP "" +Ови BCJ филтери имају познате проблеме везане за стопу запакивања: +.RS +.IP \(bu 3 +Неке врсте датотека које садрже извршни код (на пример, објектне датотеке, +статичке библиотеке и модули Линукс кернела) имају адресе у упутствима +испуњеним вредностима попуњавача. Ови BCJ филтери и даље ће радити +претварање адресе, што ће запакивање учинити горим са овим датотекама. +.IP \(bu 3 +Ако се BCJ филтер примени на архиву, могуће је да ће учинити стопу +запакивања лошијим него кад се не би користио. На пример, ако постоје +сличне или чак истоветне извршне тада ће филтрирање вероватно учинити +датотеке мање сличним и стога је запакивање лошије. Садржај не\-извршних +датотека у истој архиви је такође важан. У пракси се мора покушати са и без +BCJ филтера да би се видело шта је боље у којој прилици. +.RE +.IP "" +Различити скупови упутстава имају различита поравнања: извршна датотека мора +бити поравната на множилац ове вредности у улазним подацима како би филтер +радио. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Филтер;Поравнање;Напомене +x86;1;32\-бита или 64\-бита x86 +ARM;4; +ARM\-Thumb;2; +ARM64;4;4096\-бита поравнање је најбоље +PowerPC;4;Само велика крајност +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Како су BCJ\-филтрирани подаци обично запаковани са LZMA2, стопа запакивања +може бити незнатно побољшана ако су LZMA2 опције постављене да поклопе +поравнање изабраног BCJ филтера. Примери: +.RS +.IP \(bu 3 +IA\-64 филтер има поравнање 16\-бајта тако да је \fBpb=4,lp=4,lc=0\fP добро са +LZMA2 (2^4=16). +.IP \(bu 3 +RISC\-V код има поравнање од 2 или 4 бајта у зависности од тога да ли +датотека садржи запаковане инструкције од 16 бита (проширење C). Када се +користе инструкције од 16 бита, \fBpb=2,lp=1,lc=3\fP или \fBpb=1,lp=1,lc=3\fP је +добро. Када нема инструкција од 16 бита, \fBpb=2,lp=2,lc=2\fP је најбоље. +\fBreadelf \-h\fP се може користити да се провери да ли се „RVC“ јавља у реду +„Заставице“. +.IP \(bu 3 +ARM64 је увек 4\-бајта поравнат тако да је \fBpb=2,lp=2,lc=2\fP најбоље. +.IP \(bu 3 +Филтер x86 је изузетак. Обично је добро придржавати се LZMA2 основности +(\fBpb=2,lp=0,lc=3\fP) приликом запакивања x86 извршних. +.RE +.IP "" +Сви BCJ филтери подржавају исте \fIопције\fP: +.RS +.TP +\fBstart=\fP\fIпомерај\fP +Наводи \fIпомерај\fP почетка који се користи приликом претварања између +релативних и апсолутних адреса. \fIПомерај\fP мора бити производ поравнања +филтера (видите табелу изнад). Основно је нула. У пракси, основност је +добра; навођење произвољног \fIпомераја\fP скоро никада није од користи. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIопције\fP] +Додаје Delta филтер у ланац филтера. Делта филтер може се користити само +ако није последњи филтер у ланцу филтера. +.IP "" +Тренутно је подржан само једноставан делта прорачун једног по једног бита. +Може бити користан приликом запакивања, на пример, незапакованих битмап +слика или незапакованог PCM звука. Међутим, алгоритми посебне намене могу +дати знатно боље резултате него Delta + LZMA2. Ово је тачно, посебно са +звуком, који се запакује брже и боље, на пример, са \fBflac\fP(1). +.IP "" +Подржане \fIопције\fP: +.RS +.TP +\fBdist=\fP\fIрастојање\fP +Наводи \fIрастојање\fP делта прорачуна у бајтима. \fIРастојање\fP мора бити +1\(en256. Основно је 1. +.IP "" +На пример, са \fBdist=2\fP и осмобајтним улазом A1 B1 A2 B3 A3 B5 A4 B7, излаз +ће бити A1 B1 01 02 01 02 01 02. +.RE +. +.SS "Остале опције" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Потискује упозорења и обавештења. Наведите ово два пута да потиснете и +грешке. Ова опција нема утицаја на стање излаза. Тако је, чак и ако је +упозорење потиснуто, стање излаза које указује на упозорење се и даље +користи. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +Бива опширан. Ако је стандардна грешка повезана са терминалом, \fBxz\fP ће +приказати указивач напретка. Навођењем \fB\-\-verbose\fP два пута добија се још +опширнији излаз. +.IP "" +Указивач напредовања показује следеће информације: +.RS +.IP \(bu 3 +Проценат довршености се показује ако је величина улазне датотеке позната. +Тако је, проценат се не може приказати у спојкама. +.IP \(bu 3 +Количина запакованих података проистеклих (запакивање) или утрошених +(распакивање). +.IP \(bu 3 +Количина распакованих података утрошених (запакивање) или проистеклих +(распакивање). +.IP \(bu 3 +Размера паковања, која се израчунава дељењем количине запакованих података +обрађених до сада количином незапакованих података до сада обрађених. +.IP \(bu 3 +Брзина запакивања или распакивања. Ово се мери као количина незапакованих +података утрошених (запакивање) или добијених (распакивање) у секунди. +Приказује се након неколико секунде након што \fBxz\fP започне обраду датотеке. +.IP \(bu 3 +Протекло време у формату М:СС или Ч:ММ:СС. +.IP \(bu 3 +Процењено преостало време се приказује само када је величина улазне датотеке +позната и неколико секунди је већ протекло од кад је \fBxz\fP започео обраду +датотеке. Време се приказује у мање тачном формату које никада нема +двотачке, на пример, 2 мин 30 сек. +.RE +.IP "" +Када стандардна грешка није терминал, \fB\-\-verbose\fP ће учинити да \fBxz\fP +испише назив датотеке, запаковану величину, незапаковану величину, стопу +запакивања и по могућству такође брзину и протекло време на једном реду на +стандардну грешку након запакивања или распакивања датотеке. Брзина и +протекло време су укључени само када радња потраје барем неколико секунде. +Ако се радња не заврши, на пример, услед што корисник прекине, такође се +исписује проценат завршености ако је величина улазне датотеке позната. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Не поставља стање излаза на 2 чак и ако је услов вредан упозорења откривен. +Ова опција не утиче на ниво опширности, стога и \fB\-\-quiet\fP и \fB\-\-no\-warn\fP +треба да се користе да се не приказују упозорења и да се не измени стање +излаза. +.TP +\fB\-\-robot\fP +Исписује поруке у формату обрадивом машинама. Ово је замишљено да олакша +писање челника који желе да користе \fBxz\fP уместо „liblzma“, што може бити +случај са разним скриптама. Излаз са овом опцијом укљученом је замишљен да +буде стабилан кроз \fBxz\fP издања. Видите одељак \fBРЕЖИМ РОБОТА\fP за више о +томе. +.TP +\fB\-\-info\-memory\fP +Приказује, у формату читљивом људима, колико физичке меморије (RAM) и колико +нити процесора \fBxz\fP мисли да систем има и ограничења коришћења меморије за +запакивање и распакивање и излази успешно. +.TP +\fB\-h\fP, \fB\-\-help\fP +Приказује поруку помоћи описујући најчешће коришћених опција, и успешно +излази. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +Приказује поруку помоћи описујући све функције \fBxz\fP, и успешно излази +.TP +\fB\-V\fP, \fB\-\-version\fP +Приказује број издања за \fBxz\fP и „liblzma“ у формату читљивом људима. Да +добијете излаз машинама обрадив, наведите \fB\-\-robot\fP пре \fB\-\-version\fP. +. +.SH "РЕЖИМ РОБОТА" +Режим робота се покреће опцијом \fB\-\-robot\fP. Чини да излаз \fBxz\fP буде лакши +за обраду другим програмима. Тренутно \fB\-\-robot\fP је подржано само заједно +са \fB\-\-list\fP, \fB\-\-filters\-help\fP, \fB\-\-info\-memory\fP, и \fB\-\-version\fP. Биће +подржан за запакивање и распакивање у будућности. +. +.SS "Режим списка" +\fBxz \-\-robot \-\-list\fP користи излаз раздвојен табулатором. Прва колона +сваког реда садржи ниску која указује на врсту информације која се налази у +том реду: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP (назив) +Ово је увек први ред приликом почетка листања датотеке. Друга колона у реду +је назив датотеке. +.TP +\fBfile\fP (датотека) +Овај ред садржи свеукупне информације о \fB.xz\fP датотеци. Овај ред се увек +исписује после реда \fBназив\fP. +.TP +\fBstream\fP (ток) +Ова врста реда се користи само када је \fB\-\-verbose\fP наведено. Има толико +редова \fBтока\fP колико има токова у \fB.xz\fP даатотеци. +.TP +\fBblock\fP (блок) +Ова врста реда се користи само када је \fB\-\-verbose\fP наведено. Има онолико +редова \fBблока\fP колико има блокова у \fB.xz\fP датотеци. Редови \fBблока\fP се +приказују након свих редова \fBтока\fP; различите врсте реда се не преплићу. +.TP +\fBsummary\fP (сажетак) +Ова врста реда се користи само када је \fB\-\-verbose\fP наведено два пута. Овај +ред се исписује након свих редова \fBблока\fP. Као ред \fBдатотека\fP, ред +\fBсажетка\fP садржи преглед информација о \fB.xz\fP датотеци. +.TP +\fBtotals\fP (укупност) +Овај ред је увек последњи ред на списку излаза. Показује укупне збирове и +величине. +.PP +Колоне редова \fBдатотеке\fP: +.PD 0 +.RS +.IP 2. 4 +Број токова у датотеци +.IP 3. 4 +Укупан број блокова у току(овима) +.IP 4. 4 +Величина запаковане датотеке +.IP 5. 4 +Величина незапаковане датотеке +.IP 6. 4 +Размера паковања, на пример, \fB0.123\fP. Ако је размера преко 9.999, три +цртице (\fB\-\-\-\fP) се приказују уместо размере. +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Зарезом раздвојен списак назива провера целовитости. Следеће ниске се +користе за познате врсте провера: \fBNone\fP, \fBCRC32\fP, \fBCRC64\fP и \fBSHA\-256\fP. +За непознате врсте провера, користи се \fBUnknown\-\fP\fIN\fP, где је \fIN\fP ИД +провере као децимални број (једна или две цифре). +.IP 8. 4 +Укупна величина попуњавања тока у датотеци +.RE +.PD +.PP +Колоне редова \fBтока\fP: +.PD 0 +.RS +.IP 2. 4 +Број тока (први ток је 1) +.IP 3. 4 +Број блокова у току +.IP 4. 4 +Померај почетка запакованог +.IP 5. 4 +Померај почетка незапаковане +.IP 6. 4 +Величина запакованог (не укључује попуну тока) +.IP 7. 4 +Величина незапаковане +.IP 8. 4 +Размера паковања +.IP 9. 4 +Назив провере целовитости +.IP 10. 4 +Величина попуне тока +.RE +.PD +.PP +Колоне редова \fBблока\fP: +.PD 0 +.RS +.IP 2. 4 +Број тока који садржи овај блок +.IP 3. 4 +Број блока релативан на почетак тока (први блок је 1) +.IP 4. 4 +Број блока релативан на почетак датотеке +.IP 5. 4 +Померај почетка запакованог односан на почетак датотеке +.IP 6. 4 +Померај почетка незапаковане односан на почетак датотеке +.IP 7. 4 +Укупна запакована величина блока (заједно са заглављима) +.IP 8. 4 +Величина незапаковане +.IP 9. 4 +Размера паковања +.IP 10. 4 +Назив провере целовитости +.RE +.PD +.PP +Ако је \fB\-\-verbose\fP наведено два пута, додатне колоне су укључене у редовима +\fBблока\fP. Они се не приказују са једним \fB\-\-verbose\fP, јер добијање ове +информације захтева много тражења и стога може бити споро: +.PD 0 +.RS +.IP 11. 4 +Вредност провере целовитости у хексадецималном облику +.IP 12. 4 +Величина заглавља блока +.IP 13. 4 +Заставице блока: \fBc\fP указује да је величина запакованог присутна, а \fBu\fP +указује да је величина нераспакованог присутна. Ако заставица није +постављена, цртица (\fB\-\fP) се приказује уместо да се настави са поправком +дужине ниске. У будућности нове заставице могу бити додате на крај ниске. +.IP 14. 4 +Величина стварних запакованих података у блоку (ово искључује заглавље +блока, попуњавање блока и поља провере) +.IP 15. 4 +Количина меморије (у бајтовима) потребна за распакивање овог блока са овим +\fBxz\fP издањем +.IP 16. 4 +Ланац филтера. Знајте да већина опција коришћених за време запакивања не +може бити познато, јер се само опције које су потребне за распакивање чувају +у \fB.xz\fP заглављима. +.RE +.PD +.PP +Колоне редова \fBсажетка\fP: +.PD 0 +.RS +.IP 2. 4 +Количина меморије (у бајтовима) потребна за распакивање ове датотеке са овим +\fBxz\fP издањем +.IP 3. 4 +\fByes\fP или \fBno\fP указује да ли сва заглавља блока имају и величину +запакованог и величину незапакованог сачуване у њима +.PP +\fIОд\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Потребно је најмање \fBxz\fP издање за распакивање датотеке +.RE +.PD +.PP +Колоне редова \fBукупности\fP: +.PD 0 +.RS +.IP 2. 4 +Број токова +.IP 3. 4 +Број блокова +.IP 4. 4 +Величина запакованог +.IP 5. 4 +Величина незапаковане +.IP 6. 4 +Просечан степен запакивања +.IP 7. 4 +Списак зарезом раздвојених назива провере целовитости која су била присутна +у датотекама +.IP 8. 4 +Величина попуњавања тока +.IP 9. 4 +Број датотека. Ту се држи поредак ранијих колона исто као у редовима +\fBдатотеке\fP. +.PD +.RE +.PP +Ако је \fB\-\-verbose\fP наведено два пута, додатне колоне су укључене у реду +\fBtotals\fP: +.PD 0 +.RS +.IP 10. 4 +Највећа количина меморије (у бајтима) потребна за распакивање датотеке са +овим \fBxz\fP издањем +.IP 11. 4 +\fByes\fP или \fBno\fP указује да ли сва заглавља блока имају и величину +запакованог и величину незапакованог сачуване у њима +.PP +\fIОд\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Потребно је најмање \fBxz\fP издање за распакивање датотеке +.RE +.PD +.PP +Будућа издања могу додати нове врсте реда и нове колоне се могу додати +постојећим врстама реда, али постојеће колоне се неће променити. +. +.SS "Помоћ филтера" +\fBxz \-\-robot \-\-filters\-help\fP исписује подржане филтере у следећем формату: +.PP +\fIфилтер\fP\fB:\fP\fIопција\fP\fB=<\fP\fIвредност\fP\fB>,\fP\fIопција\fP\fB=<\fP\fIвредност\fP\fB>\fP... +.TP +\fIфилтер\fP +Назив филтера +.TP +\fIопција\fP +Назив филтера специфичне опције +.TP +\fIвредност\fP +Опсези бројевних \fIвредности\fP се јављају као +\fB<\fP\fImin\fP\fB\-\fP\fImax\fP\fB>\fP. \fIВредност\fP ниске избора се приказују +унутар \fB< >\fP и раздвојене су знаком \fB|\fP. +.PP +Сваки филтер се исписује на свом сопственом реду. +. +.SS "Информације о ограничењу меморије" +\fBxz \-\-robot \-\-info\-memory\fP исписује један ред са више колона раздвојених +табулатором: +.IP 1. 4 +Укупна количина физичке меморије (RAM) у бајтима. +.IP 2. 4 +Ограничење коришћења меморије за запакивање у бајтима +(\fB\-\-memlimit\-compress\fP). Специјална вредност \fB0\fP означава основно +подешавање које је за режим једне нити исто као без ограничења. +.IP 3. 4 +Ограничење коришћења меморије за распакивање у бајтима +(\fB\-\-memlimit\-decompress\fP). Специјална вредност \fB0\fP означава основно +подешавање које је за режим једне нити исто као без ограничења. +.IP 4. 4 +Од \fBxz\fP 5.3.4alpha: Коришћење меморије за распакивање са више нити у +бајтима (\fB\-\-memlimit\-mt\-decompress\fP). Ово никада није нула јер систему +специфична основна вредност приказана у колони 5 се користи ако ограничење +није изричито наведено. Такође никада није веће од вредности у колони 3 чак +и ако је наведена већа вредност са \fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +Од \fBxz\fP 5.3.4alpha: Систему специфично основно ограничење коришћења +меморије које се користи за ограничавање броја нити приликом запакивања са +аутоматским бројем нити (\fB\-\-threads=0\fP) и без наведеног ограничења +коришћења меморије (\fB\-\-memlimit\-compress\fP). Ово се такође користи као +основна вредност за \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +Од \fBxz\fP 5.3.4alpha: Број доступних нити обрађивача. +.PP +У будуће, излаз \fBxz \-\-robot \-\-info\-memory\fP може имати више колона, али +никада више од једног реда. +. +.SS Издање +\fBxz \-\-robot \-\-version\fP исписује број издања за \fBxz\fP и „liblzma“ у следећем +формату: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Главно издање. +.TP +\fIYYY\fP +Споредно издање. Парни бројеви су стабилна а непарни су алфа или бета +издања. +.TP +\fIZZZ\fP +Ниво закрпе за стабилна издања или само бројач за развојна издања. +.TP +\fIS\fP +Стабилност. 0 је алфа, 1 је бета, а 2 је стабилно. \fIS\fP треба увек да буде +2 када је \fIYYY\fP парно. +.PP +\fIXYYYZZZS\fP су исти у оба реда ако су \fBxz\fP и „liblzma“ из истог издања XZ +Utils\-а. +.PP +Примери: 4.999.9beta је \fB49990091\fP и 5.0.0 је \fB50000002\fP. +. +.SH "СТАЊЕ ИЗЛАЗА" +.TP +\fB0\fP +Све је у реду. +.TP +\fB1\fP +Дошло је до грешке. +.TP +\fB2\fP +Десило се нешто вредно упозорења, али није дошло до стварних грешака. +.PP +Обавештења (без упозорења или грешака) исписано на стандардној грешци не +утичу на стање излаза. +. +.SH ОКРУЖЕЊЕ +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP обрађује размаком одвојени списак опција из променљивих окружења +\fBXZ_DEFAULTS\fP и \fBXZ_OPT\fP, тим редом, пре обраде опција са линије наредби. +Знајте да се обрађују само опције из променљивих окружења; све што нису +опције се тихо занемарује. Обрада се ради са \fBgetopt_long\fP(3) која се +користи такође за аргументе линије наредби. +.PP +\fBУпозорење:\fP Постављањем ових променљивих окружења, ефективно мењате +програме и скрипте које покреће \fBxz\fP. У већини случајева је безбедно +поставити ограничење коришћења, број нити и опција паковања путем +променљивих окружења. Међутим, неке опције могу да уруше скрипте. +Очигледан пример је \fB\-\-help\fP која чини да \fBxz\fP прикаже текст помоћи уместо +да запакује или распакује датотеку. Суптилнији примери су \fB\-\-quiet\fP и +\fB\-\-verbose\fP. У многим случајевима добро функционише омогућавање указивача +напредовања коришћењем \fB\-\-verbose\fP, али у неким ситуацијама додатне поруке +стварају проблеме. Ниво опширности такође утиче на понашање \fB\-\-list\fP +.TP +\fBXZ_DEFAULTS\fP +Кориснику специфичне или свеопште системске основне опције. Обично је ово +постављено у скрипти покретања конзоле за укључивање \fBxz\fP ограничавача +коришћења меморије по основи или за постављање основног броја нити. +Искључивање скрипти покретања конзоле и сличних специјалних случајева, +скрипте не смеју никада да поставе или пониште \fBXZ_DEFAULTS\fP. +.TP +\fBXZ_OPT\fP +Ово је за прослеђивање опција ка \fBxz\fP када није могуће поставити опције +директно на \fBxz\fP линији наредби. Ово је случај када је \fBxz\fP покренут +скриптом или алатом, на пример, са Гну \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +Скрипте могу да користе \fBXZ_OPT\fP, на пример, за постављање основних опција +запакивања специфичних скрипти. Још увек се препоручује омогућавање +корисницима да пишу преко \fBXZ_OPT\fP ако је то разумљиво. На пример, у +\fBsh\fP(1) скриптама неко може користити нешто као ово: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "LZMA UTILS САДЕЈСТВЕНОСТ" +Синтакса линије наредби \fBxz\fP је практично супер скуп \fBlzma\fP, \fBunlzma\fP и +\fBlzcat\fP као што се налази у LZMA Utils 4.32.x. У већини случајева, могуће +је заменити LZMA Utils са XZ Utils без оштећења постојећих скрипти. Има +неких несагласности такође, које понекад могу довести до проблема. +. +.SS "Нивои предподешавања запакивања" +Набрајање предподешености нивоа запакивања није исто у \fBxz\fP и LZMA Utils. +Најважнија разлика је у томе како се величине речника мапирају у различитим +предподешеностима. Величина речника је отприлике иста као и коришћење +меморије распакивача. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Ниво;xz;LZMA Utils +\-0;256 KiB;Н/Д +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +Разлике величине речника делују такође на коришћење меморије запакивање, али +постоје још неке разлике између LZMA Utils и XZ Utils, што чини разлике још +већим: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Ниво;xz;LZMA Utils 4.32.x +\-0;3 MiB;Н/Д +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +Основни ниво предподешености у LZMA Utils је \fB\-7\fP док у XZ Utils је \fB\-6\fP, +тако да оба користе 8 MiB речник по основи. +. +.SS "Токовне наспрам не\-токовних „.lzma“ датотеке" +Незапакована величина датотеке се може чувати у \fB.lzma\fP заглављу. LZMA +Utils то ради приликом запакивања обичних датотека. Алтернатива је да се +означи та незапакована величина као непозната и да се користи означавач +краја утовара да назначи где распакивач треба да стане. LZMA Utils користи +ову методу када незапакована величина није позната, што је случај, на +пример, у спојкама. +.PP +\fBxz\fP подржава распакивање \fB.lzma\fP датотека са или без означавача краја +утовара, али ће све \fB.lzma\fP датотеке направљене са \fBxz\fP користити +означавач краја утовара и означити незапаковану величину непознатом у +\&\fB.lzma\fP заглављу. Ово може бити проблем у неким неуобичајеним +ситуацијама. На пример, \fB.lzma\fP распакивач у угнежденом уређају може +радити само са датотекама које имају незапаковану величину. Ако наиђете на +тај проблем, треба да користите LZMA Utils или LZMA SDK да направите +\&\fB.lzma\fP датотеке са познатом незапакованом величином. +. +.SS "Неподржане „.lzma“ датотеке" +Формат \fB.lzma\fP омогућава \fIlc\fP вредности све до 8, а \fIlp\fP вредности све до +4. LZMA Utils може да распакује датотеке са било којим \fIlc\fP и \fIlp\fP, али +увек прави датотеке са \fBlc=3\fP и \fBlp=0\fP. Прављење датотека са другим \fIlc\fP +и \fIlp\fP је мгуће са \fBxz\fP и са LZMA SDK. +.PP +Примена филтера LZMA1 у „liblzma“ захтева да збир \fIlc\fP и \fIlp\fP не сме да +премаши 4. Стога, \fB.lzma\fP датотеке, које премаше ово ограничење, не могу +да се распакују са \fBxz\fP. +.PP +LZMA Utils прави само \fB.lzma\fP датотеке које имају величину речника од +2^\fIn\fP (степен 2) али прихвата датотеке са било којом величином речника. +„liblzma“ прихвата само \fB.lzma\fP датотеке које имају величину речника од +2^\fIn\fP или 2^\fIn\fP + 2^(\fIn\fP\-1). Ово је да се смање лажни позитивни +резултати приликом откривања \fB.lzma\fP датотека. +.PP +Ова ограничења не би требало да буду проблем у пракси, јер су практично све +\&\fB.lzma\fP датотеке запаковане са поставкама које ће „liblzma“ прихватити. +. +.SS "Пратеће смеће" +Приликом распакивања, LZMA Utils тихо занемарује све после првог \fB.lzma\fP +тока. У већини прилика, ово је грешка. Ово такође значи да LZMA Utils не +подржава распакивање надовезаних \fB.lzma\fP датотека. +.PP +Ако су остали подаци након првог \fB.lzma\fP тока, \fBxz\fP сматра да је датотека +оштећена осим ако је коришћено \fB\-\-single\-stream\fP. Ово може прекинути +нејасне скрипте које су претпоставиле да је пратеће смеће занемарено. +. +.SH НАПОМЕНЕ +. +.SS "Излаз запакованог може бити променљив" +Тачан запаковани излаз добијен из исте незапаковане улазне датотеке може се +разликовати између XZ Utils издања чак и ако су опције запакивања +истоветне. Ово је због тога што шифрер може бити побољшан (брже и боље +запакивање) а да не утиче на формат датотеке. Излаз се може разликовати +између различитих изградњи истог XZ Utils издања, ако су коришћене другачије +опције изградње. +.PP +Ово изнад значи да када се \fB\-\-rsyncable\fP једном примени, резултирајућа +датотека неће неопходно бити r\-ускладива осим ако и стара и нова датотека +нису запаковане истим xz издањем. Овај проблем може бити поправљен ако је +део примене шифрера замрзнут да држи r\-ускладив излаз стабилним кроз xz +издања. +. +.SS "Угнеждени „.xz“ распакивачи" +Примена угнежденог \fB.xz\fP распакивача као што је XZ Embedded неопходно не +подржава датотеке направљене врстама \fIпровере\fP целовитости осим \fBnone\fP и +\fBcrc32\fP. Како је основно \fB\-\-check=crc64\fP, морате да користите +\fB\-\-check=none\fP или \fB\-\-check=crc32\fP када правите датотеке за угнеждене +системе. +.PP +Споља уграђени системи, сви распакивачи \fB.xz\fP формата подржавају све врсте +\fIпровере\fP, или барем могу да распакују датотеку без испитивања провере +целовитости ако одређена \fIпровера\fP није подржана. +.PP +XZ Embedded подржава BCJ филтере, али само са основним померајем почетка. +. +.SH ПРИМЕРИ +. +.SS Основно +Запакује датотеку \fIfoo\fP у \fIfoo.xz\fP користећи основни ниво запакивања +(\fB\-6\fP), и уклања \fIfoo\fP ако је запакивање успешно: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +Распакује \fIbar.xz\fP у \fIbar\fP и не уклања \fIbar.xz\fP чак и када је распакивање +успешно: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +Ствара \fIbaz.tar.xz\fP са предподешавањем \fB\-4e\fP (\fB\-4 \-\-extreme\fP), које је +спорије него основно \fB\-6\fP, али захтева мање меморије за запакивање и +распакивање (48\ MiB и 5\ MiB): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +Мешавина сажетих и несажетих датотека се може распаковати на стандардни +излаз једном наредбом: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Паралелно запакивање више датотека" +На GNU и *BSD, \fBfind\fP(1) и \fBxargs\fP(1) се могу користити за паралелно +запакивање више датотека: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +Опција \fB\-P\fP за \fBxargs\fP(1) поставља број паралелних \fBxz\fP процеса. Најбоља +вредност за опцију \fB\-n\fP зависи од тога колико датотека има за запакивање. +Ако има само неколико датотека, вредност би вероватно требала да буде 1; са +више хиљада датотека, 100 или чак и више може бити одговарајуће за смањење +броја \fBxz\fP процеса које би \fBxargs\fP(1) евентуално направио. +.PP +Опција \fB\-T1\fP за \fBxz\fP је ту да га примора на једнонитни режим, јер се +\fBxargs\fP(1) користи за контролу количине паралелизације. +. +.SS "Режим робота" +Израчунава колико је бајтова укупно сачувано након запакивања више датотека: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Скрипта може желети да зна да користи најновији \fBxz\fP. Следећа скрипта +\fBsh\fP(1) проверава да ли је број издања \fBxz\fP алата барем 5.0.0. Ова +метода је сагласна са старим бета издањима која не подржавају \fB\-\-robot\fP +опцију: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Ваш „xz“ је превише стар." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Поставља ограничење коришћења меморије за распакивање коришћењем \fBXZ_OPT\fP, +али ако је ограничење већ постављено, не повећава је: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Произвољни ланци филтера запакивача" +Најједноставнија употреба за произвољне ланце филтера прилагођава LZMA2 +предподешеност. Ово може бити корисно, јер предподешености покривају само +подскуп потенцијално корисних комбинација поставки запакивања. +.PP +Колоне ЗапакЦПЈ у табелама из описа опција \fB\-0\fP ... \fB\-9\fP и \fB\-\-extreme\fP су +корисне приликом прилагођавања LZMA2 предподешености. Овде су значајни +делови прикупљени из те две табеле: +.RS +.PP +.TS +tab(;); +c c +n n. +Преподешеност;ЗапакЦПЈ +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +Ако знате да датотека захтева нешто велики речник (на пример, 32 \ MiB) за +добро запакивање, али желите да је запакујете брже него што би то \fBxz \-8\fP +урадио, предподешеност са ниском вредношћу ЗапакМем (на пример, 1) може се +изменити да користи већи речник: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +Са одређеним датотекама, горња наредба може бити бржа од \fBxz \-6\fP а +запакивање значајно боље. Међутим, мора бити наглашено да само неке +датотеке имају корист од великог речника док одржавају вредност ЗапакЦПЈ +ниском. Најочигледнија ситуација, у којој велики речник може доста помоћи, +јесте архива која садржи врло сличне датотеке где свака има најмање неколико +мегабајта. Величина речника треба да буде значајно већа од сваке засебне +датотеке да би се омогућило да LZMA2 има потпуну предност од сличности +између узастопних датотека. +.PP +Ако је веома велико коришћење меморије запакивача и распакивача у реду, а +датотека која се запакује је барем неколико стотина мегабајта, може бити +корисно користити још већи речник од 64 MiB који ће \fBxz \-9\fP користити: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +Коришћење \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP) као у горњем примеру може бити +корисно да се виде захтеви за меморијом запакивача и распакивача. Знајте да +је коришћење речника већег од величине незапаковане датотеке губитак +меморије, тако да горња наредба није корисна за мале датотеке. +.PP +Понекад време запакивања није важно, али коришћење меморије распакивача +треба да се одржава ниским, на пример, да би се учинило могућим распакивање +датотеке на угнежденом систему, Следеће наредбе користе \fB\-6e\fP (\fB\-6 \-\-extreme\fP) као основу и постављају речник на само 64\ KiB. Резултујућа +датотека се може распаковати са XZ Embedded (због тога је ту +\fB\-\-check=crc32\fP) користећи око 100\ KiB меморије. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +Ако желите да исцедите што је више могуће бајтова, дотеривање броја битова +контекста литерала (\fIlc\fP) и броја битова положаја (\fIpb\fP) може понекад да +помогне. Дотеривање броја битова положаја литерала (\fIlp\fP) може такође да +помогне, али обично \fIlc\fP и \fIpb\fP су важнији. На пример, архива извора кода +садржи углавном US\-ASCII текст, тако да нешто као следеће може да да +незнатно (око 0.1\ %) мању датотеку него \fBxz \-6e\fP (пробајте такође без +\fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +Коришћење још једног филтера заједно са LZMA2 може побољшати запакивање са +одређеним врстама датотека. На пример, за запакивање x86\-32 или x86\-64 +дељене библиотеке коришћењем x86 BCJ филтера: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +Знајте да поредак опција филтера има значај. Ако је \fB\-\-x86\fP наведено након +\fB\-\-lzma2\fP, \fBxz\fP ће дати грешку, јер не сме бити никаквог филтера после +LZMA2, и такође зато што се x86 BCJ филтер не може користити као последњи +филтер у ланцу. +.PP +Delta филтер заједно са LZMA2 може дати добре резултате са битмап сликама. +Требало би обично да надјача PNG, који има нешто више напредних филтера него +једноставни делта али користи Deflate за стварно запакивање. +.PP +Слика треба да се сачува у незапакованом формату, на пример, као +незапакована TIFF. Параметар растојања Delta филтера је постављен да се +подудари са бројем бајтова по пикселу у слици. На пример, RGB битмапа од 24 +бита захтева \fBdist=3\fP, а такође је добро проследити \fBpb=0\fP за LZMA2 да се +прилагоди поравнање од три бајта: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +Ако је више слика стављено у једну архиву (на пример, \fB.tar\fP), Delta филтер +ће радити на томе такође све док све слике не буду имале исти број бајтова +по пикселу. +. +.SH "ВИДИТЕ ТАКОЂЕ" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sr/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzdec.1 new file mode 100644 index 0000000000..c9bbe26f45 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzdec.1 @@ -0,0 +1,81 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Serbian translation of xz-man. +.\" Мирослав Николић , 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 08.04.2024. Tukaani "XZ Utils" +.SH НАЗИВ +xzdec, lzmadec – Мали „.xz“ и „.lzma“ распакивачи +.SH САЖЕТАК +\fBxzdec\fP [\fIопција...\fP] [\fIдатотека...\fP] +.br +\fBlzmadec\fP [\fIопција...\fP] [\fIдатотека...\fP] +.SH ОПИС +\fBxzdec\fP је алат само за распакивање заснован на „liblzma“ за \fB.xz\fP (и само +\&\fB.xz\fP) датотеке. \fBxzdec\fP је намењен да ради као тренутна замена за +\fBxz\fP(1) у најопштијим ситуацијама где је скрипта написана да користи \fBxz \-\-decompress \-\-stdout\fP (и по могућству још неколико других обично коришћених +опција) за распакивање \fB.xz\fP датотека. \fBlzmadec\fP је истоветна са \fBxzdec\fP +осим што \fBlzmadec\fP подржава \fB.lzma\fP датотеке уместо of \fB.xz\fP датотека. +.PP +За смањење величине извршне, \fBxzdec\fP не подржава више нити или +локализацију, и не чита опције из променљивих окружења \fBXZ_DEFAULTS\fP и +\fBXZ_OPT\fP. \fBxzdec\fP не подржава приказивање посредничких информација +напредовања: слање \fBSIGINFO\fP ка \fBxzdec\fP не ради ништа, али слање +\fBSIGUSR1\fP окончава процес уместо да прикаже информације о напредовању. +.SH ОПЦИЈЕ +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +Занемарено зарад \fBxz\fP(1) сагласности. \fBxzdec\fP подржава само распакивање. +.TP +\fB\-k\fP, \fB\-\-keep\fP +Занемарено зарад \fBxz\fP(1) сагласности. \fBxzdec\fP никада не прави или уклања +датотеке. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Занемарено зарад \fBxz\fP(1) сагласности. \fBxzdec\fP увек пише распаковане +податке на стандардни излаз. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Навођењем овога једном не ради ништа јер \fBxzdec\fP никада не приказује +упозорења или обавештења. Наведите ово два пута да потиснете грешке. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Занемарено зарад \fBxz\fP(1) сагласности. \fBxzdec\fP никада не користи излазно +стање 2. +.TP +\fB\-h\fP, \fB\-\-help\fP +Приказује поруку помоћи и излази с успехом. +.TP +\fB\-V\fP, \fB\-\-version\fP +Приказује број издања за \fBxzdec\fP и „liblzma“. +.SH "СТАЊЕ ИЗЛАЗА" +.TP +\fB0\fP +Све беше у реду. +.TP +\fB1\fP +Дошло је до грешке. +.PP +\fBxzdec\fP нема поруке упозорења као што има \fBxz\fP(1), стога \fBxzdec\fP не +користи излазно стање 2. +.SH НАПОМЕНЕ +Користите \fBxz\fP(1) уместо \fBxzdec\fP или \fBlzmadec\fP за обично свакодневно +коришћење. \fBxzdec\fP или \fBlzmadec\fP су замишљени само ситуације у којима је +важно имати мањи распакивач неко потпуно функционалан \fBxz\fP(1). +.PP +\fBxzdec\fP и \fBlzmadec\fP нису баш тако мали. Величина може бити још смањена +одбацивањем функција из „liblzma“ за време превођења, али то не треба обично +да се ради за извршне достављене у типичним не\-угнежденим дистрибуцијама +оперативног система. Ако вам треба стварно мали \fB.xz\fP распакивач, +размотрите коришћење XZ Embedded\-а. +.SH "ВИДИТЕ ТАКОЂЕ" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sr/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzdiff.1 new file mode 100644 index 0000000000..6c9ef9938e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzdiff.1 @@ -0,0 +1,54 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Serbian translation of xz-man. +.\" Мирослав Николић , 2025. +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 06.03.2025. Tukaani "XZ Utils" +.SH НАЗИВ +xzcmp, xzdiff, lzcmp, lzdiff – упоређује запаковане датотеке +. +.SH САЖЕТАК +\fBxzcmp\fP [\fIопција...\fP] \fIдатотека1\fP [\fIдатотека2\fP] +.br +\fBxzdiff\fP \&... +.br +\fBlzcmp\fP \&... (ЗАСТАРЕЛО) +.br +\fBlzdiff\fP \&... (ЗАСТАРЕЛО) +. +.SH ОПИС +\fBxzcmp\fP и \fBxzdiff\fP пореди незапаковане садржаје две датотеке. +Незапаковани подаци и опције се прослеђују ка \fBcmp\fP(1) или \fBdiff\fP(1) осим +ако није наведено \fB\-\-help\fP or \fB\-\-version\fP. +.PP +Ако су наведене и \fIдатотека1\fP и \fIдатотека2\fP, оне могу бити незапаковане +датотеке или датотеке у форматима које \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), +\fBlzop\fP(1), \fBzstd\fP(1) или \fBlz4\fP(1) могу да распакују. Захтеване наредбе +распакивања се одређују из суфикса назива \fIдатотеке1\fP и \fIдатотеке2\fP. +Датотека са непознатим суфиксом се претпоставља да је незапакована или да је +у формату који \fBxz\fP(1) може да распакује. +.PP +Ако је достављен само један назив датотеке, \fIдатотека1\fP мора да има суфикс +подржаних формата запакивања а назив за \fIдатотеку2\fP се подразумева да је +\fIдатотека1\fP са уклоњеним суфиксом формата запакивања. +.PP +Наредбе \fBlzcmp\fP и \fBlzdiff\fP се достављају зарад назадне сагласности са LZMA +Utils. Застареле су и биће уклоњене у будућем издању. +. +.SH "СТАЊЕ ИЗЛАЗА" +Ако дође до грешке распакивања,излазно стање је \fB2\fP. У супротном излазно +стање од \fBcmp\fP(1) или \fBdiff\fP(1) се користи. +. +.SH "ВИДИТЕ ТАКОЂЕ" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sr/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzgrep.1 new file mode 100644 index 0000000000..263fed9983 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzgrep.1 @@ -0,0 +1,92 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Serbian translation of xz-man. +.\" Мирослав Николић , 2025. +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 06.03.2025. Tukaani "XZ Utils" +.SH НАЗИВ +xzgrep – претражује могуће запаковане датотеке за шаблонима +. +.SH САЖЕТАК +\fBxzgrep\fP [\fIопција...\fP] [\fIсписак_шаблона\fP] [\fIдатотека...\fP] +.br +\fBxzegrep\fP \&... +.br +\fBxzfgrep\fP \&... +.br +\fBlzgrep\fP \&... (ЗАСТАРЕЛО) +.br +\fBlzegrep\fP \&... (ЗАСТАРЕЛО) +.br +\fBlzfgrep\fP \&... (ЗАСТАРЕЛО) +. +.SH ОПИС +\fBxzgrep\fP призива \fBgrep\fP(1) на незапакованим садржајима датотека. Формати +\fIдатотека\fP се одређују из суфикса назива датотека. Било која \fIдатотека\fP +са суфиксом подржаним од стране \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), +\fBlzop\fP(1), \fBzstd\fP(1) или \fBlz4\fP(1) биће распакована; све остале датотеке +се подразумевају да нису запаковане. +.PP +Ако \fIдатотеке\fP нису наведене или \fIдатотека\fP је \fB\-\fP тада се чита +стандардни улаз. Приликом читања са стандардног улаза, само датотеке +подржане са \fBxz\fP(1) се распакују. Друге датотеке се подразумева да су већ +у незапакованом облику. +.PP +Већина \fIопција\fP \fBgrep\fP(1) је подржана. Међутим, следеће опције нису +подржане: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIрадња\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIдатотека\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIglob\fP +.PP +\fBxzegrep\fP је алијас за \fBxzgrep \-E\fP. \fBxzfgrep\fP је алијас за \fBxzgrep \-F\fP. +.PP +Наредбе \fBlzgrep\fP, \fBlzegrep\fP и \fBlzfgrep\fP се достављају зарад назадне +сагласности са LZMA Utils. Застареле су и биће уклоњене у будућем издању. +. +.SH "СТАЊЕ ИЗЛАЗА" +.TP +0 +Најмање једно поклапање је пронађено из барем једне од улазних датотека. +Није било грешака. +.TP +1 +Никаква поклапања нису пронађена ни из једне од улазних датотека. Није дошло +до грешака. +.TP +>1 +Дошло је до једне или више грешака. Није познато да ли су поклапања нађена. +. +.SH ОКРУЖЕЊЕ +.TP +\fBGREP\fP +Ако је \fBGREP\fP постављено на не\-празну вредност, користи се уместо \fBgrep\fP, +\fBgrep \-E\fP или \fBgrep \-F\fP. +. +.SH "ВИДИТЕ ТАКОЂЕ" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sr/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzless.1 new file mode 100644 index 0000000000..af9fd3a0e9 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzless.1 @@ -0,0 +1,47 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Serbian translation of xz-man. +.\" Мирослав Николић , 2025. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 06.03.2025. Tukaani "XZ Utils" +.SH НАЗИВ +xzless, lzless – приказује „xz“ или „lzma“ запаковане (текстуалне) датотеке +.SH САЖЕТАК +\fBxzless\fP [\fIдатотека\fP...] +.br +\fBlzless\fP [\fIдатотека\fP...] (ЗАСТАРЕЛО) +.SH ОПИС +\fBxzless\fP је филтер који приказује текст из запакованих датотека у +терминалу. Датотеке које подржава \fBxz\fP(1) се распакују; остале датотеке се +већ подразумева да су у незапакованом облику. Ако није дата ни једна +\fIдатотека\fP, \fBxzless\fP чита са стандардног улаза. +.PP +\fBxzless\fP користи \fBless\fP(1) да представи свој излаз. За разлику од +\fBxzmore\fP, његов избор страничара се не може изменити постављањем променљиве +окружења. Наредбе се заснивају и на \fBmore\fP(1) и на \fBvi\fP(1) и дозвољавају +померање и претрагу назад и напред. Видите упутство \fBless\fP(1) за више +информација. +.PP +Наредба \fBlzless\fP се доставља зарад назадне сагласности са LZMA +Utils. Застарела је и биће уклоњена у будућем издању. +.SH ОКРУЖЕЊЕ +.TP +\fBLESSMETACHARS\fP +Списак знакова нарочитих за шкољку. Поставите са \fBxzless\fP осим ако већ +није постављено у окружењу. +.TP +\fBLESSOPEN\fP +Поставља да линија наредби призове \fBxz\fP(1) распакивач за предобраду улазних +датотека на \fBless\fP(1). +.SH "ВИДИТЕ ТАКОЂЕ" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sr/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzmore.1 new file mode 100644 index 0000000000..23df9c6cf0 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sr/xzmore.1 @@ -0,0 +1,49 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Serbian translation of xz-man. +.\" Мирослав Николић , 2025. +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 06.03.2025. Tukaani "XZ Utils" +.SH НАЗИВ +xzmore, lzmore – приказује „xz“ или „lzma“ запаковане (текстуалне) датотеке +. +.SH САЖЕТАК +\fBxzmore\fP [\fIдатотека\fP...] +.br +\fBlzmore\fP [\fIдатотека\fP...] (ЗАСТАРЕЛО) +. +.SH ОПИС +\fBxzmore\fP приказује текст из запакованих датотека у терминалу користећи +\fBmore\fP(1). Датотеке које подржава \fBxz\fP(1) се распакују; остале датотеке +се подразумева да су већ у незапакованом облику. Ако није дата ни једна +\fIдатотека\fP, \fBxzmore\fP чита са стандардног улаза. Видите упутство +\fBmore\fP(1) за више информација. +.PP +Знајте да клизање уназад можда неће бити могуће у зависности од примене +\fBmore\fP(1). Ово је зато што \fBxzmore\fP користи спојку за прослеђивање +распакованих података ка \fBmore\fP(1). \fBxzless\fP(1) користи \fBless\fP(1) које +обезбеђује напреднијим функцијама. +.PP +Наредба \fBlzmore\fP се доставља зарад назадне сагласности са LZMA +Utils. Застарела је и биће уклоњена у будућем издању. +. +.SH ОКРУЖЕЊЕ +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +Ако је \fBPAGER\fP постављено, његова вредност се користи као страничар уместо +\fBmore\fP(1). +. +.SH "ВИДИТЕ ТАКОЂЕ" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sv/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/sv/lzmainfo.1 new file mode 100644 index 0000000000..bb72d25c53 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sv/lzmainfo.1 @@ -0,0 +1,42 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Swedish translation of xz-man +.\" Göran Uddeborg , 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 2013\-06\-30 Tukaani "XZ Utils" +.SH NAMN +lzmainfo — visa information lagrad i filhuvudet i .lzma +.SH SYNOPSIS +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIfil…\fP] +.SH BESKRIVNING +\fBlzmainfo\fP visar information som finns lagrad i filhuvudet i \fB.lzma\fP. Den +läser de första 13 byten från den angivna \fIfilen\fP, avkodar huvudet, och +skriver ut det till standard ut i mänskligt läsbart format. Om inga \fIfiler\fP +anges eller \fIfil\fP är \fB\-\fP, läses standard in. +.PP +Vanligen är den intressantaste informationen den okomprimerade storleken och +lexikonstorleken. Okomprimerad storlek kan endast visas om filen är i den +icke\-strömmande \fB.lzma\fP\-formatvarianten. Mängden minne som krävs för att +dekomprimera filen är några dussin kilobyte plus lexikonstorleken. +.PP +\fBlzmainfo\fP inkluderas i XZ Utils primärt för bakåtkompatibilitet med LZMA +Utils. +.SH SLUTSTATUS +.TP +\fB0\fP +Allt är bra. +.TP +\fB1\fP +Ett fel uppstod. +.SH FEL +\fBlzmainfo\fP använder \fBMB\fP medan det korrekta suffixet vore \fBMiB\fP (2²⁰ +byte). Detta är för att behålla utdata kompatibel med LZMA Utils. +.SH "SE ÄVEN" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sv/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/sv/xz.1 new file mode 100644 index 0000000000..1fb596e1ab --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sv/xz.1 @@ -0,0 +1,1954 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Swedish translation of xz-man +.\" Göran Uddeborg , 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 2025\-03\-08 Tukaani "XZ Utils" +. +.SH NAMN +xz, unxz, xzcat, lzma, unlzma, lzcat — Komprimera eller dekomprimera .xz\- +och .lzma\-filer +. +.SH SYNOPSIS +\fBxz\fP [\fIflagga…\fP] [\fIfil…\fP] +. +.SH KOMMANDOALIAS +\fBunxz\fP är ekvivalent med \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP är ekvivalent med \fBxz \-\-decompress \-\-stdout\fP. +.br +\fBlzma\fP är ekvivalent med \fBxz \-\-format=lzma\fP. +.br +\fBunlzma\fP är ekvivalent med \fBxz \-\-format=lzma \-\-decompress\fP. +.br +\fBlzcat\fP är ekvivalent med \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP. +.PP +När man skriver skript som behöver dekomprimera filer rekommenderas det att +altid använda namnet \fBxz\fP mäd lämpliga argument (\fBxz \-d\fP eller \fBxz \-dc\fP) +istället för namnen \fBunxz\fP och \fBxzcat\fP. +. +.SH BESKRIVNING +\fBxz\fP är ett datakomprimeringsverktyg för allmänt bruk med en +kommandoradssyntax som liknar \fBgzip\fP(1) och \fBbzip2\fP(1). Det egna +filformatet är formatet \fB.xz\fP, men det föråldrade formatet \fB.lzma\fP som +anändes av LZMA\-verktyg och råa komprimerade strömmar utan huvuden för +behållarformatet stödjs också. Dessutom stödjs dekomprimering av formatet +\&\fB.lz\fP som används av \fBlzip\fP. +.PP +\fBxz\fP komprimerar och dekomprimerar varje \fIfil\fP i enlighet med det valda +arbetsläget. Om inga \fIfiler\fP anges eller \fIfil\fP är \fB\-\fP läser \fBxz\fP från +standard in och skriver den behandade datan på standard ut. \fBxz\fP kommer +vägra (visa ett felmeddelande och hoppa över \fIfilen\fP) att skriva +komprimerad data direkt till standard ut om det är en terminal. På samma +sätt kommer \fBxz\fP vägra att läsa komprimerade data från standard in om det +är en terminal. +.PP +Om inte \fB\-\-stdout\fP anges skrivs andra \fIfiler\fP än \fB\-\fP till en ny fil vars +namn härleds från käll\fIfilens\fP namn: +.IP \(bu 3 +Vid kompringering läggs suffixet till på målfilsformatet (\fB.xz\fP eller +\&\fB.lzma\fP) på slutet av källfilnamnet för att få målfilnamnet. +.IP \(bu 3 +Vid dekomprimering tas suffixet \fB.xz\fP, \fB.lzma\fP eller \fB.lz\fP bort från +filnamnet för att få målfilnamnet. \fBxz\fP känner även igen suffixen \fB.txz\fP +och \fB.tlz\fP, och ersätter dem med suffixet \fB.tar\fP. +.PP +Om målfilen redan finns visas ett felmeddelande och \fIfilen\fP hoppas över. +.PP +Utom när den skriver till standard ut kommer \fBxz\fP visa en varning och hoppa +över \fIfilen\fP om något av följande inträffar: +.IP \(bu 3 +\fIFil\fP är inte en vanlig fil. Symboliska länkar följs inte, och därför anses +de inte vara vanliga filer. +.IP \(bu 3 +\fIFil\fP har mer än en hård länk. +.IP \(bu 3 +\fIFil\fP har biten setuid, setgid eller sticky satt. +.IP \(bu 3 +Arbetsläget är satt till att komprimera och \fIfilen\fP har redan ett suffix +enligt målfilformatet (\fB.xz\fP eller \fB.txz\fP vid komprimering till formatet +\&\fB.xz\fP, och \fB.lzma\fP eller \fB.tlz\fP vid komprimering till formatet \fB.lzma\fP). +.IP \(bu 3 +Arbetsläget är satt till att dekomprimera och \fIfilen\fP har inte ett suffix +enligt något av de stödda filformaten (\fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP +eller \fB.lz\fP). +.PP +Efter att ha kunnat komprimera eller dekomprimera \fIfilen\fP kopierar \fBxz\fP +ägaren, gruppen, rättigheterna, åtkomsttiden och ändringstiden från +käll\fIfilen\fP till målfilen. Om kopieringen av grupp misslyckas ändras +rättigheterna så att målfilen inte blir åtkomlig för användare som inte har +rättigheter att komma åt käll\fIfilen\fP. \fBxz\fP stödjer inte kopiering av annan +metadata såsom åtkomststyrhingslistor eller utökade attribut ännu. +.PP +När målfilen har stängts framgångsrikt tas käll\fIfilen\fP bort såvida inte +\fB\-\-keep\fP angavs. Käll\fIfilen\fP tas aldrig bort om utdata skrevs till +standard ut eller om något fel inträffade. +.PP +Att skicka \fBSIGINFO\fP eller \fBSIGUSR1\fP till \fBxz\fP\-processen får den att +skriva ut förloppsinformation till standard fel. Detta är bara av begränsat +värde eftersom när standard fel går till en terminal så kommer användning av +\fB\-\-verbose\fP att skriva ut en automatiskt uppdaterande förloppsindikator. +. +.SS Minnesanvändning +\fBxz\fP:s minnesanvändning varierar från några få hundra kilobyte till flera +gigabyte beroende på komprimeringsinställningarna. Inställningen som +användes när en fil komprimerades avgör minnesbehovet hos +dekomprimeraren. Typiskt behöver dekomprimeraren 5\ % till 20\ % av +minnesbehovet som komprimeraren behöver när en fil skapas. Till exempel, att +dekomprimera en fil skapad med \fBxz \-9\fP kräver för närvarande 65\ MiB +minne. Ändå är det möjligt att ha \fB.xz\fP\-filer som behöver flera gigabyte +minne för att dekomprimeras. +.PP +Särskilt användare av äldre system kan finna möjligheten av väldigt stor +minnesanvändning störande. För att förhindra obehagliga överraskningar har +\fBxz\fP en inbyggd minnesanvändningsbegränsare, vilken är avaktiverad som +standard. Även om vissa operativsystem kan tillhandahålla möjligheter att +begränsa minnesanvändningen hos processer bedömdes det inte som flexibelt +nog att lita på det (till exempel, att använda \fBulimit\fP(1) för att begränsa +det virtuella minnet tenderar att hämma \fBmmap\fP(2). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +Minnesanvändningsbegränsaren kan aktiveras med kommandoradsflaggan +\fB\-\-memlimit=\fP\fIgräns\fP. Ofta är det bekvämare att aktivera begränsaren som +standard genom att sätta miljövariabeln \fBXZ_DEFAULTS\fP, till exempel, +\fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. Det är möjligt att sätta gränser separat +för komprimering och dekomprimering genom att använda +\fB\-\-memlimit\-compress=\fP\fIlimit\fP och \fB\-\-memlimit\-decompress=\fP\fIlimit\fP. Att +använda dessa två flaggor utanför \fBXZ_DEFAULTS\fP är sällan meningsfullt +eftersom en enskild körning av \fBxz\fP inte kan göra både komprimering och +dekomprimering och and \fB\-\-memlimit=\fP\fIgräns\fP (eller \fB\-M\fP \fIgräns\fP) är +kortare att skriva på kommandoraden. +.PP +Om den angivna minnesanvändningsgränsen överskrid vid dekomprimering kommer +\fBxz\fP visa ett fel och dekomprimeringen av filen misslyckas. Om gröensen +överskrids vid komprimering kommer \fBxz\fP försöka skala ner inställningen så +att gränsen inte längre överskrids (utom när \fB\-\-format=raw\fP eller +\fB\-\-no\-adjust\fP används). På detta sätt kommer åtgärden inte misslyckas om +inte gränsen är väldigt liten. Skalningen av inställningen görs i steg som +inte matchar de förinställda komprimeringsnivåerna, till exempel, om gränsen +endast är något mindre än den mängd som behövs till \fBxz \-9\fP kommer +inställningen bara skalas ner lite, inte hela vägen ner till \fBxz \-8\fP. +. +.SS "Konkatenering och utfyllnad av .xz\-filer" +Det är möjligt att konkatenera \fB.xz\fP\-filer som de är. \fBxz\fP kommer +dekomprimera sådana filer som om de vore en enda \fB.xz\fP\-fil. +.PP +Det är möjligt att infoga utfyllnad mellan de konkatenerade delarna eller +efter den sista delen. Utfyllnaden måste bestå av null\-bytear och storleken +på utfyllnaden måste vara en multipel av fyra byte. Detta kan vara +användbart, till exempel, om \fB.xz\fP\-filen lagras på ett medium som mäter +filstorlekar i 512\-byteblock. +.PP +Konkaternering och utfyllnad är inte tillåtet med \fB.lzma\fP\-filer eller råa +strömmar. +. +.SH FLAGGOR +. +.SS "Heltalssuffix och speciella värden" +På de flesta platser där ett heltalsargument förväntas stödjs ett frivilligt +suffix för att enkelt indikera stora heltal. Det får inte finnas något +mellanrumm mellan heltalet och suffixet. +.TP +\fBKiB\fP +Multiplicera heltalet med 1 024 (2¹⁰). \fBKi\fP, \fBk\fP, \fBkB\fP, \fBK\fP och \fBKB\fP är +tillåtna som synomymer till \fBKiB\fP. +.TP +\fBMiB\fP +Multiplicera heltalet med 1 048 576 (2²⁰). \fBMi\fP, \fBm\fP, \fBM\fP och \fBMB\fP är +tillåtna som synomymer till \fBMiB\fP. +.TP +\fBGiB\fP +Multiplicera heltalet med 1 073 741 824 (2³⁰). \fBGi\fP, \fBg\fP, \fBG\fP och \fBGB\fP +är tillåtna som synonymer till \fBGiB\fP. +.PP +Specialvärdet \fBmax\fP kan användas för att indikera det maximala heltalet som +stödjs av flaggan. +. +.SS Arbetsläge +Om flera arbetslägesflaggor ges gäller den sista. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Komprimera. Detta är standardarbetsläget när ingen arbetslägesflagga anges +och inget annat arbetsläge impliceras från kommandonamnet (till exempel +implicerar \fBunxz\fP \fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Efter lyckad komprimering källfilen bort såvida man inte skriver till +standard ut eller \fB\-\-keep\fP angavs. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Dekomprimera. Efter lyckad dekomprimering tas källfilen bort såvida man inte +skriver till standard ut eller \fB\-\-keep\fP angavs. +.TP +\fB\-t\fP, \fB\-\-test\fP +Testa integriteten hos komprimerade \fIfiler\fP. Denna flagga är ekvivalent med +\fB\-\-decompress \-\-stdout\fP förutom att den dekomprimerade datan slängs +istället för att skrivas på standard ut. Inga filer skapas eller tas bort. +.TP +\fB\-l\fP, \fB\-\-list\fP +Skriv information om komprimerade \fIfiler\fP. Inge dekomprimeringsutdata +skapas, och inga filer skapas eller tas bort. I listläge kan programmet inte +läsa komprimerad data från standard in eller från andra källor där man inte +kan söka. +.IP "" +Standardlistningen visar grundläggande information om \fIfiler\fP, en fil per +rad. För att få mer detaljerad information, använd även flaggan +\fB\-\-verbose\fP. För ännu mer information, använd \fB\-\-verbose\fP två gånger, men +observera att detta kan vara långsamt, eftersom det behövs många sökningar +får att samla all den extra informationen. Bredden av utförlig utdata +överskrider 80 tecken, så att skicka utdata i ett rör till, till exempel, +\fBless\ \-S\fP kan vara bekvämt om terminalen inte är bred nog. +.IP "" +Den exakta utdatan kan variera mellan versioner av \fBxz\fP och olika +lokaler. För maskinläsbar utdata bör \fB\-\-robot \-\-list\fP användas. +. +.SS Arbetsmodifierare +.TP +\fB\-k\fP, \fB\-\-keep\fP +Ta inte bort indatafilerna. +.IP "" +Från \fBxz\fP 5.2.6 gör denna flagga även att \fBxz\fP komprimerar eller +dekomprimerar även om indatan är en symbolisk länk till en normal fil, har +mer än en hård länk eller har biten setuid, setgid eller sticky +satt. Bitarna setuid, setgid och sticky kopieras inte till målfilen. I +tidigare versioner gjordes detta bara med \fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Denna flagga har flera funktioner: +.RS +.IP \(bu 3 +Om målfilen redan finns, radera den före komprimering eller dekomprimering. +.IP \(bu 3 +Komprimera eller dekomprimera även om indatan är en symbolisk länk till en +normal fil, har mer än en hård länk eller har biten setuid, setgid eller +sticky satt. Bitarna setuid, setgid och sticky kopieras inte till målfilen. +.IP \(bu 3 +När den används med \fB\-\-decompress\fP \fB\-\-stdout\fP och \fBxz\fP inte känner igen +typen på källfilen, kopiera källfilen som den är till standard ut. Detta gör +att \fBxzcat\fP \fB\-\-force\fP kan användas som \fBcat\fP(1) för filer som inte har +komprimerats med \fBxz\fP. Observera att i framtiden kan \fBxz\fP komma att stödja +nya komprimeringsfilformat, vilket kan få \fBxz\fP att dekomprimera fler typer +av filer istället för att kopiera dem till standard ut. +\fB\-\-format=\fP\fIformat\fP kan användas för att begränsa \fBxz\fP till att +dekomprimera endast ett enda filformat. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Skriv den komprimerade eller dekomprimerade datan till standard ut istället +för en fil. Detta implicerar \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +Dekomprimera endast den första \fB.xz\fP\-strömmen, och ignorera tys eventuella +återstående indata som följer efter strömmen. Normalt får sådant avslutande +skräp \fBxz\fP att visa ett fel. +.IP "" +\fBxz\fP dekomprimerar aldrig mer än en ström från \fB.lzma\fP\-filer eller råa +strömmar, men denna flagga gör ändå att \fBxz\fP ignorerar den möjliga +efterföljande datan efter \fB.lzma\fP\-filen eller den råa strömmen. +.IP "" +Denna flagga har ingen effekt om arbetsläget inte är \fB\-\-decompress\fP eller +\fB\-\-test\fP. +.IP "" +Sedan \fBxz\fP 5.7.1alpha, implicerar \fB\-\-single\-stream\fP \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +Avaktivera att glesa filer skapas. Som standard, om den dekomprimerar till +en normal fil, försöker \fBxz\fP att göra filen gles om den dekomprimerade +datan innehåller långa sekvenser av binära nollor. Det fungerar även när den +skriver till standard ut så länga standard ut är kopplad till en normal fil +och vissa ytterligare villkor möts för att göra det säkert. Att skapa glesa +filer kan spara diskutrymme och snabba upp dekomprimeringen genom att +begränsa mängden disk\-I/O. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +Vid komprimering, använd \fI.suf\fP som suffixet för målfilen istället för +\&\fB.xz\fP eller \fB.lzma\fP. Om den inte skriver till standard ut och källfilen +redan har suffixet \fI.suf\fP visas en varning och filen hoppas över. +.IP "" +Vid dekomprimering, känn igen filer med suffixet \fI.suf\fP utöver filer +medsuffixen \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP eller \fB.lz\fP. Om källfilen +har suffixet \fI.suf\fP tas suffixet bort för att få målfilnamnet. +.IP "" +Vid komprimering eller dekomprimering av råa strömmar (\fB\-\-format=raw\fP) +måste alltid suffixet anges om den inte skriver till standard ut, eftersom +det inte finns något standardsuffix för råa strömmar. +.TP +\fB\-\-files\fP[\fB=\fP\fIfil\fP] +Läs filnamnen att arbeta på från \fIfil\fP; om \fIfil\fP utelämnas läses filnamn +från standard in. Filnamn måste avslutas med nyradstecknet. Ett bindestreck +(\fB\-\fP) tas som ett vanligt filnamn; det betyder inte standard in. Om filnamn +även anges som kommandoradsargument, bearbetas de före filnamnen som läses +från \fIfil\fP. +.TP +\fB\-\-files0\fP[\fB=\fP\fIfil\fP] +Detta är identiskt med \fB\-\-files\fP[\fB=\fP\fIfil\fP] förjutom att varje filnamn +måste avslutas med ett nulltecken. +. +.SS "Grundläggande flaggor för filformat och komprimering" +.TP +\fB\-F\fP \fIformat\fP, \fB\-\-format=\fP\fIformat\fP +Angi filens \fIformat\fP att komprimera eller dekomprimera: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +Detta är standard. Vid komprimering är \fBauto\fP ekvivalent med \fBxz\fP. Vid +dekomprimering detekteras automatiskt formatet på indatafilen. Observera att +råa strömmar (skapade med \fB\-\-format=raw\fP inte kan detekteras automatiskt. +.TP +\fBxz\fP +Komprimera till filformatet \fB.xz\fP, eller acceptera endast \fB.xz\fP\-filer vid +dekomprimering. +.TP +\fBlzma\fP, \fBalone\fP +Komprimera till det föråldrade filformatet \fB.lzma\fP, eller acceptera endast +\&\fB.lzma\fP\-filer fid dekomprimering. Det alternativa namnet \fBalone\fP +tillhandahålls för bakåtkompatibilitet med LZMA Utils. +.TP +\fBlzip\fP +Acceptera endast \fB.lz\fP\-filer vid dekomprimering. Komprimering stödjs inte. +.IP "" +\&\fB.lz\fP\-formatet version 0 och 1 stödjs. Version 0\-filer producerades av +\fBlzip\fP 1.3 och tidigare. Sådana filer är inte vanliga men kan hittas från +filarkiv eftersom några källpaket släpptes i detta format. Folk kan ha även +ha gamla personliga filer i detta format. Dekomprimeringsstöd för format +version 0 togs bort i \fBlzip\fP 1.18. \fBlzip\fP 1.4 och senare kan skapa filer i +formatversion 1. +.TP +\fBraw\fP +Komprimera eller dekomprimera en rå ström (inga huvuden). Detta är endast +avsett för avancerade användare. För att avkoda råa strömmar behöver man +använda \fB\-\-format=raw\fP och explicit angi filterkedjan, vilken normalt +skulle ha lagrats i behållarens huvuden. +.RE +.TP +\fB\-C\fP \fIkontroll\fP, \fB\-\-check=\fP\fIkontroll\fP +Ange typen av integritetskontroll. Kontrollen beräknas från den +dekomprimerade datan och lagras i \fB.xz\fP\-filen. Denna flagga har endast +någon inverkan när man komprimerar till formatet \fB.xz\fP; formatet \fB.lzma\fP +stödjer inte integritetskontroller. Integritetskontrollen (om någon) +verifieras när \fB.xz\fP\-filen dekomprimeras. +.IP "" +\fIKontroll\fPtyper som stödjs: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +Beräkna inte någon integritetskontroll alls. Detta är normalt en dålig +idé. Det kan vara användbart när datans integritet ändå verifieras på andra +sätt. +.TP +\fBcrc32\fP +Beräkna CRC32 med polynomet från IEEE\-802.3 (Ethernet). +.TP +\fBcrc64\fP +Beräkna CRC64 med polynomet från ECMA\-182. Detta är standard, eftersom det +är något bättre än CRC32 på att upptäcka skadade filer och +hastighetsskillnaden är försumbar. +.TP +\fBsha256\fP +Beräkna SHA\-256. Detta är något långsammare än CRC32 och CRC64. +.RE +.IP "" +Integriteten hos \fB.xz\fP\-huvuden verifieras alltid med CRC32. Det är inte +möjligt att ändra eller avaktivera det. +.TP +\fB\-\-ignore\-check\fP +Verifiera inte integritetskontrollen av den komprimerade datan vid +dekomprimering. CRC32\-värden i \fB.xz\fP\-huvudena kommer fortfarande verifieras +normalt +.IP "" +\fBAnvänd inte denna flagga om du inte vet vad du gör.\fP Möjliga anledningar +till att använda denna flagga: +.RS +.IP \(bu 3 +Försöka återvinna data från en trasig .xz\-fil. +.IP \(bu 3 +Snabba upp dekomprimering. Detta har störst betydelse med SHA\-256 eller med +filer som har komprimerats extremt mycket. Det rekommenderas att inte +använda denna flagga för detta ändamål om inte filintegriteten verifieras +externt på något annat sätt. +.RE +.TP +\fB\-0\fP … \fB\-9\fP +Välj en förinställningsnivå för komprimering. Standard är \fB\-6\fP. Om flera +förinställningsnivåer anges gäller den sist angivna. Om en anpassad +fileterkedja redan angivits gör en inställning av en förinställningsnivå för +komprimering att den anpassade filterkedjan töms. +.IP "" +Skillnaden mellan förinställningarna har större betydelse än med \fBgzip\fP(1) +och \fBbzip2\fP(1). Den valda komprimeringsinställningen avgör minneskraven för +dekomprimeraren, att använda en för hög förinställningsnivå kan alltså göra +det plågsamt att dekomprimera filer på ett gammalt system med lite +RAM. Specifikt \fBär det inte en bra ide att blint använda \-9 för allt\fP +liksom det ofta är med \fBgzip\fP(1) och \fBbzip2\fP(1). +.RS +.TP +\fB\-0\fP … \fB\-3\fP +Dessa är ganska snabba förinställningar. \fB\-0\fP är ibland snabbare än \fBgzip \-9\fP samtidigt som komprimeringen är mycket bättre. De högre har ofta +hastighet jämförbar med \fBbzip2\fP(1) med jämförbar eller bättre +komprimeringsförhållande, även om resultatet mycket beror på typen av data +som komprimeras. +.TP +\fB\-4\fP … \fB\-6\fP +Bra för väldigt god komprimering samtidigt som dekomprimerarens +minnesanvändning hålls rimlig även på gamla system. \fB\-6\fP är standardvärdet, +vilket vanligen är ett bra val för att distribuera filer so behöver +dekomprimeras även på ssytem med endast 16\ MiB RAM. (\fB\-5e\fP eller \fB\-6e\fP +kan också vara värda att överväga. Se \fB\-\-extreme\fP.) +.TP +\fB\-7 … \-9\fP +Dessa liknar \fB\-6\fP med med högre krav på minne till komprimerare och +dekomprimerare. Dessa är bara användbara vid komprimering av filer större än +8\ MiB, 16\ MiB respektive 32\ MiB. +.RE +.IP "" +På samma hårdvara är dekomprimeringshastigheten ungefär ett konstant antal +byt av komprimerad data per sekund. Med andra ord, ju bättre komprimering, +desto snabbare kommer dekomprimeringen vanligen vara. Detta betyder även att +mängden av okomprimerad utdata skapad per sekund kan variera mycket. +.IP "" +Följande tabell sammanfattar funktionerna hos förinställningarna: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Förinställning;LexStrl;KompCPU;KompMin;DekMin +\-0;256 KiB;0;3 MiB;1 MiB +\-1;1 MiB;1;9 MiB;2 MiB +\-2;2 MiB;2;17 MiB;3 MiB +\-3;4 MiB;3;32 MiB;5 MiB +\-4;4 MiB;4;48 MiB;5 MiB +\-5;8 MiB;5;94 MiB;9 MiB +\-6;8 MiB;6;94 MiB;9 MiB +\-7;16 MiB;6;186 MiB;17 MiB +\-8;32 MiB;6;370 MiB;33 MiB +\-9;64 MiB;6;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Kolumnbeskrivningar: +.RS +.IP \(bu 3 +LexStrl är storleken på LZMA2:s lexikon. Det är slöseri med minne att +använda ett större lexikon än storleken på den okomprimerade filen. Detta är +anledningen till att det är bra att undvika förinställningarna \fB\-7\fP … \fB\-9\fP +när det inte finns något verkligt behov av dem. På \fB\-6\fP och lägre är +mängden bortslösat minne vanligen litet nog att inte ha någon betydelse. +.IP \(bu 3 +KompCPU är en förenklad representation av LZMA2\-inställningar som påverkar +komprimeringshastigheten. Lexikonstorleken påverkar också hastigheten, så +medan KompCPU är samma för nivåerna \fB\-6\fP … \fB\-9\fP tenderar fortfarande högre +nivåer att vara lite långsmmare. För ännu långsammare och möjligen bättre +komprimering, se \fB\-\-extreme\fP. +.IP \(bu 3 +KompMem innehåller komprimerarens minneskrav i enkeltrådat läge. Det kan +variera något mellan versioner av \fBxz\fP. +.IP \(bu 3 +DekMin innehåller dekomprimerarens minneskrav. Det vill säga, komprimerarens +inställningar avgör minneskravet för dekomprimeraren. Den exakta +minnesanvändningen hos dekomprimeraren är något mer än +LZMA2\-lexikonstorleken, men värdena i tabellen har avrundats upp till nästa +nästa hela MiB. +.RE +.IP "" +Minneskravet för det multitrådade läget är signifikant högre än det för +enkeltrådat läge. Med standardvärdet på \fB\-\-block\-size\fP behöver varje tråd +3·3·LexStrl plus KompMin eller DekMin. Till exempel, fyra trådar med +förinställningen behöver 660\(en670 MiB minne. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +Använd en långsammare variant av den valda förinställningsnivån för +komprimering (\fB\-0\fP … \fB\-9\fP) för att förhoppningsvis få lite bättre +komprimeringsförhållande, men med otur kan detta även göra det +sämre. Dekomprimerarens minnesanvändning påverkas inte, men komprimerarens +minnesanvändning ökar lite vid förinställningsnivåerna \fB\-0\fP … \fB\-3\fP. +.IP "" +Eftersom det finns två förinställningar med lexikonstorlekar 4\ MiB och 8\ MiB använder förinställningarna \fB\-3e\fP och \fB\-5e\fP något snabbare +inställningar (lägre KompCPU) än \fB\-4e\fP respektive \fB\-6e\fP. På det sättet är +inte två förinställningar identiska. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Förinställning;LexStrl;KompCPU;KompMin;DekMin +\-0e;256 KiB;8;4 MiB;1 MiB +\-1e;1 MiB;8;13 MiB;2 MiB +\-2e;2 MiB;8;25 MiB;3 MiB +\-3e;4 MiB;7;48 MiB;5 MiB +\-4e;4 MiB;8;48 MiB;5 MiB +\-5e;8 MiB;7;94 MiB;9 MiB +\-6e;8 MiB;8;94 MiB;9 MiB +\-7e;16 MiB;8;186 MiB;17 MiB +\-8e;32 MiB;8;370 MiB;33 MiB +\-9e;64 MiB;8;674 MiB;65 MiB +.TE +.RE +.RE +.IP "" +Till exempel finns det totalt fyra förinställningar som använder 8\ MiB +lexikon, vars ordning från den snabbaste till den långsammaste är \fB\-5\fP, +\fB\-6\fP, \fB\-5e\fP och \fB\-6e\fP. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +Dessa är något missledande alias för \fB\-0\fP respektive \fB\-9\fP. Dessa finns +endast för bakåtkompatibilitet med LZMA\-verktyg. Undvik att använda dessa +flaggor. +.TP +\fB\-\-block\-size=\fP\fIstorlek\fP +Vid komprimering till formatet \fB.xz\fP, dela indatai block med \fIstorlek\fP +bytes. Blocken komprimeras oberoende av varandra, vilket hjälper till vid +multitrådning och gör begränsad random\-access\-dekomprimering möjlig. Denna +flagga används typiskt för att åsidosätta blockstorleken i multitrådat läge, +men denna flagga kan användas även i enkeltrådat läge. +.IP "" +I multitrådat läge kommer ungefär tre gånger \fIstorlek\fP byte att allokeras i +varje tråd för buffring av indata och utdata. Standardvärdet på \fIstorlek\fP +är det större av tre gånger LZMA2\-lexikonstorleken eller 1 MiB. Typiskt är +ett bra värde 2\(en4 gånger storleken på LZMA2\-lexikonet eller åtminstone 1 +MiB. Att använda en \fIstorlek\fP mindre än LZMA2\-lexikonstorleken utgör +slöseri med RAM eftersom LZMA2\-lexikonbufferten då aldrig kommer användas +helt. I multitrådat läge lagras storlekarna på plocken i +blockhuvudena. Denna storleksinformation krävs för multitrådad +dekomprimering. +.IP "" +I singletrådat läge görs som standard ingen uppdelning i block. Att göra +denna inställning påverark inte minnesanvändningen. Ingen +storleksinformation lagras i blockhuvuden, därmed kommer filer som skapas i +enkeltrådat läge inte att vara identiska med filer skapade i multitrådat +läge. Avsaknaden av sotrleksinformation betyder också att \fBxz\fP inte kommer +kunna dekomprimera filerna i multitrådat läge. +.TP +\fB\-\-block\-list=\fP\fIposter\fP +Vid komprimering till formatet \fB.xz\fP, börja ett nytt block med en möjlig +anpassad filterkedja efter de angivna intervallen med okomprimerade data. +.IP "" +\fIPosterna\fP är en kommaseparerad lista. Varje post består av ett möjligt +filterkedjenummer mellan 0 och 9 följt av ett kolon (\fB:\fP) och en +obligatorisk storlek för okomprimerade data. Att utelämna en post (två på +varandra följande komman) är en kortform för att använda storleken och +filtren från föregående post. +.IP "" +Om indatafiler är större än summan av storlekarna i \fIposter\fP repeteras den +sista posten fram till slutet på filen. Ett speciellt värde \fB0\fP kan +användas som den sista storleken för att indikera att resten av filen skall +kodas som ett enda block. +.IP "" +En alternativ filterkedja för varje block kan anges i kombinaton med +flaggorna \fB\-\-filters1=\fP\fIfilter\fP \&…\& \fB\-\-filters9=\fP\fIfilter\fP. Dessa +flaggor definierar filterkedjor med en identifierare mellan +1\(en9. Filterkedja 0 kan användas för att referera till +standardfilterkedjan, vilket är samma sak som att inte ange någon +filterkedja. Filterkedjeidentifierare kan användas före den okomprimerade +sotrleken, följt av ett kolon (\fB:\fP). Till exempel, om man anger +\fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP kommer block skapas med: +.RS +.IP \(bu 3 +Filterkedjan angiven av \fB\-\-filters1\fP och 2 MiB indata +.IP \(bu 3 +Filterkedjan angiven av \fB\-\-filters3\fP och 2 MiB indata +.IP \(bu 3 +Filterkedjan angiven av \fB\-\-filters2\fP och 4 MiB indata +.IP \(bu 3 +Filterkedjan angiven av \fB\-\-filters2\fP och 4 MiB indata +.IP \(bu 3 +Standardfilterkedjan och 2 MiB indata +.IP \(bu 3 +Standardfilterkedjan och 4 MiB indata för varje block till slutet av indata. +.RE +.IP "" +Om man anger en storlek som överskrider kodarens blockstorlek (antingen +standardvärdet i trådat läge eller värdet som anges med +\fB\-\-block\-size=\fP\fIstorlek\fP) kommer kodaren skapa ytterligare block med +hänsyn taget till gränserna som anges i \fIposter\fP. Till exempel, om man +anger \fB\-\-block\-size=10MiB\fP \fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP och +indatafilen är 80 MiB kommer man få 11 block: 5, 10, 8, 10, 2, 10, 10, 4, +10, 10 och 1 MiB. +.IP "" +I multitrådat läge lagras storleken på blocken i blockhuvudena. Detta görs +inte i enkeltrådat läge, så den kodade utdatan kommer inte vara identisk med +den från det multitrådade läget. +.TP +\fB\-\-flush\-timeout=\fP\fItidsgräns\fP +Vid komprimering, om mer än \fItidsgräns\fP millisekunder (ett positivt heltal) +har gått sedan den föregånde tömningen och en läsning av mer indata skulle +blockera töms all väntande indata från kodaren och görs tillgänglig i +utdataströmmen. Detta kan vara användbart om \fBxz\fP används för att +komprimera data som strömmas över ett nätverk. Små värden på \fItidsgräns\fP +gör data tillgänglig vid den mottagande änden med en liten fördröjning, men +större värden på \fItidsgräns\fP ger bättre komprimeringsförhållande. +.IP "" +Denna funktion är avaktiverad som standard. Om denna flagga anges mer än en +gång gäller den sista. Dett speciella värdet \fB0\fP på \fItidsgräns\fP kan +användas för att uttryckligen avaktivera denna funktion. +.IP "" +Denna funktion är inte tillgänglig på icke\-POSIX\-system. +.IP "" +.\" FIXME +\fBDenna funktion är fortfarande experimentell.\fP För närvarande är \fBxz\fP +olämplig för dekomprimering av strömmen i realtid på grund av hur \fBxz\fP +buffrar. +.TP +\fB\-\-no\-sync\fP +Synkronisera inte målfilen och dess katalog med lagringsenheten före +källfilen tas bort. Detta kan förbättra prestanda vid komprimering eller +dekomprimering av många små filer. Dock, om systemet kraschar snart efter +raderingen är det möjligt att målfilen inte skrevs till lagringsenheten men +att raderingen gjordes det. I det fallet är varken originalkällfilen eller +målfilen tillgänglig. +.IP "" +Denna flagga har bara någon effekt när \fBxz\fP kommer att ta bort källfilen. I +andra fall görs aldrig någon synkronisering. +.IP "" +Synkroniseringen och \fB\-\-no\-sync\fP lades till i \fBxz\fP 5.7.1alpha. +.TP +\fB\-\-memlimit\-compress=\fP\fIgräns\fP +Sätt en gräns på minnesanvändningen för komprimeringen. Om denna flaggan +anges flera gånger gäller den sista. +.IP "" +Om komprimeringsinställnigarna överskrider \fIgränsen\fP kommer \fBxz\fP försöka +justera inställningarna neråt så att gränsen inte längre överskrids och visa +en notis om att en automatisk justering gjorts. Justeringen görs i denna +ordning: reducera antalet trådar, byta till enkeltrådat läge om även en tråd +i multitrådat läge överskrider \fIgränsen\fP och slutligen reducera +LZMA2\-lexikonstorleken. +.IP "" +Vid komprimering med \fB\-\-format=raw\fP eller om \fB\-\-no\-adjust\fP har angetts kan +endast antalet trådar reduceras eftersom det kan göras utan att påverka den +komprimerade utdatan. +.IP "" +Om \fIgränsen\fP inte kan uppfyllas ens med justeringarna som beskrivs ovan +visas ett felmeddelande och \fBxz\fP kommer avsluta med slutstatus 1. +.IP "" +\fIGränsen\fP kan anges på flera sätt: +.RS +.IP \(bu 3 +\fIGränsen\fP kan vara ett absolut värde i byte. Att använda ett heltalssuffix +som \fBMiB\fP kan vara praktiskt. Exempel: \fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +\fIGränsen\fP kan anges som en procentsats av det totala fysiska minnet +(RAM). Detta kan vara användbart särskilt när man sätter miljövariabeln +\fBXZ_DEFAULTS\fP i ett skalinitieringsskript som delas mellan olika +datorer. På det sättet är gränsen automatiskt större på system med mer +minne. Exempel: \fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +\fIGränsen\fP kan återställas tillbaka till sitt standardvärde genom att sätta +den till \fB0\fP. Detta är för närvarande ekvivalent med att sätta \fIgränsen\fP +till \fBmax\fP (ingen gräns på minnesanvändning). +.RE +.IP "" +För 32\-bitars \fBxz\fP finns det ett specialfall: om \fIgränsen\fP skulle vara +över \fB4020\ MiB\fP sätts \fIgränsen\fP till \fB4020\ MiB\fP. På MIPS32 används +\fB2000\ MiB\fP istället. (Värdena \fB0\fP och \fBmax\fP påverkas inte av detta. En +liknande funktion finns inte för dekomprimering.) Detta kan hjälpa till när +ett 32\-bitarsprogram har tillgång till 4\ GiB adressrymd (2 GiB på MIPS32) +förhoppningsvis utan att göra någon skada i andra situationer. +.IP "" +Se även avsnittet \fBMinnesanvändning\fP. +.TP +\fB\-\-memlimit\-decompress=\fP\fIgräns\fP +Sätt en gräns för minnesanvnändningen vid dekomprimering. Detta påverkar +även läget \fB\-\-list\fP. Om åtgärden inte är möjlig utan att överskrida +\fIgränsen\fP kommer \fBxz\fP visa ett felmeddelande och dekomprimeringen av filen +kommer misslyckas. Se \fB\-\-memlimit\-compress=\fP\fIgräns\fP för möjliga sätt att +ange \fIgränsen\fP. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fIgräns\fP +Sätt en gräns för minnesanvändningen för multitrådad dekomprimering. Detta +kan endast påverka antalet trådar; det kommer aldrig att få \fBxz\fP att vägra +att dekomprimera en fil. Om \fIgränsen\fP är för låg för att tillåta någon +multitrådning ignoreras \fIgränsen\fP och \fBxz\fP kommer gå vidare i enkeltrådat +läge. Observera att om även \fB\-\-memlimit\-decompress\fP används kommer det +alltid att gälla både enkeltrådat och multitrådat läge, och därmed kommer +den gällande \fIgränsen\fP för multitrådning aldrig vara högre än gränsen som +sätts med \fB\-\-memlimit\-decompress\fP. +.IP "" +Till skillnad mot de andra flaggorna för gränser för minnesanvändning har +\fB\-\-memlimit\-mt\-decompress=\fP\fIgräns\fP en systemspecifik +standard\fIgräns\fP. \fBxz \-\-info\-memory\fP kan användas för att se det aktuella +värdet. +.IP "" +Denna flagga och dess standardvärde finns för att utan någon gräns skulle +den trådade dekomprimeraren kunna allokera en vansinnig mängd minne med +några indatafiler. Om standard\fIgränsen\fP är för låg på ditt system, öka då +gärna \fIgränsen\fP men sätt den aldrig till ett större värde än mängden +användbart RAM eftersom att med passande indatafiler kommer \fBxz\fP försöka +använda den mängden av minne även med ett lågt antal trådar. Att få slut på +minne ller växling kommer inte förbättra dekomprimeringsprestandan. +.IP "" +Se \fB\-\-memlimit\-compress=\fP\fIgräns\fP för möjliga sätt att ange \fIgränsen\fP. Att +sätta \fIgräns\fP till \fB0\fP återställer \fIgränsen\fP till sdet systemspecifika +standardvärdet. +.TP +\fB\-M\fP \fIgräns\fP, \fB\-\-memlimit=\fP\fIgräns\fP, \fB\-\-memory=\fP\fIgräns\fP +Detta är ekvivalent med att ange \fB\-\-memlimit\-compress=\fP\fIgräns\fP +\fB\-\-memlimit\-decompress=\fP\fIgräns\fP \fB\-\-memlimit\-mt\-decompress=\fP\fIgräns\fP. +.TP +\fB\-\-no\-adjust\fP +Visa ett fel och avsluta om gränsen för minnesanvändning inte kan mötas utan +att justera inställnigar som påverkar den komprimerade utdatan. Det vill +säga, detta förhindrar att \fBxz\fP byter kodaren från multitrådat läge till +enkeltrådat läge och från att den reducerar LZMA2\-lexikonets storlek. Även +när denna flagga används kan antalet trådar reduceras för att möta gränsen +för minnesanvändning eftersom det inte kommer påverka den komprimerade +utdatan. +.IP "" +Automatisk justering är alltid avaktiverat när råa strömmar skapas +(\fB\-\-format=raw\fP). +.TP +\fB\-T\fP \fItrådar\fP, \fB\-\-threads=\fP\fItrådar\fP +Ange antalet arbetstrådar som skall användas. Att sätta \fItrådar\fP till ett +specialvärde \fB0\fP gör att \fBxz\fP använder så många trådar som processorerna +på systemet stödjer. Det aktuella antalet trådar kan vara färre än \fItrådar\fP +om indatafilen inte är stor nog för trådning med de givna inställningarna +eller om användning av fler trådar skulle överkrida gränsen för +minnesanvändning. +.IP "" +De enkeltrådade och multitrådade komprimerarna producerar olika utdata. Den +enkeltrådade komprimeraren kommer ge den minsta filstorleken men endast +utdata från den multitrådade komprimeraren kan dekomprimeras med flera +trådar. Att sätta \fItrådar\fP till \fB1\fP kommer använda enkeltrådat läge. Att +sätta \fItrådar\fP till något annat värde, inklusive \fB0\fP, kommer använda den +multitrådade komprimeraren även om systemet endast stödjer en hårdvarutråd. +(\fBxz\fP 5.2.x använde enkeltrådat läge i denna situation.) +.IP "" +För att använda multitrådat läge med endast en tråd, sätt \fItrådar\fP till +\fB+1\fP. Prefixet \fB+\fP har ingen påvrekan för andra värden än \fB1\fP. En gräns +för minnesanvändning kan fortfarande göra att \fBxz\fP byter till enkeltrådat +läge såvida inte \fB\-\-no\-adjust\fP används. Stöd för prefixet \fB+\fP lades till i +\fBxz\fP 5.4.0. +.IP "" +Om ett automatiskt antal trådar har begärts och ingen gräns för +minnesanvändning har angivits, då kommer en systemspecifik mjuk +standardgräns användas för att möjligen begränsa antalet trådar. Det är en +mjuk gräns i den meningen att den ignoreras om antalet trådar blir en, +alltså kommer en mjuk gräns aldrig hindra \fBxz\fP från att komprimera eller +dekomprimera. Denna mjuka standardgräns kommer inte göra att \fBxz\fP byter +från multitrådat läge till enkeltrådat läge. De aktiva gränserna kan ses med +\fBxz \-\-info\-memory\fP. +.IP "" +För närvarande är den enda trådningsmetoden att dela indata i block och +komprimera dem oberoende av varandra. Standardstorleken på block beror på +komprimeringsnivån och kan åsidosättas med flaggan +\fB\-\-block\-size=\fP\fIstorlek\fP. +.IP "" +Trådad dekomprimering fungerar bara på filer som innehåller flera block med +storleksinformation i blockhuvuden. Alla tillräckligt stora filer +komprimeras i multitrådat läge för att uppfylla detta villkor, men filer +komprimerade i enkeltrådat läge gör det inte ens om +\fB\-\-block\-size=\fP\fIstorlek\fP har använts. +.IP "" +Standardvärdet på \fItrådar\fP är \fB0\fP. I \fBxz\fP 5.4.x och tidigare är +standardvärdet \fB1\fP. +. +.SS "Anpassade komprimerarfilterkedjor" +Med en anpassad filterkedja kan man specificera kompressionsinställningarna +i detalj istället för att lita på inställningarna som hör till +förinställningarna. När en anpassad filterkedja anges glöms +förinställningsflaggor (\fB\-0\fP \&…\& \fB\-9\fP och \fB\-\-extreme\fP) tidigare på +kommandoraden. Om en förinställningsflagga anges efter en eller flera +flaggor för anpassade filterkedjor gäller den nya förinställningen och de +flaggor för anpassade filterkedjor som angivits tidigare glöms. +.PP +En filterkedja är jämförbar med att skapa rör på kommando. Vid komprimering +skickas den okomprimerade indatan till det första filtret, vars utdata +skickas till nästa filter (om något). Utdatan från det sista filtret blir +skrivet till den komprimerade filen. Det maximala antalet filter i kedjan är +fyra, men typiskt har en filterkedja bara ett ellet två filter. +.PP +Många filter har begränsningar på var de kan finnas i filterkedjan: några +filter kan bara fungera som det sista filtret i kedjan, några bara om de +inte är det sista filtret, och några fungerar i godtycklig position i +kedjan. Beroende på filtret är denna begränsning antingen en egenskap hos +filterdesignen eller finns för att förhindra säkerhetsproblem. +.PP +En anpassad filterkedja kan anges på två olika sätt. Med flaggorna +\fB\-\-filters=\fP\fIfilter\fP och \fB\-\-filters1=\fP\fIfilter\fP \&…\& +\fB\-\-filters9=\fP\fIfilter\fP kan man ange en hel filterkedja med en flagga genom +att använda syntaxen för liblzma\-filtersträngar. Alternativt kan en +filterkedja anges genom att använda en eller flera individuella +filterflaggor i den ordning de önskas i filterkedjan. Det vill säga, +ordningen på de individuella filterflaggorna är signifikant! Vid avkodning +av råa strömmar (\fB\-\-format=raw\fP) måste filterkedjan anges i samma ordning +som den specificerades vid komprimeringen. Eventuella individuella filter\- +eller förinstiällningsflaggor angivna före den fullständiga +filterkedjeflaggan (\fB\-\-filters=\fP\fIfilter\fP) kommer glömmas. Individuella +filter som anges efter den flaggan för en full kedja kommer återställa +filterkedjan. +.PP +Både den fullständiga och de individuella filterflaggorna tar +filterspecifika \fIflaggor\fP som en kommaseparerad lista. Extra komman +\fIflaggor\fP ignoreras. Varje flagga har ett standardvärde, så ange dem du +vill ändra. +.PP +För att se hela filterkedjan och \fIflaggor\fP, använd \fBxz \-vv\fP (det vill +säga, använd \fB\-\-verbose\fP två gånger). Detta fungerar även för att se +flaggorna för filterkedjor som används av förinställningar. +.TP +\fB\-\-filters=\fP\fIfilter\fP +Ange den fullständiga filterkedan eller en förinställning en en enda +flagga. Varje filter kan separeras med blanktecken eller två bindestreck +(\fB\-\-\fP). \fIfilter\fP kan behöva citeras på skalets kommandorad så att det +tolkas som en enda flagga. För att beteckna \fIflaggor\fP, använd \fB:\fP eller +\fB=\fP. En förinställning kan föregås med ett \fB\-\fP och följas av noll eller +flera flaggor. Den enda flaggan som stödjs är \fBe\fP för att tillämpa samma +flaggor som \fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIfilter\fP … \fB\-\-filters9\fP=\fIfilter\fP +Ange upp till nio ytterligare filterkedjor som kan användas med +\fB\-\-block\-list\fP. +.IP "" +Till exempel, vid komprimering av ett arkiv med körbara filer följt av +textfiler skulle den körbara delen kunna använda en filterkedja med ett +BCJ\-filter och endast textdelen med LZMA2\-filtret. +.TP +\fB\-\-filters\-help\fP +Visa ett hjälpmeddelande som beskriver hur man anger förinställningar och +anpassade filterkedjor i flaggorna \fB\-\-filters\fP och \fB\-\-filters1=\fP\fIfilter\fP +\&…\& \fB\-\-filters9=\fP\fIfilter\fP, och avsluta rent. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIflaggor\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIflaggor\fP] +.PD +Lägg till LZMA1\- eller LZMA2\-filter till filterkedjan. Dessa filter kan +endast användas som det sista filtret i kedjan. +.IP "" +LZMA1 är ett föråldrat filter, vilket stödjs nästan enbart på grund av det +föråldrade filformatet \fB.lzma\fP, vilket bara stödjer LZMA1. LZMA2 är en +uppdaterad version av LZMA1 för att lösa några praktiska problem med +LZMA1. Formatet \fB.xz\fP använder LZMA2 och stödjer inte LZMA1 +alls. Komprimeringshastigheten och förhållandena för LZMA1 är LZMA2 är +praktiskt taget desamma. +.IP "" +LZMA1 och LZMA2 delar samma uppättning \fIflaggor\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIförinställning\fP +Återställ alla LZMA1\- eller LZMA2\-\fIflaggor\fP till +\fIförinställning\fP. \fIFörinställning\fP består av ett heltal, vilket kan följas +av enskilda bokstäver som modifierar förinställningen. Heltalet kan vara +från \fB0\fP till \fB9\fP, motsvarande kommandoradsflaggorna \fB\-0\fP \&…\& +\fB\-9\fP. Den enda modifierare som stödjs för närvarande är \fBe\fP, vilket +motsvarar \fB\-\-extreme\fP. Om ingen \fBpreset\fP anges tas standardvärden på +LZMA1\- eller LZMA2\-\fIflaggor\fP från förinställningen \fB6\fP. +.TP +\fBdict=\fP\fIstorlek\fP +Ett lexikons (historiebufferts) \fIstorlek\fP indikerar hur många byte med +nyligen bearbetad okomprimerad data som hålls i minnet. Algoritmen försöker +hitta återkommande bytesekvenser (matchningar) i den okomprimerade datan, +och ersätta dem med referenser till datan som för närvarande finns i +lexikonet. Ju större lexikon, desto högre är sannolikheten att hitta en +matchning. Att öka lexikonets \fIstorlek\fP förbättrar alltså vanligen +komprimeringsförhållandet, men ett lexikon som är större än den +okomprimerade filen är ett slöseri med minne. +.IP "" +En typisk \fIstorlek\fP på lexikon är från 64\ KiB till 64\ MiB. Minimum är 4\ KiB. Det maximala för komprimering är för närvarande 1,5\ GiB (1536\ MiB). Dekomprimeraren stödjer redan lexikon upp till en byte mindre än 4\ GiB, vilket är det maximala för strömformaten LZMA1 och LZMA2. +.IP "" +Lexikon\fIstorlek\fP och matchhittaren (\fImf\fP) avgör tillsammans +minnesanvändningen för LZMA1\- eller LZMA2\-kodaren. Ett lika \fIstort\fP (eller +större) lexikon behövs för dekomprimering som det som användes vid +komprimeringen, minnesanvändningen för avkodaren avgörs alltså av +lexikonstorleken vid komprimering. Huvudena i \fB.xz\fP innehåller lexikonets +\fIstorlek\fP antingen som 2^\fIn\fP eller 2^\fIn\fP + 2^(\fIn\fP\-1), så dessa +\fIstorlekar\fP är lite att föredra för komprimering. Andra \fIstorlekar\fP kommer +avrundas uppåt när de lagras i huvuden i \fB.xz\fP. +.TP +\fBlc=\fP\fIlk\fP +Ange antalet literala kontextbitar. Minimum är 0 och maximum är 4; +standardvärdet är 3. Dessutom får inte summan av \fIlk\fP och \fIlp\fP överskrida +4. +.IP "" +Alla byte som inte kan kodas som matchningar kodas som literaler. Det vill +säga, literaler är helt enkelt 8\-bits byte som kodas en åt gången. +.IP "" +Den literala kodningen gör antagandet att de högsta \fIlk\fP bitarna av den +föregående okomprimerade byten korrelerar med nästa byte. Till exempel, i +typisk engelsk text följs ofta en versal bokstav av en gemen bokstav, och en +gemen bokstav följs vanligen av en annan gemen bokstav. I +teckenuppsättningen US\-ASCII är de högsta tre bitarna 010 för versala +bokstäver och 011 för gemena bokstäver. När \fIlk\fP är åtminstone 3 kan den +literala kodningen dra nytta av denna egenskap i den okomprimerade datan. +.IP "" +Standardvärdet (3) är normalt bra. Om man vill ha maximal komprimering, +prova \fBlc=4\fP. Ibland hjälper det lite, och ibland gör det komprimeringen +sämre. Om det gör den sämre, testa också \fBlc=2\fP. +.TP +\fBlp=\fP\fIlp\fP +Ange antalet literala positionsbitar. Minimum är 0 och maximum är 4; +standardvärdet är 0. +.IP "" +\fILp\fP påverkar vilken sorts justering i den okomprimerade datan som antas +vid kodning av literaler. Se \fIpb\fP nedan för mer information om justering. +.TP +\fBpb=\fP\fIpb\fP +Ange antalet positionsbitar. Minimum är 0 och maximum är 4; standardvärdet +är 2. +.IP "" +\fIPb\fP påverkar vilken sort justering i den okomprimerade datan som antas i +allmänhet. Standardvärdet betyder fyrbytejustering (2^\fIpb\fP=2^2=4), vilket +ofta är ett bra val när det inte finns någon bättre gissning. +.IP "" +När justeringen är känd kan en inställning av \fIpb\fP därefter reducera +filstorleken något. Till exempel, med textfiler som har en\-byte\-justering +(US\-ASCII, ISO\-8859\-*, UTF\-8) kan att sätta \fBpb=0\fP förbättra komprimeringen +något. För UTF\-16\-text är \fBpb=1\fP ett bra val. Om justeringen är ett udda +tal som 3 byte kan \fBpb=0\fP vara det bästa valet. +.IP "" +Även om den antagna justeringen kan anpassas med \fIpb\fP och \fIlp\fP föredrar +LZMA1 och LZMA2 ändå något 16\-byte\-justering. Det kan vara värt att ta med i +beräkningen vid design av filformat som sannolikt ofta kan komma att +komprimeras med LZMA1 eller LZMA2. +.TP +\fBmf=\fP\fIms\fP +Matchsökaren har en stor poverkan på kodarens hastighet, minnesanvändning +och komprimeringsförhållande. Vanligen är Hashkedje\-matchsökare snabbare än +Binärträdsmatchsökare. Standardvärdet beror på \fIföinställningen\fP: 0 +använder \fBhc3\fP, 1\(en3 använder \fBhc4\fP, och resten använder \fBbt4\fP. +.IP "" +Följande matchsökare stödjs. Formlerna för minnesanvändning nedan är grova +uppskattningar, vilka är närmast sanningen när \fIdict\fP är en tvåpotens. +.RS +.TP +\fBhc3\fP +Hashkedja med 2\- och 3\-bytehashning +.br +Minsta värde på \fInice\fP: 3 +.br +Minnesanvändning: +.br +\fIdict\fP · 7.5 (om \fIdict\fP ≤ 16 MiB); +.br +\fIdict\fP · 5,5 + 64 MiB (om \fIdict\fP > 16 MiB) +.TP +\fBhc4\fP +Hashkedja med 2\-, 3\- och 4\-bytehashning +.br +Minsta värde på \fInice\fP: 4 +.br +Minnesanvändning: +.br +\fIdict\fP · 7,5 (om \fIdict\fP ≤ 32 MiB); +.br +\fIdict\fP · 6,5 (om \fIdict\fP > 32 MiB) +.TP +\fBbt2\fP +Binärträd med 2\-bytehashning +.br +Minsta värde på \fInice\fP: 2 +.br +Minnesanvändning: \fIdict\fP · 9,5 +.TP +\fBbt3\fP +Binärträd med 2\- och 3\-bytehashning +.br +Minsta värde på \fInice\fP: 3 +.br +Minnesanvändning: +.br +\fIdict\fP · 11,5 (om \fIdict\fP ≤ 16 MiB); +.br +\fIdict\fP · 9,5 + 64 MiB (om \fIdict\fP > 16 MiB) +.TP +\fBbt4\fP +Binärträd med 2\-, 3\- och 4\-bytehashning +.br +Minsta värde på \fInice\fP: 4 +.br +Minnesanvändning: +.br +\fIdict\fP · 11,5 (om \fIdict\fP ≤ 32 MiB); +.br +\fIdict\fP · 10,5 (om \fIdict\fP > 32 MiB) +.RE +.TP +\fBmode=\fP\fIläge\fP +Komprimerings\fIläget\fP anger metoden som används för att analysera data +skapade av matchsökaren. De \fIlägen\fP som stödjs är \fBfast\fP och +\fBnormal\fP. Standardvärdet är \fBfast\fP för \fIförinställningarna\fP 0\(en3 och +\fBnormal\fP för \fIförinställningarna\fP 4\(en9 +.IP "" +Vanligen används \fBfast\fP med Hashkedjematchsökare och \fBnormal\fP med +Binärträdsmatchsökare. Detta är även vad \fIförinställningarna\fP gör. +.TP +\fBnice=\fP\fIlagom\fP +Ange vad som anses vara en lagom längt på en matchning. När en matchning på +åtminstone \fIlagom\fP byte hittats slutar algoritmen söka efter möjliga bättre +matchningar. +.IP "" +\fILagom\fP kan vara 2\(en273 byte. Högre värden tenderar att ge bättre +komprimeringsförhållande på bekostnad av tid. Standardvärdet beror på +\fIförinställningen\fP. +.TP +\fBdepth=\fP\fIdjup\fP +Ange det maximala sökdjupet i matchsökaren. Standardvärdet är specialvärdet +0, vilket får komprimeraren att avgöra ett lämpligt \fIdjup\fP från \fImf\fP och +\fInice\fP. +.IP "" +Lämpligt \fIdjup\fP för Hashkedjor är 4\(en100 och 16\(en1000 för +Binärträd. Att använda väldigt höga värden på \fIdjup\fP kan göra kodaren +extremt långsam för vissa filer. Undvik att sätta \fIdjup\fP över 1000 såvida +du inte är beredd att avbryta komprimeringen om den tar för lång tid. +.RE +.IP "" +Vid avkodning av råa strömmar (\fB\-\-format=raw\fP) behöver LZMA2 endast +lexikonets \fIstorlek\fP. LZMA1 behöver även \fIlc\fP, \fIlp\fP och \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIflaggor\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIflaggor\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIflaggor\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIflaggor\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIflaggor\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIflaggor\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIflaggor\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIflaggor\fP] +.PD +Lägg till gren/anrop/hopp\-filter (branch/call/jump, BCJ) till +filterkedjan. Dessa filter kan inte användas som det sista filtret i +filterkedjan. +.IP "" +Ett BCJ\-filter konverterar relativa adresser i maskinkod till deras absoluta +motsvarigheter. Detta ändrar inte storleken på datan men det ökar +redundansen, vilket kan hjälpa LZMA2 att skapa 0\(en15\ % mindre +\&\fB.xz\fP\-filer. BCJ\-filtren är alltid reversibla, så att använda ett +BCJ\-filter för fel sorts data orsakar inte någon dataförlust, men det kan +göra komprimeringsförhållandet något sämre. BCJ\-filtren är mycket snabba +och använder en obetydling mängd minne. +.IP "" +Dessa BCJ\-filter har kända problem kopplade till komprimeringsförhållandet: +.RS +.IP \(bu 3 +Någr sortes filer som innehåller körbar kod (till exempel, objektfiler, +statiska bibliotek och Linux kärnmoduler) har adresserna i instruktionerna +fyllda med utfyllnadsvärden. Dessa BCJ\-filter kommer ändå göra +adresskonverteringen, vilket kommer göra komprimeringen sämre för dessa +filer. +.IP \(bu 3 +Om ett BCJ\-filter används på ett arkiv är det möjligt att det gör +komprimeringsförhållandet sämre än att inte använda något BCJ\-filter. Till +exempel, om det finns liknande eller till och med identiska körbara kommer +filtreringen sannolikt göra filerna mindre lika och därmed blir +kompressionen sämre. Innehållet i icke körbara filer i samma arkiv kan också +spela en roll. I praktiken måste man prova med och utan ett BCJ\-filter för +att se vilket som är det bästa i varje situation. +.RE +.IP "" +Olika instruktionsuppsättningar har olika justering: den körbara filen måste +vara justerad till en multipel av detta värde i indata för att filtret skall +fungera. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Filter;Justering;Kommentarer +x86;1;32\-bitars eller 64\-bitars x86 +ARM;4; +ARM\-Thumb;2; +ARM64;4;4096\-bytesjustering är bäst +PowerPC;4;Endast rak byteordning +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Eftersom BCJ\-filtrerad data vanligen komprimeras med LZMA2 kan +komprimeringsförhållandet förbättras något om LZMA2\-flaggorna sätts till att +matcha justeringen hos det valda BCJ\-filtret. Exempel: +.RS +.IP \(bu 3 +IA\-64\-filter har 16\-bytejustering så \fBpb=4,lp=4,lc=0\fP är bra med LZMA2 +(2⁴=16). +.IP \(bu 3 +RISC\-V\-kod har 2\-byte\- eller 4\-bytejustering beroende på huruvida filen +innehåller 16\-bitars komprimerade instruktioner (utvidgningen C). När +16\-bitarsinstruktioner används är \fBpb=2,lp=1,lc=3\fP eller \fBpb=1,lp=1,lc=3\fP +bra. När det inte finns några 16\-bitsinstruktioner är \fBpb=2,lp=2,lc=2\fP +bäst. \fBreadelf \-h\fP kan användas för att kontrollera om ”RVC” förekommer på +raden ”Flaggor”. +.IP \(bu 3 +ARM64 är alltid 4\-bytejusterad så \fBpb=2,lp=2,lc=2\fP är bäst. +.IP \(bu 3 +Filtret x86 är ett undantag. Det är normalt bra att hålla sig till LZMA2:s +standardvärden (\fBpb=2,lp=0,lc=3\fP) när körbar x86 komprimeras. +.RE +.IP "" +Alla BCJ\-filter stödjer samma \fIflaggor\fP: +.RS +.TP +\fBstart=\fP\fIavstånd\fP +Ange start\fIavståndet\fP som används vid konvertering mellan relativa och +absoluta adresser. \fIAvståndet\fP måste vara en multipel av filtrets justering +(se tabellen ovan). Standardvärdet är noll. I praktiken är standardvärdet +bra; det är nästan aldrig användbart att ange ett anpassat \fIavstånd\fP. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIflaggor\fP] +Lägg till Deltafiltret till filterkedjan. Deltafiltret kan inte användas som +det sista filtret i filterkedjan. +.IP "" +För närvarande stödjs bara enkel byte\-vis deltaberäkning. Det kan vara +användbart vid komprimering, till exempel av okomprimerade +bitavbildningsbilder eller okomprimerad PCM\-audio. Dock kan algoritmer för +särskilda ändamål ge betydligt bättre resultat än Delta + LZMA2. Detta är +särskilt sant med audio, vilket komprimerar snabbare och bättre med till +exempel \fBflac\fP(1). +.IP "" +Stödda \fIflaggor\fP: +.RS +.TP +\fBdist=\fP\fIavstånd\fP +Ange \fIavståndet\fP för deltaberäkningen i byte. \fIAvstånd\fP måste varea +1\(en256. Standardvärdet är 1. +.IP "" +Till exempel, med \fBdist=2\fP och åtta byte indata A1 B1 A2 B3 A3 B5 A4 B7, +kommer utdata vara A1 B1 01 02 01 02 01 02. +.RE +. +.SS "Andra flaggor" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Utelämna varningar och noteringar. Ange detta två gånger för att även +utelämna felmeddelandet. Denna flagga har ingen påverkan på +slutstatusen. Det vill säga, även om en varning utelämnades kommer +slutstatusen fortfarandeindikera att en varning gavs. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +Var utförlig. Om standard fel är kopplat till en terminal kommer \fBxz\fP visa +en förloppsmätare. Att ange \fB\-\-verbose\fP två gånger kommer ge än mer +utförlig utmatning. +.IP "" +Förloppsmätaren visar följande information: +.RS +.IP \(bu 3 +Procent färdigt visas om storleken på indatafilen är känd. Det vill säga, +procentsatsen kan inte visas i rör. +.IP \(bu 3 +Mängd komprimerad data som producerats (komprimering) eller konsumerats +(dekomprimering). +.IP \(bu 3 +Mängd okomprimerad data som konsumerats (komprimering) eller producerats +(dekomprimering). +.IP \(bu 3 +Komprimeringsförhållande, vilket beräknas genom att dividera mängden +komprimerad data bearbetad så lång med mängde okomprimerad data bearbetad så +långt. +.IP \(bu 3 +Kompressions eller dekompressionshastighet. Detta mäts som mängden +okomprimerad data konsumerad (komprimering) eller producerad +(dekomprimering) per sekund. Det visas efter att några sekunder har gåt +efter att \fBxz\fP började bearbeta filen. +.IP \(bu 3 +Förfluten tid på formatet MM:SS eller H:MM:SS. +.IP \(bu 3 +Beräknad återstående tid visas endast när storleken på indatafilen är känd +och några sekunder redan gått efter att \fBxz\fP började bearbeta filen. Tiden +visas i ett mindre precist format vilket aldrig har några kolon, till +exempel, 2 min 30 s. +.RE +.IP "" +När standard fel inte är en terminal kommer \fB\-\-verbose\fP göra att \fBxz\fP +skriver filnamnet, komprimerad storlek, okomprimerad storlek, +komprimeringsförhållande och möjligen även hastigheten och den förlupna +tiden på en enda rad till standard fel efter att ha komprimerat eller +dekomprimerat filen. Hastigheten och den förlupna tiden inkluderas endast +när åtgärden tog åtminstone några sekunder. Om åtgärden inte slutfördes, +till exempel för att användaren avbröt, skrivs även den fullbordade +procentsatsen om storleken på indatafilen är känd. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Sätt inte slutstatus till 2 även om ett tillstånd som är värt en varning +upptäcktes. Denna flagga påverkar inte utförlighetsnivån, allts måste både +\fB\-\-quiet\fP och \fB\-\-no\-warn\fP användas för att inte visa varningar och för att +inte ändra slutstatusen. +.TP +\fB\-\-robot\fP +Skriv meddelanden i maskinläsbart form. Detta är avsett att förenkla att +skriva framändar som vill använda \fBxz\fP istället för liblzma, vilken kan +vara fallet i olika skript. Utdatan med denna flagga aktiverad är avsedd att +vara stabil mellan utgåvor av \fBxz\fP. Se avsnitett \fBROBOTLÄGE\fP för detaljer. +.TP +\fB\-\-info\-memory\fP +Visa, på mänskligt läsbar form, hur mycket fysiskt minne (RAM) och hur många +processortrådar \fBxz\fP tror att systemet har och gränserna för +minnesanvändning vid komprimering och dekomprimering, och avsluta. +.TP +\fB\-h\fP, \fB\-\-help\fP +Visa ett hjälpmeddelande som beskriver de vanligast använda flaggorna, och +avsluta. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +Visa ett hjälpmeddelande som beskriver alla funktioner i \fBxz\fP, och avsluta +.TP +\fB\-V\fP, \fB\-\-version\fP +Visa versionsnumret för \fBxz\fP och liblzma i mänskligt läsbar form. För att +få maskinläsbar utdata, ange \fB\-\-robot\fP före \fB\-\-version\fP. +. +.SH ROBOTLÄGE +Robotläget aktiveras med flaggan \fB\-\-robot\fP. Det gör att utdata från \fBxz\fP +är enklare att tolka av andra program. För närvarande stödjs \fB\-\-robot\fP +endast tillsammans med \fB\-\-list\fP, \fB\-\-filters\-help\fP, \fB\-\-info\-memory\fP och +\fB\-\-version\fP. Den kommer att stödjas för komprimering och dekomprimering i +framtiden. +. +.SS Listläge +\fBxz \-\-robot \-\-list\fP använder tab\-separerad utmatning. Första kolumnen av +varje rad har en sträng som indikerar typen av informationen som finns på +den raden: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +Detta är alltid första raden när en fil börjar listas. Den andra kolumen på +raden är filnamnet. +.TP +\fBfile\fP +Denna rad innehåller övergripande information om \fB.xz\fP\-filen. Denna rad +skrivs alltid efter raden \fBname\fP. +.TP +\fBstream\fP +Denna radtyp används endast när \fB\-\-verbose\fP angetts. Det finns lika många +\fBstream\fP\-rader som det finns strömmar i \fB.xz\fP\-filen. +.TP +\fBblock\fP +Denna radtyp används bara när \fB\-\-verbose\fP angetts. Det finns lika många +\fBblock\fP\-rader som det finns block i \fB.xz\fP\-filen. \fBblock\fP\-rader visas +efter alla \fBstream\fP\-raderna; olika radtyper blandas inte. +.TP +\fBsummary\fP +Denna radtyp används bara när \fB\-\-verbose\fP angetts två gånger. Denna rad +skrivs eefter alla \fBblock\fP\-rader. Liksom raden \fBfile\fP inenhåller raden +\fBsummary\fP övergripande information om \fB.xz\fP\-filen. +.TP +\fBtotals\fP +Denna rad är alltid den allra sista raden i listutmatningen. Den visar det +totala antalen och storlekarna. +.PP +Kolumnerna på \fBfile\fP\-raderna: +.PD 0 +.RS +.IP 2. 4 +Antalet strömmar i filen +.IP 3. 4 +Totalt antal block i strömmarna +.IP 4. 4 +Komprimerad storlek på filen +.IP 5. 4 +Okomprimerad storlek på filen +.IP 6. 4 +Komprimeringsförhållande, till exempel \fB0.123\fP. Om förhållandet är över +9.999 visas tre bindestreck (\fB\-\-\-\fP) istället för förhållandet. +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Kommaseparerad lista med integritetskontrollnamn. Följande strängar används +för de kända kontrolltyperna: \fBNone\fP, \fBCRC32\fP, \fBCRC64\fP och +\fBSHA\-256\fP. För okända kontrolltyper används \fBUnknown\-\fP\fIN\fP, där \fIN\fP är +kontroll\-ID:t som ett decimalt nummer (en eller två siffror). +.IP 8. 4 +Total storlek på strömutfyllnad i filen +.RE +.PD +.PP +Kolumnerna på \fBstream\fP\-raderna: +.PD 0 +.RS +.IP 2. 4 +Strömnummer (den första strömmen är 1) +.IP 3. 4 +Antal block i strömmen +.IP 4. 4 +Komprimerat startavstånd +.IP 5. 4 +Okomprimerat startavstånd +.IP 6. 4 +Komprimerad storlek (inkluderar inte strömutfyllnad) +.IP 7. 4 +Okomprimerad storlek +.IP 8. 4 +Komprimeringsförhållande +.IP 9. 4 +Namnet på integritetskontrollen +.IP 10. 4 +Storleken på strömutfyllnad +.RE +.PD +.PP +Kolumnerna på \fBblock\fP\-raderna: +.PD 0 +.RS +.IP 2. 4 +Numret på strömmen som innehåller detta block +.IP 3. 4 +Blocknummer relativt början på strömmen (det första blocket är 1) +.IP 4. 4 +Blocknummer relativt början på filen +.IP 5. 4 +Komprimerat startavstånd relativt början av filen +.IP 6. 4 +Okomprimerat startavstånd relativt början av filen +.IP 7. 4 +Total komprimerad storlek på blocket (inkluderar huvuden) +.IP 8. 4 +Okomprimerad storlek +.IP 9. 4 +Komprimeringsförhållande +.IP 10. 4 +Namnet på integritetskontrollen +.RE +.PD +.PP +Om \fB\-\-verbose\fP angavs två gånger inkluderas ytterligare kolumner på +\fBblock\fP\-raderna. Dessa visas inte med bara ett \fB\-\-verbose\fP, eftersom det +för att få fram denna information krävs många sökningar och kan därmed vara +långsamt: +.PD 0 +.RS +.IP 11. 4 +Värdet på integritetskontrollen hexadecimalt +.IP 12. 4 +Blockhuvudstorlek +.IP 13. 4 +Blockflaggor: \fBc\fP indikerar att komprimerad storlek finns, och \fBu\fP +indikerar att okomprimerad storlek finns. Om flaggan inte är satt visas ett +bindestreck (\fB\-\fP) istället för att hålla stränglängden fast. Nya flaggor +kan läggas till i slutet av strängen i frmtiden. +.IP 14. 4 +Storlek på den faktiska komprimerade datan i blocket (detta utelämnar +blockhuvud, blockutfyllnad och kontrollfält) +.IP 15. 4 +Mängd minne (i byte) som behövs för att dekomprimera detta block med denna +version av \fBxz\fP +.IP 16. 4 +Filterkedja. Observera att de flesta av flaggorna som användes vid +komprimeringstillfället inte kan vara kända, eftersom endat de flaggor som +behövs för dekomprimering lagras i \fB.xz\fP\-huvudet. +.RE +.PD +.PP +Kolumnerna på \fBsummary\fP\-raderna: +.PD 0 +.RS +.IP 2. 4 +Mängd minne (i byte) som behövs för att dekomprimera denna fil med denna +version av \fBxz\fP +.IP 3. 4 +\fByes\fP eller \fBno\fP som indikerar om alla blockhuvuden både har komprimerad +storlek och okomprimerad storlek i sig +.PP +\fIFrån\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Minsta version av \fBxz\fP som krävs för att dekomprimera filen +.RE +.PD +.PP +Kolumnerna på \fBtotals\fP\-raden: +.PD 0 +.RS +.IP 2. 4 +Antal strömmar +.IP 3. 4 +Antal block +.IP 4. 4 +Komprimerad storlek +.IP 5. 4 +Okomprimerad storlek +.IP 6. 4 +Genomsnittligt komprimeringsförhållande +.IP 7. 4 +Kommaseparerad lista med integritetskontrollnamn som fanns i filerna +.IP 8. 4 +Strömutfyllnadsstorlek +.IP 9. 4 +Antal filer. Denna finns här för att hålla ordningen av de tidigare +kolumnerna desamma som på \fBfile\fP\-rader. +.PD +.RE +.PP +Om \fB\-\-verbose\fP angavs två gånger inkluderas ytterligare kolumner på +\fBtotals\fP\-raden: +.PD 0 +.RS +.IP 10. 4 +Maximal mängd minne (i byte) som behövs för att dekomprimera filerna med +denna version av \fBxz\fP +.IP 11. 4 +\fByes\fP eller \fBno\fP som indikerar om alla blockhuvuden både har komprimerad +storlek och okomprimerad storlek i sig +.PP +\fIFrån\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Minsta version av \fBxz\fP som krävs för att dekomprimera filen +.RE +.PD +.PP +Framtida versioner kan lägga till fler radtyper och fler kolumner kan läggas +til på de befintliga radtyperna, men de befintliga kolumnerna kommmer inte +ändras. +. +.SS Filterhjälp +\fBxz \-\-robot \-\-filters\-help\fP skriver ut de filter som stödjs i följande +format: +.PP +\fIfilter\fP\fB:\fP\fIflagga\fP\fB=<\fP\fIvärde\fP\fB>,\fP\fIflagga\fP\fB=<\fP\fIvärde\fP\fB>\fP… +.TP +\fIfilter\fP +Namn på filtret +.TP +\fIflagga\fP +Namn på en filterspecifik flagga +.TP +\fIvärde\fP +Numeriska \fIvärde\fPintervall ser ut som +\fB<\fP\fImin\fP\fB\-\fP\fImax\fP\fB>\fP. Sträng\fIvärdes\fP val visas inom \fB< >\fP och separerade med ett \fB|\fP\-tecken. +.PP +Varje filter skrivs på en egen rad. +. +.SS Minnesgränsinformation +\fBxz \-\-robot \-\-info\-memory\fP skriver en rad med flera tab\-separerade +kolumner: +.IP 1. 4 +Total mängd med fysiskt minne (RAM) i byte. +.IP 2. 4 +Minnesanvändningsgräns för komprimering i byte (\fB\-\-memlimit\-compress\fP). Ett +specialvärde \fB0\fP indikerar standardinställningen vilken för enkeltrådat +läge är detsamma som ingen gräns. +.IP 3. 4 +Minnesanvändningsgräns för dekomprimering i byte +(\fB\-\-memlimit\-decompress\fP). Ett specialvärde \fB0\fP indikerar +standdartinställningen vilken för enkeltrådat läge är detsamma som ingen +gräns. +.IP 4. 4 +Från \fBxz\fP 5.3.4alpha: Minnesanvändningen för multitrådad dekomprimering i +byte (\fB\-\-memlimit\-mt\-decompress\fP). Detta är aldrig noll eftersom ett +systemspecifikt standardvärde som visas i kolumn 5 används om ingen gräns +har angivits uttryckligen. Detta är heller aldrig större än värdet i kolumn +3 även om ett större värde har angivits med \fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +Från \fBxz\fP 5.3.4alpha: Ett systemspecifikt standardgräns för +minnesanvändning som används för att begränsa antalet trådar vid +komprimering med ett automatiskt antal trådar (\fB\-\-threads=0\fP) och ingen +gräns för minnesanvändning har angivits (\fB\-\-memlimit\-compress\fP). Detta +används även som standardvärdet på \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +Från \fBxz\fP 5.3.4alpha: antal tillgängliga processortrådar. +.PP +I framtiden kan utdata från \fBxz \-\-robot \-\-info\-memory\fP ha fler kolumner, +men aldrig mer än en rad. +. +.SS Version +\fBxz \-\-robot \-\-version\fP skriver versionsnumret på \fBxz\fP och liblzma i +följande format: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Huvudversion. +.TP +\fIYYY\fP +Underversion. Jämna nummer är stabila. Udda nummer är alfa\- eller +betaversioner. +.TP +\fIZZZ\fP +Rättningsnivå för stabila utgåvor eller bara en räknare för +utvecklingsutgåvor. +.TP +\fIS\fP +Stabilitet. 0 är alfa, 1 beta beta och 2 är stabil. \fIS\fP skall alltid vara +2 när \fIYYY\fP är jämnt. +.PP +\fIXYYYZZZS\fP är samma på båda raderna om \fBxz\fP och liblzma kommer från samma +utgåva av XZ Utils. +.PP +Exempel: 4.999.9beta är \fB49990091\fP och 5.0.0 är \fB50000002\fP. +. +.SH SLUTSTATUS +.TP +\fB0\fP +Allt är bra. +.TP +\fB1\fP +Ett fel uppstod. +.TP +\fB2\fP +Något värt en varning uppstod, men inga faktiska fel uppstod. +.PP +Noteringar (inte varningar eller fel) som skrivs på standard fel påverkar +inte slutstatusen. +. +.SH MILJÖ +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP tolkar mellanrumsseparerade listor av flaggor från miljövariablerna +\fBXZ_DEFAULTS\fP och \fBXZ_OPT\fP, i den ordningen, före flaggorna på +kommandoraden. Observera att endast flaggor tolkas från miljövariablerna; +alla andra argument än flaggor ignoreras tyst. Tolkningen görs med +\fBgetopt_long\fP(3) vilket även används för kommandoradsargumenten. +.PP +\fBVarning:\fP genom att sätta dessa miljövariabler ändrar man i praktiken +program och skript som kör \fBxz\fP. för det mesta är set säkert att sätta +begränsningar på minnesanvändning, antal trådar och komprimeringsflaggor via +miljövariablerna. Några flaggor kan dock göra att skript går sönder. Ett +uppenbart exempel är \fB\-\-help\fP vilket gör att \fBxz\fP visar en hjälptext +istället för att komprimera eller dekomprimera en fil. Mer subtila exempel +är \fB\-\-quiet\fP och \fB\-\-verbose\fP. I många fall fungerar det bra att aktivera +en förloppsindikator med \fB\-\-verbose\fP, men i några fall skapar de extra +meddelandena problem. Utförlighetsnivån påverkar även beteendet hos +\fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +Användarspecifika eller systemspecifika standardflaggor. Typiskt sätts detta +i ett initieringsskript för skal för att aktivera \fBxz\fP:s begränsning av +minnesanvändning som standard eller att ställa in ett standardantal +trådar. Med undantag för skalinitieringsskript och liknande specialfall +skall skript aldrig sätta eller ta bort \fBXZ_DEFAULTS\fP. +.TP +\fBXZ_OPT\fP +Detta är för att skicka flaggor till \fBxz\fP när det inte är möjligt att sätta +flaggorna direkt på kommandoraden för \fBxz\fP. Detta är fallet när \fBxz\fP körs +av ett skript eller verktyg, till exempel, GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf apa.tar.xz apa\fR +.fi +.RE +.RE +.IP "" +Skript kan använda \fBXZ_OPT\fP, till exempel, för att sätta skriptspecifika +standardflaggor för komprimering. Det rekommenderas fortfarande att tillåta +användaren att åsidosätta \fBXZ_OPT\fP om det är rimligt. Till exempel, i +\fBsh\fP(1)\-skript kan man använda något i still med detta: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "KOMPATIBILITET MED LZMA UTILS" +Kommandoradssyntaxen för \fBxz\fP är praktiskt taget en utökning av \fBlzma\fP, +\fBunlzma\fP och \fBlzcat\fP så som de kommer från LZMA Utils 4.32.x. I de flesta +fall, är det möjligt att ersätta LZMA Utils med XZ Utils utan att göra +sönder befintliga skript. Det finns dock några inkompatibiliteter, vilka +ibland kan orsaka problem. +. +.SS "Komprimeringens förinställda nivåer" +Numreringen av förinställda nivåer för komprimering är inte identiska i +\fBxz\fP och LZMA Utils. Den viktigaste skillnade är hur lexikonstorlekar +avbildas till olika förinställningar. Lexikonstorleken är i stort sett lika +med dekomprimerarens minnesanvändning. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Nivå;xz;LZMA Utils +\-0;256 KiB;N/A +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +Lexikonstorlekens skillnader påverkar komprimerarens minnesanvändning också, +men det finns några andra skillnader mellan LZMA Utils och XZ Utils, vilket +gör skillnaden ännu större: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Nivå;xz;LZMA Utils 4.32.x +\-0;3 MiB;N/A +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +Standardförinställningsninvån i LZMA Utils är \fB\-7\fP medan i XZ Utils är den +\fB\-6\fP, så båda använder ett 8 MiB lexikon som standard. +. +.SS "Strömmade visavi icke strömmade .lzma\-filer" +Den ikomprimerade storleken på filen kan lagras i huvudet i \fB.lzma\fP. LZMA +Utils gör det när den komprimerar normala filer. Alternativet är att markera +att den okomprimerade storleken är okänd och använda en markör för lastslut +för att indikera var dekomprimeraren skall stanna. LZMA Utils använder denna +metod när den okomprimerade storleken inte är känd, vilket är fallet, till +exempel, i rör. +.PP +\fBxz\fP stödjer dekomprimering av \fB.lzma\fP\-filer med eller utan markör för +lastslut, men alla \fB.lzma\fP filer som skapas av \fBxz\fP kommer använda markör +för lastslut och ha den okomprimerade storleken markerad som okänd i +\&\fB.lzma\fP\-huvudet. Detta kan bli ett problem i några ovanliga fall. Till +exempel kan en \fB.lzma\fP\-dekomprimerare i en inbäddad enhet fungera endast +med filer som har en känd okomprimerad storlek. Om man stöter på detta +problem behöver man använda LZMA Utils eller LZMA SDK för att skapa +\&\fB.lzma\fP\-filer med känd okomprimerad storlek. +. +.SS "Ej stödda .lzma\-filer" +Formatet \fB.lzma\fP tillåter värden på \fIlc\fP upp till 8, och värden på \fIlp\fP +upp till 4. LZMA Utils kan dekomprimera filer med godtyckliga \fIlc\fP och +\fIlp\fP, men skapar alltid filer med \fBlc=3\fP och \fBlp=0\fP. Att skapa filer med +andra \fIlc\fP och \fIlp\fP är möjligt med \fBxz\fP och med LZMA SDK. +.PP +Implementationen av LZMA1\-filtret i liblzma kräver att summan av \fIlc\fP och +\fIlp\fP inte överstiger 4. Alltså, \fB.lzma\fP\-filer, vilka överstiger denna +gräns, kan inte dekomprimeras med \fBxz\fP. +.PP +LZMA Utils skapar endast \fB.lzma\fP\-filer som har en lexikonstorlek på 2^\fIn\fP +(en potens av 2) men godtar filer med godtycklig lexikonstorlek. liblzma +godtar endast \fB.lzma\fP\-filer som har en lexikonstorlek på 2^\fIn\fP eller +2^\fIn\fP + 2^(\fIn\fP\-1). Detta är för att minska falska positiva vid detektering +av \fB.lzma\fP\-filer. +.PP +Dessa begränsningar bör inte vara ett problem i praktiken, eftersom +praktiskt taget alla \fB.lzma\fP\-filer har komprimerats med inställningar som +liblzma kommer godta. +. +.SS "Avslutande skräp" +Vid dekomprimering ignorerar LZMA Utils tyst allting efter den första +\&\fB.lzma\fP\-strömmen. I de flesta situationer är detta fel. Detta betyder även +att LZMA Utils inte stödjer dekomprimering av konkatenerade \fB.lzma\fP\-filer. +.PP +Om det finns data kvar efter den första \fB.lzma\fP\-strömmen betraktar \fBxz\fP +filen som trasig om inte \fB\-\-single\-stream\fP användes. Detta kan göra sönder +obskyra skript vilka har antagit att avslutande skräp ignoreras. +. +.SH NOTERINGAR +. +.SS "Den komprimerade utdatan kan variera" +Den exakta komprimerade utdatan som produceras från samma okomprimerade +indatafil kan variera mellan versioner av XZ Utils även om +komprimeringsflaggorna är identiska. Detta beror på att kodaren kan +förbättras (snabbare eller bättre komprimering) utan att påverka +filformatet. Utdatan kan variera även mellan olika byggen av samma version +av XZ Utils, om olika byggflaggor används. +.PP +Ovanstående betyder att när väl \fB\-\-rsyncable\fP har implementerats kommer +inte nödvändigtvis de resulterande filerna vara rsync\-bara om inte både +gamla och nya filer har komprimerats med samma version av xz. Detta problem +kan lösas om en del av kodarimplementeringen fryses för att hålla rsync\-bar +utdata stabil mellan xz\-versioner. +. +.SS "Inbäddade .xz\-dekomprimerare" +Inbäddade implementationer av \fB.xz\fP\-dekomprimerare som XZ Embedded stödjer +inte nödvändigtvis filer som skapas med andra typer av +integritets\fIkontroll\fP än \fBnone\fP och \fBcrc32\fP. Eftersom standardvärdet är +\fB\-\-check=crc64\fP måste man använda \fB\-\-check=none\fP eller \fB\-\-check=crc32\fP +när filer skapas för inbäddade system. +.PP +Utanför inbäddade system stödjer alla dekomprimerare av \fB.xz\fP\-format alla +typerna av \fIkontroller\fP, eller åtminstone kan de dekomprimera filern utan +att verifiera integritetskontrollen om den specifika \fIkontrollen\fP inte +stödjs. +.PP +XZ Embedded stödjer BCJ\-filter, men endast med standard startavstånd. +. +.SH EXEMPEL +. +.SS Grundläggande +Komprimera filen \fIapa\fP till \fIapa.xz\fP med standardkomprimeringsnivån +(\fB\-6\fP), och ta bort \fIapa\fP om komprimeringen lyckas: +.RS +.PP +.nf +\f(CRxz apa\fR +.fi +.RE +.PP +Dekomprimera \fIbepa.xz\fP till \fIbepa\fP och ta inte bort \fIbepa.xz\fP även om +dekomprimeringen lyckas: +.RS +.PP +.nf +\f(CRxz \-dk bepa.xz\fR +.fi +.RE +.PP +Skapa \fIcepa.tar.xz\fP med förinställningen \fB\-4e\fP (\fB\-4 \-\-extreme\fP), vilket +är långsammare än standardvärdet \fB\-6\fP, men behöver mindre minne till +komprimering och dekomprimering (48\ MiB respektive 5\ MiB): +.RS +.PP +.nf +\f(CRtar cf \- cepa | xz \-4e > cepa.tar.xz\fR +.fi +.RE +.PP +En blandning av komprimerade och okomprimerade filer kan dekomprimeras till +standard ut med ett enda kommando: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Parallell komprimering av många filer" +På GNU och *BSD kan \fBfind\fP(1) och \fBxargs\fP(1) användas för att +parallellisera komprimeringen av många filer: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +Flaggan \fB\-P\fP till \fBxargs\fP(1) anger antalet parallella \fBxz\fP\-processer. Det +bästa värdet till flaggan \fB\-n\fP beror på hur många filer det finns som skapp +komprimeras. Om det bara finns några stycken filer bör värdet förmodigen +vara 1; med tiotusentals filer kan 100 eller mer vara lämpligt för att +reducera antalet \fBxz\fP\-processer som \fBxargs\fP(1) kommer att skapa. +.PP +Flaggan \fB\-T1\fP till \fBxz\fP finns för att tvinga den till enkeltrådsläge, +eftersom \fBxargs\fP(1) används för att styra mängden parallellisering. +. +.SS Robotläge +Beräkna hur många byt som har sparats totalt efter komprimering av flera +filer: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Ett skript kan vilja veta att det använder en tillräckligt ny +\fBxz\fP. Följande \fBsh\fP(1)\-skript kontrollerar att versionsnumret för +verktyget \fBxz\fP är åtminstone 5.0.0. Denna metod är kompatibel med gamla +betaversioner, vilka inte stödde flaggan \fB\-\-robot\fP: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Din xz är för gammal." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Ange en gräns för minnesanvändning för dekomprimering med \fBXZ_OPT\fP, men om +en gräns redan har satts, öka den inte: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Anpassade komprimerarfilterkedjor" +Den enklaste användningen av anpassade filterkedjor är att anpassa en +LZMA2\-förinställning. Detta kan vara användbart eftersom förinställningarna +endast täcker en delmängd av de potentiellt användbara kombinationerna av +komprimeringsinställningar. +.PP +Kolumnerna CompCPU i tabellerna från beskrivningen av flaggorna options +\fB\-0\fP ... \fB\-9\fP och \fB\-\-extreme\fP är användbara vid anpassning av +LZMA2\-förinställningar. Här är de relevanta delarna samlade från dessa två +tabeller: +.RS +.PP +.TS +tab(;); +c c +n n. +Förinställning;KompCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +Om man vet att en fil behöver ett rätt stort lexikon (till exempel, 32\ MiB) +för att komprimeras bra, men man vill komprimera den snabbare än \fBxz \-8\fP +skulle gjort kan en förinställning med ett lågt värde på CompCPU (till +exempel, 1) ändras till att använda ett större lexikon: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB apa.tar\fR +.fi +.RE +.PP +Med vissa filer kan ovanstående kommando vara snabbare än \fBxz \-6\fP samtidigt +som det komprimerar betydligt bättre. Dock måste det påpekas att endast +några filer drar fördel av ett stort lexikon samtidigt som värdet CompCPU +hålls lågt. Den mest uppenbara situationen, är ett stort lexikon kan hälpa +till mycket, är ett arkiv som innehåller väldigt snarlika filer på åtmistone +några megabyte var. Lexikonstorleken måste vara signifikant större än någon +enskild fil för att låta LZMA2 dra full nytta av likheterna mellan på +varandra följande filer. +.PP +Om det går bra med väldigt hög minnesanvändning i komprimeraren och +dekomprimeraren, och filen som komprimeras är åtminstone flera hundra +megabyte, kan det vara användbart att använda ännu större lexikon än de 64 +MiB som \fBxz \-9\fP skulle använda: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB stor_apa.tar\fR +.fi +.RE +.PP +Att använda \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP) som i exemplet ovan kan vara +användbart för att se minnesbehoven för komprimeraren och +dekomprimeraren. Kom ihåg att använda ett större lexikon än storleken på den +okomprimerade filen är slöseri med minne, så ovanstående kommando är inte +användbart för små filer. +.PP +Ibland spelar inte dekomprimeringstiden någon roll, men dekomprimerarens +minnesanvändning måste hållas låg, till exempel för att göra det möjligt att +dekomprimera filen på ett inbäddat system. Följande kommando använder \fB\-6e\fP +(\fB\-6 \-\-extreme\fP) som en bas och sätter lexikonstorleken till bara 64\ KiB. Den resulterande filen kan dekomprimeras med XZ Embedded (det är därför +det finns \fB\-\-check=crc32\fP) som använder ungerfär 100\ KiB minne. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB apa\fR +.fi +.RE +.PP +Om man vill krama ur så många byte som möjligt kan justering av antalet +literala kontextbitar (\fIlc\fP) och antalet positionsbitar (\fIpb\fP) ibland +hjälpa. Justering av antalet literala positionsbitar (\fIlp\fP) kan också +hjälpa, men vanligen är \fIlc\fP och \fIpb\fP viktigare. Till exempel innehåller +ett källkodsarkiv huvudsakligen US\-ASCII\-text, så något i stil med följande +kan ge aningen (som 0.1\ %) mindre fil än \fBxz \-6e\fP (försök även utan +\fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 källkod.tar\fR +.fi +.RE +.PP +Att använda ett annat filter tillsammans med LZMA2 kan förbättra +komprimeringen med vissa filtyper. Till exempel, för att komprimera ett +delat x86\-32\- eller x86\-64\-bibliotek med filtret x86 BCJ: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libapa.so\fR +.fi +.RE +.PP +Observera att ordningen på filterflaggorna spelar roll. Om \fB\-\-x86\fP anges +efter \fB\-\-lzma2\fP kommer \fBxz\fP avge ett fel, eftersom det inte kan vara något +filter efter LZMA2, och även för att filtret x86 BCJ inte kan användas som +det sista filtret i kedjan. +.PP +Deltafiltret tillsammans med LZMA2 gan ge bra resultat med +bitkartebilder. Det bör vanligen slå PNG, som har några mer avancerade +filter än enkla delta men använder Deflat för den faktiska komprimeringen. +.PP +Bilden måste sparas i okomprimerat format, till exempel som okomprimerad +TIFF. Avståndsparametern i Deltafiltret sätts till att motsvara natalet byte +per bildpunkt i bilden. Till exempel, 24\-bitars RGB bitkarta behöver +\fBdist=3\fP, och det är även bra att skicka \fBpb=0\fP till LZMA2 för att ge +plats för trebytejustering: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 apa.tiff\fR +.fi +.RE +.PP +Om flera bilder har lagts in i ett gemensamt arkiv (till exempel, \fB.tar\fP) +kommer Deltafiltret fungera på det också så länge alla bilder har samma +antal byte per bildpunkt. +. +.SH "SE ÄVEN" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sv/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzdec.1 new file mode 100644 index 0000000000..63612b0c43 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzdec.1 @@ -0,0 +1,87 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Swedish translation of xz-man +.\" Göran Uddeborg , 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 2024\-04\-08 Tukaani "XZ Utils" +.SH NAMN +xzdec, lzmadec \- Små .xz\- och .lzma\-dekomprimerare +.SH SYNOPSIS +\fBxzdec\fP [\fIflagga…\fP] [\fIfil…\fP] +.br +\fBlzmadec\fP [\fIflagga…\fP] [\fIfil…\fP] +.SH BESKRIVNING +\fBxzdec\fP är ett liblzma\-baserat verktyg endast för dekomprimering för \fB.xz\fP +(och endast \fB.xz\fP) filer. \fBxzdec\fP är avsett att fungera som en drop +in\-ersättning för \fBxz\fP(1) i de vanligaste situationerna där ett skript har +skrivits för att använda \fBxz \-\-decompress \-\-stdout\fP (och möjligen några +andra vanliga flaggor) för att dekomprimera \fB.xz\fP\-filer. \fBlzmadec\fP är +identisk med \fBxzdec\fP förutom att \fBlzmadec\fP stödjer \fB.lzma\fP\-filer istället +för \fB.xz\fP\-filer. +.PP +För att reducera storleken på det körbara programmet stödjer inte \fBxzdec\fP +multitrådning eller lokalisering, och läser inte flaggor från +miljövariablerna \fBXZ_DEFAULTS\fP eller \fBXZ_OPT\fP. \fBxzdec\fP stödjer inte att +visa mellanliggande förloppsinformation: att skicka \fBSIGINFO\fP till \fBxzdec\fP +gör ingenting, med att skicka \fBSIGUSR1\fP avslutar processen istället för att +visa förloppsinformation. +.SH FLAGGOR +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +Ignoreras för kompatibilitet med \fBxz\fP(1). \fBxzdec\fP stödjer endast +dekomprimering. +.TP +\fB\-k\fP, \fB\-\-keep\fP +Ignoreras för kompatibilitet med \fBxz\fP(1). \fBxzdec\fP skapar aldrig eller tar +aldrig bort några filer. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Ignoreras för kompatibilitet med \fBxz\fP(1). \fBxzdec\fP skriver alltid +dekomprimerad data till standard ut. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Att ange detta en gång gör inget eftersom \fBxzdec\fP aldrig visar några +varningar eller noteringar. Att ange detta två gånger utelämnar +felmeddelanden. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Ignoreras för kompatibilitet med \fBxz\fP(1). \fBxzdec\fP använder aldrig +slutstatus 2. +.TP +\fB\-h\fP, \fB\-\-help\fP +Visa ett hjälpmeddelande och avsluta. +.TP +\fB\-V\fP, \fB\-\-version\fP +Visa versionsnumret på \fBxzdec\fP och liblzma. +.SH SLUTSTATUS +.TP +\fB0\fP +Allt gick bra. +.TP +\fB1\fP +Ett fel uppstod. +.PP +\fBxzdec\fP har inte några varningsmeddelanden så som \fBxz\fP(1) har, och därför +används aldrig slutstatusen 2 av \fBxzdec\fP. +.SH NOTERINGAR +Använd \fBxz\fP(1) istället för \fBxzdec\fP eller \fBlzmadec\fP för dagligt +bruk. \fBxzdec\fP och \fBlzmadec\fP är bara avsedda för situationer där det är +viktigt att ha en mindre dekomprimerare än den fullständiga \fBxz\fP(1). +.PP +\fBxzdec\fP och \fBlzmadec\fP är egentligen inte riktigt så små. Storleken kan +reduceras ytterligare genom att ta bort funktioner från liblzma vid +kompileringstidpunkten, men det skall normalt inte göras för körbara program +som distribueras i en typisk, inte inbäddad, distribution av +operativsystem. Om man behöver en verkligt liten \fB.xz\fP\-dekomprimerare skall +man överväga XZ Embedded. +.SH "SE ÄVEN" +\fBxz\fP(1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sv/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzdiff.1 new file mode 100644 index 0000000000..2d1516dcb5 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzdiff.1 @@ -0,0 +1,54 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Swedish translation of xz-man +.\" Göran Uddeborg , 2025. +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 2025\-03\-06 Tukaani "XZ Utils" +.SH NAMN +xzcmp, xzdiff, lzcmp, lzdiff — jämför komprimerade filer +. +.SH SYNOPSIS +\fBxzcmp\fP [\fIflagga…\fP] \fIfil1\fP [\fIfil2\fP] +.br +\fBxzdiff\fP \&… +.br +\fBlzcmp\fP \&… (FÖRÅLDRAT) +.br +\fBlzdiff\fP \&… (FÖRÅLDRAT) +. +.SH BESKRIVNING +\fBxzcmp\fP och \fBxzdiff\fP jämför det okomprimerade innehållet i två +filer. Okomprimerad data skickas till \fBcmp\fP(1) eller \fBdiff\fP(1) såvida inte +\fB\-\-help\fP eller \fB\-\-version\fP anges. +.PP +Om både \fIfil1\fP och \fIfil2\fP anges kan de vara okomprimerade filer eller +filer i format som \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) +eller \fBlz4\fP(1) kan dekomprimera. De nödvändiga dekomprimeringskommandona +avgörs från filnamnsändelsen på \fIfil1\fP och \fIfil2\fP. En fil med en okänd +ändelse antas antingen vara okomprimerad eller i ett format som \fBxz\fP(1) kan +dekomprimera. +.PP +Om endast ett filnamn anges måste \fIfil1\fP ha en ändelse med ett av de stödda +komprimeringsformaten och namnet på \fIfil2\fP antas vara \fIfil1\fP med +komprimeringsformatsändelsen borttagen. +.PP +Kommandona \fBlzcmp\fP och \fBlzdiff\fP finns för bakåtkompatibilitet med LZMA +Utils. De rekommenderas inte och kommer tas bort i en framtida version. +. +.SH SLUTSTATUS +Om ett dekomprimeringsfel uppstår är slutstatus \fB2\fP. Annars används +slutstatusen från \fBcmp\fP(1) respektive \fBdiff\fP(1). +. +.SH "SE ÄVEN" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sv/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzgrep.1 new file mode 100644 index 0000000000..bf4653d6c7 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzgrep.1 @@ -0,0 +1,92 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Swedish translation of xz-man +.\" Göran Uddeborg , 2025. +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 2025\-03\-06 Tukaani "XZ Utils" +.SH NAMN +xzgrep — sök i eventuellt komprimerade filer efter mönster +. +.SH SYNOPSIS +\fBxzgrep\fP [\fIflagga…\fP] [\fImönsterlista\fP] [\fIfil…\fP] +.br +\fBxzegrep\fP \&… +.br +\fBxzfgrep\fP \&… +.br +\fBlzgrep\fP \&… (FÖRÅLDRAT) +.br +\fBlzegrep\fP \&… (FÖRÅLDRAT) +.br +\fBlzfgrep\fP \&… (FÖRÅLDRAT) +. +.SH BESKRIVNING +\fBxzgrep\fP anropar \fBgrep\fP(1) på det okomprimerade innehållet i +filerna. Formaten på \fIfilerna\fP bestäms utgående från filnamnsändelsen. En +\fIfil\fP med en ändelse som stödjs av \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), +\fBlzop\fP(1), \fBzstd\fP(1) eller \fBlz4\fP(1) kommer att dekomprimeras; alla andra +filer antas vara okomprimerade. +.PP +Om inga \fIfiler\fP anges eller om \fIfil\fP är \fB\-\fP lästes standard in. När +standard in läses är de enda filerna som dekomprimeras de som stödjs av +\fBxz\fP(1). Andra filer antas redan vara i okomprimerad form. +.PP +De flesta \fIflaggor\fP till \fBgrep\fP(1) stödjs. Dock stödjs inte följande +flaggor: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIåtgärd\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIfil\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIglob\fP +.PP +\fBxzegrep\fP är ett alias för \fBxzgrep \-E\fP. \fBxzfgrep\fP är ett alias för +\fBxzgrep \-F\fP. +.PP +Kommandona \fBlzgrep\fP, \fBlzegrep\fP och \fBlzfgrep\fP finns för +bakåtkompatibilitet med LZMA Utils. De rekommenderas inte och kommer tas +bort i en framtida version. +. +.SH SLUTSTATUS +.TP +0 +Åtminstone en matchning hittades från åtminstone en av infilerna. Inga fel +uppstod. +.TP +1 +Inga matchningar hittades i någon av infilerna. Inga fel uppstod. +.TP +>1 +Ett eller flera fel uppstod. Det är okänt om några matchningar hittades. +. +.SH MILJÖ +.TP +\fBGREP\fP +Om \fBGREP\fP är satt till något icketomt värde används det istället för +\fBgrep\fP, \fBgrep \-E\fP respektive \fBgrep \-F\fP. +. +.SH "SE ÄVEN" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sv/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzless.1 new file mode 100644 index 0000000000..52b702820a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzless.1 @@ -0,0 +1,47 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Swedish translation of xz-man +.\" Göran Uddeborg , 2025. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 2025\-03\-06 Tukaani "XZ Utils" +.SH NAMN +xzless, lzless — visa xz\- eller lzma\-komprimerade (text)filer +.SH SYNOPSIS +\fBxzless\fP [\fIfil\fP…] +.br +\fBlzless\fP [\fIfil\fP…] (FÖRÅLDRAT) +.SH BESKRIVNING +\fBxzless\fP är ett filter som visar text från komprimerade filer i en +terminal. Filer som stödjs av \fBxz\fP(1) dekomprimeras; andra filer antas +redan vara i okomprimerad form. Om inga \fIfiler\fP ges läser \fBxzless\fP från +standard in. +.PP +\fBxzless\fP använder \fBless\fP(1) för att visa sin utdata. Till skillnad mot +\fBxzmore\fP kan inte dess val av bläddrare ändras genom att sätta en +miljövariabel. Kommandon är baserade på både \fBmore\fP(1) och \fBvi\fP(1) och +tillåter förflytting fram och tillbaka samt sökning. Se manualen \fBless\fP(1) +för mer information. +.PP +Kommandot som heter \fBlzless\fP finns för bakåtkompatibilitet med LZMA +Utils. Det rekommenderas inte och kommer tas bort i en framtida version. +.SH MILJÖ +.TP +\fBLESSMETACHARS\fP +En lista på tecken som är speciella för skalet. Sätts av \fBxzless\fP om den +inte redan är satt i miljön. +.TP +\fBLESSOPEN\fP +Satt till en kommandorad för att köra dekomprimeraren \fBxz\fP(1) för +förbehandling av infiler till \fBless\fP(1). +.SH "SE ÄVEN" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/sv/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzmore.1 new file mode 100644 index 0000000000..b5bb68d4df --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/sv/xzmore.1 @@ -0,0 +1,48 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Swedish translation of xz-man +.\" Göran Uddeborg , 2025. +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 2025\-03\-06 Tukaani "XZ Utils" +.SH NAMN +xzmore, lzmore — visa xz\- eller lzma\-komprimerade (text)filer +. +.SH SYNOPSIS +\fBxzmore\fP [\fIfil\fP…] +.br +\fBlzmore\fP [\fIfil\fP…] (FÖRÅLDRAT) +. +.SH BESKRIVNING +\fBxzmore\fP visar text från komprimerade filer i en terminal med användning av +\fBmore\fP(1). Filer som stödjs av \fBxz\fP(1) dekomprimeras; andra filer antas +redan vara i okomprimerad form. Om inga \fIfiler\fP ges läser \fBxzmore\fP från +standard in. Se manualen för \fBmore\fP(1) för tangentbordskommandona. +.PP +Observera att det kanske inte är möjligt att rulla baklänges, beroende på +implementationen av \fBmore\fP(1). Detta är för att \fBxzmore\fP använder ett rör +för att skicka dekomprimerad data till \fBmore\fP(1). \fBxzless\fP(1) använder +\fBless\fP(1) vilken ger mer avancerade funktioner. +.PP +Kommandot \fBlzmore\fP finns för bakåtkompatibilitet med LZMA Utils. Det +rekommenderas inte och kommer tas bort i en framtida version. +. +.SH MILJÖ +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +Om \fBPAGER\fP är satt används dess värde som bläddrare istället för +\fBmore\fP(1). +. +.SH "SE ÄVEN" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/uk/lzmainfo.1 b/cpp/third_party/xz-5.8.3/po4a/man/uk/lzmainfo.1 new file mode 100644 index 0000000000..fea640b06d --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/uk/lzmainfo.1 @@ -0,0 +1,45 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Ukrainian translation for xz-man. +.\" Yuri Chornoivan , 2019, 2022, 2023, 2024, 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LZMAINFO 1 "30 червня 2013 року" Tukaani "XZ Utils" +.SH НАЗВА +lzmainfo — показ відомостей, які зберігаються у заголовку файла .lzma +.SH "КОРОТКИЙ ОПИС" +\fBlzmainfo\fP [\fB\-\-help\fP] [\fB\-\-version\fP] [\fIфайл...\fP] +.SH ОПИС +\fBlzmainfo\fP показує дані, що зберігаються у заголовку файла \fB.lzma\fP. Вона +читає перші 13 байтів із вказаного \fIфайла\fP, розкодовує заголовок і виводить +його до стандартного виведення у зручному для читання форматі. Якщо не +вказано жодного \fIфайла\fP або замість \fIфайла\fP вказано \fB\-\fP, дані буде +прочитано зі стандартного вхідного джерела даних. +.PP +Зазвичай, найцікавішою інформацією є розпакований розмір та розмір +словника. Розпакований розмір може бути показано, лише якщо файл записано у +непотоковому варіанті формату \fB.lzma\fP. Об'єм пам'яті, потрібний для +розпаковування файла, складає декілька десятків кілобайтів плюс розмір +словника. +.PP +\fBlzmainfo\fP включено до XZ Utils в основному для зворотної сумісності із +LZMA Utils. +.SH "СТАН ВИХОДУ" +.TP +\fB0\fP +Усе добре. +.TP +\fB1\fP +Сталася помилка. +.SH ВАДИ +\fBlzmainfo\fP використовує \fBMB\fP, хоча правильним суфіксом мав би бути \fBMiB\fP +(2^20 байтів). Так зроблено, щоб зберегти сумісність виведених даних із LZMA +Utils. +.SH "ДИВ. ТАКОЖ" +\fBxz\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/uk/xz.1 b/cpp/third_party/xz-5.8.3/po4a/man/uk/xz.1 new file mode 100644 index 0000000000..bff0472c44 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/uk/xz.1 @@ -0,0 +1,2039 @@ +'\" t +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Ukrainian translation for xz-man. +.\" Yuri Chornoivan , 2019, 2022, 2023, 2024, 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZ 1 "8 березня 2025 року" Tukaani "XZ Utils" +. +.SH НАЗВА +xz, unxz, xzcat, lzma, unlzma, lzcat — стискання та розпаковування файлів +\&.xz і .lzma +. +.SH "КОРОТКИЙ ОПИС" +\fBxz\fP [\fIпараметр...\fP] [\fIфайл...\fP] +. +.SH "СКОРОЧЕННЯ КОМАНД" +\fBunxz\fP є рівноцінним до \fBxz \-\-decompress\fP. +.br +\fBxzcat\fP є рівноцінним до \fBxz \-\-decompress \-\-stdout\fP. +.br +\fBlzma\fP є рівноцінним до \fBxz \-\-format=lzma\fP. +.br +\fBunlzma\fP є рівноцінним до \fBxz \-\-format=lzma \-\-decompress\fP. +.br +\fBlzcat\fP є рівноцінним до \fBxz \-\-format=lzma \-\-decompress \-\-stdout\fP. +.PP +При написанні скриптів, де потрібно розпаковувати файли, рекомендуємо завжди +використовувати \fBxz\fP із відповідними аргументами (\fBxz \-d\fP або \fBxz \-dc\fP), +замість \fBunxz\fP і \fBxzcat\fP. +. +.SH ОПИС +\fBxz\fP інструмент загального призначення для стискання даних із синтаксисом +командного рядка, подібним для \fBgzip\fP(1) і \fBbzip2\fP(1). Власним форматом +файлів є \fB.xz\fP, але передбачено підтримку застарілого формату \fB.lzma\fP, +який було використано у LZMA Utils, та необроблених потоків стиснених даних +без заголовків формату контейнера. Крім того, передбачено підтримку +розпаковування формату \fB.lz\fP, який використано у \fBlzip\fP. +.PP +\fBxz\fP стискає або розпаковує кожен \fIфайл\fP відповідно до вибраного режиму +дій. Якщо \fIфайли\fP не задано або якщо \fIфайлом\fP є \fB\-\fP, \fBxz\fP читатиме дані +зі стандартного джерела вхідних даних і записуватиме оброблені дані до +стандартного виведення. \fBxz\fP відмовить (покаже повідомлення про помилку і +пропустить \fIфайл\fP) у записів стиснених даних до стандартного виведення, +якщо це термінал. Так само, \fBxz\fP відмовить у читанні стиснених даних зі +стандартного джерела вхідних даних, якщо це термінал. +.PP +Якщо не вказано \fB\-\-stdout\fP, \fIфайли\fP, відмінні від \fB\-\fP, буде записано до +нового файла, чию назву буде визначено з назви початкового \fIфайла\fP: +.IP \(bu 3 +При стисканні суфікс формату файла призначення (\fB.xz\fP або \fB.lzma\fP) буде +дописано до назви початкового файла для отримання назви файла призначення. +.IP \(bu 3 +При розпаковуванні суфікс \fB.xz\fP, \fB.lzma\fP або \fB.lz\fP буде вилучено з назви +файла для отримання назви файла призначення. Крім того, \fBxz\fP розпізнає +суфікси \fB.txz\fP і \fB.tlz\fP і замінює їх на суфікс \fB.tar\fP. +.PP +Якщо файл призначення вже існує, буде показано повідомлення про помилку, а +\fIфайл\fP буде пропущено. +.PP +Окрім випадку запису до стандартного виведення, \fBxz\fP покаже попередження і +пропустить обробку \fIфайла\fP, якщо буде виконано будь\-яку з таких умов: +.IP \(bu 3 +\fIФайл\fP не є звичайним файлом. Програма не переходитиме за символічними +посиланнями, а отже, не вважатиме їх звичайними файлами. +.IP \(bu 3 +На \fIфайл\fP існує декілька жорстких посилань. +.IP \(bu 3 +Для \fIфайла\fP встановлено setuid, setgid або «липкий» біт. +.IP \(bu 3 +Режим дій встановлено у значення «стискання», і \fIфайл\fP вже має суфікс назви +формату файла призначення (\fB.xz\fP або \fB.txz\fP при стисканні до формату +\&\fB.xz\fP, і \fB.lzma\fP або \fB.tlz\fP при стисканні до формату \fB.lzma\fP). +.IP \(bu 3 +Режим дій встановлено у значення «розпаковування», і \fIфайл\fP не має суфікса +назви жодного з підтримуваних форматів (\fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP +або \fB.lz\fP). +.PP +Після успішного стискання або розпаковування \fIфайла\fP, \fBxz\fP копіює дані +щодо власника, групи, прав доступу, часу доступу та моменту внесення змін з +початкового \fIфайла\fP до файла призначення. Якщо копіювання даних щодо групи +зазнає невдачі, права доступу буде змінено так, що файл призначення стане +недоступним для користувачів, які не мають права доступу до початкового +\fIфайла\fP. В \fBxz\fP ще не передбачено підтримки копіювання інших метаданих, +зокрема списків керування доступом або розширених атрибутів. +.PP +Щойно файл призначення буде успішно закрито, початковий \fIфайл\fP буде +вилучено, якщо не вказано параметра \fB\-\-keep\fP. Початковий \fIфайл\fP ніколи не +буде вилучено, якщо виведені дані буде записано до стандартного виведення +або якщо станеться помилка. +.PP +Надсилання \fBSIGINFO\fP або \fBSIGUSR1\fP до процесу \fBxz\fP призводить до +виведення даних щодо поступу до стандартного виведення помилок. Це має лише +обмежене використання, оскільки якщо стандартним виведенням помилок є +термінал, використання \fB\-\-verbose\fP призведе до показу автоматично +оновлюваного індикатора поступу. +. +.SS "Використання пам'яті" +Використання \fBxz\fP пам'яті може бути різним: від декількох сотень кілобайтів +до декількох гігабайтів, залежно від параметрів стискання. Параметри, які +використано при стисканні файла, визначають вимоги до об'єму пам'яті при +розпакуванні. Типово, засобу розпаковування потрібно від 5\ % до 20\ % +об'єму пам'яті, якого засіб стискання потребує при створенні +файла. Наприклад, розпаковування файла, який створено з використанням \fBxz \-9\fP, у поточній версії потребує 65\ МіБ пам'яті. Втім, можливе створення +файлів \fB.xz\fP, які потребуватимуть для розпаковування декількох гігабайтів +пам'яті. +.PP +Ймовірність високого рівня використання пам'яті може бути особливо +дошкульною для користувачів застарілих комп'ютерів. Щоб запобігти прикрим +несподіванкам, у \fBxz\fP передбачено вбудований обмежувач пам'яті, який типово +вимкнено. Хоча у деяких операційних системах передбачено спосіб обмежити +використання пам'яті процесами, сподівання на його ефективність не є аж +надто гнучким (наприклад, використання \fBulimit\fP(1) для обмеження +віртуальної пам'яті призводить до викривлення даних \fBmmap\fP(2)). +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +.\" It's a name of an environment variable. +Обмежувач пам'яті можна увімкнути за допомогою параметра командного рядка +\fB\-\-memlimit=\fP\fIобмеження\fP. Часто, зручніше увімкнути обмежувач на типовому +рівні, встановивши значення для змінної середовища \fBXZ_DEFAULTS\fP, +наприклад, \fBXZ_DEFAULTS=\-\-memlimit=150MiB\fP. Можна встановити обмеження +окремо для стискання і розпакування за допомогою +\fB\-\-memlimit\-compress=\fP\fIlimit\fP and +\fB\-\-memlimit\-decompress=\fP\fIобмеження\fP. Використання цих двох параметрів поза +\fBXZ_DEFAULTS\fP не таке вже і корисне, оскільки одноразовий запуск \fBxz\fP не +може одночасно призводити до стискання та розпаковування, а набрати у +командному рядку \fB\-\-memlimit=\fP\fIобмеження\fP (або \fB\-M\fP \fIобмеження\fP) +набагато швидше. +.PP +Якщо під час розпаковування вказане обмеження буде перевищено, \fBxz\fP покаже +повідомлення про помилку, а розпаковування файла зазнає невдачі. Якщо +обмеження буде перевищено при стисканні, \fBxz\fP спробує масштабувати +параметри так, щоб не перевищувати обмеження (окрім випадків використання +\fB\-\-format=raw\fP або \fB\-\-no\-adjust\fP). Отже, дію буде виконано, якщо обмеження +не є надто жорстким. Масштабування параметрів буде виконано кроками, які не +збігаються із рівнями шаблонів стискання. Наприклад, якщо обмеження лише +трохи не вкладається у об'єм потрібний для \fBxz \-9\fP, параметри буде змінено +лише трохи, не до рівня \fBxz \-8\fP. +. +.SS "Поєднання і заповнення з файлами .xz" +Можна поєднати файли \fB.xz\fP без додаткової обробки. \fBxz\fP розпакує такі +файли так, наче вони є єдиним файлом \fB.xz\fP. +.PP +Можна додати доповнення між з'єднаними частинами або після останньої +частини. Доповнення має складатися із нульових байтів і мати розмір, який є +кратним до чотирьох байтів. Це може бути корисним, наприклад, якщо файл +\&\fB.xz\fP зберігається на носії даних, де розміри файла вимірюються у +512\-байтових блоках. +.PP +Поєднання та заповнення не можна використовувати для файлів \fB.lzma\fP або +потоків необроблених даних. +. +.SH ПАРАМЕТРИ +. +.SS "Цілочисельні суфікси і спеціальні значення" +У більшості місць, де потрібен цілочисельний аргумент, передбачено підтримку +необов'язкового суфікса для простого визначення великих цілих чисел. Між +цілим числом і суфіксом не повинно бути пробілів. +.TP +\fBKiB\fP +Помножити ціле число на 1024 (2^10). Синонімами \fBKiB\fP є \fBKi\fP, \fBk\fP, \fBkB\fP, +\fBK\fP та \fBKB\fP. +.TP +\fBMiB\fP +Помножити ціле число на 1048576 (2^20). Синонімами \fBMiB\fP є B, \fBMi\fP, \fBm\fP, +\fBM\fP та \fBMB\fP. +.TP +\fBGiB\fP +Помножити ціле число на 1073741824 (2^30). Синонімами \fBGiB\fP є B, \fBGi\fP, +\fBg\fP, \fBG\fP та \fBGB\fP. +.PP +Можна скористатися особливим значенням \fBmax\fP для позначення максимального +цілого значення, підтримку якого передбачено для параметра. +. +.SS "Режим операції" +Якщо вказано декілька параметрів режиму дій, буде використано лише останній +з них. +.TP +\fB\-z\fP, \fB\-\-compress\fP +Стиснути. Це типовий режим дій, якщо не вказано параметр режиму дій, а назва +команди неявним чином не визначає іншого режиму дій (наприклад, \fBunxz\fP +неявно визначає \fB\-\-decompress\fP). +.IP "" +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Після успішного пакування початковий файл буде вилучено, якщо виведення не +відбувається до стандартного виведення або не вказано параметра \fB\-\-keep\fP. +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +.\" The DESCRIPTION section already says this but it's good to repeat it +.\" here because the default behavior is a bit dangerous and new users +.\" in a hurry may skip reading the DESCRIPTION section. +Розпакувати. Після успішного розпаковування початковий файл буде вилучено, +якщо виведення не відбувається до стандартного виведення або не вказано +параметра \fB\-\-keep\fP. +.TP +\fB\-t\fP, \fB\-\-test\fP +Перевірити цілісність стиснених файлів \fIфайли\fP. Цей параметр еквівалентний +до \fB\-\-decompress \-\-stdout\fP, але розпаковані дані буде відкинуто, замість +запису до стандартного виведення. Жодних файлів не буде створено або +вилучено. +.TP +\fB\-l\fP, \fB\-\-list\fP +Вивести відомості щодо стиснених файлів \fIфайли\fP. Розпакування даних не +виконуватиметься, жодних файлів не буде створено або вилучено. У режимі +списку програма не може читати дані зі стандартного введення або з інших +джерел, де неможливе позиціювання. +.IP "" +У типовому списку буде показано базові відомості щодо файлів \fIфайли\fP, по +одному файлу на рядок. Щоб отримати докладніші відомості, скористайтеся +параметром \fB\-\-verbose\fP. Щоб розширити спектр відомостей, скористайтеся +параметром \fB\-\-verbose\fP двічі, але зауважте, що це може призвести до +значного уповільнення роботи, оскільки отримання додаткових відомостей +потребує великої кількості позиціювань. Ширина області докладного виведення +даних перевищує 80 символів, тому передавання конвеєром виведених даних, +наприклад, до \fBless\ \-S\fP, може бути зручним способом перегляду даних, якщо +термінал недостатньо широкий. +.IP "" +Виведені дані залежать від версії \fBxz\fP та використаної локалі. Для +отримання даних, які будуть придатні до обробки комп'ютером, слід +скористатися параметрами \fB\-\-robot \-\-list\fP. +. +.SS "Модифікатори режиму роботи" +.TP +\fB\-k\fP, \fB\-\-keep\fP +Не вилучати вхідні файли. +.IP "" +Починаючи з версії \fBxz\fP 5.2.6, використання цього параметра також наказує +\fBxz\fP виконувати стискання або розпаковування, навіть якщо вхідними даними є +символічне посилання на звичайний файл, файл, який має декілька жорстких +посилань, або файл, для якого встановлено setuid, setgid або липкий +біт. setuid, setgid та липкий біт не буде скопійовано до файла\-результату. У +попередніх версіях, ці дії виконувалися, лише якщо було використано параметр +\fB\-\-force\fP. +.TP +\fB\-f\fP, \fB\-\-force\fP +Результатів використання цього параметра буде декілька: +.RS +.IP \(bu 3 +Якщо файл\-результат вже існує, вилучити його до стискання або +розпаковування. +.IP \(bu 3 +Виконувати стискання або розпаковування, навіть якщо вхідними даними є +символічне посилання на звичайний файл, файл, який має декілька жорстких +посилань, або файл, для якого встановлено setuid, setgid або липкий біт +setuid, setgid та липкий біт не буде скопійовано до файла\-результату. +.IP \(bu 3 +Якщо використано разом із \fB\-\-decompress\fP, \fB\-\-stdout\fP, і \fBxz\fP не зможе +розпізнати тип початкового файла, копіювати початковий файл без змін до +стандартного виведення. Це надає змогу користуватися \fBxzcat\fP \fB\-\-force\fP +подібно до \fBcat\fP(1) для файлів, які не було стиснено за допомогою +\fBxz\fP. Зауважте, що у майбутньому у \fBxz\fP може бути реалізовано підтримку +нових форматів стиснених файлів, замість копіювання їх без змін до +стандартного виведення. Можна скористатися \fB\-\-format=\fP\fIформат\fP для +обмеження стискання у \fBxz\fP єдиним форматом файлів. +.RE +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Записати стиснені або розпаковані дані до стандартного виведення, а не до +файла. Неявним чином встановлює \fB\-\-keep\fP. +.TP +\fB\-\-single\-stream\fP +Розпакувати лише перший потік даних \fB.xz\fP і без повідомлень проігнорувати +решту вхідних даних, які слідують за цим потоком. Зазвичай, такі зайві дані +наприкінці файла призводять до показу \fBxz\fP повідомлення про помилку. +.IP "" +\fBxz\fP ніколи не виконуватиме спроби видобути декілька потоків даних з файлів +\&\fB.lzma\fP або необроблених потоків даних, але використання цього параметра +все одно наказує \fBxz\fP ігнорувати можливі кінцеві дані після файла \fB.lzma\fP +або необробленого потоку даних. +.IP "" +Цей параметр нічого не змінює, якщо режимом дій не є \fB\-\-decompress\fP або +\fB\-\-test\fP. +.IP "" +З \fBxz\fP 5.7.1alpha, \fB\-\-single\-stream\fP неявно визначає \fB\-\-keep\fP. +.TP +\fB\-\-no\-sparse\fP +Вимкнути створення розріджених файлів. Типово, якщо видобування виконується +до звичайного файла, \fBxz\fP намагається створити розріджений файл, якщо +розпаковані дані містять довгі послідовності двійкових нулів. Це також +працює, коли виконується запис до стандартного виведення, доки стандартне +виведення з'єднано зі звичайним файлом і виконуються певні додаткові умови, +які убезпечують роботу. Створення розріджених файлів може заощадити місце на +диску і пришвидшити розпаковування шляхом зменшення кількості дій введення +та виведення даних на диску. +.TP +\fB\-S\fP \fI.suf\fP, \fB\-\-suffix=\fP\fI.suf\fP +При стисканні використати суфікс \fI.suf\fP для файлів призначення, замість +суфікса \fB.xz\fP або \fB.lzma\fP. Якщо записування виконується не до стандартного +виведення і початковий файл вже має суфікс назви \fI.suf\fP, буде показано +попередження, а файл буде пропущено під час обробки. +.IP "" +При розпаковуванні розпізнавати файли із суфіксом назви \fI.suf\fP, окрім +файлів із суфіксами назв \fB.xz\fP, \fB.txz\fP, \fB.lzma\fP, \fB.tlz\fP або \fB.lz\fP. Якщо +початковий файл мав суфікс назви \fI.suf\fP, для отримання назви файла +призначення цей суфікс буде вилучено. +.IP "" +При стисканні або розпакуванні необроблених потоків даних (\fB\-\-format=raw\fP) +суфікс слід вказувати завжди, якщо запис не виконується до стандартного +виведення, оскільки типового суфікса назви для необроблених потоків даних не +передбачено. +.TP +\fB\-\-files\fP[\fB=\fP\fIфайл\fP] +Прочитати назви файлів для обробки з файла \fIфайл\fP; якщо \fIfile\fP не вказано, +назви файлів буде прочитано зі стандартного потоку вхідних даних. Назви +файлів має бути відокремлено символом нового рядка. Символ дефіса (\fB\-\fP) +буде оброблено як звичайну назву файла; він не позначатиме стандартного +джерела вхідних даних. Якщо також буде вказано назви файлів у аргументах +рядка команди, файли з цими назвами буде оброблено до обробки файлів, назви +яких було прочитано з файла \fIфайл\fP. +.TP +\fB\-\-files0\fP[\fB=\fP\fIфайл\fP] +Те саме, що і \fB\-\-files\fP[\fB=\fP\fIфайл\fP], але файли у списку має бути +відокремлено нульовим символом. +. +.SS "Параметри базового формату файлів та стискання" +.TP +\fB\-F\fP \fIformat\fP, \fB\-\-format=\fP\fIформат\fP +Вказати файл \fIформат\fP для стискання або розпакування: +.RS +.TP +.\" TRANSLATORS: Don't translate bold string B. +\fBauto\fP +Типовий варіант. При стисканні \fBauto\fP є еквівалентом \fBxz\fP. При +розпакуванні формат файла вхідних даних буде виявлено автоматично. Зауважте, +що автоматичне виявлення необроблених потоків даних (створених за допомогою +\fB\-\-format=raw\fP) неможливе. +.TP +\fBxz\fP +Стиснути до формату \fB.xz\fP або приймати лише файли \fB.xz\fP при +розпаковуванні. +.TP +\fBlzma\fP, \fBalone\fP +Стиснути дані до застарілого формату файлів \fB.lzma\fP або приймати лише файли +\&\fB.lzma\fP при розпаковуванні. Альтернативну назву \fBalone\fP може бути +використано для зворотної сумісності із LZMA Utils. +.TP +\fBlzip\fP +Приймати лише файли \fB.lz\fP при розпакуванні. Підтримки стискання не +передбачено. +.IP "" +Передбачено підтримку версії формату \fB.lz\fP 0 та 1. Файли версії 0 було +створено \fBlzip\fP 1.3 та старішими версіями. Такі файли не є поширеними, але +їх можна знайти у файлових архівах, оскільки певну незначну кількість +пакунків із початковим кодом було випущено у цьому форматі. Також можуть +існувати особисті файли у цьому форматі. Підтримку розпаковування для +формату версії 0 було вилучено у \fBlzip\fP 1.18. Версія \fBlzip\fP 1.4 і новіші +версії створюють файли у форматі версії 1. +.TP +\fBraw\fP +Стиснути або розпакувати потік необроблених даних (лез заголовків). Цей +параметр призначено лише для досвідчених користувачів. Для розпаковування +необроблених потоків даних слід користуватися параметром \fB\-\-format=raw\fP і +явно вказати ланцюжок фільтрування, який за звичайних умов мало б бути +збережено у заголовках контейнера. +.RE +.TP +\fB\-C\fP \fIперевірка\fP, \fB\-\-check=\fP\fIперевірка\fP +Вказати тип перевірки цілісності. Контрольну суму буде обчислено на основі +нестиснених даних і збережено у файлі \fB.xz\fP. Цей параметр працюватиме, лише +якщо дані стиснено до файла у форматі \fB.xz\fP; для формату файлів \fB.lzma\fP +підтримки перевірки цілісності не передбачено. Перевірку контрольної суми +(якщо така є) буде виконано під час розпаковування файла \fB.xz\fP. +.IP "" +Підтримувані типи \fIперевірок\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, and B. The command line option --check accepts +.\" only the untranslated strings. +\fBnone\fP +Не обчислювати контрольну суму взагалі. Зазвичай, не варто цього робити. Цим +варіантом слід скористатися, якщо цілісність даних буде перевірено в інший +спосіб. +.TP +\fBcrc32\fP +Обчислити CRC32 за допомогою полінома з IEEE\-802.3 (Ethernet). +.TP +\fBcrc64\fP +Обчислити CRC64 за допомогою полінома з ECMA\-182. Це типовий варіант, +оскільки він дещо кращий за CRC32 при виявленні пошкоджених файлів, а +різниця у швидкості є незрачною. +.TP +\fBsha256\fP +Обчислити SHA\-256. Цей варіант дещо повільніший за CRC32 і CRC64. +.RE +.IP "" +Цілісність заголовків \fB.xz\fP завжди перевіряють за допомогою CRC32. Таку +перевірку не можна змінити або скасувати. +.TP +\fB\-\-ignore\-check\fP +Не перевіряти цілісність стиснених даних при розпаковуванні. Значення CRC32 +у заголовках \fB.xz\fP буде у звичайний спосіб перевірено попри цей параметр. +.IP "" +\fBНе користуйтеся цим параметром, якщо ви не усвідомлюєте наслідків ваших дій.\fP Можливі причини скористатися цим параметром: +.RS +.IP \(bu 3 +Спроба отримання даних з пошкодженого файла .xz. +.IP \(bu 3 +Пришвидшення розпакування. Це, здебільшого, стосується SHA\-256 або файлів із +надзвичайно високим рівнем пакування. Не рекомендуємо користуватися цим +параметром з цією метою, якщо цілісність файлів не буде перевірено у якийсь +інший спосіб. +.RE +.TP +\fB\-0\fP ... \fB\-9\fP +Вибрати рівень стискання. Типовим є \fB\-6\fP. Якщо буде вказано декілька рівнів +стискання, програма використає останній вказаний. Якщо вже було вказано +нетиповий ланцюжок фільтрів, встановлення рівня стискання призведе до +нехтування цим нетиповим ланцюжком фільтрів. +.IP "" +Різниця між рівнями є суттєвішою, ніж у \fBgzip\fP(1) і \fBbzip2\fP(1). Вибрані +параметри стискання визначають вимоги до пам'яті під час розпаковування, +отже використання надто високого рівня стискання може призвести до проблем +під час розпаковування файла на застарілих комп'ютерах із невеликим обсягом +оперативної пам'яті. Зокрема, \fBне варто використовувати \-9 для усього\fP, як +це часто буває для \fBgzip\fP(1) і \fBbzip2\fP(1). +.RS +.TP +\fB\-0\fP ... \fB\-3\fP +Це дещо швидші набори налаштувань. \fB\-0\fP іноді є швидшим за \fBgzip \-9\fP, +забезпечуючи набагато більший коефіцієнт стискання. Вищі рівні часто мають +швидкість, яку можна порівняти з \fBbzip2\fP(1) із подібним або кращим +коефіцієнтом стискання, хоча результати значно залежать від типу даних, які +стискають. +.TP +\fB\-4\fP ... \fB\-6\fP +Стискання від доброго до дуже доброго рівня із одночасним підтриманням +помірного рівня споживання пам'яті засобом розпаковування, навіть для +застарілих системи. Типовим є значення \fB\-6\fP, яке є добрим варіантом для +поширення файлів, які мають бути придатними до розпаковування навіть у +системах із лише 16\ МіБ оперативної пам'яті. (Також можна розглянути +варіанти \fB\-5e\fP і \fB\-6e\fP. Див. \fB\-\-extreme\fP.) +.TP +\fB\-7 ... \-9\fP +Ці варіанти подібні до \fB\-6\fP, але із вищими вимогами щодо пам'яті для +стискання і розпаковування. Можуть бути корисними лише для стискання файлів +з розміром, що перевищує 8\ МіБ, 16\ МіБ та 32\ МіБ, відповідно. +.RE +.IP "" +На однаковому обладнанні швидкість розпакування є приблизно сталою кількістю +байтів стиснених даних за секунду. Іншими словами, чим кращим є стискання, +тим швидшим буде, зазвичай, розпаковування. Це також означає, що об'єм +розпакованих виведених даних, які видає програма за секунду, може коливатися +у широкому діапазоні. +.IP "" +У наведеній нижче таблиці підсумовано можливості шаблонів: +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Шаблон;DictSize;CompCPU;CompMem;DecMem +\-0;256 КіБ;0;3 МіБ;1 МіБ +\-1;1 МіБ;1;9 МіБ;2 МіБ +\-2;2 МіБ;2;17 МіБ;3 МіБ +\-3;4 МіБ;3;32 МіБ;5 МіБ +\-4;4 МіБ;4;48 МіБ;5 МіБ +\-5;8 МіБ;5;94 МіБ;9 МіБ +\-6;8 МіБ;6;94 МіБ;9 МіБ +\-7;16 МіБ;6;186 МіБ;17 МіБ +\-8;32 МіБ;6;370 МіБ;33 МіБ +\-9;64 МіБ;6;674 МіБ;65 МіБ +.TE +.RE +.RE +.IP "" +Описи стовпчиків: +.RS +.IP \(bu 3 +DictSize є розміром словника LZMA2. Використання словника, розмір якого +перевищує розмір нестисненого файла, — проста витрата пам'яті. Ось чому не +варто використовувати шаблони \fB\-7\fP ... \fB\-9\fP, якщо у них немає реальної +потреби. Для \fB\-6\fP та нижчих рівнів об'єм витраченої пам'яті, зазвичай, +такий низький, що цей фактор ні на що не впливає. +.IP \(bu 3 +CompCPU є спрощеним представленням параметрів LZMA2, які впливають на +швидкість стискання. Розмір словника також впливає на швидкість, тому, хоча +значення CompCPU є однаковим для рівнів \fB\-6\fP ... \fB\-9\fP, обробка на вищих +рівнях все одно є трошки повільнішою. Що отримати повільніше і, ймовірно, +краще стискання, див. \fB\-\-extreme\fP. +.IP \(bu 3 +CompMem містить вимоги до пам'яті засобу стискання у однопотоковому +режимі. Значення можуть бути дещо різними для різних версій \fBxz\fP. +.IP \(bu 3 +У DecMem містяться вимоги до пам'яті при розпаковуванні. Тобто параметри +засобу стискання визначають вимоги до пам'яті при розпаковуванні. Точний +об'єм пам'яті, яка потрібна для розпаковування, дещо перевищує розмір +словника LZMA2, але значення у таблиці було округлено до наступного цілого +значення МіБ. +.RE +.IP "" +Вимоги до пам'яті у багатопотоковому режимі є значно вищими, ніж у +однопотоковому. З типовим значенням \fB\-\-block\-size\fP для кожного потоку треба +3*3*DictSize плюс CompMem або DecMem. Наприклад, для чотирьох потоків з +шаблоном \fB\-6\fP потрібно 660\(en670\ МіБ пам'яті. +.TP +\fB\-e\fP, \fB\-\-extreme\fP +Використати повільніший варіант вибраного рівня стискання (\fB\-0\fP ... \fB\-9\fP) +у сподіванні отримати трохи кращий коефіцієнт стискання, але, якщо не +поталанить, можна його і погіршити. Не впливає на використання пам'яті при +розпаковуванні, але використання пам'яті при стисканні дещо збільшиться на +рівнях \fB\-0\fP ... \fB\-3\fP. +.IP "" +Оскільки існує два набори налаштувань із розмірами словників 4\ МіБ та 8\ МіБ, у наборах \fB\-3e\fP і \fB\-5e\fP використано трошки швидші параметри (нижче +CompCPU), ніж у наборах \fB\-4e\fP і \fB\-6e\fP, відповідно. Тому двох однакових +наборів у списку немає. +.RS +.RS +.PP +.TS +tab(;); +c c c c c +n n n n n. +Шаблон;DictSize;CompCPU;CompMem;DecMem +\-0e;256 КіБ;8;4 МіБ;1 МіБ +\-1e;1 МіБ;8;13 МіБ;2 МіБ +\-2e;2 МіБ;8;25 МіБ;3 МіБ +\-3e;4 МіБ;7;48 МіБ;5 МіБ +\-4e;4 МіБ;8;48 МіБ;5 МіБ +\-5e;8 МіБ;7;94 МіБ;9 МіБ +\-6e;8 МіБ;8;94 МіБ;9 МіБ +\-7e;16 МіБ;8;186 МіБ;17 МіБ +\-8e;32 МіБ;8;370 МіБ;33 МіБ +\-9e;64 МіБ;8;674 МіБ;65 МіБ +.TE +.RE +.RE +.IP "" +Наприклад, передбачено загалом чотири набори налаштувань із використанням +словника у 8\ МіБ, порядок яких від найшвидшого до найповільнішого є таким: +\fB\-5\fP, \fB\-6\fP, \fB\-5e\fP і \fB\-6e\fP. +.TP +\fB\-\-fast\fP +.PD 0 +.TP +\fB\-\-best\fP +.PD +Це дещо оманливі альтернативні варіанти для \fB\-0\fP і \fB\-9\fP, +відповідно. Реалізовано лише для забезпечення зворотної сумісності із LZMA +Utils. Намагайтеся не користуватися цими варіантами параметрів. +.TP +\fB\-\-block\-size=\fP\fIрозмір\fP +При стисканні до формату \fB.xz\fP поділити вхідні дані на блоки у \fIрозмір\fP +байтів. Ці блоки буде стиснуто незалежно один від одного, що допоможе у +багатопотоковій обробці і зробить можливим обмежене розпакування для доступу +до будь\-яких даних. Цим параметром слід типово користуватися для +перевизначення типового розміру блоку у багатопотоковому режимі обробки, але +цим параметром можна також скористатися в однопотоковому режимі обробки. +.IP "" +У багатопотоковому режимі для кожного потоку буде отримано для буферів +вхідних і вихідних даних майже утричі більше за \fIрозмір\fP байтів. Типовий +\fIрозмір\fP утричі більший за розмір словника LZMA2 або дорівнює 1 МіБ, буде +вибрано більше значення. Типовим добрим значенням буде значення, яке у +2\(en4 рази перевищує розмір словника LZMA2 або дорівнює принаймні 1 +МіБ. Використання значення \fIрозмір\fP, яке є меншим за розмір словника LZMA2, +має наслідком марну витрату оперативної пам'яті, оскільки його використання +призводить до того, що буфер словника LZMA2 ніколи не буде використано +повністю. У багатопотоковому режимі розміри блоків зберігатимуться у +заголовках блоків. Ці дані потрібні для багатопотокового розпаковування. +.IP "" +У однопотоковому режимі поділ на блоки типово не +виконуватиметься. Встановлення значення для цього параметра не впливатиме на +використання пам'яті. У заголовках блоків не зберігатимуться дані щодо +розміру, отже файли, які створено в однопотоковому режимі не будуть +ідентичними до файлів, які створено у багатопотоковому режимі. Те, що у +заголовках блоків не зберігатимуться дані щодо розміру також означає, що +\fBxz\fP не зможе розпаковувати такі файли у багатопотоковому режимі. +.TP +\fB\-\-block\-list=\fP\fIзаписи\fP +При стисканні у форматі \fB.xz\fP починати новий блок із необов'язковим +ланцюжком фільтрів після вказаної кількості інтервалів нестиснених даних. +.IP "" +\fIзаписи\fP є списком відокремлених комами значень. Кожен запис складається з +необов'язкового номера ланцюжка фільтрів від 0 до 9, після якого йде +двокрапка (\fB:\fP) і необхідний розмір нестиснутих даних. Пропущення запису +(дві або більше послідовних ком) є скороченим варіантом визначення +використання розміру та фільтрів попереднього запису. +.IP "" +Якщо файл вхідних даних є більшим за розміром за суму розмірів \fIзаписів\fP, +останнє значення у \fIрозмірах\fP буде повторено до кінця файла. Особливе +значення \fB0\fP може бути використано як останній розмір, щоб позначити, що +решту файла має бути закодовано як єдиний блок. +.IP "" +Альтернативний ланцюжок фільтрів для кожного блоку можна вказати в поєднанні +з параметрами \fB\-\-filters1=\fP\fIфільтри\fP \&...\& \fB\-\-filters9=\fP\fIфільтри\fP. Ці +параметри визначають ланцюжки фільтрів з ідентифікатором у діапазоні +1\(en9. Ланцюжок фільтрів 0 можна використовувати для посилання на типовий +ланцюжок фільтрів — це те саме, що не вказувати ланцюжок +фільтрів. Ідентифікатор ланцюжка фільтрів можна використовувати перед +нестисненим розміром, після якого йде двокрапка (\fB:\fP). Наприклад, якщо +вказати \fB\-\-block\-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB\fP, блоки будуть +створені так: +.RS +.IP \(bu 3 +Ланцюжок фільтрів задано \fB\-\-filters1\fP із вхідними даними у 2 МіБ +.IP \(bu 3 +Ланцюжок фільтрів задано \fB\-\-filters3\fP із вхідними даними у 2 МіБ +.IP \(bu 3 +Ланцюжок фільтрів задано \fB\-\-filters2\fP із вхідними даними у 4 МіБ +.IP \(bu 3 +Ланцюжок фільтрів задано \fB\-\-filters2\fP із вхідними даними у 4 МіБ +.IP \(bu 3 +Типовий ланцюжок даних і вхідні дані у 2 МіБ +.IP \(bu 3 +Типовий ланцюжок фільтрів та вхідні дані у 4 МіБ для кожного блоку до кінця +вхідних даних. +.RE +.IP "" +Якщо вказати розмір, який перевищує розмір блоку кодувальника (або типове +значення у режимі із потоками обробки, або значення, яке встановлено за +допомогою \fB\-\-block\-size=\fP\fIрозмір\fP), засіб кодування створить додаткові +блоки, зберігаючи межі, які вказано у \fIзаписах\fP. Наприклад, якщо вказати +\fB\-\-block\-size=10MiB\fP \fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP, а файл +вхідних даних має розмір 80 МіБ, буде отримано такі 11 блоків: 5, 10, 8, 10, +2, 10, 10, 4, 10, 10 і 1 МіБ. +.IP "" +У багатопотоковому режимі розмір блоків буде збережено у заголовках +блоків. Програма не зберігатиме ці дані у однопотоковому режимі, отже +закодований результат не буде ідентичним до отриманого у багатопотоковому +режимі. +.TP +\fB\-\-flush\-timeout=\fP\fIчас_очікування\fP +При стискання, якщо з моменту попереднього витирання мине понад +\fIчас_очікування\fP мілісекунд (додатне ціле значення) і читання додаткових +даних буде заблоковано, усі вхідні дані у черзі обробки буде витерто з +кодувальника і зроблено доступним у потоці вихідних даних. Це може бути +корисним, якщо \fBxz\fP використовують для стискання даних, які передають +потоком мережею. Невеликі значення аргументу \fIчас_очікування\fP зроблять дані +доступними на боці отримання із малою затримкою, а великі значення аргумент +\fIчас_очікування\fP уможливлять кращий коефіцієнт стискання. +.IP "" +Типово, цю можливість вимкнено. Якщо цей параметр вказано декілька разів, +буде використано лише останнє вказане значення. Особливим значенням +аргументу \fIчас_очікування\fP, рівним \fB0\fP, можна скористатися для вимикання +цієї можливості явним чином. +.IP "" +Ця можливість недоступна у системах, які не є системами POSIX. +.IP "" +.\" FIXME +\fBЦя можливість усе ще є експериментальною.\fP У поточній версії, \fBxz\fP не +може розпаковувати потік даних у режимі реального часу через те, у який +спосіб \fBxz\fP виконує буферизацію. +.TP +\fB\-\-no\-sync\fP +Не синхронізувати файл призначення та його каталог із пристроєм зберігання +даних до вилучення початкового файла. Це може підвищити швидкодію, якщо +виконується стискання або розпаковування багатьох малих файлів. Втім, якщо +система аварійно завершує роботу невдовзі після вилучення, можлива ситуація, +коли файл призначення не буде записано на пристрій зберігання даних, а дію з +вилучення буде записано. У цьому випадку буде знищено дані як початкового +файла, так і файла призначення. +.IP "" +Цей параметр матиме хоч який вплив, лише якщо \fBxz\fP вилучає початковий +файл. В інших випадках синхронізація не виконується. +.IP "" +Синхронізацію і \fB\-\-no\-sync\fP було додано у версії \fBxz\fP 5.7.1alpha. +.TP +\fB\-\-memlimit\-compress=\fP\fIобмеження\fP +Встановити обмеження на використання пам'яті при стисканні. Якщо цей +параметр вказано декілька разів, враховано буде лише останнє вказане +значення. +.IP "" +Якщо параметри стискання перевищують \fIобмеження\fP, \fBxz\fP спробує скоригувати +параметри так, щоб обмеження не було перевищено, і покаже повідомлення про +те, що було виконано автоматичне коригування. Коригування буде виконано у +такому порядку: зменшення кількості потоків обробки, перемикання у +однопотоковий режим, якщо хоч в одному потоці багатопотокового режиму буде +перевищено \fIобмеження\fP, і нарешті, зменшення розміру словника LZMA2. +.IP "" +При стисканні з використанням \fB\-\-format=raw\fP, або якщо було вказано +\fB\-\-no\-adjust\fP, може бути зменшена лише кількість потоків обробки, оскільки +це може бути зроблено без впливу на стиснені виведені дані. +.IP "" +Якщо \fIобмеження\fP не може бути виконано за допомогою коригувань, які описано +вище, буде показано повідомлення про помилку, а \fBxz\fP завершить роботу зі +станом виходу 1. +.IP "" +Аргумент \fIобмеження\fP можна вказати у декілька способів: +.RS +.IP \(bu 3 +Значенням \fIобмеження\fP може бути додатне ціле значення у байтах. Можна +скористатися цілочисельним суфіксом, подібним до \fBMiB\fP. Приклад: +\fB\-\-memlimit\-compress=80MiB\fP +.IP \(bu 3 +Аргумент \fIобмеження\fP може бути задано у відсотках від загальної фізичної +пам'яті системи (RAM). Це може бути корисним особливо при встановленні +змінної середовища \fBXZ_DEFAULTS\fP у скрипті ініціалізації системи, який є +спільним для різних комп'ютерів. У такий спосіб можна вказати вищий рівень +обмеження для систем із більшим об'ємом пам'яті. Приклад: +\fB\-\-memlimit\-compress=70%\fP +.IP \(bu 3 +Аргументу \fIобмеження\fP може бути повернуто типове значення встановленням +значення \fB0\fP. У поточній версії це еквівалентно до встановлення значення +аргументу \fIобмеження\fP \fBmax\fP (без обмеження на використання пам'яті). +.RE +.IP "" +Для 32\-бітової версії \fBxz\fP передбачено особливий випадок: якщо \fIобмеження\fP +перевищуватиме \fB4020\ МіБ\fP, для \fIобмеження\fP буде встановлено значення +\fB4020\ MiB\fP. На MIPS32 замість цього буде використано \fB2000\ MiB\fP. (Це не +стосується значень \fB0\fP і \fBmax\fP. Подібної можливості для розпаковування не +існує.) Це може бути корисним, коли 32\-бітовий виконуваний файл має доступ +до простору адрес у 4\ ГіБ (2 GiB на MIPS32), хоча, сподіваємося, не +зашкодить і в інших випадках. +.IP "" +Див. також розділ \fBВикористання пам'яті\fP. +.TP +\fB\-\-memlimit\-decompress=\fP\fIобмеження\fP +Встановити обмеження пам'яті на розпаковування. це також вплине на режим +\fB\-\-list\fP. Якщо дія є неможливою без перевищення \fIобмеження\fP, \fBxz\fP покаже +повідомлення про помилку і розпаковування файла не +відбудеться. Див. \fB\-\-memlimit\-compress=\fP\fIобмеження\fP, щоб дізнатися більше +про те, як можна задати \fIобмеження\fP. +.TP +\fB\-\-memlimit\-mt\-decompress=\fP\fIобмеження\fP +Встановити обмеження використання пам'яті для багатопотокового +розпаковування. Це може вплинути лише на кількість потоків обробки; це +ніколи не призводитиме до відмови \fBxz\fP у розпаковуванні файла. Якщо +\fIобмеження є надто низьким\fP, щоб уможливити будь\-яку багатопотокову +обробку, \fIобмеження\fP буде проігноровано, і \fBxz\fP продовжить обробку в +однопотоковому режимі. Зауважте, що якщо використано також +\fB\-\-memlimit\-decompress\fP, цей параметр буде застосовано до обох режимів, +однопотокового та багатопотокового, а отже, задіяне \fIобмеження\fP для +багатопотокового режиму ніколи не перевищуватиме обмеження, яке встановлено +за допомогою \fB\-\-memlimit\-decompress\fP. +.IP "" +На відміну від інших параметрів обмеження використання пам'яті, +\fB\-\-memlimit\-mt\-decompress=\fP\fIобмеження\fP містить специфічне для системи +типове значення \fIобмеження\fP. Можна скористатися \fBxz \-\-info\-memory\fP для +перегляду поточного значення. +.IP "" +Цей параметр і його типове значення існують, оскільки без будь\-яких обмежень +засіб розпакування зі підтримкою потокової обробки міг би намагатися +отримати величезний об'єм пам'яті для деяких файлів вхідних даних. Якщо +типове \fIобмеження\fP є надто низьким для вашої системи, не вагайтеся і +збільшуйте \fIобмеження\fP, але ніколи не встановлюйте для нього значення, яке +є більшим за придатний до користування об'єм оперативної пам'яті, оскільки +за відповідних файлів вхідних даних \fBxz\fP спробує скористатися цим об'ємом +пам'яті, навіть із низькою кількістю потоків обробки. Вичерпання об'єму +оперативної пам'яті або використання резервної пам'яті на диску не покращить +швидкодію системи під час розпаковування. +.IP "" +Див. \fB\-\-memlimit\-compress=\fP\fIобмеження\fP, щоб ознайомитися із можливими +способами визначення \fIобмеження\fP. Встановлення для \fIобмеження\fP значення +\fB0\fP відновлює типове специфічне для системи значення \fIобмеження\fP. +.TP +\fB\-M\fP \fIобмеження\fP, \fB\-\-memlimit=\fP\fIобмеження\fP, \fB\-\-memory=\fP\fIобмеження\fP +Є еквівалентом визначення \fB\-\-memlimit\-compress=\fP\fIобмеження\fP +\fB\-\-memlimit\-decompress=\fP\fIобмеження\fP +\fB\-\-memlimit\-mt\-decompress=\fP\fIобмеження\fP. +.TP +\fB\-\-no\-adjust\fP +Показати повідомлення про помилку і завершити роботу, якщо не вдасться +виконати умови щодо обмеження використання пам'яті без коригування +параметрів, які впливають на стиснених виведених даних. Тобто це забороняє +\fBxz\fP перемикати кодувальник з багатопотокового режиму на однопотоковий +режим і зменшувати розмір словника LZMA2. Навіть якщо використано цей +параметр, кількість потоків може бути зменшено для виконання обмеження на +використання пам'яті, оскільки це не вплине на результати стискання. +.IP "" +Автоматичне коригування завжди буде вимкнено при створенні потоків +необроблених даних (\fB\-\-format=raw\fP). +.TP +\fB\-T\fP \fIпотоки\fP, \fB\-\-threads=\fP\fIпотоки\fP +Вказати кількість потоків обробки, якими слід скористатися. Встановлення для +аргументу \fIпотоки\fP особливого значення \fB0\fP наказує \fBxz\fP використати не +більше потоків обробки, ніж передбачено підтримку у процесорах +системи. Справжня кількість потоків може бути меншою за значення \fIпотоки\fP, +якщо файл вхідних даних не є достатньо великим для поділу на потоки обробки +при заданих параметрах або якщо використання додаткових потоків призведе до +перевищення обмеження на використання пам'яті. +.IP "" +Засоби стискання в однопотоковому та багатопотоковому режимі дають різні +результати. Однопотоковий засіб стискання дасть найменший розмір файла, але +лише результати роботи багатопотокового засобу стискання може бути +розпаковано з використанням декількох потоків. Встановлення для аргументу +\fIпотоки\fP значення \fB1\fP призведе до використання однопотокового +режиму. Встановлення для аргументу \fIпотоки\fP будь\-якого іншого значення, +включно з \fB0\fP, призведе до використання багатопотокового засобу стискання, +навіть якщо у системі передбачено підтримки лише одного апаратного потоку +обробки даних. (Версія \fBxz\fP 5.2.x у цьому випадку використовувала +однопотоковий режим.) +.IP "" +Щоб скористатися багатопотоковим режимом із лише одним потоком обробки, +встановіть для аргументу \fIпотоки\fP значення \fB+1\fP. Префікс \fB+\fP не впливає +на значення, окрім \fB1\fP. Обмеження на використання пам'яті можуть перемкнути +\fBxz\fP в однопотоковий режим, якщо не використано параметр +\fB\-\-no\-adjust\fP. Підтримку \fB+\fP prefix було додано у версії \fBxz\fP 5.4.0. +.IP "" +Якщо було вказано автоматичне визначення кількості потоків і не вказано +обмеження на використання пам'яті, буде використано специфічне для системи +типове м'яке обмеження для можливого обмеження кількості потоків обробки. Це +обмеження є м'яким у сенсі того, що його буде проігноровано, якщо кількість +потоків зрівняється з одиницею, а отже, м'яке обмеження ніколи не +запобігатиму у \fBxz\fP стисканню або розпаковуванню. Це типове м'яке обмеження +не перемкне \fBxz\fP з багатопотокового режиму на однопотоковий режим. Активні +обмеження можна переглянути за допомогою команди \fBxz \-\-info\-memory\fP. +.IP "" +У поточній версії єдиним способом поділу на потоки обробки є поділ вхідних +даних на блоки і стискання цих блоків незалежно один від одного. Типовий +розмір блоку залежить від рівня стискання. Його може бути перевизначено за +допомогою параметра \fB\-\-block\-size=\fP\fIрозмір\fP. +.IP "" +Розпакування з потоками обробки працює лише для файлів, які містять декілька +блоків із даними щодо розміру у заголовках блоків. Цю умову задовольняють +усі достатньо великі файли, які стиснено у багатопотоковому режимі, але не +задовольняють будь\-які файли, які було стиснуто у однопотоковому режимі, +навіть якщо було використано параметр \fB\-\-block\-size=\fP\fIрозмір\fP. +.IP "" +Типовим значенням для \fIпотоків\fP є \fB0\fP. У \fBxz\fP 5.4.x та старіших версіях +типовим значенням є \fB1\fP. +. +.SS "Нетипові ланцюжки фільтрів засобу стискання" +Нетиповий ланцюжок фільтрування уможливлює докладне визначення параметрів +стискання замість використання параметрів, які пов'язано із наперед +визначеними рівнями стискання. Якщо вказано нетиповий ланцюжок фільтрів, +параметри рівнів стискання (\fB\-0\fP \&...\& \fB\-9\fP і \fB\-\-extreme\fP), які +передують їм у рядку команди, буде знехтувано. Якщо параметр рівня стискання +вказано після одного або декількох параметрів нетипового ланцюжка фільтрів, +буде використано рівень стискання, а попередніми параметрами ланцюжка +фільтрування буде знехтувано. +.PP +Ланцюжок фільтрів можна порівняти із конвеєром у командному рядку. При +стисканні нестиснені вхідні дані потрапляють до першого фільтра, виведені +ним дані йдуть до наступного фільтра (якщо такий є). Виведені останнім +фільтром дані буде записано до стисненого файла. Максимальна кількість +фільтрів у ланцюжку дорівнює чотирьом, але у типовому ланцюжку фільтрів +використовують один або два фільтри. +.PP +У багатьох фільтрів є обмеження на місце перебування у ланцюжку фільтрів: +деякі фільтри можуть працювати, лише якщо вони є останніми у ланцюжку, +деякі, лише якщо не останніми, а деякі працюють у будь\-якій позиції +ланцюжка. Залежно від фільтра, це обмеження є наслідком структури фільтра +або існує для запобігання проблем із захистом. +.PP +Нетиповий ланцюжок фільтрів можна вказати двома різними способами. Параметри +\fB\-\-filters=\fP\fIфільтри\fP і \fB\-\-filters1=\fP\fIфільтри\fP \&...\& +\fB\-\-filters9=\fP\fIфільтри\fP надають змогу вказати цілий ланцюжок фільтрів в +одному варіанті з використанням синтаксису рядків фільтрів liblzma. Крім +того, ланцюжок фільтрів можна вказати за допомогою одного або кількох +окремих параметрів фільтрування у тому порядку, в якому їх слід використати +у ланцюжку фільтрів. Тобто порядок окремих параметрів фільтра є важливим! +Під час декодування необроблених потоків (\fB\-\-format=raw\fP) ланцюжок фільтрів +має бути вказано у тому ж порядку, що й під час стиснення. Будь\-який окремий +фільтр або параметри попереднього налаштування, вказані перед параметром +повного ланцюжка (\fB\-\-filters=\fP\fIфільтри\fP), буде відкинуто. Окремі фільтри, +указані після параметра повного ланцюжка, відновлять типовий ланцюжок +фільтрів. +.PP +І параметр повного і параметр окремого фільтра приймають специфічні для +фільтрів \fIпараметри\fP у форматі списку значень, які відокремлено +комами. Зайві коми у \fIпараметрах\fP буде проігноровано. У кожного параметра є +типове значення, отже, вам слід вказати ті параметри, значення яких ви +хочете змінити. +.PP +Щоб переглянути увесь ланцюжок фільтрів та \fIпараметри\fP, скористайтеся +командою \fBxz \-vv\fP (тобто, скористайтеся \fB\-\-verbose\fP двічі). Це працює +також для перегляду параметрів ланцюжка фільтрів, який використано у рівнях +стискання. +.TP +\fB\-\-filters=\fP\fIфільтри\fP +Визначає повний ланцюжок фільтрів або шаблон у форматі одного +параметра. Кожен фільтр можна відокремити від інших пробілами або двома +дефісами (\fB\-\-\fP). Можливо, \fIфільтри\fP доведеться взяти в лапки в командному +рядку оболонки, щоб їх було оброблено як один параметр. Для позначення +\fIпараметрів\fP скористайтеся \fB:\fP або \fB=\fP. До шаблона можна додати префікс +\fB\-\fP і завершити без прапорців або декількома прапорцями. Єдиним +підтримуваним прапорцем є \fBe\fP для застосування тих самих параметрів, що й +\fB\-\-extreme\fP. +.TP +\fB\-\-filters1\fP=\fIфільтри\fP ... \fB\-\-filters9\fP=\fIфільтри\fP +Вказати до дев'яти додаткових ланцюжків фільтрів, якими можна скористатися +за допомогою \fB\-\-block\-list\fP. +.IP "" +Наприклад, якщо виконується стискання архіву із виконуваними файлами, за +якими йдуть текстові файли, для виконуваної частини може бути використано +ланцюжок фільтрів з фільтром BCJ, а для текстової частини — лише фільтр +LZMA2. +.TP +\fB\-\-filters\-help\fP +Вивести довідкове повідомлення з описом того, як вказати шаблони та нетипові +ланцюжки фільтрів у параметри \fB\-\-filters\fP і \fB\-\-filters1=\fP\fIфільтри\fP +\&...\& \fB\-\-filters9=\fP\fIфільтри\fP і завершити роботу із кодом успіху. +.TP +\fB\-\-lzma1\fP[\fB=\fP\fIпараметри\fP] +.PD 0 +.TP +\fB\-\-lzma2\fP[\fB=\fP\fIпараметри\fP] +.PD +Додати фільтр LZMA1 або LZMA2 до ланцюжка фільтрів. Ці фільтри може бути +використано лише як останній фільтр у ланцюжку. +.IP "" +LZMA1 є застарілим фільтром, підтримку якого збережено майже лише через +використання формату файлів \fB.lzma\fP, у яких передбачено підтримку лише +LZMA1. LZMA2 є оновленою версією LZMA1, у якій виправлено деякі практичні +вади LZMA1. У форматі \fB.xz\fP використано LZMA2 і взагалі не передбачено +підтримки LZMA1. Швидкість стискання та коефіцієнт стискання для LZMA1 і +LZMA2 є практично однаковими. +.IP "" +LZMA1 і LZMA2 спільно використовують той самий набір \fIпараметрів\fP: +.RS +.TP +.\" TRANSLATORS: Don't translate bold strings like B, B, +.\" B, B, B, or B because those are command line +.\" options. On the other hand, do translate the italic strings like +.\" I, I, and I, because such italic strings are +.\" placeholders which a user replaces with an actual value. +\fBpreset=\fP\fIшаблон\fP +Скинути усі \fIпараметри\fP LZMA1 або LZMA2 до параметрів \fIшаблона\fP. Аргумент +\fIшаблон\fP складається з цілого числа, після якого може бути однолітерний +модифікатор шаблона. Ціле число може належати лише діапазону від \fB0\fP до +\fB9\fP, що відповідає параметрам командного рядка \fB\-0\fP \&...\& \fB\-9\fP. Єдиним +підтримуваним модифікатором у поточній версії є \fBe\fP, щоб відповідає +параметру \fB\-\-extreme\fP. Якщо аргумент \fBшаблон\fP не вказано, типові значення +\fIпараметрів\fP LZMA1 або LZMA2 буде взято із шаблона \fB6\fP. +.TP +\fBdict=\fP\fIрозмір\fP +Параметр \fIрозміру\fP словника (буфера журналу) визначає, скільки байтів +нещодавно оброблених нестиснених даних слід зберігати у пам'яті. Алгоритм +намагається знайти повторювані послідовності байтів (відповідники) у +нестиснених даних і замінити їх на посилання на дані зі словника. Чим +більшим є словник, тим вищою є ймовірність відшукати відповідник. Отже, +збільшення \fIрозміру\fP словника, зазвичай, покращує коефіцієнт стискання, але +використання словника, розмір якого перевищу є розмір нестисненого файла є +простоюю витратою пам'яті. +.IP "" +\fIРозмір\fP типового словника складає від 64\ КіБ до 64\ МіБ. Мінімальним є +розмір 4\ КіБ. Максимальним розміром для стискання у поточній версії 1.5\ ГіБ (1536\ МіБ). У засобі розпаковування вже передбачено підтримку словників +на один байт менших за 4\ ГіБ, що є максимальним значенням для форматів +потоків даних LZMA1 і LZMA2. +.IP "" +Аргумент \fIрозміру\fP словника і засіб пошуку відповідників (\fImf\fP) разом +визначають параметри використання пам'яті для кодувальника LZMA1 або +LZMA2. Для розпаковування потрібен такий самий (або більший) \fIрозмір\fP +словника, що і для стискання, отже, використання пам'яті для засобу +розпаковування буде визначено за розміром словника, який було використано +для стискання. У заголовках \fB.xz\fP зберігається \fIрозмір\fP словника або як +2^\fIn\fP, або як 2^\fIn\fP + 2^(\fIn\fP\-1), отже, ці \fIрозміри\fP є дещо пріоритетними +для стискання. Інші \fIрозміри\fP буде отримано округленням при зберіганні у +заголовках \fB.xz\fP. +.TP +\fBlc=\fP\fIlc\fP +Визначає кількість буквальних контекстних бітів. Мінімальною кількістю є 0, +а максимальною — 4. Типовою кількістю є 3. Крім того, сума \fIlc\fP і \fIlp\fP має +не перевищувати 4. +.IP "" +Усі байти, які не може бути закодовано як відповідності, буде закодовано як +літерали. Тобто літерали є просто 8\-бітовими байтами, які буде закодовано по +одному за раз. +.IP "" +При кодуванні літералів роблять припущення, що найвищі біти \fIlc\fP +попереднього нестисненого байта корелюють із наступним байтом. Наприклад, у +типовому тексті англійською за літерою у верхньому регістрі йде літера у +нижньому регістрі, а за літерою у нижньому регістрі, зазвичай, йде інша +літера у нижньому регістрі. У наборі символів US\-ASCII найвищими трьома +бітами є 010 для літер верхнього регістру і 011 для літер нижнього +регістру. Якщо \fIlc\fP дорівнює принаймні 3, при кодуванні літералів можна +отримати перевагу встановлення цієї властивості для нестиснених даних. +.IP "" +Зазвичай, типового значення (3) достатньо. Якщо вам потрібне максимальне +стискання, спробуйте \fBlc=4\fP. Іноді це трохи допомагає, а іноді, робить +стискання гіршим. Якщо стискання стане гіршим, спробуйте також \fBlc=2\fP. +.TP +\fBlp=\fP\fIlp\fP +Визначає кількість буквальних позиційних бітів. Мінімальною кількістю є 0, а +максимальною — 4. Типовою кількістю є 0. +.IP "" +\fILp\fP впливає на те, яке вирівнювання у нестиснених даних слід припускати +при кодуванні літералів. Див. \fIpb\fP нижче, щоб дізнатися більше про +вирівнювання. +.TP +\fBpb=\fP\fIpb\fP +Визначає кількість позиційних бітів. Мінімальною кількістю є 0, а +максимальною — 4. Типовою кількістю є 2. +.IP "" +\fIPb\fP впливає на те, який тип вирівнювання загалом припускатиметься для +нестиснених даних. Типовим є чотирибайтове вирівнювання (2^\fIpb\fP=2^2=4), +яке, зазвичай, є добрим варіантом, якщо немає кращих припущень. +.IP "" +Якщо вирівнювання є відомим, встановлення відповідним чином \fIpb\fP може трохи +зменшити розмір файла. Наприклад, у текстових файлах із однобайтовим +вирівнюванням (US\-ASCII, ISO\-8859\-*, UTF\-8), встановлення значення \fBpb=0\fP +може трохи поліпшити стискання. Для тексту UTF\-16 добрим варіантом є +\fBpb=1\fP. Якщо вирівнювання є непарним числом, наприклад 3 байти, найкращим +вибором, ймовірно, є \fBpb=0\fP. +.IP "" +Хоча прогнозоване вирівнювання можна скоригувати за допомогою \fIpb\fP і \fIlp\fP, +у LZMA1 і LZMA2 дещо пріоритетним є 16\-байтове вирівнювання. Це, ймовірно, +слід враховувати при компонуванні форматів файлів, які, ймовірно, часто +будуть стискатися з використанням LZMA1 або LZMA2. +.TP +\fBmf=\fP\fImf\fP +Засіб пошуку відповідників має значний вплив на швидкість, використання +пам'яті та коефіцієнт стискання кодувальника. Зазвичай, засоби пошуку +відповідників на основі ланцюжка хешів є швидшими за засоби пошуку +відповідників на основі двійкового дерева. Типовий засіб залежить від +\fIшаблона\fP: для 0 використовують \fBhc3\fP, для 1\(en3 — \fBhc4\fP, а для решти +використовують \fBbt4\fP. +.IP "" +Передбачено підтримку вказаних нижче засобів пошуку відповідників. Наведені +нижче формули обчислення використання пам'яті є грубими наближеннями, які є +найближчими до реальних значень, якщо значенням \fIсловник\fP є степінь двійки. +.RS +.TP +\fBhc3\fP +Ланцюжок хешів із 2\- та 3\-байтовим хешуванням +.br +Мінімальне значення \fIпріоритетності\fP: 3 +.br +Використання пам'яті: +.br +\fIdict\fP * 7.5 (якщо \fIdict\fP <= 16 МіБ); +.br +\fIdict\fP * 5.5 + 64 МіБ (якщо \fIdict\fP > 16 МіБ) +.TP +\fBhc4\fP +Ланцюжок хешів із 2\-, 3\- та 4\-байтовим хешуванням +.br +Мінімальне значення \fIпріоритетності\fP: 4 +.br +Використання пам'яті: +.br +\fIdict\fP * 7.5 (якщо \fIdict\fP <= 32 МіБ); +.br +\fIdict\fP * 6.5 (якщо \fIdict\fP > 32 МіБ) +.TP +\fBbt2\fP +Двійкове дерево із 2\-байтовим хешуванням +.br +Мінімальне значення \fIпріоритетності\fP: 2 +.br +Використання пам'яті: \fIdict\fP * 9.5 +.TP +\fBbt3\fP +Двійкове дерево із 2\- і 3\-байтовим хешуванням +.br +Мінімальне значення \fIпріоритетності\fP: 3 +.br +Використання пам'яті: +.br +\fIdict\fP * 11.5 (якщо \fIdict\fP <= 16 МіБ); +.br +\fIdict\fP * 9.5 + 64 МіБ (якщо \fIdict\fP > 16 МіБ) +.TP +\fBbt4\fP +Двійкове дерево із 2\-, 3\- і 4\-байтовим хешуванням +.br +Мінімальне значення \fIпріоритетності\fP: 4 +.br +Використання пам'яті: +.br +\fIdict\fP * 11.5 (якщо \fIdict\fP <= 32 МіБ); +.br +\fIdict\fP * 10.5 (якщо \fIdict\fP > 32 МіБ) +.RE +.TP +\fBmode=\fP\fIрежим\fP +Параметр \fIрежиму\fP стискання визначає спосіб, який буде використано для +аналізу даних, які створено засобом пошуку відповідників. Підтримуваними +\fIрежимами\fP є \fBfast\fP (швидкий) і \fBnormal\fP (нормальний). Типовим є режим +\fBfast\fP для \fIшаблонів\fP 0\(en3 і режим \fBnormal\fP для \fIшаблонів\fP 4\(en9. +.IP "" +Зазвичай, із засобом пошуку відповідників на основі ланцюжка хешів +використовують \fBfast\fP, а із засобом пошуку відповідників на основі +двійкового дерева використовують \fBnormal\fP. Так само налаштовано і +\fIшаблони\fP. +.TP +\fBnice=\fP\fIпріоритетність\fP +Вказати, яка довжина є пріоритетною для відповідності. Щойно буде виявлено +відповідність у принаймні \fIпріоритетність\fP байтів, алгоритм зупинятиме +пошук можливих кращих відповідників. +.IP "" +\fIПріоритетністю\fP може бути число до 2\(en273 байтів. Вищі значення дають +кращий коефіцієнт стискання за рахунок швидкості. Типове значення залежить +від \fIшаблона\fP. +.TP +\fBdepth=\fP\fIглибина\fP +Вказати максимальну глибину пошуку у засобі пошуку відповідності. Типовим є +особливе значення 0, яке наказує засобу стискання визначити прийнятну +\fIглибину\fP на основі \fImf\fP і \fIпріоритетності\fP. +.IP "" +Прийнятним значенням \fIглибини\fP для ланцюжків хешів є 4\(en100 і 16\(en1000 +для двійкових дерев. Використання дуже високих значень для \fIглибини\fP може +зробити кодувальник дуже повільним для деяких файлів. Не встановлюйте +значення \fIглибини\fP, що перевищує 1000, якщо ви не готові перервати +стискання, якщо воно триватиме надто довго. +.RE +.IP "" +При декодуванні необроблених потоків даних (\fB\-\-format=raw\fP), LZMA2 потребує +лише \fIрозміру\fP словника. LZMA1 потребує також \fIlc\fP, \fIlp\fP і \fIpb\fP. +.TP +\fB\-\-x86\fP[\fB=\fP\fIпараметри\fP] +.PD 0 +.TP +\fB\-\-arm\fP[\fB=\fP\fIпараметри\fP] +.TP +\fB\-\-armthumb\fP[\fB=\fP\fIпараметри\fP] +.TP +\fB\-\-arm64\fP[\fB=\fP\fIпараметри\fP] +.TP +\fB\-\-powerpc\fP[\fB=\fP\fIпараметри\fP] +.TP +\fB\-\-ia64\fP[\fB=\fP\fIпараметри\fP] +.TP +\fB\-\-sparc\fP[\fB=\fP\fIпараметри\fP] +.TP +\fB\-\-riscv\fP[\fB=\fP\fIпараметри\fP] +.PD +Додати фільтр гілок/викликів/переходів (branch/call/jump або BCJ) до +ланцюжка фільтрів. Цими фільтрами можна скористатися, лише якщо вони не є +останнім фільтром у ланцюжку фільтрів. +.IP "" +Фільтр BCJ перетворює відносні адреси у машинному коді на їхні абсолютні +відповідники. Це не змінює розміру даних, але підвищує резервування, що може +допомогти LZMA2 створити файл \fB.xz\fP на 0\(en15\ % менше. Фільтри BCJ завжди +є придатними до обернення, тому використання фільтра BCJ до помилкового типу +даних не спричинятиме втрати даних, хоча може дещо погіршити коефіцієнт +стискання. Фільтри BCJ є дуже швидкими і такими, що використовують незначний +об'єм пам'яті. +.IP "" +Ці фільтри BCJ мають відомі проблеми, які пов'язано із рівнем стискання: +.RS +.IP \(bu 3 +У деяких типах файлів, де зберігається виконуваний код, (наприклад, в +об'єктних файлах, статичних бібліотеках та модулях ядра Linux) адреси в +інструкціях заповнено значеннями заповнювача. Ці фільтри BCJ виконуватимуть +перетворення адрес, яке зробить стискання для цих файлів гіршим. +.IP \(bu 3 +Якщо фільтр BCJ застосовано до архіву, може так статися, що він погіршить +коефіцієнт стискання порівняно із варіантом без фільтра BCJ. Наприклад, якщо +є подібні або навіть однакові виконувані файли, фільтрування, ймовірно, +зробить ці файли менш подібними, а отже, зробить стискання гіршим. Вміст +файлів, які не є виконуваними, у тому самому архіві також може вплинути на +результат. На практиці, варто спробувати варіанти з фільтром BCJ і без +нього, щоб визначитися із тим, що буде кращим у кожній ситуації. +.RE +.IP "" +Різні набори інструкцій мають різне вирівнювання: виконуваний файл має бути +вирівняно на кратне до цього значення у вхідних даних, щоб фільтр спрацював. +.RS +.RS +.PP +.TS +tab(;); +l n l +l n l. +Фільтр;Вирівнювання;Нотатки +x86;1;32\-бітова або 64\-бітова x86 +ARM;4; +ARM\-Thumb;2; +ARM64;4;Найкращим є вирівнювання за +;;4096 байтами +PowerPC;4;Лише зворотний порядок байтів +IA\-64;16;Itanium +SPARC;4; +RISC\-V;2; +.TE +.RE +.RE +.IP "" +Оскільки фільтровані BCJ дані, зазвичай, стискають за допомогою LZMA2, +коефіцієнт стискання можна трохи поліпшити, якщо параметри LZMA2 буде +встановлено так, щоб вони відповідали вирівнюванню вибраного фільтра +BCJ. Приклади: +.RS +.IP \(bu 3 +Фільтр IA\-64 має 16\-байтове вирівнювання, отже \fBpb=4,lp=4,lc=0\fP дасть добрі +результати у поєднанні із LZMA2 (2^4=16). +.IP \(bu 3 +Код RISC\-V має 2\-байтове або 4\-байтове вирівнювання залежно від того, чи +містить файл 16\-бітові стислі інструкції (розширення C). Якщо використано +16\-бітові інструкції, добрі результати дасть \fBpb=2,lp=1,lc=3\fP або +\fBpb=1,lp=1,lc=3\fP. Якщо 16\-бітових інструкцій немає, найкращим варіантом є +\fBpb=2,lp=2,lc=2\fP. Можна скористатися \fBreadelf \-h\fP, щоб перевірити, чи є +"RVC" у рядку "Flags". +.IP \(bu 3 +ARM64 завжди вирівняно на 4 байти, тому найкращим варіантом буде +\fBpb=2,lp=2,lc=2\fP. +.IP \(bu 3 +Фільтр x86 є виключенням. Зазвичай, добрі результати дають типові для LZMA2 +значення (\fBpb=2,lp=0,lc=3\fP), якщо стискають виконувані файли x86. +.RE +.IP "" +У всіх фільтрах BCJ передбачено підтримку тих самих \fIпараметрів\fP: +.RS +.TP +\fBstart=\fP\fIзсув\fP +Встановити початковий \fIзсув\fP, який буде використано при перетворенні між +відносною та абсолютною адресами. Значення \fIзсув\fP має бути кратним до +вирівнювання фільтра (див. таблицю вище). Типовим зсувом є нульовий. На +практиці, типове значення є прийнятним; визначення нетипового значення +\fIзсув\fP майже завжди нічого корисного не дає. +.RE +.TP +\fB\-\-delta\fP[\fB=\fP\fIпараметри\fP] +Додати дельта\-фільтр до ланцюжка фільтрів. Дельта\-фільтр може бути +використано, лише якщо він не є останнім у ланцюжку фільтрів. +.IP "" +У поточній версії передбачено підтримку обчислення лише простої побітової +дельти. Це може бути корисним при стисканні, наприклад, нестиснутих +растрових зображень або нестиснутих звукових даних PCM. Втім, спеціалізовані +алгоритми можуть давати значно кращі результати за дельту + LZMA2. Це +правило особливо стосується звукових даних, які стискає швидше і краще, +наприклад, \fBflac\fP(1). +.IP "" +Підтримувані \fIпараметри\fP: +.RS +.TP +\fBdist=\fP\fIвідстань\fP +Вказати \fIвідстань\fP обчислень різниці у байтах. Значення \fIвідстань\fP має +потрапляти у діапазон 1\(en256. Типовим значенням є 1. +.IP "" +Наприклад, з \fBdist=2\fP та восьмибайтовими вхідними даними A1 B1 A2 B3 A3 B5 +A4 B7, результатом буде A1 B1 01 02 01 02 01 02. +.RE +. +.SS "Інші параметри" +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Придушити попередження та сповіщення. Вкажіть цей параметр двічі, щоб +придушити також повідомлення про помилки. Цей параметр не впливає на стан +виходу з програми. Тобто, навіть якщо було придушено попередження, стан +виходу вказуватиме на те, що попередження були. +.TP +\fB\-v\fP, \fB\-\-verbose\fP +Докладний режим повідомлень. Якщо стандартне виведення помилок з'єднано із +терміналом, \fBxz\fP показуватиме індикатор поступу. Використання \fB\-\-verbose\fP +двічі призведе до ще докладнішого виведення. +.IP "" +Індикатор поступу показує такі дані: +.RS +.IP \(bu 3 +Частку завершеності буде показано, якщо відомий розмір файла вхідних +даних. Тобто, для каналів даних частку не може бути показано. +.IP \(bu 3 +Об'єм стиснених виведених даних (стискання) або оброблених (розпаковування). +.IP \(bu 3 +Об'єм незапакованих даних (стискання) або виведених даних (розпаковування). +.IP \(bu 3 +Коефіцієнт стискання, який обчислено діленням об'єму оброблених стиснутих +даних на об'єм оброблених нестиснутих даних. +.IP \(bu 3 +Швидкість стискання або розпаковування. Обчислюється як об'єм нестиснутих +даних (стискання) або виведених даних (розпаковування) за секунду. Його буде +показано за декілька секунд з моменту, коли \fBxz\fP почала обробляти файл. +.IP \(bu 3 +Витрачений час у форматі Х:СС або Г:ХХ:СС. +.IP \(bu 3 +Оцінку часу, що лишився, буде показано, лише якщо розмір файла вхідних даних +є відомим, і минуло принаймні декілька секунд з моменту, коли \fBxz\fP почала +обробляти файл. Час буде показано у менш точному форматі, без двокрапок, +наприклад, 2 хв. 30 с. +.RE +.IP "" +Якщо стандартним виведенням помилок не є термінал, \fB\-\-verbose\fP призведе до +того, що \fBxz\fP виведе назву файла, стиснений розмір, нестиснений розмір, +коефіцієнт стискання та, можливо, також швидкість та витрачений час у одному +рядку до стандартного виведення помилок після стискання або розпаковування +файла. Швидкість та витрачений час буде включено, лише якщо дія триває +принаймні декілька секунд. Якщо дію не буде завершено, наприклад, через +втручання користувача, буде також виведено частку виконання, якщо відомий +розмір файла вхідних даних. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Не встановлювати стан виходу 2, навіть якщо було виявлено відповідність +умові, яка варта попередження. Цей параметр не впливає на рівень докладності +повідомлень, отже, слід використати \fB\-\-quiet\fP і \fB\-\-no\-warn\fP, щоб програма +не показувала попереджень і не змінювала стан виходу. +.TP +\fB\-\-robot\fP +Виводити повідомлення у придатному для обробки комп'ютером форматі. Цей +формат призначено для полегшення написання оболонок, які використовуватимуть +\fBxz\fP замість liblzma, що може бути зручним для різноманітних +скриптів. Виведені дані з цим параметром має бути стабільним для усіх +випусків \fBxz\fP. Докладніший опис можна знайти у розділі \fBРЕЖИМ РОБОТА\fP. +.TP +\fB\-\-info\-memory\fP +Вивести у придатному для читання людиною форматі, скільки фізичної пам'яті +(RAM) та скільки потоків процесора є за даними \fBxz\fP у системі, обмеження +для стискання та розпаковування, а потім успішно завершити роботу. +.TP +\fB\-h\fP, \fB\-\-help\fP +Вивести повідомлення про помилку з описом найбільш типових використаних +параметрів і успішно завершити роботу. +.TP +\fB\-H\fP, \fB\-\-long\-help\fP +Вивести довідкове повідомлення з описом усіх можливостей \fBxz\fP і успішно +завершити роботу +.TP +\fB\-V\fP, \fB\-\-version\fP +Вивести номер версії \fBxz\fP та liblzma у зручному для читання форматі. Щоб +отримати дані, зручні для обробки на комп'ютері, вкажіть \fB\-\-robot\fP до +\fB\-\-version\fP. +. +.SH "РЕЖИМ РОБОТА" +Режим робота активують за допомогою параметра \fB\-\-robot\fP. Він спрощує +обробку виведених \fBxz\fP даних іншими програмами. У поточній версії підтримку +\fB\-\-robot\fP передбачено лише разом із \fB\-\-list\fP, \fB\-\-filters\-help\fP, +\fB\-\-info\-memory\fP і \fB\-\-version\fP. У майбутньому підтримку параметра буде +передбачено для стискання та розпаковування. +. +.SS "Режим списку" +У \fBxz \-\-robot \-\-list\fP використано табуляції для поділу виведених +даних. Першим стовпчиком у кожному рядку є рядок, що вказує на тип +відомостей, які можна знайти у цьому рядку: +.TP +.\" TRANSLATORS: The bold strings B, B, B, B, +.\" B, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +\fBname\fP +Це завжди перший рядок на початку списку файла. Другим стовпчиком у рядку є +назва файла. +.TP +\fBfile\fP +У цьому рядку містяться загальні відомості щодо файла \fB.xz\fP. Цей рядок +завжди виводять після рядка \fBname\fP. +.TP +\fBstream\fP +Цей тип рядка використовують, лише якщо було вказано \fB\-\-verbose\fP. Буде +стільки рядків \fBstream\fP, скільки потоків у файлі \fB.xz\fP. +.TP +\fBblock\fP +Цей тип рядка використовують, лише якщо було вказано \fB\-\-verbose\fP. Буде +стільки рядків \fBblock\fP, скільки блоків у файлі \fB.xz\fP. Рядки \fBblock\fP буде +показано після усіх рядків \fBstream\fP; різні типи рядків не перемежовуються. +.TP +\fBsummary\fP +Цей тип рядків використовують, лише якщо \fB\-\-verbose\fP було вказано +двічі. Цей рядок буде виведено після усіх рядків \fBblock\fP. Подібно до рядка +\fBfile\fP, рядок \fBsummary\fP містить загальні відомості щодо файла \fB.xz\fP. +.TP +\fBtotals\fP +Цей рядок завжди є найостаннішим рядком у виведеному списку. У ньому буде +показано загальні кількості та розміри. +.PP +Стовпчики у рядках \fBфайла\fP: +.PD 0 +.RS +.IP 2. 4 +Кількість потоків у файлі +.IP 3. 4 +Загальна кількість блоків у потоках +.IP 4. 4 +Розмір стисненого файла +.IP 5. 4 +Розмір нестисненого файла +.IP 6. 4 +Коефіцієнт стискання, наприклад, \fB0.123\fP. Якщо коефіцієнт перевищує 9.999, +замість коефіцієнта буде показано дефіси (\fB\-\-\-\fP). +.IP 7. 4 +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +Список відокремлених комами назв перевірок цілісності. Наведені нижче рядки +використовують для відомих типів перевірок: \fBNone\fP, \fBCRC32\fP, \fBCRC64\fP і +\fBSHA\-256\fP. Для невідомих типів перевірок буде використано \fBUnknown\-\fP\fIN\fP, +де \fIN\fP є ідентифікатором перевірки у форматі десяткового числа (одна або +дві цифри). +.IP 8. 4 +Загальний розмір доповнення потоку у файлі +.RE +.PD +.PP +Стовпчики у рядках \fBstream\fP: +.PD 0 +.RS +.IP 2. 4 +Номер потоку (перший потік має номер 1) +.IP 3. 4 +Кількість блоків у потоці +.IP 4. 4 +Зсув початку стисненого +.IP 5. 4 +Зсув початку нестисненого +.IP 6. 4 +Стиснений розмір (не включає доповнення потоку) +.IP 7. 4 +Нестиснутий розмір +.IP 8. 4 +Рівень стискання +.IP 9. 4 +Назва перевірки цілісності +.IP 10. 4 +Розмір доповнення потоку +.RE +.PD +.PP +Стовпчики у рядках \fBblock\fP: +.PD 0 +.RS +.IP 2. 4 +Номер потоку, що містить цей блок +.IP 3. 4 +Номер блоку відносно початку потоку (перший блок має номер 1) +.IP 4. 4 +Номер блоку відносно початку файла +.IP 5. 4 +Зсув початку стисненого відносно початку файла +.IP 6. 4 +Зсув початку нестисненого відносно початку файла +.IP 7. 4 +Загальний стиснений розмір блоку (включено з заголовками) +.IP 8. 4 +Нестиснутий розмір +.IP 9. 4 +Рівень стискання +.IP 10. 4 +Назва перевірки цілісності +.RE +.PD +.PP +Якщо \fB\-\-verbose\fP було вказано двічі, до рядків \fBblock\fP буде включено +додаткові стовпчики. Ці стовпчики не буде показано, якщо вказано одинарний +параметр \fB\-\-verbose\fP, оскільки отримання цих відомостей потребує багатьох +позиціювань, а ця процедура може бути повільною: +.PD 0 +.RS +.IP 11. 4 +Значення перевірки цілісності у шістнадцятковій формі +.IP 12. 4 +Розмір заголовка блоку +.IP 13. 4 +Прапорці блоку: \fBc\fP вказує, що наявний стиснений розмір, а \fBu\fP вказує, що +наявний нестиснений розмір. Якщо прапорець не встановлено, буде показано +(\fB\-\fP) замість підтримання фіксованого розміру рядка. У майбутньому +наприкінці рядка може бути додано нові прапорці. +.IP 14. 4 +Розмір справжніх стиснених даних у блоці (це включає заголовок блоку, +доповнення блоку та поля перевірок) +.IP 15. 4 +Об'єм пам'яті (у байтах), який потрібен для розпаковування цього блоку за +допомогою цієї версії \fBxz\fP +.IP 16. 4 +Ланцюжок фільтрів. Зауважте, що більшість параметрів, які використано під +час стискання, не є наперед відомим, оскільки у заголовках \fB.xz\fP +зберігаються лише параметри, які потрібні для розпаковування. +.RE +.PD +.PP +Стовпчики у рядках \fBsummary\fP: +.PD 0 +.RS +.IP 2. 4 +Об'єм пам'яті (у байтах), який потрібен для розпаковування цього файла за +допомогою цієї версії \fBxz\fP +.IP 3. 4 +\fByes\fP або \fBno\fP вказує, якщо усі заголовки блоків містять одразу стиснений +розмір та розпакований розмір +.PP +\fIПочинаючи з\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 4. 4 +Мінімальна версія \fBxz\fP, яка потрібна для розпаковування файла +.RE +.PD +.PP +Стовпчики рядка \fBtotals\fP: +.PD 0 +.RS +.IP 2. 4 +Кількість потоків +.IP 3. 4 +Кількість блоків +.IP 4. 4 +Стиснутий розмір +.IP 5. 4 +Нестиснутий розмір +.IP 6. 4 +Середній коефіцієнт стискання +.IP 7. 4 +Список відокремлених комами назв перевірок цілісності, результати яких +наявні у файлах +.IP 8. 4 +Розмір доповнення потоку +.IP 9. 4 +Кількість файлів. Наявний тут для зберігання такого самого порядку +стовпчиків, що і у попередніх рядках \fBfile\fP. +.PD +.RE +.PP +Якщо \fB\-\-verbose\fP було вказано двічі, до рядка \fBtotals\fP буде включено +додаткові стовпчики: +.PD 0 +.RS +.IP 10. 4 +Максимальний об'єм пам'яті (у байтах), який потрібен для розпаковування +файлів за допомогою цієї версії \fBxz\fP +.IP 11. 4 +\fByes\fP або \fBno\fP вказує, якщо усі заголовки блоків містять одразу стиснений +розмір та розпакований розмір +.PP +\fIПочинаючи з\fP \fBxz\fP \fI5.1.2alpha:\fP +.IP 12. 4 +Мінімальна версія \fBxz\fP, яка потрібна для розпаковування файла +.RE +.PD +.PP +У майбутніх версіях може бути додано нові типи рядків і нові стовпчики до +наявних типів рядків, але наявні стовпчики мають лишитися незмінними. +. +.SS "Довідка з фільтрування" +\fBxz \-\-robot \-\-filters\-help\fP виведе список підтримуваних фільтрів у такому +форматі: +.PP +\fIфільтр\fP\fB:\fP\fIпараметр\fP\fB=<\fP\fIзначення\fP\fB>,\fP\fIпараметр\fP\fB=<\fP\fIзначення\fP\fB>\fP... +.TP +\fIфільтр\fP +Назва фільтра +.TP +\fIпараметр\fP +Назва специфічного для фільтра параметра +.TP +\fIзначення\fP +Числові діапазони \fIvalue\fP слід вказати у форматі +\fB<\fP\fIмінімум\fP\fB\-\fP\fIмаксимум\fP\fB>\fP. Варіанти рядка \fIзначення\fP +показано у \fB< >\fP і відокремлено символом \fB|\fP. +.PP +Кожен фільтр буде виведено до окремого рядка. +. +.SS "Дані щодо обмеження пам'яті" +\fBxz \-\-robot \-\-info\-memory\fP виводить один рядок з декількома відокремленими +табуляціями стовпчиками: +.IP 1. 4 +Загальний об'єм фізичної пам'яті (RAM) у байтах. +.IP 2. 4 +Обмеження на використання пам'яті для стискання у байтах +(\fB\-\-memlimit\-compress\fP). Особливе значення \fB0\fP вказує на типові +налаштування, якими для однопотокового режиму є налаштування без обмеження +на використання пам'яті. +.IP 3. 4 +Обмеження на використання пам'яті для розпакування у байтах +(\fB\-\-memlimit\-decompress\fP). Особливе значення \fB0\fP вказує на типові +налаштування, якими для однопотокового режиму є налаштування без обмеження +на використання пам'яті. +.IP 4. 4 +Починаючи з \fBxz\fP 5.3.4alpha: використання пам'яті для багатопотокового +розпаковування у байтах (\fB\-\-memlimit\-mt\-decompress\fP). Ніколи не дорівнює +нулеві, оскільки буде використано специфічне для системи типове значення, +яке показано у стовпчику 5, якщо обмеження не встановлено явним чином. Також +ніколи не перевищуватиме значення у стовпчику 3, навіть якщо було вказано +більше значення за допомогою \fB\-\-memlimit\-mt\-decompress\fP. +.IP 5. 4 +Починаючи з \fBxz\fP 5.3.4alpha: специфічне для системи типове обмеження на +використання пам'яті, яке використовують для обмеження кількості потоків при +стисканні з автоматичною кількістю потоків (\fB\-\-threads=0\fP) і без визначення +обмеження на використання пам'яті (\fB\-\-memlimit\-compress\fP). Це значення +також використовують як типове значення для \fB\-\-memlimit\-mt\-decompress\fP. +.IP 6. 4 +Починаючи з \fBxz\fP 5.3.4alpha: кількість доступних потоків обробки процесора. +.PP +У майбутньому у виведенні \fBxz \-\-robot \-\-info\-memory\fP може бути більше +стовпчиків, але у виведеному буде не більше за один рядок. +. +.SS Версія +\fBxz \-\-robot \-\-version\fP виведе назву версії \fBxz\fP і liblzma у такому +форматі: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +\fBXZ_VERSION=\fP\fIXYYYZZZS\fP +.br +\fBLIBLZMA_VERSION=\fP\fIXYYYZZZS\fP +.TP +\fIX\fP +Основна версія. +.TP +\fIYYY\fP +Проміжна версія. Непарні номери буде використано для стабільних +версій. Непарні номери є номерами тестових версій. +.TP +\fIZZZ\fP +Рівень латання для стабільних випусків або просто лічильник для випусків, +які перебувають у розробці. +.TP +\fIS\fP +Стабільність. 0 — alpha, 1 — beta, а 2 означає «стабільна версія». \fIS\fP має +завжди дорівнювати 2, якщо \fIYYY\fP є парним. +.PP +\fIXYYYZZZS\fP є тим самим в обох рядках, якщо \fBxz\fP і liblzma належать до +одного випуску XZ Utils. +.PP +Приклади: 4.999.9beta — це \fB49990091\fP, а 5.0.0 — це \fB50000002\fP. +. +.SH "СТАН ВИХОДУ" +.TP +\fB0\fP +Усе добре. +.TP +\fB1\fP +Сталася помилка. +.TP +\fB2\fP +Сталося щось варте попередження, але справжніх помилок не сталося. +.PP +Зауваження (не попередження або помилки), які виведено до стандартного +виведення помилок, не впливають на стан виходу. +. +.SH СЕРЕДОВИЩЕ +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +\fBxz\fP обробляє списки відокремлених пробілами параметрів зі змінних +середовища \fBXZ_DEFAULTS\fP і \fBXZ_OPT\fP, перш ніж обробляти параметри з рядка +команди. Зауважте, що буде оброблено лише параметри зі змінних середовища; +усі непараметричні записи буде без повідомлень проігноровано. Обробку буде +виконано за допомогою функції \fBgetopt_long\fP(3), яку також використовують +для аргументів рядка команди. +.PP +\fBПопередження:\fP Встановлюючи ці змінні середовища, ви насправді змінюєте +програми та скрипти, які виконують \fBxz\fP. У більшості випадків без проблем +можна встановлювати обмеження на використання пам'яті, кількість потоків і +параметри стиснення за допомогою змінних середовища. Однак деякі параметри +можуть порушити роботу скриптів. Очевидним прикладом є \fB\-\-help\fP, який +змушує \fBxz\fP показувати текст довідки замість стискання або розпаковування +файла. Менш очевидними є приклади \fB\-\-quiet\fP і \fB\-\-verbose\fP. У багатьох +випадках усе працюватиме добре, якщо увімкнути індикатор поступу за +допомогою \fB\-\-verbose\fP, але у деяких ситуаціях додаткові повідомлення +створюють проблеми. Рівень докладності також впливає на поведінку \fB\-\-list\fP. +.TP +\fBXZ_DEFAULTS\fP +Специфічні для користувача або загальносистемні типові параметри. Зазвичай, +їх встановлюють у скрипті ініціалізації оболонки для типового вмикання +обмеження на використання пам'яті у \fBxz\fP або встановлення типової кількості +потоків обробки. Окрім скриптів ініціалізації оболонки і подібних особливих +випадків, не слід встановлювати або скасовувати встановлення значення +\fBXZ_DEFAULTS\fP у скриптах. +.TP +\fBXZ_OPT\fP +Цю змінну призначено для передавання параметрів до \fBxz\fP, якщо неможливо +встановити параметри безпосередньо у рядку команди \fBxz\fP. Це трапляється, +якщо \fBxz\fP запущено скриптом або інструментом, наприклад, GNU \fBtar\fP(1): +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=\-2v tar caf foo.tar.xz foo\fR +.fi +.RE +.RE +.IP "" +Скрипти можуть використовувати \fBXZ_OPT\fP, наприклад, для встановлення +специфічних типових параметрів стискання. Втім, рекомендуємо дозволити +користувачам перевизначати \fBXZ_OPT\fP, якщо це має якісь причини. Наприклад, +у скриптах \fBsh\fP(1) можна скористатися чимось таким: +.RS +.RS +.PP +.nf +\f(CRXZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT\fR +.fi +.RE +.RE +. +.SH "СУМІСНІСТЬ ІЗ LZMA UTILS" +Синтаксис рядка команди \fBxz\fP практично є надбудовою щодо \fBlzma\fP, \fBunlzma\fP +і \fBlzcat\fP з LZMA Utils 4.32.x. У більшості випадків можна замінити LZMA +Utils XZ Utils без порушення працездатності наявних скриптів. Втім, існують +певні несумісності, які іноді можуть спричиняти проблеми. +. +.SS "Рівні шаблонів стискання" +Нумерація у шаблонах рівнів стискання у \fBxz\fP не є тотожною до нумерації у +LZMA Utils. Найважливішою відмінністю є прив'язка розмірів словника до +різних шаблонів. Розмір словника грубо рівний використанню пам'яті у засобі +розпаковування. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Рівень;xz;LZMA Utils +\-0;256 КіБ;н/д +\-1;1 МіБ;64 КіБ +\-2;2 МіБ;1 МіБ +\-3;4 МіБ;512 КіБ +\-4;4 МіБ;1 МіБ +\-5;8 МіБ;2 МіБ +\-6;8 МіБ;4 МіБ +\-7;16 МіБ;8 МіБ +\-8;32 МіБ;16 МіБ +\-9;64 МіБ;32 МіБ +.TE +.RE +.PP +Відмінності у розмірах словників також впливають на використання пам'яті +засобом стискання, але є і інші відмінності між LZMA Utils і XZ Utils, які +роблять різницю ще помітнішою: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Рівень;xz;LZMA Utils 4.32.x +\-0;3 МіБ;н/д +\-1;9 МіБ;2 МіБ +\-2;17 МіБ;12 МіБ +\-3;32 МіБ;12 МіБ +\-4;48 МіБ;16 МіБ +\-5;94 МіБ;26 МіБ +\-6;94 МіБ;45 МіБ +\-7;186 МіБ;83 МіБ +\-8;370 МіБ;159 МіБ +\-9;674 МіБ;311 МіБ +.TE +.RE +.PP +Типовим рівнем стискання у LZMA Utils є \fB\-7\fP, а у XZ Utils — \fB\-6\fP, отже, +обидва комплекти програм типово використовують словник розміром у 8 МіБ. +. +.SS "Потокові і непотокові файл .lzma" +Розмір нестисненого файла може бути збережено у заголовку \fB.lzma\fP. LZMA +Utils зберігають дані при стисканні звичайних файлів. Альтернативним +підходом є позначення нестисненого розміру як невідомого і використання +позначки кінця вмісту для позначення місця, де засіб розпаковування має +зупинитися. У LZMA Utils цей спосіб використовують, якщо нестиснений розмір +є невідомим, що трапляється, наприклад, для конвеєрів обробки даних. +.PP +У \fBxz\fP передбачено підтримку розпаковування файлів \fB.lzma\fP з позначкою +кінця вмісту та без неї, але усі файли \fB.lzma\fP, які створено за допомогою +\fBxz\fP, використовують позначку кінця вмісту, а нестиснений розмір у +заголовку \fB.lzma\fP позначають як невідомий. Це може призвести до проблем у +деяких нетипових ситуаціях. Наприклад, розпакувальник \fB.lzma\fP у вбудованому +пристрої може працювати лише з файлами, для яких відомий нестиснений +розмір. Якщо ви зіткнулися з цією проблемою, вам слід скористатися LZMA +Utils або LZMA SDK для створення файлів \fB.lzma\fP із відомим розміром +нестиснених даних. +. +.SS "Непідтримувані файли .lzma" +У форматі \fB.lzma\fP можливі значення \fIlc\fP аж до 8 і значення \fIlp\fP аж до +4. LZMA Utils можуть розпаковувати файли із будь\-якими значеннями \fIlc\fP і +\fIlp\fP, але завжди створюють файли з \fBlc=3\fP і \fBlp=0\fP. Створення файлів з +іншими значеннями \fIlc\fP і \fIlp\fP є можливим за допомогою \fBxz\fP і LZMA SDK. +.PP +Реалізація фільтра LZMA1 у liblzma потребує, щоби сума \fIlc\fP і \fIlp\fP не +перевищувала 4. Отже, файли \fB.lzma\fP, у яких перевищено обмеження, не може +бути розпаковано за допомогою \fBxz\fP. +.PP +LZMA Utils створюють лише файли \fB.lzma\fP, які мають розмір словника у 2^\fIn\fP +(степінь 2), але приймають файли із будь\-яким розміром словника. liblzma +приймає лише файли \fB.lzma\fP, які мають розмір словника 2^\fIn\fP або 2^\fIn\fP + +2^(\fIn\fP\-1). Так зроблено для зменшення помилок при виявленні файлів +\&\fB.lzma\fP. +.PP +Ці обмеження не мають призводити до проблем на практиці, оскільки практично +усі файли \fB.lzma\fP було стиснено з використанням параметрів, які приймає +liblzma. +. +.SS "Кінцевий мотлох" +При розпаковуванні LZMA Utils без повідомлень ігнорують усі дані після +першого потоку \fB.lzma\fP. У більшості випадків це пов'язано із вадою у +програмі. Це також означає, що у LZMA Utils не передбачено підтримки +розпаковування з'єднаних файлів \fB.lzma\fP. +.PP +Якщо після першого потоку \fB.lzma\fP лишилися дані, \fBxz\fP вважатиме файл +пошкодженим, якщо не було використано \fB\-\-single\-stream\fP. Це може зашкодити +роботі скриптів, де зроблено припущення, що кінцеві зайві дані буде +проігноровано. +. +.SH ПРИМІТКИ +. +.SS "Стискання даних може бути різним" +Точні стиснені дані, які створено на основі того самого нестисненого файла +вхідних даних, можуть бути різними для різних версій XZ Utils, навіть якщо +використано однакові параметри стискання. Причиною цього є удосконалення у +кодувальнику (пришвидшення або краще стискання) без зміни формату +файлів. Виведені дані можуть бути різними навіть для різних збірок тієї +самої версії XZ Utils, якщо використано різні параметри збирання. +.PP +Написане вище означає, що після реалізації \fB\-\-rsyncable\fP файли\-результати +не обов'язково можна буде синхронізувати за допомогою rsyncable, якщо старий +і новий файли було стиснено за допомогою тієї самої версії xz. Цю проблему +можна усунути, якщо буде заморожено частину реалізації кодувальника, щоб +введені для rsync дані були стабільними між версіями xz. +. +.SS "Вбудовані розпакувальники .xz" +У вбудованих реалізаціях розпакувальника \fB.xz\fP, подібних до XZ Embedded, не +обов'язково передбачено підтримку файлів, які створено із типами +\fIперевірки\fP цілісності, відмінними від \fBnone\fP і \fBcrc32\fP. Оскільки типовим +є \fB\-\-check=crc64\fP, вам слід використовувати \fB\-\-check=none\fP або +\fB\-\-check=crc32\fP при створенні файлів для вбудованих систем. +.PP +Поза вбудованими системами, в усіх засобах розпаковування формату \fB.xz\fP +передбачено підтримку усіх типів \fIперевірок\fP або принаймні можливість +розпакувати файл без перевірки цілісності, якщо підтримки певної +\fIперевірки\fP не передбачено. +.PP +У XZ Embedded передбачено підтримку BCJ, але лише з типовим початковим +зсувом. +. +.SH ПРИКЛАДИ +. +.SS Основи +Стиснути файл \fIfoo\fP до \fIfoo.xz\fP за допомогою типового рівня стискання +(\fB\-6\fP) і вилучити \fIfoo\fP, якщо стискання відбулося успішно: +.RS +.PP +.nf +\f(CRxz foo\fR +.fi +.RE +.PP +Розпакувати \fIbar.xz\fP до \fIbar\fP і не вилучати \fIbar.xz\fP, навіть якщо +розпаковування відбулося успішно: +.RS +.PP +.nf +\f(CRxz \-dk bar.xz\fR +.fi +.RE +.PP +Створити \fIbaz.tar.xz\fP з використанням шаблона \fB\-4e\fP (\fB\-4 \-\-extreme\fP), +який є повільнішими за типовий \fB\-6\fP, але потребує менше пам'яті для +стискання та розпаковування (48\ МіБ та 5\ МіБ, відповідно): +.RS +.PP +.nf +\f(CRtar cf \- baz | xz \-4e > baz.tar.xz\fR +.fi +.RE +.PP +Суміш стиснених і нестиснених файлів можна розпакувати до стандартного +виведення за допомогою єдиної команди: +.RS +.PP +.nf +\f(CRxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fR +.fi +.RE +. +.SS "Паралельне стискання багатьох файлів" +У GNU і *BSD можна скористатися \fBfind\fP(1) і \fBxargs\fP(1) для паралельного +стискання багатьох файлів: +.RS +.PP +.nf +\f(CRfind . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1\fR +.fi +.RE +.PP +Параметр \fB\-P\fP \fBxargs\fP(1) встановлює кількість паралельних процесів +\fBxz\fP. Найкраще значення параметра \fB\-n\fP залежить від того, скільки файлів +має бути стиснено. Якщо файлів мало, значенням, ймовірно, має бути 1. Якщо +файлів десятки тисяч, може знадобитися значення 100 або навіть більше, щоб +зменшити кількість процесів \fBxz\fP, які врешті створить \fBxargs\fP(1). +.PP +Параметр \fB\-T1\fP для \fBxz\fP тут для примусового встановлення однопотокового +режиму, оскільки для керування рівнем паралелізації використано \fBxargs\fP(1). +. +.SS "Режим робота" +Обчислити скільки байтів було заощаджено загалом після стискання декількох +файлів: +.RS +.PP +.nf +\f(CRxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fR +.fi +.RE +.PP +Скрипту можуть знадобитися дані щодо того, що використано достатньо нову +версію \fBxz\fP. У наведеному нижче скрипті \fBsh\fP(1) виконано перевірку того, +що номер версії засобу \fBxz\fP є принаймні рівним 5.0.0. Цей спосіб є сумісним +зі старими тестовими версіями, де не передбачено підтримки параметра +\fB\-\-robot\fP: +.RS +.PP +.nf +\f(CRif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Your xz is too old." +fi +unset XZ_VERSION LIBLZMA_VERSION\fR +.fi +.RE +.PP +Встановити обмеження на використання пам'яті для розпаковування за допомогою +\fBXZ_OPT\fP, але якщо обмеження вже було встановлено, не збільшувати його: +.RS +.PP +.nf +\f(CRNEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi\fR +.fi +.RE +. +.SS "Нетипові ланцюжки фільтрів засобу стискання" +Найпростішим використанням ланцюжка фільтрів є налаштовування шаблона +LZMA2. Це може бути корисним, оскільки у шаблонах використано лише +підмножину потенційно корисних комбінацій параметрів стискання. +.PP +При налаштовуванні шаблонів LZMA2 корисними є стовпчики CompCPU таблиць з +описів параметрів \fB\-0\fP ... \fB\-9\fP і \fB\-\-extreme\fP. Ось відповідні частини з +цих двох таблиць: +.RS +.PP +.TS +tab(;); +c c +n n. +Шаблон;CompCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +Якщо вам відомо, що певний файл потребує дещо більшого словника (наприклад, +32\ МіБ) для якісного стискання, але ви хочете стиснути його швидше за +команду \fBxz \-8\fP, можна внести зміни до шаблона із нижчим значенням CompCPU +(наприклад, 1) для використання більшого словника: +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fR +.fi +.RE +.PP +Для певних файлів наведена вище команда може працювати швидше за \fBxz \-6\fP і +стискати дані значно краще. Втім, слід наголосити, переваги більшого +словника з одночасним низьким значенням CompCPU проявляються лише для деяких +файлів. Найочевиднішим випадком, коли великий словник є корисним, є випадок, +коли архів містить дуже подібні файли розміром у принаймні декілька +мегабайтів. Розмір словника має бути значно більшим за будь\-який окремий +файл, щоб у LZMA2 було використано усі переваги подібностей між послідовними +файлами. +.PP +Якщо дуже високий рівень використання пам'яті у засобі стискання або +розпаковування не є проблемою, і файли, який стискають має об'єм у принаймні +декілька десятків мегабайтів, може бути корисним використання навіть +більшого за 64 МіБ словника, який використано у \fBxz \-9\fP: +.RS +.PP +.nf +\f(CRxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fR +.fi +.RE +.PP +Використання \fB\-vv\fP (\fB\-\-verbose \-\-verbose\fP), подібно до наведеного вище +прикладу, може бути корисним для перегляду вимог з боку засобів стискання та +розпаковування до пам'яті. Пам'ятайте, що використання словника, розмір +якого перевищує розмір файла, який стискають, є простоюю витратою пам'яті, +отже наведену вище команду не варто використовувати для малих файлів. +.PP +Іноді час стискання не має значення, але використання пам'яті засобом +розпаковування має бути низьким для того, щоб, наприклад, уможливити +розпаковування файла у вбудованій системі. У наведеній нижче команді +використано \fB\-6e\fP (\fB\-6 \-\-extreme\fP) як основу і встановлено розмір словника +лише у 64\ КіБ. Файл\-результат можна розпакувати за допомогою XZ Embedded +(ось чому використано \fB\-\-check=crc32\fP) з використанням лише 100\ КіБ +пам'яті. +.RS +.PP +.nf +\f(CRxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fR +.fi +.RE +.PP +Якщо вам потрібно витиснути зі стискання максимальну кількість байтів, може +допомогти коригування кількості бітів контексту літералів (\fIlc\fP) та +кількість позиційних бітів (\fIpb\fP). Також може допомогти коригування +кількості бітів позиції літералів (\fIlp\fP), але, зазвичай, важливішими є +\fIlc\fP і \fIpb\fP. Наприклад, в архівах зі початковим кодом міститься +здебільшого текст US\-ASCII, щось подібне до наведеного нижче може дещо (на +щось близьке до 0,1\ %) зменшити файл, порівняно із \fBxz \-6e\fP (спробуйте +також без \fBlc=4\fP): +.RS +.PP +.nf +\f(CRxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fR +.fi +.RE +.PP +Використання іншого фільтра разом із LZMA2 може покращити стискання для +певних типів файлів. Наприклад, для стискання бібліотеки спільного +користування x86\-32 або x86\-64 з використанням фільтра BCJ x86 скористайтеся +такою командою: +.RS +.PP +.nf +\f(CRxz \-\-x86 \-\-lzma2 libfoo.so\fR +.fi +.RE +.PP +Зауважте, що порядок параметрів фільтрування має значення. Якщо \fB\-\-x86\fP +вказано після \fB\-\-lzma2\fP, \fBxz\fP повідомить про помилку, оскільки після LZMA2 +не може бути жодного фільтра, а також оскільки фільтр BCJ x86 не можна +використовувати як останній фільтр у ланцюжку. +.PP +Фільтр Delta разом із LZMA2 може дати добрі результати для растрових +зображень. Зазвичай, результати є кращими за формат PNG, у якого є декілька +більш досконалих фільтрів, ніж проста дельта, але там використовують для +стискання Deflate. +.PP +Зображення слід берегти у нестисненому форматі, наприклад, як нестиснений +TIFF. Параметр відстані фільтра Delta встановлюють так, щоб він збігався із +кількістю байтів на піксель у зображенні. Наприклад, для 24\-бітового +растрового зображення RGB слід вказати \fBdist=3\fP, а також добре передати +\fBpb=0\fP до LZMA2 для пристосовування до трибайтового вирівнювання: +.RS +.PP +.nf +\f(CRxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fR +.fi +.RE +.PP +Якщо в один архів запаковано декілька зображень (наприклад, в архів +\&\fB.tar\fP), фільтр Delta також даватиме добрі результати, якщо у всіх +зображеннях однакова кількість байтів для кожного пікселя. +. +.SH "ДИВ. ТАКОЖ" +\fBxzdec\fP(1), \fBxzdiff\fP(1), \fBxzgrep\fP(1), \fBxzless\fP(1), \fBxzmore\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fB7z\fP(1) +.PP +XZ Utils: +.br +Вбудовуваний XZ: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/uk/xzdec.1 b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzdec.1 new file mode 100644 index 0000000000..85a8221594 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzdec.1 @@ -0,0 +1,85 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.\" Ukrainian translation for xz-man. +.\" Yuri Chornoivan , 2019, 2022, 2023, 2024, 2025. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDEC 1 "8 квітня 2024 року" Tukaani "XZ Utils" +.SH НАЗВА +xzdec, lzmadec — невеличкі розпакувальники .xz і .lzma +.SH "КОРОТКИЙ ОПИС" +\fBxzdec\fP [\fIпараметр...\fP] [\fIфайл...\fP] +.br +\fBlzmadec\fP [\fIпараметр...\fP] [\fIфайл...\fP] +.SH ОПИС +\fBxzdec\fP є інструментом на основі liblzma, який призначено лише для +розпаковування файлів \fB.xz\fP (і лише файлів \fB.xz\fP). \fBxzdec\fP призначено для +того, щоб працювати як повноцінний замінник \fBxz\fP(1) у більшості типових +ситуацій, де скрипт було написано для використання \fBxz \-\-decompress \-\-stdout\fP (і, можливо, декількох інших типових параметрів), для +розпаковування файлів \fB.xz\fP. \fBlzmadec\fP є тотожним до \fBxzdec\fP, але у +\fBlzmadec\fP передбачено підтримку файлів \fB.lzma\fP, замість файлів \fB.xz\fP. +.PP +Щоб зменшити розмір виконуваного файла, у \fBxzdec\fP не передбачено підтримки +багатопотокової обробки та локалізації, а також читання параметрів зі +змінних середовища \fBXZ_DEFAULTS\fP і \fBXZ_OPT\fP. У \fBxzdec\fP не передбачено +підтримки показу проміжних даних щодо поступу: надсилання \fBSIGINFO\fP до +\fBxzdec\fP не призводить ні до яких наслідків, але надсилання \fBSIGUSR1\fP +перериває процес, замість показу даних щодо поступу. +.SH ПАРАМЕТРИ +.TP +\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP +Буде проігноровано для сумісності з \fBxz\fP(1). У \fBxzdec\fP передбачено +підтримку лише розпаковування. +.TP +\fB\-k\fP, \fB\-\-keep\fP +Буде проігноровано. Призначено для сумісності з \fBxz\fP(1). \fBxzdec\fP ніколи не +створюватиме і ніколи не вилучатиме ці файли. +.TP +\fB\-c\fP, \fB\-\-stdout\fP, \fB\-\-to\-stdout\fP +Буде проігноровано. Для сумісності з \fBxz\fP(1). \fBxzdec\fP завжди записує +розпаковані дані до стандартного виведення. +.TP +\fB\-q\fP, \fB\-\-quiet\fP +Якщо цей параметр вказано один раз, нічого не станеться, оскільки \fBxzdec\fP +ніколи не показуватиме жодних попереджень або нотаток. Вкажіть параметр +двічі, щоб придушити повідомлення про помилки. +.TP +\fB\-Q\fP, \fB\-\-no\-warn\fP +Буде проігноровано для сумісності із \fBxz\fP(1). \fBxzdec\fP ніколи не +використовує стан виходу 2. +.TP +\fB\-h\fP, \fB\-\-help\fP +Вивести довідкове повідомлення і успішно завершити роботу. +.TP +\fB\-V\fP, \fB\-\-version\fP +Вивести номер версії \fBxzdec\fP та liblzma. +.SH "СТАН ВИХОДУ" +.TP +\fB0\fP +Усе добре. +.TP +\fB1\fP +Сталася помилка. +.PP +\fBxzdec\fP не має жодних повідомлень із попередженнями, на відміну від +\fBxz\fP(1), тому у \fBxzdec\fP стан виходу 2 не використовується. +.SH ПРИМІТКИ +Користуйтеся \fBxz\fP(1), замість \fBxzdec\fP або \fBlzmadec\fP, для щоденних +потреб. \fBxzdec\fP та \fBlzmadec\fP призначено лише для тих ситуацій, коли +важливо мати меншу програму для розпаковування, ніж \fBxz\fP(1). +.PP +\fBxzdec\fP і \fBlzmadec\fP не такі вже і малі програми. Їхній розмір можна +зменшити викиданням можливостей з liblzma під час збирання, але цього +зазвичай не роблять для виконуваних файлів, які поширюються у типових, не +вбудованих, дистрибутивах операційних систем. Якщо вам потрібний дуже мала +програма для розпаковування \fB.xz\fP, варто скористатися XZ Embedded. +.SH "ДИВ. ТАКОЖ" +\fBxz\fP(1) +.PP +Вбудовуваний XZ: diff --git a/cpp/third_party/xz-5.8.3/po4a/man/uk/xzdiff.1 b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzdiff.1 new file mode 100644 index 0000000000..0dd388c06a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzdiff.1 @@ -0,0 +1,56 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Ukrainian translation for xz-man. +.\" Yuri Chornoivan , 2019, 2022, 2023, 2024, 2025. +.\" +.\" (Note that this file is not based on gzip's zdiff.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZDIFF 1 "6 березня 2025 року" Tukaani "XZ Utils" +.SH НАЗВА +xzcmp, xzdiff, lzcmp, lzdiff — порівняння стиснених файлів +. +.SH "КОРОТКИЙ ОПИС" +\fBxzcmp\fP [\fIпараметр...\fP] \fIфайл1\fP [\fIфайл2\fP] +.br +\fBxzdiff\fP \&... +.br +\fBlzcmp\fP \&... (ЗАСТАРІЛО) +.br +\fBlzdiff\fP \&... (ЗАСТАРІЛО) +. +.SH ОПИС +\fBxzcmp\fP і \fBxzdiff\fP порівнюють нестиснені дані двох файлів. Нестиснені дані +та параметри буде передано \fBcmp\fP(1) або \fBdiff\fP(1), якщо не вказано +\fB\-\-help\fP або \fB\-\-version\fP. +.PP +Якщо вказано одразу \fIфайл1\fP і \fIфайл2\fP, це можуть бути нестиснені файли або +файли у форматах, які може бути розпаковано за допомогою \fBxz\fP(1), +\fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) або \fBlz4\fP(1). Потрібні +команди розпаковування визначаються з суфіксів назв файлів \fIфайл1\fP і +\fIфайл2\fP. Файли із невідомими програмі суфіксами вважатимуться або +нестисненими або такими, що мають формат, дані у якому може розпаковувати +\fBxz\fP(1). +.PP +Якщо вказано лише одну назву файла, \fIфайл1\fP повинен мати суфікс +підтримуваного формату стискання, а назвою \fIфайл2\fP має бути назва \fIфайл1\fP +з вилученим суфіксом формату стискання. +.PP +Працездатність команд \fBlzcmp\fP і \fBlzdiff\fP забезпечено для зворотної +сумісності із LZMA Utils. Ці команди вважаються застарілими, їх буде +вилучено у майбутній версії комплекту програм. +. +.SH "СТАН ВИХОДУ" +Якщо станеться помилка розпаковування, станом виходу буде \fB2\fP. Інакше, +станом виходу буде \fBcmp\fP(1) або буде використано \fBdiff\fP(1). +. +.SH "ДИВ. ТАКОЖ" +\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), +\fBzstd\fP(1), \fBlz4\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/uk/xzgrep.1 b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzgrep.1 new file mode 100644 index 0000000000..e88272918d --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzgrep.1 @@ -0,0 +1,96 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Lasse Collin +.\" Jia Tan +.\" +.\" Ukrainian translation for xz-man. +.\" Yuri Chornoivan , 2019, 2022, 2023, 2024, 2025. +.\" +.\" (Note that this file is not based on gzip's zgrep.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZGREP 1 "6 березня 2025 року" Tukaani "XZ Utils" +.SH НАЗВА +xzgrep — пошук взірців у ймовірно стиснених файлах +. +.SH "КОРОТКИЙ ОПИС" +\fBxzgrep\fP [\fIпараметр...\fP] [\fIсписок_взірців\fP] [\fIфайл...\fP] +.br +\fBxzegrep\fP \&... +.br +\fBxzfgrep\fP \&... +.br +\fBlzgrep\fP \&... (ЗАСТАРІЛО) +.br +\fBlzegrep\fP \&... (ЗАСТАРІЛО) +.br +\fBlzfgrep\fP \&... (ЗАСТАРІЛО) +. +.SH ОПИС +\fBxzgrep\fP викликає \fBgrep\fP(1) для розпакованих даних файлів. Формати +\fIфайлів\fP визначатимуться з суфіксів назв файлів. Будь\-який \fIфайл\fP із +суфіксом назви, підтримку якого передбачено у \fBxz\fP(1), \fBgzip\fP(1), +\fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) або \fBlz4\fP(1), буде розпаковано; усі +інші файли вважатимуться нестисненими. +.PP +Якщо не вказано аргументу \fIфайли\fP або замість \fIфайл\fP вказано \fB\-\fP, дані +буде прочитано зі стандартного джерела вхідних даних. При читанні зі +стандартного джерела буде розпаковано лише файли, підтримку яких передбачено +у \fBxz\fP(1). Інші файли вважатимуться такими, що вже перебувають у +нестисненому форматі. +.PP +Передбачено підтримку більшості \fIпараметрів\fP \fBgrep\fP(1). Втім, підтримки +цих параметрів не передбачено: +.IP "" 4 +\fB\-r\fP, \fB\-\-recursive\fP +.IP "" 4 +\fB\-R\fP, \fB\-\-dereference\-recursive\fP +.IP "" 4 +\fB\-d\fP, \fB\-\-directories=\fP\fIдія\fP +.IP "" 4 +\fB\-Z\fP, \fB\-\-null\fP +.IP "" 4 +\fB\-z\fP, \fB\-\-null\-data\fP +.IP "" 4 +\fB\-\-include=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude=\fP\fIglob\fP +.IP "" 4 +\fB\-\-exclude\-from=\fP\fIфайл\fP +.IP "" 4 +\fB\-\-exclude\-dir=\fP\fIglob\fP +.PP +\fBxzegrep\fP є альтернативним записом \fBxzgrep \-E\fP. \fBxzfgrep\fP є +альтернативним записом \fBxzgrep \-F\fP. +.PP +Працездатність команд \fBlzgrep\fP, \fBlzegrep\fP і \fBlzfgrep\fP забезпечено для +зворотної сумісності із LZMA Utils. Ці команди вважаються застарілими, їх +буде вилучено у майбутній версії комплекту програм. +. +.SH "СТАН ВИХОДУ" +.TP +0 +В одному з файлів вхідних даних знайдено принаймні одну +відповідність. Помилок не сталося. +.TP +1 +У жодному з файлів вхідних даних не знайдено відповідника. Не сталося ніяких +помилок. +.TP +>1 +Сталася одна або декілька помилок. Невідомо, чи було знайдено відповідники +критерію пошуку. +. +.SH СЕРЕДОВИЩЕ +.TP +\fBGREP\fP +Якщо для змінної середовища \fBGREP\fP встановлено непорожнє значення, його +буде використано замість \fBgrep\fP(1), \fBgrep \-E\fP або \fBgrep \-F\fP. +. +.SH "ДИВ. ТАКОЖ" +\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1), +\fBlz4\fP(1), \fBzgrep\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/uk/xzless.1 b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzless.1 new file mode 100644 index 0000000000..c3b275d0dc --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzless.1 @@ -0,0 +1,49 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Ukrainian translation for xz-man. +.\" Yuri Chornoivan , 2019, 2022, 2023, 2024, 2025. +.\" +.\" (Note that this file is not based on gzip's zless.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZLESS 1 "6 березня 2025 року" Tukaani "XZ Utils" +.SH НАЗВА +xzless, lzless — перегляд стиснених xz або lzma (текстових) файлів +.SH "КОРОТКИЙ ОПИС" +\fBxzless\fP [\fIфайл\fP...] +.br +\fBlzless\fP [\fIфайл\fP...] (ЗАСТАРІЛО) +.SH ОПИС +\fBxzless\fP є фільтром, який показує текст зі стиснених файлів у +терміналі. Файли, підтримку обробки яких передбачено у \fBxz\fP(1), буде +розпаковано; інші файли вважатимуться нестисненими. Якщо не вказано жодного +\fIфайла\fP, \fBxzless\fP читатиме дані зі стандартного джерела вхідних даних. +.PP +Для показу виведених даних \fBxzless\fP використовує \fBless\fP(1). На відміну від +\fBxzmore\fP, вибір програми для поділу на сторінки не можна змінити за +допомогою змінної середовища. Команди засновано на \fBmore\fP(1) і \fBvi\fP(1). За +допомогою команд можна просуватися назад і вперед даними та шукати дані. Щоб +дізнатися більше, ознайомтеся із підручником з \fBless\fP(1). +.PP +Команду \fBlzless\fP реалізовано для забезпечення зворотної сумісності з LZMA +Utils. Ця команда вважається застарілою, її буде вилучено у майбутній версії +комплекту програм. +.SH СЕРЕДОВИЩЕ +.TP +\fBLESSMETACHARS\fP +Список символів, які є особливими символами командної +оболонки. Встановлюється \fBxzless\fP, якщо його ще не встановлено у +середовищі. +.TP +\fBLESSOPEN\fP +Має значення рядка команди для виклику засобу розпаковування \fBxz\fP(1) для +обробки вхідних файлів \fBless\fP(1). +.SH "ДИВ. ТАКОЖ" +\fBless\fP(1), \fBxz\fP(1), \fBxzmore\fP(1), \fBzless\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/man/uk/xzmore.1 b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzmore.1 new file mode 100644 index 0000000000..bf320be541 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/man/uk/xzmore.1 @@ -0,0 +1,51 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Authors: Andrew Dudman +.\" Lasse Collin +.\" +.\" Ukrainian translation for xz-man. +.\" Yuri Chornoivan , 2019, 2022, 2023, 2024, 2025. +.\" +.\" (Note that this file is based on xzless.1 instead of gzip's zmore.1.) +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH XZMORE 1 "6 березня 2025 року" Tukaani "XZ Utils" +.SH НАЗВА +xzmore, lzmore — перегляд стиснених xz або lzma (текстових) файлів +. +.SH "КОРОТКИЙ ОПИС" +\fBxzmore\fP [\fIфайл\fP...] +.br +\fBlzmore\fP [\fIфайл\fP...] (ЗАСТАРІЛО) +. +.SH ОПИС +\fBxzmore\fP показує текст зі стиснених файлів у терміналі за допомогою +\fBmore\fP(1). Файли, підтримку яких передбачено у \fBxz\fP(1), буде розпаковано; +інші файли вважатимуться вже наданими у розпакованій формі. Якщо не вказано +аргументу \fIфайли\fP, \fBxzmore\fP читатиме дані зі стандартного джерела +даних. Див. підручник з \fBmore\fP(1), щоб дізнатися більше про клавіатурні +команди. +.PP +Зауважте, що гортання у зворотному напрямку може бути неможливим через +реалізацію \fBmore\fP(1). Причиною є те, що \fBxzmore\fP використовує канал для +передавання розпакованих даних \fBmore\fP(1). \fBxzless\fP(1) використовує +\fBless\fP(1), можливості якої є ширшими. +.PP +Команду \fBlzmore\fP реалізовано для забезпечення зворотної сумісності з LZMA +Utils. Ця команда вважається застарілою, її буде вилучено у майбутній версії +комплекту програм. +. +.SH СЕРЕДОВИЩЕ +.TP +.\" TRANSLATORS: Don't translate the uppercase PAGER. +.\" It is a name of an environment variable. +\fBPAGER\fP +Якщо встановлено значення \fBPAGER\fP, значення буде використано для засобу +поділу на сторінки, замість \fBmore\fP(1). +. +.SH "ДИВ. ТАКОЖ" +\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1) diff --git a/cpp/third_party/xz-5.8.3/po4a/po4a.conf b/cpp/third_party/xz-5.8.3/po4a/po4a.conf new file mode 100644 index 0000000000..0f93706a9c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/po4a.conf @@ -0,0 +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] ar de fr it ko pt_BR ro sr sv uk +[po4a_paths] xz-man.pot $lang:$lang.po + +[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 diff --git a/cpp/third_party/xz-5.8.3/po4a/pt_BR.po b/cpp/third_party/xz-5.8.3/po4a/pt_BR.po new file mode 100644 index 0000000000..6091fe67b0 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/pt_BR.po @@ -0,0 +1,4003 @@ +# 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 , 2022-2023. +# +msgid "" +msgstr "" +"Project-Id-Version: xz-man 5.4.0-pre2\n" +"POT-Creation-Date: 2026-03-31 18:27+0300\n" +"PO-Revision-Date: 2023-01-26 13:29-0300\n" +"Last-Translator: Rafael Fontenelle \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\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=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 42.0\n" + +#. type: TH +#: ../src/xz/xz.1 +#, no-wrap +msgid "XZ" +msgstr "XZ" + +#. type: TH +#: ../src/xz/xz.1 +#, no-wrap +msgid "2025-03-08" +msgstr "" + +#. type: TH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "Tukaani" +msgstr "Tukaani" + +#. type: TH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "XZ Utils" +msgstr "XZ Utils" + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "NAME" +msgstr "NOME" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma files" +msgstr "xz, unxz, xzcat, lzma, unlzma, lzcat - Compacta ou descompacta arquivos .xz e .lzma" + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "SYNOPSIS" +msgstr "SINOPSE" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B [I] [I]" +msgstr "B [I] [I]" + +#. type: SH +#: ../src/xz/xz.1 +#, no-wrap +msgid "COMMAND ALIASES" +msgstr "COMANDOS APELIDOS" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B é equivalente a B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B é equivalente a B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B é equivalente a B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B é equivalente a B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B é equivalente a B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When writing scripts that need to decompress files, it is recommended to always use the name B with appropriate arguments (B or B) instead of the names B and B." +msgstr "Ao escrever scripts que precisam descompactar arquivos, é recomendável sempre usar o nome B com os argumentos apropriados (B ou B) em vez dos nomes B e B." + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "DESCRIPTION" +msgstr "DESCRIÇÃO" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is a general-purpose data compression tool with command line syntax similar to B(1) and B(1). The native file format is the B<.xz> format, but the legacy B<.lzma> format used by LZMA Utils and raw compressed streams with no container format headers are also supported. In addition, decompression of the B<.lz> format used by B is supported." +msgstr "B é uma ferramenta de compactação de dados de uso geral com sintaxe de linha de comando semelhante ao B(1) e ao B(1). O formato de arquivo nativo é o formato B<.xz>, mas o formato legado B<.lzma> usado por LZMA Utils e fluxos compactados brutos sem cabeçalhos de formato de contêiner também são suportados. Além disso, a descompactação do formato B<.lz> usado por B é suportada." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B compresses or decompresses each I according to the selected operation mode. If no I are given or I is B<->, B reads from standard input and writes the processed data to standard output. B will refuse (display an error and skip the I) to write compressed data to standard output if it is a terminal. Similarly, B will refuse to read compressed data from standard input if it is a terminal." +msgstr "B compacta ou descompacta cada I de acordo com o modo de operação selecionado. Se nenhum I for fornecido ou I for B<->, B lê da entrada padrão e grava os dados processados na saída padrão. B recusará (exibirá um erro e ignorará o I) para gravar dados compactados na saída padrão se for um terminal. Da mesma forma, B se recusará a ler dados compactados da entrada padrão se for um terminal." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Unless B<--stdout> is specified, I other than B<-> are written to a new file whose name is derived from the source I name:" +msgstr "A menos que B<--stdout> seja especificado, I diferentes de B<-> são gravados em um novo arquivo cujo nome é derivado do nome I de origem:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "\\(bu" +msgstr "\\(bu" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing, the suffix of the target file format (B<.xz> or B<.lzma>) is appended to the source filename to get the target filename." +msgstr "Ao compactar, o sufixo do formato de arquivo de destino (B<.xz> ou B<.lzma>) é anexado ao nome do arquivo de origem para obter o nome do arquivo de destino." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from the filename to get the target filename. B also recognizes the suffixes B<.txz> and B<.tlz>, and replaces them with the B<.tar> suffix." +msgstr "Ao descompactar, o sufixo B<.xz>, B<.lzma> ou B<.lz> é removido do nome do arquivo para obter o nome do arquivo de destino. B também reconhece os sufixos B<.txz> e B<.tlz> e os substitui pelo sufixo B<.tar>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the target file already exists, an error is displayed and the I is skipped." +msgstr "Se o arquivo de destino já existir, um erro será exibido e I será ignorado." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Unless writing to standard output, B will display a warning and skip the I if any of the following applies:" +msgstr "A menos que grave na saída padrão, B exibirá um aviso e pulará o I se qualquer um dos seguintes se aplicar:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I is not a regular file. Symbolic links are not followed, and thus they are not considered to be regular files." +msgstr "I não é um arquivo normal. Links simbólicos não são seguidos e, portanto, não são considerados arquivos comuns." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I has more than one hard link." +msgstr "I tem mais de um link físico." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I has setuid, setgid, or sticky bit set." +msgstr "I tem setuid, setgid ou sticky bit definido." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The operation mode is set to compress and the I already has a suffix of the target file format (B<.xz> or B<.txz> when compressing to the B<.xz> format, and B<.lzma> or B<.tlz> when compressing to the B<.lzma> format)." +msgstr "O modo de operação está definido para compactar e o I já possui um sufixo do formato de arquivo de destino (B<.xz> ou B<.txz> ao compactar para o formato B<.xz> e B<.lzma > ou B<.tlz> ao compactar para o formato B<.lzma>)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The operation mode is set to decompress and the I doesn't have a suffix of any of the supported file formats (B<.xz>, B<.txz>, B<.lzma>, B<.tlz>, or B<.lz>)." +msgstr "O modo de operação está definido para descompactar e o I não possui um sufixo de nenhum dos formatos de arquivo suportados (B<.xz>, B<.txz>, B<.lzma>, B<.tlz> , ou B<.lz>)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "After successfully compressing or decompressing the I, B copies the owner, group, permissions, access time, and modification time from the source I to the target file. If copying the group fails, the permissions are modified so that the target file doesn't become accessible to users who didn't have permission to access the source I. B doesn't support copying other metadata like access control lists or extended attributes yet." +msgstr "Depois de compactar ou descompactar com êxito o I, o B copia o dono, grupo, permissões, horário de acesso e horário de modificação do I de origem para o arquivo de destino. Se a cópia do grupo falhar, as permissões serão modificadas para que o arquivo de destino não se torne acessível a usuários que não têm permissão para acessar o I de origem. B ainda não oferece suporte à cópia de outros metadados, como listas de controle de acesso ou atributos estendidos." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Once the target file has been successfully closed, the source I is removed unless B<--keep> was specified. The source I is never removed if the output is written to standard output or if an error occurs." +msgstr "Depois que o arquivo de destino for fechado com êxito, o I de origem será removido, a menos que B<--keep> tenha sido especificado. O I de origem nunca é removido se a saída for gravada na saída padrão ou se ocorrer um erro." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Sending B or B to the B process makes it print progress information to standard error. This has only limited use since when standard error is a terminal, using B<--verbose> will display an automatically updating progress indicator." +msgstr "O envio de B ou B para o processo do B faz com que ele imprima informações de andamento para erro padrão. Isso tem uso limitado, pois quando o erro padrão é um terminal, usar B<--verbose> exibirá um indicador de progresso de atualização automática." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Memory usage" +msgstr "Uso de memória" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The memory usage of B varies from a few hundred kilobytes to several gigabytes depending on the compression settings. The settings used when compressing a file determine the memory requirements of the decompressor. Typically the decompressor needs 5\\ % to 20\\ % of the amount of memory that the compressor needed when creating the file. For example, decompressing a file created with B currently requires 65\\ MiB of memory. Still, it is possible to have B<.xz> files that require several gigabytes of memory to decompress." +msgstr "O uso de memória de B varia de algumas centenas de kilobytes a vários gigabytes, dependendo das configurações de compactação. As configurações usadas ao compactar um arquivo determinam os requisitos de memória do descompactador. Normalmente, o descompactador precisa de 5\\ % a 20\\ % da quantidade de memória que o compactador precisou ao criar o arquivo. Por exemplo, descompactar um arquivo criado com B atualmente requer 65\\ MiB de memória. Ainda assim, é possível ter arquivos B<.xz> que requerem vários gigabytes de memória para descompactar." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Especially users of older systems may find the possibility of very large memory usage annoying. To prevent uncomfortable surprises, B has a built-in memory usage limiter, which is disabled by default. While some operating systems provide ways to limit the memory usage of processes, relying on it wasn't deemed to be flexible enough (for example, using B(1) to limit virtual memory tends to cripple B(2))." +msgstr "Especialmente os usuários de sistemas mais antigos podem achar irritante a possibilidade de uso de memória muito grande. Para evitar surpresas desconfortáveis, o B possui um limitador de uso de memória embutido, que está desabilitado por padrão. Embora alguns sistemas operacionais forneçam maneiras de limitar o uso de memória dos processos, confiar nele não foi considerado flexível o suficiente (por exemplo, usar B(1) para limitar a memória virtual tende a prejudicar B(2))." + +#. TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +#. It's a name of an environment variable. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The memory usage limiter can be enabled with the command line option B<--memlimit=>I. Often it is more convenient to enable the limiter by default by setting the environment variable B, for example, B. It is possible to set the limits separately for compression and decompression by using B<--memlimit-compress=>I and B<--memlimit-decompress=>I. Using these two options outside B is rarely useful because a single run of B cannot do both compression and decompression and B<--memlimit=>I (or B<-M> I) is shorter to type on the command line." +msgstr "O limitador de uso de memória pode ser ativado com a opção de linha de comando B<--memlimit=>I. Geralmente é mais conveniente habilitar o limitador por padrão definindo a variável de ambiente B, por exemplo, B. É possível definir os limites separadamente para compactação e descompactação usando B<--memlimit-compress=>I e B<--memlimit-decompress=>I. Usar essas duas opções fora de B raramente é útil porque uma única execução de B não pode fazer compactação e descompactação e B<--memlimit=>I (ou B<-M> I ) é mais curto para digitar na linha de comando." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the specified memory usage limit is exceeded when decompressing, B will display an error and decompressing the file will fail. If the limit is exceeded when compressing, B will try to scale the settings down so that the limit is no longer exceeded (except when using B<--format=raw> or B<--no-adjust>). This way the operation won't fail unless the limit is very small. The scaling of the settings is done in steps that don't match the compression level presets, for example, if the limit is only slightly less than the amount required for B, the settings will be scaled down only a little, not all the way down to B." +msgstr "Se o limite de uso de memória especificado for excedido durante a descompactação, B exibirá um erro e a descompactação do arquivo falhará. Se o limite for excedido durante a compactação, B tentará reduzir as configurações para que o limite não seja mais excedido (exceto ao usar B<--format=raw> ou B<--no-adjust>). Dessa forma, a operação não falhará, a menos que o limite seja muito pequeno. A escala das configurações é feita em etapas que não correspondem às predefinições do nível de compactação, por exemplo, se o limite for apenas um pouco menor que o valor necessário para B, as configurações serão reduzidas apenas um pouco , não até B." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Concatenation and padding with .xz files" +msgstr "Concatenação e preenchimento com arquivos .xz" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "It is possible to concatenate B<.xz> files as is. B will decompress such files as if they were a single B<.xz> file." +msgstr "É possível concatenar arquivos B<.xz> como estão. B irá descompactar tais arquivos como se fossem um único arquivo B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "It is possible to insert padding between the concatenated parts or after the last part. The padding must consist of null bytes and the size of the padding must be a multiple of four bytes. This can be useful, for example, if the B<.xz> file is stored on a medium that measures file sizes in 512-byte blocks." +msgstr "É possível inserir preenchimento entre as partes concatenadas ou após a última parte. O preenchimento deve consistir em bytes nulos e o tamanho do preenchimento deve ser um múltiplo de quatro bytes. Isso pode ser útil, por exemplo, se o arquivo B<.xz> for armazenado em uma mídia que mede tamanhos de arquivo em blocos de 512 bytes." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Concatenation and padding are not allowed with B<.lzma> files or raw streams." +msgstr "Concatenação e preenchimento não são permitidos com arquivos B<.lzma> ou fluxos brutos." + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "OPTIONS" +msgstr "OPÇÕES" + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Integer suffixes and special values" +msgstr "Sufixos inteiros e valores especiais" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In most places where an integer argument is expected, an optional suffix is supported to easily indicate large integers. There must be no space between the integer and the suffix." +msgstr "Na maioria dos lugares onde um argumento inteiro é esperado, um sufixo opcional é suportado para indicar facilmente números inteiros grandes. Não deve haver espaço entre o número inteiro e o sufixo." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Multiply the integer by 1,024 (2^10). B, B, B, B, and B are accepted as synonyms for B." +msgstr "Multiplica o inteiro por 1.024 (2^10). B, B, B, B e B são aceitos como sinônimos de B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Multiply the integer by 1,048,576 (2^20). B, B, B, and B are accepted as synonyms for B." +msgstr "Multiplica o número inteiro por 1.048.576 (2^20). B, B, B e B são aceitos como sinônimos de B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Multiply the integer by 1,073,741,824 (2^30). B, B, B, and B are accepted as synonyms for B." +msgstr "Multiplica o número inteiro por 1.073.741.824 (2^30). B, B, B e B são aceitos como sinônimos de B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The special value B can be used to indicate the maximum integer value supported by the option." +msgstr "O valor especial B pode ser usado para indicar o valor inteiro máximo suportado pela opção." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Operation mode" +msgstr "Modo de operação" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If multiple operation mode options are given, the last one takes effect." +msgstr "Se várias opções de modo de operação forem dadas, a última entrará em vigor." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-z>, B<--compress>" +msgstr "B<-z>, B<--compress>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress. This is the default operation mode when no operation mode option is specified and no other operation mode is implied from the command name (for example, B implies B<--decompress>)." +msgstr "Compacta. Este é o modo de operação padrão quando nenhuma opção de modo de operação é especificada e nenhum outro modo de operação está implícito no nome do comando (por exemplo, B implica em B<--decompress>)." + +#. The DESCRIPTION section already says this but it's good to repeat it +#. here because the default behavior is a bit dangerous and new users +#. in a hurry may skip reading the DESCRIPTION section. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "After successful compression, the source file is removed unless writing to standard output or B<--keep> was specified." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-d>, B<--decompress>, B<--uncompress>" +msgstr "B<-d>, B<--decompress>, B<--uncompress>" + +#. The DESCRIPTION section already says this but it's good to repeat it +#. here because the default behavior is a bit dangerous and new users +#. in a hurry may skip reading the DESCRIPTION section. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Decompress. After successful decompression, the source file is removed unless writing to standard output or B<--keep> was specified." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-t>, B<--test>" +msgstr "B<-t>, B<--test>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Test the integrity of compressed I. This option is equivalent to B<--decompress --stdout> except that the decompressed data is discarded instead of being written to standard output. No files are created or removed." +msgstr "Testa a integridade de I compactados. Esta opção é equivalente a B<--decompress --stdout> exceto que os dados descompactados são descartados em vez de serem gravados na saída padrão. Nenhum arquivo é criado ou removido." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-l>, B<--list>" +msgstr "B<-l>, B<--list>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Print information about compressed I. No uncompressed output is produced, and no files are created or removed. In list mode, the program cannot read the compressed data from standard input or from other unseekable sources." +msgstr "Imprime informações sobre I compactados. Nenhuma saída descompactada é produzida e nenhum arquivo é criado ou removido. No modo de lista, o programa não pode ler os dados compactados da entrada padrão ou de outras fontes não pesquisáveis." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default listing shows basic information about I, one file per line. To get more detailed information, use also the B<--verbose> option. For even more information, use B<--verbose> twice, but note that this may be slow, because getting all the extra information requires many seeks. The width of verbose output exceeds 80 characters, so piping the output to, for example, B may be convenient if the terminal isn't wide enough." +msgstr "A listagem padrão mostra informações básicas sobre I, um arquivo por linha. Para obter informações mais detalhadas, use também a opção B<--verbose>. Para obter ainda mais informações, use B<--verbose> duas vezes, mas observe que isso pode ser lento, porque obter todas as informações extras requer muitas buscas. A largura da saída detalhada excede 80 caracteres, portanto, canalizar a saída para, por exemplo, B pode ser conveniente se o terminal não tiver largura o suficiente." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The exact output may vary between B versions and different locales. For machine-readable output, B<--robot --list> should be used." +msgstr "A saída exata pode variar entre versões B e localidades diferentes. Para saída legível por máquina, B<--robot --list> deve ser usado." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Operation modifiers" +msgstr "Modificadores de operação" + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-k>, B<--keep>" +msgstr "B<-k>, B<--keep>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't delete the input files." +msgstr "Não exclui os arquivos de entrada." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since B 5.2.6, this option also makes B compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file. In earlier versions this was only done with B<--force>." +msgstr "Desde B 5.2.6, esta opção também faz B compactar ou descompactar mesmo se a entrada for um link simbólico para um arquivo comum, tiver mais de um link físico ou tiver o setuid, setgid ou sticky bit definir. Os bits setuid, setgid e sticky não são copiados para o arquivo de destino. Nas versões anteriores, isso era feito apenas com B<--force>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-f>, B<--force>" +msgstr "B<-f>, B<--force>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option has several effects:" +msgstr "Esta opção tem vários efeitos:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the target file already exists, delete it before compressing or decompressing." +msgstr "Se o arquivo de destino já existir, o exclui antes de compactar ou descompactar." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file." +msgstr "Compacta ou descompacta, mesmo que a entrada seja um link simbólico para um arquivo normal, tenha mais de um link físico ou tenha setuid, setgid ou sticky bit definido. Os bits setuid, setgid e sticky não são copiados para o arquivo de destino." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When used with B<--decompress> B<--stdout> and B cannot recognize the type of the source file, copy the source file as is to standard output. This allows B B<--force> to be used like B(1) for files that have not been compressed with B. Note that in future, B might support new compressed file formats, which may make B decompress more types of files instead of copying them as is to standard output. B<--format=>I can be used to restrict B to decompress only a single file format." +msgstr "Quando usado com B<--decompress> B<--stdout> e B não consegue reconhecer o tipo do arquivo de origem, copia o arquivo de origem como está na saída padrão. Isso permite que B B<--force> seja usado como B(1) para arquivos que não foram compactados com B. Observe que, no futuro, o B pode oferecer suporte a novos formatos de arquivo compactado, o que pode fazer com que o B descompacte mais tipos de arquivos em vez de copiá-los como na saída padrão. B<--format=>I pode ser usado para restringir B para descompactar apenas um único formato de arquivo." + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-c>, B<--stdout>, B<--to-stdout>" +msgstr "B<-c>, B<--stdout>, B<--to-stdout>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Write the compressed or decompressed data to standard output instead of a file. This implies B<--keep>." +msgstr "Grava os dados compactados ou descompactados na saída padrão em vez de em um arquivo. Isso implica em B<--keep>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--single-stream>" +msgstr "B<--single-stream>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Decompress only the first B<.xz> stream, and silently ignore possible remaining input data following the stream. Normally such trailing garbage makes B display an error." +msgstr "Descompacta apenas o primeiro fluxo de B<.xz> e ignora silenciosamente possíveis dados de entrada restantes após o fluxo. Normalmente, esse restante posterior sem uso faz com que B exiba um erro." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B never decompresses more than one stream from B<.lzma> files or raw streams, but this option still makes B ignore the possible trailing data after the B<.lzma> file or raw stream." +msgstr "B nunca descompacta mais de um fluxo de arquivos B<.lzma> ou fluxos brutos, mas esta opção ainda faz B ignorar os possíveis dados posteriores após o arquivo B<.lzma> ou fluxo bruto." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option has no effect if the operation mode is not B<--decompress> or B<--test>." +msgstr "Esta opção não tem efeito se o modo de operação não for B<--decompress> ou B<--test>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since B 5.7.1alpha, B<--single-stream> implies B<--keep>." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--no-sparse>" +msgstr "B<--no-sparse>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Disable creation of sparse files. By default, if decompressing into a regular file, B tries to make the file sparse if the decompressed data contains long sequences of binary zeros. It also works when writing to standard output as long as standard output is connected to a regular file and certain additional conditions are met to make it safe. Creating sparse files may save disk space and speed up the decompression by reducing the amount of disk I/O." +msgstr "Desativa a criação de arquivos esparsos. Por padrão, ao descompactar em um arquivo normal, B tenta tornar o arquivo esparso se os dados descompactados contiverem longas sequências de zeros binários. Ele também funciona ao gravar na saída padrão, desde que a saída padrão esteja conectada a um arquivo normal e certas condições adicionais sejam atendidas para torná-la segura. A criação de arquivos esparsos pode economizar espaço em disco e acelerar a descompactação, reduzindo a quantidade de E/S do disco." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-S> I<.suf>, B<--suffix=>I<.suf>" +msgstr "B<-S> I<.suf>, B<--suffix=>I<.suf>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing, use I<.suf> as the suffix for the target file instead of B<.xz> or B<.lzma>. If not writing to standard output and the source file already has the suffix I<.suf>, a warning is displayed and the file is skipped." +msgstr "Ao compactar, usa I<.suf> como sufixo para o arquivo de destino em vez de B<.xz> ou B<.lzma>. Se não estiver gravando na saída padrão e o arquivo de origem já tiver o sufixo I<.suf>, um aviso será exibido e o arquivo será ignorado." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When decompressing, recognize files with the suffix I<.suf> in addition to files with the B<.xz>, B<.txz>, B<.lzma>, B<.tlz>, or B<.lz> suffix. If the source file has the suffix I<.suf>, the suffix is removed to get the target filename." +msgstr "Ao descompactar, reconhece arquivos com o sufixo I<.suf> além de arquivos com o sufixo B<.xz>, B<.txz>, B<.lzma>, B<.tlz> ou B<.lz> . Se o arquivo de origem tiver o sufixo I<.suf>, o sufixo será removido para obter o nome do arquivo de destino." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing or decompressing raw streams (B<--format=raw>), the suffix must always be specified unless writing to standard output, because there is no default suffix for raw streams." +msgstr "Ao compactar ou descompactar fluxos brutos (B<--format=raw>), o sufixo sempre deve ser especificado, a menos que seja gravado na saída padrão, porque não há sufixo padrão para fluxos brutos." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--files>[B<=>I]" +msgstr "B<--files>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Read the filenames to process from I; if I is omitted, filenames are read from standard input. Filenames must be terminated with the newline character. A dash (B<->) is taken as a regular filename; it doesn't mean standard input. If filenames are given also as command line arguments, they are processed before the filenames read from I." +msgstr "Lê os nomes dos arquivos a serem processados em I; se I for omitido, os nomes dos arquivos serão lidos da entrada padrão. Os nomes de arquivo devem terminar com o caractere de nova linha. Um traço (B<->) é considerado um nome de arquivo regular; não significa entrada padrão. Se os nomes de arquivo forem fornecidos também como argumentos de linha de comando, eles serão processados antes da leitura dos nomes de arquivo de I." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--files0>[B<=>I]" +msgstr "B<--files0>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is identical to B<--files>[B<=>I] except that each filename must be terminated with the null character." +msgstr "Isso é idêntico a B<--files>[B<=>I], exceto que cada nome de arquivo deve ser finalizado com o caractere nulo." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Basic file format and compression options" +msgstr "Opções básicas de formato de arquivo e de compactação" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-F> I, B<--format=>I" +msgstr "B<-F> I, B<--format=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the file I to compress or decompress:" +msgstr "Especifica o I de arquivo para compactar ou descompactar:" + +#. TRANSLATORS: Don't translate bold string B. +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is the default. When compressing, B is equivalent to B. When decompressing, the format of the input file is automatically detected. Note that raw streams (created with B<--format=raw>) cannot be auto-detected." +msgstr "Este é o padrão. Ao compactar, B é equivalente a B. Ao descompactar, o formato do arquivo de entrada é detectado automaticamente. Observe que os fluxos brutos (criados com B<--format=raw>) não podem ser detectados automaticamente." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress to the B<.xz> file format, or accept only B<.xz> files when decompressing." +msgstr "Compacta no formato de arquivo B<.xz> ou aceite apenas arquivos B<.xz> ao descompactar." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B, B" +msgstr "B, B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files when decompressing. The alternative name B is provided for backwards compatibility with LZMA Utils." +msgstr "Compacta no formato de arquivo legado B<.lzma> ou aceite apenas arquivos B<.lzma> ao descompactar. O nome alternativo B é fornecido para compatibilidade com versões anteriores do LZMA Utils." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Accept only B<.lz> files when decompressing. Compression is not supported." +msgstr "Aceita apenas arquivos B<.lz> ao descompactar. Sem suporte a compactação." + +#. type: Plain text +#: ../src/xz/xz.1 +#, fuzzy +#| msgid "The B<.lz> format version 0 and the unextended version 1 are supported. Version 0 files were produced by B 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B 1.18." +msgid "The B<.lz> format versions 0 and 1 are supported. Version 0 files were produced by B 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B 1.18. B 1.4 and later create files in the format version 1." +msgstr "O formato B<.lz> versão 0 e a versão não estendida 1 são suportados. Os arquivos da versão 0 foram produzidos por B 1.3 e anteriores. Esses arquivos não são comuns, mas podem ser encontrados em arquivos compactados, pois alguns pacotes de origem foram lançados nesse formato. As pessoas também podem ter arquivos pessoais antigos neste formato. O suporte de descompactação para o formato versão 0 foi removido em B 1.18." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress or uncompress a raw stream (no headers). This is meant for advanced users only. To decode raw streams, you need use B<--format=raw> and explicitly specify the filter chain, which normally would have been stored in the container headers." +msgstr "Compacta ou descompacta um fluxo bruto (sem cabeçalhos). Isso é destinado apenas a usuários avançados. Para decodificar fluxos brutos, você precisa usar B<--format=raw> e especificar explicitamente a cadeia de filtros, que normalmente seria armazenada nos cabeçalhos do contêiner." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-C> I, B<--check=>I" +msgstr "B<-C> I, B<--check=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the type of the integrity check. The check is calculated from the uncompressed data and stored in the B<.xz> file. This option has an effect only when compressing into the B<.xz> format; the B<.lzma> format doesn't support integrity checks. The integrity check (if any) is verified when the B<.xz> file is decompressed." +msgstr "Especifica o tipo de verificação de integridade. A verificação é calculada a partir dos dados descompactados e armazenados no arquivo B<.xz>. Esta opção tem efeito somente ao compactar no formato B<.xz>; o formato B<.lzma> não oferece suporte a verificações de integridade. A verificação de integridade (se for o caso) é verificada quando o arquivo B<.xz> é descompactado." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Supported I types:" +msgstr "Tipos de I suportados:" + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, and B. The command line option --check accepts +#. only the untranslated strings. +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't calculate an integrity check at all. This is usually a bad idea. This can be useful when integrity of the data is verified by other means anyway." +msgstr "Não calcula uma verificação de integridade. Isso geralmente é uma má ideia. Pode ser útil quando a integridade dos dados é verificada por outros meios." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)." +msgstr "Calcula CRC32 usando o polinômio do IEEE-802.3 (Ethernet)." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Calculate CRC64 using the polynomial from ECMA-182. This is the default, since it is slightly better than CRC32 at detecting damaged files and the speed difference is negligible." +msgstr "Calcula CRC64 usando o polinômio de ECMA-182. Este é o padrão, pois é um pouco melhor que o CRC32 na detecção de arquivos danificados e a diferença de velocidade é insignificante." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64." +msgstr "Calcula SHA-256. Isso é um pouco mais lento do que CRC32 e CRC64." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Integrity of the B<.xz> headers is always verified with CRC32. It is not possible to change or disable it." +msgstr "A integridade dos cabeçalhos de B<.xz> é sempre verificada com CRC32. Não é possível alterá-la ou desativá-la." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--ignore-check>" +msgstr "B<--ignore-check>" + +# Enquanto verify=verificar, achei melhor alterar para conferir para evitar excesso de "verificar" e "verificação" -- Rafael +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't verify the integrity check of the compressed data when decompressing. The CRC32 values in the B<.xz> headers will still be verified normally." +msgstr "Não confere a verificação de integridade dos dados compactados ao descompactar. Os valores CRC32 nos cabeçalhos B<.xz> ainda serão conferidos normalmente." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B Possible reasons to use this option:" +msgstr "B Possíveis razões para usar esta opção:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Trying to recover data from a corrupt .xz file." +msgstr "Tentativa de recuperar dados de um arquivo .xz corrompido." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Speeding up decompression. This matters mostly with SHA-256 or with files that have compressed extremely well. It's recommended to not use this option for this purpose unless the file integrity is verified externally in some other way." +msgstr "Acelerar a descompactação. Isso é importante principalmente com SHA-256 ou com arquivos extremamente bem compactados. É recomendável não usar essa opção para essa finalidade, a menos que a integridade do arquivo seja verificada externamente de alguma outra forma." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-0> ... B<-9>" +msgstr "B<-0> ... B<-9>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Select a compression preset level. The default is B<-6>. If multiple preset levels are specified, the last one takes effect. If a custom filter chain was already specified, setting a compression preset level clears the custom filter chain." +msgstr "Seleciona um nível de predefinição de compactação. O padrão é B<-6>. Se vários níveis de predefinição forem especificados, o último terá efeito. Se uma cadeia de filtro personalizada já foi especificada, especificar um nível de predefinição de compactação limpa a cadeia de filtro personalizada." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The differences between the presets are more significant than with B(1) and B(1). The selected compression settings determine the memory requirements of the decompressor, thus using a too high preset level might make it painful to decompress the file on an old system with little RAM. Specifically, B like it often is with B(1) and B(1)." +msgstr "As diferenças entre as predefinições são mais significativas do que com B(1) e B(1). As configurações de compactação selecionadas determinam os requisitos de memória do descompactador, portanto, usar um nível de predefinição muito alto pode dificultar a descompactação do arquivo em um sistema antigo com pouca RAM. Especificamente, B como costuma acontecer com B(1) e B(1)." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-0> ... B<-3>" +msgstr "B<-0> ... B<-3>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These are somewhat fast presets. B<-0> is sometimes faster than B while compressing much better. The higher ones often have speed comparable to B(1) with comparable or better compression ratio, although the results depend a lot on the type of data being compressed." +msgstr "Estas são predefinições um tanto rápidas. B<-0> às vezes é mais rápida que B ao mesmo tempo que compacta muito melhor. As mais altas geralmente têm velocidade comparável ao B(1) com taxa de compactação comparável ou melhor, embora os resultados dependam muito do tipo de dados que estão sendo compactados." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-4> ... B<-6>" +msgstr "B<-4> ... B<-6>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Good to very good compression while keeping decompressor memory usage reasonable even for old systems. B<-6> is the default, which is usually a good choice for distributing files that need to be decompressible even on systems with only 16\\ MiB RAM. (B<-5e> or B<-6e> may be worth considering too. See B<--extreme>.)" +msgstr "Compactação boa a muito boa, mantendo o uso de memória do descompactador razoável mesmo para sistemas antigos. B<-6> é o padrão, que geralmente é uma boa escolha para distribuir arquivos que precisam ser descompactáveis, mesmo em sistemas com apenas 16\\ MiB de RAM. (B<-5e> ou B<-6e> também vale a pena considerar. Veja B<--extreme>.)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-7 ... -9>" +msgstr "B<-7 ... -9>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These are like B<-6> but with higher compressor and decompressor memory requirements. These are useful only when compressing files bigger than 8\\ MiB, 16\\ MiB, and 32\\ MiB, respectively." +msgstr "Eles são como B<-6>, mas com requisitos de memória de compressor e descompressor mais altos. Eles são úteis apenas ao compactar arquivos maiores que 8\\ MiB, 16\\ MiB e 32\\ MiB, respectivamente." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "On the same hardware, the decompression speed is approximately a constant number of bytes of compressed data per second. In other words, the better the compression, the faster the decompression will usually be. This also means that the amount of uncompressed output produced per second can vary a lot." +msgstr "No mesmo hardware, a velocidade de descompactação é aproximadamente um número constante de bytes de dados compactados por segundo. Em outras palavras, quanto melhor a compactação, mais rápida será a descompactação. Isso também significa que a quantidade de saída não compactada produzida por segundo pode variar muito." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The following table summarises the features of the presets:" +msgstr "A tabela a seguir resume os recursos das predefinições:" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Preset" +msgstr "Predefinição" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "DictSize" +msgstr "DicTam" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "CompCPU" +msgstr "CompCPU" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "CompMem" +msgstr "CompMem" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "DecMem" +msgstr "DecMem" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-0" +msgstr "-0" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "256 KiB" +msgstr "256 KiB" + +#. type: TP +#: ../src/xz/xz.1 ../src/scripts/xzgrep.1 +#, no-wrap +msgid "0" +msgstr "0" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "3 MiB" +msgstr "3 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "1 MiB" +msgstr "1 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-1" +msgstr "-1" + +#. type: TP +#: ../src/xz/xz.1 ../src/scripts/xzgrep.1 +#, no-wrap +msgid "1" +msgstr "1" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "9 MiB" +msgstr "9 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "2 MiB" +msgstr "2 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-2" +msgstr "-2" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "2" +msgstr "2" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "17 MiB" +msgstr "17 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-3" +msgstr "-3" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "4 MiB" +msgstr "4 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "3" +msgstr "3" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "32 MiB" +msgstr "32 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "5 MiB" +msgstr "5 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-4" +msgstr "-4" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "4" +msgstr "4" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "48 MiB" +msgstr "48 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-5" +msgstr "-5" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "8 MiB" +msgstr "8 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "5" +msgstr "5" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "94 MiB" +msgstr "94 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-6" +msgstr "-6" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "6" +msgstr "6" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-7" +msgstr "-7" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "16 MiB" +msgstr "16 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "186 MiB" +msgstr "186 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-8" +msgstr "-8" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "370 MiB" +msgstr "370 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "33 MiB" +msgstr "33 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-9" +msgstr "-9" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "64 MiB" +msgstr "64 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "674 MiB" +msgstr "674 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "65 MiB" +msgstr "65 MiB" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Column descriptions:" +msgstr "Descrições das colunas:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "DictSize is the LZMA2 dictionary size. It is waste of memory to use a dictionary bigger than the size of the uncompressed file. This is why it is good to avoid using the presets B<-7> ... B<-9> when there's no real need for them. At B<-6> and lower, the amount of memory wasted is usually low enough to not matter." +msgstr "DicTam é o tamanho do dicionário LZMA2. É desperdício de memória usar um dicionário maior que o tamanho do arquivo descompactado. É por isso que é bom evitar usar as predefinições B<-7> ... B<-9> quando não há real necessidade deles. Em B<-6> e inferior, a quantidade de memória desperdiçada geralmente é baixa o suficiente para não importar." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "CompCPU is a simplified representation of the LZMA2 settings that affect compression speed. The dictionary size affects speed too, so while CompCPU is the same for levels B<-6> ... B<-9>, higher levels still tend to be a little slower. To get even slower and thus possibly better compression, see B<--extreme>." +msgstr "CompCPU é uma representação simplificada das configurações LZMA2 que afetam a velocidade de compactação. O tamanho do dicionário também afeta a velocidade, portanto, embora o CompCPU seja o mesmo para os níveis B<-6> ... B<-9>, níveis mais altos ainda tendem a ser um pouco mais lentos. Para obter uma compactação ainda mais lenta e possivelmente melhor, consulte B<--extreme>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "CompMem contains the compressor memory requirements in the single-threaded mode. It may vary slightly between B versions." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "DecMem contains the decompressor memory requirements. That is, the compression settings determine the memory requirements of the decompressor. The exact decompressor memory usage is slightly more than the LZMA2 dictionary size, but the values in the table have been rounded up to the next full MiB." +msgstr "DecMem contém os requisitos de memória do descompactador. Ou seja, as configurações de compactação determinam os requisitos de memória do descompactador. O uso exato da memória do descompactador é um pouco maior do que o tamanho do dicionário LZMA2, mas os valores na tabela foram arredondados para o próximo MiB completo." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Memory requirements of the multi-threaded mode are significantly higher than that of the single-threaded mode. With the default value of B<--block-size>, each thread needs 3*3*DictSize plus CompMem or DecMem. For example, four threads with preset B<-6> needs 660\\(en670\\ MiB of memory." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-e>, B<--extreme>" +msgstr "B<-e>, B<--extreme>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Use a slower variant of the selected compression preset level (B<-0> ... B<-9>) to hopefully get a little bit better compression ratio, but with bad luck this can also make it worse. Decompressor memory usage is not affected, but compressor memory usage increases a little at preset levels B<-0> ... B<-3>." +msgstr "Usa uma variante mais lenta do nível de predefinição de compactação selecionado (B<-0> ... B<-9>) para obter uma taxa de compactação um pouco melhor, mas, com azar, isso também pode piorar. O uso da memória do descompressor não é afetado, mas o uso da memória do compactador aumenta um pouco nos níveis de predefinição B<-0> ... B<-3>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since there are two presets with dictionary sizes 4\\ MiB and 8\\ MiB, the presets B<-3e> and B<-5e> use slightly faster settings (lower CompCPU) than B<-4e> and B<-6e>, respectively. That way no two presets are identical." +msgstr "Como existem duas predefinições com tamanhos de dicionário 4\\ MiB e 8\\ MiB, as predefinições B<-3e> e B<-5e> usam configurações um pouco mais rápidas (CompCPU inferior) do que B<-4e> e B<-6e>, respectivamente. Dessa forma, não há duas predefinições idênticas." + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-0e" +msgstr "-0e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "8" +msgstr "8" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-1e" +msgstr "-1e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "13 MiB" +msgstr "13 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-2e" +msgstr "-2e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "25 MiB" +msgstr "25 MiB" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-3e" +msgstr "-3e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "7" +msgstr "7" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-4e" +msgstr "-4e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-5e" +msgstr "-5e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-6e" +msgstr "-6e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-7e" +msgstr "-7e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-8e" +msgstr "-8e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-9e" +msgstr "-9e" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For example, there are a total of four presets that use 8\\ MiB dictionary, whose order from the fastest to the slowest is B<-5>, B<-6>, B<-5e>, and B<-6e>." +msgstr "Por exemplo, há um total de quatro predefinições que usam o dicionário 8\\ MiB, cuja ordem do mais rápido ao mais lento é B<-5>, B<-6>, B<-5e> e B<-6e>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--fast>" +msgstr "B<--fast>" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--best>" +msgstr "B<--best>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These are somewhat misleading aliases for B<-0> and B<-9>, respectively. These are provided only for backwards compatibility with LZMA Utils. Avoid using these options." +msgstr "Esses são apelidos um tanto enganosos para B<-0> e B<-9>, respectivamente. Eles são fornecidos apenas para compatibilidade com versões anteriores do LZMA Utils. Evite usar essas opções." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--block-size=>I" +msgstr "B<--block-size=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing to the B<.xz> format, split the input data into blocks of I bytes. The blocks are compressed independently from each other, which helps with multi-threading and makes limited random-access decompression possible. This option is typically used to override the default block size in multi-threaded mode, but this option can be used in single-threaded mode too." +msgstr "Ao compactar para o formato B<.xz>, divida os dados de entrada em blocos de I bytes. Os blocos são compactados independentemente uns dos outros, o que ajuda no multi-threading e torna possível a descompactação limitada de acesso aleatório. Essa opção normalmente é usada para substituir o tamanho de bloco padrão no modo multi-thread, mas também pode ser usada em thread única." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In multi-threaded mode about three times I bytes will be allocated in each thread for buffering input and output. The default I is three times the LZMA2 dictionary size or 1 MiB, whichever is more. Typically a good value is 2\\(en4 times the size of the LZMA2 dictionary or at least 1 MiB. Using I less than the LZMA2 dictionary size is waste of RAM because then the LZMA2 dictionary buffer will never get fully used. In multi-threaded mode, the sizes of the blocks are stored in the block headers. This size information is required for multi-threaded decompression." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In single-threaded mode no block splitting is done by default. Setting this option doesn't affect memory usage. No size information is stored in block headers, thus files created in single-threaded mode won't be identical to files created in multi-threaded mode. The lack of size information also means that B won't be able decompress the files in multi-threaded mode." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, fuzzy, no-wrap +#| msgid "B<--block-size=>I" +msgid "B<--block-list=>I" +msgstr "B<--block-size=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing to the B<.xz> format, start a new block with an optional custom filter chain after the given intervals of uncompressed data." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I are a comma-separated list. Each item consists of an optional filter chain number between 0 and 9 followed by a colon (B<:>) and a required size of uncompressed data. Omitting an item (two or more consecutive commas) is a shorthand to use the size and filters of the previous item." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the input file is bigger than the sum of the sizes in I, the last item is repeated until the end of the file. A special value of B<0> may be used as the last size to indicate that the rest of the file should be encoded as a single block." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "An alternative filter chain for each block can be specified in combination with the B<--filters1=>I \\&...\\& B<--filters9=>I options. These options define filter chains with an identifier between 1\\(en9. Filter chain 0 can be used to refer to the default filter chain, which is the same as not specifying a filter chain. The filter chain identifier can be used before the uncompressed size, followed by a colon (B<:>). For example, if one specifies B<--block-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB> then blocks will be created using:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The filter chain specified by B<--filters1> and 2 MiB input" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The filter chain specified by B<--filters3> and 2 MiB input" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The filter chain specified by B<--filters2> and 4 MiB input" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default filter chain and 2 MiB input" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default filter chain and 4 MiB input for every block until end of input." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If one specifies a size that exceeds the encoder's block size (either the default value in threaded mode or the value specified with B<--block-size=>I), the encoder will create additional blocks while keeping the boundaries specified in I. For example, if one specifies B<--block-size=10MiB> B<--block-list=5MiB,10MiB,8MiB,12MiB,24MiB> and the input file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and 1 MiB." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In multi-threaded mode the sizes of the blocks are stored in the block headers. This isn't done in single-threaded mode, so the encoded output won't be identical to that of the multi-threaded mode." +msgstr "No modo multi-thread, os tamanhos dos blocos são armazenados nos cabeçalhos dos blocos. Isso não é feito no modo de thread única, portanto, a saída codificada não será idêntica à do modo multi-thread." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--flush-timeout=>I" +msgstr "B<--flush-timeout=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing, if more than I milliseconds (a positive integer) has passed since the previous flush and reading more input would block, all the pending input data is flushed from the encoder and made available in the output stream. This can be useful if B is used to compress data that is streamed over a network. Small I values make the data available at the receiving end with a small delay, but large I values give better compression ratio." +msgstr "Ao compactar, se mais de I milissegundos (um número inteiro positivo) se passaram desde a liberação anterior e a leitura de mais entrada seria bloqueada, todos os dados de entrada pendentes serão liberados do codificador e disponibilizados no fluxo de saída. Isso pode ser útil se B for usado para compactar dados transmitidos por uma rede. Valores I pequenos tornam os dados disponíveis na extremidade receptora com um pequeno atraso, mas valores I grandes oferecem melhor taxa de compactação." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This feature is disabled by default. If this option is specified more than once, the last one takes effect. The special I value of B<0> can be used to explicitly disable this feature." +msgstr "Esse recurso está desabilitado por padrão. Se esta opção for especificada mais de uma vez, a última terá efeito. O valor especial I de B<0> pode ser usado para desabilitar explicitamente esse recurso." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This feature is not available on non-POSIX systems." +msgstr "Este recurso não está disponível em sistemas não-POSIX." + +#. FIXME +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B Currently B is unsuitable for decompressing the stream in real time due to how B does buffering." +msgstr "B Atualmente, B não é adequado para descompactar o fluxo em tempo real devido à forma como B faz o buffer." + +#. type: TP +#: ../src/xz/xz.1 +#, fuzzy, no-wrap +#| msgid "B<--no-sparse>" +msgid "B<--no-sync>" +msgstr "B<--no-sparse>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Do not synchronize the target file and its directory to the storage device before removing the source file. This can improve performance if compressing or decompressing many small files. However, if the system crashes soon after the deletion, it is possible that the target file was not written to the storage device but the delete operation was. In that case neither the original source file nor the target file is available." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option has an effect only when B is going to remove the source file. In other cases synchronization is never done." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The synchronization and B<--no-sync> were added in B 5.7.1alpha." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--memlimit-compress=>I" +msgstr "B<--memlimit-compress=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Set a memory usage limit for compression. If this option is specified multiple times, the last one takes effect." +msgstr "Define um limite de uso de memória para compactação. Se esta opção for especificada várias vezes, a última entrará em vigor." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the compression settings exceed the I, B will attempt to adjust the settings downwards so that the limit is no longer exceeded and display a notice that automatic adjustment was done. The adjustments are done in this order: reducing the number of threads, switching to single-threaded mode if even one thread in multi-threaded mode exceeds the I, and finally reducing the LZMA2 dictionary size." +msgstr "Se as configurações de compactação excederem o I, B tentará ajustar as configurações para baixo para que o limite não seja mais excedido e exibirá um aviso de que o ajuste automático foi feito. Os ajustes são feitos nesta ordem: reduzindo o número de encadeamentos, alternando para o modo sigle-thread se até mesmo uma thread no modo multi-thread exceder o I e, finalmente, reduzindo o tamanho do dicionário LZMA2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing with B<--format=raw> or if B<--no-adjust> has been specified, only the number of threads may be reduced since it can be done without affecting the compressed output." +msgstr "Ao compactar com B<--format=raw> ou se B<--no-adjust> tiver sido especificado, apenas o número de threads pode ser reduzido, pois isso pode ser feito sem afetar a saída compactada." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the I cannot be met even with the adjustments described above, an error is displayed and B will exit with exit status 1." +msgstr "Se o I não puder ser alcançado mesmo com os ajustes descritos acima, um erro será exibido e B sairá com status de saída 1." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be specified in multiple ways:" +msgstr "O I pode ser especificado de várias maneiras:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be an absolute value in bytes. Using an integer suffix like B can be useful. Example: B<--memlimit-compress=80MiB>" +msgstr "O I pode ser um valor absoluto em bytes. Usar um sufixo inteiro como B pode ser útil. Exemplo: B<--memlimit-compress=80MiB>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be specified as a percentage of total physical memory (RAM). This can be useful especially when setting the B environment variable in a shell initialization script that is shared between different computers. That way the limit is automatically bigger on systems with more memory. Example: B<--memlimit-compress=70%>" +msgstr "O I pode ser especificado como uma porcentagem da memória física total (RAM). Isso pode ser útil especialmente ao definir a variável de ambiente B em um script de inicialização de shell que é compartilhado entre diferentes computadores. Dessa forma o limite é automaticamente maior em sistemas com mais memória. Exemplo: B<--memlimit-compress=70%>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be reset back to its default value by setting it to B<0>. This is currently equivalent to setting the I to B (no memory usage limit)." +msgstr "O I pode ser redefinido para seu valor padrão, definindo-o como B<0>. Atualmente, isso equivale a definir I como B (sem limite de uso de memória)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For 32-bit B there is a special case: if the I would be over B<4020\\ MiB>, the I is set to B<4020\\ MiB>. On MIPS32 B<2000\\ MiB> is used instead. (The values B<0> and B aren't affected by this. A similar feature doesn't exist for decompression.) This can be helpful when a 32-bit executable has access to 4\\ GiB address space (2 GiB on MIPS32) while hopefully doing no harm in other situations." +msgstr "Para B de 32 bits, há um caso especial: se o I estiver acima de B<4020\\ MiB>, o I é definido como B<4020\\ MiB>. No MIPS32 B<2000\\ MiB> é usado em seu lugar. (Os valores B<0> e B não são afetados por isso. Um recurso semelhante não existe para descompactação.) Isso pode ser útil quando um executável de 32 bits tem acesso a espaço de endereço de 4\\ GiB (2 GiB no MIPS32) enquanto espero não causar danos em outras situações." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "See also the section B." +msgstr "Consulte também a seção B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--memlimit-decompress=>I" +msgstr "B<--memlimit-decompress=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Set a memory usage limit for decompression. This also affects the B<--list> mode. If the operation is not possible without exceeding the I, B will display an error and decompressing the file will fail. See B<--memlimit-compress=>I for possible ways to specify the I." +msgstr "Define um limite de uso de memória para descompactação. Isso também afeta o modo B<--list>. Se a operação não for possível sem exceder o I, B exibirá um erro e a descompactação do arquivo falhará. Consulte B<--memlimit-compress=>I para possíveis maneiras de especificar o I." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--memlimit-mt-decompress=>I" +msgstr "B<--memlimit-mt-decompress=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Set a memory usage limit for multi-threaded decompression. This can only affect the number of threads; this will never make B refuse to decompress a file. If I is too low to allow any multi-threading, the I is ignored and B will continue in single-threaded mode. Note that if also B<--memlimit-decompress> is used, it will always apply to both single-threaded and multi-threaded modes, and so the effective I for multi-threading will never be higher than the limit set with B<--memlimit-decompress>." +msgstr "Define um limite de uso de memória para descompactação multi-thread. Isso pode afetar apenas o número de threads; isso nunca fará com que B se recuse a descompactar um arquivo. Se I for muito baixo para permitir qualquer multi-thread, o I será ignorado e B continuará no modo de thread única. Observe que se B<--memlimit-decompress> também for usado, ele sempre se aplicará aos modos de thread única e multi-thread e, portanto, o I efetivo para multi-threading nunca será maior que o limite definido com B<--memlimit-decompress>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In contrast to the other memory usage limit options, B<--memlimit-mt-decompress=>I has a system-specific default I. B can be used to see the current value." +msgstr "Em contraste com as outras opções de limite de uso de memória, B<--memlimit-mt-decompress=>I tem um padrão I específico do sistema. B pode ser usado para ver o valor atual." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option and its default value exist because without any limit the threaded decompressor could end up allocating an insane amount of memory with some input files. If the default I is too low on your system, feel free to increase the I but never set it to a value larger than the amount of usable RAM as with appropriate input files B will attempt to use that amount of memory even with a low number of threads. Running out of memory or swapping will not improve decompression performance." +msgstr "Esta opção e seu valor padrão existem porque, sem qualquer limite, o descompactador usando threads pode acabar alocando uma quantidade insana de memória com alguns arquivos de entrada. Se o I padrão for muito baixo em seu sistema, sinta-se à vontade para aumentar o I, mas nunca defina-o para um valor maior que a quantidade de RAM utilizável, pois com os arquivos de entrada apropriados B tentará usar essa quantidade de memória mesmo com um baixo número de threads. Ficar sem memória ou trocar não melhorará o desempenho da descompactação." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "See B<--memlimit-compress=>I for possible ways to specify the I. Setting I to B<0> resets the I to the default system-specific value." +msgstr "Consulte B<--memlimit-compress=>I para possíveis maneiras de especificar o I. Definir I como B<0> redefine I para o valor padrão específico do sistema." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-M> I, B<--memlimit=>I, B<--memory=>I" +msgstr "B<-M> I, B<--memlimit=>I, B<--memory=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is equivalent to specifying B<--memlimit-compress=>I B<--memlimit-decompress=>I B<--memlimit-mt-decompress=>I." +msgstr "Isso é equivalente a especificar B<--memlimit-compress=>I B<--memlimit-decompress=>I B<--memlimit-mt-decompress=>I." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--no-adjust>" +msgstr "B<--no-adjust>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display an error and exit if the memory usage limit cannot be met without adjusting settings that affect the compressed output. That is, this prevents B from switching the encoder from multi-threaded mode to single-threaded mode and from reducing the LZMA2 dictionary size. Even when this option is used the number of threads may be reduced to meet the memory usage limit as that won't affect the compressed output." +msgstr "Exibe um erro e saia se o limite de uso de memória não puder ser atendido sem ajustar as configurações que afetam a saída compactada. Ou seja, isso evita que B alterne o codificador do modo multi-thread para o modo encadeado único e reduza o tamanho do dicionário LZMA2. Mesmo quando esta opção é usada, o número de threads pode ser reduzido para atender ao limite de uso de memória, pois isso não afetará a saída compactada." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Automatic adjusting is always disabled when creating raw streams (B<--format=raw>)." +msgstr "O ajuste automático é sempre desativado ao criar fluxos brutos (B<--format=raw>)." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-T> I, B<--threads=>I" +msgstr "B<-T> I, B<--threads=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of worker threads to use. Setting I to a special value B<0> makes B use up to as many threads as the processor(s) on the system support. The actual number of threads can be fewer than I if the input file is not big enough for threading with the given settings or if using more threads would exceed the memory usage limit." +msgstr "Especifica o número de threads de trabalho a serem usados. Definir I para um valor especial B<0> faz com que B use tantos threads quanto o(s) processador(es) no suporte do sistema. O número real de encadeamentos pode ser menor que I se o arquivo de entrada não for grande o suficiente para subdividir em threads com as configurações fornecidas ou se o uso de mais threads exceder o limite de uso de memória." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The single-threaded and multi-threaded compressors produce different output. Single-threaded compressor will give the smallest file size but only the output from the multi-threaded compressor can be decompressed using multiple threads. Setting I to B<1> will use the single-threaded mode. Setting I to any other value, including B<0>, will use the multi-threaded compressor even if the system supports only one hardware thread. (B 5.2.x used single-threaded mode in this situation.)" +msgstr "Os compactadores usando thread única e várias threads produzem saídas diferentes. O compactador de thread única fornecerá o menor tamanho de arquivo, mas apenas a saída do compactador de várias threads pode ser descompactada usando várias threads. Definir I como B<1> usará o modo de thread única. Definir I para qualquer outro valor, incluindo B<0>, usará o compressor de várias threads, mesmo que o sistema tenha suporte a apenas uma thread de hardware. (B 5.2.x usou o modo de thread única nesta situação.)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "To use multi-threaded mode with only one thread, set I to B<+1>. The B<+> prefix has no effect with values other than B<1>. A memory usage limit can still make B switch to single-threaded mode unless B<--no-adjust> is used. Support for the B<+> prefix was added in B 5.4.0." +msgstr "Para usar o modo de várias threads com apenas uma thread, defina I como B<+1>. O prefixo B<+> não tem efeito com valores diferentes de B<1>. Um limite de uso de memória ainda pode fazer B alternar para o modo de thread única, a menos que B<--no-adjust> seja usado. O suporte para o prefixo B<+> foi adicionado no B 5.4.0." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If an automatic number of threads has been requested and no memory usage limit has been specified, then a system-specific default soft limit will be used to possibly limit the number of threads. It is a soft limit in sense that it is ignored if the number of threads becomes one, thus a soft limit will never stop B from compressing or decompressing. This default soft limit will not make B switch from multi-threaded mode to single-threaded mode. The active limits can be seen with B." +msgstr "Se um número automático de threads foi solicitado e nenhum limite de uso de memória foi especificado, um limite flexível padrão específico do sistema será usado para possivelmente limitar o número de threads. É um limite flexível no sentido de que é ignorado se o número de threads se tornar um, portanto, um limite flexível nunca impedirá B de compactar ou descompactar. Este limite flexível padrão não fará com que B alterne do modo de várias threads para o modo de thread única. Os limites ativos podem ser vistos com B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Currently the only threading method is to split the input into blocks and compress them independently from each other. The default block size depends on the compression level and can be overridden with the B<--block-size=>I option." +msgstr "Atualmente, o único método de threading é dividir a entrada em blocos e comprimi-los independentemente um do outro. O tamanho padrão do bloco depende do nível de compactação e pode ser substituído com a opção B<--block-size=>I." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Threaded decompression only works on files that contain multiple blocks with size information in block headers. All large enough files compressed in multi-threaded mode meet this condition, but files compressed in single-threaded mode don't even if B<--block-size=>I has been used." +msgstr "A descompactação em threads funciona apenas em arquivos que contêm vários blocos com informações de tamanho nos cabeçalhos dos blocos. Todos os arquivos grandes o suficiente compactados no modo de várias thread atendem a essa condição, mas os arquivos compactados no modo de thread única não atendem, mesmo se B<--block-size=>I tiver sido usado." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default value for I is B<0>. In B 5.4.x and older the default is B<1>." +msgstr "" + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Custom compressor filter chains" +msgstr "Cadeias de filtro de compressor personalizadas" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A custom filter chain allows specifying the compression settings in detail instead of relying on the settings associated to the presets. When a custom filter chain is specified, preset options (B<-0> \\&...\\& B<-9> and B<--extreme>) earlier on the command line are forgotten. If a preset option is specified after one or more custom filter chain options, the new preset takes effect and the custom filter chain options specified earlier are forgotten." +msgstr "Uma cadeia de filtro personalizada permite especificar as configurações de compactação em detalhes, em vez de confiar nas configurações associadas às predefinições. Quando uma cadeia de filtro personalizada é especificada, as opções predefinidas (B<-0> \\&...\\& B<-9> e B<--extreme>) anteriores na linha de comando são esquecidas. Se uma opção predefinida for especificada após uma ou mais opções de cadeia de filtros personalizados, a nova predefinição entrará em vigor e as opções de cadeia de filtros personalizados especificadas anteriormente serão esquecidas." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A filter chain is comparable to piping on the command line. When compressing, the uncompressed input goes to the first filter, whose output goes to the next filter (if any). The output of the last filter gets written to the compressed file. The maximum number of filters in the chain is four, but typically a filter chain has only one or two filters." +msgstr "Uma cadeia de filtro é comparável à tubulação na linha de comando. Ao compactar, a entrada descompactada vai para o primeiro filtro, cuja saída vai para o próximo filtro (se houver). A saída do último filtro é gravada no arquivo compactado. O número máximo de filtros na cadeia é quatro, mas normalmente uma cadeia de filtros tem apenas um ou dois filtros." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Many filters have limitations on where they can be in the filter chain: some filters can work only as the last filter in the chain, some only as a non-last filter, and some work in any position in the chain. Depending on the filter, this limitation is either inherent to the filter design or exists to prevent security issues." +msgstr "Muitos filtros têm limitações sobre onde podem estar na cadeia de filtros: alguns filtros podem funcionar apenas como o último filtro na cadeia, alguns apenas como filtro não-último e alguns funcionam em qualquer posição na cadeia. Dependendo do filtro, essa limitação é inerente ao projeto do filtro ou existe para evitar problemas de segurança." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A custom filter chain can be specified in two different ways. The options B<--filters=>I and B<--filters1=>I \\&...\\& B<--filters9=>I allow specifying an entire filter chain in one option using the liblzma filter string syntax. Alternatively, a filter chain can be specified by using one or more individual filter options in the order they are wanted in the filter chain. That is, the order of the individual filter options is significant! When decoding raw streams (B<--format=raw>), the filter chain must be specified in the same order as it was specified when compressing. Any individual filter or preset options specified before the full chain option (B<--filters=>I) will be forgotten. Individual filters specified after the full chain option will reset the filter chain." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Both the full and individual filter options take filter-specific I as a comma-separated list. Extra commas in I are ignored. Every option has a default value, so specify those you want to change." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "To see the whole filter chain and I, use B (that is, use B<--verbose> twice). This works also for viewing the filter chain options used by presets." +msgstr "Para ver toda a cadeia de filtros e I, use B (isto é, use B<--verbose> duas vezes). Isso também funciona para visualizar as opções da cadeia de filtros usadas pelas predefinições." + +#. type: TP +#: ../src/xz/xz.1 +#, fuzzy, no-wrap +#| msgid "B<--files>[B<=>I]" +msgid "B<--filters=>I" +msgstr "B<--files>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the full filter chain or a preset in a single option. Each filter can be separated by spaces or two dashes (B<-->). I may need to be quoted on the shell command line so it is parsed as a single option. To denote I, use B<:> or B<=>. A preset can be prefixed with a B<-> and followed with zero or more flags. The only supported flag is B to apply the same options as B<--extreme>." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--filters1>=I ... B<--filters9>=I" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify up to nine additional filter chains that can be used with B<--block-list>." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For example, when compressing an archive with executable files followed by text files, the executable part could use a filter chain with a BCJ filter and the text part only the LZMA2 filter." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, fuzzy, no-wrap +#| msgid "B<-h>, B<--help>" +msgid "B<--filters-help>" +msgstr "B<-h>, B<--help>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display a help message describing how to specify presets and custom filter chains in the B<--filters> and B<--filters1=>I \\&...\\& B<--filters9=>I options, and exit successfully." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--lzma1>[B<=>I]" +msgstr "B<--lzma1>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--lzma2>[B<=>I]" +msgstr "B<--lzma2>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Add LZMA1 or LZMA2 filter to the filter chain. These filters can be used only as the last filter in the chain." +msgstr "Adiciona o filtro LZMA1 ou LZMA2 à cadeia de filtros. Esses filtros podem ser usados apenas como o último filtro na cadeia." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "LZMA1 is a legacy filter, which is supported almost solely due to the legacy B<.lzma> file format, which supports only LZMA1. LZMA2 is an updated version of LZMA1 to fix some practical issues of LZMA1. The B<.xz> format uses LZMA2 and doesn't support LZMA1 at all. Compression speed and ratios of LZMA1 and LZMA2 are practically the same." +msgstr "LZMA1 é um filtro legado, que é suportado quase exclusivamente devido ao formato de arquivo legado B<.lzma>, que suporta apenas LZMA1. LZMA2 é uma versão atualizada do LZMA1 para corrigir alguns problemas práticos do LZMA1. O formato B<.xz> usa LZMA2 e não suporta LZMA1. A velocidade de compactação e as proporções de LZMA1 e LZMA2 são praticamente as mesmas." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "LZMA1 and LZMA2 share the same set of I:" +msgstr "LZMA1 e LZMA2 compartilham o mesmo conjunto de I:" + +#. TRANSLATORS: Don't translate bold strings like B, B, +#. B, B, B, or B because those are command line +#. options. On the other hand, do translate the italic strings like +#. I, I, and I, because such italic strings are +#. placeholders which a user replaces with an actual value. +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Reset all LZMA1 or LZMA2 I to I. I consist of an integer, which may be followed by single-letter preset modifiers. The integer can be from B<0> to B<9>, matching the command line options B<-0> \\&...\\& B<-9>. The only supported modifier is currently B, which matches B<--extreme>. If no B is specified, the default values of LZMA1 or LZMA2 I are taken from the preset B<6>." +msgstr "Redefine todas as I de LZMA1 ou LZMA2 para I. I consiste em um número inteiro, que pode ser seguido por modificadores de predefinição de uma única letra. O inteiro pode ser de B<0> a B<9>, correspondendo às opções de linha de comando B<-0> \\&...\\& B<-9>. O único modificador suportado atualmente é B, que corresponde a B<--extreme>. Se nenhum B for especificado, os valores padrão das I LZMA1 ou LZMA2 serão obtidos da predefinição B<6>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Dictionary (history buffer) I indicates how many bytes of the recently processed uncompressed data is kept in memory. The algorithm tries to find repeating byte sequences (matches) in the uncompressed data, and replace them with references to the data currently in the dictionary. The bigger the dictionary, the higher is the chance to find a match. Thus, increasing dictionary I usually improves compression ratio, but a dictionary bigger than the uncompressed file is waste of memory." +msgstr "O I do dicionário (buffer de histórico) indica quantos bytes dos dados não compactados processados recentemente são mantidos na memória. O algoritmo tenta encontrar sequências de bytes repetidos (correspondências) nos dados não compactados e substituí-los por referências aos dados atualmente no dicionário. Quanto maior o dicionário, maior a chance de encontrar uma correspondência. Portanto, aumentar o dicionário I geralmente melhora a taxa de compactação, mas um dicionário maior que o arquivo não compactado é um desperdício de memória." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Typical dictionary I is from 64\\ KiB to 64\\ MiB. The minimum is 4\\ KiB. The maximum for compression is currently 1.5\\ GiB (1536\\ MiB). The decompressor already supports dictionaries up to one byte less than 4\\ GiB, which is the maximum for the LZMA1 and LZMA2 stream formats." +msgstr "Um I de dicionário típico é de 64\\ KiB a 64\\ MiB. O mínimo é 4\\ KiB. O máximo para compactação é atualmente 1,5\\ GiB (1536\\ MiB). O descompactador já oferece suporte a dicionários de até um byte a menos de 4\\ GiB, que é o máximo para os formatos de fluxo LZMA1 e LZMA2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Dictionary I and match finder (I) together determine the memory usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary I is required for decompressing that was used when compressing, thus the memory usage of the decoder is determined by the dictionary size used when compressing. The B<.xz> headers store the dictionary I either as 2^I or 2^I + 2^(I-1), so these I are somewhat preferred for compression. Other I will get rounded up when stored in the B<.xz> headers." +msgstr "O I de dicionário e o localizador de correspondência (I) juntos determinam o uso de memória do codificador LZMA1 ou LZMA2. O mesmo (ou maior) I de dicionário é necessário para descompactar que foi usado durante a compactação, portanto, o uso de memória do decodificador é determinado pelo tamanho do dicionário usado durante a compactação. Os cabeçalhos B<.xz> armazenam o I de dicionário como 2^I ou 2^I + 2^(I-1), então esses I são um tanto preferidos para compactação. Outros I serão arredondados quando armazenados nos cabeçalhos B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of literal context bits. The minimum is 0 and the maximum is 4; the default is 3. In addition, the sum of I and I must not exceed 4." +msgstr "Especifica o número de bits de contexto literais. O mínimo é 0 e o máximo é 4; o padrão é 3. Além disso, a soma de I e I não deve exceder 4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "All bytes that cannot be encoded as matches are encoded as literals. That is, literals are simply 8-bit bytes that are encoded one at a time." +msgstr "Todos os bytes que não podem ser codificados como correspondências são codificados como literais. Ou seja, literais são simplesmente bytes de 8 bits que são codificados um de cada vez." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The literal coding makes an assumption that the highest I bits of the previous uncompressed byte correlate with the next byte. For example, in typical English text, an upper-case letter is often followed by a lower-case letter, and a lower-case letter is usually followed by another lower-case letter. In the US-ASCII character set, the highest three bits are 010 for upper-case letters and 011 for lower-case letters. When I is at least 3, the literal coding can take advantage of this property in the uncompressed data." +msgstr "A codificação literal assume que os bits I mais altos do byte não compactado anterior se correlacionam com o próximo byte. Por exemplo, em um texto típico em inglês, uma letra maiúscula geralmente é seguida por uma letra minúscula, e uma letra minúscula geralmente é seguida por outra letra minúscula. No conjunto de caracteres US-ASCII, os três bits mais altos são 010 para letras maiúsculas e 011 para letras minúsculas. Quando I é pelo menos 3, a codificação literal pode aproveitar essa propriedade nos dados não compactados." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default value (3) is usually good. If you want maximum compression, test B. Sometimes it helps a little, and sometimes it makes compression worse. If it makes it worse, test B too." +msgstr "O valor padrão (3) geralmente é bom. Se você deseja compactação máxima, experimente B. Às vezes ajuda um pouco, às vezes piora a compactação. Se piorar, experimente B também." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of literal position bits. The minimum is 0 and the maximum is 4; the default is 0." +msgstr "Especifica o número de bits de posição literal. O mínimo é 0 e o máximo é 4; o padrão é 0." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I affects what kind of alignment in the uncompressed data is assumed when encoding literals. See I below for more information about alignment." +msgstr "I afeta que tipo de alinhamento nos dados não compactados é assumido ao codificar literais. Consulte I abaixo para obter mais informações sobre alinhamento." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of position bits. The minimum is 0 and the maximum is 4; the default is 2." +msgstr "Especifica o número de bits de posição. O mínimo é 0 e o máximo é 4; o padrão é 2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I affects what kind of alignment in the uncompressed data is assumed in general. The default means four-byte alignment (2^I=2^2=4), which is often a good choice when there's no better guess." +msgstr "I afeta que tipo de alinhamento nos dados não compactados é assumido em geral. O padrão significa alinhamento de quatro bytes (2^I=2^2=4), que geralmente é uma boa escolha quando não há melhor estimativa." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When the alignment is known, setting I accordingly may reduce the file size a little. For example, with text files having one-byte alignment (US-ASCII, ISO-8859-*, UTF-8), setting B can improve compression slightly. For UTF-16 text, B is a good choice. If the alignment is an odd number like 3 bytes, B might be the best choice." +msgstr "Quando o alinhamento é conhecido, definir I adequadamente pode reduzir um pouco o tamanho do arquivo. Por exemplo, com arquivos de texto com alinhamento de um byte (US-ASCII, ISO-8859-*, UTF-8), a configuração B pode melhorar um pouco a compactação. Para texto UTF-16, B é uma boa escolha. Se o alinhamento for um número ímpar como 3 bytes, B pode ser a melhor escolha." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Even though the assumed alignment can be adjusted with I and I, LZMA1 and LZMA2 still slightly favor 16-byte alignment. It might be worth taking into account when designing file formats that are likely to be often compressed with LZMA1 or LZMA2." +msgstr "Embora o alinhamento assumido possa ser ajustado com I e I, LZMA1 e LZMA2 ainda favorecem ligeiramente o alinhamento de 16 bytes. Pode valer a pena levar em consideração ao projetar formatos de arquivo que provavelmente serão compactados com LZMA1 ou LZMA2." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Match finder has a major effect on encoder speed, memory usage, and compression ratio. Usually Hash Chain match finders are faster than Binary Tree match finders. The default depends on the I: 0 uses B, 1\\(en3 use B, and the rest use B." +msgstr "O localizador de correspondência tem um efeito importante na velocidade do codificador, uso de memória e taxa de compactação. Normalmente, os localizadores de correspondência de Hash Chain são mais rápidos do que os localizadores de correspondência de árvore binária. O padrão depende do I: 0 usa B, 1\\(en3 usa B e o resto usa B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The following match finders are supported. The memory usage formulas below are rough approximations, which are closest to the reality when I is a power of two." +msgstr "Os seguintes localizadores de correspondência são suportados. As fórmulas de uso de memória abaixo são aproximações aproximadas, que estão mais próximas da realidade quando I é uma potência de dois." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Hash Chain with 2- and 3-byte hashing" +msgstr "Cadeia de hashs com hashing de 2 e 3 bytes" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum value for I: 3" +msgstr "Valor mínimo para I: 3" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Memory usage:" +msgstr "Uso de memória:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 7.5 (if I E= 16 MiB);" +msgstr "I * 7.5 (if I E= 16 MiB);" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 5.5 + 64 MiB (if I E 16 MiB)" +msgstr "I * 5.5 + 64 MiB (if I E 16 MiB)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Hash Chain with 2-, 3-, and 4-byte hashing" +msgstr "Cadeia de hashs com hashing de 2, 3 e 4 bytes" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum value for I: 4" +msgstr "Valor mínimo para I: 4" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 7.5 (if I E= 32 MiB);" +msgstr "I * 7.5 (if I E= 32 MiB);" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 6.5 (if I E 32 MiB)" +msgstr "I * 6.5 (if I E 32 MiB)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Binary Tree with 2-byte hashing" +msgstr "Árvore binária com hashing de 2 bytes" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum value for I: 2" +msgstr "Valor mínimo para I: 2" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Memory usage: I * 9.5" +msgstr "Uso de memória: I * 9.5" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Binary Tree with 2- and 3-byte hashing" +msgstr "Árvore binária com hashing de 2 e 3 bytes" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 11.5 (if I E= 16 MiB);" +msgstr "I * 11.5 (if I E= 16 MiB);" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 9.5 + 64 MiB (if I E 16 MiB)" +msgstr "I * 9.5 + 64 MiB (if I E 16 MiB)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Binary Tree with 2-, 3-, and 4-byte hashing" +msgstr "Árvore binária com hashing de 2, 3 e 4 bytes" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 11.5 (if I E= 32 MiB);" +msgstr "I * 11.5 (if I E= 32 MiB);" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 10.5 (if I E 32 MiB)" +msgstr "I * 10.5 (if I E 32 MiB)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression I specifies the method to analyze the data produced by the match finder. Supported I are B and B. The default is B for I 0\\(en3 and B for I 4\\(en9." +msgstr "O I de compactação especifica o método para analisar os dados produzidos pelo localizador de correspondência. Os I suportados são B e B. O padrão é B para I 0\\(en3 e B para I 4\\(en9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Usually B is used with Hash Chain match finders and B with Binary Tree match finders. This is also what the I do." +msgstr "Normalmente, B é usado com localizadores de correspondência cadeia de hashs e B com localizadores de correspondência de árvore binária. Isso também é o que os I fazem." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify what is considered to be a nice length for a match. Once a match of at least I bytes is found, the algorithm stops looking for possibly better matches." +msgstr "Especifica o que é considerado um bom comprimento para uma correspondência. Uma vez que uma correspondência de pelo menos I bytes é encontrada, o algoritmo para de procurar correspondências possivelmente melhores." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I can be 2\\(en273 bytes. Higher values tend to give better compression ratio at the expense of speed. The default depends on the I." +msgstr "I pode ser 2\\(en273 bytes. Valores mais altos tendem a fornecer melhor taxa de compactação em detrimento da velocidade. O padrão depende do I." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the maximum search depth in the match finder. The default is the special value of 0, which makes the compressor determine a reasonable I from I and I." +msgstr "Especifica a profundidade máxima de pesquisa no localizador de correspondências. O padrão é o valor especial de 0, que faz com que o compressor determine um I razoável de I e I." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Reasonable I for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary Trees. Using very high values for I can make the encoder extremely slow with some files. Avoid setting the I over 1000 unless you are prepared to interrupt the compression in case it is taking far too long." +msgstr "Uma I razoável para cadeias de hash é 4\\(en100 e 16\\(en1000 para árvores binárias. Usar valores muito altos para I pode tornar o codificador extremamente lento com alguns arquivos. Evite definir I acima de 1000 a menos que você esteja preparado para interromper a compactação caso ela esteja demorando muito." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary I. LZMA1 needs also I, I, and I." +msgstr "Ao decodificar fluxos brutos (B<--format=raw>), o LZMA2 precisa apenas do dicionário I. LZMA1 também precisa de I, I e I." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--x86>[B<=>I]" +msgstr "B<--x86>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--arm>[B<=>I]" +msgstr "B<--arm>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--armthumb>[B<=>I]" +msgstr "B<--armthumb>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--arm64>[B<=>I]" +msgstr "B<--arm64>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--powerpc>[B<=>I]" +msgstr "B<--powerpc>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--ia64>[B<=>I]" +msgstr "B<--ia64>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--sparc>[B<=>I]" +msgstr "B<--sparc>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--riscv>[B<=>I]" +msgstr "B<--riscv>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Add a branch/call/jump (BCJ) filter to the filter chain. These filters can be used only as a non-last filter in the filter chain." +msgstr "Adiciona um filtro de ramificação/chamada/salto (BCJ) à cadeia de filtros. Esses filtros podem ser usados apenas como um filtro não último na cadeia de filtros." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A BCJ filter converts relative addresses in the machine code to their absolute counterparts. This doesn't change the size of the data but it increases redundancy, which can help LZMA2 to produce 0\\(en15\\ % smaller B<.xz> file. The BCJ filters are always reversible, so using a BCJ filter for wrong type of data doesn't cause any data loss, although it may make the compression ratio slightly worse. The BCJ filters are very fast and use an insignificant amount of memory." +msgstr "Um filtro BCJ converte endereços relativos no código de máquina em suas contrapartes absolutas. Isso não altera o tamanho dos dados, mas aumenta a redundância, o que pode ajudar o LZMA2 a produzir um arquivo B<.xz> 0\\(en15\\ % menor. Os filtros BCJ são sempre reversíveis, portanto, usar um filtro BCJ para o tipo errado de dados não causa nenhuma perda de dados, embora possa piorar um pouco a taxa de compactação.Os filtros BCJ são muito rápidos e usam uma quantidade insignificante de memória." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These BCJ filters have known problems related to the compression ratio:" +msgstr "Esses filtros BCJ têm problemas conhecidos relacionados à taxa de compactação:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Some types of files containing executable code (for example, object files, static libraries, and Linux kernel modules) have the addresses in the instructions filled with filler values. These BCJ filters will still do the address conversion, which will make the compression worse with these files." +msgstr "Alguns tipos de arquivos contendo código executável (por exemplo, arquivos de objeto, bibliotecas estáticas e módulos do kernel do Linux) têm os endereços nas instruções preenchidos com valores de preenchimento. Esses filtros BCJ ainda vão fazer a conversão de endereço, o que vai piorar a compactação desses arquivos." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If a BCJ filter is applied on an archive, it is possible that it makes the compression ratio worse than not using a BCJ filter. For example, if there are similar or even identical executables then filtering will likely make the files less similar and thus compression is worse. The contents of non-executable files in the same archive can matter too. In practice one has to try with and without a BCJ filter to see which is better in each situation." +msgstr "Se um filtro BCJ for aplicado em um arquivo, é possível que isso torne a taxa de compactação pior do que não usar um filtro BCJ. Por exemplo, se houver executáveis semelhantes ou mesmo idênticos, a filtragem provavelmente tornará os arquivos menos semelhantes e, portanto, a compactação será pior. O conteúdo de arquivos não executáveis no mesmo arquivo também pode ser importante. Na prática tem que tentar com e sem filtro BCJ para ver qual é melhor em cada situação." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Different instruction sets have different alignment: the executable file must be aligned to a multiple of this value in the input data to make the filter work." +msgstr "Conjuntos de instruções diferentes têm alinhamento diferente: o arquivo executável deve ser alinhado a um múltiplo desse valor nos dados de entrada para fazer o filtro funcionar." + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filter" +msgstr "Filtro" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Alignment" +msgstr "Alinhamento" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Notes" +msgstr "Observações" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "x86" +msgstr "x86" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "32-bit or 64-bit x86" +msgstr "x86 32 bits ou 64 bits" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "ARM" +msgstr "ARM" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "ARM-Thumb" +msgstr "ARM-Thumb" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "ARM64" +msgstr "ARM64" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "4096-byte alignment is best" +msgstr "" +"Alinhamento de 4096 bytes\n" +";;é melhor" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "PowerPC" +msgstr "PowerPC" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Big endian only" +msgstr "Somente big endian" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "IA-64" +msgstr "IA-64" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "16" +msgstr "16" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Itanium" +msgstr "Itanium" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "SPARC" +msgstr "SPARC" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "RISC-V" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since the BCJ-filtered data is usually compressed with LZMA2, the compression ratio may be improved slightly if the LZMA2 options are set to match the alignment of the selected BCJ filter. Examples:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IA-64 filter has 16-byte alignment so B is good with LZMA2 (2^4=16)." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "RISC-V code has 2-byte or 4-byte alignment depending on whether the file contains 16-bit compressed instructions (the C extension). When 16-bit instructions are used, B or B is good. When 16-bit instructions aren't present, B is the best. B can be used to check if \"RVC\" appears on the \"Flags\" line." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "ARM64 is always 4-byte aligned so B is the best." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The x86 filter is an exception. It's usually good to stick to LZMA2's defaults (B) when compressing x86 executables." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "All BCJ filters support the same I:" +msgstr "Todos os filtros BCJ suportam as mesmas I:" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the start I that is used when converting between relative and absolute addresses. The I must be a multiple of the alignment of the filter (see the table above). The default is zero. In practice, the default is good; specifying a custom I is almost never useful." +msgstr "Especifica o I inicial que é usado na conversão entre endereços relativos e absolutos. O I deve ser um múltiplo do alinhamento do filtro (ver tabela acima). O padrão é zero. Na prática, o padrão é bom; especificar um I personalizado quase nunca é útil." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--delta>[B<=>I]" +msgstr "B<--delta>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Add the Delta filter to the filter chain. The Delta filter can be only used as a non-last filter in the filter chain." +msgstr "Adiciona o filtro Delta à cadeia de filtros. O filtro Delta só pode ser usado como filtro não-último na cadeia de filtros." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Currently only simple byte-wise delta calculation is supported. It can be useful when compressing, for example, uncompressed bitmap images or uncompressed PCM audio. However, special purpose algorithms may give significantly better results than Delta + LZMA2. This is true especially with audio, which compresses faster and better, for example, with B(1)." +msgstr "Atualmente, apenas o cálculo simples de delta byte a byte é suportado. Pode ser útil ao compactar, por exemplo, imagens bitmap não compactadas ou áudio PCM não compactado. No entanto, algoritmos de propósito especial podem fornecer resultados significativamente melhores do que Delta + LZMA2. Isso é verdade especialmente com áudio, que compacta mais rápido e melhor, por exemplo, com B(1)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Supported I:" +msgstr "I suportadas:" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the I of the delta calculation in bytes. I must be 1\\(en256. The default is 1." +msgstr "Especifica a I do cálculo delta em bytes. I deve ser 1\\(en256. O padrão é 1." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For example, with B and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the output will be A1 B1 01 02 01 02 01 02." +msgstr "Por exemplo, com B e entrada de oito bytes A1 B1 A2 B3 A3 B5 A4 B7, a saída será A1 B1 01 02 01 02 01 02." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Other options" +msgstr "Outras opções" + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-q>, B<--quiet>" +msgstr "B<-q>, B<--quiet>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Suppress warnings and notices. Specify this twice to suppress errors too. This option has no effect on the exit status. That is, even if a warning was suppressed, the exit status to indicate a warning is still used." +msgstr "Suprime avisos e avisos. Especifique isso duas vezes para suprimir erros também. Esta opção não tem efeito no status de saída. Ou seja, mesmo que um aviso tenha sido suprimido, o status de saída para indicar um aviso ainda é usado." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-v>, B<--verbose>" +msgstr "B<-v>, B<--verbose>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Be verbose. If standard error is connected to a terminal, B will display a progress indicator. Specifying B<--verbose> twice will give even more verbose output." +msgstr "Ser detalhado. Se o erro padrão estiver conectado a um terminal, B exibirá um indicador de progresso. Especifique B<--verbose> duas vezes dará uma saída ainda mais detalhada." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The progress indicator shows the following information:" +msgstr "O indicador de progresso mostra as seguintes informações:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Completion percentage is shown if the size of the input file is known. That is, the percentage cannot be shown in pipes." +msgstr "A porcentagem de conclusão é mostrada se o tamanho do arquivo de entrada for conhecido. Ou seja, a porcentagem não pode ser mostrada em encadeamentos (pipe)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of compressed data produced (compressing) or consumed (decompressing)." +msgstr "Quantidade de dados compactados produzidos (compactando) ou consumidos (descompactando)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of uncompressed data consumed (compressing) or produced (decompressing)." +msgstr "Quantidade de dados não compactados consumidos (compactação) ou produzidos (descompactação)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, which is calculated by dividing the amount of compressed data processed so far by the amount of uncompressed data processed so far." +msgstr "Taxa de compactação, que é calculada dividindo a quantidade de dados compactados processados até o momento pela quantidade de dados não compactados processados até o momento." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression or decompression speed. This is measured as the amount of uncompressed data consumed (compression) or produced (decompression) per second. It is shown after a few seconds have passed since B started processing the file." +msgstr "Velocidade de compactação ou descompactação. Isso é medido como a quantidade de dados não compactados consumidos (compactação) ou produzidos (descompactação) por segundo. É mostrado após alguns segundos desde que B começou a processar o arquivo." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Elapsed time in the format M:SS or H:MM:SS." +msgstr "Tempo decorrido no formato M:SS ou H:MM:SS." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Estimated remaining time is shown only when the size of the input file is known and a couple of seconds have already passed since B started processing the file. The time is shown in a less precise format which never has any colons, for example, 2 min 30 s." +msgstr "O tempo restante estimado é mostrado apenas quando o tamanho do arquivo de entrada é conhecido e alguns segundos já se passaram desde que B começou a processar o arquivo. A hora é mostrada em um formato menos preciso que nunca tem dois pontos, por exemplo, 2 min 30 s." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When standard error is not a terminal, B<--verbose> will make B print the filename, compressed size, uncompressed size, compression ratio, and possibly also the speed and elapsed time on a single line to standard error after compressing or decompressing the file. The speed and elapsed time are included only when the operation took at least a few seconds. If the operation didn't finish, for example, due to user interruption, also the completion percentage is printed if the size of the input file is known." +msgstr "Quando o erro padrão não é um terminal, B<--verbose> fará com que B imprima o nome do arquivo, tamanho compactado, tamanho não compactado, taxa de compactação e possivelmente também a velocidade e o tempo decorrido em uma única linha para o erro padrão após a compactação ou descompactando o arquivo. A velocidade e o tempo decorrido são incluídos apenas quando a operação leva pelo menos alguns segundos. Se a operação não foi concluída, por exemplo, devido à interrupção do usuário, também é impressa a porcentagem de conclusão se o tamanho do arquivo de entrada for conhecido." + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-Q>, B<--no-warn>" +msgstr "B<-Q>, B<--no-warn>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't set the exit status to 2 even if a condition worth a warning was detected. This option doesn't affect the verbosity level, thus both B<--quiet> and B<--no-warn> have to be used to not display warnings and to not alter the exit status." +msgstr "Não define o status de saída como 2, mesmo que uma condição digna de um aviso tenha sido detectada. Esta opção não afeta o nível de detalhamento, portanto, tanto B<--quiet> quanto B<--no-warn> devem ser usados para não exibir avisos e não alterar o status de saída." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--robot>" +msgstr "B<--robot>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Print messages in a machine-parsable format. This is intended to ease writing frontends that want to use B instead of liblzma, which may be the case with various scripts. The output with this option enabled is meant to be stable across B releases. See the section B for details." +msgstr "Imprime mensagens em um formato analisável por máquina. Isso visa facilitar a criação de frontends que desejam usar B em vez de liblzma, o que pode ser o caso de vários scripts. A saída com esta opção habilitada deve ser estável em versões B. Consulte a seção B para obter detalhes." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--info-memory>" +msgstr "B<--info-memory>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display, in human-readable format, how much physical memory (RAM) and how many processor threads B thinks the system has and the memory usage limits for compression and decompression, and exit successfully." +msgstr "Exibe, em formato legível por humanos, quanta memória física (RAM) e quantos threads de processador B acredita que o sistema possui e os limites de uso de memória para compactação e descompactação e saia com êxito." + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-h>, B<--help>" +msgstr "B<-h>, B<--help>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display a help message describing the most commonly used options, and exit successfully." +msgstr "Exibe uma mensagem de ajuda descrevendo as opções mais usadas e sai com sucesso." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-H>, B<--long-help>" +msgstr "B<-H>, B<--long-help>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display a help message describing all features of B, and exit successfully" +msgstr "Exibe uma mensagem de ajuda descrevendo todos os recursos de B e sai com sucesso" + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-V>, B<--version>" +msgstr "B<-V>, B<--version>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display the version number of B and liblzma in human readable format. To get machine-parsable output, specify B<--robot> before B<--version>." +msgstr "Exibe o número da versão de B e liblzma em formato legível por humanos. Para obter uma saída analisável por máquina, especifique B<--robot> antes de B<--version>." + +#. type: SH +#: ../src/xz/xz.1 +#, no-wrap +msgid "ROBOT MODE" +msgstr "MODO ROBÔ" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The robot mode is activated with the B<--robot> option. It makes the output of B easier to parse by other programs. Currently B<--robot> is supported only together with B<--list>, B<--filters-help>, B<--info-memory>, and B<--version>. It will be supported for compression and decompression in the future." +msgstr "" + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "List mode" +msgstr "Modo lista" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B uses tab-separated output. The first column of every line has a string that indicates the type of the information found on that line:" +msgstr "B usa saída separada por tabulações. A primeira coluna de cada linha possui uma string que indica o tipo de informação encontrada naquela linha:" + +#. TRANSLATORS: The bold strings B, B, B, B, +#. B, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "Esta é sempre a primeira linha ao começar a listar um arquivo. A segunda coluna na linha é o nome do arquivo." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "Esta linha contém informações gerais sobre o arquivo B<.xz>. Esta linha é sempre impressa após a linha B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Este tipo de linha é usado somente quando B<--verbose> foi especificado. Existem tantas linhas de B quanto fluxos no arquivo B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Este tipo de linha é usado somente quando B<--verbose> foi especificado. Existem tantas linhas B quanto blocos no arquivo B<.xz>. As linhas B são mostradas após todas as linhas B; diferentes tipos de linha não são intercalados." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Este tipo de linha é usado apenas quando B<--verbose> foi especificado duas vezes. Esta linha é impressa após todas as linhas de B. Assim como a linha B, a linha B contém informações gerais sobre o arquivo B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Esta linha é sempre a última linha da saída da lista. Ele mostra as contagens totais e tamanhos." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "As colunas das linhas B:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Número de fluxos no arquivo" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Número total de blocos no(s) fluxo(s)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Tamanho compactado do arquivo" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Uncompressed size of the file" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "Taxa de compactação, por exemplo, B<0.123>. Se a proporção for superior a 9.999, serão exibidos três traços (B<--->) em vez da proporção." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Lista separada por vírgulas de nomes de verificação de integridade. As seguintes strings são usadas para os tipos de verificação conhecidos: B, B, B e B. Para tipos de verificações desconhecidos, BI é usado, onde I é o ID do cheque como um número decimal (um ou dois dígitos)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Tamanho total do preenchimento de fluxo no arquivo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "As colunas das linhas B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Número do fluxo (o primeiro fluxo é 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Número de blocos no fluxo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Deslocamento inicial compactado" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Deslocamento inicial descompactado" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Tamanho compactado (não inclui preenchimento de fluxo)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Tamanho descompactado" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Taxa de compactação" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Nome da verificação de integridade" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Tamanho do preenchimento do fluxo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "As colunas das linhas B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Número do fluxo que contém este bloco" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Número do bloco relativo ao início do fluxo (o primeiro bloco é 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Número do bloco relativo ao início do arquivo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Deslocamento inicial compactado em relação ao início do arquivo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Deslocamento inicial descompactado em relação ao início do arquivo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Tamanho total compactado do bloco (inclui cabeçalhos)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Se B<--verbose> for especificado duas vezes, colunas adicionais serão incluídas nas linhas B. Eles não são exibidos com um único B<--verbose>, porque obter essas informações requer muitas buscas e, portanto, pode ser lento:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Valor da verificação de integridade em hexadecimal" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Tamanho do cabeçalho do bloco" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Sinalizadores de bloco: B indica que o tamanho compactado está presente e B indica que o tamanho não compactado está presente. Se o sinalizador não estiver definido, um traço (B<->) será exibido para manter o comprimento da string fixo. Novos sinalizadores podem ser adicionados ao final da string no futuro." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Tamanho dos dados reais compactados no bloco (isso exclui o cabeçalho do bloco, o preenchimento do bloco e os campos de verificação)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Quantidade de memória (em bytes) necessária para descompactar este bloco com esta versão B" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Cadeia de filtro. Observe que a maioria das opções usadas no momento da compactação não pode ser conhecida, pois apenas as opções necessárias para a descompactação são armazenadas nos cabeçalhos B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "As colunas das linhas B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Quantidade de memória (em bytes) necessária para descompactar este arquivo com esta versão do B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B ou B indicando se todos os cabeçalhos de bloco têm tamanho compactado e tamanho não compactado armazenados neles" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Versão mínima do B necessária para descompactar o arquivo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "As colunas da linha B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Número de fluxos" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Número de blocos" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Tamanho compactado" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Taxa de compactação média" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Lista separada por vírgulas de nomes de verificação de integridade que estavam presentes nos arquivos" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Tamanho do preenchimento do fluxo" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Número de arquivos. Isso está aqui para manter a ordem das colunas anteriores a mesma das linhas B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Se B<--verbose> for especificado duas vezes, colunas adicionais serão incluídas na linha B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Quantidade máxima de memória (em bytes) necessária para descompactar os arquivos com esta versão do B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "Versões futuras podem adicionar novos tipos de linha e novas colunas podem ser adicionadas aos tipos de linha existentes, mas as colunas existentes não serão alteradas." + +#. type: SS +#: ../src/xz/xz.1 +#, fuzzy, no-wrap +#| msgid "Filter" +msgid "Filters help" +msgstr "Filtro" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "Aceasta este întotdeauna prima linie când începe să se listeze un fișier. A doua coloană de pe linie este numele fișierului." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "Această linie conține informații generale despre fișierul B<.xz>. Această linie este întotdeauna tipărită după linia B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Acest tip de linie este utilizat numai atunci când a fost specificată opțiunea B<--verbose>. Există tot atâtea linii B câte fluxuri există în fișierul B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Acest tip de linie este utilizat numai atunci când a fost specificată opțiunea B<--verbose>. Există tot atâtea linii B câte blocuri există în fișierul B<.xz>. Liniile B sunt afișate după toate liniile B; tipurile diferite de linii nu sunt intercalate." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Acest tip de linie este folosit numai atunci când opțiunea B<--verbose> a fost specificată de două ori. Această linie este afișată după toate liniile B. Ca și linia B, linia B conține informații generale despre fișierul B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Această linie este întotdeauna ultima linie din lista afișată la ieșire. Aceasta arată numărul total și dimensiunile." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Coloanele din liniile B:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Numărul de fluxuri din fișier" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Numărul total de blocuri din fluxuri" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Dimensiunea comprimată a fișierului" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Dimensiunea necomprimată a fișierului" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "Raportul de comprimare, de exemplu, B<0,123>. Dacă raportul este peste 9,999, în locul raportului sunt afișate trei liniuțe (B<--->)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Lista de nume de verificare a integrității, separate prin virgule. Următoarele șiruri sunt utilizate pentru tipurile de verificare cunoscute: B, B, B și B. Pentru tipurile de verificări necunoscute, se utilizează BI, unde I este ID-ul de verificare ca număr zecimal (una sau două cifre)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Dimensiunea totală a umpluturii fluxului din fișier" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Coloanele din liniile B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Numărul fluxului (primul flux este 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Numărul de blocuri din flux" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Poziția de pornire a comprimării" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Poziția de pornire a decomprimării" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Dimensiune comprimată (nu include umplutura fluxului)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Dimensiune necomprimată" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Raport de comprimare" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Numele verificării de integritate" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Dimensiunea umpluturii fluxului" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Coloanele din liniile B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Numărul fluxului care conține acest bloc" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Numărul blocului în raport cu începutul fluxului (primul bloc este 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Numărul blocului în raport cu începutul fișierului" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Poziția de pornire a comprimării în raport cu începutul fișierului" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Poziția de pornire necomprimată în raport cu începutul fișierului" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Dimensiunea totală comprimată a blocului (include antetele)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Dacă opțiunea B<--verbose> a fost specificată de două ori, coloane suplimentare sunt incluse pe liniile B. Acestea nu sunt afișate cu o singură specificare a opțiunii B<--verbose>, deoarece obținerea acestor informații necesită multe căutări și, prin urmare, poate fi lentă:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Valoarea verificării integrității în hexazecimal" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Dimensiunea antetului blocului" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Indicatori de bloc: B indică faptul că este prezentă dimensiunea comprimată, iar B indică faptul că este prezentă dimensiunea necomprimată. Dacă indicatorul nu este determinat, este afișată o liniuță (B<->) pentru a menține lungimea șirului fixă. Pot fi adăugate noi indicatoare la sfârșitul șirului, în viitor." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Dimensiunea datelor comprimate reale din bloc (acest lucru exclude antetul blocului, umplutura blocului și câmpurile de verificare)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Cantitatea de memorie (în octeți) necesară pentru a decomprima acest bloc cu această versiune B" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Lanț de filtrare. Rețineți că majoritatea opțiunilor utilizate în timpul comprimării nu pot fi cunoscute, deoarece doar opțiunile necesare pentru decomprimare sunt stocate în anteturile B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Coloanele din liniile B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Cantitatea de memorie (în octeți) necesară pentru a decomprima acest fișier cu această versiune B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B sau B indicând dacă toate antetele blocurilor au atât dimensiunea comprimată, cât și dimensiunea necomprimată stocate în ele" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I<Începând cu> B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Versiunea B minimă necesară pentru a decomprima fișierul" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "Coloanele din linia B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Numărul de fluxuri" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Numărul de blocuri" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Dimensiunea comprimată" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Raportul mediu de comprimare" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Lista de nume de verificare a integrității, separate prin virgule, care au fost prezente în fișiere" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Dimensiunea umpluturii fluxului" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Numărul de fișiere. Aceasta este aici pentru a păstra ordinea coloanelor anterioare la fel ca pe liniile B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Dacă opțiunea B<--verbose> a fost specificată de două ori, pe linia B sunt incluse coloane suplimentare:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Cantitatea maximă de memorie (în octeți) necesară pentru a decomprima fișierele cu această versiune B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "Versiunile viitoare pot adăuga noi tipuri de linii și pot fi adăugate coloane noi la tipurile de linii existente, dar coloanele existente nu vor fi modificate." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "Ajutor pentru filtrare" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "B afișează filtrele acceptate în următorul format:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (назив)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "Ово је увек први ред приликом почетка листања датотеке. Друга колона у реду је назив датотеке." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (датотека)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "Овај ред садржи свеукупне информације о B<.xz> датотеци. Овај ред се увек исписује после реда B<назив>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (ток)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Ова врста реда се користи само када је B<--verbose> наведено. Има толико редова B<тока> колико има токова у B<.xz> даатотеци." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (блок)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Ова врста реда се користи само када је B<--verbose> наведено. Има онолико редова B<блока> колико има блокова у B<.xz> датотеци. Редови B<блока> се приказују након свих редова B<тока>; различите врсте реда се не преплићу." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (сажетак)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Ова врста реда се користи само када је B<--verbose> наведено два пута. Овај ред се исписује након свих редова B<блока>. Као ред B<датотека>, ред B<сажетка> садржи преглед информација о B<.xz> датотеци." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B (укупност)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Овај ред је увек последњи ред на списку излаза. Показује укупне збирове и величине." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Колоне редова B<датотеке>:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Број токова у датотеци" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Укупан број блокова у току(овима)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Величина запаковане датотеке" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Величина незапаковане датотеке" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "Размера паковања, на пример, B<0.123>. Ако је размера преко 9.999, три цртице (B<--->) се приказују уместо размере." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Зарезом раздвојен списак назива провера целовитости. Следеће ниске се користе за познате врсте провера: B, B, B и B. За непознате врсте провера, користи се BI, где је I ИД провере као децимални број (једна или две цифре)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Укупна величина попуњавања тока у датотеци" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Колоне редова B<тока>:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Број тока (први ток је 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Број блокова у току" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Померај почетка запакованог" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Померај почетка незапаковане" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Величина запакованог (не укључује попуну тока)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Величина незапаковане" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Размера паковања" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Назив провере целовитости" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Величина попуне тока" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Колоне редова B<блока>:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Број тока који садржи овај блок" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Број блока релативан на почетак тока (први блок је 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Број блока релативан на почетак датотеке" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Померај почетка запакованог односан на почетак датотеке" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Померај почетка незапаковане односан на почетак датотеке" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Укупна запакована величина блока (заједно са заглављима)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Ако је B<--verbose> наведено два пута, додатне колоне су укључене у редовима B<блока>. Они се не приказују са једним B<--verbose>, јер добијање ове информације захтева много тражења и стога може бити споро:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Вредност провере целовитости у хексадецималном облику" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Величина заглавља блока" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Заставице блока: B указује да је величина запакованог присутна, а B указује да је величина нераспакованог присутна. Ако заставица није постављена, цртица (B<->) се приказује уместо да се настави са поправком дужине ниске. У будућности нове заставице могу бити додате на крај ниске." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Величина стварних запакованих података у блоку (ово искључује заглавље блока, попуњавање блока и поља провере)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Количина меморије (у бајтовима) потребна за распакивање овог блока са овим B издањем" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Ланац филтера. Знајте да већина опција коришћених за време запакивања не може бити познато, јер се само опције које су потребне за распакивање чувају у B<.xz> заглављима." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Колоне редова B<сажетка>:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Количина меморије (у бајтовима) потребна за распакивање ове датотеке са овим B издањем" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B или B указује да ли сва заглавља блока имају и величину запакованог и величину незапакованог сачуване у њима" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I<Од> B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Потребно је најмање B издање за распакивање датотеке" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "Колоне редова B<укупности>:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Број токова" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Број блокова" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Величина запакованог" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Просечан степен запакивања" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Списак зарезом раздвојених назива провере целовитости која су била присутна у датотекама" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Величина попуњавања тока" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Број датотека. Ту се држи поредак ранијих колона исто као у редовима B<датотеке>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Ако је B<--verbose> наведено два пута, додатне колоне су укључене у реду B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Највећа количина меморије (у бајтима) потребна за распакивање датотеке са овим B издањем" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "Будућа издања могу додати нове врсте реда и нове колоне се могу додати постојећим врстама реда, али постојеће колоне се неће променити." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "Помоћ филтера" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "B исписује подржане филтере у следећем формату:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "Detta är alltid första raden när en fil börjar listas. Den andra kolumen på raden är filnamnet." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "Denna rad innehåller övergripande information om B<.xz>-filen. Denna rad skrivs alltid efter raden B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Denna radtyp används endast när B<--verbose> angetts. Det finns lika många B-rader som det finns strömmar i B<.xz>-filen." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Denna radtyp används bara när B<--verbose> angetts. Det finns lika många B-rader som det finns block i B<.xz>-filen. B-rader visas efter alla B-raderna; olika radtyper blandas inte." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Denna radtyp används bara när B<--verbose> angetts två gånger. Denna rad skrivs eefter alla B-rader. Liksom raden B inenhåller raden B övergripande information om B<.xz>-filen." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Denna rad är alltid den allra sista raden i listutmatningen. Den visar det totala antalen och storlekarna." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Kolumnerna på B-raderna:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Antalet strömmar i filen" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Totalt antal block i strömmarna" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Komprimerad storlek på filen" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Okomprimerad storlek på filen" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "Komprimeringsförhållande, till exempel B<0.123>. Om förhållandet är över 9.999 visas tre bindestreck (B<--->) istället för förhållandet." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Kommaseparerad lista med integritetskontrollnamn. Följande strängar används för de kända kontrolltyperna: B, B, B och B. För okända kontrolltyper används BI, där I är kontroll-ID:t som ett decimalt nummer (en eller två siffror)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Total storlek på strömutfyllnad i filen" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Kolumnerna på B-raderna:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Strömnummer (den första strömmen är 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Antal block i strömmen" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Komprimerat startavstånd" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Okomprimerat startavstånd" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Komprimerad storlek (inkluderar inte strömutfyllnad)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Okomprimerad storlek" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Komprimeringsförhållande" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Namnet på integritetskontrollen" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Storleken på strömutfyllnad" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Kolumnerna på B-raderna:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Numret på strömmen som innehåller detta block" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Blocknummer relativt början på strömmen (det första blocket är 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Blocknummer relativt början på filen" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Komprimerat startavstånd relativt början av filen" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Okomprimerat startavstånd relativt början av filen" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Total komprimerad storlek på blocket (inkluderar huvuden)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Om B<--verbose> angavs två gånger inkluderas ytterligare kolumner på B-raderna. Dessa visas inte med bara ett B<--verbose>, eftersom det för att få fram denna information krävs många sökningar och kan därmed vara långsamt:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Värdet på integritetskontrollen hexadecimalt" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Blockhuvudstorlek" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Blockflaggor: B indikerar att komprimerad storlek finns, och B indikerar att okomprimerad storlek finns. Om flaggan inte är satt visas ett bindestreck (B<->) istället för att hålla stränglängden fast. Nya flaggor kan läggas till i slutet av strängen i frmtiden." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Storlek på den faktiska komprimerade datan i blocket (detta utelämnar blockhuvud, blockutfyllnad och kontrollfält)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Mängd minne (i byte) som behövs för att dekomprimera detta block med denna version av B" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Filterkedja. Observera att de flesta av flaggorna som användes vid komprimeringstillfället inte kan vara kända, eftersom endat de flaggor som behövs för dekomprimering lagras i B<.xz>-huvudet." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Kolumnerna på B-raderna:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Mängd minne (i byte) som behövs för att dekomprimera denna fil med denna version av B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B eller B som indikerar om alla blockhuvuden både har komprimerad storlek och okomprimerad storlek i sig" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Minsta version av B som krävs för att dekomprimera filen" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "Kolumnerna på B-raden:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Antal strömmar" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Antal block" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Komprimerad storlek" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Genomsnittligt komprimeringsförhållande" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Kommaseparerad lista med integritetskontrollnamn som fanns i filerna" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Strömutfyllnadsstorlek" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Antal filer. Denna finns här för att hålla ordningen av de tidigare kolumnerna desamma som på B-rader." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Om B<--verbose> angavs två gånger inkluderas ytterligare kolumner på B-raden:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Maximal mängd minne (i byte) som behövs för att dekomprimera filerna med denna version av B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "Framtida versioner kan lägga till fler radtyper och fler kolumner kan läggas til på de befintliga radtyperna, men de befintliga kolumnerna kommmer inte ändras." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "Filterhjälp" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "B skriver ut de filter som stödjs i följande format:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "Це завжди перший рядок на початку списку файла. Другим стовпчиком у рядку є назва файла." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "У цьому рядку містяться загальні відомості щодо файла B<.xz>. Цей рядок завжди виводять після рядка B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "Цей тип рядка використовують, лише якщо було вказано B<--verbose>. Буде стільки рядків B, скільки потоків у файлі B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "Цей тип рядка використовують, лише якщо було вказано B<--verbose>. Буде стільки рядків B, скільки блоків у файлі B<.xz>. Рядки B буде показано після усіх рядків B; різні типи рядків не перемежовуються." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "Цей тип рядків використовують, лише якщо B<--verbose> було вказано двічі. Цей рядок буде виведено після усіх рядків B. Подібно до рядка B, рядок B містить загальні відомості щодо файла B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "Цей рядок завжди є найостаннішим рядком у виведеному списку. У ньому буде показано загальні кількості та розміри." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Стовпчики у рядках B<файла>:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "Кількість потоків у файлі" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "3." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "Загальна кількість блоків у потоках" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "Розмір стисненого файла" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "5." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "Розмір нестисненого файла" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "6." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "Коефіцієнт стискання, наприклад, B<0.123>. Якщо коефіцієнт перевищує 9.999, замість коефіцієнта буде показано дефіси (B<--->)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "7." + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "Список відокремлених комами назв перевірок цілісності. Наведені нижче рядки використовують для відомих типів перевірок: B, B, B і B. Для невідомих типів перевірок буде використано BI, де I є ідентифікатором перевірки у форматі десяткового числа (одна або дві цифри)." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "8." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "Загальний розмір доповнення потоку у файлі" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Стовпчики у рядках B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "Номер потоку (перший потік має номер 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "Кількість блоків у потоці" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "Зсув початку стисненого" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "Зсув початку нестисненого" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "Стиснений розмір (не включає доповнення потоку)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "Нестиснутий розмір" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "Рівень стискання" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "Назва перевірки цілісності" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "10." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "Розмір доповнення потоку" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Стовпчики у рядках B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "Номер потоку, що містить цей блок" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "Номер блоку відносно початку потоку (перший блок має номер 1)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "Номер блоку відносно початку файла" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "Зсув початку стисненого відносно початку файла" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "Зсув початку нестисненого відносно початку файла" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "Загальний стиснений розмір блоку (включено з заголовками)" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "Якщо B<--verbose> було вказано двічі, до рядків B буде включено додаткові стовпчики. Ці стовпчики не буде показано, якщо вказано одинарний параметр B<--verbose>, оскільки отримання цих відомостей потребує багатьох позиціювань, а ця процедура може бути повільною:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "11." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "Значення перевірки цілісності у шістнадцятковій формі" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "12." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "Розмір заголовка блоку" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "13." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "Прапорці блоку: B вказує, що наявний стиснений розмір, а B вказує, що наявний нестиснений розмір. Якщо прапорець не встановлено, буде показано (B<->) замість підтримання фіксованого розміру рядка. У майбутньому наприкінці рядка може бути додано нові прапорці." + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "14." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "Розмір справжніх стиснених даних у блоці (це включає заголовок блоку, доповнення блоку та поля перевірок)" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "15." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "Об'єм пам'яті (у байтах), який потрібен для розпаковування цього блоку за допомогою цієї версії B" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "16." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "Ланцюжок фільтрів. Зауважте, що більшість параметрів, які використано під час стискання, не є наперед відомим, оскільки у заголовках B<.xz> зберігаються лише параметри, які потрібні для розпаковування." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "Стовпчики у рядках B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "Об'єм пам'яті (у байтах), який потрібен для розпаковування цього файла за допомогою цієї версії B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "B або B вказує, якщо усі заголовки блоків містять одразу стиснений розмір та розпакований розмір" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "I<Починаючи з> B I<5.1.2alpha:>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "Мінімальна версія B, яка потрібна для розпаковування файла" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "Стовпчики рядка B:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "Кількість потоків" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "Кількість блоків" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "Стиснутий розмір" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "Середній коефіцієнт стискання" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "Список відокремлених комами назв перевірок цілісності, результати яких наявні у файлах" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "Розмір доповнення потоку" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "Кількість файлів. Наявний тут для зберігання такого самого порядку стовпчиків, що і у попередніх рядках B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "Якщо B<--verbose> було вказано двічі, до рядка B буде включено додаткові стовпчики:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "Максимальний об'єм пам'яті (у байтах), який потрібен для розпаковування файлів за допомогою цієї версії B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "У майбутніх версіях може бути додано нові типи рядків і нові стовпчики до наявних типів рядків, але наявні стовпчики мають лишитися незмінними." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "Довідка з фільтрування" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "B виведе список підтримуваних фільтрів у такому форматі:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +#. parse, thus the untranslated strings must be included in the translated +#. man page. It may be useful to provide a translated string in parenthesis +#. without bold, for example: "B (nimi)" +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is always the first line when starting to list a file. The second column on the line is the filename." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line contains overall information about the B<.xz> file. This line is always printed after the B line." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are streams in the B<.xz> file." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified. There are as many B lines as there are blocks in the B<.xz> file. The B lines are shown after all the B lines; different line types are not interleaved." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line type is used only when B<--verbose> was specified twice. This line is printed after all B lines. Like the B line, the B line contains overall information about the B<.xz> file." +msgstr "" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This line is always the very last line of the list output. It shows the total counts and sizes." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "2." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams in the file" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "3." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total number of blocks in the stream(s)" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "4." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size of the file" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "5." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size of the file" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "6." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, for example, B<0.123>. If ratio is over 9.999, three dashes (B<--->) are displayed instead of the ratio." +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "7." +msgstr "" + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, B, or B here. In robot mode, xz produces +#. them in untranslated form for scripts to parse. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names. The following strings are used for the known check types: B, B, B, and B. For unknown check types, BI is used, where I is the Check ID as a decimal number (one or two digits)." +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "8." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total size of stream padding in the file" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream number (the first stream is 1)" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks in the stream" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size (does not include stream padding)" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed size" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "9." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Name of the integrity check" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "10." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of stream padding" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of the stream containing this block" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the stream (the first block is 1)" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block number relative to the beginning of the file" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed start offset relative to the beginning of the file" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Uncompressed start offset relative to the beginning of the file" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Total compressed size of the block (includes headers)" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B lines. These are not displayed with a single B<--verbose>, because getting this information requires many seeks and can thus be slow:" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "11." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Value of the integrity check in hexadecimal" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "12." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block header size" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "13." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Block flags: B indicates that compressed size is present, and B indicates that uncompressed size is present. If the flag is not set, a dash (B<->) is shown instead to keep the string length fixed. New flags may be added to the end of the string in the future." +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "14." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Size of the actual compressed data in the block (this excludes the block header, block padding, and check fields)" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "15." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this block with this B version" +msgstr "" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "16." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Filter chain. Note that most of the options used at compression time cannot be known, because only the options that are needed for decompression are stored in the B<.xz> headers." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B lines:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of memory (in bytes) required to decompress this file with this B version" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B or B indicating if all block headers have both compressed size and uncompressed size stored in them" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I B I<5.1.2alpha:>" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum B version required to decompress the file" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The columns of the B line:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of streams" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of blocks" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compressed size" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Average compression ratio" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Comma-separated list of integrity check names that were present in the files" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Stream padding size" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Number of files. This is here to keep the order of the earlier columns the same as on B lines." +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If B<--verbose> was specified twice, additional columns are included on the B line:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Maximum amount of memory (in bytes) required to decompress the files with this B version" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed." +msgstr "" + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filters help" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B prints the supported filters in the following format:" +msgstr "" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IB<:>I, and B are produced by the xz tool for scripts to +.\" parse, thus the untranslated strings must be included in the translated +.\" man page. It may be useful to provide a translated string in parenthesis +.\" without bold, for example: "B (nimi)" +.B name +This is always the first line when starting to list a file. +The second column on the line is the filename. +.TP +.B file +This line contains overall information about the +.B .xz +file. +This line is always printed after the +.B name +line. +.TP +.B stream +This line type is used only when +.B \-\-verbose +was specified. +There are as many +.B stream +lines as there are streams in the +.B .xz +file. +.TP +.B block +This line type is used only when +.B \-\-verbose +was specified. +There are as many +.B block +lines as there are blocks in the +.B .xz +file. +The +.B block +lines are shown after all the +.B stream +lines; different line types are not interleaved. +.TP +.B summary +This line type is used only when +.B \-\-verbose +was specified twice. +This line is printed after all +.B block +lines. +Like the +.B file +line, the +.B summary +line contains overall information about the +.B .xz +file. +.TP +.B totals +This line is always the very last line of the list output. +It shows the total counts and sizes. +.PP +The columns of the +.B file +lines: +.PD 0 +.RS +.IP 2. 4 +Number of streams in the file +.IP 3. 4 +Total number of blocks in the stream(s) +.IP 4. 4 +Compressed size of the file +.IP 5. 4 +Uncompressed size of the file +.IP 6. 4 +Compression ratio, for example, +.BR 0.123 . +If ratio is over 9.999, three dashes +.RB ( \-\-\- ) +are displayed instead of the ratio. +.IP 7. 4 +Comma-separated list of integrity check names. +The following strings are used for the known check types: +.\" TRANSLATORS: Don't translate the bold strings B, B, +.\" B, B, or B here. In robot mode, xz produces +.\" them in untranslated form for scripts to parse. +.BR None , +.BR CRC32 , +.BR CRC64 , +and +.BR SHA\-256 . +For unknown check types, +.BI Unknown\- N +is used, where +.I N +is the Check ID as a decimal number (one or two digits). +.IP 8. 4 +Total size of stream padding in the file +.RE +.PD +.PP +The columns of the +.B stream +lines: +.PD 0 +.RS +.IP 2. 4 +Stream number (the first stream is 1) +.IP 3. 4 +Number of blocks in the stream +.IP 4. 4 +Compressed start offset +.IP 5. 4 +Uncompressed start offset +.IP 6. 4 +Compressed size (does not include stream padding) +.IP 7. 4 +Uncompressed size +.IP 8. 4 +Compression ratio +.IP 9. 4 +Name of the integrity check +.IP 10. 4 +Size of stream padding +.RE +.PD +.PP +The columns of the +.B block +lines: +.PD 0 +.RS +.IP 2. 4 +Number of the stream containing this block +.IP 3. 4 +Block number relative to the beginning of the stream +(the first block is 1) +.IP 4. 4 +Block number relative to the beginning of the file +.IP 5. 4 +Compressed start offset relative to the beginning of the file +.IP 6. 4 +Uncompressed start offset relative to the beginning of the file +.IP 7. 4 +Total compressed size of the block (includes headers) +.IP 8. 4 +Uncompressed size +.IP 9. 4 +Compression ratio +.IP 10. 4 +Name of the integrity check +.RE +.PD +.PP +If +.B \-\-verbose +was specified twice, additional columns are included on the +.B block +lines. +These are not displayed with a single +.BR \-\-verbose , +because getting this information requires many seeks +and can thus be slow: +.PD 0 +.RS +.IP 11. 4 +Value of the integrity check in hexadecimal +.IP 12. 4 +Block header size +.IP 13. 4 +Block flags: +.B c +indicates that compressed size is present, and +.B u +indicates that uncompressed size is present. +If the flag is not set, a dash +.RB ( \- ) +is shown instead to keep the string length fixed. +New flags may be added to the end of the string in the future. +.IP 14. 4 +Size of the actual compressed data in the block (this excludes +the block header, block padding, and check fields) +.IP 15. 4 +Amount of memory (in bytes) required to decompress +this block with this +.B xz +version +.IP 16. 4 +Filter chain. +Note that most of the options used at compression time +cannot be known, because only the options +that are needed for decompression are stored in the +.B .xz +headers. +.RE +.PD +.PP +The columns of the +.B summary +lines: +.PD 0 +.RS +.IP 2. 4 +Amount of memory (in bytes) required to decompress +this file with this +.B xz +version +.IP 3. 4 +.B yes +or +.B no +indicating if all block headers have both compressed size and +uncompressed size stored in them +.PP +.I Since +.B xz +.I 5.1.2alpha: +.IP 4. 4 +Minimum +.B xz +version required to decompress the file +.RE +.PD +.PP +The columns of the +.B totals +line: +.PD 0 +.RS +.IP 2. 4 +Number of streams +.IP 3. 4 +Number of blocks +.IP 4. 4 +Compressed size +.IP 5. 4 +Uncompressed size +.IP 6. 4 +Average compression ratio +.IP 7. 4 +Comma-separated list of integrity check names +that were present in the files +.IP 8. 4 +Stream padding size +.IP 9. 4 +Number of files. +This is here to +keep the order of the earlier columns the same as on +.B file +lines. +.PD +.RE +.PP +If +.B \-\-verbose +was specified twice, additional columns are included on the +.B totals +line: +.PD 0 +.RS +.IP 10. 4 +Maximum amount of memory (in bytes) required to decompress +the files with this +.B xz +version +.IP 11. 4 +.B yes +or +.B no +indicating if all block headers have both compressed size and +uncompressed size stored in them +.PP +.I Since +.B xz +.I 5.1.2alpha: +.IP 12. 4 +Minimum +.B xz +version required to decompress the file +.RE +.PD +.PP +Future versions may add new line types and +new columns can be added to the existing line types, +but the existing columns won't be changed. +. +.SS "Filters help" +.B "xz \-\-robot \-\-filters-help" +prints the supported filters in the following format: +.PP +\fIfilter\fB:\fIoption\fB=<\fIvalue\fB>,\fIoption\fB=<\fIvalue\fB>\fR... +.TP +.I filter +Name of the filter +.TP +.I option +Name of a filter specific option +.TP +.I value +Numeric +.I value +ranges appear as +\fB<\fImin\fB\-\fImax\fB>\fR. +String +.I value +choices are shown within +.B "< >" +and separated by a +.B | +character. +.PP +Each filter is printed on its own line. +. +.SS "Memory limit information" +.B "xz \-\-robot \-\-info\-memory" +prints a single line with multiple tab-separated columns: +.IP 1. 4 +Total amount of physical memory (RAM) in bytes. +.IP 2. 4 +Memory usage limit for compression in bytes +.RB ( \-\-memlimit\-compress ). +A special value of +.B 0 +indicates the default setting +which for single-threaded mode is the same as no limit. +.IP 3. 4 +Memory usage limit for decompression in bytes +.RB ( \-\-memlimit\-decompress ). +A special value of +.B 0 +indicates the default setting +which for single-threaded mode is the same as no limit. +.IP 4. 4 +Since +.B xz +5.3.4alpha: +Memory usage for multi-threaded decompression in bytes +.RB ( \-\-memlimit\-mt\-decompress ). +This is never zero because a system-specific default value +shown in the column 5 +is used if no limit has been specified explicitly. +This is also never greater than the value in the column 3 +even if a larger value has been specified with +.BR \-\-memlimit\-mt\-decompress . +.IP 5. 4 +Since +.B xz +5.3.4alpha: +A system-specific default memory usage limit +that is used to limit the number of threads +when compressing with an automatic number of threads +.RB ( \-\-threads=0 ) +and no memory usage limit has been specified +.RB ( \-\-memlimit\-compress ). +This is also used as the default value for +.BR \-\-memlimit\-mt\-decompress . +.IP 6. 4 +Since +.B xz +5.3.4alpha: +Number of available processor threads. +.PP +In the future, the output of +.B "xz \-\-robot \-\-info\-memory" +may have more columns, but never more than a single line. +. +.SS Version +.B "xz \-\-robot \-\-version" +prints the version number of +.B xz +and liblzma in the following format: +.PP +.\" TRANSLATORS: Don't translate the uppercase XZ_VERSION or LIBLZMA_VERSION. +.BI XZ_VERSION= XYYYZZZS +.br +.BI LIBLZMA_VERSION= XYYYZZZS +.TP +.I X +Major version. +.TP +.I YYY +Minor version. +Even numbers are stable. +Odd numbers are alpha or beta versions. +.TP +.I ZZZ +Patch level for stable releases or +just a counter for development releases. +.TP +.I S +Stability. +0 is alpha, 1 is beta, and 2 is stable. +.I S +should be always 2 when +.I YYY +is even. +.PP +.I XYYYZZZS +are the same on both lines if +.B xz +and liblzma are from the same XZ Utils release. +.PP +Examples: 4.999.9beta is +.B 49990091 +and +5.0.0 is +.BR 50000002 . +. +.SH "EXIT STATUS" +.TP +.B 0 +All is good. +.TP +.B 1 +An error occurred. +.TP +.B 2 +Something worth a warning occurred, +but no actual errors occurred. +.PP +Notices (not warnings or errors) printed on standard error +don't affect the exit status. +. +.SH ENVIRONMENT +.B xz +parses space-separated lists of options +from the environment variables +.\" TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS or XZ_OPT. +.\" They are names of environment variables. +.B XZ_DEFAULTS +and +.BR XZ_OPT , +in this order, before parsing the options from the command line. +Note that only options are parsed from the environment variables; +all non-options are silently ignored. +Parsing is done with +.BR getopt_long (3) +which is used also for the command line arguments. +.PP +.B Warning: +By setting these environment variables, +one is effectively modifying programs and scripts that run +.BR xz . +Most of the time it is safe to set memory usage limits, number of threads, +and compression options via the environment variables. +However, some options can break scripts. +An obvious example is +.B \-\-help +which makes +.B xz +show the help text instead of compressing or decompressing a file. +More subtle examples are +.B \-\-quiet +and +.BR \-\-verbose . +In many cases it works well to enable the progress indicator using +.BR \-\-verbose , +but in some situations the extra messages create problems. +The verbosity level also affects the behavior of +.BR \-\-list . +.TP +.B XZ_DEFAULTS +User-specific or system-wide default options. +Typically this is set in a shell initialization script to enable +.BR xz 's +memory usage limiter by default or set the default number of threads. +Excluding shell initialization scripts +and similar special cases, scripts should never set or unset +.BR XZ_DEFAULTS . +.TP +.B XZ_OPT +This is for passing options to +.B xz +when it is not possible to set the options directly on the +.B xz +command line. +This is the case when +.B xz +is run by a script or tool, for example, GNU +.BR tar (1): +.RS +.RS +.PP +.nf +.ft CR +XZ_OPT=\-2v tar caf foo.tar.xz foo +.ft R +.fi +.RE +.RE +.IP "" +Scripts may use +.BR XZ_OPT , +for example, to set script-specific default compression options. +It is still recommended to allow users to override +.B XZ_OPT +if that is reasonable. +For example, in +.BR sh (1) +scripts one may use something like this: +.RS +.RS +.PP +.nf +.ft CR +XZ_OPT=${XZ_OPT\-"\-7e"} +export XZ_OPT +.ft R +.fi +.RE +.RE +. +.SH "LZMA UTILS COMPATIBILITY" +The command line syntax of +.B xz +is practically a superset of +.BR lzma , +.BR unlzma , +and +.B lzcat +as found from LZMA Utils 4.32.x. +In most cases, it is possible to replace +LZMA Utils with XZ Utils without breaking existing scripts. +There are some incompatibilities though, +which may sometimes cause problems. +. +.SS "Compression preset levels" +The numbering of the compression level presets is not identical in +.B xz +and LZMA Utils. +The most important difference is how dictionary sizes +are mapped to different presets. +Dictionary size is roughly equal to the decompressor memory usage. +.RS +.PP +.TS +tab(;); +c c c +c n n. +Level;xz;LZMA Utils +\-0;256 KiB;N/A +\-1;1 MiB;64 KiB +\-2;2 MiB;1 MiB +\-3;4 MiB;512 KiB +\-4;4 MiB;1 MiB +\-5;8 MiB;2 MiB +\-6;8 MiB;4 MiB +\-7;16 MiB;8 MiB +\-8;32 MiB;16 MiB +\-9;64 MiB;32 MiB +.TE +.RE +.PP +The dictionary size differences affect +the compressor memory usage too, +but there are some other differences between +LZMA Utils and XZ Utils, which +make the difference even bigger: +.RS +.PP +.TS +tab(;); +c c c +c n n. +Level;xz;LZMA Utils 4.32.x +\-0;3 MiB;N/A +\-1;9 MiB;2 MiB +\-2;17 MiB;12 MiB +\-3;32 MiB;12 MiB +\-4;48 MiB;16 MiB +\-5;94 MiB;26 MiB +\-6;94 MiB;45 MiB +\-7;186 MiB;83 MiB +\-8;370 MiB;159 MiB +\-9;674 MiB;311 MiB +.TE +.RE +.PP +The default preset level in LZMA Utils is +.B \-7 +while in XZ Utils it is +.BR \-6 , +so both use an 8 MiB dictionary by default. +. +.SS "Streamed vs. non-streamed .lzma files" +The uncompressed size of the file can be stored in the +.B .lzma +header. +LZMA Utils does that when compressing regular files. +The alternative is to mark that uncompressed size is unknown +and use end-of-payload marker to indicate +where the decompressor should stop. +LZMA Utils uses this method when uncompressed size isn't known, +which is the case, for example, in pipes. +.PP +.B xz +supports decompressing +.B .lzma +files with or without end-of-payload marker, but all +.B .lzma +files created by +.B xz +will use end-of-payload marker and have uncompressed size +marked as unknown in the +.B .lzma +header. +This may be a problem in some uncommon situations. +For example, a +.B .lzma +decompressor in an embedded device might work +only with files that have known uncompressed size. +If you hit this problem, you need to use LZMA Utils +or LZMA SDK to create +.B .lzma +files with known uncompressed size. +. +.SS "Unsupported .lzma files" +The +.B .lzma +format allows +.I lc +values up to 8, and +.I lp +values up to 4. +LZMA Utils can decompress files with any +.I lc +and +.IR lp , +but always creates files with +.B lc=3 +and +.BR lp=0 . +Creating files with other +.I lc +and +.I lp +is possible with +.B xz +and with LZMA SDK. +.PP +The implementation of the LZMA1 filter in liblzma +requires that the sum of +.I lc +and +.I lp +must not exceed 4. +Thus, +.B .lzma +files, which exceed this limitation, cannot be decompressed with +.BR xz . +.PP +LZMA Utils creates only +.B .lzma +files which have a dictionary size of +.RI "2^" n +(a power of 2) but accepts files with any dictionary size. +liblzma accepts only +.B .lzma +files which have a dictionary size of +.RI "2^" n +or +.RI "2^" n " + 2^(" n "\-1)." +This is to decrease false positives when detecting +.B .lzma +files. +.PP +These limitations shouldn't be a problem in practice, +since practically all +.B .lzma +files have been compressed with settings that liblzma will accept. +. +.SS "Trailing garbage" +When decompressing, +LZMA Utils silently ignore everything after the first +.B .lzma +stream. +In most situations, this is a bug. +This also means that LZMA Utils +don't support decompressing concatenated +.B .lzma +files. +.PP +If there is data left after the first +.B .lzma +stream, +.B xz +considers the file to be corrupt unless +.B \-\-single\-stream +was used. +This may break obscure scripts which have +assumed that trailing garbage is ignored. +. +.SH NOTES +. +.SS "Compressed output may vary" +The exact compressed output produced from +the same uncompressed input file +may vary between XZ Utils versions even if +compression options are identical. +This is because the encoder can be improved +(faster or better compression) +without affecting the file format. +The output can vary even between different +builds of the same XZ Utils version, +if different build options are used. +.PP +The above means that once +.B \-\-rsyncable +has been implemented, +the resulting files won't necessarily be rsyncable +unless both old and new files have been compressed +with the same xz version. +This problem can be fixed if a part of the encoder +implementation is frozen to keep rsyncable output +stable across xz versions. +. +.SS "Embedded .xz decompressors" +Embedded +.B .xz +decompressor implementations like XZ Embedded don't necessarily +support files created with integrity +.I check +types other than +.B none +and +.BR crc32 . +Since the default is +.BR \-\-check=crc64 , +you must use +.B \-\-check=none +or +.B \-\-check=crc32 +when creating files for embedded systems. +.PP +Outside embedded systems, all +.B .xz +format decompressors support all the +.I check +types, or at least are able to decompress +the file without verifying the +integrity check if the particular +.I check +is not supported. +.PP +XZ Embedded supports BCJ filters, +but only with the default start offset. +. +.SH EXAMPLES +. +.SS Basics +Compress the file +.I foo +into +.I foo.xz +using the default compression level +.RB ( \-6 ), +and remove +.I foo +if compression is successful: +.RS +.PP +.nf +.ft CR +xz foo +.ft R +.fi +.RE +.PP +Decompress +.I bar.xz +into +.I bar +and don't remove +.I bar.xz +even if decompression is successful: +.RS +.PP +.nf +.ft CR +xz \-dk bar.xz +.ft R +.fi +.RE +.PP +Create +.I baz.tar.xz +with the preset +.B \-4e +.RB ( "\-4 \-\-extreme" ), +which is slower than the default +.BR \-6 , +but needs less memory for compression and decompression (48\ MiB +and 5\ MiB, respectively): +.RS +.PP +.nf +.ft CR +tar cf \- baz | xz \-4e > baz.tar.xz +.ft R +.fi +.RE +.PP +A mix of compressed and uncompressed files can be decompressed +to standard output with a single command: +.RS +.PP +.nf +.ft CR +xz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt +.ft R +.fi +.RE +. +.SS "Parallel compression of many files" +On GNU and *BSD, +.BR find (1) +and +.BR xargs (1) +can be used to parallelize compression of many files: +.RS +.PP +.nf +.ft CR +find . \-type f \e! \-name '*.xz' \-print0 \e + | xargs \-0r \-P4 \-n16 xz \-T1 +.ft R +.fi +.RE +.PP +The +.B \-P +option to +.BR xargs (1) +sets the number of parallel +.B xz +processes. +The best value for the +.B \-n +option depends on how many files there are to be compressed. +If there are only a couple of files, +the value should probably be 1; +with tens of thousands of files, +100 or even more may be appropriate to reduce the number of +.B xz +processes that +.BR xargs (1) +will eventually create. +.PP +The option +.B \-T1 +for +.B xz +is there to force it to single-threaded mode, because +.BR xargs (1) +is used to control the amount of parallelization. +. +.SS "Robot mode" +Calculate how many bytes have been saved in total +after compressing multiple files: +.RS +.PP +.nf +.ft CR +xz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}' +.ft R +.fi +.RE +.PP +A script may want to know that it is using new enough +.BR xz . +The following +.BR sh (1) +script checks that the version number of the +.B xz +tool is at least 5.0.0. +This method is compatible with old beta versions, +which didn't support the +.B \-\-robot +option: +.RS +.PP +.nf +.ft CR +if ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || + [ "$XZ_VERSION" \-lt 50000002 ]; then + echo "Your xz is too old." +fi +unset XZ_VERSION LIBLZMA_VERSION +.ft R +.fi +.RE +.PP +Set a memory usage limit for decompression using +.BR XZ_OPT , +but if a limit has already been set, don't increase it: +.RS +.PP +.nf +.ft CR +NEWLIM=$((123 << 20))\ \ # 123 MiB +OLDLIM=$(xz \-\-robot \-\-info\-memory | cut \-f3) +if [ $OLDLIM \-eq 0 \-o $OLDLIM \-gt $NEWLIM ]; then + XZ_OPT="$XZ_OPT \-\-memlimit\-decompress=$NEWLIM" + export XZ_OPT +fi +.ft R +.fi +.RE +. +.SS "Custom compressor filter chains" +The simplest use for custom filter chains is +customizing a LZMA2 preset. +This can be useful, +because the presets cover only a subset of the +potentially useful combinations of compression settings. +.PP +The CompCPU columns of the tables +from the descriptions of the options +.BR "\-0" " ... " "\-9" +and +.B \-\-extreme +are useful when customizing LZMA2 presets. +Here are the relevant parts collected from those two tables: +.RS +.PP +.TS +tab(;); +c c +n n. +Preset;CompCPU +\-0;0 +\-1;1 +\-2;2 +\-3;3 +\-4;4 +\-5;5 +\-6;6 +\-5e;7 +\-6e;8 +.TE +.RE +.PP +If you know that a file requires +somewhat big dictionary (for example, 32\ MiB) to compress well, +but you want to compress it quicker than +.B "xz \-8" +would do, a preset with a low CompCPU value (for example, 1) +can be modified to use a bigger dictionary: +.RS +.PP +.nf +.ft CR +xz \-\-lzma2=preset=1,dict=32MiB foo.tar +.ft R +.fi +.RE +.PP +With certain files, the above command may be faster than +.B "xz \-6" +while compressing significantly better. +However, it must be emphasized that only some files benefit from +a big dictionary while keeping the CompCPU value low. +The most obvious situation, +where a big dictionary can help a lot, +is an archive containing very similar files +of at least a few megabytes each. +The dictionary size has to be significantly bigger +than any individual file to allow LZMA2 to take +full advantage of the similarities between consecutive files. +.PP +If very high compressor and decompressor memory usage is fine, +and the file being compressed is +at least several hundred megabytes, it may be useful +to use an even bigger dictionary than the 64 MiB that +.B "xz \-9" +would use: +.RS +.PP +.nf +.ft CR +xz \-vv \-\-lzma2=dict=192MiB big_foo.tar +.ft R +.fi +.RE +.PP +Using +.B \-vv +.RB ( "\-\-verbose \-\-verbose" ) +like in the above example can be useful +to see the memory requirements +of the compressor and decompressor. +Remember that using a dictionary bigger than +the size of the uncompressed file is waste of memory, +so the above command isn't useful for small files. +.PP +Sometimes the compression time doesn't matter, +but the decompressor memory usage has to be kept low, for example, +to make it possible to decompress the file on an embedded system. +The following command uses +.B \-6e +.RB ( "\-6 \-\-extreme" ) +as a base and sets the dictionary to only 64\ KiB. +The resulting file can be decompressed with XZ Embedded +(that's why there is +.BR \-\-check=crc32 ) +using about 100\ KiB of memory. +.RS +.PP +.nf +.ft CR +xz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo +.ft R +.fi +.RE +.PP +If you want to squeeze out as many bytes as possible, +adjusting the number of literal context bits +.RI ( lc ) +and number of position bits +.RI ( pb ) +can sometimes help. +Adjusting the number of literal position bits +.RI ( lp ) +might help too, but usually +.I lc +and +.I pb +are more important. +For example, a source code archive contains mostly US-ASCII text, +so something like the following might give +slightly (like 0.1\ %) smaller file than +.B "xz \-6e" +(try also without +.BR lc=4 ): +.RS +.PP +.nf +.ft CR +xz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar +.ft R +.fi +.RE +.PP +Using another filter together with LZMA2 can improve +compression with certain file types. +For example, to compress a x86-32 or x86-64 shared library +using the x86 BCJ filter: +.RS +.PP +.nf +.ft CR +xz \-\-x86 \-\-lzma2 libfoo.so +.ft R +.fi +.RE +.PP +Note that the order of the filter options is significant. +If +.B \-\-x86 +is specified after +.BR \-\-lzma2 , +.B xz +will give an error, +because there cannot be any filter after LZMA2, +and also because the x86 BCJ filter cannot be used +as the last filter in the chain. +.PP +The Delta filter together with LZMA2 +can give good results with bitmap images. +It should usually beat PNG, +which has a few more advanced filters than simple +delta but uses Deflate for the actual compression. +.PP +The image has to be saved in uncompressed format, +for example, as uncompressed TIFF. +The distance parameter of the Delta filter is set +to match the number of bytes per pixel in the image. +For example, 24-bit RGB bitmap needs +.BR dist=3 , +and it is also good to pass +.B pb=0 +to LZMA2 to accommodate the three-byte alignment: +.RS +.PP +.nf +.ft CR +xz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff +.ft R +.fi +.RE +.PP +If multiple images have been put into a single archive (for example, +.BR .tar ), +the Delta filter will work on that too as long as all images +have the same number of bytes per pixel. +. +.SH "SEE ALSO" +.BR xzdec (1), +.BR xzdiff (1), +.BR xzgrep (1), +.BR xzless (1), +.BR xzmore (1), +.BR gzip (1), +.BR bzip2 (1), +.BR 7z (1) +.PP +XZ Utils: +.br +XZ Embedded: +.br +LZMA SDK: diff --git a/cpp/third_party/xz-5.8.3/src/xz/xz_w32res.rc b/cpp/third_party/xz-5.8.3/src/xz/xz_w32res.rc new file mode 100644 index 0000000000..e80903eb72 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/src/xz/xz_w32res.rc @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: 0BSD */ + +/* + * Author: Lasse Collin + */ + +#define MY_TYPE VFT_APP +#define MY_NAME "xz" +#define MY_SUFFIX ".exe" +#define MY_DESC "xz data compression tool for .xz and .lzma files" +#include "common_w32res.rc" diff --git a/cpp/third_party/xz-5.8.3/src/xzdec/Makefile.am b/cpp/third_party/xz-5.8.3/src/xzdec/Makefile.am new file mode 100644 index 0000000000..c2810479ac --- /dev/null +++ b/cpp/third_party/xz-5.8.3/src/xzdec/Makefile.am @@ -0,0 +1,111 @@ +## SPDX-License-Identifier: 0BSD +## Author: Lasse Collin + +# Windows resource compiler support. It's fine to use xz_CPPFLAGS +# also for lzmadec. +.rc.o: + $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(xzdec_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ + + +xzdec_SOURCES = \ + xzdec.c \ + ../common/tuklib_progname.c \ + ../common/tuklib_mbstr_nonprint.c \ + ../common/tuklib_exit.c + +if COND_W32 +xzdec_SOURCES += xzdec_w32res.rc +endif + +xzdec_CPPFLAGS = \ + -DTUKLIB_GETTEXT=0 \ + -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/liblzma/api +xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la + +if COND_GNULIB +xzdec_CPPFLAGS += \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib +xzdec_LDADD += $(top_builddir)/lib/libgnu.a +endif + +xzdec_LDADD += $(LTLIBINTL) + + +lzmadec_SOURCES = \ + xzdec.c \ + ../common/tuklib_progname.c \ + ../common/tuklib_mbstr_nonprint.c \ + ../common/tuklib_exit.c + +if COND_W32 +lzmadec_SOURCES += lzmadec_w32res.rc +endif + +lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC +lzmadec_LDFLAGS = $(xzdec_LDFLAGS) +lzmadec_LDADD = $(xzdec_LDADD) + + +bin_PROGRAMS = +lzmadecmanlink = + +if COND_XZDEC +bin_PROGRAMS += xzdec +dist_man_MANS = xzdec.1 +endif + +if COND_LZMADEC +bin_PROGRAMS += lzmadec + +# Create the symlink lzmadec.1->xzdec.1 only if xzdec.1 was installed. +# This is better than creating a dangling symlink. The correct solution +# would be to install xzdec.1 as lzmadec.1 but this code is already too +# complicated so I won't do it. Installing only lzmadec is a bit unusual +# situation anyway so it's not that important. +if COND_XZDEC +lzmadecmanlink += lzmadec +endif +endif + +if COND_XZDEC +# The installation of translated man pages abuses Automake internals +# by calling "install-man" with redefined dist_man_MANS and man_MANS. +# If this breaks some day, don't blame Automake developers. +install-data-hook: + languages= ; \ + if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \ + languages=`ls "$(top_srcdir)/po4a/man"`; \ + fi; \ + target=`echo xzdec | sed '$(transform)'` && \ + link=`echo lzmadec | sed '$(transform)'` && \ + for lang in . $$languages; do \ + man="$(top_srcdir)/po4a/man/$$lang/xzdec.1" ; \ + if test -f "$$man"; then \ + $(MAKE) dist_man_MANS="$$man" man_MANS= \ + mandir="$(mandir)/$$lang" install-man; \ + fi; \ + man1dir="$(DESTDIR)$(mandir)/$$lang/man1" && \ + if test -f "$$man1dir/$$target.1"; then \ + if test -n "$(lzmadecmanlink)"; then ( \ + cd "$$man1dir" && \ + rm -f "$$link.1" && \ + $(LN_S) "$$target.1" "$$link.1" \ + ); fi; \ + fi; \ + done + +uninstall-hook: + languages= ; \ + if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \ + languages=`ls "$(top_srcdir)/po4a/man"`; \ + fi; \ + for lang in . $$languages; do \ + for name in xzdec $(lzmadecmanlink); do \ + name=`echo $$name | sed '$(transform)'` && \ + rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$name.1"; \ + done; \ + done +endif diff --git a/cpp/third_party/xz-5.8.3/src/xzdec/Makefile.in b/cpp/third_party/xz-5.8.3/src/xzdec/Makefile.in new file mode 100644 index 0000000000..ae52f881ed --- /dev/null +++ b/cpp/third_party/xz-5.8.3/src/xzdec/Makefile.in @@ -0,0 +1,1019 @@ +# Makefile.in generated by automake 1.18.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2025 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@COND_W32_TRUE@am__append_1 = xzdec_w32res.rc +@COND_GNULIB_TRUE@am__append_2 = \ +@COND_GNULIB_TRUE@ -I$(top_builddir)/lib \ +@COND_GNULIB_TRUE@ -I$(top_srcdir)/lib + +@COND_GNULIB_TRUE@am__append_3 = $(top_builddir)/lib/libgnu.a +@COND_W32_TRUE@am__append_4 = lzmadec_w32res.rc +bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +@COND_XZDEC_TRUE@am__append_5 = xzdec +@COND_LZMADEC_TRUE@am__append_6 = lzmadec + +# Create the symlink lzmadec.1->xzdec.1 only if xzdec.1 was installed. +# This is better than creating a dangling symlink. The correct solution +# would be to install xzdec.1 as lzmadec.1 but this code is already too +# complicated so I won't do it. Installing only lzmadec is a bit unusual +# situation anyway so it's not that important. +@COND_LZMADEC_TRUE@@COND_XZDEC_TRUE@am__append_7 = lzmadec +subdir = src/xzdec +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/build-to-host.m4 $(top_srcdir)/m4/getopt.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/posix-shell.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/tuklib_common.m4 \ + $(top_srcdir)/m4/tuklib_cpucores.m4 \ + $(top_srcdir)/m4/tuklib_integer.m4 \ + $(top_srcdir)/m4/tuklib_mbstr.m4 \ + $(top_srcdir)/m4/tuklib_physmem.m4 \ + $(top_srcdir)/m4/tuklib_progname.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@COND_XZDEC_TRUE@am__EXEEXT_1 = xzdec$(EXEEXT) +@COND_LZMADEC_TRUE@am__EXEEXT_2 = lzmadec$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +PROGRAMS = $(bin_PROGRAMS) +am__lzmadec_SOURCES_DIST = xzdec.c ../common/tuklib_progname.c \ + ../common/tuklib_mbstr_nonprint.c ../common/tuklib_exit.c \ + lzmadec_w32res.rc +@COND_W32_TRUE@am__objects_1 = lzmadec_w32res.$(OBJEXT) +am_lzmadec_OBJECTS = lzmadec-xzdec.$(OBJEXT) \ + lzmadec-tuklib_progname.$(OBJEXT) \ + lzmadec-tuklib_mbstr_nonprint.$(OBJEXT) \ + lzmadec-tuklib_exit.$(OBJEXT) $(am__objects_1) +lzmadec_OBJECTS = $(am_lzmadec_OBJECTS) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__append_3) $(am__DEPENDENCIES_1) +lzmadec_DEPENDENCIES = $(am__DEPENDENCIES_2) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +lzmadec_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(lzmadec_LDFLAGS) $(LDFLAGS) -o $@ +am__xzdec_SOURCES_DIST = xzdec.c ../common/tuklib_progname.c \ + ../common/tuklib_mbstr_nonprint.c ../common/tuklib_exit.c \ + xzdec_w32res.rc +@COND_W32_TRUE@am__objects_2 = xzdec_w32res.$(OBJEXT) +am_xzdec_OBJECTS = xzdec-xzdec.$(OBJEXT) \ + xzdec-tuklib_progname.$(OBJEXT) \ + xzdec-tuklib_mbstr_nonprint.$(OBJEXT) \ + xzdec-tuklib_exit.$(OBJEXT) $(am__objects_2) +xzdec_OBJECTS = $(am_xzdec_OBJECTS) +xzdec_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__append_3) $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/lzmadec-tuklib_exit.Po \ + ./$(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Po \ + ./$(DEPDIR)/lzmadec-tuklib_progname.Po \ + ./$(DEPDIR)/lzmadec-xzdec.Po ./$(DEPDIR)/xzdec-tuklib_exit.Po \ + ./$(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Po \ + ./$(DEPDIR)/xzdec-tuklib_progname.Po \ + ./$(DEPDIR)/xzdec-xzdec.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(lzmadec_SOURCES) $(xzdec_SOURCES) +DIST_SOURCES = $(am__lzmadec_SOURCES_DIST) $(am__xzdec_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ + } +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(dist_man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETOPT_H = @GETOPT_H@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINKER_FLAG_UNDEFINED_VERSION = @LINKER_FLAG_UNDEFINED_VERSION@ +LIPO = @LIPO@ +LN_EXEEXT = @LN_EXEEXT@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSIX_SHELL = @POSIX_SHELL@ +POSUB = @POSUB@ +PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CXX = @PTHREAD_CXX@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_path_for_scripts = @enable_path_for_scripts@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xz = @xz@ +xzdec_SOURCES = xzdec.c ../common/tuklib_progname.c \ + ../common/tuklib_mbstr_nonprint.c ../common/tuklib_exit.c \ + $(am__append_1) +xzdec_CPPFLAGS = -DTUKLIB_GETTEXT=0 -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/liblzma/api $(am__append_2) +xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la $(am__append_3) \ + $(LTLIBINTL) +lzmadec_SOURCES = xzdec.c ../common/tuklib_progname.c \ + ../common/tuklib_mbstr_nonprint.c ../common/tuklib_exit.c \ + $(am__append_4) +lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC +lzmadec_LDFLAGS = $(xzdec_LDFLAGS) +lzmadec_LDADD = $(xzdec_LDADD) +lzmadecmanlink = $(am__append_7) +@COND_XZDEC_TRUE@dist_man_MANS = xzdec.1 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj .rc +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xzdec/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/xzdec/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files + +clean-binPROGRAMS: + $(am__rm_f) $(bin_PROGRAMS) + test -z "$(EXEEXT)" || $(am__rm_f) $(bin_PROGRAMS:$(EXEEXT)=) + +lzmadec$(EXEEXT): $(lzmadec_OBJECTS) $(lzmadec_DEPENDENCIES) $(EXTRA_lzmadec_DEPENDENCIES) + @rm -f lzmadec$(EXEEXT) + $(AM_V_CCLD)$(lzmadec_LINK) $(lzmadec_OBJECTS) $(lzmadec_LDADD) $(LIBS) + +xzdec$(EXEEXT): $(xzdec_OBJECTS) $(xzdec_DEPENDENCIES) $(EXTRA_xzdec_DEPENDENCIES) + @rm -f xzdec$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xzdec_OBJECTS) $(xzdec_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmadec-tuklib_exit.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmadec-tuklib_progname.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmadec-xzdec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzdec-tuklib_exit.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzdec-tuklib_progname.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzdec-xzdec.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @: >>$@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +lzmadec-xzdec.o: xzdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-xzdec.o -MD -MP -MF $(DEPDIR)/lzmadec-xzdec.Tpo -c -o lzmadec-xzdec.o `test -f 'xzdec.c' || echo '$(srcdir)/'`xzdec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-xzdec.Tpo $(DEPDIR)/lzmadec-xzdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xzdec.c' object='lzmadec-xzdec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-xzdec.o `test -f 'xzdec.c' || echo '$(srcdir)/'`xzdec.c + +lzmadec-xzdec.obj: xzdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-xzdec.obj -MD -MP -MF $(DEPDIR)/lzmadec-xzdec.Tpo -c -o lzmadec-xzdec.obj `if test -f 'xzdec.c'; then $(CYGPATH_W) 'xzdec.c'; else $(CYGPATH_W) '$(srcdir)/xzdec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-xzdec.Tpo $(DEPDIR)/lzmadec-xzdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xzdec.c' object='lzmadec-xzdec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-xzdec.obj `if test -f 'xzdec.c'; then $(CYGPATH_W) 'xzdec.c'; else $(CYGPATH_W) '$(srcdir)/xzdec.c'; fi` + +lzmadec-tuklib_progname.o: ../common/tuklib_progname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_progname.o -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_progname.Tpo -c -o lzmadec-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-tuklib_progname.Tpo $(DEPDIR)/lzmadec-tuklib_progname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='lzmadec-tuklib_progname.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c + +lzmadec-tuklib_progname.obj: ../common/tuklib_progname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_progname.Tpo -c -o lzmadec-tuklib_progname.obj `if test -f '../common/tuklib_progname.c'; then $(CYGPATH_W) '../common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_progname.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-tuklib_progname.Tpo $(DEPDIR)/lzmadec-tuklib_progname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='lzmadec-tuklib_progname.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_progname.obj `if test -f '../common/tuklib_progname.c'; then $(CYGPATH_W) '../common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_progname.c'; fi` + +lzmadec-tuklib_mbstr_nonprint.o: ../common/tuklib_mbstr_nonprint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_mbstr_nonprint.o -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Tpo -c -o lzmadec-tuklib_mbstr_nonprint.o `test -f '../common/tuklib_mbstr_nonprint.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_nonprint.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Tpo $(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_nonprint.c' object='lzmadec-tuklib_mbstr_nonprint.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_mbstr_nonprint.o `test -f '../common/tuklib_mbstr_nonprint.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_nonprint.c + +lzmadec-tuklib_mbstr_nonprint.obj: ../common/tuklib_mbstr_nonprint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_mbstr_nonprint.obj -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Tpo -c -o lzmadec-tuklib_mbstr_nonprint.obj `if test -f '../common/tuklib_mbstr_nonprint.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_nonprint.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_nonprint.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Tpo $(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_nonprint.c' object='lzmadec-tuklib_mbstr_nonprint.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_mbstr_nonprint.obj `if test -f '../common/tuklib_mbstr_nonprint.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_nonprint.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_nonprint.c'; fi` + +lzmadec-tuklib_exit.o: ../common/tuklib_exit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_exit.o -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_exit.Tpo -c -o lzmadec-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-tuklib_exit.Tpo $(DEPDIR)/lzmadec-tuklib_exit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='lzmadec-tuklib_exit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c + +lzmadec-tuklib_exit.obj: ../common/tuklib_exit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_exit.Tpo -c -o lzmadec-tuklib_exit.obj `if test -f '../common/tuklib_exit.c'; then $(CYGPATH_W) '../common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_exit.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmadec-tuklib_exit.Tpo $(DEPDIR)/lzmadec-tuklib_exit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='lzmadec-tuklib_exit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_exit.obj `if test -f '../common/tuklib_exit.c'; then $(CYGPATH_W) '../common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_exit.c'; fi` + +xzdec-xzdec.o: xzdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-xzdec.o -MD -MP -MF $(DEPDIR)/xzdec-xzdec.Tpo -c -o xzdec-xzdec.o `test -f 'xzdec.c' || echo '$(srcdir)/'`xzdec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-xzdec.Tpo $(DEPDIR)/xzdec-xzdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xzdec.c' object='xzdec-xzdec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-xzdec.o `test -f 'xzdec.c' || echo '$(srcdir)/'`xzdec.c + +xzdec-xzdec.obj: xzdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-xzdec.obj -MD -MP -MF $(DEPDIR)/xzdec-xzdec.Tpo -c -o xzdec-xzdec.obj `if test -f 'xzdec.c'; then $(CYGPATH_W) 'xzdec.c'; else $(CYGPATH_W) '$(srcdir)/xzdec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-xzdec.Tpo $(DEPDIR)/xzdec-xzdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xzdec.c' object='xzdec-xzdec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-xzdec.obj `if test -f 'xzdec.c'; then $(CYGPATH_W) 'xzdec.c'; else $(CYGPATH_W) '$(srcdir)/xzdec.c'; fi` + +xzdec-tuklib_progname.o: ../common/tuklib_progname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_progname.o -MD -MP -MF $(DEPDIR)/xzdec-tuklib_progname.Tpo -c -o xzdec-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-tuklib_progname.Tpo $(DEPDIR)/xzdec-tuklib_progname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='xzdec-tuklib_progname.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c + +xzdec-tuklib_progname.obj: ../common/tuklib_progname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/xzdec-tuklib_progname.Tpo -c -o xzdec-tuklib_progname.obj `if test -f '../common/tuklib_progname.c'; then $(CYGPATH_W) '../common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_progname.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-tuklib_progname.Tpo $(DEPDIR)/xzdec-tuklib_progname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='xzdec-tuklib_progname.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_progname.obj `if test -f '../common/tuklib_progname.c'; then $(CYGPATH_W) '../common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_progname.c'; fi` + +xzdec-tuklib_mbstr_nonprint.o: ../common/tuklib_mbstr_nonprint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_mbstr_nonprint.o -MD -MP -MF $(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Tpo -c -o xzdec-tuklib_mbstr_nonprint.o `test -f '../common/tuklib_mbstr_nonprint.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_nonprint.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Tpo $(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_nonprint.c' object='xzdec-tuklib_mbstr_nonprint.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_mbstr_nonprint.o `test -f '../common/tuklib_mbstr_nonprint.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_nonprint.c + +xzdec-tuklib_mbstr_nonprint.obj: ../common/tuklib_mbstr_nonprint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_mbstr_nonprint.obj -MD -MP -MF $(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Tpo -c -o xzdec-tuklib_mbstr_nonprint.obj `if test -f '../common/tuklib_mbstr_nonprint.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_nonprint.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_nonprint.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Tpo $(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_nonprint.c' object='xzdec-tuklib_mbstr_nonprint.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_mbstr_nonprint.obj `if test -f '../common/tuklib_mbstr_nonprint.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_nonprint.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_nonprint.c'; fi` + +xzdec-tuklib_exit.o: ../common/tuklib_exit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_exit.o -MD -MP -MF $(DEPDIR)/xzdec-tuklib_exit.Tpo -c -o xzdec-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-tuklib_exit.Tpo $(DEPDIR)/xzdec-tuklib_exit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='xzdec-tuklib_exit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c + +xzdec-tuklib_exit.obj: ../common/tuklib_exit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/xzdec-tuklib_exit.Tpo -c -o xzdec-tuklib_exit.obj `if test -f '../common/tuklib_exit.c'; then $(CYGPATH_W) '../common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_exit.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xzdec-tuklib_exit.Tpo $(DEPDIR)/xzdec-tuklib_exit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='xzdec-tuklib_exit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_exit.obj `if test -f '../common/tuklib_exit.c'; then $(CYGPATH_W) '../common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_exit.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(dist_man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +@COND_XZDEC_FALSE@install-data-hook: +@COND_XZDEC_FALSE@uninstall-hook: +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/lzmadec-tuklib_exit.Po + -rm -f ./$(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Po + -rm -f ./$(DEPDIR)/lzmadec-tuklib_progname.Po + -rm -f ./$(DEPDIR)/lzmadec-xzdec.Po + -rm -f ./$(DEPDIR)/xzdec-tuklib_exit.Po + -rm -f ./$(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Po + -rm -f ./$(DEPDIR)/xzdec-tuklib_progname.Po + -rm -f ./$(DEPDIR)/xzdec-xzdec.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/lzmadec-tuklib_exit.Po + -rm -f ./$(DEPDIR)/lzmadec-tuklib_mbstr_nonprint.Po + -rm -f ./$(DEPDIR)/lzmadec-tuklib_progname.Po + -rm -f ./$(DEPDIR)/lzmadec-xzdec.Po + -rm -f ./$(DEPDIR)/xzdec-tuklib_exit.Po + -rm -f ./$(DEPDIR)/xzdec-tuklib_mbstr_nonprint.Po + -rm -f ./$(DEPDIR)/xzdec-tuklib_progname.Po + -rm -f ./$(DEPDIR)/xzdec-xzdec.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +uninstall-man: uninstall-man1 + +.MAKE: install-am install-data-am install-strip uninstall-am + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-hook \ + uninstall-man uninstall-man1 + +.PRECIOUS: Makefile + + +# Windows resource compiler support. It's fine to use xz_CPPFLAGS +# also for lzmadec. +.rc.o: + $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(xzdec_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ + +# The installation of translated man pages abuses Automake internals +# by calling "install-man" with redefined dist_man_MANS and man_MANS. +# If this breaks some day, don't blame Automake developers. +@COND_XZDEC_TRUE@install-data-hook: +@COND_XZDEC_TRUE@ languages= ; \ +@COND_XZDEC_TRUE@ if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \ +@COND_XZDEC_TRUE@ languages=`ls "$(top_srcdir)/po4a/man"`; \ +@COND_XZDEC_TRUE@ fi; \ +@COND_XZDEC_TRUE@ target=`echo xzdec | sed '$(transform)'` && \ +@COND_XZDEC_TRUE@ link=`echo lzmadec | sed '$(transform)'` && \ +@COND_XZDEC_TRUE@ for lang in . $$languages; do \ +@COND_XZDEC_TRUE@ man="$(top_srcdir)/po4a/man/$$lang/xzdec.1" ; \ +@COND_XZDEC_TRUE@ if test -f "$$man"; then \ +@COND_XZDEC_TRUE@ $(MAKE) dist_man_MANS="$$man" man_MANS= \ +@COND_XZDEC_TRUE@ mandir="$(mandir)/$$lang" install-man; \ +@COND_XZDEC_TRUE@ fi; \ +@COND_XZDEC_TRUE@ man1dir="$(DESTDIR)$(mandir)/$$lang/man1" && \ +@COND_XZDEC_TRUE@ if test -f "$$man1dir/$$target.1"; then \ +@COND_XZDEC_TRUE@ if test -n "$(lzmadecmanlink)"; then ( \ +@COND_XZDEC_TRUE@ cd "$$man1dir" && \ +@COND_XZDEC_TRUE@ rm -f "$$link.1" && \ +@COND_XZDEC_TRUE@ $(LN_S) "$$target.1" "$$link.1" \ +@COND_XZDEC_TRUE@ ); fi; \ +@COND_XZDEC_TRUE@ fi; \ +@COND_XZDEC_TRUE@ done + +@COND_XZDEC_TRUE@uninstall-hook: +@COND_XZDEC_TRUE@ languages= ; \ +@COND_XZDEC_TRUE@ if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \ +@COND_XZDEC_TRUE@ languages=`ls "$(top_srcdir)/po4a/man"`; \ +@COND_XZDEC_TRUE@ fi; \ +@COND_XZDEC_TRUE@ for lang in . $$languages; do \ +@COND_XZDEC_TRUE@ for name in xzdec $(lzmadecmanlink); do \ +@COND_XZDEC_TRUE@ name=`echo $$name | sed '$(transform)'` && \ +@COND_XZDEC_TRUE@ rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$name.1"; \ +@COND_XZDEC_TRUE@ done; \ +@COND_XZDEC_TRUE@ done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/cpp/third_party/xz-5.8.3/src/xzdec/lzmadec_w32res.rc b/cpp/third_party/xz-5.8.3/src/xzdec/lzmadec_w32res.rc new file mode 100644 index 0000000000..b4b89b1f30 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/src/xzdec/lzmadec_w32res.rc @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: 0BSD */ + +/* + * Author: Lasse Collin + */ + +#define MY_TYPE VFT_APP +#define MY_NAME "lzmadec" +#define MY_SUFFIX ".exe" +#define MY_DESC "lzmadec decompression tool for .lzma files" +#include "common_w32res.rc" diff --git a/cpp/third_party/xz-5.8.3/src/xzdec/xzdec.1 b/cpp/third_party/xz-5.8.3/src/xzdec/xzdec.1 new file mode 100644 index 0000000000..5198efb461 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/src/xzdec/xzdec.1 @@ -0,0 +1,144 @@ +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Author: Lasse Collin +.\" +.TH XZDEC 1 "2024-04-08" "Tukaani" "XZ Utils" +.SH NAME +xzdec, lzmadec \- Small .xz and .lzma decompressors +.SH SYNOPSIS +.B xzdec +.RI [ option... ] +.RI [ file... ] +.br +.B lzmadec +.RI [ option... ] +.RI [ file... ] +.SH DESCRIPTION +.B xzdec +is a liblzma-based decompression-only tool for +.B .xz +(and only +.BR .xz ) +files. +.B xzdec +is intended to work as a drop-in replacement for +.BR xz (1) +in the most common situations where a script +has been written to use +.B "xz \-\-decompress \-\-stdout" +(and possibly a few other commonly used options) to decompress +.B .xz +files. +.B lzmadec +is identical to +.B xzdec +except that +.B lzmadec +supports +.B .lzma +files instead of +.B .xz +files. +.PP +To reduce the size of the executable, +.B xzdec +doesn't support multithreading or localization, +and doesn't read options from +.B XZ_DEFAULTS +and +.B XZ_OPT +environment variables. +.B xzdec +doesn't support displaying intermediate progress information: sending +.B SIGINFO +to +.B xzdec +does nothing, but sending +.B SIGUSR1 +terminates the process instead of displaying progress information. +.SH OPTIONS +.TP +.BR \-d ", " \-\-decompress ", " \-\-uncompress +Ignored for +.BR xz (1) +compatibility. +.B xzdec +supports only decompression. +.TP +.BR \-k ", " \-\-keep +Ignored for +.BR xz (1) +compatibility. +.B xzdec +never creates or removes any files. +.TP +.BR \-c ", " \-\-stdout ", " \-\-to-stdout +Ignored for +.BR xz (1) +compatibility. +.B xzdec +always writes the decompressed data to standard output. +.TP +.BR \-q ", " \-\-quiet +Specifying this once does nothing since +.B xzdec +never displays any warnings or notices. +Specify this twice to suppress errors. +.TP +.BR \-Q ", " \-\-no-warn +Ignored for +.BR xz (1) +compatibility. +.B xzdec +never uses the exit status 2. +.TP +.BR \-h ", " \-\-help +Display a help message and exit successfully. +.TP +.BR \-V ", " \-\-version +Display the version number of +.B xzdec +and liblzma. +.SH "EXIT STATUS" +.TP +.B 0 +All was good. +.TP +.B 1 +An error occurred. +.PP +.B xzdec +doesn't have any warning messages like +.BR xz (1) +has, thus the exit status 2 is not used by +.BR xzdec . +.SH NOTES +Use +.BR xz (1) +instead of +.B xzdec +or +.B lzmadec +for normal everyday use. +.B xzdec +or +.B lzmadec +are meant only for situations where it is important to have +a smaller decompressor than the full-featured +.BR xz (1). +.PP +.B xzdec +and +.B lzmadec +are not really that small. +The size can be reduced further by dropping +features from liblzma at compile time, +but that shouldn't usually be done for executables distributed +in typical non-embedded operating system distributions. +If you need a truly small +.B .xz +decompressor, consider using XZ Embedded. +.SH "SEE ALSO" +.BR xz (1) +.PP +XZ Embedded: diff --git a/cpp/third_party/xz-5.8.3/src/xzdec/xzdec.c b/cpp/third_party/xz-5.8.3/src/xzdec/xzdec.c new file mode 100644 index 0000000000..e1e2744911 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/src/xzdec/xzdec.c @@ -0,0 +1,489 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file xzdec.c +/// \brief Simple single-threaded tool to uncompress .xz or .lzma files +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "sysdefs.h" +#include "lzma.h" + +#include +#include +#include +#include + +#ifndef _MSC_VER +# include +#endif + +#ifdef HAVE_CAP_RIGHTS_LIMIT +# include +#endif + +#ifdef HAVE_LINUX_LANDLOCK +# include "my_landlock.h" +#endif + +#if defined(HAVE_CAP_RIGHTS_LIMIT) || defined(HAVE_PLEDGE) \ + || defined(HAVE_LINUX_LANDLOCK) +# define ENABLE_SANDBOX 1 +#endif + +#include "getopt.h" +#include "tuklib_progname.h" +#include "tuklib_mbstr_nonprint.h" +#include "tuklib_exit.h" + +#ifdef TUKLIB_DOSLIKE +# include +# include +# ifdef _MSC_VER +# define fileno _fileno +# define setmode _setmode +# endif +#endif + + +#ifdef LZMADEC +# define TOOL_FORMAT "lzma" +#else +# define TOOL_FORMAT "xz" +#endif + + +/// Error messages are suppressed if this is zero, which is the case when +/// --quiet has been given at least twice. +static int display_errors = 2; + + +lzma_attribute((__format__(__printf__, 1, 2))) +static void +my_errorf(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + + if (display_errors) { + fprintf(stderr, "%s: ", progname); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + } + + va_end(ap); + return; +} + + +tuklib_attr_noreturn +static void +help(void) +{ + printf( +"Usage: %s [OPTION]... [FILE]...\n" +"Decompress files in the ." TOOL_FORMAT " format to standard output.\n" +"\n" +" -d, --decompress (ignored, only decompression is supported)\n" +" -k, --keep (ignored, files are never deleted)\n" +" -c, --stdout (ignored, output is always written to standard output)\n" +" -q, --quiet specify *twice* to suppress errors\n" +" -Q, --no-warn (ignored, the exit status 2 is never used)\n" +" -h, --help display this help and exit\n" +" -V, --version display the version number and exit\n" +"\n" +"With no FILE, or when FILE is -, read standard input.\n" +"\n" +"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n" +PACKAGE_NAME " home page: <" PACKAGE_URL ">\n", progname); + + tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors); +} + + +tuklib_attr_noreturn +static void +version(void) +{ + printf(TOOL_FORMAT "dec (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n" + "liblzma %s\n", lzma_version_string()); + + tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors); +} + + +/// Parses command line options. +static void +parse_options(int argc, char **argv) +{ + static const char short_opts[] = "cdkhqQV"; + static const struct option long_opts[] = { + { "stdout", no_argument, NULL, 'c' }, + { "to-stdout", no_argument, NULL, 'c' }, + { "decompress", no_argument, NULL, 'd' }, + { "uncompress", no_argument, NULL, 'd' }, + { "keep", no_argument, NULL, 'k' }, + { "quiet", no_argument, NULL, 'q' }, + { "no-warn", no_argument, NULL, 'Q' }, + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'V' }, + { NULL, 0, NULL, 0 } + }; + + int c; + + while ((c = getopt_long(argc, argv, short_opts, long_opts, NULL)) + != -1) { + switch (c) { + case 'c': + case 'd': + case 'k': + case 'Q': + break; + + case 'q': + if (display_errors > 0) + --display_errors; + + break; + + case 'h': + help(); + + case 'V': + version(); + + default: + exit(EXIT_FAILURE); + } + } + + return; +} + + +static void +uncompress(lzma_stream *strm, FILE *file, const char *filename) +{ + lzma_ret ret; + + // Initialize the decoder +#ifdef LZMADEC + ret = lzma_alone_decoder(strm, UINT64_MAX); +#else + ret = lzma_stream_decoder(strm, UINT64_MAX, LZMA_CONCATENATED); +#endif + + // The only reasonable error here is LZMA_MEM_ERROR. + if (ret != LZMA_OK) { + my_errorf("%s", ret == LZMA_MEM_ERROR ? strerror(ENOMEM) + : "Internal error (bug)"); + exit(EXIT_FAILURE); + } + + // Input and output buffers + uint8_t in_buf[BUFSIZ]; + uint8_t out_buf[BUFSIZ]; + + strm->avail_in = 0; + strm->next_out = out_buf; + strm->avail_out = BUFSIZ; + + lzma_action action = LZMA_RUN; + + while (true) { + if (strm->avail_in == 0) { + strm->next_in = in_buf; + strm->avail_in = fread(in_buf, 1, BUFSIZ, file); + + if (ferror(file)) { + // POSIX says that fread() sets errno if + // an error occurred. ferror() doesn't + // touch errno. + my_errorf("%s: Error reading input file: %s", + tuklib_mask_nonprint(filename), + strerror(errno)); + exit(EXIT_FAILURE); + } + +#ifndef LZMADEC + // When using LZMA_CONCATENATED, we need to tell + // liblzma when it has got all the input. + if (feof(file)) + action = LZMA_FINISH; +#endif + } + + ret = lzma_code(strm, action); + + // Write and check write error before checking decoder error. + // This way as much data as possible gets written to output + // even if decoder detected an error. + if (strm->avail_out == 0 || ret != LZMA_OK) { + const size_t write_size = BUFSIZ - strm->avail_out; + + if (fwrite(out_buf, 1, write_size, stdout) + != write_size) { + // Wouldn't be a surprise if writing to stderr + // would fail too but at least try to show an + // error message. +#if defined(_WIN32) && !defined(__CYGWIN__) + // On native Windows, broken pipe is reported + // as EINVAL. Don't show an error message + // in this case. + if (errno != EINVAL) +#endif + { + my_errorf("Cannot write to " + "standard output: " + "%s", strerror(errno)); + } + exit(EXIT_FAILURE); + } + + strm->next_out = out_buf; + strm->avail_out = BUFSIZ; + } + + if (ret != LZMA_OK) { + if (ret == LZMA_STREAM_END) { +#ifdef LZMADEC + // Check that there's no trailing garbage. + if (strm->avail_in != 0 + || fread(in_buf, 1, 1, file) + != 0 + || !feof(file)) + ret = LZMA_DATA_ERROR; + else + return; +#else + // lzma_stream_decoder() already guarantees + // that there's no trailing garbage. + assert(strm->avail_in == 0); + assert(action == LZMA_FINISH); + assert(feof(file)); + return; +#endif + } + + const char *msg; + switch (ret) { + case LZMA_MEM_ERROR: + msg = strerror(ENOMEM); + break; + + case LZMA_FORMAT_ERROR: + msg = "File format not recognized"; + break; + + case LZMA_OPTIONS_ERROR: + // FIXME: Better message? + msg = "Unsupported compression options"; + break; + + case LZMA_DATA_ERROR: + msg = "File is corrupt"; + break; + + case LZMA_BUF_ERROR: + msg = "Unexpected end of input"; + break; + + default: + msg = "Internal error (bug)"; + break; + } + + my_errorf("%s: %s", tuklib_mask_nonprint(filename), + msg); + exit(EXIT_FAILURE); + } + } +} + + +#ifdef ENABLE_SANDBOX +static void +sandbox_enter(int src_fd) +{ +#if defined(HAVE_CAP_RIGHTS_LIMIT) + // Capsicum needs FreeBSD 10.2 or later. + cap_rights_t rights; + + if (cap_enter()) + goto error; + + if (cap_rights_limit(src_fd, cap_rights_init(&rights, CAP_READ))) + goto error; + + // If not reading from stdin, remove all capabilities from it. + if (src_fd != STDIN_FILENO && cap_rights_limit( + STDIN_FILENO, cap_rights_init(&rights))) + goto error; + + if (cap_rights_limit(STDOUT_FILENO, cap_rights_init(&rights, + CAP_WRITE))) + goto error; + + if (cap_rights_limit(STDERR_FILENO, cap_rights_init(&rights, + CAP_WRITE))) + goto error; + +#elif defined(HAVE_PLEDGE) + // pledge() was introduced in OpenBSD 5.9. + if (pledge("stdio", "")) + goto error; + + (void)src_fd; + +#elif defined(HAVE_LINUX_LANDLOCK) + struct landlock_ruleset_attr attr; + if (my_landlock_ruleset_attr_forbid_all(&attr) > 0) { + const int ruleset_fd = my_landlock_create_ruleset( + &attr, sizeof(attr), 0); + if (ruleset_fd < 0) + goto error; + + // All files we need should have already been opened. Thus, + // we don't need to add any rules using landlock_add_rule(2) + // before activating the sandbox. + if (my_landlock_restrict_self(ruleset_fd, 0) != 0) + goto error; + + (void)close(ruleset_fd); + } + + (void)src_fd; + +#else +# error ENABLE_SANDBOX is defined but no sandboxing method was found. +#endif + + return; + +error: +#ifdef HAVE_CAP_RIGHTS_LIMIT + // If a kernel is configured without capability mode support or + // used in an emulator that does not implement the capability + // system calls, then the Capsicum system calls will fail and set + // errno to ENOSYS. In that case xzdec will silently run without + // the sandbox. + if (errno == ENOSYS) + return; +#endif + + my_errorf("Failed to enable the sandbox"); + exit(EXIT_FAILURE); +} +#endif + + +int +main(int argc, char **argv) +{ + // Initialize progname which will be used in error messages. + tuklib_progname_init(argv); + +#ifdef HAVE_PLEDGE + // OpenBSD's pledge(2) sandbox. + // Initially enable the sandbox slightly more relaxed so that + // the process can still open files. This allows the sandbox to + // be enabled when parsing command line arguments and decompressing + // all files (the more strict sandbox only restricts the last file + // that is decompressed). + if (pledge("stdio rpath", "")) { + my_errorf("Failed to enable the sandbox"); + exit(EXIT_FAILURE); + } +#endif + +#ifdef HAVE_LINUX_LANDLOCK + // Prevent the process from gaining new privileges. This must be done + // before landlock_restrict_self(2) but since we will never need new + // privileges, this call can be done here already. + // + // This is supported since Linux 3.5. Ignore the return value to + // keep compatibility with old kernels. landlock_restrict_self(2) + // will fail if the no_new_privs attribute isn't set, thus if prctl() + // fails here the error will still be detected when it matters. + (void)prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); +#endif + + // We need to set the locale even though we don't have any + // translated messages: + // + // - tuklib_mask_nonprint() has locale-specific behavior (LC_CTYPE). + // + // - This is needed on Windows to make non-ASCII filenames display + // properly when the active code page has been set to UTF-8 + // in the application manifest. + setlocale(LC_ALL, ""); + + // Parse the command line options. + parse_options(argc, argv); + + // The same lzma_stream is used for all files that we decode. This way + // we don't need to reallocate memory for every file if they use same + // compression settings. + lzma_stream strm = LZMA_STREAM_INIT; + + // Some systems require setting stdin and stdout to binary mode. +#ifdef TUKLIB_DOSLIKE + setmode(fileno(stdin), O_BINARY); + setmode(fileno(stdout), O_BINARY); +#endif + + if (optind == argc) { + // No filenames given, decode from stdin. +#ifdef ENABLE_SANDBOX + sandbox_enter(STDIN_FILENO); +#endif + uncompress(&strm, stdin, "(stdin)"); + } else { + // Loop through the filenames given on the command line. + do { + FILE *src_file; + const char *src_name; + + // "-" indicates stdin. + if (strcmp(argv[optind], "-") == 0) { + src_file = stdin; + src_name = "(stdin)"; + } else { + src_name = argv[optind]; + src_file = fopen(src_name, "rb"); + if (src_file == NULL) { + my_errorf("%s: %s", + tuklib_mask_nonprint( + src_name), + strerror(errno)); + exit(EXIT_FAILURE); + } + } +#ifdef ENABLE_SANDBOX + // Enable the strict sandbox for the last file. + // Then the process can no longer open additional + // files. The typical xzdec use case is to decompress + // a single file so this way the strictest sandboxing + // is used in most cases. + if (optind == argc - 1) + sandbox_enter(fileno(src_file)); +#endif + uncompress(&strm, src_file, src_name); + + if (src_file != stdin) + (void)fclose(src_file); + } while (++optind < argc); + } + +#ifndef NDEBUG + // Free the memory only when debugging. Freeing wastes some time, + // but allows detecting possible memory leaks with Valgrind. + lzma_end(&strm); +#endif + + tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors); +} diff --git a/cpp/third_party/xz-5.8.3/src/xzdec/xzdec_w32res.rc b/cpp/third_party/xz-5.8.3/src/xzdec/xzdec_w32res.rc new file mode 100644 index 0000000000..fdbb102439 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/src/xzdec/xzdec_w32res.rc @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: 0BSD */ + +/* + * Author: Lasse Collin + */ + +#define MY_TYPE VFT_APP +#define MY_NAME "xzdec" +#define MY_SUFFIX ".exe" +#define MY_DESC "xzdec decompression tool for .xz files" +#include "common_w32res.rc" diff --git a/cpp/third_party/xz-5.8.3/tests/Makefile.am b/cpp/third_party/xz-5.8.3/tests/Makefile.am new file mode 100644 index 0000000000..15dc16a8ea --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/Makefile.am @@ -0,0 +1,83 @@ +## SPDX-License-Identifier: 0BSD +## Author: Lasse Collin + +EXTRA_DIST = \ + files \ + ossfuzz \ + tests.cmake \ + tuktest.h \ + tests.h \ + tests_w32res.rc \ + test_files.sh \ + test_compress.sh \ + test_compress_generated_abc \ + test_compress_generated_random \ + test_compress_generated_text \ + test_scripts.sh \ + test_suffix.sh \ + xzgrep_expected_output + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/liblzma/api \ + -I$(top_srcdir)/src/liblzma + +LDADD = $(top_builddir)/src/liblzma/liblzma.la + +LDADD += $(LTLIBINTL) + +# Windows resource compiler support +.rc.o: + $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ + +if COND_W32 +LDADD += tests_w32res.o +endif + +check_PROGRAMS = \ + create_compress_files \ + test_check \ + test_hardware \ + test_stream_flags \ + test_filter_flags \ + test_filter_str \ + test_block_header \ + test_index \ + test_index_hash \ + test_bcj_exact_size \ + test_memlimit \ + test_lzip_decoder \ + test_vli + +TESTS = \ + test_check \ + test_hardware \ + test_stream_flags \ + test_filter_flags \ + test_filter_str \ + test_block_header \ + test_index \ + test_index_hash \ + test_bcj_exact_size \ + test_memlimit \ + test_lzip_decoder \ + test_vli \ + test_files.sh \ + test_suffix.sh \ + test_compress_generated_abc \ + test_compress_generated_random \ + test_compress_generated_text + +if COND_MICROLZMA +check_PROGRAMS += test_microlzma +TESTS += test_microlzma +endif + +if COND_SCRIPTS +TESTS += test_scripts.sh +endif + +clean-local: + -rm -f compress_generated_* \ + xzgrep_test_output xzgrep_test_1.xz xzgrep_test_2.xz diff --git a/cpp/third_party/xz-5.8.3/tests/Makefile.in b/cpp/third_party/xz-5.8.3/tests/Makefile.in new file mode 100644 index 0000000000..ae3927e075 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/Makefile.in @@ -0,0 +1,1414 @@ +# Makefile.in generated by automake 1.18.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2025 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@COND_W32_TRUE@am__append_1 = tests_w32res.o +check_PROGRAMS = create_compress_files$(EXEEXT) test_check$(EXEEXT) \ + test_hardware$(EXEEXT) test_stream_flags$(EXEEXT) \ + test_filter_flags$(EXEEXT) test_filter_str$(EXEEXT) \ + test_block_header$(EXEEXT) test_index$(EXEEXT) \ + test_index_hash$(EXEEXT) test_bcj_exact_size$(EXEEXT) \ + test_memlimit$(EXEEXT) test_lzip_decoder$(EXEEXT) \ + test_vli$(EXEEXT) $(am__EXEEXT_1) +TESTS = test_check$(EXEEXT) test_hardware$(EXEEXT) \ + test_stream_flags$(EXEEXT) test_filter_flags$(EXEEXT) \ + test_filter_str$(EXEEXT) test_block_header$(EXEEXT) \ + test_index$(EXEEXT) test_index_hash$(EXEEXT) \ + test_bcj_exact_size$(EXEEXT) test_memlimit$(EXEEXT) \ + test_lzip_decoder$(EXEEXT) test_vli$(EXEEXT) test_files.sh \ + test_suffix.sh test_compress_generated_abc \ + test_compress_generated_random test_compress_generated_text \ + $(am__EXEEXT_1) $(am__append_4) +@COND_MICROLZMA_TRUE@am__append_2 = test_microlzma +@COND_MICROLZMA_TRUE@am__append_3 = test_microlzma +@COND_SCRIPTS_TRUE@am__append_4 = test_scripts.sh +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/build-to-host.m4 $(top_srcdir)/m4/getopt.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/posix-shell.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/tuklib_common.m4 \ + $(top_srcdir)/m4/tuklib_cpucores.m4 \ + $(top_srcdir)/m4/tuklib_integer.m4 \ + $(top_srcdir)/m4/tuklib_mbstr.m4 \ + $(top_srcdir)/m4/tuklib_physmem.m4 \ + $(top_srcdir)/m4/tuklib_progname.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@COND_MICROLZMA_TRUE@am__EXEEXT_1 = test_microlzma$(EXEEXT) +create_compress_files_SOURCES = create_compress_files.c +create_compress_files_OBJECTS = create_compress_files.$(OBJEXT) +create_compress_files_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +create_compress_files_DEPENDENCIES = \ + $(top_builddir)/src/liblzma/liblzma.la $(am__DEPENDENCIES_1) \ + $(am__append_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +test_bcj_exact_size_SOURCES = test_bcj_exact_size.c +test_bcj_exact_size_OBJECTS = test_bcj_exact_size.$(OBJEXT) +test_bcj_exact_size_LDADD = $(LDADD) +test_bcj_exact_size_DEPENDENCIES = \ + $(top_builddir)/src/liblzma/liblzma.la $(am__DEPENDENCIES_1) \ + $(am__append_1) +test_block_header_SOURCES = test_block_header.c +test_block_header_OBJECTS = test_block_header.$(OBJEXT) +test_block_header_LDADD = $(LDADD) +test_block_header_DEPENDENCIES = \ + $(top_builddir)/src/liblzma/liblzma.la $(am__DEPENDENCIES_1) \ + $(am__append_1) +test_check_SOURCES = test_check.c +test_check_OBJECTS = test_check.$(OBJEXT) +test_check_LDADD = $(LDADD) +test_check_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +test_filter_flags_SOURCES = test_filter_flags.c +test_filter_flags_OBJECTS = test_filter_flags.$(OBJEXT) +test_filter_flags_LDADD = $(LDADD) +test_filter_flags_DEPENDENCIES = \ + $(top_builddir)/src/liblzma/liblzma.la $(am__DEPENDENCIES_1) \ + $(am__append_1) +test_filter_str_SOURCES = test_filter_str.c +test_filter_str_OBJECTS = test_filter_str.$(OBJEXT) +test_filter_str_LDADD = $(LDADD) +test_filter_str_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +test_hardware_SOURCES = test_hardware.c +test_hardware_OBJECTS = test_hardware.$(OBJEXT) +test_hardware_LDADD = $(LDADD) +test_hardware_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +test_index_SOURCES = test_index.c +test_index_OBJECTS = test_index.$(OBJEXT) +test_index_LDADD = $(LDADD) +test_index_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +test_index_hash_SOURCES = test_index_hash.c +test_index_hash_OBJECTS = test_index_hash.$(OBJEXT) +test_index_hash_LDADD = $(LDADD) +test_index_hash_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +test_lzip_decoder_SOURCES = test_lzip_decoder.c +test_lzip_decoder_OBJECTS = test_lzip_decoder.$(OBJEXT) +test_lzip_decoder_LDADD = $(LDADD) +test_lzip_decoder_DEPENDENCIES = \ + $(top_builddir)/src/liblzma/liblzma.la $(am__DEPENDENCIES_1) \ + $(am__append_1) +test_memlimit_SOURCES = test_memlimit.c +test_memlimit_OBJECTS = test_memlimit.$(OBJEXT) +test_memlimit_LDADD = $(LDADD) +test_memlimit_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +test_microlzma_SOURCES = test_microlzma.c +test_microlzma_OBJECTS = test_microlzma.$(OBJEXT) +test_microlzma_LDADD = $(LDADD) +test_microlzma_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +test_stream_flags_SOURCES = test_stream_flags.c +test_stream_flags_OBJECTS = test_stream_flags.$(OBJEXT) +test_stream_flags_LDADD = $(LDADD) +test_stream_flags_DEPENDENCIES = \ + $(top_builddir)/src/liblzma/liblzma.la $(am__DEPENDENCIES_1) \ + $(am__append_1) +test_vli_SOURCES = test_vli.c +test_vli_OBJECTS = test_vli.$(OBJEXT) +test_vli_LDADD = $(LDADD) +test_vli_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ + $(am__DEPENDENCIES_1) $(am__append_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/create_compress_files.Po \ + ./$(DEPDIR)/test_bcj_exact_size.Po \ + ./$(DEPDIR)/test_block_header.Po ./$(DEPDIR)/test_check.Po \ + ./$(DEPDIR)/test_filter_flags.Po \ + ./$(DEPDIR)/test_filter_str.Po ./$(DEPDIR)/test_hardware.Po \ + ./$(DEPDIR)/test_index.Po ./$(DEPDIR)/test_index_hash.Po \ + ./$(DEPDIR)/test_lzip_decoder.Po ./$(DEPDIR)/test_memlimit.Po \ + ./$(DEPDIR)/test_microlzma.Po ./$(DEPDIR)/test_stream_flags.Po \ + ./$(DEPDIR)/test_vli.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = create_compress_files.c test_bcj_exact_size.c \ + test_block_header.c test_check.c test_filter_flags.c \ + test_filter_str.c test_hardware.c test_index.c \ + test_index_hash.c test_lzip_decoder.c test_memlimit.c \ + test_microlzma.c test_stream_flags.c test_vli.c +DIST_SOURCES = create_compress_files.c test_bcj_exact_size.c \ + test_block_header.c test_check.c test_filter_flags.c \ + test_filter_str.c test_hardware.c test_index.c \ + test_index_hash.c test_lzip_decoder.c test_memlimit.c \ + test_microlzma.c test_stream_flags.c test_vli.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + $$am__collect_skipped_logs \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer-defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(IGNORE_SKIPPED_LOGS)'; then \ + am__collect_skipped_logs='--collect-skipped-logs no'; \ +else \ + am__collect_skipped_logs=''; \ +fi; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_CFLAGS = @AM_CFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETOPT_H = @GETOPT_H@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINKER_FLAG_UNDEFINED_VERSION = @LINKER_FLAG_UNDEFINED_VERSION@ +LIPO = @LIPO@ +LN_EXEEXT = @LN_EXEEXT@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSIX_SHELL = @POSIX_SHELL@ +POSUB = @POSUB@ +PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CXX = @PTHREAD_CXX@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_path_for_scripts = @enable_path_for_scripts@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xz = @xz@ +EXTRA_DIST = \ + files \ + ossfuzz \ + tests.cmake \ + tuktest.h \ + tests.h \ + tests_w32res.rc \ + test_files.sh \ + test_compress.sh \ + test_compress_generated_abc \ + test_compress_generated_random \ + test_compress_generated_text \ + test_scripts.sh \ + test_suffix.sh \ + xzgrep_expected_output + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/liblzma/api \ + -I$(top_srcdir)/src/liblzma + +LDADD = $(top_builddir)/src/liblzma/liblzma.la $(LTLIBINTL) \ + $(am__append_1) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .rc .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + $(am__rm_f) $(check_PROGRAMS) + test -z "$(EXEEXT)" || $(am__rm_f) $(check_PROGRAMS:$(EXEEXT)=) + +create_compress_files$(EXEEXT): $(create_compress_files_OBJECTS) $(create_compress_files_DEPENDENCIES) $(EXTRA_create_compress_files_DEPENDENCIES) + @rm -f create_compress_files$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(create_compress_files_OBJECTS) $(create_compress_files_LDADD) $(LIBS) + +test_bcj_exact_size$(EXEEXT): $(test_bcj_exact_size_OBJECTS) $(test_bcj_exact_size_DEPENDENCIES) $(EXTRA_test_bcj_exact_size_DEPENDENCIES) + @rm -f test_bcj_exact_size$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bcj_exact_size_OBJECTS) $(test_bcj_exact_size_LDADD) $(LIBS) + +test_block_header$(EXEEXT): $(test_block_header_OBJECTS) $(test_block_header_DEPENDENCIES) $(EXTRA_test_block_header_DEPENDENCIES) + @rm -f test_block_header$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_block_header_OBJECTS) $(test_block_header_LDADD) $(LIBS) + +test_check$(EXEEXT): $(test_check_OBJECTS) $(test_check_DEPENDENCIES) $(EXTRA_test_check_DEPENDENCIES) + @rm -f test_check$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_check_OBJECTS) $(test_check_LDADD) $(LIBS) + +test_filter_flags$(EXEEXT): $(test_filter_flags_OBJECTS) $(test_filter_flags_DEPENDENCIES) $(EXTRA_test_filter_flags_DEPENDENCIES) + @rm -f test_filter_flags$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_filter_flags_OBJECTS) $(test_filter_flags_LDADD) $(LIBS) + +test_filter_str$(EXEEXT): $(test_filter_str_OBJECTS) $(test_filter_str_DEPENDENCIES) $(EXTRA_test_filter_str_DEPENDENCIES) + @rm -f test_filter_str$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_filter_str_OBJECTS) $(test_filter_str_LDADD) $(LIBS) + +test_hardware$(EXEEXT): $(test_hardware_OBJECTS) $(test_hardware_DEPENDENCIES) $(EXTRA_test_hardware_DEPENDENCIES) + @rm -f test_hardware$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_hardware_OBJECTS) $(test_hardware_LDADD) $(LIBS) + +test_index$(EXEEXT): $(test_index_OBJECTS) $(test_index_DEPENDENCIES) $(EXTRA_test_index_DEPENDENCIES) + @rm -f test_index$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_index_OBJECTS) $(test_index_LDADD) $(LIBS) + +test_index_hash$(EXEEXT): $(test_index_hash_OBJECTS) $(test_index_hash_DEPENDENCIES) $(EXTRA_test_index_hash_DEPENDENCIES) + @rm -f test_index_hash$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_index_hash_OBJECTS) $(test_index_hash_LDADD) $(LIBS) + +test_lzip_decoder$(EXEEXT): $(test_lzip_decoder_OBJECTS) $(test_lzip_decoder_DEPENDENCIES) $(EXTRA_test_lzip_decoder_DEPENDENCIES) + @rm -f test_lzip_decoder$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_lzip_decoder_OBJECTS) $(test_lzip_decoder_LDADD) $(LIBS) + +test_memlimit$(EXEEXT): $(test_memlimit_OBJECTS) $(test_memlimit_DEPENDENCIES) $(EXTRA_test_memlimit_DEPENDENCIES) + @rm -f test_memlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_memlimit_OBJECTS) $(test_memlimit_LDADD) $(LIBS) + +test_microlzma$(EXEEXT): $(test_microlzma_OBJECTS) $(test_microlzma_DEPENDENCIES) $(EXTRA_test_microlzma_DEPENDENCIES) + @rm -f test_microlzma$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_microlzma_OBJECTS) $(test_microlzma_LDADD) $(LIBS) + +test_stream_flags$(EXEEXT): $(test_stream_flags_OBJECTS) $(test_stream_flags_DEPENDENCIES) $(EXTRA_test_stream_flags_DEPENDENCIES) + @rm -f test_stream_flags$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_stream_flags_OBJECTS) $(test_stream_flags_LDADD) $(LIBS) + +test_vli$(EXEEXT): $(test_vli_OBJECTS) $(test_vli_DEPENDENCIES) $(EXTRA_test_vli_DEPENDENCIES) + @rm -f test_vli$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_vli_OBJECTS) $(test_vli_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_compress_files.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bcj_exact_size.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_block_header.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_check.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_filter_flags.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_filter_str.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hardware.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_index.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_index_hash.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lzip_decoder.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_memlimit.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_microlzma.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stream_flags.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_vli.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @: >>$@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + output_system_information () \ + { \ + echo; \ + { uname -a | $(AWK) '{ \ + printf "System information (uname -a):"; \ + for (i = 1; i < NF; ++i) \ + { \ + if (i != 2) \ + printf " %s", $$i; \ + } \ + printf "\n"; \ +}'; } 2>&1; \ + if test -r /etc/os-release; then \ + echo "Distribution information (/etc/os-release):"; \ + sed 8q /etc/os-release; \ + elif test -r /etc/issue; then \ + echo "Distribution information (/etc/issue):"; \ + cat /etc/issue; \ + fi; \ + }; \ + please_report () \ + { \ +echo "Some test(s) failed. Please report this to $(PACKAGE_BUGREPORT),"; \ +echo "together with the test-suite.log file (gzipped) and your system"; \ +echo "information. Thanks."; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + output_system_information; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG) for debugging.$${std}";\ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + please_report | sed -e "s/^/$${col}/" -e s/'$$'/"$${std}"/; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: $(check_PROGRAMS) + @$(am__rm_f) $(RECHECK_LOGS) + @$(am__rm_f) $(RECHECK_LOGS:.log=.trs) + @$(am__rm_f) $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @$(am__rm_f) $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test_check.log: test_check$(EXEEXT) + @p='test_check$(EXEEXT)'; \ + b='test_check'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_hardware.log: test_hardware$(EXEEXT) + @p='test_hardware$(EXEEXT)'; \ + b='test_hardware'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_stream_flags.log: test_stream_flags$(EXEEXT) + @p='test_stream_flags$(EXEEXT)'; \ + b='test_stream_flags'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_filter_flags.log: test_filter_flags$(EXEEXT) + @p='test_filter_flags$(EXEEXT)'; \ + b='test_filter_flags'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_filter_str.log: test_filter_str$(EXEEXT) + @p='test_filter_str$(EXEEXT)'; \ + b='test_filter_str'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_block_header.log: test_block_header$(EXEEXT) + @p='test_block_header$(EXEEXT)'; \ + b='test_block_header'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_index.log: test_index$(EXEEXT) + @p='test_index$(EXEEXT)'; \ + b='test_index'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_index_hash.log: test_index_hash$(EXEEXT) + @p='test_index_hash$(EXEEXT)'; \ + b='test_index_hash'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_bcj_exact_size.log: test_bcj_exact_size$(EXEEXT) + @p='test_bcj_exact_size$(EXEEXT)'; \ + b='test_bcj_exact_size'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_memlimit.log: test_memlimit$(EXEEXT) + @p='test_memlimit$(EXEEXT)'; \ + b='test_memlimit'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_lzip_decoder.log: test_lzip_decoder$(EXEEXT) + @p='test_lzip_decoder$(EXEEXT)'; \ + b='test_lzip_decoder'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_vli.log: test_vli$(EXEEXT) + @p='test_vli$(EXEEXT)'; \ + b='test_vli'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_files.sh.log: test_files.sh + @p='test_files.sh'; \ + b='test_files.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_suffix.sh.log: test_suffix.sh + @p='test_suffix.sh'; \ + b='test_suffix.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_compress_generated_abc.log: test_compress_generated_abc + @p='test_compress_generated_abc'; \ + b='test_compress_generated_abc'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_compress_generated_random.log: test_compress_generated_random + @p='test_compress_generated_random'; \ + b='test_compress_generated_random'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_compress_generated_text.log: test_compress_generated_text + @p='test_compress_generated_text'; \ + b='test_compress_generated_text'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_microlzma.log: test_microlzma$(EXEEXT) + @p='test_microlzma$(EXEEXT)'; \ + b='test_microlzma'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test_scripts.sh.log: test_scripts.sh + @p='test_scripts.sh'; \ + b='test_scripts.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -$(am__rm_f) $(TEST_LOGS) + -$(am__rm_f) $(TEST_LOGS:.log=.trs) + -$(am__rm_f) $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/create_compress_files.Po + -rm -f ./$(DEPDIR)/test_bcj_exact_size.Po + -rm -f ./$(DEPDIR)/test_block_header.Po + -rm -f ./$(DEPDIR)/test_check.Po + -rm -f ./$(DEPDIR)/test_filter_flags.Po + -rm -f ./$(DEPDIR)/test_filter_str.Po + -rm -f ./$(DEPDIR)/test_hardware.Po + -rm -f ./$(DEPDIR)/test_index.Po + -rm -f ./$(DEPDIR)/test_index_hash.Po + -rm -f ./$(DEPDIR)/test_lzip_decoder.Po + -rm -f ./$(DEPDIR)/test_memlimit.Po + -rm -f ./$(DEPDIR)/test_microlzma.Po + -rm -f ./$(DEPDIR)/test_stream_flags.Po + -rm -f ./$(DEPDIR)/test_vli.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/create_compress_files.Po + -rm -f ./$(DEPDIR)/test_bcj_exact_size.Po + -rm -f ./$(DEPDIR)/test_block_header.Po + -rm -f ./$(DEPDIR)/test_check.Po + -rm -f ./$(DEPDIR)/test_filter_flags.Po + -rm -f ./$(DEPDIR)/test_filter_str.Po + -rm -f ./$(DEPDIR)/test_hardware.Po + -rm -f ./$(DEPDIR)/test_index.Po + -rm -f ./$(DEPDIR)/test_index_hash.Po + -rm -f ./$(DEPDIR)/test_lzip_decoder.Po + -rm -f ./$(DEPDIR)/test_memlimit.Po + -rm -f ./$(DEPDIR)/test_microlzma.Po + -rm -f ./$(DEPDIR)/test_stream_flags.Po + -rm -f ./$(DEPDIR)/test_vli.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + clean-local cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Windows resource compiler support +.rc.o: + $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ + +clean-local: + -rm -f compress_generated_* \ + xzgrep_test_output xzgrep_test_1.xz xzgrep_test_2.xz + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/cpp/third_party/xz-5.8.3/tests/create_compress_files.c b/cpp/third_party/xz-5.8.3/tests/create_compress_files.c new file mode 100644 index 0000000000..2106ac8130 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/create_compress_files.c @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file create_compress_files.c +/// \brief Creates bunch of test files to be compressed +/// +/// Using a test file generator program saves space in the source code +/// package considerably. +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "sysdefs.h" +#include + + +// If a command-line argument was given, only create the file if its +// name was specified on the command line. If no args were given then +// all files are created. +// +// Avoid re-creating the test files every time the tests are run. +#define maybe_create_test(argc, argv, name) \ +do { \ + if ((argc < 2 || strcmp(argv[1], "compress_generated_" #name) == 0) \ + && !file_exists("compress_generated_" #name)) { \ + FILE *file = file_create("compress_generated_" #name); \ + write_ ## name(file); \ + file_finish(file, "compress_generated_" #name); \ + } \ +} while (0) + + +static bool +file_exists(const char *filename) +{ + // Trying to be somewhat portable by avoiding stat(). + FILE *file = fopen(filename, "rb"); + bool ret; + + if (file != NULL) { + fclose(file); + ret = true; + } else { + ret = false; + } + + return ret; +} + + +static FILE * +file_create(const char *filename) +{ + FILE *file = fopen(filename, "wb"); + + if (file == NULL) { + perror(filename); + exit(EXIT_FAILURE); + } + + return file; +} + + +static void +file_finish(FILE *file, const char *filename) +{ + const bool ferror_fail = ferror(file); + const bool fclose_fail = fclose(file); + + if (ferror_fail || fclose_fail) { + perror(filename); + exit(EXIT_FAILURE); + } +} + + +// File that repeats "abc\n" a few thousand times. This is targeted +// especially at Subblock filter's run-length encoder. +static void +write_abc(FILE *file) +{ + for (size_t i = 0; i < 12345; ++i) + if (fwrite("abc\n", 4, 1, file) != 1) + exit(EXIT_FAILURE); +} + + +// File that doesn't compress. We always use the same random seed to +// generate identical files on all systems. +static void +write_random(FILE *file) +{ + uint32_t n = 5; + + for (size_t i = 0; i < 123456; ++i) { + n = 101771 * n + 71777; + + putc((uint8_t)(n), file); + putc((uint8_t)(n >> 8), file); + putc((uint8_t)(n >> 16), file); + putc((uint8_t)(n >> 24), file); + } +} + + +// Text file +static void +write_text(FILE *file) +{ + static const char *lorem[] = { + "Lorem", "ipsum", "dolor", "sit", "amet,", "consectetur", + "adipisicing", "elit,", "sed", "do", "eiusmod", "tempor", + "incididunt", "ut", "labore", "et", "dolore", "magna", + "aliqua.", "Ut", "enim", "ad", "minim", "veniam,", "quis", + "nostrud", "exercitation", "ullamco", "laboris", "nisi", + "ut", "aliquip", "ex", "ea", "commodo", "consequat.", + "Duis", "aute", "irure", "dolor", "in", "reprehenderit", + "in", "voluptate", "velit", "esse", "cillum", "dolore", + "eu", "fugiat", "nulla", "pariatur.", "Excepteur", "sint", + "occaecat", "cupidatat", "non", "proident,", "sunt", "in", + "culpa", "qui", "officia", "deserunt", "mollit", "anim", + "id", "est", "laborum." + }; + + // Let the first paragraph be the original text. + for (size_t w = 0; w < ARRAY_SIZE(lorem); ++w) { + fprintf(file, "%s ", lorem[w]); + + if (w % 7 == 6) + fprintf(file, "\n"); + } + + // The rest shall be (hopefully) meaningless combinations of + // the same words. + uint32_t n = 29; + + for (size_t p = 0; p < 500; ++p) { + fprintf(file, "\n\n"); + + for (size_t w = 0; w < ARRAY_SIZE(lorem); ++w) { + n = 101771 * n + 71777; + + fprintf(file, "%s ", lorem[n % ARRAY_SIZE(lorem)]); + + if (w % 7 == 6) + fprintf(file, "\n"); + } + } +} + + +int +main(int argc, char **argv) +{ + maybe_create_test(argc, argv, abc); + maybe_create_test(argc, argv, random); + maybe_create_test(argc, argv, text); + return EXIT_SUCCESS; +} diff --git a/cpp/third_party/xz-5.8.3/tests/files/README b/cpp/third_party/xz-5.8.3/tests/files/README new file mode 100644 index 0000000000..584e6ba42e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/files/README @@ -0,0 +1,415 @@ + +.xz, .lzma, and .lz Test Files +------------------------------ + +0. Introduction + + This directory contains bunch of files to test handling of .xz, + .lzma (LZMA_Alone), and .lz (lzip) files in decoder implementations. + Many of the files have been created by hand with a hex editor, thus + there is no better "source code" than the files themselves. All the + test files and this README may be distributed under the terms of + the BSD Zero Clause License (0BSD). + + +1. File Types + + Good files (good-*) must decode successfully without requiring + a lot of CPU time or RAM. + + Unsupported files (unsupported-*) are good files, but headers + indicate features not supported by the current file format + specification. + + Bad files (bad-*) must cause the decoder to give an error. Like + with the good files, these files must not require a lot of CPU + time or RAM before they get detected to be broken. + + +2. Descriptions of Individual .xz Files + +2.1. Good Files + + good-0-empty.xz has one Stream with no Blocks. + + good-0pad-empty.xz has one Stream with no Blocks followed by + four-byte Stream Padding. + + good-0cat-empty.xz has two zero-Block Streams concatenated without + Stream Padding. + + good-0catpad-empty.xz has two zero-Block Streams concatenated with + four-byte Stream Padding between the Streams. + + good-1-check-none.xz has one Stream with one Block with two + uncompressed LZMA2 chunks and no integrity check. + + good-1-check-crc32.xz has one Stream with one Block with two + uncompressed LZMA2 chunks and CRC32 check. + + good-1-check-crc64.xz is like good-1-check-crc32.xz but with CRC64. + + good-1-check-sha256.xz is like good-1-check-crc32.xz but with + SHA256. + + good-2-lzma2.xz has one Stream with two Blocks with one uncompressed + LZMA2 chunk in each Block. + + good-1-block_header-1.xz has both Compressed Size and Uncompressed + Size in the Block Header. This has also four extra bytes of Header + Padding. + + good-1-block_header-2.xz has known Compressed Size. + + good-1-block_header-3.xz has known Uncompressed Size. + + good-1-delta-lzma2.tiff.xz is an image file that compresses + better with Delta+LZMA2 than with plain LZMA2. + + good-1-arm64-lzma2-1.xz uses the ARM64 filter and LZMA2. The + uncompressed data is constructed so that it tests integer + wrap around and sign extension. To recreate the file, compress + using XZ Utils 5.4.x (newer may or may not work too): + + ./debug/testfilegen-arm64 \ + | xz -T1 -Ccrc32 --arm64 \ + --lzma2=dict=64KiB,lp=2,lc=2 \ + > good-1-arm64-lzma2-1.xz + + good-1-arm64-lzma2-2.xz is like good-1-arm64-lzma2-1.xz but with + non-zero start offset. XZ Embedded doesn't support this file. + To recreate the file, compress using XZ Utils 5.4.x (newer may or + may not work too): + + ./debug/testfilegen-arm64 \ + | xz -T1 -Ccrc32 --arm64=start=4294963200 \ + --lzma2=dict=64KiB,lp=2,lc=2 \ + > good-1-arm64-lzma2-2.xz + + good-1-lzma2-1.xz has two LZMA2 chunks, of which the second sets + new properties. + + good-1-lzma2-2.xz has two LZMA2 chunks, of which the second resets + the state without specifying new properties. + + good-1-lzma2-3.xz has two LZMA2 chunks, of which the first is + uncompressed and the second is LZMA. The first chunk resets dictionary + and the second sets new properties. + + good-1-lzma2-4.xz has three LZMA2 chunks: First is LZMA, second is + uncompressed with dictionary reset, and third is LZMA with new + properties but without dictionary reset. + + good-1-lzma2-5.xz has an empty LZMA2 stream with only the end of + payload marker. XZ Utils 5.0.1 and older incorrectly see this file + as corrupt. + + good-1-3delta-lzma2.xz has three Delta filters and LZMA2. + + good-1-empty-bcj-lzma2.xz has an empty Block that uses PowerPC BCJ + and LZMA2. liblzma from XZ Utils 5.0.1 and older may incorrectly + return LZMA_BUF_ERROR in some cases. See commit message + d8db706acb8316f9861abd432cfbe001dd6d0c5c for the details. + + +2.2. Unsupported Files + + unsupported-check.xz uses Check ID 0x02 which isn't supported by + the current version of the file format. It is implementation-defined + how this file handled (it may reject it, or decode it possibly with + a warning). + + unsupported-block_header.xz has a non-null byte in Header Padding, + which may indicate presence of a new unsupported field. + + unsupported-filter_flags-1.xz has unsupported Filter ID 0x7F. + + unsupported-filter_flags-2.xz specifies only Delta filter in the + List of Filter Flags, but Delta isn't allowed as the last filter in + the chain. It could be a little more correct to detect this file as + corrupt instead of unsupported, but saying it is unsupported is + simpler in case of liblzma. + + unsupported-filter_flags-3.xz specifies two LZMA2 filters in the + List of Filter Flags. LZMA2 is allowed only as the last filter in the + chain. It could be a little more correct to detect this file as + corrupt instead of unsupported, but saying it is unsupported is + simpler in case of liblzma. + + +2.3. Bad Files + + bad-0pad-empty.xz has one Stream with no Blocks followed by + five-byte Stream Padding. Stream Padding must be a multiple of four + bytes, thus this file is corrupt. + + bad-0catpad-empty.xz has two zero-Block Streams concatenated with + five-byte Stream Padding between the Streams. + + bad-0cat-alone.xz is good-0-empty.xz concatenated with an empty + LZMA_Alone file. + + bad-0cat-header_magic.xz is good-0cat-empty.xz but with one byte + wrong in the Header Magic Bytes field of the second Stream. liblzma + gives LZMA_DATA_ERROR for this. (LZMA_FORMAT_ERROR is used only if + the first Stream of a file has invalid Header Magic Bytes.) + + bad-0-header_magic.xz is good-0-empty.xz but with one byte wrong + in the Header Magic Bytes field. liblzma gives LZMA_FORMAT_ERROR for + this. + + bad-0-footer_magic.xz is good-0-empty.xz but with one byte wrong + in the Footer Magic Bytes field. liblzma gives LZMA_DATA_ERROR for + this. + + bad-0-empty-truncated.xz is good-0-empty.xz without the last byte + of the file. + + bad-0-nonempty_index.xz has no Blocks but Index claims that there is + one Block. + + bad-0-backward_size.xz has wrong Backward Size in Stream Footer. + + bad-1-stream_flags-1.xz has different Stream Flags in Stream Header + and Stream Footer. + + bad-1-stream_flags-2.xz has wrong CRC32 in Stream Header. + + bad-1-stream_flags-3.xz has wrong CRC32 in Stream Footer. + + bad-1-vli-1.xz has two-byte variable-length integer in the + Uncompressed Size field in Block Header while one-byte would be enough + for that value. It's important that the file gets rejected due to too + big integer encoding instead of due to Uncompressed Size not matching + the value stored in the Block Header. That is, the decoder must not + try to decode the Compressed Data field. + + bad-1-vli-2.xz has ten-byte variable-length integer as Uncompressed + Size in Block Header. It's important that the file gets rejected due + to too big integer encoding instead of due to Uncompressed Size not + matching the value stored in the Block Header. That is, the decoder + must not try to decode the Compressed Data field. + + bad-1-block_header-1.xz has Block Header that ends in the middle of + the Filter Flags field. + + bad-1-block_header-2.xz has Block Header that has Compressed Size and + Uncompressed Size but no List of Filter Flags field. + + bad-1-block_header-3.xz has wrong CRC32 in Block Header. + + bad-1-block_header-4.xz has too big Compressed Size in Block Header + (2^63 - 1 bytes while maximum is a little less, because the whole + Block must stay smaller than 2^63). It's important that the file + gets rejected due to invalid Compressed Size value; the decoder + must not try decoding the Compressed Data field. + + bad-1-block_header-5.xz has zero as Compressed Size in Block Header. + + bad-1-block_header-6.xz has corrupt Block Header which may crash + xz -lvv in XZ Utils 5.0.3 and earlier. It was fixed in the commit + c0297445064951807803457dca1611b3c47e7f0f. + + bad-2-index-1.xz has wrong Unpadded Sizes in Index. + + bad-2-index-2.xz has wrong Uncompressed Sizes in Index. + + bad-2-index-3.xz has non-null byte in Index Padding. + + bad-2-index-4.xz wrong CRC32 in Index. + + bad-2-index-5.xz has zero as Unpadded Size. It is important that the + file gets rejected specifically due to Unpadded Size having an invalid + value. + + bad-3-index-uncomp-overflow.xz has Index whose Uncompressed Size + fields have huge values whose sum exceeds the maximum allowed size + of 2^63 - 1 bytes. In this file the sum is exactly 2^64. + lzma_index_append() in liblzma <= 5.2.6 lacks the integer overflow + check for the uncompressed size and thus doesn't catch the error + when decoding the Index field in this file. This makes "xz -l" + not detect the error and will display 0 as the uncompressed size. + Note that regular decompression isn't affected by this bug because + it uses lzma_index_hash_append() instead. + + bad-2-compressed_data_padding.xz has non-null byte in the padding of + the Compressed Data field of the first Block. + + bad-1-check-crc32.xz has wrong Check (CRC32). + + bad-1-check-crc32-2.xz has Compressed Size and Uncompressed Size in + Block Header but wrong Check (CRC32) in the actual data. This file + differs by one byte from good-1-block_header-1.xz: the last byte of + the Check field is wrong. This file is useful for testing error + detection in the threaded decoder when a worker thread is configured + to pass input one byte at a time to the Block decoder. + + bad-1-check-crc64.xz has wrong Check (CRC64). + + bad-1-check-sha256.xz has wrong Check (SHA-256). + + bad-1-lzma2-1.xz has LZMA2 stream whose first chunk (uncompressed) + doesn't reset the dictionary. + + bad-1-lzma2-2.xz has two LZMA2 chunks, of which the second chunk + indicates dictionary reset, but the LZMA compressed data tries to + repeat data from the previous chunk. + + bad-1-lzma2-3.xz sets new invalid properties (lc=8, lp=0, pb=0) in + the middle of Block. + + bad-1-lzma2-4.xz has two LZMA2 chunks, of which the first is + uncompressed and the second is LZMA. The first chunk resets dictionary + as it should, but the second chunk tries to reset state without + specifying properties for LZMA. + + bad-1-lzma2-5.xz is like bad-1-lzma2-4.xz but doesn't try to reset + anything in the header of the second chunk. + + bad-1-lzma2-6.xz has reserved LZMA2 control byte value (0x03). + + bad-1-lzma2-7.xz has EOPM at LZMA level. + + bad-1-lzma2-8.xz is like good-1-lzma2-4.xz but doesn't set new + properties in the third LZMA2 chunk. + + bad-1-lzma2-9.xz has LZMA2 stream that is truncated at the end of + a LZMA2 chunk (no end marker). The uncompressed size of the partial + LZMA2 stream exceeds the value stored in the Block Header. + + bad-1-lzma2-10.xz has LZMA2 stream that, from point of view of a + LZMA2 decoder, extends past the end of Block (and even the end of + the file). Uncompressed Size in Block Header is bigger than the + invalid LZMA2 stream may produce (even if a decoder reads until + the end of the file). The Check type is None to nullify certain + simple size-based sanity checks in a Block decoder. + + bad-1-lzma2-11.xz has LZMA2 stream that lacks the end of + payload marker. When Compressed Size bytes have been decoded, + Uncompressed Size bytes of output will have been produced but + the LZMA2 decoder doesn't indicate end of stream. + + +3. Descriptions of Individual .lzma Files + +3.1. Good Files + + good-unknown_size-with_eopm.lzma has unknown size in the header + and end of payload marker at the end. + + good-known_size-without_eopm.lzma has a known size in the header + and no end of payload marker at the end. + + good-known_size-with_eopm.lzma has a known size in the header + and end of payload marker at the end. XZ Utils 5.2.5 and older + will give an error at the end of the file after producing the + correct uncompressed output. + + +3.2. Bad Files + + bad-unknown_size-without_eopm.lzma has unknown size in the header + but no end of payload marker at the end. This file might be seen + by a decoder as if it were truncated. + + bad-too_big_size-with_eopm.lzma has too big uncompressed size in + the header and the end of payload marker will be detected before + the specified number of bytes have been decoded. + + bad-too_small_size-without_eopm-1.lzma has too small uncompressed + size in the header. The decoder will look for end of payload marker + but instead find a literal that would produce more output. + + bad-too_small_size-without_eopm-2.lzma is like -1 above but instead + of a literal the problem occurs with a short repeated match. + + bad-too_small_size-without_eopm-3.lzma is like -1 above but instead + of a literal the problem occurs in the middle of a match. + + +4. Descriptions of Individual .lz (lzip) Files + +4.1. Good Files + + good-1-v0.lz contains a single version 0 member. lzip 1.17 and + *older* can decompress this; support for version 0 was removed + in lzip 1.18. + + good-1-v0-trailing-1.lz is like good-1-v0.lz but contains + trailing data that the decompressor must ignore. + + good-1-v1.lz contains a single version 1 member. lzip 1.3 and + newer can decompress this. + + good-1-v1-trailing-1.lz is like good-1-v1.lz but contains + trailing data that the decompressor must ignore. + + good-1-v1-trailing-2.lz is like good-1-v1.lz but contains + trailing data whose first three bytes match the .lz magic bytes. + With lzip >= 1.20 this file results in an error unless one uses + the command line option --loose-trailing. lzip 1.3 to 1.19 decode + this file successfully by default. XZ Utils uses the old behavior + because it allows lzma_code() to stop at the first byte of the + trailing data as long as the first byte isn't 0x4C (L in US-ASCII); + otherwise the first 1-3 bytes that equal to the magic bytes are + consumed and lost in lzma_code(), and this is visible in xz too: + + $ ( xz -dc ; cat ) < good-1-v1-trailing-2.lz + Hello + World! + Trailing garbage + + $ ( xz -dc --single-stream ; cat ) < good-1-v1-trailing-2.lz + Hello + World! + LZITrailing garbage + + good-2-v0-v1.lz contains two members of which the first is + version 0 and the second version 1. lzip versions 1.3 to 1.17 + (inclusive) can decompress this. + + good-2-v1-v0.lz contains two members of which the first is + version 1 and the second version 0. lzip versions 1.3 to 1.17 + (inclusive) can decompress this. + + good-2-v1-v1.lz contains two version 1 members. lzip versions 1.3 + and newer can decompress this. + + +4.2. Unsupported Files + + unsupported-1-v234.lz is like good-1-v1.lz except the version + field has been set to 234 (0xEA) which, as of writing, isn't + defined or supported by any .lz implementation. + + +4.3. Bad Files + + bad-1-v1-magic-1.lz is like good-1-v1.lz but the first magic byte + is wrong. + + bad-1-v1-magic-2.lz is like good-1-v1.lz but the last (fourth) + magic byte is wrong. + + bad-1-v1-dict-1.lz has too low value in the dictionary size field. + + bad-1-v1-dict-2.lz has too high value in the dictionary size field. + + bad-1-v1-crc32.lz has wrong CRC32 value. + + bad-1-v0-uncomp-size.lz is version 0 format with incorrect value + in the uncompressed size field. + + bad-1-v1-uncomp-size.lz is version 1 format with incorrect value + in the uncompressed size field. + + bad-1-v1-member-size.lz has incorrect value in the member size + field. + + bad-1-v1-trailing-magic.lz has the four .lz magic bytes as trailing + data. This should be detected as a truncated file and thus result + in an error. That is, the last four bytes of the file should not be + ignored as trailing garbage. lzip >= 1.18 matches this behavior + while older versions ignore the last four bytes and don't indicate + an error. + diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-0-backward_size.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-0-backward_size.xz new file mode 100644 index 0000000000000000000000000000000000000000..2b46fa937b3e6e770f12973398f01d124f9220f4 GIT binary patch literal 32 kcmexsUKJ6=z`&TPbkB?d2xRWND4I?@dJM#7V2q3c0GX-?W&i*H literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-0-empty-truncated.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-0-empty-truncated.xz new file mode 100644 index 0000000000000000000000000000000000000000..f879af84ac473517a186f80510091273d9ea9676 GIT binary patch literal 31 jcmexsUKJ6=z`&TPbkB?d2xRWNC{A#i$;$}hFh&9ZipmEx literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-0-footer_magic.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-0-footer_magic.xz new file mode 100644 index 0000000000000000000000000000000000000000..5d9e3894bc2d112e987aee4788bde03f26ef98b6 GIT binary patch literal 32 kcmexsUKJ6=z`&TPbkB?d2xRWNC{A#i$;$}hFh)iI0FqV*i~s-t literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-0-header_magic.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-0-header_magic.xz new file mode 100644 index 0000000000000000000000000000000000000000..5984a453bf873ee0cbadc55efa71f26f0fa3da24 GIT binary patch literal 32 kcmexsUKJ6^z`&TPbkB?d2xRWNC{A#i$;$}hFh)iJ0FpchjQ{`u literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-0-nonempty_index.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-0-nonempty_index.xz new file mode 100644 index 0000000000000000000000000000000000000000..ed6e81fa0465f28bd06c400814c08d88e28d16b6 GIT binary patch literal 32 lcmexsUKJ6=z`&TPbkB@|k%2*bYn#FZr$N&V4kx>8{+z+q- literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-2.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-2.xz new file mode 100644 index 0000000000000000000000000000000000000000..ae42ecf0f9be468d902c4d8aecef27b541169b7d GIT binary patch literal 64 zcmexsUKJ6=z`&TPbkB_O01I!!^e!Pr23C*MoSb|vCI+_f{Gyx`MJ@*C#fwB47*%); SH14mT;53t$kpT!8BclLH;1H(( literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-3.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-3.xz new file mode 100644 index 0000000000000000000000000000000000000000..606cbd20e25534d911005f29c6842963f81810e4 GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^5L6MPzfq~%$zp^nS1FJ`BPEI}-69Zd#eo;<}A{T@6;zgni Xj4Hea8u!;vaGJ@>2vp0!7#RfsB{>g^ literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-4.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-block_header-4.xz new file mode 100644 index 0000000000000000000000000000000000000000..e72dfbfc39468dee45f7c6b3981a072d56241f82 GIT binary patch literal 76 zcmexsUKJ6=z`&TPbkB^%;Xf4AD>8C0FeE>+Dqv*b@kq_d$>$2sFUm<#UL?xE VsLER?d1TuJr{OqX52m61D&U literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-check-crc32.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-check-crc32.xz new file mode 100644 index 0000000000000000000000000000000000000000..1ebe1310b5ae5e6cfce37b469772eb73e2ce6acf GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^5L6MPzfq~%$zp^kR1FJ`BPEI}-69Zd#eo;<}A{T@6;zc41 Xj4Hea8u!;vaGJ@>2vp0!7#RfsAA}ET literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-check-crc64.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-check-crc64.xz new file mode 100644 index 0000000000000000000000000000000000000000..cdb77093db1c301b8978b5b2b79ad9d4093ae3fd GIT binary patch literal 72 zcmexsUKJ6=z`*kC+7>q^21P~=1_p*3{K~?N46GihIXU@UObl${`9(P?id+ou^*RLS b+D|*pz^K7%lb*#azwL7^BTzj9OJo!P#6=R> literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-check-sha256.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-check-sha256.xz new file mode 100644 index 0000000000000000000000000000000000000000..def7bff174f11dc55521bae849b28beb3310add5 GIT binary patch literal 96 zcmexsUKJ6=z`*tJH_t*Q21P~=1_p*3{K~?N46GihIXU@UObl${`9(P?id+nRk*3cd z8fToH*72|3W5Lv*$>~{4qDc`tbuGQ?AKGtlXJB;To!sWPPGYwAEJmO?3|x^>0G}8h Au>b%7 literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-1.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-1.xz new file mode 100644 index 0000000000000000000000000000000000000000..640f592e80359e942a1ec60fc64b274770b353cf GIT binary patch literal 64 zcmexsUKJ6=z`*cd=%ynRgCZjbkbQ$+S(u4|)gv`0C!dRnfh|10C?`dci-Cbrf!E~i R=F@CN^Qstu>KGUzqX7MX4<-Nr literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-10.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-10.xz new file mode 100644 index 0000000000000000000000000000000000000000..246515eaf5b43e63c1ee576136548d6f82e51495 GIT binary patch literal 60 zcmexsUKJ6=z`*cd=%ypn0RaO=Mh=E&S1V>P{{Qchnv;{y6`o&|lcLDQz$jyI>xRYy PwxW4ej6n4a43SX)k_Z$2 literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-11.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-11.xz new file mode 100644 index 0000000000000000000000000000000000000000..ce857b67b8a989dceb009cfba6bb6b5a56de1eea GIT binary patch literal 64 zcmexsUKJ6=z`*cd=%yp{0Rdh`MjjxKfg${R)_g_=9*@+VoP34w{Gyx`MJ@(L1zwZ4 Qn@_V9&8uPrtBQ;Q084}sRsaA1 literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-2.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-2.xz new file mode 100644 index 0000000000000000000000000000000000000000..69ab07d4577b6ff71f7521fe53759c6543192a2a GIT binary patch literal 424 zcmV;Z0ayP0H+ooF0004LBHlIv03iVg0002k4vH<%0_2e@^`p>hS)*d z1vSlsrF;^l1>2ClFBH>pa+auyeS}tVjcOv8tDZfOfGx*f3=&e)KL-eV9He*i6Sx<^ z?va5xvxo5i0JCaRLG3QE@?@8!nx12!t{HRDzhLwWI`Eq@>)$`vuccLzMg>?R36H2?2n(a>KD@LR+sC7#z!udM zry}St=(Nyx7sZR@^1Ex+@0x)$P95CrHs(ZfzbUmm1uvH<%0_2e@^`p>hS)*d z1vSlsrF;^l1>2ClFBH>pa+auyeS}tVjcOv8tDZfOfGx*f3=&e)KL-eV9He*i6Sx<^ z?va5xvxo5i0JCaRLG3QE@?@8!nx12!t{HRDzhLwWI`Eq@>)$`vuccLzMg>?R36H2?2n(a>KD@LR+sC7#z!udM zry}St=(Nyx7sZR@^1Ex+@0x)$P95CrHs(ZfzbUmm1ufCOZ6IWCY;STP zb7^!SVQpn}EFfcVZgXX0bY*mPav))3X>e(CX=7<_XCMlo0h0kF05Y2iY*g1Sm2CO< zH`N^CMgoF$`$=|T@N9l2BVfO zx0jsod;a1Qj4e^{+je(-qH7ud^_P!g>Dw^7v~WEZcmsDji+a_#_(~@w^^U3} z6s9RCYcF%)p>ec(q<~OB%J18>mHoTHjE-QJ+sl6;?Z6Om8hy*n3DDX9ZGgaMeLu#O z&s*J55z))kAlEB|PN+q@LU6C literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-5.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-5.xz new file mode 100644 index 0000000000000000000000000000000000000000..700464d51efa1e813c04e52263f6692aff20afd4 GIT binary patch literal 408 zcmV;J0cZaGH+ooF0004LBHlIv03iVg0002k4fCOZ6IWCY;STP zb7^!SVQpn}EFfcVZgXX0bY*mPav))3X>e(CX=7<_XCMlI0h0kF05Y2iY*g1Sm2CO< zH`N^CMgoF$`$=|T@N9l2BVfO zx0jsod;a1Qj4e^{+je(-qH7ud^_P!g>Dw^7v~WEZcmsDji+a_#_(~@w^^U3} z6s9RCYcF%)p>ec(q<~OB%J18>mHoTHjE-QJ+sl6;?Z6Om8hy*n3DDX9ZGgaMeLu#O z&s*J55z))kAlEB|PN+q@LU2vp0!7#RfsAG{B2 literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-7.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-7.xz new file mode 100644 index 0000000000000000000000000000000000000000..8cc711c19ed67c7416a811fe0fdf71210487c23a GIT binary patch literal 408 zcmV;J0cZaGH+ooF000E$*0e?f03iVg0002k4vH<%0_2e@^`p>hS)*d z1vSlsrF;^l1>2ClFBH>p5`0a~5vk*40WO9~hLS=uQj{(bU$>5r{q-BhCIRrXySr}1 zdY0ke$TY+CPlE<1QGsOnfNF6^(Bh`n4P-ITiZEjPb2Um31;ozpwEokDHsI-J!0@%9 z9#U9T-9T3OoAX)m*5G;uRy;ku6@j}t>xB*ysa{hlP)@$!-3+>l!|)^*_VDD)+r1|%x2wUGVz9q}m8b{;f6>+}ca0ow&ZXJfUDM`^ zwdZ+3rqiB%C%j3Sg$wZxMIQSq_ty@5&+zn8NEmw&OYym>f$1j-H^WuEv{l=!x8Hf6 zMzxhod3zDrEfeDi)uDu-K|5{{(>D2fRa6k)2H{NCS4q8QX?+`@;e%)h9iaU*hMo<< zARA?M-8)}%%EE*H|LAH_*Z=^s2Sn)?GfRX30rLXM0{{Tu^N=I4#Ao{g000001X)@# C3&N=Y literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-8.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-8.xz new file mode 100644 index 0000000000000000000000000000000000000000..f21a71b63f38651fb1b520670337785589e2afd1 GIT binary patch literal 464 zcmV;>0WbdjH+ooF000E$*0e?f03iVg0002k4vH<%0_2e@^`p>hS)*d z1vSlsrF;^l1>2ClFBH>pa+auyeS}tVjcOv8tDZfOfGx*f3=&e)KL-eV9He*i6Sx<^ z?vZoKywB@2W~@k?Y1xwpuFg=eXbCS{h#$fTqAXZNu>WES>+aiQPjBG!AI}mun3hiV z^0NDGuS5dkBHq>JG?zJ}MK7+IFL`N?={Jc;{>*;rsVJ?(=G?j3suq3$048i%TbRc1DX>oOFa3E!PAZ1}7V{dJ3Z)9&E3ZMYx0KEV)o5~r*RP44?=dpdn zSDtK%tx9bc*gOT45Ehv@A)~p)fdBmN)YU)TjMqJncI=3%GOK0OIPdrQiof^xrB>H% z*FS{|o zgXk%sXUJwcebRwi>Q{oBCCdBuhzgtEK?808000282Sn)?GfRX30jdMZ0{{R}gK;&n#Ao{g00000 G1X)^h4%Vsw literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-9.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-lzma2-9.xz new file mode 100644 index 0000000000000000000000000000000000000000..0553905a0b5589bab4b5eb89455372dcb3dd7fef GIT binary patch literal 72 zcmexsUKJ6=z`&TPbkB_WfC#T5BL@QrSc?kqGBWUZq~_%0bA{&@<)kQbG5!Bv;k2vp0!7#RfsE!hvN literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-stream_flags-3.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-stream_flags-3.xz new file mode 100644 index 0000000000000000000000000000000000000000..a9b1f98365fda585c356b1e7c2db47a44b54c596 GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^5L6MPzfq~%$zp^kR1FJ`BPEI}-69Zd#eo;<}A{T@6;zgni Xj4Hea8u!;vaGJr(2vp0!7#RfsACC`e literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-v0-uncomp-size.lz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-v0-uncomp-size.lz new file mode 100644 index 0000000000000000000000000000000000000000..6bf4c6c7cadc9888693e145cde6e65fe2a1cabfb GIT binary patch literal 42 wcmeZ?@(f_$VNj9uoRQBes;+6951J literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-dict-1.lz b/cpp/third_party/xz-5.8.3/tests/files/bad-1-v1-dict-1.lz new file mode 100644 index 0000000000000000000000000000000000000000..20768d5f80f103849d65b87cceec318537b56227 GIT binary patch literal 50 wcmeZ?@(f_)W>AszoRQBes;@_XJp{UL?xE VsLER?d1TuJr$2sFUm<# h^6te`!3<1NY|`uu3~YCv$J!b2b~6FZU|@`l0swRj64d|z literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-1.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-1.xz new file mode 100644 index 0000000000000000000000000000000000000000..f51ed214d16b9652b2c1522561d481eac75ea390 GIT binary patch literal 92 zcmexsUKJ6=z`&TPbkB^5L6MPzfq~%$zp^kR1FJ`BPEI}-kS}IB%@9?NEj+&{Cq)q` gdH3R}UHYs)nhGQA*dUgi9-Aq6|42+Rc0BU9u5dZ)H literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-2.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-2.xz new file mode 100644 index 0000000000000000000000000000000000000000..d7d00ff343fea9fd49896c2ef605a71023f06249 GIT binary patch literal 92 zcmexsUKJ6=z`&TPbkB^5L6MPzfq~%$zp^kR1FJ`BPEI}-kS}IB%@9?NEj+&{Cq)q` fdH3R}UglDb_x>W literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-3.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-3.xz new file mode 100644 index 0000000000000000000000000000000000000000..62428b87223690e63b08a793bed03d02762fa300 GIT binary patch literal 92 zcmexsUKJ6=z`&TPbkB^5L6MPzfq~%$zp^kR1FJ`BPEI}-kS}IB%@9?NEj+&{Cq)q` hdH3R}UFfc|&0RVb?6Ey$; literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-4.xz b/cpp/third_party/xz-5.8.3/tests/files/bad-2-index-4.xz new file mode 100644 index 0000000000000000000000000000000000000000..9cf2df65da5ffed8efae5a28128d4408088f89b7 GIT binary patch literal 92 zcmexsUKJ6=z`&TPbkB^5L6MPzfq~%$zp^kR1FJ`BPEI}-kS}IB%@9?NEj+&{Cq)q` gdH3R}U literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-too_small_size-without_eopm-2.lzma b/cpp/third_party/xz-5.8.3/tests/files/bad-too_small_size-without_eopm-2.lzma new file mode 100644 index 0000000000000000000000000000000000000000..e37cab14d6a43ddb6588927c09e9d30d75d136bb GIT binary patch literal 31 gcma!L5MW?nW`F_}NzWPitfK1byk!*^G-VYS05fw0mjD0& literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-too_small_size-without_eopm-3.lzma b/cpp/third_party/xz-5.8.3/tests/files/bad-too_small_size-without_eopm-3.lzma new file mode 100644 index 0000000000000000000000000000000000000000..67a1af34570be3920d7e5184ef040efdfa3015e2 GIT binary patch literal 36 mcma!L5MW^7WPkz{NzWPitfGetG}y&2mi{-rGQ-_3fdK$zQ3!GX literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/bad-unknown_size-without_eopm.lzma b/cpp/third_party/xz-5.8.3/tests/files/bad-unknown_size-without_eopm.lzma new file mode 100644 index 0000000000000000000000000000000000000000..b3d7a52162dd8102f861159ec434f8e580fc769d GIT binary patch literal 31 hcma!L5MW^V4+RV=lAbg2Sw+>=dCMv;Xv!)u008E342%E( literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-0-empty.xz b/cpp/third_party/xz-5.8.3/tests/files/good-0-empty.xz new file mode 100644 index 0000000000000000000000000000000000000000..83b95e05bc814cb60f759a30e89d243960797b60 GIT binary patch literal 32 kcmexsUKJ6=z`&TPbkB?d2xRWNC{A#i$;$}hFh)iJ0Fqb-jsO4v literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-0cat-empty.xz b/cpp/third_party/xz-5.8.3/tests/files/good-0cat-empty.xz new file mode 100644 index 0000000000000000000000000000000000000000..e6fc31461db459ae9075e704581317d910b4afee GIT binary patch literal 64 ncmexsUKJ6=z`&TPbkB?d2xRWNC{A#i$;$}hFh)lGB_Iy~7H$t4 literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-0catpad-empty.xz b/cpp/third_party/xz-5.8.3/tests/files/good-0catpad-empty.xz new file mode 100644 index 0000000000000000000000000000000000000000..4f86b7d152d477b0da914aff1590000e89bf1183 GIT binary patch literal 68 qcmexsUKJ6=z`&TPbkB?d2xRWNC{A#i$;$}hFh&BU7#RK%Py+xorVkqc literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-0pad-empty.xz b/cpp/third_party/xz-5.8.3/tests/files/good-0pad-empty.xz new file mode 100644 index 0000000000000000000000000000000000000000..c51e3a69c0de7e68ad78338a6c86cb2980eb1a2f GIT binary patch literal 36 mcmexsUKJ6=z`&TPbkB?d2xRWNC{A#i$;$}hFh&BU7#IMskOz(c literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-3delta-lzma2.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-3delta-lzma2.xz new file mode 100644 index 0000000000000000000000000000000000000000..a0be1d007a206f8a7849400b1343c67784dc4809 GIT binary patch literal 528 zcmV+r0`L9(H+ooF000E$*0e?h0|Nm70|5a80RkZb2mk=Q6=lW&0mw`vw}j#eaZmcX zq4!Z^2&}I1SV9eE?x+FHU@nMQ*KXTACIAKT`>!--7r>uC`TPwI1El7!X|ZCSN0&px zFGr)J^#oeLn>_){TRQr)!c3h{SN*%MQ~w74^`}u@q?}{4v|{&1pipkF;|o&5r#HY< zNddXE|2tmwZ8yUJ^Q+|Uc32$NxO8Zp-%n0rcCj_ zRA%p_tx+K35AF;Cq+>h(sK-_Uuiddw!DshN@3dM+2De|MO{(J;WxJ>_2DMUPr}Xg` z75PD}w>lNL>YrxEQPE);?FhX8TXFGkdS{LWrd678{+yx&U10mCw(?F7M=dFx>EAL@10)4R_I;( z1fpA0{kN)Hu{Krk>y9EkKRQZh;&ACC{yaY4=000282Sn)?GfRX30qFzD0{{S$ S`@Oue#Ao{g000001X)_0Yy40E literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-arm64-lzma2-1.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-arm64-lzma2-1.xz new file mode 100644 index 0000000000000000000000000000000000000000..78169f14e55bab6df64b171e02d275d1c878f095 GIT binary patch literal 512 zcmV+b0{{K}H+ooF0004LBHlIv0SW*i0SEx1*naWgA%6kGZU6viBZzTh!jDr5=CR+< zimn@>uz0H|Lla(qI_!Jbnq4vWOm!4B`dTUMI zf2*~D8PbQdj#Sbkr5HuKm#?*r6OD!0ixJf`b2ir4#$zA@8waxQC$A18F-0{2}WS>SKs z-OTxr%O_c&qi>dTg3nEHAs$Y@&(JBd&sJ_BkH~kG>uT>j+yHj4lw)v=lwW@zgZUrM zWKTuC_!C-q3>x3$3*5Q~Gwf5T`!VIr!-tiS^^=YQ?&DUb`O~9#r3fUv9xADscuVNJ zb4Shy3|axs;l-VW+|(IawLP!(q|as&{agMDdhYjOfeHo*UCR)~Z)i{L?U%o#3}QZ7oP3 zjDb;5VDF&-aoOXwPyJW64*Wn!(*OXVeBsmp0owzBLjV9n$BAP;Fb#_W000000a;o` ChV}3O literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-arm64-lzma2-2.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-arm64-lzma2-2.xz new file mode 100644 index 0000000000000000000000000000000000000000..e0302fe99e994db8e02e58b5deebb0059c90bdf4 GIT binary patch literal 488 zcmV)t{1c60fMoJHkN$TUSJebxP_`X z7)fn4$7IFT8LOEEk7OxZIpYez9Oh~Cddvz2-Q^}z$*Hd|L?S)qmODUDNM`jN-lcN6MFEp*`GzEE0iV*SI z^QXwyBTGKmlwSorwDZJTrl@CHbCSk*q%(OA70=FcM6l&R7n)du1lSNRR40$f3k z48I+C<7lCVHqH*qCcQ{=EvTI;r$8yn=f}iXi>l*~##Di{8U#;nB6plx-xJUP0001> eeBsmp0m1`-LjV8}lu$=LFb#_W000000a;oZ9p=jb literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-1.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-1.xz new file mode 100644 index 0000000000000000000000000000000000000000..fea5ad2f9980d5d9145700561a980e6e106b4e32 GIT binary patch literal 72 zcmexsUKJ6=z`&TPbkB_WfFQ3TBL@Qr)Zepw&B(yxk(!f}&lR3ul#`;!1rm2&yhxOR VQI)q)^2oLcPBVEKL4u5tQ2?t(5zGJp literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-2.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-2.xz new file mode 100644 index 0000000000000000000000000000000000000000..6b5dcb347b24d1a5abf4150b1e3c9039b1b65a0d GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^*K~RyAgMq=yr{f_b1CK{)PEI~ocz#h%iXs;S5I8ShB+9_3 U$Xj}6#ia>OGkF<7f{c+-0BF(?ZvX%Q literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-3.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-block_header-3.xz new file mode 100644 index 0000000000000000000000000000000000000000..156531206342a87baa8029915aae0c940301c5ed GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^bfme}{gMlGXurZR6fyW~?CnujPJijO>MUjgE2%Hx$5@ldi U2vp0!7#RfsADItp literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-check-crc64.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-check-crc64.xz new file mode 100644 index 0000000000000000000000000000000000000000..5a9915d2f9fc4711b26ed2d399027583bf824340 GIT binary patch literal 72 zcmexsUKJ6=z`*kC+7>q^21P~=1_p*3{K~?N46GihIXU@UObl${`9(P?id+ou^*RLS b+D|*hz^K7%lb*#azwL7^BTzj9OJo!P#4r-r literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-check-none.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-check-none.xz new file mode 100644 index 0000000000000000000000000000000000000000..1e85faf3d06eff1bc420925a1af096762b00db51 GIT binary patch literal 64 zcmexsUKJ6=z`*cd=%ynRgCZjbkbQ$+S(uT5)gv`0C!dRnfh|10C?`dci-Cbrf!E~i R=F@CN^Qstu>KGUzqX7L^4~{4qDc`tbuGQ?AKGtlV_0G|UM AumAu6 literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-delta-lzma2.tiff.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-delta-lzma2.tiff.xz new file mode 100644 index 0000000000000000000000000000000000000000..1f033bc52b5d3e8950a34ed118b8837c964771b7 GIT binary patch literal 51316 zcmV(jK=!}=H+ooF0004LBHlIv0RsU7ApsD_O|Gr(Epf;-0{|r9pd(3lQsrPvPy>Zs zcOWIa&BRoh{mcsSld+V6@60sNFVwf8V2;?$xWo6}29-rV*)3o_DhnJL!5s*9FDfD$;cT$-rTREE zz*j8)!K|gmmUgQ8?H=^jw7s%FUkB};R#(@O3_N1Zeu*TOO9t_tiku}PP za6}1b0kH!luSmY7X28pyRMppK@Gdw6E~#W6mq8(ky5vv4qs>TS=?_P=coD&h_b;mJ zrKZSinZkX8d?q}xza6;e>a*+SwxpysN_CgJaoCCsxA#?tGP>P0;dQR#_78fR3UI$> zeddxN+{Yl4DxOmt4qxMo85hb=2y|JyV^p2^LkcRw^c@&+?@TFV0~oIG50tz+W|} zk_K-PRUf37h)K&`uCr71fI|ms1xv;Hw@?H>i3(=l5=6X1WErphz_sa|2c}Ht#adkp zkDN43ijsN1>|f~!3H+vB;$6$G*Yei`!?YPsD);W7wb?Q_t^&BNn%AQ*a$VDzY~%5e zp5_x2wf3b7$qT*}6dcbC=N^Zay9MmaN`(N8eE85<09|DA#WVTBp;HY15gd<6692 zzutacp;~h2BNa1}3$L0Q6$S%n6k5iG#bpV!fgiM#?iJCX5>_N7`eBoNlJ*U_|l|UCyKrjz60tI_8x!6o5@PMl+)zp4kS+A{Av^H&O zro}wxT6#L1@H>#yokTdbQSHINfbIK+_!jekh5RIJAn)~~N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.8.3/tests/files/good-1-lzma2-1.xz new file mode 100644 index 0000000000000000000000000000000000000000..d8d6489c872156e67ba5efb74bb5215524017c90 GIT binary patch literal 424 zcmV;Z0ayP0H+ooF0004LBHlIv03iVg0002k4vH<%0_2e@^`p>hS)*d z1vSlsrF;^l1>2ClFBH>pa+auyeS}tVjcOv8tDZfOfGx*f3=&e)KL-eV9He*i6Sx<^ z?va5xvxo5i0JCaRLG3QE@?@8!nx12!t{HRDzhLwWI`Eq@>)$`vuccLzMg>?R36H2?2n(a>KD@LR+sC7#z!udM zry}St=(Nyx7sZR@^1Ex+@0x)$P95CrHs(ZfzbUmm1uvH<%0_2e@^`p>hS)*d z1vSlsrF;^l1>2ClFBH>pa+auyeS}tVjcOv8tDZfOfGx*f3=&e)KL-eV9He*i6Sx<^ z?va5xvxo5i0JCaRLG3QE@?@8!nx12!t{HRF!iN;a*~>rB7^clCOI@hPUjb(*Of2Ng)l#05 z0)7x(^#ie(FDC7VdscrFd03A`5ZT!emgzgcwYb_V;nsoi$p8TRM@ZWM0fPg{0{{T7 S*U}X}Fb#_W000000a;o&?Zkcn literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-3.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-3.xz new file mode 100644 index 0000000000000000000000000000000000000000..c4c72be6561465781670b5a9b6067b1cfa016f7a GIT binary patch literal 408 zcmV;J0cZaGH+ooF0004LBHlIv03iVg0002k4fCOZ6IWCY;STP zb7^!SVQpn}EFfcVZgXX0bY*mPav))3X>e(CX=7<_XCMl|0h0kFT>vth32ao?E|qNg z_czrX;zk03b^A$njdN4B{cYRI+u1}5u`a$7wz{a|^X+w1+(97BzcyPSnOzSdp$4Ot zEw`7P@O%E^5{xZT@Y{BGeWZKSmFfEh=Jl74V(Hs3yR>jU7I*`9I*WSMxcEvZCH0P~ zBowA8C~Gfs;GuD}d!&F+K+5miw3Yq4!HkYzm)pyKA??5raT}jB^kOtXvnab% zHr;v-95y95SO)kNqs|z}{gxhSDFeg3C-diz+jF!lPdHd4zk?Jxesk{r&&s{?A!;aq z$c|ls$GjKNER(eemAVd+f@ZG&xB~$DM@ZWM0rUdN0{{SL!<9ZhFb#_W000000a;q- Ccebnm literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-4.xz b/cpp/third_party/xz-5.8.3/tests/files/good-1-lzma2-4.xz new file mode 100644 index 0000000000000000000000000000000000000000..e0d623a001ce5dbf48b55cff0168d01e1b012272 GIT binary patch literal 464 zcmV;>0WbdjH+ooF000E$*0e?f03iVg0002k4vH<%0_2e@^`p>hS)*d z1vSlsrF;^l1>2ClFBH>pa+auyeS}tVjcOv8tDZfOfGx*f3=&e)KL-eV9He*i6Sx<^ z?vZoKywB@2W~@k?Y1xwpuFg=eXbCS{h#$fTqAXZNu>WES>+aiQPjBG!AI}mun3hiV z^0NDGuS5dkBHq>JG?zJ}MK7+IFL`N?={Jc;{>*;rsVJ?(=G?j3suq3$048i%TbRc1DX>oOFa3E!PAZ1}7V{dJ3Z)9&E3cvv60KHuRF`LR6#Z>IJROhjM z#8;kdiLFX)7T7!mln@q~I3c6C#eo0(?$p&k-Hg{gk9O>csxqr()Hv_=`HH{y_@!3Y zZP!1A3!XpXM`$7l1vR)qa{1f7w~mItLrabgLoY#T-(d{I=r;&T-okbkxJXW(xl>Rd zGlS?Upl8TtI)5S(V*5wry!25I6^KdL$_pinUg+BWIKa+Ka~uEAo9Ilp6Zkio;@X@q zwd%N~jp|o|n{ax?7E&u=k literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-1-v1.lz b/cpp/third_party/xz-5.8.3/tests/files/good-1-v1.lz new file mode 100644 index 0000000000000000000000000000000000000000..4c9565c8175dd05d734cad3f8a1dcbce763bb662 GIT binary patch literal 50 wcmeZ?@(f_)VNj9uoRQBes;`*lTNBS2C literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-2-v1-v1.lz b/cpp/third_party/xz-5.8.3/tests/files/good-2-v1-v1.lz new file mode 100644 index 0000000000000000000000000000000000000000..5381891b9cb1373eb751ad5e510862025088d7ef GIT binary patch literal 86 zcmeZ?@(f_)VNj9uoRQD!u)hBP{|6il3}U9!4A~eUKnqIyKvZhaKIL}z`_T_(yZ`_H TA9;a+;qJv#!R$~qI#3z_0nryV literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-known_size-with_eopm.lzma b/cpp/third_party/xz-5.8.3/tests/files/good-known_size-with_eopm.lzma new file mode 100644 index 0000000000000000000000000000000000000000..1b45307930a582815373a9aa7ba4eda42cfa5fba GIT binary patch literal 37 ncma!L5MW^7Wq<+|NzWPitfK1byk!*^v@*m+|Nk%j!N33jV&({B literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-known_size-without_eopm.lzma b/cpp/third_party/xz-5.8.3/tests/files/good-known_size-without_eopm.lzma new file mode 100644 index 0000000000000000000000000000000000000000..83623fde97dbd6e3f939533875e874c1b6a1353d GIT binary patch literal 31 gcma!L5MW^7Wq<+|NzWPitfK1byk!*^G-VYS05o?5p#T5? literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/good-unknown_size-with_eopm.lzma b/cpp/third_party/xz-5.8.3/tests/files/good-unknown_size-with_eopm.lzma new file mode 100644 index 0000000000000000000000000000000000000000..0f4ff822e94e7314aba944420b0480a5652db340 GIT binary patch literal 37 ncma!L5MW^V4+RV=lAbg2Sw+>=dCMv;Xl00t{{LV4gMk46L~#&L literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/unsupported-1-v234.lz b/cpp/third_party/xz-5.8.3/tests/files/unsupported-1-v234.lz new file mode 100644 index 0000000000000000000000000000000000000000..e571b0fa9e7353882d562e0c449ac4b8e31b4ddc GIT binary patch literal 50 wcmeZ?@(g&z!=NJRIU}D{R9&67tm1-JhPdee|D`_|7@QX`66Ixp03#?30C^1y`v3p{ literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/unsupported-block_header.xz b/cpp/third_party/xz-5.8.3/tests/files/unsupported-block_header.xz new file mode 100644 index 0000000000000000000000000000000000000000..38304429d916e7f7c2fac0b473b3ebbcda62a964 GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^5L6MOI$o8{WNnvDQ^+?Uh$>(BXU<=PL%1Ke=VsKu(NR)w5 Vh1Wpi{`v_{GkF;qfPgVF3IH7?4`cuU literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/unsupported-check.xz b/cpp/third_party/xz-5.8.3/tests/files/unsupported-check.xz new file mode 100644 index 0000000000000000000000000000000000000000..c28355e7474b7350e7297f73a89a197d8ac426c9 GIT binary patch literal 68 zcmexsUKJ6=z`%65`1*P#21P~=1_p*3{K~?N46GihIXU@UObl${`9(P?id+oNix-J9 XFskqxXxv|~B|KpYBTy{^Q)CnXVowl* literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-1.xz b/cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-1.xz new file mode 100644 index 0000000000000000000000000000000000000000..48b93731c52b4c0fb2bc5724a38e16e5ea37b8e6 GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^5p`HN@(u?mhGO&82=H%paF)^@(=NILqC~`44FJ2_dz^KA& SpmBfw1gDw2j3C8~kx>9kA`n^t literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-2.xz b/cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-2.xz new file mode 100644 index 0000000000000000000000000000000000000000..c283359d56204cd1fa673fb54d4642b30cf36155 GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^5ftm3?0|UeF)^ARX46GihIXU@UObl${`9(P?id+oNix-J9 XFskqxXxv{v!D%KhBTy{^V`LNnmDmyA literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-3.xz b/cpp/third_party/xz-5.8.3/tests/files/unsupported-filter_flags-3.xz new file mode 100644 index 0000000000000000000000000000000000000000..26084984f97da6e03bd6e326d6ef4b333cd47045 GIT binary patch literal 68 zcmexsUKJ6=z`&TPbkB^5QIU}Yh)ztDp3TU>>XDk0lh4J(z!sigl#`;!#o)YnkthSB V3a^32{q+-^X7VyJ00CoU6aZ6m5QqQ( literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/Makefile b/cpp/third_party/xz-5.8.3/tests/ossfuzz/Makefile new file mode 100644 index 0000000000..742e06361a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/Makefile @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: 0BSD + +FUZZ_TARGET_SRCS = $(wildcard *.c) +FUZZ_TARGET_BINS = $(FUZZ_TARGET_SRCS:.c=) + +all: $(FUZZ_TARGET_BINS) + +%: %.c + $(CC) $(CFLAGS) -c $< -I ../../src/liblzma/api/ ; + $(CXX) $(CXXFLAGS) $(LIB_FUZZING_ENGINE) $(<:.c=.o) -o $(OUT)/$@ \ + ../../src/liblzma/.libs/liblzma.a ; + +# The generated binaries are not removed, just the object files. The +# binaries are created to the $(OUT) directory and must be removed by the +# fuzzing framework. +clean: + rm -f *.o diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_alone.options b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_alone.options new file mode 100644 index 0000000000..1351d96c82 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_alone.options @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: 0BSD + +[libfuzzer] +max_len = 4096 +dict = fuzz_lzma.dict diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream.options b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream.options new file mode 100644 index 0000000000..bbf43ac420 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream.options @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: 0BSD + +[libfuzzer] +dict = fuzz_xz.dict diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream_mt.options b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream_mt.options new file mode 100644 index 0000000000..bbf43ac420 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_decode_stream_mt.options @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: 0BSD + +[libfuzzer] +dict = fuzz_xz.dict diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_encode_stream.options b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_encode_stream.options new file mode 100644 index 0000000000..86d4f0c6ba --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_encode_stream.options @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: 0BSD + +[libfuzzer] +max_len = 4096 diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_lzma.dict b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_lzma.dict new file mode 100644 index 0000000000..b9d5dff750 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_lzma.dict @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: 0BSD + +# first 5 header bytes of .lzma archives based on the info from +# /doc/lzma-file-format.txt + +# byte 0 is created by encoding LZMA property values (lc, lp, pb) +# using the algorithm described in the documentation above. + +# lc=3, lp=0, pb=2 and dictionary size = 0x00100000 +"\x5d\x00\x00\x10\x00" + +# lc=3, lp=1, pb=3 and dictionary size = 0x00100000 +"\x93\x00\x00\x10\x00" + +# lc=2, lp=2, pb=4 and dictionary size = 0x00100000 +"\xc8\x00\x00\x10\x00" + +# lc=1, lp=3, pb=1 and dictionary size = 0x00200000 +"\x49\x00\x00\x20\x00" + +# lc=0, lp=4, pb=0 and dictionary size = 0x00200000 +"\x24\x00\x00\x20\x00" diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_xz.dict b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_xz.dict new file mode 100644 index 0000000000..6ba4f24a10 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/config/fuzz_xz.dict @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: 0BSD + +"\xFD7zXZ\x00" +"YZ" diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_common.h b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_common.h new file mode 100644 index 0000000000..b47a3bdf4a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_common.h @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file fuzz_common.h +/// \brief Common macros and functions needed by the fuzz targets +// +// Authors: Maksym Vatsyk +// Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "lzma.h" + +// Some header values can make liblzma allocate a lot of RAM +// (up to about 4 GiB with liblzma 5.2.x). We set a limit here to +// prevent extreme allocations when fuzzing. +#define MEM_LIMIT (300 << 20) // 300 MiB + +// Amount of input to pass to lzma_code() per call at most. +#define IN_CHUNK_SIZE 2047 + + +static void +fuzz_code(lzma_stream *stream, const uint8_t *inbuf, size_t inbuf_size) { + // Output buffer for decompressed data. This is write only; nothing + // cares about the actual data written here. + uint8_t outbuf[4096]; + + // Pass half of the input on the first call and then proceed in + // chunks. It's fine that this rounds to 0 when inbuf_size is 1. + stream->next_in = inbuf; + stream->avail_in = inbuf_size / 2; + + lzma_action action = LZMA_RUN; + + lzma_ret ret; + do { + if (stream->avail_in == 0 && inbuf_size > 0) { + const size_t chunk_size = inbuf_size < IN_CHUNK_SIZE + ? inbuf_size : IN_CHUNK_SIZE; + + stream->next_in = inbuf; + stream->avail_in = chunk_size; + + inbuf += chunk_size; + inbuf_size -= chunk_size; + + if (inbuf_size == 0) + action = LZMA_FINISH; + } + + if (stream->avail_out == 0) { + // outbuf became full. We don't care about the + // uncompressed data there, so we simply reuse + // the outbuf and overwrite the old data. + stream->next_out = outbuf; + stream->avail_out = sizeof(outbuf); + } + } while ((ret = lzma_code(stream, action)) == LZMA_OK); + + // LZMA_PROG_ERROR should never happen as long as the code calling + // the liblzma functions is correct. Thus LZMA_PROG_ERROR is a sign + // of a bug in either this function or in liblzma. + if (ret == LZMA_PROG_ERROR) { + fprintf(stderr, "lzma_code() returned LZMA_PROG_ERROR\n"); + abort(); + } +} diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_alone.c b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_alone.c new file mode 100644 index 0000000000..1ef2f9e7a6 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_alone.c @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file fuzz_decode_alone.c +/// \brief Fuzz test program for liblzma .lzma decoding +// +// Authors: Maksym Vatsyk +// Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "lzma.h" +#include "fuzz_common.h" + + +extern int +LLVMFuzzerTestOneInput(const uint8_t *inbuf, size_t inbuf_size) +{ + lzma_stream strm = LZMA_STREAM_INIT; + // Initialize a LZMA alone decoder using the memory usage limit + // defined in fuzz_common.h + lzma_ret ret = lzma_alone_decoder(&strm, MEM_LIMIT); + + if (ret != LZMA_OK) { + // This should never happen unless the system has + // no free memory or address space to allow the small + // allocations that the initialization requires. + fprintf(stderr, "lzma_alone_decoder() failed (%d)\n", ret); + abort(); + } + + fuzz_code(&strm, inbuf, inbuf_size); + + // Free the allocated memory. + lzma_end(&strm); + return 0; +} diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream.c b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream.c new file mode 100644 index 0000000000..d7860611ae --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream.c @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file fuzz_decode_stream.c +/// \brief Fuzz test program for single threaded .xz decoding +// +// Authors: Lasse Collin +// Maksym Vatsyk +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "lzma.h" +#include "fuzz_common.h" + + +extern int +LLVMFuzzerTestOneInput(const uint8_t *inbuf, size_t inbuf_size) +{ + lzma_stream strm = LZMA_STREAM_INIT; + // Initialize a .xz decoder using the memory usage limit + // defined in fuzz_common.h + // + // Enable support for concatenated .xz files which is used when + // decompressing regular .xz files (instead of data embedded inside + // some other file format). Integrity checks on the uncompressed + // data are ignored to make fuzzing more effective (incorrect check + // values won't prevent the decoder from processing more input). + // + // The flag LZMA_IGNORE_CHECK doesn't disable verification of + // header CRC32 values. Those checks are disabled when liblzma is + // built with the #define FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION. + lzma_ret ret = lzma_stream_decoder(&strm, MEM_LIMIT, + LZMA_CONCATENATED | LZMA_IGNORE_CHECK); + + if (ret != LZMA_OK) { + // This should never happen unless the system has + // no free memory or address space to allow the small + // allocations that the initialization requires. + fprintf(stderr, "lzma_stream_decoder() failed (%d)\n", ret); + abort(); + } + + fuzz_code(&strm, inbuf, inbuf_size); + + // Free the allocated memory. + lzma_end(&strm); + + return 0; +} diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream_mt.c b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream_mt.c new file mode 100644 index 0000000000..23ea976578 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_decode_stream_mt.c @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file fuzz_decode_stream_mt.c +/// \brief Fuzz test program for multithreaded .xz decoding +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "lzma.h" +#include "fuzz_common.h" + + +extern int +LLVMFuzzerTestOneInput(const uint8_t *inbuf, size_t inbuf_size) +{ + lzma_stream strm = LZMA_STREAM_INIT; + + lzma_mt mt = { + .flags = LZMA_CONCATENATED | LZMA_IGNORE_CHECK, + .threads = 2, + .timeout = 0, + .memlimit_threading = MEM_LIMIT / 2, + .memlimit_stop = MEM_LIMIT, + }; + + lzma_ret ret = lzma_stream_decoder_mt(&strm, &mt); + + if (ret != LZMA_OK) { + // This should never happen unless the system has + // no free memory or address space to allow the small + // allocations that the initialization requires. + fprintf(stderr, "lzma_stream_decoder_mt() failed (%d)\n", ret); + abort(); + } + + fuzz_code(&strm, inbuf, inbuf_size); + + lzma_end(&strm); + + return 0; +} diff --git a/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_encode_stream.c b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_encode_stream.c new file mode 100644 index 0000000000..9438263f33 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/ossfuzz/fuzz_encode_stream.c @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file fuzz_encode_stream.c +/// \brief Fuzz test program for .xz encoding +// +// Authors: Maksym Vatsyk +// Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "lzma.h" +#include "fuzz_common.h" + + +extern int +LLVMFuzzerTestOneInput(const uint8_t *inbuf, size_t inbuf_size) +{ + if (inbuf_size == 0) { + fprintf(stderr, "no input data provided\n"); + return 0; + } + + // Set the LZMA options based on the first input byte. The fuzzer + // will learn through its mutational genetic algorithm with the + // code coverage feedback that the first byte must be one of the + // values with a switch case label. This allows us to have one fuzz + // target cover many critical code paths so the fuzz resources can + // be used efficiently. + uint32_t preset_level; + const uint8_t decider = inbuf[0]; + + switch (decider) { + case 0: + case 1: + case 5: + preset_level = (uint32_t)decider; + break; + case 6: + preset_level = 0 | LZMA_PRESET_EXTREME; + break; + case 7: + preset_level = 3 | LZMA_PRESET_EXTREME; + break; + default: + return 0; + } + + // Initialize lzma_options with the above preset level + lzma_options_lzma opt_lzma; + if (lzma_lzma_preset(&opt_lzma, preset_level)){ + fprintf(stderr, "lzma_lzma_preset() failed\n"); + abort(); + } + + // Set the filter chain as only LZMA2. + lzma_filter filters[2] = { + { + .id = LZMA_FILTER_LZMA2, + .options = &opt_lzma, + }, { + .id = LZMA_VLI_UNKNOWN, + } + }; + + // initialize empty LZMA stream + lzma_stream strm = LZMA_STREAM_INIT; + + // Initialize the stream encoder using the above + // stream, filter chain and CRC64. + lzma_ret ret = lzma_stream_encoder(&strm, filters, LZMA_CHECK_CRC64); + if (ret != LZMA_OK) { + fprintf(stderr, "lzma_stream_encoder() failed (%d)\n", ret); + abort(); + } + + fuzz_code(&strm, inbuf + 1, inbuf_size - 1); + + // Free the allocated memory. + lzma_end(&strm); + return 0; +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_bcj_exact_size.c b/cpp/third_party/xz-5.8.3/tests/test_bcj_exact_size.c new file mode 100644 index 0000000000..c73560ca4f --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_bcj_exact_size.c @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_bcj_exact_size.c +/// \brief Tests BCJ decoding when the output size is known +/// +/// These tests fail with XZ Utils 5.0.3 and earlier. +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + + +static void +test_exact_size(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + if (!lzma_filter_encoder_is_supported(LZMA_FILTER_POWERPC) + || !lzma_filter_decoder_is_supported( + LZMA_FILTER_POWERPC)) + assert_skip("PowerPC BCJ encoder and/or decoder " + "is disabled"); + + // Something to be compressed + const uint8_t in[16] = "0123456789ABCDE"; + + // in[] after compression + uint8_t compressed[1024]; + size_t compressed_size = 0; + + // Output buffer for decompressing compressed[] + uint8_t out[sizeof(in)]; + + // Compress with PowerPC BCJ and LZMA2. PowerPC BCJ is used because + // it has fixed 4-byte alignment which makes triggering the potential + // bug easy. + lzma_options_lzma opt_lzma2; + assert_false(lzma_lzma_preset(&opt_lzma2, 0)); + + lzma_filter filters[3] = { + { .id = LZMA_FILTER_POWERPC, .options = NULL }, + { .id = LZMA_FILTER_LZMA2, .options = &opt_lzma2 }, + { .id = LZMA_VLI_UNKNOWN, .options = NULL }, + }; + + assert_lzma_ret(lzma_stream_buffer_encode( + filters, LZMA_CHECK_CRC32, NULL, + in, sizeof(in), + compressed, &compressed_size, sizeof(compressed)), + LZMA_OK); + + // Decompress so that we won't give more output space than + // the Stream will need. + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_stream_decoder(&strm, 10 << 20, 0), LZMA_OK); + + strm.next_in = compressed; + strm.next_out = out; + + while (true) { + if (strm.total_in < compressed_size) + strm.avail_in = 1; + + const lzma_ret ret = lzma_code(&strm, LZMA_RUN); + if (ret == LZMA_STREAM_END) { + assert_uint_eq(strm.total_in, compressed_size); + assert_uint_eq(strm.total_out, sizeof(in)); + lzma_end(&strm); + return; + } + + assert_lzma_ret(ret, LZMA_OK); + + if (strm.total_out < sizeof(in)) + strm.avail_out = 1; + } +#endif +} + + +static void +test_empty_block(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + if (!lzma_filter_decoder_is_supported(LZMA_FILTER_POWERPC)) + assert_skip("PowerPC BCJ decoder is disabled"); + + // An empty file with one Block using PowerPC BCJ and LZMA2. + size_t in_size; + uint8_t *empty_bcj_lzma2 = tuktest_file_from_srcdir( + "files/good-1-empty-bcj-lzma2.xz", &in_size); + + // Decompress without giving any output space. + uint64_t memlimit = 1 << 20; + uint8_t out[1]; + size_t in_pos = 0; + size_t out_pos = 0; + assert_lzma_ret(lzma_stream_buffer_decode(&memlimit, 0, NULL, + empty_bcj_lzma2, &in_pos, in_size, out, &out_pos, 0), + LZMA_OK); + assert_uint_eq(in_pos, in_size); + assert_uint_eq(out_pos, 0); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + + tuktest_run(test_exact_size); + tuktest_run(test_empty_block); + + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_block_header.c b/cpp/third_party/xz-5.8.3/tests/test_block_header.c new file mode 100644 index 0000000000..a9d669cdb9 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_block_header.c @@ -0,0 +1,519 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_block_header.c +/// \brief Tests Block Header coders +// +// Authors: Lasse Collin +// Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + + +static lzma_options_lzma opt_lzma; + + +// Used in test_lzma_block_header_decode() between tests to ensure +// no artifacts are leftover in the block struct that could influence +// later tests. +#define RESET_BLOCK(block, buf) \ +do { \ + lzma_filter *filters_ = (block).filters; \ + lzma_filters_free(filters_, NULL); \ + memzero((buf), sizeof((buf))); \ + memzero(&(block), sizeof(lzma_block)); \ + (block).filters = filters_; \ + (block).check = LZMA_CHECK_CRC32; \ +} while (0) + + +#ifdef HAVE_ENCODERS +static lzma_filter filters_none[1] = { + { + .id = LZMA_VLI_UNKNOWN, + }, +}; + + +static lzma_filter filters_one[2] = { + { + .id = LZMA_FILTER_LZMA2, + .options = &opt_lzma, + }, { + .id = LZMA_VLI_UNKNOWN, + } +}; + + +// These filters are only used in test_lzma_block_header_decode() +// which only runs if encoders and decoders are configured. +#ifdef HAVE_DECODERS +static lzma_filter filters_four[5] = { + { + .id = LZMA_FILTER_X86, + .options = NULL, + }, { + .id = LZMA_FILTER_X86, + .options = NULL, + }, { + .id = LZMA_FILTER_X86, + .options = NULL, + }, { + .id = LZMA_FILTER_LZMA2, + .options = &opt_lzma, + }, { + .id = LZMA_VLI_UNKNOWN, + } +}; +#endif + + +static lzma_filter filters_five[6] = { + { + .id = LZMA_FILTER_X86, + .options = NULL, + }, { + .id = LZMA_FILTER_X86, + .options = NULL, + }, { + .id = LZMA_FILTER_X86, + .options = NULL, + }, { + .id = LZMA_FILTER_X86, + .options = NULL, + }, { + .id = LZMA_FILTER_LZMA2, + .options = &opt_lzma, + }, { + .id = LZMA_VLI_UNKNOWN, + } +}; +#endif + + +static void +test_lzma_block_header_size(void) +{ +#ifndef HAVE_ENCODERS + assert_skip("Encoder support disabled"); +#else + if (!lzma_filter_encoder_is_supported(LZMA_FILTER_X86)) + assert_skip("x86 BCJ encoder is disabled"); + + lzma_block block = { + .version = 0, + .filters = filters_one, + .compressed_size = LZMA_VLI_UNKNOWN, + .uncompressed_size = LZMA_VLI_UNKNOWN, + .check = LZMA_CHECK_CRC32 + }; + + // Test that all initial options are valid + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_uint(block.header_size, >=, LZMA_BLOCK_HEADER_SIZE_MIN); + assert_uint(block.header_size, <=, LZMA_BLOCK_HEADER_SIZE_MAX); + assert_uint_eq(block.header_size % 4, 0); + + // Test invalid version number + for (uint32_t i = 2; i < 20; i++) { + block.version = i; + assert_lzma_ret(lzma_block_header_size(&block), + LZMA_OPTIONS_ERROR); + } + + block.version = 1; + + // Test invalid compressed size + block.compressed_size = 0; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_PROG_ERROR); + + block.compressed_size = LZMA_VLI_MAX + 1; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_PROG_ERROR); + block.compressed_size = LZMA_VLI_UNKNOWN; + + // Test invalid uncompressed size + block.uncompressed_size = LZMA_VLI_MAX + 1; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_PROG_ERROR); + block.uncompressed_size = LZMA_VLI_MAX; + + // Test invalid filters + block.filters = NULL; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_PROG_ERROR); + + block.filters = filters_none; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_PROG_ERROR); + + block.filters = filters_five; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_PROG_ERROR); + + block.filters = filters_one; + + // Test setting compressed_size to something valid + block.compressed_size = 4096; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_uint(block.header_size, >=, LZMA_BLOCK_HEADER_SIZE_MIN); + assert_uint(block.header_size, <=, LZMA_BLOCK_HEADER_SIZE_MAX); + assert_uint_eq(block.header_size % 4, 0); + + // Test setting uncompressed_size to something valid + block.uncompressed_size = 4096; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_uint(block.header_size, >=, LZMA_BLOCK_HEADER_SIZE_MIN); + assert_uint(block.header_size, <=, LZMA_BLOCK_HEADER_SIZE_MAX); + assert_uint_eq(block.header_size % 4, 0); + + // This should pass, but header_size will be an invalid value + // because the total block size will not be able to fit in a valid + // lzma_vli. This way a temporary value can be used to reserve + // space for the header and later the actual value can be set. + block.compressed_size = LZMA_VLI_MAX; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_uint(block.header_size, >=, LZMA_BLOCK_HEADER_SIZE_MIN); + assert_uint(block.header_size, <=, LZMA_BLOCK_HEADER_SIZE_MAX); + assert_uint_eq(block.header_size % 4, 0); + + // Use an invalid value for a filter option. This should still pass + // because the size of the LZMA2 properties is known by liblzma + // without reading any of the options so it doesn't validate them. + lzma_options_lzma bad_ops; + assert_false(lzma_lzma_preset(&bad_ops, 1)); + bad_ops.pb = 0x1000; + + lzma_filter bad_filters[2] = { + { + .id = LZMA_FILTER_LZMA2, + .options = &bad_ops + }, + { + .id = LZMA_VLI_UNKNOWN, + .options = NULL + } + }; + + block.filters = bad_filters; + + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_uint(block.header_size, >=, LZMA_BLOCK_HEADER_SIZE_MIN); + assert_uint(block.header_size, <=, LZMA_BLOCK_HEADER_SIZE_MAX); + assert_uint_eq(block.header_size % 4, 0); + + // Use an invalid block option. The check type isn't stored in + // the Block Header and so _header_size ignores it. + block.check = INVALID_LZMA_CHECK_ID; + block.ignore_check = false; + + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_uint(block.header_size, >=, LZMA_BLOCK_HEADER_SIZE_MIN); + assert_uint(block.header_size, <=, LZMA_BLOCK_HEADER_SIZE_MAX); + assert_uint_eq(block.header_size % 4, 0); +#endif +} + + +static void +test_lzma_block_header_encode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + + if (!lzma_filter_encoder_is_supported(LZMA_FILTER_X86) + || !lzma_filter_decoder_is_supported(LZMA_FILTER_X86)) + assert_skip("x86 BCJ encoder and/or decoder " + "is disabled"); + + lzma_block block = { + .version = 1, + .filters = filters_one, + .compressed_size = LZMA_VLI_UNKNOWN, + .uncompressed_size = LZMA_VLI_UNKNOWN, + .check = LZMA_CHECK_CRC32, + }; + + // Ensure all block options are valid before changes are tested + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + + uint8_t out[LZMA_BLOCK_HEADER_SIZE_MAX]; + + // Test invalid block version + for (uint32_t i = 2; i < 20; i++) { + block.version = i; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + } + + block.version = 1; + + // Test invalid header size (< min, > max, % 4 != 0) + block.header_size = LZMA_BLOCK_HEADER_SIZE_MIN - 4; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + block.header_size = LZMA_BLOCK_HEADER_SIZE_MIN + 2; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + block.header_size = LZMA_BLOCK_HEADER_SIZE_MAX + 4; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + + // Test invalid compressed_size + block.compressed_size = 0; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + block.compressed_size = LZMA_VLI_MAX + 1; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + + // This test passes test_lzma_block_header_size, but should + // fail here because there is not enough space to encode the + // proper block size because the total size is too big to fit + // in an lzma_vli + block.compressed_size = LZMA_VLI_MAX; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + block.compressed_size = LZMA_VLI_UNKNOWN; + + // Test invalid uncompressed size + block.uncompressed_size = LZMA_VLI_MAX + 1; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + block.uncompressed_size = LZMA_VLI_UNKNOWN; + + // Test invalid block check + block.check = INVALID_LZMA_CHECK_ID; + block.ignore_check = false; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + block.check = LZMA_CHECK_CRC32; + + // Test invalid filters + block.filters = NULL; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + + block.filters = filters_none; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + + block.filters = filters_five; + block.header_size = LZMA_BLOCK_HEADER_SIZE_MAX - 4; + assert_lzma_ret(lzma_block_header_encode(&block, out), + LZMA_PROG_ERROR); + + // Test valid encoding and verify bytes of block header. + // More complicated tests for encoding headers are included + // in test_lzma_block_header_decode. + block.filters = filters_one; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_lzma_ret(lzma_block_header_encode(&block, out), LZMA_OK); + + // First read block header size from out and verify + // that it == (encoded size + 1) * 4 + uint32_t header_size = (out[0] + 1U) * 4; + assert_uint_eq(header_size, block.header_size); + + // Next read block flags + uint8_t flags = out[1]; + + // Should have number of filters = 1 + assert_uint_eq((flags & 0x3) + 1U, 1); + + // Bits 2-7 must be empty not set + assert_uint_eq(flags & (0xFF - 0x3), 0); + + // Verify filter flags + // Decode Filter ID + lzma_vli filter_id = 0; + size_t pos = 2; + assert_lzma_ret(lzma_vli_decode(&filter_id, NULL, out, + &pos, header_size), LZMA_OK); + assert_uint_eq(filter_id, filters_one[0].id); + + // Decode Size of Properties + lzma_vli prop_size = 0; + assert_lzma_ret(lzma_vli_decode(&prop_size, NULL, out, + &pos, header_size), LZMA_OK); + + // LZMA2 has 1 byte prop size + assert_uint_eq(prop_size, 1); + uint8_t expected_filter_props = 0; + assert_lzma_ret(lzma_properties_encode(filters_one, + &expected_filter_props), LZMA_OK); + assert_uint_eq(out[pos], expected_filter_props); + pos++; + + // Check null-padding + for (size_t i = pos; i < header_size - 4; i++) + assert_uint_eq(out[i], 0); + + // Check CRC32 + assert_uint_eq(read32le(&out[header_size - 4]), lzma_crc32(out, + header_size - 4, 0)); +#endif +} + + +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +// Helper function to compare two lzma_block structures field by field +static void +compare_blocks(lzma_block *block_expected, lzma_block *block_actual) +{ + assert_uint_eq(block_actual->version, block_expected->version); + assert_uint_eq(block_actual->compressed_size, + block_expected->compressed_size); + assert_uint_eq(block_actual->uncompressed_size, + block_expected->uncompressed_size); + assert_uint_eq(block_actual->check, block_expected->check); + assert_uint_eq(block_actual->header_size, block_expected->header_size); + + // Compare filter IDs + assert_true(block_expected->filters && block_actual->filters); + lzma_filter expected_filter = block_expected->filters[0]; + uint32_t filter_count = 0; + while (expected_filter.id != LZMA_VLI_UNKNOWN) { + assert_uint_eq(block_actual->filters[filter_count].id, + expected_filter.id); + expected_filter = block_expected->filters[++filter_count]; + } + + assert_uint_eq(block_actual->filters[filter_count].id, + LZMA_VLI_UNKNOWN); +} +#endif + + +static void +test_lzma_block_header_decode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + if (!lzma_filter_encoder_is_supported(LZMA_FILTER_X86) + || !lzma_filter_decoder_is_supported(LZMA_FILTER_X86)) + assert_skip("x86 BCJ encoder and/or decoder " + "is disabled"); + + lzma_block block = { + .filters = filters_one, + .compressed_size = LZMA_VLI_UNKNOWN, + .uncompressed_size = LZMA_VLI_UNKNOWN, + .check = LZMA_CHECK_CRC32, + .version = 0 + }; + + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + + // Encode block header with simple options + uint8_t out[LZMA_BLOCK_HEADER_SIZE_MAX]; + assert_lzma_ret(lzma_block_header_encode(&block, out), LZMA_OK); + + // Decode block header and check that the options match + lzma_filter decoded_filters[LZMA_FILTERS_MAX + 1]; + lzma_block decoded_block = { + .version = 0, + .filters = decoded_filters, + .check = LZMA_CHECK_CRC32 + }; + decoded_block.header_size = lzma_block_header_size_decode(out[0]); + + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_OK); + compare_blocks(&block, &decoded_block); + + // Reset output buffer and decoded_block + RESET_BLOCK(decoded_block, out); + + // Test with compressed size set + block.compressed_size = 4096; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_lzma_ret(lzma_block_header_encode(&block, out), LZMA_OK); + decoded_block.header_size = lzma_block_header_size_decode(out[0]); + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_OK); + compare_blocks(&block, &decoded_block); + + RESET_BLOCK(decoded_block, out); + + // Test with uncompressed size set + block.uncompressed_size = 4096; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_lzma_ret(lzma_block_header_encode(&block, out), LZMA_OK); + decoded_block.header_size = lzma_block_header_size_decode(out[0]); + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_OK); + compare_blocks(&block, &decoded_block); + + RESET_BLOCK(decoded_block, out); + + // Test with multiple filters + block.filters = filters_four; + assert_lzma_ret(lzma_block_header_size(&block), LZMA_OK); + assert_lzma_ret(lzma_block_header_encode(&block, out), LZMA_OK); + decoded_block.header_size = lzma_block_header_size_decode(out[0]); + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_OK); + compare_blocks(&block, &decoded_block); + + lzma_filters_free(decoded_filters, NULL); + + // Test with too high version. The decoder will set it to a version + // that it supports. + decoded_block.version = 2; + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_OK); + assert_uint_eq(decoded_block.version, 1); + + // Free the filters for the last time since all other cases should + // result in an error. + lzma_filters_free(decoded_filters, NULL); + + // Test bad check type + decoded_block.check = INVALID_LZMA_CHECK_ID; + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_PROG_ERROR); + decoded_block.check = LZMA_CHECK_CRC32; + + // Test bad check value + out[decoded_block.header_size - 1] -= 10; + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_DATA_ERROR); + out[decoded_block.header_size - 1] += 10; + + // Test non-NULL padding + out[decoded_block.header_size - 5] = 1; + + // Recompute CRC32 + write32le(&out[decoded_block.header_size - 4], lzma_crc32(out, + decoded_block.header_size - 4, 0)); + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_OPTIONS_ERROR); + + // Test unsupported flags + out[1] = 0xFF; + + // Recompute CRC32 + write32le(&out[decoded_block.header_size - 4], lzma_crc32(out, + decoded_block.header_size - 4, 0)); + assert_lzma_ret(lzma_block_header_decode(&decoded_block, NULL, out), + LZMA_OPTIONS_ERROR); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + + if (lzma_lzma_preset(&opt_lzma, 1)) + tuktest_error("lzma_lzma_preset() failed"); + + tuktest_run(test_lzma_block_header_size); + tuktest_run(test_lzma_block_header_encode); + tuktest_run(test_lzma_block_header_decode); + + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_check.c b/cpp/third_party/xz-5.8.3/tests/test_check.c new file mode 100644 index 0000000000..f45ccdeb0d --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_check.c @@ -0,0 +1,398 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_check.c +/// \brief Tests integrity checks +// +// Authors: Lasse Collin +// Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" +#include "mythread.h" + + +// These must be specified as numbers so that the test works on EBCDIC +// systems too. +// static const uint8_t test_string[9] = "123456789"; +// static const uint8_t test_unaligned[12] = "xxx123456789"; +static const uint8_t test_string[9] = { 49, 50, 51, 52, 53, 54, 55, 56, 57 }; +static const uint8_t test_unaligned[12] + = { 120, 120, 120, 49, 50, 51, 52, 53, 54, 55, 56, 57 }; + +// 2 MB is more than enough for the tests. Actually a tiny value would +// work because we don't actually decompress the files, we only test +// decoding of the Stream Header fields. +#define TEST_CHECK_MEMLIMIT (2U << 20) + +static size_t no_check_size; +static uint8_t *no_check_xz_data; + +static size_t unsupported_check_size; +static uint8_t *unsupported_check_xz_data; + +#ifdef HAVE_CHECK_CRC32 +static size_t crc32_size; +static uint8_t *crc32_xz_data; +#endif + +#ifdef HAVE_CHECK_CRC64 +static size_t crc64_size; +static uint8_t *crc64_xz_data; +#endif + +#ifdef HAVE_CHECK_SHA256 +static size_t sha256_size; +static uint8_t *sha256_xz_data; +#endif + + +#if defined(HAVE_CHECK_CRC32) || defined(HAVE_CHECK_CRC64) +static const uint8_t * +get_random256(uint32_t *seed) +{ + static uint8_t buf[256]; + + for (size_t i = 0; i < sizeof(buf); ++i) { + *seed = *seed * 1103515245 + 12345; + buf[i] = (uint8_t)(*seed >> 22); + } + + return buf; +} +#endif + + +static void +test_lzma_crc32(void) +{ + // CRC32 is always enabled. + assert_true(lzma_check_is_supported(LZMA_CHECK_CRC32)); + + const uint32_t test_vector = 0xCBF43926; + + // Test 1 + assert_uint_eq(lzma_crc32(test_string, sizeof(test_string), 0), + test_vector); + + // Test 2 + assert_uint_eq(lzma_crc32(test_unaligned + 3, sizeof(test_string), 0), + test_vector); + + // Test 3 + uint32_t crc = 0; + for (size_t i = 0; i < sizeof(test_string); ++i) + crc = lzma_crc32(test_string + i, 1, crc); + assert_uint_eq(crc, test_vector); + + // Test 4: Test combination of different start and end alignments + // and different buffer lengths. + uint32_t seed = 23; + crc = 0x760CD032; // Random initial value + for (size_t start = 0; start < 32; ++start) + for (size_t size = 1; size < 256 - 32; ++size) + crc = lzma_crc32(get_random256(&seed), size, crc); + + assert_uint_eq(crc, 0x924E35FD); +} + + +static void +test_lzma_crc64(void) +{ + // CRC64 can be disabled. + if (!lzma_check_is_supported(LZMA_CHECK_CRC64)) + assert_skip("CRC64 support is disabled"); + + // If CRC64 is disabled then lzma_crc64() will be missing. + // Using an ifdef here avoids a linker error. +#ifdef HAVE_CHECK_CRC64 + const uint64_t test_vector = 0x995DC9BBDF1939FA; + + // Test 1 + assert_uint_eq(lzma_crc64(test_string, sizeof(test_string), 0), + test_vector); + + // Test 2 + assert_uint_eq(lzma_crc64(test_unaligned + 3, sizeof(test_string), 0), + test_vector); + + // Test 3 + uint64_t crc = 0; + for (size_t i = 0; i < sizeof(test_string); ++i) + crc = lzma_crc64(test_string + i, 1, crc); + assert_uint_eq(crc, test_vector); + + // Test 4: Test combination of different start and end alignments + // and different buffer lengths. + uint32_t seed = 29; + crc = 0x96E30D5184B7FA2C; // Random initial value + for (size_t start = 0; start < 32; ++start) + for (size_t size = 1; size < 256 - 32; ++size) + crc = lzma_crc64(get_random256(&seed), size, crc); + + assert_uint_eq(crc, 0x23AB787177231C9F); +#endif +} + + +static void +test_lzma_supported_checks(void) +{ + static const lzma_check expected_check_ids[] = { + LZMA_CHECK_NONE, +#ifdef HAVE_CHECK_CRC32 + LZMA_CHECK_CRC32, +#endif +#ifdef HAVE_CHECK_CRC64 + LZMA_CHECK_CRC64, +#endif +#ifdef HAVE_CHECK_SHA256 + LZMA_CHECK_SHA256, +#endif + }; + + for (lzma_check i = 0; i <= LZMA_CHECK_ID_MAX + 1; i++) { + bool matched = false; + for (unsigned int j = 0; j < ARRAY_SIZE(expected_check_ids); + j++) { + if (expected_check_ids[j] == i) { + matched = true; + break; + } + } + + if (matched) + assert_true(lzma_check_is_supported(i)); + else + assert_false(lzma_check_is_supported(i)); + } +} + + +static void +test_lzma_check_size(void) +{ + // Expected check sizes taken from src/liblzma/api/lzma/check.h + static const uint32_t expected_check_sizes[] = { + 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, + 32, 32, 32, 64, 64, 64 + }; + + for (lzma_check i = 0; i < ARRAY_SIZE(expected_check_sizes); i++) + assert_uint_eq(expected_check_sizes[i], lzma_check_size(i)); + + assert_uint_eq(lzma_check_size(INVALID_LZMA_CHECK_ID), UINT32_MAX); +} + + +// Test the single threaded decoder for lzma_get_check +static void +test_lzma_get_check_st(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + const uint32_t flags = LZMA_TELL_ANY_CHECK | + LZMA_TELL_UNSUPPORTED_CHECK | + LZMA_TELL_NO_CHECK; + + uint8_t outbuf[128]; + lzma_stream strm = LZMA_STREAM_INIT; + + // Test a file with no integrity check: + assert_lzma_ret(lzma_stream_decoder(&strm, TEST_CHECK_MEMLIMIT, + flags), LZMA_OK); + strm.next_in = no_check_xz_data; + strm.avail_in = no_check_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_NO_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_NONE); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); + + // Test a file with an unsupported integrity check type: + assert_lzma_ret(lzma_stream_decoder(&strm, TEST_CHECK_MEMLIMIT, + flags), LZMA_OK); + strm.next_in = unsupported_check_xz_data; + strm.avail_in = unsupported_check_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_UNSUPPORTED_CHECK); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); + + // Test a file with CRC32 as the integrity check: +#ifdef HAVE_CHECK_CRC32 + assert_lzma_ret(lzma_stream_decoder(&strm, TEST_CHECK_MEMLIMIT, + flags), LZMA_OK); + strm.next_in = crc32_xz_data; + strm.avail_in = crc32_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_GET_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_CRC32); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); +#endif + + // Test a file with CRC64 as the integrity check: +#ifdef HAVE_CHECK_CRC64 + assert_lzma_ret(lzma_stream_decoder(&strm, TEST_CHECK_MEMLIMIT, + flags), LZMA_OK); + strm.next_in = crc64_xz_data; + strm.avail_in = crc64_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_GET_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_CRC64); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); +#endif + + // Test a file with SHA-256 as the integrity check: +#ifdef HAVE_CHECK_SHA256 + assert_lzma_ret(lzma_stream_decoder(&strm, TEST_CHECK_MEMLIMIT, + flags), LZMA_OK); + strm.next_in = sha256_xz_data; + strm.avail_in = sha256_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_GET_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_SHA256); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); +#endif + + lzma_end(&strm); +#endif +} + + +static void +test_lzma_get_check_mt(void) +{ +#ifndef MYTHREAD_ENABLED + assert_skip("Threading support disabled"); +#elif !defined(HAVE_DECODERS) + assert_skip("Decoder support disabled"); +#else + const uint32_t flags = LZMA_TELL_ANY_CHECK | + LZMA_TELL_UNSUPPORTED_CHECK | + LZMA_TELL_NO_CHECK; + + const lzma_mt options = { + .flags = flags, + .threads = 2, + .timeout = 0, + .memlimit_threading = TEST_CHECK_MEMLIMIT, + .memlimit_stop = TEST_CHECK_MEMLIMIT + }; + + uint8_t outbuf[128]; + lzma_stream strm = LZMA_STREAM_INIT; + + // Test a file with no integrity check: + assert_lzma_ret(lzma_stream_decoder_mt(&strm, &options), LZMA_OK); + strm.next_in = no_check_xz_data; + strm.avail_in = no_check_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_NO_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_NONE); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); + + // Test a file with an unsupported integrity check type: + assert_lzma_ret(lzma_stream_decoder_mt(&strm, &options), LZMA_OK); + strm.next_in = unsupported_check_xz_data; + strm.avail_in = unsupported_check_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_UNSUPPORTED_CHECK); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); + + // Test a file with CRC32 as the integrity check: +#ifdef HAVE_CHECK_CRC32 + assert_lzma_ret(lzma_stream_decoder_mt(&strm, &options), LZMA_OK); + strm.next_in = crc32_xz_data; + strm.avail_in = crc32_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_GET_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_CRC32); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); +#endif + + // Test a file with CRC64 as the integrity check: +#ifdef HAVE_CHECK_CRC64 + assert_lzma_ret(lzma_stream_decoder_mt(&strm, &options), LZMA_OK); + strm.next_in = crc64_xz_data; + strm.avail_in = crc64_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_GET_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_CRC64); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); +#endif + + // Test a file with SHA-256 as the integrity check: +#ifdef HAVE_CHECK_SHA256 + assert_lzma_ret(lzma_stream_decoder_mt(&strm,&options), LZMA_OK); + strm.next_in = sha256_xz_data; + strm.avail_in = sha256_size; + strm.next_out = outbuf; + strm.avail_out = sizeof(outbuf); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_GET_CHECK); + assert_lzma_check(lzma_get_check(&strm), LZMA_CHECK_SHA256); + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); +#endif + + lzma_end(&strm); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + + no_check_xz_data = tuktest_file_from_srcdir( + "files/good-1-check-none.xz", &no_check_size); + + unsupported_check_xz_data = tuktest_file_from_srcdir( + "files/unsupported-check.xz", + &unsupported_check_size); + +#ifdef HAVE_CHECK_CRC32 + crc32_xz_data = tuktest_file_from_srcdir( + "files/good-1-check-crc32.xz", &crc32_size); +#endif + +#ifdef HAVE_CHECK_CRC64 + crc64_xz_data = tuktest_file_from_srcdir( + "files/good-1-check-crc64.xz", &crc64_size); +#endif + +#ifdef HAVE_CHECK_SHA256 + sha256_xz_data = tuktest_file_from_srcdir( + "files/good-1-check-sha256.xz", &sha256_size); +#endif + + tuktest_run(test_lzma_crc32); + tuktest_run(test_lzma_crc64); + tuktest_run(test_lzma_supported_checks); + tuktest_run(test_lzma_check_size); + tuktest_run(test_lzma_get_check_st); + tuktest_run(test_lzma_get_check_mt); + + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_compress.sh b/cpp/third_party/xz-5.8.3/tests/test_compress.sh new file mode 100755 index 0000000000..36a9ef945e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_compress.sh @@ -0,0 +1,166 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +############################################################################### +# +# Author: Lasse Collin +# +############################################################################### + +# Mandatory argument: +# $1 = test filename: compress_generated_ or compress_prepared_ +# +# Optional argument: +# $2 = directory of the xz and xzdec executables + +XZ=${2:-../src/xz}/xz +XZDEC=${2:-../src/xzdec}/xzdec + +# If xz wasn't built, this test is skipped. +if test ! -x "$XZ"; then + echo "xz was not built, skipping this test." + exit 77 +fi + +# xzdec isn't mandatory for this script. +test -x "$XZDEC" || XZDEC= + +# If compression or decompression support is missing, this test is skipped. +# This isn't perfect as if only some compressors or decompressors are disabled +# then this script can still fail because for now this doesn't check the +# availability of each filter. +if test ! -f ../config.h ; then + : +elif grep 'define HAVE_ENCODERS' ../config.h > /dev/null \ + && grep 'define HAVE_DECODERS' ../config.h > /dev/null ; then + : +else + echo "Compression or decompression support is disabled, skipping this test." + exit 77 +fi + +# Find out if our shell supports functions. +eval 'unset foo ; foo() { return 42; } ; foo' +if test $? != 42 ; then + echo "/bin/sh doesn't support functions, skipping this test." + exit 77 +fi + +test_xz() { + if $XZ -c "$@" "$FILE" > "$TMP_COMP"; then + : + else + echo "Compressing failed: $* $FILE" + exit 1 + fi + + if $XZ -cd "$TMP_COMP" > "$TMP_UNCOMP" ; then + : + else + echo "Decompressing failed: $* $FILE" + exit 1 + fi + + if cmp "$TMP_UNCOMP" "$FILE" ; then + : + else + echo "Decompressed file does not match" \ + "the original: $* $FILE" + exit 1 + fi + + if test -n "$XZDEC" ; then + if $XZDEC "$TMP_COMP" > "$TMP_UNCOMP" ; then + : + else + echo "Decompressing failed: $* $FILE" + exit 1 + fi + + if cmp "$TMP_UNCOMP" "$FILE" ; then + : + else + echo "Decompressed file does not match" \ + "the original: $* $FILE" + exit 1 + fi + fi +} + +# Set memory usage limit for xz. xzdec has no memory usage limiter. +# Force single-threaded mode as the test files are small +# (so more than one thread wouldn't be used anyway) and +# the tests are usually run in parallel. +XZ="$XZ --memlimit-compress=48MiB --memlimit-decompress=5MiB \ + --no-adjust --threads=1" + +# Create the required input file if needed. +# +# Derive temporary filenames for compressed and uncompressed outputs +# from the input filename. This is needed when multiple tests are +# run in parallel. +FILE=$1 +TMP_COMP="tmp_comp_$FILE" +TMP_UNCOMP="tmp_uncomp_$FILE" + +case $FILE in + # compress_generated files will be created in the build directory + # in the /tests/ sub-directory. + compress_generated_*) + if ./create_compress_files "$FILE" ; then + : + else + rm -f "$FILE" + echo "Failed to create the file '$FILE'." + exit 1 + fi + ;; + # compress_prepared files exist in the source directory since they + # do not need to be copied or regenerated. + compress_prepared_*) + FILE="$srcdir/$FILE" + ;; + '') + echo "No test file was specified." + exit 1 + ;; +esac + +# Remove temporary now (in case they are something weird), and on exit. +rm -f "$TMP_COMP" "$TMP_UNCOMP" +trap 'rm -f "$TMP_COMP" "$TMP_UNCOMP"' 0 + +# Compress and decompress the file with various filter configurations. +# +# Don't test with empty arguments; it breaks some ancient +# proprietary /bin/sh versions due to $@ used in test_xz(). +test_xz -1 +test_xz -2 +test_xz -3 +test_xz -4 + +test_filter() +{ + if test -f ../config.h ; then + grep "define HAVE_ENCODER_$1[ 1]*\$" ../config.h > /dev/null \ + || return + grep "define HAVE_DECODER_$1[ 1]*\$" ../config.h > /dev/null \ + || return + fi + shift + test_xz --filters="$* lzma2:dict=64KiB,nice=32,mode=fast" +} + +test_filter DELTA delta:dist=1 +test_filter DELTA delta:dist=4 +test_filter DELTA delta:dist=256 +test_filter X86 x86 +test_filter POWERPC powerpc +test_filter IA64 ia64 +test_filter ARM arm +test_filter ARMTHUMB armthumb +test_filter ARM64 arm64 +test_filter SPARC sparc +test_filter RISCV riscv + +exit 0 diff --git a/cpp/third_party/xz-5.8.3/tests/test_compress_generated_abc b/cpp/third_party/xz-5.8.3/tests/test_compress_generated_abc new file mode 100755 index 0000000000..b31d631c72 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_compress_generated_abc @@ -0,0 +1,4 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +exec "$srcdir/test_compress.sh" compress_generated_abc diff --git a/cpp/third_party/xz-5.8.3/tests/test_compress_generated_random b/cpp/third_party/xz-5.8.3/tests/test_compress_generated_random new file mode 100755 index 0000000000..c20f3dac60 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_compress_generated_random @@ -0,0 +1,4 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +exec "$srcdir/test_compress.sh" compress_generated_random diff --git a/cpp/third_party/xz-5.8.3/tests/test_compress_generated_text b/cpp/third_party/xz-5.8.3/tests/test_compress_generated_text new file mode 100755 index 0000000000..2c8c171036 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_compress_generated_text @@ -0,0 +1,4 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +exec "$srcdir/test_compress.sh" compress_generated_text diff --git a/cpp/third_party/xz-5.8.3/tests/test_files.sh b/cpp/third_party/xz-5.8.3/tests/test_files.sh new file mode 100755 index 0000000000..894130c185 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_files.sh @@ -0,0 +1,208 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +############################################################################### +# +# Author: Lasse Collin +# +############################################################################### + +# Optional argument: +# $1 = directory of the xz executable + +# If both xz and xzdec were not built, skip this test. +XZ=${1:-../src/xz}/xz +XZDEC=${2:-../src/xzdec}/xzdec +test -x "$XZ" || XZ= +test -x "$XZDEC" || XZDEC= +if test -z "$XZ$XZDEC"; then + echo "xz and xzdec were not built, skipping this test." + exit 77 +fi + +# If decompression support is missing, this test is skipped. +# This isn't perfect as if only some decompressors are disabled +# then some good files might not decompress and the test fails +# for a (kind of) wrong reason. +if test ! -f ../config.h ; then + : +elif grep 'define HAVE_DECODERS' ../config.h > /dev/null ; then + : +else + echo "Decompression support is disabled, skipping this test." + exit 77 +fi + +# If a feature was disabled at build time, make it possible to skip +# some of the test files. Use exit status 77 if any files were skipped. +EXIT_STATUS=0 +have_feature() +{ + test -f ../config.h || return 0 + grep "define HAVE_$1[ 1]*\$" ../config.h > /dev/null && return 0 + printf '%s: Skipping because HAVE_%s is not enabled\n' "$2" "$1" + EXIT_STATUS=77 + return 1 +} + + +####### +# .xz # +####### + +# If these integrity check types were disabled at build time, +# allow the tests to pass still. +NO_WARN= +if test -f ../config.h ; then + grep 'define HAVE_CHECK_CRC64' ../config.h > /dev/null || NO_WARN=-qQ + grep 'define HAVE_CHECK_SHA256' ../config.h > /dev/null || NO_WARN=-qQ +fi + +for I in "$srcdir"/files/good-*.xz +do + # If features were disabled at build time, keep this still working. + case $I in + */good-1-*delta-lzma2*.xz) + have_feature DECODER_DELTA "$I" || continue + ;; + esac + case $I in + */good-1-empty-bcj-lzma2.xz) + have_feature DECODER_POWERPC "$I" || continue + ;; + esac + case $I in + */good-1-sparc-lzma2.xz) + have_feature DECODER_SPARC "$I" || continue + ;; + esac + case $I in + */good-1-x86-lzma2.xz) + have_feature DECODER_X86 "$I" || continue + ;; + esac + case $I in + */good-1-arm64-lzma2-*.xz) + have_feature DECODER_ARM64 "$I" || continue + ;; + esac + case $I in + */good-1-riscv-lzma2-*.xz) + have_feature DECODER_RISCV "$I" || continue + ;; + esac + + if test -z "$XZ" || "$XZ" $NO_WARN -dc "$I" > /dev/null; then + : + else + echo "Good file failed: $I" + exit 1 + fi + + if test -z "$XZDEC" || "$XZDEC" $NO_WARN "$I" > /dev/null; then + : + else + echo "Good file failed: $I" + exit 1 + fi +done + +for I in "$srcdir"/files/bad-*.xz +do + if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then + echo "Bad file succeeded: $I" + exit 1 + fi + + # xzdec doesn't warn about unsupported check so skip this if any of + # the check types were disabled at built time (NO_WARN isn't empty). + if test -n "$XZDEC" && test -z "$NO_WARN" \ + && "$XZDEC" "$I" > /dev/null 2>&1; then + echo "Bad file succeeded: $I" + exit 1 + fi +done + +# Testing for the lzma_index_append() bug in <= 5.2.6 needs "xz -l": +I="$srcdir/files/bad-3-index-uncomp-overflow.xz" +if test -n "$XZ" && "$XZ" -l "$I" > /dev/null 2>&1; then + echo "Bad file succeeded with xz -l: $I" + exit 1 +fi + +for I in "$srcdir"/files/unsupported-*.xz +do + # Test these only with xz as unsupported-check.xz will exit + # successfully with xzdec because it doesn't warn about + # unsupported check type. + if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then + echo "Unsupported file succeeded: $I" + exit 1 + fi +done + +# Test that this passes with --no-warn (-Q). +I="$srcdir/files/unsupported-check.xz" +if test -z "$XZ" || "$XZ" -dcqQ "$I" > /dev/null; then + : +else + echo "Unsupported file failed with xz -Q: $I" + exit 1 +fi + +if test -z "$XZDEC" || "$XZDEC" -qQ "$I" > /dev/null; then + : +else + echo "Unsupported file failed with xzdec -Q: $I" + exit 1 +fi + + +######### +# .lzma # +######### + +for I in "$srcdir"/files/good-*.lzma +do + if test -z "$XZ" || "$XZ" -dc "$I" > /dev/null; then + : + else + echo "Good file failed: $I" + exit 1 + fi +done + +for I in "$srcdir"/files/bad-*.lzma +do + if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then + echo "Bad file succeeded: $I" + exit 1 + fi +done + + +####### +# .lz # +####### + +if have_feature LZIP_DECODER ".lz files" ; then + for I in "$srcdir"/files/good-*.lz + do + if test -z "$XZ" || "$XZ" -dc "$I" > /dev/null; then + : + else + echo "Good file failed: $I" + exit 1 + fi + done + + for I in "$srcdir"/files/bad-*.lz "$srcdir"/files/unsupported-*.lz + do + if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then + echo "Bad file succeeded: $I" + exit 1 + fi + done +fi + +exit "$EXIT_STATUS" diff --git a/cpp/third_party/xz-5.8.3/tests/test_filter_flags.c b/cpp/third_party/xz-5.8.3/tests/test_filter_flags.c new file mode 100644 index 0000000000..9dfc16e69b --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_filter_flags.c @@ -0,0 +1,535 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_filter_flags.c +/// \brief Tests Filter Flags coders +// +// Authors: Jia Tan +// Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + +// FIXME: This is from src/liblzma/common/common.h but it cannot be +// included here. This constant is needed in only a few files, perhaps +// move it to some other internal header or create a new one? +#define LZMA_FILTER_RESERVED_START (LZMA_VLI_C(1) << 62) + + +#if defined(HAVE_ENCODERS) +// No tests are run without encoders, so init the global filters +// only when the encoders are enabled. +static lzma_filter lzma1_filter = { LZMA_FILTER_LZMA1, NULL }; +static lzma_filter lzma2_filter = { LZMA_FILTER_LZMA2, NULL }; +static lzma_filter delta_filter = { LZMA_FILTER_DELTA, NULL }; + +static lzma_filter bcj_filters_encoders[] = { +#ifdef HAVE_ENCODER_X86 + { LZMA_FILTER_X86, NULL }, +#endif +#ifdef HAVE_ENCODER_POWERPC + { LZMA_FILTER_POWERPC, NULL }, +#endif +#ifdef HAVE_ENCODER_IA64 + { LZMA_FILTER_IA64, NULL }, +#endif +#ifdef HAVE_ENCODER_ARM + { LZMA_FILTER_ARM, NULL }, +#endif +#ifdef HAVE_ENCODER_ARM64 + { LZMA_FILTER_ARM64, NULL }, +#endif +#ifdef HAVE_ENCODER_ARMTHUMB + { LZMA_FILTER_ARMTHUMB, NULL }, +#endif +#ifdef HAVE_ENCODER_SPARC + { LZMA_FILTER_SPARC, NULL }, +#endif +#ifdef HAVE_ENCODER_RISCV + { LZMA_FILTER_RISCV, NULL }, +#endif + { LZMA_VLI_UNKNOWN, NULL } +}; + +// HAVE_ENCODERS ifdef not terminated here because decoders are +// only used if encoders are, but encoders can still be used +// even if decoders are not. + +#ifdef HAVE_DECODERS +static lzma_filter bcj_filters_decoders[] = { +#ifdef HAVE_DECODER_X86 + { LZMA_FILTER_X86, NULL }, +#endif +#ifdef HAVE_DECODER_POWERPC + { LZMA_FILTER_POWERPC, NULL }, +#endif +#ifdef HAVE_DECODER_IA64 + { LZMA_FILTER_IA64, NULL }, +#endif +#ifdef HAVE_DECODER_ARM + { LZMA_FILTER_ARM, NULL }, +#endif +#ifdef HAVE_DECODER_ARM64 + { LZMA_FILTER_ARM64, NULL }, +#endif +#ifdef HAVE_DECODER_ARMTHUMB + { LZMA_FILTER_ARMTHUMB, NULL }, +#endif +#ifdef HAVE_DECODER_SPARC + { LZMA_FILTER_SPARC, NULL }, +#endif +#ifdef HAVE_DECODER_RISCV + { LZMA_FILTER_RISCV, NULL }, +#endif + { LZMA_VLI_UNKNOWN, NULL } +}; +#endif +#endif + + +static void +test_lzma_filter_flags_size(void) +{ +#ifndef HAVE_ENCODERS + assert_skip("Encoder support disabled"); +#else + // For each supported filter, test that the size can be calculated + // and that the size calculated is reasonable. A reasonable size + // must be greater than 0, but less than the maximum size for the + // block header. + uint32_t size = 0; + if (lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA1)) { + // LZMA1 isn't supported in .xz so we get LZMA_PROG_ERROR. + assert_lzma_ret(lzma_filter_flags_size(&size, + &lzma1_filter), LZMA_PROG_ERROR); + } + + if (lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA2)) { + assert_lzma_ret(lzma_filter_flags_size(&size, + &lzma2_filter), LZMA_OK); + assert_true(size != 0 && size < LZMA_BLOCK_HEADER_SIZE_MAX); + } + + for (size_t i = 0; bcj_filters_encoders[i].id != LZMA_VLI_UNKNOWN; + ++i) { + assert_lzma_ret(lzma_filter_flags_size(&size, + &bcj_filters_encoders[i]), LZMA_OK); + assert_true(size != 0 && size < LZMA_BLOCK_HEADER_SIZE_MAX); + } + + if (lzma_filter_encoder_is_supported(LZMA_FILTER_DELTA)) { + assert_lzma_ret(lzma_filter_flags_size(&size, + &delta_filter), LZMA_OK); + assert_true(size != 0 && size < LZMA_BLOCK_HEADER_SIZE_MAX); + } + + // Test invalid Filter IDs + lzma_filter bad_filter = { 2, NULL }; + + assert_lzma_ret(lzma_filter_flags_size(&size, &bad_filter), + LZMA_OPTIONS_ERROR); + bad_filter.id = LZMA_VLI_MAX; + assert_lzma_ret(lzma_filter_flags_size(&size, &bad_filter), + LZMA_PROG_ERROR); + bad_filter.id = LZMA_FILTER_RESERVED_START; + assert_lzma_ret(lzma_filter_flags_size(&size, &bad_filter), + LZMA_PROG_ERROR); +#endif +} + + +// Helper function for test_lzma_filter_flags_encode. +// The should_encode parameter represents if the encoding operation +// is expected to fail. +// Avoid data -> encode -> decode -> compare to data. +// Instead create expected encoding and compare to result from +// lzma_filter_flags_encode. +// Filter Flags in .xz are encoded as: +// |Filter ID (VLI)|Size of Properties (VLI)|Filter Properties| +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +static void +verify_filter_flags_encode(lzma_filter *filter, bool should_encode) +{ + uint32_t size = 0; + + // First calculate the size of Filter Flags to know how much + // memory to allocate to hold the encoded Filter Flags + assert_lzma_ret(lzma_filter_flags_size(&size, filter), LZMA_OK); + uint8_t *encoded_out = tuktest_malloc(size); + size_t out_pos = 0; + if (!should_encode) { + assert_false(lzma_filter_flags_encode(filter, encoded_out, + &out_pos, size) == LZMA_OK); + return; + } + + // Next encode the Filter Flags for the provided filter + assert_lzma_ret(lzma_filter_flags_encode(filter, encoded_out, + &out_pos, size), LZMA_OK); + assert_uint_eq(size, out_pos); + + // Next decode the VLI for the Filter ID and verify it matches + // the expected Filter ID + size_t filter_id_vli_size = 0; + lzma_vli filter_id = 0; + assert_lzma_ret(lzma_vli_decode(&filter_id, NULL, encoded_out, + &filter_id_vli_size, size), LZMA_OK); + assert_uint_eq(filter->id, filter_id); + + // Next decode the Size of Properties and ensure it equals + // the expected size. + // Expected size should be: + // total filter flag length - size of filter id VLI + size of + // property size VLI + // Not verifying the contents of Filter Properties since + // that belongs in a different test + size_t size_of_properties_vli_size = 0; + lzma_vli size_of_properties = 0; + assert_lzma_ret(lzma_vli_decode(&size_of_properties, NULL, + encoded_out + filter_id_vli_size, + &size_of_properties_vli_size, size), LZMA_OK); + assert_uint_eq(size - (size_of_properties_vli_size + + filter_id_vli_size), size_of_properties); +} +#endif + + +static void +test_lzma_filter_flags_encode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + // No test for LZMA1 since the .xz format does not support LZMA1 + // and so the flags cannot be encoded for that filter + if (lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA2)) { + // Test with NULL options that should fail + lzma_options_lzma *options = lzma2_filter.options; + lzma2_filter.options = NULL; + verify_filter_flags_encode(&lzma2_filter, false); + + // Place options back in the filter, and test should pass + lzma2_filter.options = options; + verify_filter_flags_encode(&lzma2_filter, true); + } + + // NOTE: Many BCJ filters require that start_offset is a multiple + // of some power of two. The Filter Flags encoder and decoder don't + // completely validate the options and thus 257 passes the tests + // with all BCJ filters. It would be caught when initializing + // a filter chain encoder or decoder. + lzma_options_bcj bcj_options = { + .start_offset = 257 + }; + + for (size_t i = 0; bcj_filters_encoders[i].id != LZMA_VLI_UNKNOWN; + ++i) { + // NULL options should pass for bcj filters + verify_filter_flags_encode(&bcj_filters_encoders[i], true); + lzma_filter bcj_with_options = { + bcj_filters_encoders[i].id, &bcj_options }; + verify_filter_flags_encode(&bcj_with_options, true); + } + + if (lzma_filter_encoder_is_supported(LZMA_FILTER_DELTA)) { + lzma_options_delta delta_opts_below_min = { + .type = LZMA_DELTA_TYPE_BYTE, + .dist = LZMA_DELTA_DIST_MIN - 1 + }; + + lzma_options_delta delta_opts_above_max = { + .type = LZMA_DELTA_TYPE_BYTE, + .dist = LZMA_DELTA_DIST_MAX + 1 + }; + + verify_filter_flags_encode(&delta_filter, true); + + lzma_filter delta_filter_bad_options = { + LZMA_FILTER_DELTA, &delta_opts_below_min }; + + // Next test error case using minimum - 1 delta distance + verify_filter_flags_encode(&delta_filter_bad_options, false); + + // Next test error case using maximum + 1 delta distance + delta_filter_bad_options.options = &delta_opts_above_max; + verify_filter_flags_encode(&delta_filter_bad_options, false); + + // Next test NULL case + delta_filter_bad_options.options = NULL; + verify_filter_flags_encode(&delta_filter_bad_options, false); + } + + // Test expected failing cases + lzma_filter bad_filter = { LZMA_FILTER_RESERVED_START, NULL }; + size_t out_pos = 0; + size_t out_size = LZMA_BLOCK_HEADER_SIZE_MAX; + uint8_t out[LZMA_BLOCK_HEADER_SIZE_MAX]; + + // Filter ID outside of valid range + assert_lzma_ret(lzma_filter_flags_encode(&bad_filter, out, &out_pos, + out_size), LZMA_PROG_ERROR); + out_pos = 0; + bad_filter.id = LZMA_VLI_MAX + 1; + assert_lzma_ret(lzma_filter_flags_encode(&bad_filter, out, &out_pos, + out_size), LZMA_PROG_ERROR); + out_pos = 0; + + // Invalid Filter ID + bad_filter.id = 2; + assert_lzma_ret(lzma_filter_flags_encode(&bad_filter, out, &out_pos, + out_size), LZMA_OPTIONS_ERROR); + out_pos = 0; + + // Out size too small + if (lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA2)) { + uint32_t bad_size = 0; + + // First test with 0 output size + assert_lzma_ret(lzma_filter_flags_encode( + &lzma2_filter, out, &out_pos, 0), + LZMA_PROG_ERROR); + + // Next calculate the size needed to encode and + // use less than that + assert_lzma_ret(lzma_filter_flags_size(&bad_size, + &lzma2_filter), LZMA_OK); + + assert_lzma_ret(lzma_filter_flags_encode( + &lzma2_filter, out, &out_pos, + bad_size - 1), LZMA_PROG_ERROR); + out_pos = 0; + } + + // Invalid options + if (lzma_filter_encoder_is_supported(LZMA_FILTER_DELTA)) { + bad_filter.id = LZMA_FILTER_DELTA; + + // First test with NULL options + assert_lzma_ret(lzma_filter_flags_encode(&bad_filter, out, + &out_pos, out_size), LZMA_PROG_ERROR); + out_pos = 0; + + // Next test with invalid options + lzma_options_delta bad_options = { + .dist = LZMA_DELTA_DIST_MAX + 1, + .type = LZMA_DELTA_TYPE_BYTE + }; + bad_filter.options = &bad_options; + + assert_lzma_ret(lzma_filter_flags_encode(&bad_filter, out, + &out_pos, out_size), LZMA_PROG_ERROR); + } +#endif +} + + +// Helper function for test_lzma_filter_flags_decode. +// Encodes the filter_in without using lzma_filter_flags_encode. +// Leaves the specific assertions of filter_out options to the caller +// because it is agnostic to the type of options used in the call +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +static void +verify_filter_flags_decode(const lzma_filter *filter_in, + lzma_filter *filter_out) +{ + uint32_t total_size = 0; + + assert_lzma_ret(lzma_filter_flags_size(&total_size, filter_in), + LZMA_OK); + assert_uint(total_size, >, 0); + uint8_t *filter_flag_buffer = tuktest_malloc(total_size); + + uint32_t properties_size = 0; + size_t out_pos = 0; + size_t in_pos = 0; + assert_lzma_ret(lzma_properties_size(&properties_size, filter_in), + LZMA_OK); + assert_lzma_ret(lzma_vli_encode(filter_in->id, NULL, + filter_flag_buffer, &out_pos, total_size), LZMA_OK); + assert_lzma_ret(lzma_vli_encode(properties_size, NULL, + filter_flag_buffer, &out_pos, total_size), + LZMA_OK); + assert_lzma_ret(lzma_properties_encode(filter_in, + filter_flag_buffer + out_pos), LZMA_OK); + assert_lzma_ret(lzma_filter_flags_decode(filter_out, NULL, + filter_flag_buffer, &in_pos, total_size), + LZMA_OK); + assert_uint_eq(filter_in->id, filter_out->id); +} +#endif + + +static void +test_lzma_filter_flags_decode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + // For each filter, only run the decoder test if both the encoder + // and decoder are enabled. This is because verify_filter_flags_decode + // uses lzma_filter_flags_size which requires the encoder. + if (lzma_filter_decoder_is_supported(LZMA_FILTER_LZMA2) && + lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA2)) { + lzma_filter lzma2_decoded = { LZMA_FILTER_LZMA2, NULL }; + + verify_filter_flags_decode(&lzma2_filter, &lzma2_decoded); + + lzma_options_lzma *expected = lzma2_filter.options; + lzma_options_lzma *decoded = lzma2_decoded.options; + + // Only the dictionary size is encoded and decoded + // so only compare those + assert_uint_eq(decoded->dict_size, expected->dict_size); + + // The decoded options must be freed by the caller + free(decoded); + } + + for (size_t i = 0; bcj_filters_decoders[i].id != LZMA_VLI_UNKNOWN; + ++i) { + if (lzma_filter_encoder_is_supported( + bcj_filters_decoders[i].id)) { + lzma_filter bcj_decoded = { + bcj_filters_decoders[i].id, NULL }; + + lzma_filter bcj_encoded = { + bcj_filters_decoders[i].id, NULL }; + + // First test without options + verify_filter_flags_decode(&bcj_encoded, + &bcj_decoded); + assert_true(bcj_decoded.options == NULL); + + // Next test with start_offset. + // + // NOTE: The encoder and decoder don't verify if + // the start_offset is valid for the filter. Only + // the encoder or decoder initialization does. + lzma_options_bcj options = { + .start_offset = 257 + }; + + bcj_encoded.options = &options; + verify_filter_flags_decode(&bcj_encoded, + &bcj_decoded); + lzma_options_bcj *decoded_opts = bcj_decoded.options; + assert_uint_eq(decoded_opts->start_offset, + options.start_offset); + free(decoded_opts); + } + } + + if (lzma_filter_decoder_is_supported(LZMA_FILTER_DELTA) && + lzma_filter_encoder_is_supported(LZMA_FILTER_DELTA)) { + lzma_filter delta_decoded = { LZMA_FILTER_DELTA, NULL }; + + verify_filter_flags_decode(&delta_filter, &delta_decoded); + lzma_options_delta *expected = delta_filter.options; + lzma_options_delta *decoded = delta_decoded.options; + assert_uint_eq(expected->dist, decoded->dist); + assert_uint_eq(expected->type, decoded->type); + + free(decoded); + } + + // Test expected failing cases + uint8_t bad_encoded_filter[LZMA_BLOCK_HEADER_SIZE_MAX]; + lzma_filter bad_filter; + + // Filter ID outside of valid range + lzma_vli bad_filter_id = LZMA_FILTER_RESERVED_START; + size_t bad_encoded_out_pos = 0; + size_t in_pos = 0; + + assert_lzma_ret(lzma_vli_encode(bad_filter_id, NULL, + bad_encoded_filter, &bad_encoded_out_pos, + LZMA_BLOCK_HEADER_SIZE_MAX), LZMA_OK); + + assert_lzma_ret(lzma_filter_flags_decode(&bad_filter, NULL, + bad_encoded_filter, &in_pos, + LZMA_BLOCK_HEADER_SIZE_MAX), LZMA_DATA_ERROR); + + bad_encoded_out_pos = 0; + in_pos = 0; + + // Invalid Filter ID + bad_filter_id = 2; + bad_encoded_out_pos = 0; + in_pos = 0; + + assert_lzma_ret(lzma_vli_encode(bad_filter_id, NULL, + bad_encoded_filter, &bad_encoded_out_pos, + LZMA_BLOCK_HEADER_SIZE_MAX), LZMA_OK); + + // Next encode Size of Properties with the value of 0 + assert_lzma_ret(lzma_vli_encode(0, NULL, + bad_encoded_filter, &bad_encoded_out_pos, + LZMA_BLOCK_HEADER_SIZE_MAX), LZMA_OK); + + // Decode should fail on bad Filter ID + assert_lzma_ret(lzma_filter_flags_decode(&bad_filter, NULL, + bad_encoded_filter, &in_pos, + LZMA_BLOCK_HEADER_SIZE_MAX), LZMA_OPTIONS_ERROR); + bad_encoded_out_pos = 0; + in_pos = 0; + + // Outsize too small + // Encode the LZMA2 filter normally, but then set + // the out size when decoding as too small + if (lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA2) && + lzma_filter_decoder_is_supported(LZMA_FILTER_LZMA2)) { + uint32_t filter_flag_size = 0; + assert_lzma_ret(lzma_filter_flags_size(&filter_flag_size, + &lzma2_filter), LZMA_OK); + + assert_lzma_ret(lzma_filter_flags_encode(&lzma2_filter, + bad_encoded_filter, &bad_encoded_out_pos, + LZMA_BLOCK_HEADER_SIZE_MAX), LZMA_OK); + + assert_lzma_ret(lzma_filter_flags_decode(&bad_filter, NULL, + bad_encoded_filter, &in_pos, + filter_flag_size - 1), LZMA_DATA_ERROR); + } +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + +#ifdef HAVE_ENCODERS + // Only init filter options if encoder is supported because decoder + // tests requires encoder support, so the decoder tests will only + // run if for a given filter both the encoder and decoder are enabled. + if (lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA1)) { + lzma_options_lzma *options = tuktest_malloc( + sizeof(lzma_options_lzma)); + lzma_lzma_preset(options, LZMA_PRESET_DEFAULT); + lzma1_filter.options = options; + } + + if (lzma_filter_encoder_is_supported(LZMA_FILTER_LZMA2)) { + lzma_options_lzma *options = tuktest_malloc( + sizeof(lzma_options_lzma)); + lzma_lzma_preset(options, LZMA_PRESET_DEFAULT); + lzma2_filter.options = options; + } + + if (lzma_filter_encoder_is_supported(LZMA_FILTER_DELTA)) { + lzma_options_delta *options = tuktest_malloc( + sizeof(lzma_options_delta)); + options->dist = LZMA_DELTA_DIST_MIN; + options->type = LZMA_DELTA_TYPE_BYTE; + delta_filter.options = options; + } +#endif + + tuktest_run(test_lzma_filter_flags_size); + tuktest_run(test_lzma_filter_flags_encode); + tuktest_run(test_lzma_filter_flags_decode); + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_filter_str.c b/cpp/third_party/xz-5.8.3/tests/test_filter_str.c new file mode 100644 index 0000000000..0deb589991 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_filter_str.c @@ -0,0 +1,685 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_filter_str.c +/// \brief Tests Filter string functions +// +// Author: Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + + +static void +test_lzma_str_to_filters(void) +{ + lzma_filter filters[LZMA_FILTERS_MAX + 1]; + int error_pos; + + // Test with NULL string. + error_pos = -1; + assert_true(lzma_str_to_filters(NULL, &error_pos, filters, 0, + NULL) != NULL); + assert_int_eq(error_pos, 0); + + // Test with NULL filter array. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2", &error_pos, NULL, 0, + NULL) != NULL); + assert_int_eq(error_pos, 0); + + // Test with unsupported flags. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2", &error_pos, filters, + UINT32_MAX, NULL) != NULL); + assert_int_eq(error_pos, 0); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2", &error_pos, filters, + LZMA_STR_NO_SPACES << 1, NULL) != NULL); + assert_int_eq(error_pos, 0); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2", &error_pos, filters, + LZMA_STR_NO_SPACES, NULL) != NULL); + assert_int_eq(error_pos, 0); + + // Test with empty string. + error_pos = -1; + assert_true(lzma_str_to_filters("", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 0); + + // Test with invalid filter name and missing filter name. + error_pos = -1; + assert_true(lzma_str_to_filters("abcd", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 0); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2 abcd", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 6); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2--abcd", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 7); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2--", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 7); + + // Test LZMA_STR_ALL_FILTERS flag (should work with LZMA1 if built). +#if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1) + // Using LZMA1 as a Filter should fail without LZMA_STR_ALL_FILTERS. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma1", &error_pos, filters, + 0, NULL) != NULL); + assert_int_eq(error_pos, 0); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma1", &error_pos, filters, + LZMA_STR_ALL_FILTERS, NULL) == NULL); + assert_int_eq(error_pos, 5); + + // Verify Filters array IDs are correct. The array should contain + // only two elements: + // 1. LZMA1 Filter + // 2. LZMA_VLI_UNKNOWN filter array terminator + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA1); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); +#endif + + // Test LZMA_STR_NO_VALIDATION flag. This should allow having the + // same Filter multiple times in the chain and having a non-last + // Filter like lzma2 appear before another Filter. + // Without the flag, "lzma2 lzma2" must fail. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2 lzma2", &error_pos, filters, + 0, NULL) != NULL); + assert_int_eq(error_pos, 11); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2 lzma2", &error_pos, filters, + LZMA_STR_NO_VALIDATION, NULL) == NULL); + assert_int_eq(error_pos, 11); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[2].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + // Should fail with invalid Filter options (lc + lp must be <= 4). + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:lc=3,lp=3", &error_pos, filters, + LZMA_STR_NO_VALIDATION, NULL) != NULL); + assert_int_eq(error_pos, 15); + + // Test invalid option name. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:foo=1,bar=2", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 6); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:pb=1,bar=2", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 11); + + // Test missing option value. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:lc=", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 9); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:=,pb=1", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 6); + + // Test unsupported preset value. + error_pos = -1; + assert_true(lzma_str_to_filters("-10", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 2); + + error_pos = -1; + assert_true(lzma_str_to_filters("-5f", &error_pos, + filters, 0, NULL) != NULL); + assert_int_eq(error_pos, 2); + + // Test filter chain too long. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2 lzma2 lzma2 lzma2 lzma2", + &error_pos, filters, LZMA_STR_NO_VALIDATION, + NULL) != NULL); + assert_int_eq(error_pos, 24); // The fifth is too many. + +#if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1) + // Should fail with a Filter not supported in the .xz format (lzma1). + error_pos = -1; + assert_true(lzma_str_to_filters("lzma1", &error_pos, filters, + LZMA_STR_NO_VALIDATION, NULL) != NULL); + assert_int_eq(error_pos, 0); +#endif + + // Test setting options with the "=" format. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2=dict=4096,lc=2,lp=2,pb=1," + "mode=fast,nice=3,mf=hc3,depth=10", &error_pos, + filters, 0, NULL) == NULL); + assert_int_eq(error_pos, 63); + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_options_lzma *opts = filters[0].options; + assert_uint_eq(opts->dict_size, 4096); + assert_uint_eq(opts->lc, 2); + assert_uint_eq(opts->lp, 2); + assert_uint_eq(opts->pb, 1); + assert_uint_eq(opts->mode, LZMA_MODE_FAST); + assert_uint_eq(opts->nice_len, 3); + assert_uint_eq(opts->mf, LZMA_MF_HC3); + assert_uint_eq(opts->depth, 10); + + lzma_filters_free(filters, NULL); + +#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86) + // Test BCJ Filter options. + error_pos = -1; + assert_true(lzma_str_to_filters("x86:start=16", &error_pos, filters, + LZMA_STR_NO_VALIDATION, NULL) == NULL); + assert_int_eq(error_pos, 12); + + assert_uint_eq(filters[0].id, LZMA_FILTER_X86); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_options_bcj *bcj_opts = filters[0].options; + assert_uint_eq(bcj_opts->start_offset, 16); + + lzma_filters_free(filters, NULL); +#endif + +#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA) + // Test Delta Filter options. + error_pos = -1; + assert_true(lzma_str_to_filters("delta:dist=20", &error_pos, filters, + LZMA_STR_NO_VALIDATION, NULL) == NULL); + assert_int_eq(error_pos, 13); + + assert_uint_eq(filters[0].id, LZMA_FILTER_DELTA); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_options_delta *delta_opts = filters[0].options; + assert_uint_eq(delta_opts->dist, 20); + + lzma_filters_free(filters, NULL); +#endif + + // Test skipping leading spaces. + error_pos = -1; + assert_true(lzma_str_to_filters(" lzma2", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 9); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + // Test skipping trailing spaces. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2 ", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 9); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + // Test with "--" instead of space separating. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2--lzma2", &error_pos, filters, + LZMA_STR_NO_VALIDATION, NULL) == NULL); + assert_int_eq(error_pos, 12); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[2].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + // Test preset with and without leading "-", and with "e". + error_pos = -1; + assert_true(lzma_str_to_filters("-3", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 2); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + error_pos = -1; + assert_true(lzma_str_to_filters("4", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 1); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + error_pos = -1; + assert_true(lzma_str_to_filters("9e", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 2); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + // Test using a preset as an lzma2 option. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:preset=9e", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 15); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + lzma_filters_free(filters, NULL); + + // Test setting dictionary size with invalid modifier suffix. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:dict=4096ZiB", &error_pos, filters, + 0, NULL) != NULL); + assert_int_eq(error_pos, 15); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:dict=4096KiBs", &error_pos, filters, + 0, NULL) != NULL); + assert_int_eq(error_pos, 15); + + // Test option that cannot have multiplier modifier. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:pb=1k", &error_pos, filters, + 0, NULL) != NULL); + assert_int_eq(error_pos, 10); + + // Test option value too large. + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:dict=4096GiB", &error_pos, filters, + 0, NULL) != NULL); + assert_int_eq(error_pos, 11); + + // Test valid uses of multiplier modifiers (k,m,g). + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:dict=4096KiB", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 18); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + opts = filters[0].options; + assert_uint_eq(opts->dict_size, 4096 << 10); + + lzma_filters_free(filters, NULL); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:dict=40Mi", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 15); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + opts = filters[0].options; + assert_uint_eq(opts->dict_size, 40 << 20); + + lzma_filters_free(filters, NULL); + + error_pos = -1; + assert_true(lzma_str_to_filters("lzma2:dict=1g", &error_pos, filters, + 0, NULL) == NULL); + assert_int_eq(error_pos, 13); + + assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2); + assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN); + + opts = filters[0].options; + assert_uint_eq(opts->dict_size, 1 << 30); + + lzma_filters_free(filters, NULL); +} + + +static void +test_lzma_str_from_filters(void) +{ + lzma_filter filters[LZMA_FILTERS_MAX]; + filters[0].id = LZMA_VLI_UNKNOWN; + + char *output_str = NULL; + + // Test basic NULL inputs. + assert_lzma_ret(lzma_str_from_filters(NULL, filters, 0, NULL), + LZMA_PROG_ERROR); + + assert_lzma_ret(lzma_str_from_filters(&output_str, NULL, 0, NULL), + LZMA_PROG_ERROR); + + // Test with empty filters array. + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL), + LZMA_OPTIONS_ERROR); + + // Create a simple filter array only containing an LZMA2 Filter. + assert_true(lzma_str_to_filters("lzma2", NULL, filters, 0, NULL) + == NULL); + + // Test with bad flags. + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_ALL_FILTERS, NULL), LZMA_OPTIONS_ERROR); + + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_NO_VALIDATION, NULL), LZMA_OPTIONS_ERROR); + + // Test with no flags. + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL), + LZMA_OK); + + assert_str_eq(output_str, "lzma2"); + free(output_str); + + // Test LZMA_STR_ENCODER flag. + // Only the return value is checked since the actual string + // may change in the future (even though it is unlikely). + // The order of options or the inclusion of new options could + // cause a change in output, so we will avoid hardcoding an + // expected result. + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_ENCODER, NULL), LZMA_OK); + free(output_str); + + // Test LZMA_STR_DECODER flag. + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_DECODER, NULL), LZMA_OK); + free(output_str); + + // Test LZMA_STR_GETOPT_LONG flag. + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_GETOPT_LONG, NULL), LZMA_OK); + free(output_str); + + // Test LZMA_STR_NO_SPACES flag. + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_NO_SPACES, NULL), LZMA_OK); + + // Check to be sure there are no spaces. + assert_true(strchr(output_str, ' ') == NULL); + + free(output_str); + + lzma_filters_free(filters, NULL); + +#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86) + assert_true(lzma_str_to_filters("x86 lzma2", NULL, filters, 0, NULL) + == NULL); + + // It always allocates the options structure even when it's not + // needed due to start_offset = 0 being the default. + assert_true(filters[0].options != NULL); + + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL), + LZMA_OK); + + assert_str_eq(output_str, "x86 lzma2"); + + free(output_str); + + // Test setting BCJ option to NULL. + free(filters[0].options); + filters[0].options = NULL; + + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL), + LZMA_OK); + + assert_str_eq(output_str, "x86 lzma2"); + + lzma_filters_free(filters, NULL); + free(output_str); +#endif + + lzma_options_lzma opts; + assert_false(lzma_lzma_preset(&opts, LZMA_PRESET_DEFAULT)); + + // Test with too many Filters (array terminated after 4+ filters). + lzma_filter oversized_filters[LZMA_FILTERS_MAX + 2]; + + for (uint32_t i = 0; i < ARRAY_SIZE(oversized_filters) - 1; i++) { + oversized_filters[i].id = LZMA_FILTER_LZMA2; + oversized_filters[i].options = &opts; + } + + oversized_filters[LZMA_FILTERS_MAX + 1].id = LZMA_VLI_UNKNOWN; + oversized_filters[LZMA_FILTERS_MAX + 1].options = NULL; + + assert_lzma_ret(lzma_str_from_filters(&output_str, oversized_filters, + 0, NULL), LZMA_OPTIONS_ERROR); + + // Test with NULL filter options (when they cannot be NULL). + filters[0].id = LZMA_FILTER_LZMA2; + filters[0].options = NULL; + filters[1].id = LZMA_VLI_UNKNOWN; + + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_ENCODER, NULL), LZMA_OPTIONS_ERROR); + + // Test with bad Filter ID. + filters[0].id = LZMA_VLI_UNKNOWN - 1; + assert_lzma_ret(lzma_str_from_filters(&output_str, filters, + LZMA_STR_ENCODER, NULL), LZMA_OPTIONS_ERROR); +} + + +static const char supported_encoders[][9] = { + "lzma2", +#ifdef HAVE_ENCODER_X86 + "x86", +#endif +#ifdef HAVE_ENCODER_POWERPC + "powerpc", +#endif +#ifdef HAVE_ENCODER_IA64 + "ia64", +#endif +#ifdef HAVE_ENCODER_ARM + "arm", +#endif +#ifdef HAVE_ENCODER_ARMTHUMB + "armthumb", +#endif +#ifdef HAVE_ENCODER_SPARC + "sparc", +#endif +#ifdef HAVE_ENCODER_ARM64 + "arm64", +#endif +#ifdef HAVE_ENCODER_RISCV + "riscv", +#endif +#ifdef HAVE_ENCODER_DELTA + "delta", +#endif +}; + +static const char supported_decoders[][9] = { + "lzma2", +#ifdef HAVE_DECODER_X86 + "x86", +#endif +#ifdef HAVE_DECODER_POWERPC + "powerpc", +#endif +#ifdef HAVE_DECODER_IA64 + "ia64", +#endif +#ifdef HAVE_DECODER_ARM + "arm", +#endif +#ifdef HAVE_DECODER_ARMTHUMB + "armthumb", +#endif +#ifdef HAVE_DECODER_SPARC + "sparc", +#endif +#ifdef HAVE_DECODER_ARM64 + "arm64", +#endif +#ifdef HAVE_DECODER_RISCV + "riscv", +#endif +#ifdef HAVE_DECODER_DELTA + "delta", +#endif +}; + +static const char supported_filters[][9] = { + "lzma2", +#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86) + "x86", +#endif +#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC) + "powerpc", +#endif +#if defined(HAVE_ENCODER_IA64) || defined(HAVE_DECODER_IA64) + "ia64", +#endif +#if defined(HAVE_ENCODER_ARM) || defined(HAVE_DECODER_ARM) + "arm", +#endif +#if defined(HAVE_ENCODER_ARMTHUMB) || defined(HAVE_DECODER_ARMTHUMB) + "armthumb", +#endif +#if defined(HAVE_ENCODER_SPARC) || defined(HAVE_DECODER_SPARC) + "sparc", +#endif +#if defined(HAVE_ENCODER_ARM64) || defined(HAVE_DECODER_ARM64) + "arm64", +#endif +#if defined(HAVE_ENCODER_RISCV) || defined(HAVE_DECODER_RISCV) + "riscv", +#endif +#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA) + "delta", +#endif +}; + + +static void +test_lzma_str_list_filters(void) +{ + // Test with basic NULL inputs. + assert_lzma_ret(lzma_str_list_filters(NULL, LZMA_VLI_UNKNOWN, 0, + NULL), LZMA_PROG_ERROR); + + char *str = NULL; + + // Test with bad flags. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, + LZMA_STR_NO_VALIDATION , NULL), LZMA_OPTIONS_ERROR); + assert_true(str == NULL); + + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, + LZMA_STR_NO_SPACES, NULL), LZMA_OPTIONS_ERROR); + assert_true(str == NULL); + + // Test with bad Filter ID. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN - 1, + 0, NULL), LZMA_OPTIONS_ERROR); + assert_true(str == NULL); + + // Test LZMA_STR_ENCODER flag. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, + LZMA_STR_ENCODER, NULL), LZMA_OK); + + // NOTE: Just checking for "contains" is a bit weak check as + // "arm" matches "armthumb" and "arm64" too. + for (uint32_t i = 0; i < ARRAY_SIZE(supported_encoders); i++) + assert_str_contains(str, supported_encoders[i]); + + free(str); + + // Test LZMA_STR_DECODER flag. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, + LZMA_STR_DECODER, NULL), LZMA_OK); + + for (uint32_t i = 0; i < ARRAY_SIZE(supported_decoders); i++) + assert_str_contains(str, supported_decoders[i]); + + free(str); + + // Test LZMA_STR_GETOPT_LONG flag. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, + LZMA_STR_GETOPT_LONG, NULL), LZMA_OK); + assert_str_contains(str, "--"); + + free(str); + + // Test LZMA_STR_ALL_FILTERS flag. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, + LZMA_STR_ALL_FILTERS, NULL), LZMA_OK); +#if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1) + // With the flag, the string should contain the LZMA1 Filter. + assert_str_contains(str, "lzma1"); + + free(str); + + // If a non .xz filter is specified, it should still list the Filter. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_FILTER_LZMA1, + 0, NULL), LZMA_OK); + assert_str_eq(str, "lzma1"); +#endif + free(str); + + // Test with no flags. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, + 0, NULL), LZMA_OK); + + for (uint32_t i = 0; i < ARRAY_SIZE(supported_filters); i++) + assert_str_contains(str, supported_filters[i]); + + assert_str_doesnt_contain(str, "lzma1"); + + free(str); + + // Test providing a Filter ID. + assert_lzma_ret(lzma_str_list_filters(&str, LZMA_FILTER_LZMA2, + LZMA_STR_ALL_FILTERS, NULL), LZMA_OK); + assert_str_eq(str, "lzma2"); + + free(str); +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + + tuktest_run(test_lzma_str_to_filters); + tuktest_run(test_lzma_str_from_filters); + tuktest_run(test_lzma_str_list_filters); + + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_hardware.c b/cpp/third_party/xz-5.8.3/tests/test_hardware.c new file mode 100644 index 0000000000..45763f6864 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_hardware.c @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_hardware.c +/// \brief Tests src/liblzma/api/lzma/hardware.h API functions +/// +/// Since the output values of these functions are hardware dependent, these +/// tests are trivial. They are simply used to detect errors and machines +/// that these function are not supported on. +// +// Author: Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" +#include "mythread.h" + + +static void +test_lzma_physmem(void) +{ + // NOTE: Use _skip instead of _fail because 0 can also mean that we + // don't know how to get this information on this operating system. + if (lzma_physmem() == 0) + assert_skip("Could not determine amount of physical memory"); +} + + +static void +test_lzma_cputhreads(void) +{ +#ifndef MYTHREAD_ENABLED + assert_skip("Threading support disabled"); +#else + if (lzma_cputhreads() == 0) + assert_skip("Could not determine cpu core count"); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + tuktest_run(test_lzma_physmem); + tuktest_run(test_lzma_cputhreads); + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_index.c b/cpp/third_party/xz-5.8.3/tests/test_index.c new file mode 100644 index 0000000000..50e554ffd5 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_index.c @@ -0,0 +1,1826 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_index.c +/// \brief Tests functions handling the lzma_index structure +/// +/// \todo Implement tests for lzma_file_info_decoder +// +// Authors: Jia Tan +// Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + +// liblzma internal header file needed for: +// UNPADDED_SIZE_MIN +// UNPADDED_SIZE_MAX +// vli_ceil4 +#include "common/index.h" + + +#define MEMLIMIT (UINT64_C(1) << 20) + +#ifdef HAVE_ENCODERS +static uint8_t *decode_buffer; +static size_t decode_buffer_size = 0; +#endif + +static lzma_index *decode_test_index; + + +static void +test_lzma_index_memusage(void) +{ + // The return value from lzma_index_memusage is an approximation + // of the amount of memory needed for lzma_index for a given + // amount of Streams and Blocks. It will be an upperbound, + // so this test will mostly sanity check and error check the + // function. + + // The maximum number of Streams should be UINT32_MAX in the + // current implementation even though the parameter is lzma_vli. + assert_uint_eq(lzma_index_memusage((lzma_vli)UINT32_MAX + 1, 1), + UINT64_MAX); + + // While the number of blocks is lzma_vli, the real maximum value is + // much smaller than LZMA_VLI_MAX. Just check that it fails with a + // huge but valid VLI and that it succeeds with a smaller one. + assert_uint_eq(lzma_index_memusage(1, LZMA_VLI_MAX / 5), UINT64_MAX); + assert_uint(lzma_index_memusage(1, LZMA_VLI_MAX / 11), <, UINT64_MAX); + + // Number of Streams must be non-zero + assert_uint_eq(lzma_index_memusage(0, 1), UINT64_MAX); + + // Number of Blocks CAN be zero + assert_uint(lzma_index_memusage(1, 0), !=, UINT64_MAX); + + // Arbitrary values for Stream and Block should work without error + // and should always increase + uint64_t previous = 1; + lzma_vli streams = 1; + lzma_vli blocks = 1; + + // Test 100 different increasing values for Streams and Block + for (int i = 0; i < 100; i++) { + uint64_t current = lzma_index_memusage(streams, blocks); + assert_uint(current, >, previous); + previous = current; + streams += 29; + blocks += 107; + } + + // Force integer overflow in calculation (should result in an error) + assert_uint_eq(lzma_index_memusage(UINT32_MAX, LZMA_VLI_MAX), + UINT64_MAX); +} + + +static void +test_lzma_index_memused(void) +{ + // Very similar to test_lzma_index_memusage above since + // lzma_index_memused is essentially a wrapper for + // lzma_index_memusage + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Test with empty Index + assert_uint(lzma_index_memused(idx), <, UINT64_MAX); + + // Append small Blocks and then test again (should pass). + for (lzma_vli i = 0; i < 10; i++) + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + assert_uint(lzma_index_memused(idx), <, UINT64_MAX); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_append(void) +{ + // Basic input-output test done here. + // Less trivial tests for this function are done throughout + // other tests. + + // First test with NULL lzma_index + assert_lzma_ret(lzma_index_append(NULL, NULL, UNPADDED_SIZE_MIN, + 1), LZMA_PROG_ERROR); + + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Test with invalid Unpadded Size + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN - 1, 1), LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MAX + 1, 1), LZMA_PROG_ERROR); + + // Test with invalid Uncompressed Size + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MAX, LZMA_VLI_MAX + 1), + LZMA_PROG_ERROR); + + // Test expected successful Block appends + assert_lzma_ret(lzma_index_append(idx, NULL, UNPADDED_SIZE_MIN, + 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 2, + 2), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 3, + 3), LZMA_OK); + + lzma_index_end(idx, NULL); + + // Test compressed .xz file size growing too large. This also tests + // a failing assert fixed in ae5c07b22a6b3766b84f409f1b6b5c100469068a. + // Should result in LZMA_DATA_ERROR. + idx = lzma_index_init(NULL); + + // The calculation for maximum unpadded size is to make room for the + // second stream when lzma_index_cat() is called. The + // 4 * LZMA_STREAM_HEADER_SIZE is for the header and footer of + // both streams. The extra 24 bytes are for the size of the indexes + // for both streams. This allows us to maximize the unpadded sum + // during the lzma_index_append() call after the indexes have been + // concatenated. + assert_lzma_ret(lzma_index_append(idx, NULL, UNPADDED_SIZE_MAX + - ((4 * LZMA_STREAM_HEADER_SIZE) + 24), 1), LZMA_OK); + + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + assert_lzma_ret(lzma_index_cat(second, idx, NULL), LZMA_OK); + + assert_lzma_ret(lzma_index_append(second, NULL, UNPADDED_SIZE_MAX, 1), + LZMA_DATA_ERROR); + + lzma_index_end(second, NULL); + + // Test uncompressed size growing too large. + // Should result in LZMA_DATA_ERROR. + idx = lzma_index_init(NULL); + + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, LZMA_VLI_MAX), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_DATA_ERROR); + + lzma_index_end(idx, NULL); + + // Currently not testing for error case when the size of the Index + // grows too large to be stored. This was not practical to test for + // since too many Blocks needed to be created to cause this. +} + + +static void +test_lzma_index_stream_flags(void) +{ + // Only trivial tests done here testing for basic functionality. + // More in-depth testing for this function will be done in + // test_lzma_index_checks. + + // Testing for NULL inputs + assert_lzma_ret(lzma_index_stream_flags(NULL, NULL), + LZMA_PROG_ERROR); + + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + assert_lzma_ret(lzma_index_stream_flags(idx, NULL), + LZMA_PROG_ERROR); + + lzma_stream_flags stream_flags = { + .version = 0, + .backward_size = LZMA_BACKWARD_SIZE_MIN, + .check = LZMA_CHECK_CRC32 + }; + + assert_lzma_ret(lzma_index_stream_flags(idx, &stream_flags), + LZMA_OK); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_checks(void) +{ + // Tests should still pass, even if some of the check types + // are disabled. + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + lzma_stream_flags stream_flags = { + .version = 0, + .backward_size = LZMA_BACKWARD_SIZE_MIN, + .check = LZMA_CHECK_NONE + }; + + // First set the check type to None + assert_lzma_ret(lzma_index_stream_flags(idx, &stream_flags), + LZMA_OK); + assert_uint_eq(lzma_index_checks(idx), + LZMA_INDEX_CHECK_MASK_NONE); + + // Set the check type to CRC32 and repeat + stream_flags.check = LZMA_CHECK_CRC32; + assert_lzma_ret(lzma_index_stream_flags(idx, &stream_flags), + LZMA_OK); + assert_uint_eq(lzma_index_checks(idx), + LZMA_INDEX_CHECK_MASK_CRC32); + + // Set the check type to CRC64 and repeat + stream_flags.check = LZMA_CHECK_CRC64; + assert_lzma_ret(lzma_index_stream_flags(idx, &stream_flags), + LZMA_OK); + assert_uint_eq(lzma_index_checks(idx), + LZMA_INDEX_CHECK_MASK_CRC64); + + // Set the check type to SHA256 and repeat + stream_flags.check = LZMA_CHECK_SHA256; + assert_lzma_ret(lzma_index_stream_flags(idx, &stream_flags), + LZMA_OK); + assert_uint_eq(lzma_index_checks(idx), + LZMA_INDEX_CHECK_MASK_SHA256); + + // Create second lzma_index and cat to first + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + // Set the check type to CRC32 for the second lzma_index + stream_flags.check = LZMA_CHECK_CRC32; + assert_lzma_ret(lzma_index_stream_flags(second, &stream_flags), + LZMA_OK); + + assert_uint_eq(lzma_index_checks(second), + LZMA_INDEX_CHECK_MASK_CRC32); + + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + + // Index should now have both CRC32 and SHA256 + assert_uint_eq(lzma_index_checks(idx), + LZMA_INDEX_CHECK_MASK_CRC32 | + LZMA_INDEX_CHECK_MASK_SHA256); + + // Change the check type of the second Stream to SHA256 + stream_flags.check = LZMA_CHECK_SHA256; + assert_lzma_ret(lzma_index_stream_flags(idx, &stream_flags), + LZMA_OK); + + // Index should now have only SHA256 + assert_uint_eq(lzma_index_checks(idx), + LZMA_INDEX_CHECK_MASK_SHA256); + + // Test with a third Stream + lzma_index *third = lzma_index_init(NULL); + assert_true(third != NULL); + + stream_flags.check = LZMA_CHECK_CRC64; + assert_lzma_ret(lzma_index_stream_flags(third, &stream_flags), + LZMA_OK); + + assert_uint_eq(lzma_index_checks(third), + LZMA_INDEX_CHECK_MASK_CRC64); + + assert_lzma_ret(lzma_index_cat(idx, third, NULL), LZMA_OK); + + // Index should now have CRC64 and SHA256 + assert_uint_eq(lzma_index_checks(idx), + LZMA_INDEX_CHECK_MASK_CRC64 | + LZMA_INDEX_CHECK_MASK_SHA256); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_stream_padding(void) +{ + // Test NULL lzma_index + assert_lzma_ret(lzma_index_stream_padding(NULL, 0), + LZMA_PROG_ERROR); + + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Test Stream Padding not a multiple of 4 + assert_lzma_ret(lzma_index_stream_padding(idx, 3), + LZMA_PROG_ERROR); + + // Test Stream Padding too large + assert_lzma_ret(lzma_index_stream_padding(idx, LZMA_VLI_MAX - 3), + LZMA_DATA_ERROR); + + // Test Stream Padding valid + assert_lzma_ret(lzma_index_stream_padding(idx, 0x1000), + LZMA_OK); + assert_lzma_ret(lzma_index_stream_padding(idx, 4), + LZMA_OK); + assert_lzma_ret(lzma_index_stream_padding(idx, 0), + LZMA_OK); + + // Test Stream Padding causing the file size to grow too large + assert_lzma_ret(lzma_index_append(idx, NULL, + LZMA_VLI_MAX - 0x1000, 1), LZMA_OK); + assert_lzma_ret(lzma_index_stream_padding(idx, 0x1000), + LZMA_DATA_ERROR); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_stream_count(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + assert_uint_eq(lzma_index_stream_count(idx), 1); + + // Appending Blocks should not change the Stream count value + assert_lzma_ret(lzma_index_append(idx, NULL, UNPADDED_SIZE_MIN, + 1), LZMA_OK); + + assert_uint_eq(lzma_index_stream_count(idx), 1); + + // Test with multiple Streams + for (uint32_t i = 0; i < 100; i++) { + lzma_index *idx_cat = lzma_index_init(NULL); + assert_true(idx != NULL); + assert_lzma_ret(lzma_index_cat(idx, idx_cat, NULL), LZMA_OK); + assert_uint_eq(lzma_index_stream_count(idx), i + 2); + } + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_block_count(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + assert_uint_eq(lzma_index_block_count(idx), 0); + + const uint32_t iterations = 0x1000; + for (uint32_t i = 0; i < iterations; i++) { + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + assert_uint_eq(lzma_index_block_count(idx), i + 1); + } + + // Create new lzma_index with a few Blocks + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + assert_lzma_ret(lzma_index_append(second, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(second, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(second, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + assert_uint_eq(lzma_index_block_count(second), 3); + + // Concatenate the lzma_indexes together and the result should have + // the sum of the two individual counts. + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + assert_uint_eq(lzma_index_block_count(idx), iterations + 3); + + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + assert_uint_eq(lzma_index_block_count(idx), iterations + 4); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_size(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Base size should be: + // 1 byte Index Indicator + // 1 byte Number of Records + // 0 bytes Records + // 2 bytes Index Padding + // 4 bytes CRC32 + // Total: 8 bytes + assert_uint_eq(lzma_index_size(idx), 8); + + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + // New size should be: + // 1 byte Index Indicator + // 1 byte Number of Records + // 2 bytes Records + // 0 bytes Index Padding + // 4 bytes CRC32 + // Total: 8 bytes + assert_uint_eq(lzma_index_size(idx), 8); + + assert_lzma_ret(lzma_index_append(idx, NULL, + LZMA_VLI_MAX / 4, LZMA_VLI_MAX / 4), LZMA_OK); + + // New size should be: + // 1 byte Index Indicator + // 1 byte Number of Records + // 20 bytes Records + // 2 bytes Index Padding + // 4 bytes CRC32 + // Total: 28 bytes + assert_uint_eq(lzma_index_size(idx), 28); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_stream_size(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Stream size calculated by: + // Size of Stream Header (12 bytes) + // Size of all Blocks + // Size of the Index + // Size of the Stream Footer (12 bytes) + + // First test with empty Index + // Stream size should be: + // Size of Stream Header - 12 bytes + // Size of all Blocks - 0 bytes + // Size of Index - 8 bytes + // Size of Stream Footer - 12 bytes + // Total: 32 bytes + assert_uint_eq(lzma_index_stream_size(idx), 32); + + // Next, append a few Blocks and retest + assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, 999, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, 997, 1), LZMA_OK); + + // Stream size should be: + // Size of Stream Header - 12 bytes + // Size of all Blocks - 3000 bytes [*] + // Size of Index - 16 bytes + // Size of Stream Footer - 12 bytes + // Total: 3040 bytes + // + // [*] Block size is a multiple of 4 bytes so 999 and 997 get + // rounded up to 1000 bytes. + assert_uint_eq(lzma_index_stream_size(idx), 3040); + + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + assert_uint_eq(lzma_index_stream_size(second), 32); + assert_lzma_ret(lzma_index_append(second, NULL, 1000, 1), LZMA_OK); + + // Stream size should be: + // Size of Stream Header - 12 bytes + // Size of all Blocks - 1000 bytes + // Size of Index - 12 bytes + // Size of Stream Footer - 12 bytes + // Total: 1036 bytes + assert_uint_eq(lzma_index_stream_size(second), 1036); + + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + + // Stream size should be: + // Size of Stream Header - 12 bytes + // Size of all Blocks - 4000 bytes + // Size of Index - 20 bytes + // Size of Stream Footer - 12 bytes + // Total: 4044 bytes + assert_uint_eq(lzma_index_stream_size(idx), 4044); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_total_size(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // First test empty lzma_index. + // Result should be 0 since no Blocks have been added. + assert_uint_eq(lzma_index_total_size(idx), 0); + + // Add a few Blocks and retest after each append + assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(idx), 1000); + + assert_lzma_ret(lzma_index_append(idx, NULL, 999, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(idx), 2000); + + assert_lzma_ret(lzma_index_append(idx, NULL, 997, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(idx), 3000); + + // Create second lzma_index and append Blocks to it. + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + assert_uint_eq(lzma_index_total_size(second), 0); + + assert_lzma_ret(lzma_index_append(second, NULL, 100, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(second), 100); + + assert_lzma_ret(lzma_index_append(second, NULL, 100, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(second), 200); + + // Concatenate the Streams together + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + + // The resulting total size should be the size of all Blocks + // from both Streams + assert_uint_eq(lzma_index_total_size(idx), 3200); + + // Test sizes that aren't multiples of four bytes + assert_lzma_ret(lzma_index_append(idx, NULL, 11, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(idx), 3212); + + assert_lzma_ret(lzma_index_append(idx, NULL, 11, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(idx), 3224); + + assert_lzma_ret(lzma_index_append(idx, NULL, 9, 1), LZMA_OK); + assert_uint_eq(lzma_index_total_size(idx), 3236); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_file_size(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Should be the same as test_lzma_index_stream_size with + // only one Stream and no Stream Padding. + assert_uint_eq(lzma_index_file_size(idx), 32); + + assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, 999, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, 997, 1), LZMA_OK); + + assert_uint_eq(lzma_index_file_size(idx), 3040); + + // Next add Stream Padding + assert_lzma_ret(lzma_index_stream_padding(idx, 1000), + LZMA_OK); + + assert_uint_eq(lzma_index_file_size(idx), 4040); + + // Create second lzma_index. + // Very similar to test_lzma_index_stream_size, but + // the values should include the headers of the second Stream. + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + assert_lzma_ret(lzma_index_append(second, NULL, 1000, 1), LZMA_OK); + assert_uint_eq(lzma_index_stream_size(second), 1036); + + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + + // .xz file size should be: + // Size of 2 Stream Headers - 12 * 2 bytes + // Size of all Blocks - 3000 + 1000 bytes + // Size of 2 Indexes - 16 + 12 bytes + // Size of Stream Padding - 1000 bytes + // Size of 2 Stream Footers - 12 * 2 bytes + // Total: 5076 bytes + assert_uint_eq(lzma_index_file_size(idx), 5076); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_uncompressed_size(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Empty lzma_index should have 0 uncompressed .xz file size. + assert_uint_eq(lzma_index_uncompressed_size(idx), 0); + + // Append a few small Blocks + assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 10), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 100), LZMA_OK); + + assert_uint_eq(lzma_index_uncompressed_size(idx), 111); + + // Create another lzma_index + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + // Append a few small Blocks + assert_lzma_ret(lzma_index_append(second, NULL, 1000, 2), LZMA_OK); + assert_lzma_ret(lzma_index_append(second, NULL, 1000, 20), LZMA_OK); + assert_lzma_ret(lzma_index_append(second, NULL, 1000, 200), LZMA_OK); + + assert_uint_eq(lzma_index_uncompressed_size(second), 222); + + // Concatenate second lzma_index to first + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + + // New uncompressed .xz file size should be the sum of the two Streams + assert_uint_eq(lzma_index_uncompressed_size(idx), 333); + + // Append one more Block to the lzma_index and ensure that + // it is properly updated + assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 111), LZMA_OK); + assert_uint_eq(lzma_index_uncompressed_size(idx), 444); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_iter_init(void) +{ + // Testing basic init functionality. + // The init function should call rewind on the iterator. + lzma_index *first = lzma_index_init(NULL); + assert_true(first != NULL); + + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + lzma_index *third = lzma_index_init(NULL); + assert_true(third != NULL); + + assert_lzma_ret(lzma_index_cat(first, second, NULL), LZMA_OK); + assert_lzma_ret(lzma_index_cat(first, third, NULL), LZMA_OK); + + lzma_index_iter iter; + lzma_index_iter_init(&iter, first); + + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + assert_uint_eq(iter.stream.number, 1); + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + assert_uint_eq(iter.stream.number, 2); + + lzma_index_iter_init(&iter, first); + + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + assert_uint_eq(iter.stream.number, 3); + + lzma_index_end(first, NULL); +} + + +static void +test_lzma_index_iter_rewind(void) +{ + lzma_index *first = lzma_index_init(NULL); + assert_true(first != NULL); + + lzma_index_iter iter; + lzma_index_iter_init(&iter, first); + + // Append 3 Blocks and iterate over each. This is to test + // the LZMA_INDEX_ITER_BLOCK mode. + for (uint32_t i = 0; i < 3; i++) { + assert_lzma_ret(lzma_index_append(first, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_BLOCK)); + assert_uint_eq(iter.block.number_in_file, i + 1); + assert_uint_eq(iter.block.number_in_stream, i + 1); + } + + // Rewind back to the beginning and iterate over the Blocks again + lzma_index_iter_rewind(&iter); + + // Should be able to re-iterate over the Blocks again. + for (uint32_t i = 0; i < 3; i++) { + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_BLOCK)); + assert_uint_eq(iter.block.number_in_file, i + 1); + assert_uint_eq(iter.block.number_in_stream, i + 1); + } + + // Next concatenate two more lzma_indexes, iterate over them, + // rewind, and iterate over them again. This is to test + // the LZMA_INDEX_ITER_STREAM mode. + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + lzma_index *third = lzma_index_init(NULL); + assert_true(third != NULL); + + assert_lzma_ret(lzma_index_cat(first, second, NULL), LZMA_OK); + assert_lzma_ret(lzma_index_cat(first, third, NULL), LZMA_OK); + + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_STREAM)); + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_STREAM)); + + assert_uint_eq(iter.stream.number, 3); + + lzma_index_iter_rewind(&iter); + + for (uint32_t i = 0; i < 3; i++) { + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_STREAM)); + assert_uint_eq(iter.stream.number, i + 1); + } + + lzma_index_end(first, NULL); +} + + +static void +test_lzma_index_iter_next(void) +{ + lzma_index *first = lzma_index_init(NULL); + assert_true(first != NULL); + + lzma_index_iter iter; + lzma_index_iter_init(&iter, first); + + // First test bad mode values + for (uint32_t i = LZMA_INDEX_ITER_NONEMPTY_BLOCK + 1; i < 100; i++) + assert_true(lzma_index_iter_next(&iter, i)); + + // Test iterating over Blocks + assert_lzma_ret(lzma_index_append(first, NULL, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(first, NULL, + UNPADDED_SIZE_MIN * 2, 10), LZMA_OK); + assert_lzma_ret(lzma_index_append(first, NULL, + UNPADDED_SIZE_MIN * 3, 100), LZMA_OK); + + // For Blocks, need to verify: + // - number_in_file (overall Block number) + // - compressed_file_offset + // - uncompressed_file_offset + // - number_in_stream (Block number relative to current Stream) + // - compressed_stream_offset + // - uncompressed_stream_offset + // - uncompressed_size + // - unpadded_size + // - total_size + + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)); + + // Verify Block data stored correctly + assert_uint_eq(iter.block.number_in_file, 1); + + // Should start right after the Stream Header + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE); + assert_uint_eq(iter.block.uncompressed_file_offset, 0); + assert_uint_eq(iter.block.number_in_stream, 1); + assert_uint_eq(iter.block.compressed_stream_offset, + LZMA_STREAM_HEADER_SIZE); + assert_uint_eq(iter.block.uncompressed_stream_offset, 0); + assert_uint_eq(iter.block.unpadded_size, UNPADDED_SIZE_MIN); + assert_uint_eq(iter.block.total_size, vli_ceil4(UNPADDED_SIZE_MIN)); + + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)); + + // Verify Block data stored correctly + assert_uint_eq(iter.block.number_in_file, 2); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + + vli_ceil4(UNPADDED_SIZE_MIN)); + assert_uint_eq(iter.block.uncompressed_file_offset, 1); + assert_uint_eq(iter.block.number_in_stream, 2); + assert_uint_eq(iter.block.compressed_stream_offset, + LZMA_STREAM_HEADER_SIZE + + vli_ceil4(UNPADDED_SIZE_MIN)); + assert_uint_eq(iter.block.uncompressed_stream_offset, 1); + assert_uint_eq(iter.block.unpadded_size, UNPADDED_SIZE_MIN * 2); + assert_uint_eq(iter.block.total_size, vli_ceil4(UNPADDED_SIZE_MIN * 2)); + + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)); + + // Verify Block data stored correctly + assert_uint_eq(iter.block.number_in_file, 3); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + + vli_ceil4(UNPADDED_SIZE_MIN) + + vli_ceil4(UNPADDED_SIZE_MIN * 2)); + assert_uint_eq(iter.block.uncompressed_file_offset, 11); + assert_uint_eq(iter.block.number_in_stream, 3); + assert_uint_eq(iter.block.compressed_stream_offset, + LZMA_STREAM_HEADER_SIZE + + vli_ceil4(UNPADDED_SIZE_MIN) + + vli_ceil4(UNPADDED_SIZE_MIN * 2)); + assert_uint_eq(iter.block.uncompressed_stream_offset, 11); + assert_uint_eq(iter.block.unpadded_size, UNPADDED_SIZE_MIN * 3); + assert_uint_eq(iter.block.total_size, + vli_ceil4(UNPADDED_SIZE_MIN * 3)); + + // Only three Blocks were added, so this should return true + assert_true(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)); + + const lzma_vli second_stream_compressed_start = + LZMA_STREAM_HEADER_SIZE * 2 + + vli_ceil4(UNPADDED_SIZE_MIN) + + vli_ceil4(UNPADDED_SIZE_MIN * 2) + + vli_ceil4(UNPADDED_SIZE_MIN * 3) + + lzma_index_size(first); + const lzma_vli second_stream_uncompressed_start = 1 + 10 + 100; + + // Test iterating over Streams. + // The second Stream will have 0 Blocks + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + // Set Stream Flags for Stream 2 + lzma_stream_flags flags = { + .version = 0, + .backward_size = LZMA_BACKWARD_SIZE_MIN, + .check = LZMA_CHECK_CRC32 + }; + + assert_lzma_ret(lzma_index_stream_flags(second, &flags), LZMA_OK); + + // The Second stream will have 8 bytes of Stream Padding + assert_lzma_ret(lzma_index_stream_padding(second, 8), LZMA_OK); + + const lzma_vli second_stream_index_size = lzma_index_size(second); + + // The third Stream will have 2 Blocks + lzma_index *third = lzma_index_init(NULL); + assert_true(third != NULL); + + assert_lzma_ret(lzma_index_append(third, NULL, 32, 20), LZMA_OK); + assert_lzma_ret(lzma_index_append(third, NULL, 64, 40), LZMA_OK); + + const lzma_vli third_stream_index_size = lzma_index_size(third); + + assert_lzma_ret(lzma_index_cat(first, second, NULL), LZMA_OK); + assert_lzma_ret(lzma_index_cat(first, third, NULL), LZMA_OK); + + // For Streams, need to verify: + // - flags (Stream Flags) + // - number (Stream count) + // - block_count + // - compressed_offset + // - uncompressed_offset + // - compressed_size + // - uncompressed_size + // - padding (Stream Padding) + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + + // Verify Stream + assert_uint_eq(iter.stream.flags->backward_size, + LZMA_BACKWARD_SIZE_MIN); + assert_uint_eq(iter.stream.flags->check, LZMA_CHECK_CRC32); + assert_uint_eq(iter.stream.number, 2); + assert_uint_eq(iter.stream.block_count, 0); + assert_uint_eq(iter.stream.compressed_offset, + second_stream_compressed_start); + assert_uint_eq(iter.stream.uncompressed_offset, + second_stream_uncompressed_start); + assert_uint_eq(iter.stream.compressed_size, + LZMA_STREAM_HEADER_SIZE * 2 + + second_stream_index_size); + assert_uint_eq(iter.stream.uncompressed_size, 0); + assert_uint_eq(iter.stream.padding, 8); + + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + + // Verify Stream + const lzma_vli third_stream_compressed_start = + second_stream_compressed_start + + LZMA_STREAM_HEADER_SIZE * 2 + + 8 + // Stream padding + second_stream_index_size; + const lzma_vli third_stream_uncompressed_start = + second_stream_uncompressed_start; + + assert_uint_eq(iter.stream.number, 3); + assert_uint_eq(iter.stream.block_count, 2); + assert_uint_eq(iter.stream.compressed_offset, + third_stream_compressed_start); + assert_uint_eq(iter.stream.uncompressed_offset, + third_stream_uncompressed_start); + assert_uint_eq(iter.stream.compressed_size, + LZMA_STREAM_HEADER_SIZE * 2 + + 96 + // Total compressed size + third_stream_index_size); + assert_uint_eq(iter.stream.uncompressed_size, 60); + assert_uint_eq(iter.stream.padding, 0); + + assert_true(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)); + + // Even after a failing call to next with ITER_STREAM mode, + // should still be able to iterate over the 2 Blocks in + // Stream 3. + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)); + + // Verify both Blocks + + // Next call to iterate Block should return true because the + // first Block can already be read from the earlier *successful* + // LZMA_INDEX_ITER_STREAM call; the previous failed call doesn't + // modify the iterator. + assert_true(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)); + + // Rewind to test LZMA_INDEX_ITER_ANY + lzma_index_iter_rewind(&iter); + + // Iterate past the first three Blocks + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + + // Iterate past the next Stream + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + + // Iterate past the next Stream + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + + // Last call should fail + assert_true(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + + // Rewind to test LZMA_INDEX_ITER_NONEMPTY_BLOCK + lzma_index_iter_rewind(&iter); + + // Iterate past the first three Blocks + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_NONEMPTY_BLOCK)); + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_NONEMPTY_BLOCK)); + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_NONEMPTY_BLOCK)); + + // Skip past the next Stream which has no Blocks. + // We will get to the first Block of the third Stream. + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_NONEMPTY_BLOCK)); + + // Iterate past the second (the last) Block in the third Stream + assert_false(lzma_index_iter_next(&iter, + LZMA_INDEX_ITER_NONEMPTY_BLOCK)); + + // Last call should fail since there is nothing left to iterate over. + assert_true(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)); + + lzma_index_end(first, NULL); +} + + +static void +test_lzma_index_iter_locate(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + lzma_index_iter iter; + lzma_index_iter_init(&iter, idx); + + // Cannot locate anything from an empty Index. + assert_true(lzma_index_iter_locate(&iter, 0)); + assert_true(lzma_index_iter_locate(&iter, 555)); + + // One empty Record: nothing is found since there's no uncompressed + // data. + assert_lzma_ret(lzma_index_append(idx, NULL, 16, 0), LZMA_OK); + assert_true(lzma_index_iter_locate(&iter, 0)); + + // Non-empty Record and we can find something. + assert_lzma_ret(lzma_index_append(idx, NULL, 32, 5), LZMA_OK); + assert_false(lzma_index_iter_locate(&iter, 0)); + assert_uint_eq(iter.block.total_size, 32); + assert_uint_eq(iter.block.uncompressed_size, 5); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + 16); + assert_uint_eq(iter.block.uncompressed_file_offset, 0); + + // Still cannot find anything past the end. + assert_true(lzma_index_iter_locate(&iter, 5)); + + // Add the third Record. + assert_lzma_ret(lzma_index_append(idx, NULL, 40, 11), LZMA_OK); + + assert_false(lzma_index_iter_locate(&iter, 0)); + assert_uint_eq(iter.block.total_size, 32); + assert_uint_eq(iter.block.uncompressed_size, 5); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + 16); + assert_uint_eq(iter.block.uncompressed_file_offset, 0); + + assert_false(lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)); + assert_uint_eq(iter.block.total_size, 40); + assert_uint_eq(iter.block.uncompressed_size, 11); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + 16 + 32); + assert_uint_eq(iter.block.uncompressed_file_offset, 5); + + assert_false(lzma_index_iter_locate(&iter, 2)); + assert_uint_eq(iter.block.total_size, 32); + assert_uint_eq(iter.block.uncompressed_size, 5); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + 16); + assert_uint_eq(iter.block.uncompressed_file_offset, 0); + + assert_false(lzma_index_iter_locate(&iter, 5)); + assert_uint_eq(iter.block.total_size, 40); + assert_uint_eq(iter.block.uncompressed_size, 11); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + 16 + 32); + assert_uint_eq(iter.block.uncompressed_file_offset, 5); + + assert_false(lzma_index_iter_locate(&iter, 5 + 11 - 1)); + assert_uint_eq(iter.block.total_size, 40); + assert_uint_eq(iter.block.uncompressed_size, 11); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + 16 + 32); + assert_uint_eq(iter.block.uncompressed_file_offset, 5); + + assert_true(lzma_index_iter_locate(&iter, 5 + 11)); + assert_true(lzma_index_iter_locate(&iter, 5 + 15)); + + // Large Index + lzma_index_end(idx, NULL); + idx = lzma_index_init(NULL); + assert_true(idx != NULL); + lzma_index_iter_init(&iter, idx); + + for (uint32_t n = 4; n <= 4 * 5555; n += 4) + assert_lzma_ret(lzma_index_append(idx, NULL, n + 7, n), + LZMA_OK); + + assert_uint_eq(lzma_index_block_count(idx), 5555); + + // First Record + assert_false(lzma_index_iter_locate(&iter, 0)); + assert_uint_eq(iter.block.unpadded_size, 4 + 7); + assert_uint_eq(iter.block.total_size, 4 + 8); + assert_uint_eq(iter.block.uncompressed_size, 4); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE); + assert_uint_eq(iter.block.uncompressed_file_offset, 0); + + assert_false(lzma_index_iter_locate(&iter, 3)); + assert_uint_eq(iter.block.unpadded_size, 4 + 7); + assert_uint_eq(iter.block.total_size, 4 + 8); + assert_uint_eq(iter.block.uncompressed_size, 4); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE); + assert_uint_eq(iter.block.uncompressed_file_offset, 0); + + // Second Record + assert_false(lzma_index_iter_locate(&iter, 4)); + assert_uint_eq(iter.block.unpadded_size, 2 * 4 + 7); + assert_uint_eq(iter.block.total_size, 2 * 4 + 8); + assert_uint_eq(iter.block.uncompressed_size, 2 * 4); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + 4 + 8); + assert_uint_eq(iter.block.uncompressed_file_offset, 4); + + // Last Record + assert_false(lzma_index_iter_locate( + &iter, lzma_index_uncompressed_size(idx) - 1)); + assert_uint_eq(iter.block.unpadded_size, 4 * 5555 + 7); + assert_uint_eq(iter.block.total_size, 4 * 5555 + 8); + assert_uint_eq(iter.block.uncompressed_size, 4 * 5555); + assert_uint_eq(iter.block.compressed_file_offset, + lzma_index_total_size(idx) + + LZMA_STREAM_HEADER_SIZE - 4 * 5555 - 8); + assert_uint_eq(iter.block.uncompressed_file_offset, + lzma_index_uncompressed_size(idx) - 4 * 5555); + + // Allocation chunk boundaries. See INDEX_GROUP_SIZE in + // liblzma/common/index.c. + const uint32_t group_multiple = 256 * 4; + const uint32_t radius = 8; + const uint32_t start = group_multiple - radius; + lzma_vli ubase = 0; + lzma_vli tbase = 0; + uint32_t n; + for (n = 1; n < start; ++n) { + ubase += n * 4; + tbase += n * 4 + 8; + } + + while (n < start + 2 * radius) { + assert_false(lzma_index_iter_locate(&iter, ubase + n * 4)); + + assert_uint_eq(iter.block.compressed_file_offset, + tbase + n * 4 + 8 + + LZMA_STREAM_HEADER_SIZE); + assert_uint_eq(iter.block.uncompressed_file_offset, + ubase + n * 4); + + tbase += n * 4 + 8; + ubase += n * 4; + ++n; + + assert_uint_eq(iter.block.total_size, n * 4 + 8); + assert_uint_eq(iter.block.uncompressed_size, n * 4); + } + + // Do it also backwards. + while (n > start) { + assert_false(lzma_index_iter_locate( + &iter, ubase + (n - 1) * 4)); + + assert_uint_eq(iter.block.total_size, n * 4 + 8); + assert_uint_eq(iter.block.uncompressed_size, n * 4); + + --n; + tbase -= n * 4 + 8; + ubase -= n * 4; + + assert_uint_eq(iter.block.compressed_file_offset, + tbase + n * 4 + 8 + + LZMA_STREAM_HEADER_SIZE); + assert_uint_eq(iter.block.uncompressed_file_offset, + ubase + n * 4); + } + + // Test locating in concatenated Index. + lzma_index_end(idx, NULL); + idx = lzma_index_init(NULL); + assert_true(idx != NULL); + lzma_index_iter_init(&iter, idx); + for (n = 0; n < group_multiple; ++n) + assert_lzma_ret(lzma_index_append(idx, NULL, 8, 0), + LZMA_OK); + + assert_lzma_ret(lzma_index_append(idx, NULL, 16, 1), LZMA_OK); + assert_false(lzma_index_iter_locate(&iter, 0)); + assert_uint_eq(iter.block.total_size, 16); + assert_uint_eq(iter.block.uncompressed_size, 1); + assert_uint_eq(iter.block.compressed_file_offset, + LZMA_STREAM_HEADER_SIZE + group_multiple * 8); + assert_uint_eq(iter.block.uncompressed_file_offset, 0); + + lzma_index_end(idx, NULL); +} + + +static void +test_lzma_index_cat(void) +{ + // Most complex tests for this function are done in other tests. + // This will mostly test basic functionality. + + lzma_index *dest = lzma_index_init(NULL); + assert_true(dest != NULL); + + lzma_index *src = lzma_index_init(NULL); + assert_true(src != NULL); + + // First test NULL dest or src + assert_lzma_ret(lzma_index_cat(NULL, NULL, NULL), LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_cat(dest, NULL, NULL), LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_cat(NULL, src, NULL), LZMA_PROG_ERROR); + + // Check for compressed size overflow + assert_lzma_ret(lzma_index_append(dest, NULL, + (UNPADDED_SIZE_MAX / 2) + 1, 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(src, NULL, + (UNPADDED_SIZE_MAX / 2) + 1, 1), LZMA_OK); + assert_lzma_ret(lzma_index_cat(dest, src, NULL), LZMA_DATA_ERROR); + + lzma_index_end(src, NULL); + lzma_index_end(dest, NULL); + + // Check for uncompressed size overflow + dest = lzma_index_init(NULL); + assert_true(dest != NULL); + + src = lzma_index_init(NULL); + assert_true(src != NULL); + + assert_lzma_ret(lzma_index_append(dest, NULL, + UNPADDED_SIZE_MIN, (LZMA_VLI_MAX / 2) + 1), LZMA_OK); + assert_lzma_ret(lzma_index_append(src, NULL, + UNPADDED_SIZE_MIN, (LZMA_VLI_MAX / 2) + 1), LZMA_OK); + assert_lzma_ret(lzma_index_cat(dest, src, NULL), LZMA_DATA_ERROR); + + lzma_index_end(dest, NULL); + lzma_index_end(src, NULL); +} + + +// Helper function for test_lzma_index_dup(). +static bool +index_is_equal(const lzma_index *a, const lzma_index *b) +{ + // Compare only the Stream and Block sizes and offsets. + lzma_index_iter ra, rb; + lzma_index_iter_init(&ra, a); + lzma_index_iter_init(&rb, b); + + while (true) { + bool reta = lzma_index_iter_next(&ra, LZMA_INDEX_ITER_ANY); + bool retb = lzma_index_iter_next(&rb, LZMA_INDEX_ITER_ANY); + + // If both iterators finish at the same time, then the Indexes + // are identical. + if (reta) + return retb; + + if (ra.stream.number != rb.stream.number + || ra.stream.block_count + != rb.stream.block_count + || ra.stream.compressed_offset + != rb.stream.compressed_offset + || ra.stream.uncompressed_offset + != rb.stream.uncompressed_offset + || ra.stream.compressed_size + != rb.stream.compressed_size + || ra.stream.uncompressed_size + != rb.stream.uncompressed_size + || ra.stream.padding + != rb.stream.padding) + return false; + + if (ra.stream.block_count == 0) + continue; + + if (ra.block.number_in_file != rb.block.number_in_file + || ra.block.compressed_file_offset + != rb.block.compressed_file_offset + || ra.block.uncompressed_file_offset + != rb.block.uncompressed_file_offset + || ra.block.number_in_stream + != rb.block.number_in_stream + || ra.block.compressed_stream_offset + != rb.block.compressed_stream_offset + || ra.block.uncompressed_stream_offset + != rb.block.uncompressed_stream_offset + || ra.block.uncompressed_size + != rb.block.uncompressed_size + || ra.block.unpadded_size + != rb.block.unpadded_size + || ra.block.total_size + != rb.block.total_size) + return false; + } +} + + +// Allocator that succeeds for the first two allocation but fails the rest. +static void * +my_alloc(void *opaque, size_t a, size_t b) +{ + (void)opaque; + + assert_true(SIZE_MAX / a >= b); + + static unsigned count = 0; + if (count >= 2) + return NULL; + + ++count; + return malloc(a * b); +} + + +static const lzma_allocator test_index_dup_alloc = { &my_alloc, NULL, NULL }; + + +static void +test_lzma_index_dup(void) +{ + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Test for the bug fix 21515d79d778b8730a434f151b07202d52a04611: + // liblzma: Fix lzma_index_dup() for empty Streams. + assert_lzma_ret(lzma_index_stream_padding(idx, 4), LZMA_OK); + lzma_index *copy = lzma_index_dup(idx, NULL); + assert_true(copy != NULL); + assert_true(index_is_equal(idx, copy)); + lzma_index_end(copy, NULL); + + // Test for the bug fix 3bf857edfef51374f6f3fffae3d817f57d3264a0: + // liblzma: Fix a memory leak in error path of lzma_index_dup(). + // Use Valgrind to see that there are no leaks. + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 10), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 2, 100), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 3, 1000), LZMA_OK); + + assert_true(lzma_index_dup(idx, &test_index_dup_alloc) == NULL); + + // Test a few streams and blocks + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + assert_lzma_ret(lzma_index_stream_padding(second, 16), LZMA_OK); + + lzma_index *third = lzma_index_init(NULL); + assert_true(third != NULL); + + assert_lzma_ret(lzma_index_append(third, NULL, + UNPADDED_SIZE_MIN * 10, 40), LZMA_OK); + assert_lzma_ret(lzma_index_append(third, NULL, + UNPADDED_SIZE_MIN * 20, 400), LZMA_OK); + assert_lzma_ret(lzma_index_append(third, NULL, + UNPADDED_SIZE_MIN * 30, 4000), LZMA_OK); + + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + assert_lzma_ret(lzma_index_cat(idx, third, NULL), LZMA_OK); + + copy = lzma_index_dup(idx, NULL); + assert_true(copy != NULL); + assert_true(index_is_equal(idx, copy)); + + lzma_index_end(copy, NULL); + lzma_index_end(idx, NULL); +} + + +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +static void +verify_index_buffer(const lzma_index *idx, const uint8_t *buffer, + const size_t buffer_size) +{ + lzma_index_iter iter; + lzma_index_iter_init(&iter, idx); + + size_t buffer_pos = 0; + + // Verify Index Indicator + assert_uint_eq(buffer[buffer_pos++], 0); + + // Get Number of Records + lzma_vli number_of_records = 0; + lzma_vli block_count = 0; + assert_lzma_ret(lzma_vli_decode(&number_of_records, NULL, buffer, + &buffer_pos, buffer_size), LZMA_OK); + + while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_ANY)) { + // Verify each Record (Unpadded Size, then Uncompressed Size). + // Verify Unpadded Size. + lzma_vli unpadded_size, uncompressed_size; + assert_lzma_ret(lzma_vli_decode(&unpadded_size, + NULL, buffer, &buffer_pos, + buffer_size), LZMA_OK); + assert_uint_eq(unpadded_size, + iter.block.unpadded_size); + + // Verify Uncompressed Size + assert_lzma_ret(lzma_vli_decode(&uncompressed_size, + NULL, buffer, &buffer_pos, + buffer_size), LZMA_OK); + assert_uint_eq(uncompressed_size, + iter.block.uncompressed_size); + + block_count++; + } + + // Verify Number of Records + assert_uint_eq(number_of_records, block_count); + + // Verify Index Padding + for (; buffer_pos % 4 != 0; buffer_pos++) + assert_uint_eq(buffer[buffer_pos], 0); + + // Verify CRC32 + uint32_t crc32 = lzma_crc32(buffer, buffer_pos, 0); + assert_uint_eq(read32le(buffer + buffer_pos), crc32); +} + + +// In a few places the Index size is needed as a size_t but lzma_index_size() +// returns lzma_vli. +static size_t +get_index_size(const lzma_index *idx) +{ + const lzma_vli size = lzma_index_size(idx); + assert_uint(size, <, SIZE_MAX); + return (size_t)size; +} +#endif + + +static void +test_lzma_index_encoder(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + lzma_stream strm = LZMA_STREAM_INIT; + + // First do basic NULL checks + assert_lzma_ret(lzma_index_encoder(NULL, NULL), LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_encoder(&strm, NULL), LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_encoder(NULL, idx), LZMA_PROG_ERROR); + + // Append three small Blocks + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 10), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 2, 100), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 3, 1000), LZMA_OK); + + // Encode this lzma_index into a buffer + size_t buffer_size = get_index_size(idx); + uint8_t *buffer = tuktest_malloc(buffer_size); + + assert_lzma_ret(lzma_index_encoder(&strm, idx), LZMA_OK); + + strm.avail_out = buffer_size; + strm.next_out = buffer; + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + assert_uint_eq(strm.avail_out, 0); + + lzma_end(&strm); + + verify_index_buffer(idx, buffer, buffer_size); + + // Test with multiple Streams concatenated into 1 Index + lzma_index *second = lzma_index_init(NULL); + assert_true(second != NULL); + + // Include 1 Block + assert_lzma_ret(lzma_index_append(second, NULL, + UNPADDED_SIZE_MIN * 4, 20), LZMA_OK); + + // Include Stream Padding + assert_lzma_ret(lzma_index_stream_padding(second, 16), LZMA_OK); + + assert_lzma_ret(lzma_index_cat(idx, second, NULL), LZMA_OK); + buffer_size = get_index_size(idx); + buffer = tuktest_malloc(buffer_size); + assert_lzma_ret(lzma_index_encoder(&strm, idx), LZMA_OK); + + strm.avail_out = buffer_size; + strm.next_out = buffer; + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + assert_uint_eq(strm.avail_out, 0); + + verify_index_buffer(idx, buffer, buffer_size); + + lzma_index_end(idx, NULL); + lzma_end(&strm); +#endif +} + + +static void +generate_index_decode_buffer(void) +{ +#ifdef HAVE_ENCODERS + decode_test_index = lzma_index_init(NULL); + assert_true(decode_test_index != NULL); + + // Add 4 Blocks + for (uint32_t i = 1; i < 5; i++) + assert_lzma_ret(lzma_index_append(decode_test_index, NULL, + 0x1000 * i, 0x100 * i), LZMA_OK); + + const size_t size = (size_t)lzma_index_size(decode_test_index); + decode_buffer = tuktest_malloc(size); + + assert_lzma_ret(lzma_index_buffer_encode(decode_test_index, + decode_buffer, &decode_buffer_size, size), LZMA_OK); + assert_true(decode_buffer_size != 0); +#endif +} + + +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +static void +decode_index(const uint8_t *buffer, const size_t size, lzma_stream *strm, + lzma_ret expected_error) +{ + strm->avail_in = size; + strm->next_in = buffer; + assert_lzma_ret(lzma_code(strm, LZMA_FINISH), expected_error); +} +#endif + + +static void +test_lzma_index_decoder(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + assert_true(decode_buffer_size != 0); + + lzma_stream strm = LZMA_STREAM_INIT; + + assert_lzma_ret(lzma_index_decoder(NULL, NULL, MEMLIMIT), + LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_decoder(&strm, NULL, MEMLIMIT), + LZMA_PROG_ERROR); + + // If the first argument (lzma_stream *strm) is NULL then + // *idx must still become NULL since the API docs say that + // it's done if an error occurs. This was fixed in + // 71eed2520e2eecae89bade9dceea16e56cfa2ea0. + lzma_index *idx_allocated = lzma_index_init(NULL); + lzma_index *idx = idx_allocated; + assert_lzma_ret(lzma_index_decoder(NULL, &idx, MEMLIMIT), + LZMA_PROG_ERROR); + assert_true(idx == NULL); + + lzma_index_end(idx_allocated, NULL); + idx_allocated = NULL; + + // Do actual decode + assert_lzma_ret(lzma_index_decoder(&strm, &idx, MEMLIMIT), + LZMA_OK); + + decode_index(decode_buffer, decode_buffer_size, &strm, + LZMA_STREAM_END); + + // Compare results with expected + assert_true(index_is_equal(decode_test_index, idx)); + + lzma_index_end(idx, NULL); + + // Test again with too low memory limit + assert_lzma_ret(lzma_index_decoder(&strm, &idx, 0), LZMA_OK); + + decode_index(decode_buffer, decode_buffer_size, &strm, + LZMA_MEMLIMIT_ERROR); + + uint8_t *corrupt_buffer = tuktest_malloc(decode_buffer_size); + memcpy(corrupt_buffer, decode_buffer, decode_buffer_size); + + assert_lzma_ret(lzma_index_decoder(&strm, &idx, MEMLIMIT), + LZMA_OK); + + // First corrupt the Index Indicator + corrupt_buffer[0] ^= 1; + decode_index(corrupt_buffer, decode_buffer_size, &strm, + LZMA_DATA_ERROR); + corrupt_buffer[0] ^= 1; + + // Corrupt something in the middle of Index + corrupt_buffer[decode_buffer_size / 2] ^= 1; + assert_lzma_ret(lzma_index_decoder(&strm, &idx, MEMLIMIT), + LZMA_OK); + decode_index(corrupt_buffer, decode_buffer_size, &strm, + LZMA_DATA_ERROR); + corrupt_buffer[decode_buffer_size / 2] ^= 1; + + // Corrupt CRC32 + corrupt_buffer[decode_buffer_size - 1] ^= 1; + assert_lzma_ret(lzma_index_decoder(&strm, &idx, MEMLIMIT), + LZMA_OK); + decode_index(corrupt_buffer, decode_buffer_size, &strm, + LZMA_DATA_ERROR); + corrupt_buffer[decode_buffer_size - 1] ^= 1; + + // Corrupt Index Padding by setting it to non-zero + corrupt_buffer[decode_buffer_size - 5] ^= 1; + assert_lzma_ret(lzma_index_decoder(&strm, &idx, MEMLIMIT), + LZMA_OK); + decode_index(corrupt_buffer, decode_buffer_size, &strm, + LZMA_DATA_ERROR); + corrupt_buffer[decode_buffer_size - 1] ^= 1; + + lzma_end(&strm); +#endif +} + + +static void +test_lzma_index_buffer_encode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + // These are simpler test than in test_lzma_index_encoder() + // because lzma_index_buffer_encode() is mostly a wrapper + // around lzma_index_encoder() anyway. + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN, 10), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 2, 100), LZMA_OK); + assert_lzma_ret(lzma_index_append(idx, NULL, + UNPADDED_SIZE_MIN * 3, 1000), LZMA_OK); + + size_t buffer_size = get_index_size(idx); + uint8_t *buffer = tuktest_malloc(buffer_size); + size_t out_pos = 1; + + // First test bad arguments + assert_lzma_ret(lzma_index_buffer_encode(NULL, NULL, NULL, 0), + LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_buffer_encode(idx, NULL, NULL, 0), + LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, NULL, 0), + LZMA_PROG_ERROR); + assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, &out_pos, + 0), LZMA_PROG_ERROR); + out_pos = 0; + assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, &out_pos, + 0), LZMA_BUF_ERROR); + assert_uint_eq(out_pos, 0); + assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, &out_pos, + 1), LZMA_BUF_ERROR); + + // Do encoding + assert_lzma_ret(lzma_index_buffer_encode(idx, buffer, &out_pos, + buffer_size), LZMA_OK); + assert_uint_eq(out_pos, buffer_size); + + // Validate results + verify_index_buffer(idx, buffer, buffer_size); + + lzma_index_end(idx, NULL); +#endif +} + + +static void +test_lzma_index_buffer_decode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + assert_true(decode_buffer_size != 0); + + // Simple test since test_lzma_index_decoder() covers most of the + // lzma_index_buffer_decode() code anyway. + + // First test NULL checks + assert_lzma_ret(lzma_index_buffer_decode(NULL, NULL, NULL, NULL, + NULL, 0), LZMA_PROG_ERROR); + + uint64_t memlimit = MEMLIMIT; + size_t in_pos = 0; + lzma_index *idx_allocated = lzma_index_init(NULL); + lzma_index *idx = idx_allocated; + + assert_lzma_ret(lzma_index_buffer_decode(&idx, NULL, NULL, NULL, + NULL, 0), LZMA_PROG_ERROR); + assert_true(idx == NULL); + + idx = idx_allocated; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + NULL, NULL, 0), LZMA_PROG_ERROR); + assert_true(idx == NULL); + + idx = idx_allocated; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, NULL, 0), LZMA_PROG_ERROR); + assert_true(idx == NULL); + + idx = idx_allocated; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, NULL, 0), LZMA_PROG_ERROR); + assert_true(idx == NULL); + + idx = idx_allocated; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, &in_pos, 0), LZMA_DATA_ERROR); + assert_true(idx == NULL); + + in_pos = 1; + idx = idx_allocated; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, &in_pos, 0), LZMA_PROG_ERROR); + assert_true(idx == NULL); + + // Test too short input + in_pos = 0; + idx = idx_allocated; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, &in_pos, decode_buffer_size - 1), + LZMA_DATA_ERROR); + assert_true(idx == NULL); + + lzma_index_end(idx_allocated, NULL); + idx_allocated = NULL; + + // Test expected successful decode + in_pos = 0; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, &in_pos, decode_buffer_size), LZMA_OK); + + assert_uint_eq(in_pos, decode_buffer_size); + assert_true(index_is_equal(decode_test_index, idx)); + + lzma_index_end(idx, NULL); + + // Test too much input. This won't read past + // the end of the allocated array (decode_buffer_size bytes). + in_pos = 0; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, &in_pos, decode_buffer_size + 16), + LZMA_OK); + + assert_uint_eq(in_pos, decode_buffer_size); + assert_true(index_is_equal(decode_test_index, idx)); + + lzma_index_end(idx, NULL); + + // Test too small memlimit + in_pos = 0; + memlimit = 1; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + decode_buffer, &in_pos, decode_buffer_size), + LZMA_MEMLIMIT_ERROR); + assert_uint(memlimit, >, 1); + assert_uint(memlimit, <, MEMLIMIT); +#endif +} + + +// With liblzma <= 5.8.2 (before the commit c8c22869e780), +// this triggers a buffer overflow in lzma_index_append(). +static void +test_decode_empty_and_append(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + uint8_t buf[256]; + lzma_index *idx = lzma_index_init(NULL); + assert_true(idx != NULL); + + // Encode an empty Index. + size_t buf_size = 0; + assert_lzma_ret(lzma_index_buffer_encode( + idx, buf, &buf_size, sizeof(buf)), LZMA_OK); + assert_true(buf_size > 0); + lzma_index_end(idx, NULL); + idx = NULL; + + // Decode the empty Index. + uint64_t memlimit = MEMLIMIT; + size_t buf_pos = 0; + assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL, + buf, &buf_pos, buf_size), LZMA_OK); + assert_uint_eq(buf_pos, buf_size); + + // Append one Record to the decoded empty idx. + assert_lzma_ret(lzma_index_append(idx, NULL, 55, 1), LZMA_OK); + lzma_index_end(idx, NULL); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + generate_index_decode_buffer(); + tuktest_run(test_lzma_index_memusage); + tuktest_run(test_lzma_index_memused); + tuktest_run(test_lzma_index_append); + tuktest_run(test_lzma_index_stream_flags); + tuktest_run(test_lzma_index_checks); + tuktest_run(test_lzma_index_stream_padding); + tuktest_run(test_lzma_index_stream_count); + tuktest_run(test_lzma_index_block_count); + tuktest_run(test_lzma_index_size); + tuktest_run(test_lzma_index_stream_size); + tuktest_run(test_lzma_index_total_size); + tuktest_run(test_lzma_index_file_size); + tuktest_run(test_lzma_index_uncompressed_size); + tuktest_run(test_lzma_index_iter_init); + tuktest_run(test_lzma_index_iter_rewind); + tuktest_run(test_lzma_index_iter_next); + tuktest_run(test_lzma_index_iter_locate); + tuktest_run(test_lzma_index_cat); + tuktest_run(test_lzma_index_dup); + tuktest_run(test_lzma_index_encoder); + tuktest_run(test_lzma_index_decoder); + tuktest_run(test_lzma_index_buffer_encode); + tuktest_run(test_lzma_index_buffer_decode); + tuktest_run(test_decode_empty_and_append); + lzma_index_end(decode_test_index, NULL); + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_index_hash.c b/cpp/third_party/xz-5.8.3/tests/test_index_hash.c new file mode 100644 index 0000000000..842d5348b1 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_index_hash.c @@ -0,0 +1,385 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_index_hash.c +/// \brief Tests src/liblzma/common/index_hash.c API functions +/// +/// \note No test included for lzma_index_hash_end since it +/// would be trivial unless tested for memory leaks +/// with something like valgrind +// +// Author: Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + +// Needed for UNPADDED_SIZE_MIN and UNPADDED_SIZE_MAX macro definitions +// and index_size and vli_ceil4 helper functions +#include "common/index.h" + + +static void +test_lzma_index_hash_init(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + // First test with NULL index_hash. + // This should create a fresh index_hash. + lzma_index_hash *index_hash = lzma_index_hash_init(NULL, NULL); + assert_true(index_hash != NULL); + + // Next test with non-NULL index_hash. + lzma_index_hash *second_hash = lzma_index_hash_init(index_hash, NULL); + + // It should not create a new index_hash pointer. + // Instead it must just re-init the first index_hash. + assert_true(index_hash == second_hash); + + lzma_index_hash_end(index_hash, NULL); +#endif +} + + +static void +test_lzma_index_hash_append(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + // Test all invalid parameters + assert_lzma_ret(lzma_index_hash_append(NULL, 0, 0), + LZMA_PROG_ERROR); + + // Test NULL index_hash + assert_lzma_ret(lzma_index_hash_append(NULL, UNPADDED_SIZE_MIN, + LZMA_VLI_MAX), LZMA_PROG_ERROR); + + // Test with invalid Unpadded Size + lzma_index_hash *index_hash = lzma_index_hash_init(NULL, NULL); + assert_true(index_hash != NULL); + assert_lzma_ret(lzma_index_hash_append(index_hash, + UNPADDED_SIZE_MIN - 1, LZMA_VLI_MAX), + LZMA_PROG_ERROR); + + // Test with invalid Uncompressed Size + assert_lzma_ret(lzma_index_hash_append(index_hash, + UNPADDED_SIZE_MIN, LZMA_VLI_MAX + 1), + LZMA_PROG_ERROR); + + // First append a Record describing a small Block. + // This should succeed. + assert_lzma_ret(lzma_index_hash_append(index_hash, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + // Append another small Record. + assert_lzma_ret(lzma_index_hash_append(index_hash, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + // Append a Record that would cause the compressed size to grow + // too big + assert_lzma_ret(lzma_index_hash_append(index_hash, + UNPADDED_SIZE_MAX, 1), LZMA_DATA_ERROR); + + lzma_index_hash_end(index_hash, NULL); +#endif +} + + +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +// Fill an index_hash with unpadded and uncompressed VLIs +// by calling lzma_index_hash_append +static void +fill_index_hash(lzma_index_hash *index_hash, const lzma_vli *unpadded_sizes, + const lzma_vli *uncomp_sizes, uint32_t block_count) +{ + for (uint32_t i = 0; i < block_count; ++i) + assert_lzma_ret(lzma_index_hash_append(index_hash, + unpadded_sizes[i], uncomp_sizes[i]), LZMA_OK); +} + + +// Set the contents of buf to the expected Index based on the +// .xz specification. This needs the unpadded and uncompressed VLIs +// to correctly create the Index. +static void +generate_index(uint8_t *buf, const lzma_vli *unpadded_sizes, + const lzma_vli *uncomp_sizes, uint32_t block_count, + size_t index_max_size) +{ + size_t in_pos = 0; + size_t out_pos = 0; + + // First set Index Indicator + buf[out_pos++] = INDEX_INDICATOR; + + // Next write out Number of Records + assert_lzma_ret(lzma_vli_encode(block_count, &in_pos, buf, + &out_pos, index_max_size), LZMA_STREAM_END); + + // Next write out each Record. + // A Record consists of Unpadded Size and Uncompressed Size + // written next to each other as VLIs. + for (uint32_t i = 0; i < block_count; ++i) { + in_pos = 0; + assert_lzma_ret(lzma_vli_encode(unpadded_sizes[i], &in_pos, + buf, &out_pos, index_max_size), LZMA_STREAM_END); + in_pos = 0; + assert_lzma_ret(lzma_vli_encode(uncomp_sizes[i], &in_pos, + buf, &out_pos, index_max_size), LZMA_STREAM_END); + } + + // Add Index Padding + lzma_vli rounded_out_pos = vli_ceil4(out_pos); + memzero(buf + out_pos, rounded_out_pos - out_pos); + out_pos = rounded_out_pos; + + // Add the CRC32 + write32le(buf + out_pos, lzma_crc32(buf, out_pos, 0)); + out_pos += 4; + + assert_uint_eq(out_pos, index_max_size); +} +#endif + + +static void +test_lzma_index_hash_decode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + lzma_index_hash *index_hash = lzma_index_hash_init(NULL, NULL); + assert_true(index_hash != NULL); + + size_t in_pos = 0; + + // Six valid values for the Unpadded Size fields in an Index + const lzma_vli unpadded_sizes[6] = { + UNPADDED_SIZE_MIN, + 1000, + 4000, + 8000, + 16000, + 32000 + }; + + // Six valid values for the Uncompressed Size fields in an Index + const lzma_vli uncomp_sizes[6] = { + 1, + 500, + 8000, + 20, + 1, + 500 + }; + + // Add two Records to an index_hash + fill_index_hash(index_hash, unpadded_sizes, uncomp_sizes, 2); + + const lzma_vli size_two_records = lzma_index_hash_size(index_hash); + assert_uint(size_two_records, >, 0); + uint8_t *index_two_records = tuktest_malloc(size_two_records); + + generate_index(index_two_records, unpadded_sizes, uncomp_sizes, 2, + size_two_records); + + // First test for basic buffer size error + in_pos = size_two_records + 1; + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_two_records, &in_pos, + size_two_records), LZMA_BUF_ERROR); + + // Next test for invalid Index Indicator + in_pos = 0; + index_two_records[0] ^= 1; + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_two_records, &in_pos, + size_two_records), LZMA_DATA_ERROR); + index_two_records[0] ^= 1; + + // Next verify the index_hash as expected + in_pos = 0; + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_two_records, &in_pos, + size_two_records), LZMA_STREAM_END); + + // Next test an index_hash with three Records + index_hash = lzma_index_hash_init(index_hash, NULL); + fill_index_hash(index_hash, unpadded_sizes, uncomp_sizes, 3); + + const lzma_vli size_three_records = lzma_index_hash_size( + index_hash); + assert_uint(size_three_records, >, 0); + uint8_t *index_three_records = tuktest_malloc(size_three_records); + + generate_index(index_three_records, unpadded_sizes, uncomp_sizes, + 3, size_three_records); + + in_pos = 0; + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_three_records, &in_pos, + size_three_records), LZMA_STREAM_END); + + // Next test an index_hash with five Records + index_hash = lzma_index_hash_init(index_hash, NULL); + fill_index_hash(index_hash, unpadded_sizes, uncomp_sizes, 5); + + const lzma_vli size_five_records = lzma_index_hash_size( + index_hash); + assert_uint(size_five_records, >, 0); + uint8_t *index_five_records = tuktest_malloc(size_five_records); + + generate_index(index_five_records, unpadded_sizes, uncomp_sizes, 5, + size_five_records); + + // Instead of testing all input at once, give input + // one byte at a time + in_pos = 0; + for (lzma_vli i = 0; i < size_five_records - 1; ++i) { + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_five_records, &in_pos, in_pos + 1), + LZMA_OK); + } + + // Last byte should return LZMA_STREAM_END + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_five_records, &in_pos, + in_pos + 1), LZMA_STREAM_END); + + // Next test if the index_hash is given an incorrect Unpadded + // Size. Should detect and report LZMA_DATA_ERROR + index_hash = lzma_index_hash_init(index_hash, NULL); + fill_index_hash(index_hash, unpadded_sizes, uncomp_sizes, 5); + // The sixth Record will have an invalid Unpadded Size + assert_lzma_ret(lzma_index_hash_append(index_hash, + unpadded_sizes[5] + 1, + uncomp_sizes[5]), LZMA_OK); + + const lzma_vli size_six_records = lzma_index_hash_size( + index_hash); + + assert_uint(size_six_records, >, 0); + uint8_t *index_six_records = tuktest_malloc(size_six_records); + + generate_index(index_six_records, unpadded_sizes, uncomp_sizes, 6, + size_six_records); + in_pos = 0; + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_six_records, &in_pos, + size_six_records), LZMA_DATA_ERROR); + + // Next test if the Index is corrupt (invalid CRC32). + // Should detect and report LZMA_DATA_ERROR + index_hash = lzma_index_hash_init(index_hash, NULL); + fill_index_hash(index_hash, unpadded_sizes, uncomp_sizes, 2); + + index_two_records[size_two_records - 1] ^= 1; + + in_pos = 0; + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_two_records, &in_pos, + size_two_records), LZMA_DATA_ERROR); + + // Next test with Index and index_hash struct not matching + // a Record + index_hash = lzma_index_hash_init(index_hash, NULL); + fill_index_hash(index_hash, unpadded_sizes, uncomp_sizes, 2); + // Recalculate Index with invalid Unpadded Size + const lzma_vli unpadded_sizes_invalid[2] = { + unpadded_sizes[0], + unpadded_sizes[1] + 1 + }; + + generate_index(index_two_records, unpadded_sizes_invalid, + uncomp_sizes, 2, size_two_records); + + in_pos = 0; + assert_lzma_ret(lzma_index_hash_decode(index_hash, + index_two_records, &in_pos, + size_two_records), LZMA_DATA_ERROR); + + lzma_index_hash_end(index_hash, NULL); +#endif +} + + +static void +test_lzma_index_hash_size(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + lzma_index_hash *index_hash = lzma_index_hash_init(NULL, NULL); + assert_true(index_hash != NULL); + + // First test empty index_hash + // Expected size should be: + // Index Indicator - 1 byte + // Number of Records - 1 byte + // List of Records - 0 bytes + // Index Padding - 2 bytes + // CRC32 - 4 bytes + // Total - 8 bytes + assert_uint_eq(lzma_index_hash_size(index_hash), 8); + + // Append a Record describing a small Block to the index_hash + assert_lzma_ret(lzma_index_hash_append(index_hash, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + // Expected size should be: + // Index Indicator - 1 byte + // Number of Records - 1 byte + // List of Records - 2 bytes + // Index Padding - 0 bytes + // CRC32 - 4 bytes + // Total - 8 bytes + lzma_vli expected_size = 8; + assert_uint_eq(lzma_index_hash_size(index_hash), expected_size); + + // Append additional small Record + assert_lzma_ret(lzma_index_hash_append(index_hash, + UNPADDED_SIZE_MIN, 1), LZMA_OK); + + // Expected size should be: + // Index Indicator - 1 byte + // Number of Records - 1 byte + // List of Records - 4 bytes + // Index Padding - 2 bytes + // CRC32 - 4 bytes + // Total - 12 bytes + expected_size = 12; + assert_uint_eq(lzma_index_hash_size(index_hash), expected_size); + + // Append a larger Record to the index_hash (3 bytes for each VLI) + const lzma_vli three_byte_vli = 0x10000; + assert_lzma_ret(lzma_index_hash_append(index_hash, + three_byte_vli, three_byte_vli), LZMA_OK); + + // Expected size should be: + // Index Indicator - 1 byte + // Number of Records - 1 byte + // List of Records - 10 bytes + // Index Padding - 0 bytes + // CRC32 - 4 bytes + // Total - 16 bytes + expected_size = 16; + assert_uint_eq(lzma_index_hash_size(index_hash), expected_size); + + lzma_index_hash_end(index_hash, NULL); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + tuktest_run(test_lzma_index_hash_init); + tuktest_run(test_lzma_index_hash_append); + tuktest_run(test_lzma_index_hash_decode); + tuktest_run(test_lzma_index_hash_size); + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_lzip_decoder.c b/cpp/third_party/xz-5.8.3/tests/test_lzip_decoder.c new file mode 100644 index 0000000000..cee97b86d2 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_lzip_decoder.c @@ -0,0 +1,475 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_lzip_decoder.c +/// \brief Tests decoding lzip data +// +// Author: Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + +#ifdef HAVE_LZIP_DECODER + +// Memlimit large enough to pass all of the test files +#define MEMLIMIT (1U << 20) +#define DECODE_CHUNK_SIZE 1024 + + +// The uncompressed data in the test files are short US-ASCII strings. +// The tests check if the decompressed output is what it is expected to be. +// Storing the strings here as text would break the tests on EBCDIC systems +// and storing the strings as an array of hex values is inconvenient, so +// store the CRC32 values of the expected data instead. +// +// CRC32 value of "Hello\nWorld\n" +static const uint32_t hello_world_crc = 0x15A2A343; + +// CRC32 value of "Trailing garbage\n" +static const uint32_t trailing_garbage_crc = 0x87081A60; + + +// Helper function to decode a good file with no flags and plenty high memlimit +static void +basic_lzip_decode(const char *src, const uint32_t expected_crc) +{ + size_t file_size; + uint8_t *data = tuktest_file_from_srcdir(src, &file_size); + uint32_t checksum = 0; + + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, 0), LZMA_OK); + + uint8_t output_buffer[DECODE_CHUNK_SIZE]; + + strm.next_in = data; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + // Feed 1 byte at a time to the decoder to look for any bugs + // when switching between decoding sequences + lzma_ret ret = LZMA_OK; + while (ret == LZMA_OK) { + strm.avail_in = 1; + ret = lzma_code(&strm, LZMA_RUN); + if (strm.avail_out == 0) { + checksum = lzma_crc32(output_buffer, + (size_t)(strm.next_out - output_buffer), + checksum); + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + } + } + + assert_lzma_ret(ret, LZMA_STREAM_END); + assert_uint_eq(strm.total_in, file_size); + + checksum = lzma_crc32(output_buffer, + (size_t)(strm.next_out - output_buffer), + checksum); + assert_uint_eq(checksum, expected_crc); + + lzma_end(&strm); +} + + +static void +test_options(void) +{ + // Test NULL stream + assert_lzma_ret(lzma_lzip_decoder(NULL, MEMLIMIT, 0), + LZMA_PROG_ERROR); + + // Test invalid flags + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, UINT32_MAX), + LZMA_OPTIONS_ERROR); + // Memlimit tests are done elsewhere +} + + +static void +test_v0_decode(void) +{ + // This tests if liblzma can decode lzip version 0 files. + // lzip 1.17 and older can decompress this, but lzip 1.18 + // and newer can no longer decode these files. + basic_lzip_decode("files/good-1-v0.lz", hello_world_crc); +} + + +static void +test_v1_decode(void) +{ + // This tests decoding a basic lzip v1 file + basic_lzip_decode("files/good-1-v1.lz", hello_world_crc); +} + + +// Helper function to decode a good file with trailing bytes after +// the lzip stream +static void +trailing_helper(const char *src, const uint32_t expected_data_checksum, + const uint32_t expected_trailing_checksum) +{ + size_t file_size; + uint32_t checksum = 0; + uint8_t *data = tuktest_file_from_srcdir(src, &file_size); + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED), LZMA_OK); + + uint8_t output_buffer[DECODE_CHUNK_SIZE]; + + strm.next_in = data; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + lzma_ret ret = LZMA_OK; + while (ret == LZMA_OK) { + ret = lzma_code(&strm, LZMA_RUN); + if (strm.avail_out == 0) { + checksum = lzma_crc32(output_buffer, + (size_t)(strm.next_out - output_buffer), + checksum); + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + } + } + + assert_lzma_ret(ret, LZMA_STREAM_END); + assert_uint(strm.total_in, <, file_size); + + checksum = lzma_crc32(output_buffer, + (size_t)(strm.next_out - output_buffer), + checksum); + + assert_uint_eq(checksum, expected_data_checksum); + + // Trailing data should be readable from strm.next_in + checksum = lzma_crc32(strm.next_in, strm.avail_in, 0); + assert_uint_eq(checksum, expected_trailing_checksum); + + lzma_end(&strm); +} + + +// Helper function to decode a bad file and compare to returned error to +// what the caller expects +static void +decode_expect_error(const char *src, lzma_ret expected_error) +{ + lzma_stream strm = LZMA_STREAM_INIT; + size_t file_size; + uint8_t *data = tuktest_file_from_srcdir(src, &file_size); + + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED), LZMA_OK); + + uint8_t output_buffer[DECODE_CHUNK_SIZE]; + + strm.avail_in = file_size; + strm.next_in = data; + + lzma_ret ret = LZMA_OK; + + do { + // Discard output since we are only looking for errors + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + if (strm.avail_in == 0) + ret = lzma_code(&strm, LZMA_FINISH); + else + ret = lzma_code(&strm, LZMA_RUN); + } while (ret == LZMA_OK); + + assert_lzma_ret(ret, expected_error); + lzma_end(&strm); +} + + +static void +test_v0_trailing(void) +{ + trailing_helper("files/good-1-v0-trailing-1.lz", hello_world_crc, + trailing_garbage_crc); +} + + +static void +test_v1_trailing(void) +{ + trailing_helper("files/good-1-v1-trailing-1.lz", hello_world_crc, + trailing_garbage_crc); + + // The second files/good-1-v1-trailing-2.lz will have the same + // expected output and trailing output as + // files/good-1-v1-trailing-1.lz, but this tests if the prefix + // to the trailing data contains lzip magic bytes. + // When this happens, the expected behavior is to silently ignore + // the magic byte prefix and consume it from the input file. + trailing_helper("files/good-1-v1-trailing-2.lz", hello_world_crc, + trailing_garbage_crc); + + // Expect LZMA_BUF error if a file ends with the lzip magic bytes + // but does not contain any data after + decode_expect_error("files/bad-1-v1-trailing-magic.lz", + LZMA_BUF_ERROR); +} + + +static void +test_concatenated(void) +{ + // First test a file with one v0 member and one v1 member + // The first member should contain "Hello\n" and + // the second member should contain "World!\n" + lzma_stream strm = LZMA_STREAM_INIT; + size_t file_size; + uint8_t *v0_v1 = tuktest_file_from_srcdir("files/good-2-v0-v1.lz", + &file_size); + + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED), LZMA_OK); + + uint8_t output_buffer[DECODE_CHUNK_SIZE]; + + strm.next_in = v0_v1; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + + assert_uint_eq(strm.total_in, file_size); + + uint32_t checksum = lzma_crc32(output_buffer, strm.total_out, 0); + assert_uint_eq(checksum, hello_world_crc); + + // The second file contains one v1 member and one v2 member + uint8_t *v1_v0 = tuktest_file_from_srcdir("files/good-2-v1-v0.lz", + &file_size); + + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED), LZMA_OK); + + strm.next_in = v1_v0; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + + assert_uint_eq(strm.total_in, file_size); + checksum = lzma_crc32(output_buffer, strm.total_out, 0); + assert_uint_eq(checksum, hello_world_crc); + + // The third file contains 2 v1 members + uint8_t *v1_v1 = tuktest_file_from_srcdir("files/good-2-v1-v1.lz", + &file_size); + + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED), LZMA_OK); + + strm.next_in = v1_v1; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + + assert_uint_eq(strm.total_in, file_size); + checksum = lzma_crc32(output_buffer, strm.total_out, 0); + assert_uint_eq(checksum, hello_world_crc); + + lzma_end(&strm); +} + + +static void +test_crc(void) +{ + // Test invalid checksum + lzma_stream strm = LZMA_STREAM_INIT; + size_t file_size; + uint8_t *data = tuktest_file_from_srcdir("files/bad-1-v1-crc32.lz", + &file_size); + + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED), LZMA_OK); + + uint8_t output_buffer[DECODE_CHUNK_SIZE]; + + strm.next_in = data; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_DATA_ERROR); + + // Test ignoring the checksum value - should decode successfully + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED | LZMA_IGNORE_CHECK), LZMA_OK); + + strm.next_in = data; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + assert_uint_eq(strm.total_in, file_size); + + // Test tell check + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, + LZMA_CONCATENATED | LZMA_TELL_ANY_CHECK), LZMA_OK); + + strm.next_in = data; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_GET_CHECK); + assert_uint_eq(lzma_get_check(&strm), LZMA_CHECK_CRC32); + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_DATA_ERROR); + lzma_end(&strm); +} + + +static void +test_invalid_magic_bytes(void) +{ + uint8_t lzip_id_string[] = { 0x4C, 0x5A, 0x49, 0x50 }; + lzma_stream strm = LZMA_STREAM_INIT; + + for (uint32_t i = 0; i < ARRAY_SIZE(lzip_id_string); i++) { + // Corrupt magic bytes + lzip_id_string[i] ^= 1; + uint8_t output_buffer[DECODE_CHUNK_SIZE]; + + assert_lzma_ret(lzma_lzip_decoder(&strm, MEMLIMIT, 0), + LZMA_OK); + + strm.next_in = lzip_id_string; + strm.avail_in = sizeof(lzip_id_string); + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), + LZMA_FORMAT_ERROR); + + // Reset magic bytes + lzip_id_string[i] ^= 1; + } + + lzma_end(&strm); +} + + +static void +test_invalid_version(void) +{ + // The file contains a version number that is not 0 or 1, + // so it should cause an error + decode_expect_error("files/unsupported-1-v234.lz", + LZMA_OPTIONS_ERROR); +} + + +static void +test_invalid_dictionary_size(void) +{ + // The first file has a too small dictionary size field. + decode_expect_error("files/bad-1-v1-dict-1.lz", LZMA_DATA_ERROR); + + // The second file has a too large dictionary size field. + decode_expect_error("files/bad-1-v1-dict-2.lz", LZMA_DATA_ERROR); +} + + +static void +test_invalid_uncomp_size(void) +{ + // Test invalid v0 lzip file uncomp size + decode_expect_error("files/bad-1-v0-uncomp-size.lz", + LZMA_DATA_ERROR); + + // Test invalid v1 lzip file uncomp size + decode_expect_error("files/bad-1-v1-uncomp-size.lz", + LZMA_DATA_ERROR); +} + + +static void +test_invalid_member_size(void) +{ + decode_expect_error("files/bad-1-v1-member-size.lz", + LZMA_DATA_ERROR); +} + + +static void +test_invalid_memlimit(void) +{ + // A very low memlimit should prevent decoding. + // It should be possible to update the memlimit after the error. + size_t file_size; + uint8_t *data = tuktest_file_from_srcdir("files/good-1-v1.lz", + &file_size); + + uint8_t output_buffer[DECODE_CHUNK_SIZE]; + + lzma_stream strm = LZMA_STREAM_INIT; + + assert_lzma_ret(lzma_lzip_decoder(&strm, 1, 0), LZMA_OK); + + strm.next_in = data; + strm.avail_in = file_size; + strm.next_out = output_buffer; + strm.avail_out = sizeof(output_buffer); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_MEMLIMIT_ERROR); + + // Up the memlimit so that decoding can continue. + // First only increase by a small amount and expect an error. + assert_lzma_ret(lzma_memlimit_set(&strm, 100), LZMA_MEMLIMIT_ERROR); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT), LZMA_OK); + + // Finish decoding + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + + assert_uint_eq(strm.total_in, file_size); + uint32_t checksum = lzma_crc32(output_buffer, strm.total_out, 0); + assert_uint_eq(checksum, hello_world_crc); + + lzma_end(&strm); +} +#endif + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + +#ifndef HAVE_LZIP_DECODER + tuktest_early_skip("lzip decoder disabled"); +#else + tuktest_run(test_options); + tuktest_run(test_v0_decode); + tuktest_run(test_v1_decode); + tuktest_run(test_v0_trailing); + tuktest_run(test_v1_trailing); + tuktest_run(test_concatenated); + tuktest_run(test_crc); + tuktest_run(test_invalid_magic_bytes); + tuktest_run(test_invalid_version); + tuktest_run(test_invalid_dictionary_size); + tuktest_run(test_invalid_uncomp_size); + tuktest_run(test_invalid_member_size); + tuktest_run(test_invalid_memlimit); + return tuktest_end(); +#endif +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_memlimit.c b/cpp/third_party/xz-5.8.3/tests/test_memlimit.c new file mode 100644 index 0000000000..7e8f862087 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_memlimit.c @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_memlimit.c +/// \brief Tests memory usage limit in decoders +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" +#include "mythread.h" + + +#define MEMLIMIT_TOO_LOW 1234U +#define MEMLIMIT_HIGH_ENOUGH (2U << 20) + + +static uint8_t *in; +static size_t in_size; + +#ifdef HAVE_DECODERS +static uint8_t out[8192]; +#endif + + +static void +test_memlimit_stream_decoder(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_stream_decoder(&strm, MEMLIMIT_TOO_LOW, 0), + LZMA_OK); + + strm.next_in = in; + strm.avail_in = in_size; + strm.next_out = out; + strm.avail_out = sizeof(out); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_MEMLIMIT_ERROR); + + assert_uint_eq(lzma_memlimit_get(&strm), MEMLIMIT_TOO_LOW); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_TOO_LOW + 1), + LZMA_MEMLIMIT_ERROR); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_HIGH_ENOUGH), + LZMA_OK); + + // This fails before commit 660739f99ab211edec4071de98889fb32ed04e98 + // (liblzma <= 5.2.6, liblzma <= 5.3.3alpha). It was fixed in 5.2.7. + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + + lzma_end(&strm); +#endif +} + + +static void +test_memlimit_stream_decoder_mt(void) +{ +#ifndef MYTHREAD_ENABLED + assert_skip("Threading support disabled"); +#elif !defined(HAVE_DECODERS) + assert_skip("Decoder support disabled"); +#else + lzma_stream strm = LZMA_STREAM_INIT; + lzma_mt mt = { + .flags = 0, + .threads = 1, + .timeout = 0, + .memlimit_threading = 0, + .memlimit_stop = MEMLIMIT_TOO_LOW, + }; + + assert_lzma_ret(lzma_stream_decoder_mt(&strm, &mt), LZMA_OK); + + strm.next_in = in; + strm.avail_in = in_size; + strm.next_out = out; + strm.avail_out = sizeof(out); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_MEMLIMIT_ERROR); + + assert_uint_eq(lzma_memlimit_get(&strm), MEMLIMIT_TOO_LOW); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_TOO_LOW + 1), + LZMA_MEMLIMIT_ERROR); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_HIGH_ENOUGH), + LZMA_OK); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + lzma_end(&strm); +#endif +} + + +static void +test_memlimit_alone_decoder(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + size_t alone_size; + uint8_t *alone_buf = tuktest_file_from_srcdir( + "files/good-unknown_size-with_eopm.lzma", &alone_size); + + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_alone_decoder(&strm, MEMLIMIT_TOO_LOW), LZMA_OK); + + strm.next_in = alone_buf; + strm.avail_in = alone_size; + strm.next_out = out; + strm.avail_out = sizeof(out); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_MEMLIMIT_ERROR); + + assert_uint_eq(lzma_memlimit_get(&strm), MEMLIMIT_TOO_LOW); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_TOO_LOW + 1), + LZMA_MEMLIMIT_ERROR); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_HIGH_ENOUGH), + LZMA_OK); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + lzma_end(&strm); +#endif +} + + +static void +test_memlimit_auto_decoder(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_auto_decoder(&strm, MEMLIMIT_TOO_LOW, 0), + LZMA_OK); + + strm.next_in = in; + strm.avail_in = in_size; + strm.next_out = out; + strm.avail_out = sizeof(out); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_MEMLIMIT_ERROR); + + assert_uint_eq(lzma_memlimit_get(&strm), MEMLIMIT_TOO_LOW); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_TOO_LOW + 1), + LZMA_MEMLIMIT_ERROR); + assert_lzma_ret(lzma_memlimit_set(&strm, MEMLIMIT_HIGH_ENOUGH), + LZMA_OK); + + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + lzma_end(&strm); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + + in = tuktest_file_from_srcdir("files/good-1-check-crc32.xz", &in_size); + + tuktest_run(test_memlimit_stream_decoder); + tuktest_run(test_memlimit_stream_decoder_mt); + tuktest_run(test_memlimit_alone_decoder); + tuktest_run(test_memlimit_auto_decoder); + + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_microlzma.c b/cpp/third_party/xz-5.8.3/tests/test_microlzma.c new file mode 100644 index 0000000000..c1d99d77fc --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_microlzma.c @@ -0,0 +1,568 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_microlzma.c +/// \brief Tests MicroLZMA encoding and decoding +// +// Author: Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + +#define BUFFER_SIZE 1024 + + +#ifdef HAVE_ENCODER_LZMA1 + +// MicroLZMA encoded "Hello\nWorld\n" output size in bytes. +#define ENCODED_OUTPUT_SIZE 17 + +// Byte array of "Hello\nWorld\n". This is used for various encoder tests. +static const uint8_t hello_world[] = { 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x0A, + 0x57, 0x6F, 0x72, 0x6C, 0x64, 0x0A }; + +// This is the CRC32 value of the MicroLZMA encoding of "Hello\nWorld\n". +// The settings used were based on LZMA_PRESET_DEFAULT as of liblzma 5.6.0. +// This assumes MicroLZMA is correct in liblzma 5.6.0, which is safe +// considering the encoded "Hello\nWorld\n" can successfully be decoded at +// this time. This is to test for regressions that cause MicroLZMA output +// to change. +static const uint32_t hello_world_encoded_crc = 0x3CDE40A8; + + +// Function implementation borrowed from lzma_decoder.c. It is needed to +// ensure the first byte of a MicroLZMA stream is set correctly with the +// negation of the LZMA properties. +static bool +lzma_lzma_lclppb_decode(lzma_options_lzma *options, uint8_t byte) +{ + if (byte > (4 * 5 + 4) * 9 + 8) + return true; + + // See the file format specification to understand this. + options->pb = byte / (9 * 5); + byte -= options->pb * 9 * 5; + options->lp = byte / 9; + options->lc = byte - options->lp * 9; + + return options->lc + options->lp > LZMA_LCLP_MAX; +} + + +/////////////////// +// Encoder tests // +/////////////////// + +// This tests a few of the basic options. These options are not unique to +// MicroLZMA in any way, its mostly ensuring that the options are actually +// being checked before initializing the decoder internals. +static void +test_encode_options(void) +{ + lzma_stream strm = LZMA_STREAM_INIT; + lzma_options_lzma opt_lzma; + + // Initialize with default options. + assert_false(lzma_lzma_preset(&opt_lzma, LZMA_PRESET_DEFAULT)); + + // NULL stream + assert_lzma_ret(lzma_microlzma_encoder(NULL, &opt_lzma), + LZMA_PROG_ERROR); + + // lc/lp/pb = 5/0/2 (lc invalid) + opt_lzma.lc = 5; + opt_lzma.lp = 0; + opt_lzma.pb = 2; + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), + LZMA_OPTIONS_ERROR); + + // lc/lp/pb = 0/5/2 (lp invalid) + opt_lzma.lc = 0; + opt_lzma.lp = 5; + opt_lzma.pb = 2; + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), + LZMA_OPTIONS_ERROR); + + // lc/lp/pb = 3/2/2 (lc + lp invalid) + opt_lzma.lc = 3; + opt_lzma.lp = 2; + opt_lzma.pb = 2; + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), + LZMA_OPTIONS_ERROR); + + // lc/lp/pb = 3/0/5 (pb invalid) + opt_lzma.lc = 3; + opt_lzma.lp = 0; + opt_lzma.pb = 5; + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), + LZMA_OPTIONS_ERROR); + + // Zero out lp, pb, lc options to not interfere with later tests. + opt_lzma.lp = 0; + opt_lzma.pb = 0; + opt_lzma.lc = 0; + + // Set invalid dictionary size. + opt_lzma.dict_size = LZMA_DICT_SIZE_MIN - 1; + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), + LZMA_OPTIONS_ERROR); + + // Maximum dictionary size for the encoder, as described in lzma12.h + // is 1.5 GiB. + opt_lzma.dict_size = (UINT32_C(1) << 30) + (UINT32_C(1) << 29) + 1; + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), + LZMA_OPTIONS_ERROR); + + lzma_end(&strm); +} + + +static void +test_encode_basic(void) +{ + lzma_stream strm = LZMA_STREAM_INIT; + lzma_options_lzma opt_lzma; + + // The lzma_lzma_preset return value is inverse of what it perhaps + // should be, that is, it returns false on success. + assert_false(lzma_lzma_preset(&opt_lzma, LZMA_PRESET_DEFAULT)); + + // Initialize the encoder using the default options. + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), LZMA_OK); + + uint8_t output[BUFFER_SIZE]; + + strm.next_in = hello_world; + strm.avail_in = sizeof(hello_world); + strm.next_out = output; + strm.avail_out = sizeof(output); + + // Everything must be encoded in one lzma_code() call. + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + + // Check that the entire input was consumed. + assert_uint_eq(strm.total_in, sizeof(hello_world)); + + // Check that the first byte in the output stream is not 0x00. + // In a regular raw LZMA stream the first byte is always 0x00. + // In MicroLZMA the first byte replaced by the bitwise-negation + // of the LZMA properties. + assert_uint(output[0], !=, 0x00); + + const uint8_t props = ~output[0]; + + lzma_options_lzma test_options; + assert_false(lzma_lzma_lclppb_decode(&test_options, props)); + + assert_uint_eq(opt_lzma.lc, test_options.lc); + assert_uint_eq(opt_lzma.lp, test_options.lp); + assert_uint_eq(opt_lzma.pb, test_options.pb); + + // Compute the check over the output data. This is compared to + // the expected check value. + const uint32_t check_val = lzma_crc32(output, strm.total_out, 0); + + assert_uint_eq(check_val, hello_world_encoded_crc); + + lzma_end(&strm); +} + + +// This tests the behavior when strm.avail_out is so small it cannot hold +// the header plus 1 encoded byte (< 6). +static void +test_encode_small_out(void) +{ + lzma_stream strm = LZMA_STREAM_INIT; + lzma_options_lzma opt_lzma; + + assert_false(lzma_lzma_preset(&opt_lzma, LZMA_PRESET_DEFAULT)); + + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), LZMA_OK); + + uint8_t output[BUFFER_SIZE]; + + strm.next_in = hello_world; + strm.avail_in = sizeof(hello_world); + strm.next_out = output; + strm.avail_out = 5; + + // LZMA_PROG_ERROR is expected when strm.avail_out < 6 + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_PROG_ERROR); + + // The encoder must be reset because coders cannot be used again + // after returning LZMA_PROG_ERROR. + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), LZMA_OK); + + // Reset strm.avail_out to be > 6, but not enough to hold all of the + // compressed data. + strm.avail_out = ENCODED_OUTPUT_SIZE - 1; + + // Encoding should not return an error now. + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + assert_uint(strm.total_in, <, sizeof(hello_world)); + + lzma_end(&strm); +} + + +// LZMA_FINISH is the only supported action. All others must +// return LZMA_PROG_ERROR. +static void +test_encode_actions(void) +{ + lzma_stream strm = LZMA_STREAM_INIT; + lzma_options_lzma opt_lzma; + + assert_false(lzma_lzma_preset(&opt_lzma, LZMA_PRESET_DEFAULT)); + + const lzma_action actions[] = { + LZMA_RUN, + LZMA_SYNC_FLUSH, + LZMA_FULL_FLUSH, + LZMA_FULL_BARRIER, + }; + + for (size_t i = 0; i < ARRAY_SIZE(actions); ++i) { + assert_lzma_ret(lzma_microlzma_encoder(&strm, &opt_lzma), + LZMA_OK); + + uint8_t output[BUFFER_SIZE]; + + strm.next_in = hello_world; + strm.avail_in = sizeof(hello_world); + strm.next_out = output; + strm.avail_out = sizeof(output); + + assert_lzma_ret(lzma_code(&strm, actions[i]), + LZMA_PROG_ERROR); + } + + lzma_end(&strm); +} +#endif // HAVE_ENCODER_LZMA1 + + +/////////////////// +// Decoder tests // +/////////////////// + +#if defined(HAVE_DECODER_LZMA1) && defined(HAVE_ENCODER_LZMA1) + +// Byte array of "Goodbye World!". This is used for various decoder tests. +static const uint8_t goodbye_world[] = { 0x47, 0x6F, 0x6F, 0x64, 0x62, + 0x79, 0x65, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64, 0x21 }; + +static uint8_t *goodbye_world_encoded = NULL; +static size_t goodbye_world_encoded_size = 0; + + +// Helper function to encode data and return the compressed size. +static size_t +basic_microlzma_encode(const uint8_t *input, size_t in_size, + uint8_t **compressed) +{ + lzma_stream strm = LZMA_STREAM_INIT; + lzma_options_lzma opt_lzma; + + // Lazy way to set the output size since the input should never + // inflate by much in these simple test cases. This is tested to + // be large enough after encoding to fit the entire input, so if + // this assumption does not hold then this will fail. + const size_t out_size = in_size << 1; + + *compressed = tuktest_malloc(out_size); + + // Always encode with the default options for simplicity. + if (lzma_lzma_preset(&opt_lzma, LZMA_PRESET_DEFAULT)) + goto decoder_setup_error; + + if (lzma_microlzma_encoder(&strm, &opt_lzma) != LZMA_OK) + goto decoder_setup_error; + + strm.next_in = input; + strm.avail_in = in_size; + strm.next_out = *compressed; + strm.avail_out = out_size; + + if (lzma_code(&strm, LZMA_FINISH) != LZMA_STREAM_END) + goto decoder_setup_error; + + // Check that the entire input was consumed and that it fit into + // the output buffer. + if (strm.total_in != in_size) + goto decoder_setup_error; + + lzma_end(&strm); + + // lzma_end() doesn't touch other members of lzma_stream than + // lzma_stream.internal so using strm.total_out here is fine. + return strm.total_out; + +decoder_setup_error: + tuktest_error("Failed to initialize decoder tests"); + return 0; +} + + +static void +test_decode_options(void) +{ + // NULL stream + assert_lzma_ret(lzma_microlzma_decoder(NULL, BUFFER_SIZE, + sizeof(hello_world), true, + LZMA_DICT_SIZE_DEFAULT), LZMA_PROG_ERROR); + + // Uncompressed size larger than max + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_microlzma_decoder(&strm, BUFFER_SIZE, + LZMA_VLI_MAX + 1, true, LZMA_DICT_SIZE_DEFAULT), + LZMA_OPTIONS_ERROR); +} + + +// Test that decoding succeeds when uncomp_size is correct regardless of +// the value of uncomp_size_is_exact. +static void +test_decode_uncomp_size_is_exact(void) +{ + lzma_stream strm = LZMA_STREAM_INIT; + + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size, + sizeof(goodbye_world), true, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + uint8_t output[BUFFER_SIZE]; + + strm.next_in = goodbye_world_encoded; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); + assert_uint_eq(strm.total_in, goodbye_world_encoded_size); + + assert_uint_eq(strm.total_out, sizeof(goodbye_world)); + assert_array_eq(goodbye_world, output, sizeof(goodbye_world)); + + // Reset decoder with uncomp_size_is_exact set to false and + // uncomp_size set to correct value. Also test using the + // uncompressed size as the dictionary size. + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size, + sizeof(goodbye_world), false, + sizeof(goodbye_world)), LZMA_OK); + + strm.next_in = goodbye_world_encoded; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_STREAM_END); + assert_uint_eq(strm.total_in, goodbye_world_encoded_size); + + assert_uint_eq(strm.total_out, sizeof(goodbye_world)); + assert_array_eq(goodbye_world, output, sizeof(goodbye_world)); + + lzma_end(&strm); +} + + +// This tests decoding when MicroLZMA decoder is called with +// an incorrect uncompressed size. +static void +test_decode_uncomp_size_wrong(void) +{ + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size, + sizeof(goodbye_world) + 1, false, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + uint8_t output[BUFFER_SIZE]; + + strm.next_in = goodbye_world_encoded; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + // LZMA_OK should be returned because the input size given was + // larger than the actual encoded size. The decoder is expecting + // more input to possibly fill the uncompressed size that was set. + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_OK); + + assert_uint_eq(strm.total_out, sizeof(goodbye_world)); + + assert_array_eq(goodbye_world, output, sizeof(goodbye_world)); + + // Next, test with uncomp_size_is_exact set. + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size, + sizeof(goodbye_world) + 1, true, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + strm.next_in = goodbye_world_encoded; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + // No error detected, even though all input was consumed and there + // is more room in the output buffer. + // + // FIXME? LZMA_FINISH tells that no more input is coming and + // the MicroLZMA decoder knows the exact compressed size from + // the initialization as well. So should it return LZMA_DATA_ERROR + // on the first call instead of relying on the generic lzma_code() + // logic to eventually get LZMA_BUF_ERROR? + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_OK); + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_OK); + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_BUF_ERROR); + + assert_uint_eq(strm.total_out, sizeof(goodbye_world)); + assert_array_eq(goodbye_world, output, sizeof(goodbye_world)); + + // Reset stream with uncomp_size smaller than the real + // uncompressed size. + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size, + ARRAY_SIZE(hello_world) - 1, true, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + strm.next_in = goodbye_world_encoded; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + // This case actually results in an error since it decodes the full + // uncompressed size but the range coder is not in the proper state + // for the stream to end. + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_DATA_ERROR); + + lzma_end(&strm); +} + + +static void +test_decode_comp_size_wrong(void) +{ + lzma_stream strm = LZMA_STREAM_INIT; + + // goodbye_world_encoded_size + 1 is safe because extra space was + // allocated for goodbye_world_encoded. The extra space isn't + // initialized but it shouldn't be read either, thus Valgrind + // has to remain happy with this code. + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size + 1, + sizeof(goodbye_world), true, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + uint8_t output[BUFFER_SIZE]; + + strm.next_in = goodbye_world_encoded; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + // When uncomp_size_is_exact is set, the compressed size must be + // correct or else LZMA_DATA_ERROR is returned. + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_DATA_ERROR); + + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size + 1, + sizeof(goodbye_world), false, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + strm.next_in = goodbye_world_encoded; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + // When uncomp_size_is_exact is not set, the decoder does not + // detect when the compressed size is wrong as long as all of the + // expected output has been decoded. This is because the decoder + // assumes that the real uncompressed size might be bigger than + // the specified value and in that case more input might be needed + // as well. + assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_STREAM_END); + + lzma_end(&strm); +} + + +static void +test_decode_bad_lzma_properties(void) +{ + // Alter first byte to encode invalid LZMA properties. + uint8_t *compressed = tuktest_malloc(goodbye_world_encoded_size); + memcpy(compressed, goodbye_world_encoded, goodbye_world_encoded_size); + + // lc=3, lp=2, pb=2 + compressed[0] = (uint8_t)~0x6FU; + + lzma_stream strm = LZMA_STREAM_INIT; + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size, + sizeof(goodbye_world), false, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + uint8_t output[BUFFER_SIZE]; + + strm.next_in = compressed; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_OPTIONS_ERROR); + + // Use valid, but incorrect LZMA properties. + // lc=3, lp=1, pb=2 + compressed[0] = (uint8_t)~0x66; + + assert_lzma_ret(lzma_microlzma_decoder(&strm, + goodbye_world_encoded_size, + ARRAY_SIZE(goodbye_world), true, + LZMA_DICT_SIZE_DEFAULT), LZMA_OK); + + strm.next_in = compressed; + strm.avail_in = goodbye_world_encoded_size; + strm.next_out = output; + strm.avail_out = sizeof(output); + + assert_lzma_ret(lzma_code(&strm, LZMA_RUN), LZMA_DATA_ERROR); + + lzma_end(&strm); +} +#endif + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + +#ifndef HAVE_ENCODER_LZMA1 + tuktest_early_skip("LZMA1 encoder disabled"); +#else + tuktest_run(test_encode_options); + tuktest_run(test_encode_basic); + tuktest_run(test_encode_small_out); + tuktest_run(test_encode_actions); + + // MicroLZMA decoder tests require the basic encoder functionality. +# ifdef HAVE_DECODER_LZMA1 + goodbye_world_encoded_size = basic_microlzma_encode(goodbye_world, + sizeof(goodbye_world), &goodbye_world_encoded); + + tuktest_run(test_decode_options); + tuktest_run(test_decode_uncomp_size_is_exact); + tuktest_run(test_decode_uncomp_size_wrong); + tuktest_run(test_decode_comp_size_wrong); + tuktest_run(test_decode_bad_lzma_properties); +# endif + + return tuktest_end(); +#endif +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_scripts.sh b/cpp/third_party/xz-5.8.3/tests/test_scripts.sh new file mode 100755 index 0000000000..ca9600ec1f --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_scripts.sh @@ -0,0 +1,82 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +############################################################################### +# +# Author: Jonathan Nieder +# +############################################################################### + +# If scripts weren't built, this test is skipped. +# When this is run from CMake, $1 is a relative path +# to the directory with the executables and the scripts. +XZ=${1:-../src/xz}/xz +XZDIFF=${1:-../src/scripts}/xzdiff +XZGREP=${1:-../src/scripts}/xzgrep + +for i in XZ XZDIFF XZGREP; do + eval test -x "\$$i" && continue + exit 77 +done + +# If decompression support is missing, this test is skipped. +# Installing the scripts in this case is a bit silly but they +# could still be used with other decompression tools so configure +# doesn't automatically disable scripts if decoders are disabled. +if test ! -f ../config.h \ + || grep 'define HAVE_DECODERS' ../config.h > /dev/null ; then + : +else + echo "Decompression support is disabled, skipping this test." + exit 77 +fi + +PATH=`pwd`/${1:-../src/xz}:$PATH +export PATH + +test -z "$srcdir" && srcdir=. +preimage=$srcdir/files/good-1-check-crc32.xz +samepostimage=$srcdir/files/good-1-check-crc64.xz +otherpostimage=$srcdir/files/good-1-lzma2-1.xz + +"$XZDIFF" "$preimage" "$samepostimage" >/dev/null +status=$? +if test "$status" != 0 ; then + echo "xzdiff with no changes exited with status $status != 0" + exit 1 +fi + +"$XZDIFF" "$preimage" "$otherpostimage" >/dev/null +status=$? +if test "$status" != 1 ; then + echo "xzdiff with changes exited with status $status != 1" + exit 1 +fi + +"$XZDIFF" "$preimage" "$srcdir/files/missing.xz" >/dev/null 2>&1 +status=$? +if test "$status" != 2 ; then + echo "xzdiff with missing operand exited with status $status != 2" + exit 1 +fi + +# The exit status must be 0 when a match was found at least from one file, +# and 1 when no match was found in any file. +cp "$srcdir/files/good-1-lzma2-1.xz" xzgrep_test_1.xz +cp "$srcdir/files/good-2-lzma2.xz" xzgrep_test_2.xz +for pattern in el Hello NOMATCH; do + for opts in "" "-l" "-h" "-H"; do + echo "=> xzgrep $opts $pattern <=" + "$XZGREP" $opts $pattern xzgrep_test_1.xz xzgrep_test_2.xz + echo retval $? + done +done > xzgrep_test_output 2>&1 + +if cmp -s "$srcdir/xzgrep_expected_output" xzgrep_test_output ; then + : +else + echo "unexpected output from xzgrep" + exit 1 +fi + +exit 0 diff --git a/cpp/third_party/xz-5.8.3/tests/test_stream_flags.c b/cpp/third_party/xz-5.8.3/tests/test_stream_flags.c new file mode 100644 index 0000000000..3bc48be071 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_stream_flags.c @@ -0,0 +1,478 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_stream_flags.c +/// \brief Tests Stream Header and Stream Footer coders +// +// Authors: Jia Tan +// Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + + +// Size of the Stream Flags field +// (taken from src/liblzma/common/stream_flags_common.h) +#define XZ_STREAM_FLAGS_SIZE 2 + +#ifdef HAVE_ENCODERS +// Header and footer magic bytes for .xz file format +// (taken from src/liblzma/common/stream_flags_common.c) +static const uint8_t xz_header_magic[6] + = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 }; +static const uint8_t xz_footer_magic[2] = { 0x59, 0x5A }; +#endif + + +#ifdef HAVE_ENCODERS +static void +stream_header_encode_helper(lzma_check check) +{ + lzma_stream_flags flags = { + .version = 0, + .check = check, + }; + + uint8_t header[LZMA_STREAM_HEADER_SIZE]; + + // Encode Stream Header + assert_lzma_ret(lzma_stream_header_encode(&flags, header), LZMA_OK); + + // Stream Header must start with Header Magic Bytes + const uint32_t magic_size = sizeof(xz_header_magic); + assert_array_eq(header, xz_header_magic, magic_size); + + // Next must come Stream Flags + const uint8_t *encoded_stream_flags = header + magic_size; + + // First byte is always null-byte. + // Second byte must have the Check ID in the lowest four bits + // and the highest four bits zero. + const uint8_t expected_stream_flags[] = { 0, check }; + assert_array_eq(encoded_stream_flags, expected_stream_flags, + XZ_STREAM_FLAGS_SIZE); + + // Last part is the CRC32 of the Stream Flags + const uint8_t *crc_ptr = encoded_stream_flags + XZ_STREAM_FLAGS_SIZE; + const uint32_t expected_crc = lzma_crc32(expected_stream_flags, + XZ_STREAM_FLAGS_SIZE, 0); + assert_uint_eq(read32le(crc_ptr), expected_crc); +} +#endif + + +static void +test_lzma_stream_header_encode(void) +{ +#ifndef HAVE_ENCODERS + assert_skip("Encoder support disabled"); +#else + for (lzma_check i = 0; i < LZMA_CHECK_ID_MAX; i++) + stream_header_encode_helper(i); + + lzma_stream_flags flags = { + .version = 0, + .check = LZMA_CHECK_CRC32 + }; + + uint8_t header[LZMA_STREAM_HEADER_SIZE]; + + // Should fail if version > 0 + flags.version = 1; + assert_lzma_ret(lzma_stream_header_encode(&flags, header), + LZMA_OPTIONS_ERROR); + flags.version = 0; + + // Should fail if Check ID is invalid + flags.check = INVALID_LZMA_CHECK_ID; + assert_lzma_ret(lzma_stream_header_encode(&flags, header), + LZMA_PROG_ERROR); + flags.check = LZMA_CHECK_CRC32; + + // Should pass even if Backward Size is invalid + // because Stream Header doesn't have that field. + flags.backward_size = LZMA_VLI_MAX + 1; + assert_lzma_ret(lzma_stream_header_encode(&flags, header), LZMA_OK); +#endif +} + + +#if defined(HAVE_ENCODERS) +static void +stream_footer_encode_helper(lzma_check check) +{ + lzma_stream_flags flags = { + .version = 0, + .check = check, + .backward_size = LZMA_BACKWARD_SIZE_MIN, + }; + + uint8_t footer[LZMA_STREAM_HEADER_SIZE]; + + // Encode Stream Footer + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), LZMA_OK); + + // Stream Footer must start with CRC32 + const uint32_t crc = read32le(footer); + const uint32_t expected_crc = lzma_crc32(footer + sizeof(uint32_t), + LZMA_STREAM_HEADER_SIZE - (sizeof(uint32_t) + + sizeof(xz_footer_magic)), 0); + assert_uint_eq(crc, expected_crc); + + // Next the Backward Size + const uint32_t backwards_size = read32le(footer + sizeof(uint32_t)); + const uint32_t expected_backwards_size = flags.backward_size / 4 - 1; + assert_uint_eq(backwards_size, expected_backwards_size); + + // Next the Stream Flags + const uint8_t *stream_flags = footer + sizeof(uint32_t) * 2; + + // First byte must be null + assert_uint_eq(stream_flags[0], 0); + + // Second byte must have the Check ID in the lowest four bits + // and the highest four bits zero. + assert_uint_eq(stream_flags[1], check); + + // And ends with Footer Magic Bytes + const uint8_t *expected_footer_magic = stream_flags + + XZ_STREAM_FLAGS_SIZE; + assert_array_eq(expected_footer_magic, xz_footer_magic, + sizeof(xz_footer_magic)); +} +#endif + + +static void +test_lzma_stream_footer_encode(void) +{ +#ifndef HAVE_ENCODERS + assert_skip("Encoder support disabled"); +#else + for (lzma_check i = 0; i < LZMA_CHECK_ID_MAX; i++) + stream_footer_encode_helper(i); + + lzma_stream_flags flags = { + .version = 0, + .backward_size = LZMA_BACKWARD_SIZE_MIN, + .check = LZMA_CHECK_CRC32 + }; + + uint8_t footer[LZMA_STREAM_HEADER_SIZE]; + + // Should fail if version > 0 + flags.version = 1; + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), + LZMA_OPTIONS_ERROR); + flags.version = 0; + + // Should fail if Check ID is invalid + flags.check = INVALID_LZMA_CHECK_ID; + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), + LZMA_PROG_ERROR); + + // Should fail if Backward Size is invalid + flags.backward_size -= 1; + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), + LZMA_PROG_ERROR); + flags.backward_size += 2; + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), + LZMA_PROG_ERROR); + flags.backward_size = LZMA_BACKWARD_SIZE_MAX + 4; + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), + LZMA_PROG_ERROR); +#endif +} + + +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +static void +stream_header_decode_helper(lzma_check check) +{ + lzma_stream_flags flags = { + .version = 0, + .check = check + }; + + uint8_t header[LZMA_STREAM_HEADER_SIZE]; + + assert_lzma_ret(lzma_stream_header_encode(&flags, header), LZMA_OK); + + lzma_stream_flags dest_flags; + assert_lzma_ret(lzma_stream_header_decode(&dest_flags, header), + LZMA_OK); + + // Version should be 0 + assert_uint_eq(dest_flags.version, 0); + + // Backward Size should be LZMA_VLI_UNKNOWN + assert_uint_eq(dest_flags.backward_size, LZMA_VLI_UNKNOWN); + + // Check ID must equal the argument given to this function. + assert_uint_eq(dest_flags.check, check); +} +#endif + + +static void +test_lzma_stream_header_decode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + for (lzma_check i = 0; i < LZMA_CHECK_ID_MAX; i++) + stream_header_decode_helper(i); + + lzma_stream_flags flags = { + .version = 0, + .check = LZMA_CHECK_CRC32 + }; + + uint8_t header[LZMA_STREAM_HEADER_SIZE]; + lzma_stream_flags dest; + + // First encode known flags to header buffer + assert_lzma_ret(lzma_stream_header_encode(&flags, header), LZMA_OK); + + // Should fail if magic bytes do not match + header[0] ^= 1; + assert_lzma_ret(lzma_stream_header_decode(&dest, header), + LZMA_FORMAT_ERROR); + header[0] ^= 1; + + // Should fail if a reserved bit is set + uint8_t *stream_flags = header + sizeof(xz_header_magic); + stream_flags[0] = 1; + + // Need to adjust CRC32 after making a change since the CRC32 + // is verified before decoding the Stream Flags field. + uint8_t *crc32_ptr = header + sizeof(xz_header_magic) + + XZ_STREAM_FLAGS_SIZE; + const uint32_t crc_orig = read32le(crc32_ptr); + uint32_t new_crc32 = lzma_crc32( + stream_flags, XZ_STREAM_FLAGS_SIZE, 0); + write32le(crc32_ptr, new_crc32); + assert_lzma_ret(lzma_stream_header_decode(&dest, header), + LZMA_OPTIONS_ERROR); + stream_flags[0] = 0; + write32le(crc32_ptr, crc_orig); + + // Should fail if upper bits of check ID are set + stream_flags[1] |= 0xF0; + new_crc32 = lzma_crc32(stream_flags, XZ_STREAM_FLAGS_SIZE, 0); + write32le(crc32_ptr, new_crc32); + assert_lzma_ret(lzma_stream_header_decode(&dest, header), + LZMA_OPTIONS_ERROR); + stream_flags[1] = flags.check; + write32le(crc32_ptr, crc_orig); + + // Should fail if CRC32 does not match. + // First, alter a byte in the Stream Flags. + stream_flags[0] = 1; + assert_lzma_ret(lzma_stream_header_decode(&dest, header), + LZMA_DATA_ERROR); + stream_flags[0] = 0; + + // Next, change the CRC32. + *crc32_ptr ^= 1; + assert_lzma_ret(lzma_stream_header_decode(&dest, header), + LZMA_DATA_ERROR); +#endif +} + + +#if defined(HAVE_ENCODERS) && defined(HAVE_DECODERS) +static void +stream_footer_decode_helper(lzma_check check) +{ + lzma_stream_flags flags = { + .version = 0, + .backward_size = LZMA_BACKWARD_SIZE_MIN, + .check = check, + }; + + uint8_t footer[LZMA_STREAM_HEADER_SIZE]; + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), LZMA_OK); + + lzma_stream_flags dest_flags; + assert_lzma_ret(lzma_stream_footer_decode(&dest_flags, footer), + LZMA_OK); + + // Version should be 0. + assert_uint_eq(dest_flags.version, 0); + + // Backward Size should equal the value from the flags. + assert_uint_eq(dest_flags.backward_size, flags.backward_size); + + // Check ID must equal argument given to this function. + assert_uint_eq(dest_flags.check, check); +} +#endif + + +static void +test_lzma_stream_footer_decode(void) +{ +#if !defined(HAVE_ENCODERS) || !defined(HAVE_DECODERS) + assert_skip("Encoder or decoder support disabled"); +#else + for (lzma_check i = 0; i < LZMA_CHECK_ID_MAX; i++) + stream_footer_decode_helper(i); + + lzma_stream_flags flags = { + .version = 0, + .check = LZMA_CHECK_CRC32, + .backward_size = LZMA_BACKWARD_SIZE_MIN + }; + + uint8_t footer[LZMA_STREAM_HEADER_SIZE]; + lzma_stream_flags dest; + + // First encode known flags to the footer buffer + assert_lzma_ret(lzma_stream_footer_encode(&flags, footer), LZMA_OK); + + // Should fail if magic bytes do not match + footer[LZMA_STREAM_HEADER_SIZE - 1] ^= 1; + assert_lzma_ret(lzma_stream_footer_decode(&dest, footer), + LZMA_FORMAT_ERROR); + footer[LZMA_STREAM_HEADER_SIZE - 1] ^= 1; + + // Should fail if a reserved bit is set. + // In the Stream Footer, the Stream Flags follow the CRC32 (4 bytes) + // and the Backward Size (4 bytes) + uint8_t *stream_flags = footer + sizeof(uint32_t) * 2; + stream_flags[0] = 1; + + // Need to adjust the CRC32 so it will not fail that check instead + uint8_t *crc32_ptr = footer; + const uint32_t crc_orig = read32le(crc32_ptr); + uint8_t *backward_size = footer + sizeof(uint32_t); + uint32_t new_crc32 = lzma_crc32(backward_size, sizeof(uint32_t) + + XZ_STREAM_FLAGS_SIZE, 0); + write32le(crc32_ptr, new_crc32); + assert_lzma_ret(lzma_stream_footer_decode(&dest, footer), + LZMA_OPTIONS_ERROR); + stream_flags[0] = 0; + write32le(crc32_ptr, crc_orig); + + // Should fail if upper bits of check ID are set + stream_flags[1] |= 0xF0; + new_crc32 = lzma_crc32(backward_size, sizeof(uint32_t) + + XZ_STREAM_FLAGS_SIZE, 0); + write32le(crc32_ptr, new_crc32); + assert_lzma_ret(lzma_stream_footer_decode(&dest, footer), + LZMA_OPTIONS_ERROR); + stream_flags[1] = flags.check; + write32le(crc32_ptr, crc_orig); + + // Should fail if CRC32 does not match. + // First, alter a byte in the Stream Flags. + stream_flags[0] = 1; + assert_lzma_ret(lzma_stream_footer_decode(&dest, footer), + LZMA_DATA_ERROR); + stream_flags[0] = 0; + + // Next, change the CRC32 + *crc32_ptr ^= 1; + assert_lzma_ret(lzma_stream_footer_decode(&dest, footer), + LZMA_DATA_ERROR); +#endif +} + + +static void +test_lzma_stream_flags_compare(void) +{ + lzma_stream_flags first = { + .version = 0, + .backward_size = LZMA_BACKWARD_SIZE_MIN, + .check = LZMA_CHECK_CRC32, + }; + + lzma_stream_flags second = first; + + // First test should pass + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), LZMA_OK); + + // Altering either version should cause an error + first.version = 1; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_OPTIONS_ERROR); + second.version = 1; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_OPTIONS_ERROR); + first.version = 0; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_OPTIONS_ERROR); + second.version = 0; + + // Check types must be under the maximum + first.check = INVALID_LZMA_CHECK_ID; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_PROG_ERROR); + second.check = INVALID_LZMA_CHECK_ID; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_PROG_ERROR); + first.check = LZMA_CHECK_CRC32; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_PROG_ERROR); + second.check = LZMA_CHECK_CRC32; + + // Check types must be equal + for (lzma_check i = 0; i < LZMA_CHECK_ID_MAX; i++) { + first.check = i; + if (i == second.check) + assert_lzma_ret(lzma_stream_flags_compare(&first, + &second), LZMA_OK); + else + assert_lzma_ret(lzma_stream_flags_compare(&first, + &second), LZMA_DATA_ERROR); + } + first.check = LZMA_CHECK_CRC32; + + // Backward Size comparison is skipped if either are LZMA_VLI_UNKNOWN + first.backward_size = LZMA_VLI_UNKNOWN; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), LZMA_OK); + second.backward_size = LZMA_VLI_MAX + 1; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), LZMA_OK); + second.backward_size = LZMA_BACKWARD_SIZE_MIN; + + // Backward Sizes need to be valid + first.backward_size = LZMA_VLI_MAX + 4; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_PROG_ERROR); + second.backward_size = LZMA_VLI_MAX + 4; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_PROG_ERROR); + first.backward_size = LZMA_BACKWARD_SIZE_MIN; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_PROG_ERROR); + second.backward_size = LZMA_BACKWARD_SIZE_MIN; + + // Backward Sizes must be equal + second.backward_size = first.backward_size + 4; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_DATA_ERROR); + + // Should fail if Backward Sizes are > LZMA_BACKWARD_SIZE_MAX + // even though they are equal + first.backward_size = LZMA_BACKWARD_SIZE_MAX + 1; + second.backward_size = LZMA_BACKWARD_SIZE_MAX + 1; + assert_lzma_ret(lzma_stream_flags_compare(&first, &second), + LZMA_PROG_ERROR); +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + tuktest_run(test_lzma_stream_header_encode); + tuktest_run(test_lzma_stream_footer_encode); + tuktest_run(test_lzma_stream_header_decode); + tuktest_run(test_lzma_stream_footer_decode); + tuktest_run(test_lzma_stream_flags_compare); + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/test_suffix.sh b/cpp/third_party/xz-5.8.3/tests/test_suffix.sh new file mode 100755 index 0000000000..1859fe4c8a --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_suffix.sh @@ -0,0 +1,192 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +############################################################################### +# +# Author: Jia Tan +# +############################################################################### + +# Optional argument: +# $1 = directory of the xz executable + +# If xz was not built, skip this test. Autotools and CMake put +# the xz executable in a different location. +XZ=${1:-../src/xz}/xz +if test ! -x "$XZ"; then + echo "xz was not built, skipping this test." + exit 77 +fi + +# If compression or decompression support is missing, this test is skipped. +# This isn't perfect because it does not specifically check for LZMA1/2 +# filters. Many of the other tests also assume LZMA1/2 support if encoders +# or decoders are enabled. +if test ! -f ../config.h ; then + : +elif grep 'define HAVE_ENCODERS' ../config.h > /dev/null \ + && grep 'define HAVE_DECODERS' ../config.h > /dev/null ; then + : +else + echo "Compression or decompression support is disabled, skipping this test." + exit 77 +fi + +# Create temporary input file. The file contents are not important. +SUFFIX_INPUT="suffix_temp" +SUFFIX_INPUT_FILES="$SUFFIX_INPUT"_files +SUFFIX_INPUT_FILES0="$SUFFIX_INPUT"_files0 + +# Remove possible leftover temporary files +rm -f \ + "$SUFFIX_INPUT" \ + "$SUFFIX_INPUT.foo" \ + "$SUFFIX_INPUT_FILES" \ + "$SUFFIX_INPUT_FILES" + +echo "foobar" > "$SUFFIX_INPUT" + +# Test basic suffix when compressing with raw format. +if "$XZ" -zfk --suffix=".foo" -Fraw --lzma1=preset=0 "$SUFFIX_INPUT" ; then + : +else + echo "Failed to compress a file with a suffix set in raw format" + exit 1 +fi + +# Test the output file is named properly. +if test -f "$SUFFIX_INPUT.foo" ; then + : +else + echo "Raw format compressed output file not named properly" + exit 1 +fi + +# Expect an error when compressing with raw format without a suffix +if "$XZ" -zfk -Fraw --lzma1=preset=0 "$SUFFIX_INPUT" 2> /dev/null; then + echo "Error not reported when compressing in raw format without a suffix" + exit 1 +fi + +# Expect an error when decompressing with raw format without a suffix +if "$XZ" -df -Fraw --lzma1=preset=0 "$SUFFIX_INPUT.foo" 2> /dev/null; then + echo "Error not reported when decompressing in raw format without a suffix" + exit 1 +fi + +# Test basic decompression with raw format and a suffix. This will also +# delete $SUFFIX_INPUT.foo +if "$XZ" -df --suffix=".foo" -Fraw --lzma1=preset=0 "$SUFFIX_INPUT.foo"; then + : +else + echo "Failed to decompress a file with a suffix set in raw format" + exit 1 +fi + +# Test basic compression with .xz format and a suffix +if "$XZ" -zfk --suffix=".foo" --lzma2=preset=0 "$SUFFIX_INPUT" ; then + : +else + echo "Failed to compress a file with a suffix set in .xz format" + exit 1 +fi + +# Test the output file is named properly. +if test -f "$SUFFIX_INPUT.foo" ; then + : +else + echo ".xz format compressed output file named properly" + exit 1 +fi + +# This will delete $SUFFIX_INPUT.foo +if "$XZ" -df --suffix=".foo" "$SUFFIX_INPUT.foo"; then + : +else + echo "Failed to decompress a file with a suffix set in .xz format" + exit 1 +fi + +# Test reading from stdin in raw mode. This was broken in +# cc5aa9ab138beeecaee5a1e81197591893ee9ca0 and fixed in +# 837ea40b1c9d4998cac4500b55171bf33e0c31a6 +if echo foo | "$XZ" -Fraw --lzma1=preset=0 > /dev/null ; then + : +else + echo "Implicit write to stdout not detected" + exit 1 +fi + +# Create two temporary files to be used with --files and --files0. +printf '%s\n' "$SUFFIX_INPUT" > "$SUFFIX_INPUT_FILES" +printf '%s\0' "$SUFFIX_INPUT" > "$SUFFIX_INPUT_FILES0" + +# Test proper handling of --files/--files0 when no suffix is set. This +# must result in an error because xz does not know how to rename the output +# file from the input files. This caused a segmentation fault due to a +# mistake in f481523baac946fa3bc13d79186ffaf0c0b818a7, which was fixed by +# 0a601ddc89fd7e1370807c6b58964f361dfcd34a. +if "$XZ" -Fraw --lzma1=preset=0 --files="$SUFFIX_INPUT_FILES" 2> /dev/null ; then + echo "Failed to report error when compressing a file specified by --files in raw mode without a suffix" + exit 1 +fi + +if "$XZ" -Fraw --lzma1=preset=0 --files0="$SUFFIX_INPUT_FILES0" 2> /dev/null ; then + echo "Failed to report error when compressing a file specified by --files0 in raw mode without a suffix" + exit 1 +fi + +# Test proper suffix usage in raw mode with --files and --files0. +if "$XZ" -zfk -Fraw --lzma1=preset=0 --suffix=.foo --files="$SUFFIX_INPUT_FILES" ; then + : +else + echo "Error compressing a file specified by --files in raw mode with a suffix set" + exit 1 +fi + +if test -f "$SUFFIX_INPUT.foo" ; then + : +else + echo "Entry processed by --files not named properly" + exit 1 +fi + +# Remove the artifact so we can be sure the next test executes properly. +rm "$SUFFIX_INPUT.foo" + +if "$XZ" -zfk -Fraw --lzma1=preset=0 --suffix=.foo --files0="$SUFFIX_INPUT_FILES0" ; then + : +else + echo "Error compressing a file specified by --files0 in raw mode with a suffix set" + exit 1 +fi + +if test -f "$SUFFIX_INPUT.foo" ; then + : +else + echo "Entry processed by --files0 not named properly" + exit 1 +fi + +# When the file type cannot be determined by xz, it will copy the contents +# of the file only if -c,--stdout is used. This was broken by +# 837ea40b1c9d4998cac4500b55171bf33e0c31a6 and fixed by +# f481523baac946fa3bc13d79186ffaf0c0b818a7. +if echo foo | "$XZ" -df > /dev/null 2>&1; then + echo "Failed to report error when decompressing unknown file type without -c,--stdout" + exit 1 +fi + +if echo foo | "$XZ" -dfc > /dev/null; then + : +else + echo "Failed to copy input to standard out when decompressing unknown file type with -c,--stdout" + exit 1 +fi + +# Remove remaining test artifacts +rm -f \ + "$SUFFIX_INPUT" \ + "$SUFFIX_INPUT.foo" \ + "$SUFFIX_INPUT_FILES" \ + "$SUFFIX_INPUT_FILES0" diff --git a/cpp/third_party/xz-5.8.3/tests/test_vli.c b/cpp/third_party/xz-5.8.3/tests/test_vli.c new file mode 100644 index 0000000000..51487dcf14 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/test_vli.c @@ -0,0 +1,323 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file test_vli.c +/// \brief Tests liblzma vli functions +// +// Author: Jia Tan +// +/////////////////////////////////////////////////////////////////////////////// + +#include "tests.h" + + +// Pre-encoded VLI values for testing +// VLI can have between 1 and 9 bytes when encoded +// They are encoded little endian where all but the last +// byte must have the leading 1 bit set +#if defined(HAVE_ENCODERS) || defined(HAVE_DECODERS) +static const uint8_t one_byte[1] = {0x25}; +static const lzma_vli one_byte_value = 37; + +static const uint8_t two_bytes[2] = {0x80, 0x56}; +static const lzma_vli two_byte_value = 11008; + +static const uint8_t three_bytes[3] = {0x99, 0x92, 0x20}; +static const lzma_vli three_byte_value = 526617; + +static const uint8_t four_bytes[4] = {0x97, 0x83, 0x94, 0x47}; +static const lzma_vli four_byte_value = 149225879; + +static const uint8_t five_bytes[5] = {0xA6, 0x92, 0x88, 0x89, 0x32}; +static const lzma_vli five_byte_value = 13440780582; + +static const uint8_t six_bytes[6] = {0xA9, 0x84, 0x99, 0x82, 0x94, 0x12}; +static const lzma_vli six_byte_value = 623848604201; + +static const uint8_t seven_bytes[7] = {0x90, 0x80, 0x90, 0x80, 0x90, 0x80, + 0x79}; +static const lzma_vli seven_byte_value = 532167923073040; + +static const uint8_t eight_bytes[8] = {0x91, 0x87, 0xF2, 0xB2, 0xC2, 0xD2, + 0x93, 0x63}; +static const lzma_vli eight_byte_value = 55818443594433425; + +static const uint8_t nine_bytes[9] = {0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, + 0xE1, 0xF1, 0x1}; +static const lzma_vli nine_byte_value = 136100349976529025; +#endif + + +static void +test_lzma_vli_size(void) +{ + // First test invalid VLI values (should return 0) + // VLI UNKNOWN is an invalid VLI + assert_uint_eq(lzma_vli_size(LZMA_VLI_UNKNOWN), 0); + // Loop over a few VLI values just over the maximum + for (uint64_t i = LZMA_VLI_MAX + 1; i < LZMA_VLI_MAX + 10; i++) + assert_uint_eq(lzma_vli_size(i), 0); + + // Number should increment every seven set bits + lzma_vli vli = 1; + for (uint32_t i = 1; i < LZMA_VLI_BYTES_MAX; i++, vli <<= 7) { + // Test the base value and a few others around it + assert_uint_eq(lzma_vli_size(vli), i); + assert_uint_eq(lzma_vli_size(vli * 2), i); + assert_uint_eq(lzma_vli_size(vli + 10), i); + assert_uint_eq(lzma_vli_size(vli * 3 + 39), i); + } +} + + +#ifdef HAVE_ENCODERS +// Helper function for test_lzma_vli_encode +// Encodes an input VLI and compares against a pre-computed value +static void +encode_single_call_mode(lzma_vli input, const uint8_t *expected, + uint32_t expected_len) +{ + uint8_t out[LZMA_VLI_BYTES_MAX]; + size_t out_pos = 0; + assert_lzma_ret(lzma_vli_encode(input, NULL, out, &out_pos, + expected_len), LZMA_OK); + assert_uint_eq(out_pos, expected_len); + assert_array_eq(out, expected, expected_len); +} + + +// Helper function for test_lzma_vli_encode +// Encodes an input VLI one byte at a time with the multi call +// method. Then compares against a pre-computed value +static void +encode_multi_call_mode(lzma_vli input, const uint8_t *expected, + uint32_t expected_len) +{ + uint8_t out[LZMA_VLI_BYTES_MAX]; + size_t out_pos = 0; + size_t vli_pos = 0; + + for (uint32_t i = 1; i < expected_len; i++) { + assert_lzma_ret(lzma_vli_encode(input, &vli_pos, out, + &out_pos, i), LZMA_OK); + assert_uint_eq(out_pos, i); + assert_uint_eq(vli_pos, i); + } + assert_lzma_ret(lzma_vli_encode(input, &vli_pos, out, &out_pos, + expected_len), LZMA_STREAM_END); + assert_uint_eq(out_pos, expected_len); + assert_uint_eq(vli_pos, expected_len); + assert_array_eq(out, expected, expected_len); +} +#endif + + +static void +test_lzma_vli_encode(void) +{ +#ifndef HAVE_ENCODERS + assert_skip("Encoder support disabled"); +#else + size_t vli_pos = 0; + uint8_t out[LZMA_VLI_BYTES_MAX]; + uint8_t zeros[LZMA_VLI_BYTES_MAX]; + memzero(out, LZMA_VLI_BYTES_MAX); + memzero(zeros, LZMA_VLI_BYTES_MAX); + size_t out_pos = 0; + + // First test invalid input parameters + // VLI invalid + assert_lzma_ret(lzma_vli_encode(LZMA_VLI_UNKNOWN, &vli_pos, out, + &out_pos, sizeof(out)), LZMA_PROG_ERROR); + // Failure should not change params + assert_uint_eq(vli_pos, 0); + assert_uint_eq(out_pos, 0); + assert_array_eq(out, zeros, LZMA_VLI_BYTES_MAX); + + assert_lzma_ret(lzma_vli_encode(LZMA_VLI_MAX + 1, &vli_pos, out, + &out_pos, sizeof(out)), LZMA_PROG_ERROR); + assert_uint_eq(vli_pos, 0); + assert_uint_eq(out_pos, 0); + assert_array_eq(out, zeros, LZMA_VLI_BYTES_MAX); + + // 0 output size + assert_lzma_ret(lzma_vli_encode(one_byte_value, &vli_pos, out, + &out_pos, 0), LZMA_BUF_ERROR); + assert_uint_eq(vli_pos, 0); + assert_uint_eq(out_pos, 0); + assert_array_eq(out, zeros, LZMA_VLI_BYTES_MAX); + + // Size of VLI does not fit in buffer + size_t phony_out_pos = 3; + assert_lzma_ret(lzma_vli_encode(one_byte_value, NULL, out, + &phony_out_pos, 2), LZMA_PROG_ERROR); + + assert_lzma_ret(lzma_vli_encode(LZMA_VLI_MAX / 2, NULL, out, + &out_pos, 2), LZMA_PROG_ERROR); + + // Test single-call mode (using vli_pos as NULL) + encode_single_call_mode(one_byte_value, one_byte, + sizeof(one_byte)); + encode_single_call_mode(two_byte_value, two_bytes, + sizeof(two_bytes)); + encode_single_call_mode(three_byte_value, three_bytes, + sizeof(three_bytes)); + encode_single_call_mode(four_byte_value, four_bytes, + sizeof(four_bytes)); + encode_single_call_mode(five_byte_value, five_bytes, + sizeof(five_bytes)); + encode_single_call_mode(six_byte_value, six_bytes, + sizeof(six_bytes)); + encode_single_call_mode(seven_byte_value, seven_bytes, + sizeof(seven_bytes)); + encode_single_call_mode(eight_byte_value, eight_bytes, + sizeof(eight_bytes)); + encode_single_call_mode(nine_byte_value, nine_bytes, + sizeof(nine_bytes)); + + // Test multi-call mode + encode_multi_call_mode(one_byte_value, one_byte, + sizeof(one_byte)); + encode_multi_call_mode(two_byte_value, two_bytes, + sizeof(two_bytes)); + encode_multi_call_mode(three_byte_value, three_bytes, + sizeof(three_bytes)); + encode_multi_call_mode(four_byte_value, four_bytes, + sizeof(four_bytes)); + encode_multi_call_mode(five_byte_value, five_bytes, + sizeof(five_bytes)); + encode_multi_call_mode(six_byte_value, six_bytes, + sizeof(six_bytes)); + encode_multi_call_mode(seven_byte_value, seven_bytes, + sizeof(seven_bytes)); + encode_multi_call_mode(eight_byte_value, eight_bytes, + sizeof(eight_bytes)); + encode_multi_call_mode(nine_byte_value, nine_bytes, + sizeof(nine_bytes)); +#endif +} + + +#ifdef HAVE_DECODERS +static void +decode_single_call_mode(const uint8_t *input, uint32_t input_len, + lzma_vli expected) +{ + lzma_vli out = 0; + size_t in_pos = 0; + + assert_lzma_ret(lzma_vli_decode(&out, NULL, input, &in_pos, + input_len), LZMA_OK); + assert_uint_eq(in_pos, input_len); + assert_uint_eq(out, expected); +} + + +static void +decode_multi_call_mode(const uint8_t *input, uint32_t input_len, + lzma_vli expected) +{ + lzma_vli out = 0; + size_t in_pos = 0; + size_t vli_pos = 0; + + for (uint32_t i = 1; i < input_len; i++) { + assert_lzma_ret(lzma_vli_decode(&out, &vli_pos, input, + &in_pos, i), LZMA_OK); + assert_uint_eq(in_pos, i); + assert_uint_eq(vli_pos, i); + } + + assert_lzma_ret(lzma_vli_decode(&out, &vli_pos, input, &in_pos, + input_len), LZMA_STREAM_END); + assert_uint_eq(in_pos, input_len); + assert_uint_eq(vli_pos, input_len); + assert_uint_eq(out, expected); +} +#endif + + +static void +test_lzma_vli_decode(void) +{ +#ifndef HAVE_DECODERS + assert_skip("Decoder support disabled"); +#else + lzma_vli out = 0; + size_t in_pos = 0; + + // First test invalid input params + // 0 in_size + assert_lzma_ret(lzma_vli_decode(&out, NULL, one_byte, &in_pos, 0), + LZMA_DATA_ERROR); + assert_uint_eq(out, 0); + assert_uint_eq(in_pos, 0); + + // VLI encoded is invalid (last digit has leading 1 set) + uint8_t invalid_vli[3] = {0x80, 0x80, 0x80}; + assert_lzma_ret(lzma_vli_decode(&out, NULL, invalid_vli, &in_pos, + sizeof(invalid_vli)), LZMA_DATA_ERROR); + + // Bad vli_pos + size_t vli_pos = LZMA_VLI_BYTES_MAX; + assert_lzma_ret(lzma_vli_decode(&out, &vli_pos, invalid_vli, &in_pos, + sizeof(invalid_vli)), LZMA_PROG_ERROR); + + // Bad in_pos + in_pos = sizeof(invalid_vli); + assert_lzma_ret(lzma_vli_decode(&out, &in_pos, invalid_vli, &in_pos, + sizeof(invalid_vli)), LZMA_BUF_ERROR); + + // Test single call mode + decode_single_call_mode(one_byte, sizeof(one_byte), + one_byte_value); + decode_single_call_mode(two_bytes, sizeof(two_bytes), + two_byte_value); + decode_single_call_mode(three_bytes, sizeof(three_bytes), + three_byte_value); + decode_single_call_mode(four_bytes, sizeof(four_bytes), + four_byte_value); + decode_single_call_mode(five_bytes, sizeof(five_bytes), + five_byte_value); + decode_single_call_mode(six_bytes, sizeof(six_bytes), + six_byte_value); + decode_single_call_mode(seven_bytes, sizeof(seven_bytes), + seven_byte_value); + decode_single_call_mode(eight_bytes, sizeof(eight_bytes), + eight_byte_value); + decode_single_call_mode(nine_bytes, sizeof(nine_bytes), + nine_byte_value); + + // Test multi call mode + decode_multi_call_mode(one_byte, sizeof(one_byte), + one_byte_value); + decode_multi_call_mode(two_bytes, sizeof(two_bytes), + two_byte_value); + decode_multi_call_mode(three_bytes, sizeof(three_bytes), + three_byte_value); + decode_multi_call_mode(four_bytes, sizeof(four_bytes), + four_byte_value); + decode_multi_call_mode(five_bytes, sizeof(five_bytes), + five_byte_value); + decode_multi_call_mode(six_bytes, sizeof(six_bytes), + six_byte_value); + decode_multi_call_mode(seven_bytes, sizeof(seven_bytes), + seven_byte_value); + decode_multi_call_mode(eight_bytes, sizeof(eight_bytes), + eight_byte_value); + decode_multi_call_mode(nine_bytes, sizeof(nine_bytes), + nine_byte_value); +#endif +} + + +extern int +main(int argc, char **argv) +{ + tuktest_start(argc, argv); + tuktest_run(test_lzma_vli_size); + tuktest_run(test_lzma_vli_encode); + tuktest_run(test_lzma_vli_decode); + return tuktest_end(); +} diff --git a/cpp/third_party/xz-5.8.3/tests/tests.cmake b/cpp/third_party/xz-5.8.3/tests/tests.cmake new file mode 100644 index 0000000000..9302a5e42e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/tests.cmake @@ -0,0 +1,228 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# Optional file to be included by the top-level CMakeLists.txt to run tests +# +# The CMake rules for the tests are in this separate optional file so +# that it's trivial to just delete the whole "tests" directory and still +# get an otherwise normal CMake-based build. This way it's easy to ensure +# that nothing in the "tests" directory can affect the build process. +# +# Author: Lasse Collin +# +############################################################################# + +include(CTest) + +if(BUILD_TESTING) + ################################ + # Windows Application Manifest # + ################################ + + # On Windows (but not on Cygwin or MSYS2) we want to add the + # application manifest to the test programs so that they are + # run in the same configuration as the programs that are installed. + # The same object file can be used for all test programs. + add_library(tests_w32res OBJECT) + + # CMake requires that even an object library must have at least once + # source file. Give it a header file that results in no output files. + target_sources(tests_w32res PRIVATE tests/tests.h) + + # The Ninja Generator requires setting the linker language since it + # cannot guess the programming language of a header file. + set_target_properties(tests_w32res PROPERTIES LINKER_LANGUAGE C) + + target_include_directories(tests_w32res PRIVATE src/common + src/common + src/liblzma/api + ) + + if(WIN32) + target_sources(tests_w32res PRIVATE tests/tests_w32res.rc) + set_source_files_properties(tests/tests_w32res.rc PROPERTIES + OBJECT_DEPENDS "${W32RES_DEPENDENCIES}" + ) + endif() + + ################# + # liblzma tests # + ################# + + set(LIBLZMA_TESTS + test_bcj_exact_size + test_block_header + test_check + test_filter_flags + test_filter_str + test_hardware + test_index + test_index_hash + test_lzip_decoder + test_memlimit + test_stream_flags + test_vli + ) + + # MicroLZMA encoder is needed for both encoder and decoder tests. + # If MicroLZMA decoder is not configured but LZMA1 decoder is, then + # test_microlzma will fail to compile because this configuration is + # not possible in the Autotools build, so the test was not made to + # support it since it would have required additional changes. + if (XZ_MICROLZMA_ENCODER AND (XZ_MICROLZMA_DECODER + OR NOT "lzma1" IN_LIST DECODERS)) + list(APPEND LIBLZMA_TESTS test_microlzma) + endif() + + foreach(TEST IN LISTS LIBLZMA_TESTS) + add_executable("${TEST}" "tests/${TEST}.c") + + target_include_directories("${TEST}" PRIVATE + src/common + src/liblzma/api + src/liblzma + ) + + target_link_libraries("${TEST}" PRIVATE liblzma tests_w32res) + + # Put the test programs into their own subdirectory so they don't + # pollute the top-level dir which might contain xz and xzdec. + set_target_properties("${TEST}" PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/tests_bin" + ) + + add_test(NAME "${TEST}" + COMMAND "${CMAKE_CURRENT_BINARY_DIR}/tests_bin/${TEST}" + ) + + # Set srcdir environment variable so that the tests find their + # input files from the source tree. + # + # Set the return code for skipped tests to match Automake convention. + set_tests_properties("${TEST}" PROPERTIES + ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}/tests" + SKIP_RETURN_CODE 77 + ) + endforeach() + + + ########################### + # Command line tool tests # + ########################### + + # Since the CMake-based build doesn't use config.h, the test scripts + # cannot grep the contents of config.h to know which features have + # been disabled. When config.h is missing, they assume that all + # features are enabled. Thus, check if certain groups of features have + # been disabled and then possibly skip some of the tests entirely instead + # of letting them fail. + set(SUPPORTED_FILTERS_SORTED "${SUPPORTED_FILTERS}") + list(SORT SUPPORTED_FILTERS_SORTED) + + set(ENCODERS_SORTED "${XZ_ENCODERS}") + list(SORT ENCODERS_SORTED) + + if("${ENCODERS_SORTED}" STREQUAL "${SUPPORTED_FILTERS_SORTED}") + set(HAVE_ALL_ENCODERS ON) + else() + set(HAVE_ALL_ENCODERS OFF) + endif() + + set(DECODERS_SORTED "${XZ_DECODERS}") + list(SORT DECODERS_SORTED) + + if("${DECODERS_SORTED}" STREQUAL "${SUPPORTED_FILTERS_SORTED}") + set(HAVE_ALL_DECODERS ON) + else() + set(HAVE_ALL_DECODERS OFF) + endif() + + set(SUPPORTED_CHECKS_SORTED "${SUPPORTED_CHECKS}") + list(SORT SUPPORTED_CHECKS_SORTED) + + set(XZ_CHECKS_SORTED "${XZ_CHECKS}") + list(SORT XZ_CHECKS_SORTED) + + if("${SUPPORTED_CHECKS_SORTED}" STREQUAL "${XZ_CHECKS_SORTED}") + set(HAVE_ALL_CHECKS ON) + else() + set(HAVE_ALL_CHECKS OFF) + endif() + + # test_scripts.sh only needs LZMA2 decoder and CRC32. + if(ENABLE_SCRIPTS) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_scripts") + + add_test(NAME test_scripts.sh + COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_scripts.sh" ".." + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_scripts" + ) + + set_tests_properties(test_scripts.sh PROPERTIES + ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}/tests" + SKIP_RETURN_CODE 77 + ) + endif() + + # test_suffix.sh only needs LZMA2 encoder and decoder. + if(UNIX AND HAVE_ENCODERS AND HAVE_DECODERS) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_suffix") + + add_test(NAME test_suffix.sh + COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_suffix.sh" ".." + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_suffix" + ) + + set_tests_properties(test_suffix.sh PROPERTIES + SKIP_RETURN_CODE 77 + ) + endif() + + # The test_compress.sh based tests compress and decompress using different + # filters so run it only if all encoders and decoders have been enabled. + if(UNIX AND HAVE_ALL_ENCODERS AND HAVE_ALL_DECODERS) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_compress") + + add_executable(create_compress_files tests/create_compress_files.c) + target_link_libraries(create_compress_files PRIVATE tests_w32res) + target_include_directories(create_compress_files PRIVATE src/common) + set_target_properties(create_compress_files PROPERTIES + RUNTIME_OUTPUT_DIRECTORY test_compress) + + foreach(T compress_generated_abc + compress_generated_text + compress_generated_random) + add_test(NAME "test_${T}" + COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_compress.sh" + "${T}" ".." + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_compress" + ) + + set_tests_properties("test_${T}" PROPERTIES + ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}/tests" + SKIP_RETURN_CODE 77 + ) + endforeach() + endif() + + # test_files.sh decompresses files that use different filters and + # check types so run it only if support for all of them has been enabled. + if(UNIX AND HAVE_ALL_DECODERS AND HAVE_ALL_CHECKS AND XZ_LZIP_DECODER) + # test_files.sh doesn't make any temporary files but it + # must not be run at the top-level build directory because + # it checks if ../config.h exists. We don't want to read + # files outside the build directory! + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_files") + + add_test(NAME test_files.sh + COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_files.sh" ".." + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_files" + ) + + set_tests_properties(test_files.sh PROPERTIES + ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}/tests" + SKIP_RETURN_CODE 77 + ) + endif() +endif() diff --git a/cpp/third_party/xz-5.8.3/tests/tests.h b/cpp/third_party/xz-5.8.3/tests/tests.h new file mode 100644 index 0000000000..f706cab888 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/tests.h @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file tests.h +/// \brief Common definitions for test applications +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef LZMA_TESTS_H +#define LZMA_TESTS_H + +#include "sysdefs.h" +#include "tuklib_integer.h" +#include "lzma.h" +#include "tuktest.h" + + +// Invalid value for the lzma_check enumeration. This must be positive +// but small enough to fit into signed char since the underlying type might +// one some platform be a signed char. +// +// Don't put LZMA_ at the beginning of the name so that it is obvious that +// this constant doesn't come from the API headers. +#define INVALID_LZMA_CHECK_ID ((lzma_check)(LZMA_CHECK_ID_MAX + 1)) + + +// This table and macro allow getting more readable error messages when +// comparing the lzma_ret enumeration values. +static const char enum_strings_lzma_ret[][24] = { + "LZMA_OK", + "LZMA_STREAM_END", + "LZMA_NO_CHECK", + "LZMA_UNSUPPORTED_CHECK", + "LZMA_GET_CHECK", + "LZMA_MEM_ERROR", + "LZMA_MEMLIMIT_ERROR", + "LZMA_FORMAT_ERROR", + "LZMA_OPTIONS_ERROR", + "LZMA_DATA_ERROR", + "LZMA_BUF_ERROR", + "LZMA_PROG_ERROR", + "LZMA_SEEK_NEEDED", +}; + +#define assert_lzma_ret(test_expr, ref_val) \ + assert_enum_eq(test_expr, ref_val, enum_strings_lzma_ret) + + +static const char enum_strings_lzma_check[][24] = { + "LZMA_CHECK_NONE", + "LZMA_CHECK_CRC32", + "LZMA_CHECK_UNKNOWN_2", + "LZMA_CHECK_UNKNOWN_3", + "LZMA_CHECK_CRC64", + "LZMA_CHECK_UNKNOWN_5", + "LZMA_CHECK_UNKNOWN_6", + "LZMA_CHECK_UNKNOWN_7", + "LZMA_CHECK_UNKNOWN_8", + "LZMA_CHECK_UNKNOWN_9", + "LZMA_CHECK_SHA256", + "LZMA_CHECK_UNKNOWN_11", + "LZMA_CHECK_UNKNOWN_12", + "LZMA_CHECK_UNKNOWN_13", + "LZMA_CHECK_UNKNOWN_14", + "LZMA_CHECK_UNKNOWN_15", +}; + +#define assert_lzma_check(test_expr, ref_val) \ + assert_enum_eq(test_expr, ref_val, enum_strings_lzma_check) + +#endif diff --git a/cpp/third_party/xz-5.8.3/tests/tests_w32res.rc b/cpp/third_party/xz-5.8.3/tests/tests_w32res.rc new file mode 100644 index 0000000000..0b6c5250cc --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/tests_w32res.rc @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: 0BSD */ + +/* + * Author: Lasse Collin + */ + +/* + * It's silly to add version info to test programs but GNU windres fails + * if there are no resources to build, which happens with Autotools on + * Cygwin and MSYS2 because otherwise one more Automake conditional would + * be needed. + */ + +#define MY_TYPE VFT_APP +#define MY_NAME "test" +#define MY_SUFFIX ".exe" +#define MY_DESC "Test program" +#include "common_w32res.rc" diff --git a/cpp/third_party/xz-5.8.3/tests/tuktest.h b/cpp/third_party/xz-5.8.3/tests/tuktest.h new file mode 100644 index 0000000000..12abd53246 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/tuktest.h @@ -0,0 +1,1053 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file tuktest.h +/// \brief Helper macros for writing simple test programs +/// \version 2024-02-14 +/// +/// Some inspiration was taken from Seatest by Keith Nicholas and +/// from STest which is a fork of Seatest by Jia Tan. +/// +/// This is standard C99/C11 only and thus should be fairly portable +/// outside POSIX systems too. +/// +/// This supports putting multiple tests in a single test program +/// although it is perfectly fine to have only one test per program. +/// Each test can produce one of these results: +/// - Pass +/// - Fail +/// - Skip +/// - Hard error (the remaining tests, if any, are not run) +/// +/// By default this produces an exit status that is compatible with +/// Automake and Meson, and mostly compatible with CMake.[1] +/// If a test program contains multiple tests, only one exit code can +/// be returned. Of the following, the first match is used: +/// - 99 if any test returned a hard error +/// - stdlib.h's EXIT_FAILURE if at least one test failed +/// - 77 if at least one test was skipped or no tests were run at all +/// - stdlib.h's EXIT_SUCCESS (0 on POSIX); that is, if none of the above +/// are true then there was at least one test to run and none of them +/// failed, was skipped, or returned a hard error. +/// +/// A summary of tests being run and their results are printed to stdout. +/// If you want ANSI coloring for the output, #define TUKTEST_COLOR. +/// If you only want output when something goes wrong, #define TUKTEST_QUIET. +/// +/// The downside of the above mapping is that it cannot indicate if +/// some tests were skipped and some passed. If that is likely to +/// happen it may be better to split into multiple test programs (one +/// test per program) or use the TAP mode described below. +/// +/// By using #define TUKTEST_TAP before #including this file the +/// output will be Test Anything Protocol (TAP) version 12 compatible +/// and the exit status will always be EXIT_SUCCESS. This can be easily +/// used with Automake via its tap-driver.sh. Meson supports TAP natively. +/// TAP's todo-directive isn't supported for now, mostly because it's not +/// trivially convertible to the exit-status reporting method. +/// +/// If TUKTEST_TAP is used, TUKTEST_QUIET and TUKTEST_COLOR are ignored. +/// +/// The main() function may look like this (remember to include config.h +/// or such files too if needed!): +/// +/// #include "tuktest.h" +/// +/// int main(int argc, char **argv) +/// { +/// tuktest_start(argc, argv); +/// +/// if (!is_package_foo_available()) +/// tuktest_early_skip("Optional package foo is not available"); +/// +/// if (!do_common_initializations()) +/// tuktest_error("Error during common initializations"); +/// +/// tuktest_run(testfunc1); +/// tuktest_run(testfunc2); +/// +/// return tuktest_end(); +/// } +/// +/// Using exit(tuktest_end()) as a pair to tuktest_start() is OK too. +/// +/// Each test function called via tuktest_run() should be of type +/// "void testfunc1(void)". The test functions should use the +/// various assert_CONDITION() macros. The current test stops if +/// an assertion fails (this is implemented with setjmp/longjmp). +/// Execution continues from the next test unless the failure was +/// due to assert_error() (indicating a hard error) which makes +/// the program exit() without running any remaining tests. +/// +/// Search for "define assert" in this file to find the explanations +/// of the available assertion macros. +/// +/// IMPORTANT: +/// +/// - The assert_CONDITION() macros may only be used by code that is +/// called via tuktest_run()! This includes the function named in +/// the tuktest_run() call and functions called further from there. +/// (The assert_CONDITION() macros depend on setup code in tuktest_run() +/// and other use results in undefined behavior.) +/// +/// - tuktest_start(), tuktest_early_skip, tuktest_run(), and tuktest_end() +/// must not be used in the tests called via tuktest_run()! (tuktest_end() +/// is called more freely internally by this file but such use isn't part +/// of the API.) +/// +/// - tuktest_error(), tuktest_malloc(), tuktest_free(), +/// tuktest_file_from_srcdir(), and tuktest_file_from_builddir() +/// can be used everywhere after tuktest_start() has been called. +/// (In tests running under tuktest_run(), assert_error() can be used +/// instead of tuktest_error() when a hard error occurs.) +/// +/// - Everything else is for internal use only. +/// +/// Footnotes: +/// +/// [1] As of 2022-06-02: +/// See the Automake manual "info (automake)Scripts-based Testsuites" or: +/// https://www.gnu.org/software/automake/manual/automake.html#Scripts_002dbased-Testsuites +/// +/// Meson: https://mesonbuild.com/Unit-tests.html +/// +/// CMake handles passing and failing tests by default but treats hard +/// errors as regular fails. To make CMake support skipped tests +/// correctly, one has to set the SKIP_RETURN_CODE property for each test: +/// +/// set_tests_properties(foo_test_name PROPERTIES SKIP_RETURN_CODE 77) +/// +/// See: +/// https://cmake.org/cmake/help/latest/command/set_tests_properties.html +/// https://cmake.org/cmake/help/latest/prop_test/SKIP_RETURN_CODE.html +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef TUKTEST_H +#define TUKTEST_H + +#include + +// On some (too) old systems inttypes.h doesn't exist or isn't good enough. +// Include it conditionally so that any portability tricks can be done before +// tuktest.h is included. On any modern system inttypes.h is fine as is. +#ifndef PRIu64 +# include +#endif + +#include +#include +#include +#include + + +#if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define TUKTEST_GNUC_REQ(major, minor) \ + ((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \ + || __GNUC__ > (major)) +#else +# define TUKTEST_GNUC_REQ(major, minor) 0 +#endif + + +// This is silencing warnings about unused functions. Not all test programs +// need all functions from this header. +#if TUKTEST_GNUC_REQ(3, 0) || defined(__clang__) +# define tuktest_maybe_unused __attribute__((__unused__)) +#else +# define tuktest_maybe_unused +#endif + +// We need printf("") so silence the warning about empty format string. +#if TUKTEST_GNUC_REQ(4, 2) || defined(__clang__) +# pragma GCC diagnostic ignored "-Wformat-zero-length" +#endif + + +// Types and printf format macros to use in integer assertions and also for +// printing size_t values (C99's %zu isn't available on very old systems). +typedef int64_t tuktest_int; +typedef uint64_t tuktest_uint; +#define TUKTEST_PRId PRId64 +#define TUKTEST_PRIu PRIu64 +#define TUKTEST_PRIX PRIX64 + + +// When TAP mode isn't used, Automake-compatible exit statuses are used. +#define TUKTEST_EXIT_PASS EXIT_SUCCESS +#define TUKTEST_EXIT_FAIL EXIT_FAILURE +#define TUKTEST_EXIT_SKIP 77 +#define TUKTEST_EXIT_ERROR 99 + + +enum tuktest_result { + TUKTEST_PASS, + TUKTEST_FAIL, + TUKTEST_SKIP, + TUKTEST_ERROR, +}; + + +#ifdef TUKTEST_TAP +# undef TUKTEST_QUIET +# undef TUKTEST_COLOR +# undef TUKTEST_TAP +# define TUKTEST_TAP 1 +# define TUKTEST_STR_PASS "ok -" +# define TUKTEST_STR_FAIL "not ok -" +# define TUKTEST_STR_SKIP "ok - # SKIP" +# define TUKTEST_STR_ERROR "Bail out!" +#else +# define TUKTEST_TAP 0 +# ifdef TUKTEST_COLOR +# define TUKTEST_COLOR_PASS "\x1B[0;32m" +# define TUKTEST_COLOR_FAIL "\x1B[0;31m" +# define TUKTEST_COLOR_SKIP "\x1B[1;34m" +# define TUKTEST_COLOR_ERROR "\x1B[0;35m" +# define TUKTEST_COLOR_TOTAL "\x1B[1m" +# define TUKTEST_COLOR_OFF "\x1B[m" +# define TUKTEST_COLOR_IF(cond, color) ((cond) ? (color) : "" ) +# else +# define TUKTEST_COLOR_PASS "" +# define TUKTEST_COLOR_FAIL "" +# define TUKTEST_COLOR_SKIP "" +# define TUKTEST_COLOR_ERROR "" +# define TUKTEST_COLOR_TOTAL "" +# define TUKTEST_COLOR_OFF "" +# define TUKTEST_COLOR_IF(cond, color) "" +# endif +# define TUKTEST_COLOR_ADD(str, color) color str TUKTEST_COLOR_OFF +# define TUKTEST_STR_PASS \ + TUKTEST_COLOR_ADD("PASS:", TUKTEST_COLOR_PASS) +# define TUKTEST_STR_FAIL \ + TUKTEST_COLOR_ADD("FAIL:", TUKTEST_COLOR_FAIL) +# define TUKTEST_STR_SKIP \ + TUKTEST_COLOR_ADD("SKIP:", TUKTEST_COLOR_SKIP) +# define TUKTEST_STR_ERROR \ + TUKTEST_COLOR_ADD("ERROR:", TUKTEST_COLOR_ERROR) +#endif + +// NOTE: If TUKTEST_TAP is defined then TUKTEST_QUIET will get undefined above. +#ifndef TUKTEST_QUIET +# define TUKTEST_QUIET 0 +#else +# undef TUKTEST_QUIET +# define TUKTEST_QUIET 1 +#endif + + +// Counts of the passed, failed, skipped, and hard-errored tests. +// This is indexed with the enumeration constants from enum tuktest_result. +static unsigned tuktest_stats[4] = { 0, 0, 0, 0 }; + +// Copy of argc and argv from main(). These are set by tuktest_start(). +static int tuktest_argc = 0; +static char **tuktest_argv = NULL; + +// Name of the currently-running test. This exists because it's nice +// to print the main test function name even if the failing test-assertion +// fails in a function called by the main test function. +static const char *tuktest_name = NULL; + +// longjmp() target for when a test-assertion fails. +static jmp_buf tuktest_jmpenv; + + +// This declaration is needed for tuktest_malloc(). +static int tuktest_end(void); + + +// Internal helper for handling hard errors both inside and +// outside tuktest_run(). +#define tuktest_error_impl(filename, line, ...) \ +do { \ + tuktest_print_result_prefix(TUKTEST_ERROR, filename, line); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + ++tuktest_stats[TUKTEST_ERROR]; \ + exit(tuktest_end()); \ +} while (0) + + +// printf() is without checking its return value in many places. This function +// is called before exiting to check the status of stdout and catch errors. +static void +tuktest_catch_stdout_errors(void) +{ + if (ferror(stdout) || fclose(stdout)) { + fputs("Error while writing to stdout\n", stderr); + exit(TUKTEST_EXIT_ERROR); + } +} + + +// A simplified basename()-like function that is good enough for +// cleaning up __FILE__. This supports / and \ as path separator. +// If the path separator is wrong then the full path will be printed; +// it's a cosmetic problem only. +static const char * +tuktest_basename(const char *filename) +{ + for (const char *p = filename + strlen(filename); p > filename; --p) + if (*p == '/' || *p == '\\') + return p + 1; + + return filename; +} + + +// Internal helper that prints the prefix of the fail/skip/error message line. +static void +tuktest_print_result_prefix(enum tuktest_result result, + const char *filename, unsigned line) +{ + // This is never called with TUKTEST_PASS but I kept it here anyway. + const char *result_str + = result == TUKTEST_PASS ? TUKTEST_STR_PASS + : result == TUKTEST_FAIL ? TUKTEST_STR_FAIL + : result == TUKTEST_SKIP ? TUKTEST_STR_SKIP + : TUKTEST_STR_ERROR; + + const char *short_filename = tuktest_basename(filename); + + if (tuktest_name != NULL) + printf("%s %s [%s:%u] ", result_str, tuktest_name, + short_filename, line); + else + printf("%s [%s:%u] ", result_str, short_filename, line); +} + + +// An entry for linked list of memory allocations. +struct tuktest_malloc_record { + struct tuktest_malloc_record *next; + void *p; +}; + +// Linked list of per-test allocations. This is used when under tuktest_run(). +// These allocations are freed in tuktest_run() and, in case of a hard error, +// also in tuktest_end(). +static struct tuktest_malloc_record *tuktest_malloc_test = NULL; + +// Linked list of global allocations. This is used allocations are made +// outside tuktest_run(). These are freed in tuktest_end(). +static struct tuktest_malloc_record *tuktest_malloc_global = NULL; + + +/// A wrapper for malloc() that never return NULL and the allocated memory is +/// automatically freed at the end of tuktest_run() (if allocation was done +/// within a test) or early in tuktest_end() (if allocation was done outside +/// tuktest_run()). +/// +/// If allocation fails, a hard error is reported and this function won't +/// return. Possible other tests won't be run (this will call exit()). +#define tuktest_malloc(size) tuktest_malloc_impl(size, __FILE__, __LINE__) + +static void * +tuktest_malloc_impl(size_t size, const char *filename, unsigned line) +{ + void *p = malloc(size == 0 ? 1 : size); + struct tuktest_malloc_record *r = malloc(sizeof(*r)); + + if (p == NULL || r == NULL) { + free(r); + free(p); + + // Avoid %zu for portability to very old systems that still + // can compile C99 code. + tuktest_error_impl(filename, line, + "tuktest_malloc(%" TUKTEST_PRIu ") failed", + (tuktest_uint)size); + } + + r->p = p; + + if (tuktest_name == NULL) { + // We were called outside tuktest_run(). + r->next = tuktest_malloc_global; + tuktest_malloc_global = r; + } else { + // We were called under tuktest_run(). + r->next = tuktest_malloc_test; + tuktest_malloc_test = r; + } + + return p; +} + + +/// Frees memory allocated using tuktest_malloc(). Usually this isn't needed +/// as the memory is freed automatically. +/// +/// NULL is silently ignored. +/// +/// NOTE: Under tuktest_run() only memory allocated there can be freed. +/// That is, allocations done outside tuktest_run() can only be freed +/// outside tuktest_run(). +#define tuktest_free(ptr) tuktest_free_impl(ptr, __FILE__, __LINE__) + +static void +tuktest_free_impl(void *p, const char *filename, unsigned line) +{ + if (p == NULL) + return; + + struct tuktest_malloc_record **r = tuktest_name != NULL + ? &tuktest_malloc_test : &tuktest_malloc_global; + + while (*r != NULL) { + struct tuktest_malloc_record *tmp = *r; + + if (tmp->p == p) { + *r = tmp->next; + free(p); + free(tmp); + return; + } + + r = &tmp->next; + } + + tuktest_error_impl(filename, line, "tuktest_free: " + "Allocation matching the pointer was not found"); +} + + +// Frees all allocates in the given record list. The argument must be +// either &tuktest_malloc_test or &tuktest_malloc_global. +static void +tuktest_free_all(struct tuktest_malloc_record **r) +{ + while (*r != NULL) { + struct tuktest_malloc_record *tmp = *r; + *r = tmp->next; + free(tmp->p); + free(tmp); + } +} + + +/// Initialize the test framework. No other functions or macros +/// from this file may be called before calling this. +/// +/// If the arguments from main() aren't available, use 0 and NULL. +/// If these are set, then only a subset of tests can be run by +/// specifying their names on the command line. +#define tuktest_start(argc, argv) \ +do { \ + tuktest_argc = argc; \ + tuktest_argv = argv; \ + if (!TUKTEST_TAP && !TUKTEST_QUIET) \ + printf("=== %s ===\n", tuktest_basename(__FILE__)); \ +} while (0) + + +/// If it can be detected early that no tests can be run, this macro can +/// be called after tuktest_start() but before any tuktest_run() to print +/// a reason why the tests were skipped. Note that this macro calls exit(). +/// +/// Using "return tuktest_end();" in main() when no tests were run has +/// the same result as tuktest_early_skip() except that then no reason +/// for the skipping can be printed. +#define tuktest_early_skip(...) \ +do { \ + printf("%s [%s:%u] ", \ + TUKTEST_TAP ? "1..0 # SKIP" : TUKTEST_STR_SKIP, \ + tuktest_basename(__FILE__), __LINE__); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + if (!TUKTEST_TAP && !TUKTEST_QUIET) \ + printf("=== END ===\n"); \ + tuktest_catch_stdout_errors(); \ + exit(TUKTEST_TAP ? EXIT_SUCCESS : TUKTEST_EXIT_SKIP); \ +} while (0) + + +/// Some test programs need to do initializations before or between +/// calls to tuktest_run(). If such initializations unexpectedly fail, +/// tuktest_error() can be used to report it as a hard error outside +/// test functions, for example, in main(). Then the remaining tests +/// won't be run (this macro calls exit()). +/// +/// Typically tuktest_error() would be used before any tuktest_run() +/// calls but it is also possible to use tuktest_error() after one or +/// more tests have been run with tuktest_run(). This is in contrast to +/// tuktest_early_skip() which must never be called after tuktest_run(). +/// +/// NOTE: tuktest_start() must have been called before tuktest_error(). +/// +/// NOTE: This macro can be called from test functions running under +/// tuktest_run() but assert_error() is somewhat preferred in that context. +#define tuktest_error(...) tuktest_error_impl(__FILE__, __LINE__, __VA_ARGS__) + + +/// At the end of main() one should have "return tuktest_end();" which +/// prints the stats or the TAP plan, and handles the exit status. +/// Using exit(tuktest_end()) is OK too. +/// +/// If the test program can detect early that all tests must be skipped, +/// then tuktest_early_skip() may be useful so that the reason why the +/// tests were skipped can be printed. +static int +tuktest_end(void) +{ + tuktest_free_all(&tuktest_malloc_test); + tuktest_free_all(&tuktest_malloc_global); + + unsigned total_tests = 0; + for (unsigned i = 0; i <= TUKTEST_ERROR; ++i) + total_tests += tuktest_stats[i]; + + if (tuktest_stats[TUKTEST_ERROR] == 0 && tuktest_argc > 1 + && (unsigned)(tuktest_argc - 1) > total_tests) { + printf(TUKTEST_STR_ERROR " Fewer tests were run than " + "specified on the command line. " + "Was a test name mistyped?\n"); + ++tuktest_stats[TUKTEST_ERROR]; + } + +#if TUKTEST_TAP + // Print the plan only if no "Bail out!" has occurred. + // Print the skip directive if no tests were run. + // We cannot know the reason for the skip here though + // (see tuktest_early_skip()). + if (tuktest_stats[TUKTEST_ERROR] == 0) + printf("1..%u%s\n", total_tests, + total_tests == 0 ? " # SKIP" : ""); + + tuktest_catch_stdout_errors(); + return EXIT_SUCCESS; +#else + if (!TUKTEST_QUIET) + printf("---\n" + "%s# TOTAL: %u" TUKTEST_COLOR_OFF "\n" + "%s# PASS: %u" TUKTEST_COLOR_OFF "\n" + "%s# SKIP: %u" TUKTEST_COLOR_OFF "\n" + "%s# FAIL: %u" TUKTEST_COLOR_OFF "\n" + "%s# ERROR: %u" TUKTEST_COLOR_OFF "\n" + "=== END ===\n", + TUKTEST_COLOR_TOTAL, + total_tests, + TUKTEST_COLOR_IF( + tuktest_stats[TUKTEST_PASS] > 0, + TUKTEST_COLOR_PASS), + tuktest_stats[TUKTEST_PASS], + TUKTEST_COLOR_IF( + tuktest_stats[TUKTEST_SKIP] > 0, + TUKTEST_COLOR_SKIP), + tuktest_stats[TUKTEST_SKIP], + TUKTEST_COLOR_IF( + tuktest_stats[TUKTEST_FAIL] > 0, + TUKTEST_COLOR_FAIL), + tuktest_stats[TUKTEST_FAIL], + TUKTEST_COLOR_IF( + tuktest_stats[TUKTEST_ERROR] > 0, + TUKTEST_COLOR_ERROR), + tuktest_stats[TUKTEST_ERROR]); + + tuktest_catch_stdout_errors(); + + if (tuktest_stats[TUKTEST_ERROR] > 0) + return TUKTEST_EXIT_ERROR; + + if (tuktest_stats[TUKTEST_FAIL] > 0) + return TUKTEST_EXIT_FAIL; + + if (tuktest_stats[TUKTEST_SKIP] > 0 || total_tests == 0) + return TUKTEST_EXIT_SKIP; + + return TUKTEST_EXIT_PASS; +#endif +} + + +/// Runs the specified test function. Requires that tuktest_start() +/// has already been called and that tuktest_end() has NOT been called yet. +#define tuktest_run(testfunc) \ + tuktest_run_test(&(testfunc), #testfunc) + +tuktest_maybe_unused +static void +tuktest_run_test(void (*testfunc)(void), const char *testfunc_str) +{ + // If any command line arguments were given, only the test functions + // named on the command line will be run. + if (tuktest_argc > 1) { + int i = 1; + while (strcmp(tuktest_argv[i], testfunc_str) != 0) + if (++i == tuktest_argc) + return; + } + + // This is set so that failed assertions can print the correct + // test name even when the assertion is in a helper function + // called by the test function. + tuktest_name = testfunc_str; + + // The way setjmp() may be called is very restrictive. + // A switch statement is one of the few conforming ways + // to get the value passed to longjmp(); doing something + // like "int x = setjmp(env)" is NOT allowed (undefined behavior). + switch (setjmp(tuktest_jmpenv)) { + case 0: + testfunc(); + ++tuktest_stats[TUKTEST_PASS]; + if (!TUKTEST_QUIET) + printf(TUKTEST_STR_PASS " %s\n", tuktest_name); + break; + + case TUKTEST_FAIL: + ++tuktest_stats[TUKTEST_FAIL]; + break; + + case TUKTEST_SKIP: + ++tuktest_stats[TUKTEST_SKIP]; + break; + + default: + ++tuktest_stats[TUKTEST_ERROR]; + exit(tuktest_end()); + } + + tuktest_free_all(&tuktest_malloc_test); + tuktest_name = NULL; +} + + +// Maximum allowed file size in tuktest_file_from_* macros and functions. +#ifndef TUKTEST_FILE_SIZE_MAX +# define TUKTEST_FILE_SIZE_MAX (64L << 20) +#endif + +/// Allocates memory and reads the specified file into a buffer. +/// If the environment variable srcdir is set, it will be prefixed +/// to the filename. Otherwise the filename is used as is (and so +/// the behavior is identical to tuktest_file_from_builddir() below). +/// +/// On success the a pointer to malloc'ed memory is returned. +/// The size of the allocation and the file is stored in *size. +/// +/// If anything goes wrong, a hard error is reported and this function +/// won't return. Possible other tests won't be run (this will call exit()). +/// +/// Empty files and files over TUKTEST_FILE_SIZE_MAX are rejected. +/// The assumption is that something is wrong in these cases. +/// +/// This function can be called either from outside the tests (like in main()) +/// or from tests run via tuktest_run(). Remember to free() the memory to +/// keep Valgrind happy. +#define tuktest_file_from_srcdir(filename, sizeptr) \ + tuktest_file_from_x(getenv("srcdir"), filename, sizeptr, \ + __FILE__, __LINE__) + +/// Like tuktest_file_from_srcdir except this reads from the current directory. +#define tuktest_file_from_builddir(filename, sizeptr) \ + tuktest_file_from_x(NULL, filename, sizeptr, __FILE__, __LINE__) + +// Internal helper for the macros above. +tuktest_maybe_unused +static void * +tuktest_file_from_x(const char *prefix, const char *filename, size_t *size, + const char *prog_filename, unsigned prog_line) +{ + // If needed: buffer for holding prefix + '/' + filename + '\0'. + char *alloc_name = NULL; + + // Buffer for the data read from the file. + void *buf = NULL; + + // File being read + FILE *f = NULL; + + // Error message to use under the "error:" label. + const char *error_msg = NULL; + + if (filename == NULL) { + error_msg = "Filename is NULL"; + filename = "(NULL)"; + goto error; + } + + if (filename[0] == '\0') { + error_msg = "Filename is an empty string"; + filename = "(empty string)"; + goto error; + } + + if (size == NULL) { + error_msg = "The size argument is NULL"; + goto error; + } + + // If a prefix was given, construct the full filename. + if (prefix != NULL && prefix[0] != '\0') { + const size_t prefix_len = strlen(prefix); + const size_t filename_len = strlen(filename); + + const size_t alloc_name_size + = prefix_len + 1 + filename_len + 1; + alloc_name = tuktest_malloc_impl(alloc_name_size, + prog_filename, prog_line); + + memcpy(alloc_name, prefix, prefix_len); + alloc_name[prefix_len] = '/'; + memcpy(alloc_name + prefix_len + 1, filename, filename_len); + alloc_name[prefix_len + 1 + filename_len] = '\0'; + + // Set filename to point to the new string. alloc_name + // can be freed unconditionally as it is NULL if a prefix + // wasn't specified. + filename = alloc_name; + } + + f = fopen(filename, "rb"); + if (f == NULL) { + error_msg = "Failed to open the file"; + goto error; + } + + // Get the size of the file and store it in *size. + // + // We assume that the file isn't big and even reject very big files. + // There is no need to use fseeko/ftello from POSIX to support + // large files. Using standard C functions is portable outside POSIX. + if (fseek(f, 0, SEEK_END) != 0) { + error_msg = "Seeking failed (fseek end)"; + goto error; + } + + const long end = ftell(f); + if (end < 0) { + error_msg = "Seeking failed (ftell)"; + goto error; + } + + if (end == 0) { + error_msg = "File is empty"; + goto error; + } + + if (end > TUKTEST_FILE_SIZE_MAX) { + error_msg = "File size exceeds TUKTEST_FILE_SIZE_MAX"; + goto error; + } + + *size = (size_t)end; + rewind(f); + + buf = tuktest_malloc_impl(*size, prog_filename, prog_line); + + const size_t amount = fread(buf, 1, *size, f); + if (ferror(f)) { + error_msg = "Read error"; + goto error; + } + + if (amount != *size) { + error_msg = "File is smaller than indicated by ftell()"; + goto error; + } + + const int fclose_ret = fclose(f); + f = NULL; + if (fclose_ret != 0) { + error_msg = "Error closing the file"; + goto error; + } + + tuktest_free(alloc_name); + return buf; + +error: + if (f != NULL) + (void)fclose(f); + + tuktest_error_impl(prog_filename, prog_line, + "tuktest_file_from_x: %s: %s\n", filename, error_msg); +} + + +// Internal helper for assert_fail, assert_skip, and assert_error. +#define tuktest_print_and_jump(result, ...) \ +do { \ + tuktest_print_result_prefix(result, __FILE__, __LINE__); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + longjmp(tuktest_jmpenv, result); \ +} while (0) + + +/// Unconditionally fails the test (non-zero exit status if not using TAP). +/// Execution will continue from the next test. +/// +/// A printf format string is supported. +/// If no extra message is wanted, use "" as the argument. +#define assert_fail(...) tuktest_print_and_jump(TUKTEST_FAIL, __VA_ARGS__) + + +/// Skips the test (exit status 77 if not using TAP). +/// Execution will continue from the next test. +/// +/// If you can detect early that no tests can be run, tuktest_early_skip() +/// might be a better way to skip the test(s). Especially in TAP mode this +/// makes a difference as with assert_skip() it will list a skipped specific +/// test name but with tuktest_early_skip() it will indicate that the whole +/// test program was skipped (with tuktest_early_skip() the TAP plan will +/// indicate zero tests). +/// +/// A printf format string is supported. +/// If no extra message is wanted, use "" as the argument. +#define assert_skip(...) tuktest_print_and_jump(TUKTEST_SKIP, __VA_ARGS__) + + +/// Hard error (exit status 99 if not using TAP). +/// The remaining tests in this program will not be run or reported. +/// +/// A printf format string is supported. +/// If no extra message is wanted, use "" as the argument. +#define assert_error(...) tuktest_print_and_jump(TUKTEST_ERROR, __VA_ARGS__) + + +/// Fails the test if the test expression doesn't evaluate to false. +#define assert_false(test_expr) \ +do { \ + if (test_expr) \ + assert_fail("assert_fail: '%s' is true but should be false", \ + #test_expr); \ +} while (0) + + +/// Fails the test if the test expression doesn't evaluate to true. +#define assert_true(test_expr) \ +do { \ + if (!(test_expr)) \ + assert_fail("assert_true: '%s' is false but should be true", \ + #test_expr); \ +} while (0) + + +/// Fails the test if comparing the signed integer expressions using the +/// specified comparison operator evaluates to false. For example, +/// assert_int(foobar(), >=, 0) fails the test if 'foobar() >= 0' isn't true. +/// For good error messages, the first argument should be the test expression +/// and the third argument the reference value (usually a constant). +/// +/// For equality (==) comparison there is a assert_int_eq() which +/// might be more convenient to use. +#define assert_int(test_expr, cmp_op, ref_value) \ +do { \ + const tuktest_int v_test_ = (test_expr); \ + const tuktest_int v_ref_ = (ref_value); \ + if (!(v_test_ cmp_op v_ref_)) \ + assert_fail("assert_int: '%s == %" TUKTEST_PRId \ + "' but expected '... %s %" TUKTEST_PRId "'", \ + #test_expr, v_test_, #cmp_op, v_ref_); \ +} while (0) + + +/// Like assert_int() but for unsigned integers. +/// +/// For equality (==) comparison there is a assert_uint_eq() which +/// might be more convenient to use. +#define assert_uint(test_expr, cmp_op, ref_value) \ +do { \ + const tuktest_uint v_test_ = (test_expr); \ + const tuktest_uint v_ref_ = (ref_value); \ + if (!(v_test_ cmp_op v_ref_)) \ + assert_fail("assert_uint: '%s == %" TUKTEST_PRIu \ + "' but expected '... %s %" TUKTEST_PRIu "'", \ + #test_expr, v_test_, #cmp_op, v_ref_); \ +} while (0) + + +/// Fails the test if test expression doesn't equal the expected +/// signed integer value. +#define assert_int_eq(test_expr, ref_value) \ + assert_int(test_expr, ==, ref_value) + + +/// Fails the test if test expression doesn't equal the expected +/// unsigned integer value. +#define assert_uint_eq(test_expr, ref_value) \ + assert_uint(test_expr, ==, ref_value) + + +/// Fails the test if the test expression doesn't equal the expected +/// enumeration value. This is like assert_int_eq() but the error message +/// shows the enumeration constant names instead of their numeric values +/// as long as the values are non-negative and not big. +/// +/// The third argument must be a table of string pointers. A pointer to +/// a pointer doesn't work because this determines the number of elements +/// in the array using sizeof. For example: +/// +/// const char *my_enum_names[] = { "MY_FOO", "MY_BAR", "MY_BAZ" }; +/// assert_enum_eq(some_func_returning_my_enum(), MY_BAR, my_enum_names); +/// +/// (If the reference value is out of bounds, both values are printed as +/// an integer. If only test expression is out of bounds, it is printed +/// as an integer and the reference as a string. Otherwise both are printed +/// as a string.) +#define assert_enum_eq(test_expr, ref_value, enum_strings) \ +do { \ + const tuktest_int v_test_ = (test_expr); \ + const tuktest_int v_ref_ = (ref_value); \ + if (v_test_ != v_ref_) { \ + const int array_len_ = (int)(sizeof(enum_strings) \ + / sizeof((enum_strings)[0])); \ + if (v_ref_ < 0 || v_ref_ >= array_len_) \ + assert_fail("assert_enum_eq: '%s == %" TUKTEST_PRId \ + "' but expected " \ + "'... == %" TUKTEST_PRId "'", \ + #test_expr, v_test_, v_ref_); \ + else if (v_test_ < 0 || v_test_ >= array_len_) \ + assert_fail("assert_enum_eq: '%s == %" TUKTEST_PRId \ + "' but expected '... == %s'", \ + #test_expr, v_test_, \ + (enum_strings)[v_ref_]); \ + else \ + assert_fail("assert_enum_eq: '%s == %s' " \ + "but expected '... = %s'", \ + #test_expr, (enum_strings)[v_test_], \ + (enum_strings)[v_ref_]); \ + } \ +} while (0) + + +/// Fails the test if the specified bit isn't set in the test expression. +#define assert_bit_set(test_expr, bit) \ +do { \ + const tuktest_uint v_test_ = (test_expr); \ + const unsigned v_bit_ = (bit); \ + const tuktest_uint v_mask_ = (tuktest_uint)1 << v_bit_; \ + if (!(v_test_ & v_mask_)) \ + assert_fail("assert_bit_set: '%s == 0x%" TUKTEST_PRIX \ + "' but bit %u (0x%" TUKTEST_PRIX ") " \ + "is not set", \ + #test_expr, v_test_, v_bit_, v_mask_); \ +} while (0) + + +/// Fails the test if the specified bit is set in the test expression. +#define assert_bit_not_set(test_expr, bit) \ +do { \ + const tuktest_uint v_test_ = (test_expr); \ + const unsigned v_bit_ = (bit); \ + const tuktest_uint v_mask_ = (tuktest_uint)1 << v_bit_; \ + if (v_test_ & v_mask_) \ + assert_fail("assert_bit_not_set: '%s == 0x%" TUKTEST_PRIX \ + "' but bit %u (0x%" TUKTEST_PRIX ") is set", \ + #test_expr, v_test_, v_bit_, v_mask_); \ +} while (0) + + +/// Fails the test if unless all bits that are set in the bitmask are also +/// set in the test expression. +#define assert_bitmask_set(test_expr, mask) \ +do { \ + const tuktest_uint v_mask_ = (mask); \ + const tuktest_uint v_test_ = (test_expr) & v_mask_; \ + if (v_test_ != v_mask_) \ + assert_fail("assert_bitmask_set: " \ + "'((%s) & 0x%" TUKTEST_PRIX ") == " \ + "0x%" TUKTEST_PRIX "' but expected " \ + "'... == 0x%" TUKTEST_PRIX "'", \ + #test_expr, v_mask_, v_test_, v_mask_); \ +} while (0) + + +/// Fails the test if any of the bits that are set in the bitmask are also +/// set in the test expression. +#define assert_bitmask_not_set(test_expr, mask) \ +do { \ + const tuktest_uint v_mask_ = (mask); \ + const tuktest_uint v_test_ = (test_expr) & v_mask_; \ + if (v_test_ != 0) \ + assert_fail("assert_bitmask_not_set: "\ + "'((%s) & 0x%" TUKTEST_PRIX ") == " \ + "0x%" TUKTEST_PRIX "' but expected " \ + "'... == 0'", \ + #test_expr, v_mask_, v_test_); \ +} while (0) + + +// Internal helper to add common code for string assertions. +#define tuktest_str_helper1(macro_name, test_expr, ref_value) \ + const char *v_test_ = (test_expr); \ + const char *v_ref_ = (ref_value); \ + if (v_test_ == NULL) \ + assert_fail(macro_name ": Test expression '%s' is NULL", \ + #test_expr); \ + if (v_ref_ == NULL) \ + assert_fail(macro_name ": Reference value '%s' is NULL", \ + #ref_value) + + +// Internal helper to add common code for string assertions and to check +// that the reference value isn't an empty string. +#define tuktest_str_helper2(macro_name, test_expr, ref_value) \ + tuktest_str_helper1(macro_name, test_expr, ref_value); \ + if (v_ref_[0] == '\0') \ + assert_fail(macro_name ": Reference value is an empty string") + + +/// Fails the test if the test expression evaluates to string that doesn't +/// equal to the expected string. +#define assert_str_eq(test_expr, ref_value) \ +do { \ + tuktest_str_helper1("assert_str_eq", test_expr, ref_value); \ + if (strcmp(v_ref_, v_test_) != 0) \ + assert_fail("assert_str_eq: '%s' evaluated to '%s' " \ + "but expected '%s'", \ + #test_expr, v_test_, v_ref_); \ +} while (0) + + +/// Fails the test if the test expression evaluates to a string that doesn't +/// contain the reference value as a substring. Also fails the test if +/// the reference value is an empty string. +#define assert_str_contains(test_expr, ref_value) \ +do { \ + tuktest_str_helper2("assert_str_contains", test_expr, ref_value); \ + if (strstr(v_test_, v_ref_) == NULL) \ + assert_fail("assert_str_contains: '%s' evaluated to '%s' " \ + "which doesn't contain '%s'", \ + #test_expr, v_test_, v_ref_); \ +} while (0) + + +/// Fails the test if the test expression evaluates to a string that +/// contains the reference value as a substring. Also fails the test if +/// the reference value is an empty string. +#define assert_str_doesnt_contain(test_expr, ref_value) \ +do { \ + tuktest_str_helper2("assert_str_doesnt_contain", \ + test_expr, ref_value); \ + if (strstr(v_test_, v_ref_) != NULL) \ + assert_fail("assert_str_doesnt_contain: " \ + "'%s' evaluated to '%s' which contains '%s'", \ + #test_expr, v_test_, v_ref_); \ +} while (0) + + +/// Fails the test if the first array_size elements of the test array +/// don't equal to correct_array. +/// +/// NOTE: This avoids %zu for portability to very old systems that still +/// can compile C99 code. +#define assert_array_eq(test_array, correct_array, array_size) \ +do { \ + for (size_t i_ = 0; i_ < (array_size); ++i_) \ + if ((test_array)[i_] != (correct_array)[i_]) \ + assert_fail("assert_array_eq: " \ + "%s[%" TUKTEST_PRIu "] != "\ + "%s[%" TUKTEST_PRIu "] " \ + "but should be equal", \ + #test_array, (tuktest_uint)i_, \ + #correct_array, (tuktest_uint)i_); \ +} while (0) + +#endif diff --git a/cpp/third_party/xz-5.8.3/tests/xzgrep_expected_output b/cpp/third_party/xz-5.8.3/tests/xzgrep_expected_output new file mode 100644 index 0000000000..e531d93160 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/tests/xzgrep_expected_output @@ -0,0 +1,39 @@ +=> xzgrep el <= +xzgrep_test_1.xz:elit, sed do eiusmod tempor incididunt ut +xzgrep_test_1.xz:in voluptate velit esse cillum dolore eu +xzgrep_test_2.xz:Hello +retval 0 +=> xzgrep -l el <= +xzgrep_test_1.xz +xzgrep_test_2.xz +retval 0 +=> xzgrep -h el <= +elit, sed do eiusmod tempor incididunt ut +in voluptate velit esse cillum dolore eu +Hello +retval 0 +=> xzgrep -H el <= +xzgrep_test_1.xz:elit, sed do eiusmod tempor incididunt ut +xzgrep_test_1.xz:in voluptate velit esse cillum dolore eu +xzgrep_test_2.xz:Hello +retval 0 +=> xzgrep Hello <= +xzgrep_test_2.xz:Hello +retval 0 +=> xzgrep -l Hello <= +xzgrep_test_2.xz +retval 0 +=> xzgrep -h Hello <= +Hello +retval 0 +=> xzgrep -H Hello <= +xzgrep_test_2.xz:Hello +retval 0 +=> xzgrep NOMATCH <= +retval 1 +=> xzgrep -l NOMATCH <= +retval 1 +=> xzgrep -h NOMATCH <= +retval 1 +=> xzgrep -H NOMATCH <= +retval 1 diff --git a/cpp/third_party/xz-5.8.3/windows/INSTALL-MSVC.txt b/cpp/third_party/xz-5.8.3/windows/INSTALL-MSVC.txt new file mode 100644 index 0000000000..e92175b6b5 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/windows/INSTALL-MSVC.txt @@ -0,0 +1,44 @@ + +Building XZ Utils with Microsoft Visual Studio +============================================== + +Introduction +------------ + + liblzma got MSVC support in XZ Utils 5.2.0, and the xz, xzdec, + lzmadec, and lzmainfo command line tools in XZ Utils 5.6.0. + + Visual Studio 2015 and later are supported. + + NOTE: The *.exe files are linked against GNU getopt_long from + the "lib" directory. That code is under the GNU LGPLv2.1 + and thus the matching source code must be provided when + distributing the *.exe files. The simplest way to comply with + the license requirements is to distribute the matching XZ Utils + source package alongside the *.exe files. + + +Building +-------- + + Use CMake to generate build files for MSVC. Visual Studio project + files are no longer provided (XZ Utils 5.4.x were the last versions + to include the project files). + + NOTE: GCC and Clang compatible inline assembly isn't supported by + the MSVC compiler. Using clang-cl under MSVC should make inline + assembly work (untested). + + +Notes +----- + + liblzma API headers declare the functions with __declspec(dllimport) + by default. To avoid this when using static liblzma from your code, + #define LZMA_API_STATIC before #including . + + MSVC gives a bunch of compiler warnings. Some warnings are specific + to 32-bit or 64-bit build and some appear for both builds. These + are known and shouldn't be a problem. Some of them will probably + be fixed in the future. + diff --git a/cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_Autotools.txt b/cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_Autotools.txt new file mode 100644 index 0000000000..89c744092e --- /dev/null +++ b/cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_Autotools.txt @@ -0,0 +1,49 @@ + +Creating XZ Utils Windows package with build.bash +================================================= + +Introduction +------------ + + The script build.bash can be used for building XZ Utils with + GCC + MinGW-w64 under MSYS2, under the ancient MSYS, or + cross-compiling from GNU/Linux. The script will create a package + with binaries and documentation in a hopefully-convenient bundle. + + NOTE: build.bash requires files that are only included + in release tarballs. If building from xz.git, a distribution + tarball should be created first. + + For native builds on Windows, the CMake-based build described + in the file INSTALL-MinGW-w64_with_CMake.txt is simpler to do as + it has no need for MSYS2 and it works from xz.git without extra + steps. For cross-compilation and package creation the script can + be convenient though. + + These instructions are for making a package with build.bash and thus + don't apply to normal Autotool-based builds under Cygwin or MSYS2. + + +Usage +----- + + First copy the file COPYING.MinGW-w64-runtime.txt from MinGW-w64 + to this directory. It contains copyright and license notices that + apply to the MinGW-w64 runtime that gets statically linked into + the XZ Utils binaries being built. build.bash will include the file + in the final package. + + Put i686 and/or x86_64 GCC-based toolchain in PATH depending on + which builds are wanted. + + Optional: Put the 7z tool from 7-Zip or p7zip in PATH. Without + this, .zip and .7z files won't be created from the finished "pkg" + directory contents. + + Run build.bash: + + bash windows/build.bash + + Note that it does an in-tree build so the build files will be mixed + with the source files in the same directory tree. + diff --git a/cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_CMake.txt b/cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_CMake.txt new file mode 100644 index 0000000000..191beae392 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/windows/INSTALL-MinGW-w64_with_CMake.txt @@ -0,0 +1,211 @@ + +Building XZ Utils on Windows using MinGW-w64 and CMake +====================================================== + + 1. Introduction + 1.1. Licensing considerations + 2. MSVCRT or UCRT + 3. CMake + 4. MinGW-w64 toolchains + 4.1. MinGW-w64 with GCC + 4.2. MinGW-w64 with Clang/LLVM + 5. Building XZ Utils + 5.1. Advanced build options + 6. Creating an import library for MSVC / Visual Studio + + +1. Introduction +--------------- + + This document explains how to build XZ Utils using MinGW-w64, + GCC or Clang/LLVM, CMake, and GNU make (mingw32-make) natively + on Windows. The resulting XZ Utils library and executable files + will only depend on DLLs that are included in Windows. + + The build tools can be extracted into separate directories and used + directly from there and deleted when no longer needed. There are no + installers to run for these and no configuration needed. + + These instructions don't apply to Cygwin. XZ Utils can be built + under Cygwin in the same way as many other packages. + + +1.1. Licensing considerations + + Parts of MinGW-w64 runtime are statically linked into the binaries + being built. The file COPYING.MinGW-w64-runtime.txt in MinGW-w64 + contains the license notices that apply to some parts of the + runtime. The notices must be distributed alongside the binaries + that have been built with MinGW-w64. + + MinGW-w64 includes getopt_long(). The GNU getopt_long() (LGPLv2.1) + included in XZ Utils isn't used when building with MinGW-w64. + + The code from XZ Utils that ends up liblzma.dll and the *.exe files + is under the BSD Zero Clause License (0BSD) which doesn't require + any copyright or license notices to be included when distributing + the binaries. See the file COPYING in the parent directory. + + +2. MSVCRT or UCRT +----------------- + + Both GCC and Clang/LLVM based MinGW-w64 toolchains come in MSVCRT + and Universal C runtime (UCRT) variants. Use the UCRT variant + unless you have a good reason to why you still need to use MSVCRT. + + MSVCRT is old. 32-bit builds of XZ Utils with MSVCRT should run on + Windows 2000 and later (even Windows 95 should still be possible + with trivial edits to the source code). However, MSVCRT doesn't + support the UTF-8 code page. Under Windows 10 version 1903 and + later, the command line tools of XZ Utils 5.6.3 and later use the + UTF-8 code page. If the command line tools are built against MSVCRT + and used on Win10 v1903 or later, non-ASCII characters may be + displayed incorrectly. Otherwise the tools should still function + correctly, so it's mostly a cosmetic issue. + + UCRT is included in Windows 10, and it's possible to install UCRT + on Windows XP and later. UCRT supports the UTF-8 code page. UCRT is + the preferred choice if out-of-the-box compatibility with Windows + versions older than 10 is not required. Visual Studio 2015 and + later produce binaries that use UCRT. + + If you want to build liblzma.dll for use with your application, + it's recommended to use the same CRT for all components (the UTF-8 + code page issue only affects the command line tools, not liblzma). + If this isn't possible, see the file liblzma-crt-mixing.txt. + + +3. CMake +-------- + + CMake is used for selecting build options and generating makefiles. + It can also be used to extract archives, including .tar.xz and .7z. + + Download a CMake binary package (.zip) from its homepage: + + https://cmake.org/download/ + + Extract it to, for example, C:\devel\cmake so that the executables + end up in C:\devel\cmake\bin. Avoid spaces and other special + characters in the path. + + +4. MinGW-w64 toolchains +----------------------- + + There are a few choices of prebuilt toolchains listed on + the MinGW-w64 homepage: + + https://www.mingw-w64.org/downloads/ + + These instructions list one GCC-based version and one + Clang/LLVM-based version. Both include mingw32-make too. + + +4.1. MinGW-w64 with GCC + + For GCC, download appropriate packages from Mingw-builds depending + on if you want to build 32-bit or 64-bit x86 version of XZ Utils + and if the XZ Utils binaries should link against MSVCRT or UCRT + (use 64-bit UCRT if possible): + + https://github.com/niXman/mingw-builds-binaries/releases + + i686-*-release-win32-*-msvcrt-*.7z 32-bit, uses MSVCRT (old) + i686-*-release-win32-*-ucrt-*.7z 32-bit, uses UCRT (new) + x86_64-*-release-win32-*-msvcrt-*.7z 64-bit, uses MSVCRT (old) + x86_64-*-release-win32-*-ucrt-*.7z 64-bit, uses UCRT (new) + + Extract it, for example, to C:\devel so that the executables are + in C:\devel\mingw32\bin or C:\devel\mingw64\bin. To extract, + you can install 7-Zip from or use CMake + on the command line: + + set PATH=C:\devel\cmake\bin;%PATH% + c: + cd \devel + cmake -E tar xf x86_64-13.1.0-release-win32-seh-ucrt-rt_v11-rev1.7z + + Then skip to the section "Building XZ Utils". + + +4.2. MinGW-w64 with Clang/LLVM + + For Clang/LLVM, download an appropriate package from LLVM-MinGW + (use 64-bit UCRT if possible): + + https://github.com/mstorsjo/llvm-mingw/releases + + llvm-mingw-*-msvcrt-i686.zip 32-bit, uses MSVCRT (old) + llvm-mingw-*-ucrt-i686.zip 32-bit, uses UCRT (new) + llvm-mingw-*-msvcrt-x86_64.zip 64-bit, uses MSVCRT (old) + llvm-mingw-*-ucrt-x86_64.zip 64-bit, uses UCRT (new) + + Extract it, for example, to C:\devel so that the executables end up + in a directory like C:\devel\llvm-mingw-20230919-ucrt-x86_64\bin. + + +5. Building XZ Utils +-------------------- + + For a simple builds, you can use the included build-with-cmake.bat + which takes these arguments: + + %1 = Path to CMake's bin directory. Example: + c:\devel\cmake\bin + + %2 = Path to MinGW-w64's bin directory. Example: + c:\devel\mingw64\bin + + %3 = ON or OFF: Set to ON to build liblzma.dll or OFF for + static liblzma.a. With OFF, the *.exe files won't + depend on liblzma.dll. + + Example: + + build-with-cmake C:\devel\cmake\bin C:\devel\mingw64\bin ON + + If successful, the "build" directory should then contain: + + liblzma.dll liblzma compression library + liblzma.def DEF file for creating an import library + xz.exe xz command line tool + xzdec.exe Decompression-only tool (smaller than xz.exe) + lzmadec.exe Decompression-only tool for legacy .lzma files + lzmainfo.exe Shows header info of legacy .lzma files + + Ignore the other files. :-) + + +5.1. Advanced build options + + For 32-bit x86 builds, adding -msse2 to CFLAGS improves + compression speed a little (but not decompression speed). + There is no runtime detection for SSE2 support. It is + recommended to use 64-bit version when possible. + + It's possible to omit features from the build to reduce code size. + There are several CMake configuration options available. One may + change from CMAKE_BUILD_TYPE=Release to =MinSizeRel as well but + it makes the code slower. + + If building for multiple targets, keep only one toolchain in PATH + at a time. + + +6. Creating an import library for MSVC / Visual Studio +------------------------------------------------------ + + To link against liblzma.dll, you need to create an import library + first. You need the "lib" command from MSVC and liblzma.def. Here + is the command that works on 32-bit x86: + + lib /def:liblzma.def /out:liblzma.lib /machine:ix86 + + On x86-64, the /machine argument has to be changed: + + lib /def:liblzma.def /out:liblzma.lib /machine:x64 + + IMPORTANT: See also the file liblzma-crt-mixing.txt. + diff --git a/cpp/third_party/xz-5.8.3/windows/README-Windows.txt b/cpp/third_party/xz-5.8.3/windows/README-Windows.txt new file mode 100644 index 0000000000..c97086ffa6 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/windows/README-Windows.txt @@ -0,0 +1,100 @@ + +XZ Utils for Windows +==================== + +Introduction +------------ + + This package includes command line tools (xz.exe and a few + others) and the liblzma compression library from XZ Utils. + You can find the latest version and full source code from + . + + The parts of the XZ Utils source code, that are relevant to this + binary package, are under the BSD Zero Clause License (0BSD). + XZ Utils have been built using GCC and MinGW-w64 and linked + statically against the MinGW-w64 runtime libraries. See + COPYING.MinGW-w64-runtime.txt for copyright and license + information that applies to the MinGW-w64 runtime. + + IMPORTANT: You must include COPYING.MinGW-w64-runtime.txt + when distributing these XZ Utils binaries to meet + the license terms of the MinGW-w64 runtime! + + (The file COPYING mentions GNU getopt_long. It's *not* used when + XZ Utils is built with MinGW-w64. Thus GNU LGPLv2.1 doesn't apply.) + + +Package contents +---------------- + + All executables and libraries in this package require + Universal CRT (UCRT). It is included in Windows 10 and later, + and it's possible to install UCRT on Windows XP and later. + + There is a SSE2 optimization in the compression code but this + version of XZ Utils doesn't include run-time processor detection. + The binaries don't work on 32-bit processors without SSE2 support. + + There is one directory for each type of executable and library files: + + bin_i686-sse2 32-bit x86 (i686 with SSE2) + bin_x86-64 64-bit x86-64 + + Each of the above directories have the following files: + + *.exe Command line tools. (It's useless to double-click + these; use the command prompt instead.) These have + been linked statically against liblzma, so they + don't require liblzma.dll. Thus, you can copy e.g. + xz.exe to a directory that is in PATH without + copying any other files from this package. + + NOTE: xzdec.exe and lzmadec.exe are optimized for + size, single-threaded, and slower than xz.exe. + Use xz.exe unless program size is important. + + liblzma.dll Shared version of the liblzma compression library. + This file is mostly useful to developers, although + some non-developers might use it to upgrade their + copy of liblzma. + + The rest of the directories contain architecture-independent files: + + doc Basic documentation in the plain text (TXT) + format. COPYING.txt, COPYING.0BSD.txt, and + COPYING.MinGW-w64-runtime.txt contain + copyright and license information. + liblzma.def is in this directory too. + + doc/manuals The manuals of the command line tools + + doc/examples Example programs for basic liblzma usage. + + include C header files for liblzma. These should be + compatible with most C and C++ compilers. + + +Creating an import library for MSVC / Visual Studio +--------------------------------------------------- + + To link against liblzma.dll, you need to create an import library + first. You need the "lib" command from MSVC and liblzma.def from + the "doc" directory of this package. Here is the command that works + on 32-bit x86: + + lib /def:liblzma.def /out:liblzma.lib /machine:ix86 + + On x86-64, the /machine argument has to be changed: + + lib /def:liblzma.def /out:liblzma.lib /machine:x64 + + IMPORTANT: See also the file liblzma-crt-mixing.txt if your + application isn't using UCRT. + + +Reporting bugs +-------------- + + Report bugs to . + diff --git a/cpp/third_party/xz-5.8.3/windows/build-with-cmake.bat b/cpp/third_party/xz-5.8.3/windows/build-with-cmake.bat new file mode 100644 index 0000000000..d843b2a664 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/windows/build-with-cmake.bat @@ -0,0 +1,35 @@ +@rem # SPDX-License-Identifier: 0BSD +@rem # Author: Lasse Collin +@rem # +@rem ######################################################################## +@rem # +@rem # This builds XZ Utils with CMake + MinGW-w64 (GCC or Clang/LLVM). +@rem # See INSTALL-MinGW-w64_with_CMake.txt for detailed instructions. +@rem # +@rem # Summary of command line arguments: +@rem # +@rem # %1 = Path to CMake's bin directory. Example: +@rem # C:\devel\cmake\bin +@rem # +@rem # %2 = Path to MinGW-w64's bin directory. Example: +@rem # C:\devel\mingw64\bin +@rem # +@rem # %3 = ON or OFF: Set to ON to build liblzma.dll or OFF for +@rem # static liblzma.a. With OFF, the *.exe files won't +@rem # depend on liblzma.dll. +@rem # +@rem ######################################################################## + +setlocal +set PATH=%1;%2;%PATH% + +md build || exit /b +cd build || exit /b + +cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DXZ_NLS=OFF -DBUILD_SHARED_LIBS=%3 ..\.. || exit /b +mingw32-make || exit /b +mingw32-make test || exit /b + +@rem liblzma.dll might not exist so ignore errors. +strip xz.exe xzdec.exe lzmadec.exe lzmainfo.exe liblzma.dll +exit /b 0 diff --git a/cpp/third_party/xz-5.8.3/windows/build.bash b/cpp/third_party/xz-5.8.3/windows/build.bash new file mode 100644 index 0000000000..395d87fbfa --- /dev/null +++ b/cpp/third_party/xz-5.8.3/windows/build.bash @@ -0,0 +1,245 @@ +#!/bin/bash +# SPDX-License-Identifier: 0BSD + +############################################################################### +# +# This build a XZ Utils binary package using the GNU Autotools build system +# +# NOTE: This requires files that are generated as part of "make mydist". +# So if building from xz.git, create a distribution tarball first, +# extract it, and run this script from there. +# +# These were tested and known to work: +# - Cross-compilation with MinGW-w64 v10.0.0 and GCC 12.2.0 from +# GNU/Linux ("make check" will be skipped) +# - MSYS2 with MinGW-w64 and GCC +# - MSYS 1.0.11 (from 2009) with MinGW-w64 v11.0.0 and GCC 13.1.0 +# +# Optionally, 7-Zip is used to create the final .zip and .7z packages. +# If the 7z tool is in PATH or if you have installed it in the default +# directory on Windows, this script should find it automatically. +# +# Before running this script, copy COPYING.MinGW-w64-runtime.txt to +# the 'windows' directory. +# +# NOTE: MinGW-w64 includes getopt_long(). The GNU getopt_long() (LGPLv2.1) +# included in XZ Utils isn't used when building with MinGW-w64. +# +############################################################################### +# +# Author: Lasse Collin +# +############################################################################### + +# Abort immediately if something goes wrong. +set -e + +# White spaces in directory names may break things so catch them immediately. +case $(pwd) in + ' ' | ' ' | ' +') echo "Error: White space in the directory name" >&2; exit 1 ;; +esac + +# This script can be run either at the top-level directory of the package +# or in the same directory containing this script. +if [ ! -f windows/build.bash ]; then + cd .. + if [ ! -f windows/build.bash ]; then + echo "ERROR: You are in a wrong directory. This script" >&2 + echo "can be run either at the top-level directory of" >&2 + echo "the package or in the same directory containing" >&2 + echo "this script." >&2 + exit 1 + fi +fi + +# COPYING.MinGW-w64-runtime.txt needs to be manually copied from MinGW-w64. +if [ ! -f windows/COPYING.MinGW-w64-runtime.txt ]; then + echo "ERROR: The file 'windows/COPYING.MinGW-w64-runtime.txt'" >&2 + echo "doesn't exists. Copy it from MinGW-w64 so that the" >&2 + echo "copyright and license notices of the MinGW-w64 runtime" >&2 + echo "can be included in the package." >&2 + echo "(Or create an empty file if only doing a test build.)" >&2 + exit 1 +fi + +# Number of jobs for "make": +MAKE_JOBS=$(nproc 2> /dev/null || echo 1) + +# "make check" has to be skipped when cross-compiling. +if [ "x$(uname -o)" = xMsys ]; then + IS_NATIVE_BUILD=true +else + IS_NATIVE_BUILD=false +fi + +# Run configure and copy the binaries to the given directory. +# +# The first argument is the directory where to copy the binaries. +# The rest of the arguments are passed to configure. +buildit() +{ + DESTDIR=$1 + TRIPLET=$2 + CFLAGS=$3 + + # In the MinGW-w64 + GCC toolchains running natively on Windows, + # $TRIPLET-windres and $TRIPLET-strip commands might not exist. + # Only the short names "windres" and "strip" might be available. + # If both i686 and x86_64 toolchains are in PATH, wrong windres.exe + # will be used for one of the builds, making the build fail. The + # workaround is to put the directory of $TRIPLET-gcc to the front + # of PATH if $TRIPLET-windres or $TRIPLET-strip is missing. + OLD_PATH=$PATH + if type -P "$TRIPLET-windres" > /dev/null \ + && type -P "$TRIPLET-strip" > /dev/null; then + STRIP=$TRIPLET-strip + else + STRIP=strip + GCC_DIR=$(type -P "$TRIPLET-gcc") + PATH=${GCC_DIR%/*}:$PATH + fi + + # Clean up if it was already configured. + [ -f Makefile ] && make distclean + + # Build the size-optimized binaries. Providing size-optimized liblzma + # could be considered but I don't know if it should only use -Os or + # should it also use --enable-small and if it should support + # threading. So I don't include a size-optimized liblzma for now. + ./configure \ + --prefix= \ + --enable-silent-rules \ + --disable-dependency-tracking \ + --disable-nls \ + --disable-scripts \ + --disable-threads \ + --disable-shared \ + --enable-small \ + --host="$TRIPLET" \ + CFLAGS="$CFLAGS -Os" + make -j"$MAKE_JOBS" + + if "$IS_NATIVE_BUILD"; then + make -j"$MAKE_JOBS" check + fi + + mkdir -pv "$DESTDIR" + cp -v src/xzdec/{xz,lzma}dec.exe src/lzmainfo/lzmainfo.exe "$DESTDIR" + + make distclean + + # Build the normal speed-optimized binaries. The type of threading + # (win95 vs. vista) will be autodetect from the target architecture. + ./configure \ + --prefix= \ + --enable-silent-rules \ + --disable-dependency-tracking \ + --disable-nls \ + --disable-scripts \ + --host="$TRIPLET" \ + CFLAGS="$CFLAGS -O2" + make -j"$MAKE_JOBS" -C src/liblzma + make -j"$MAKE_JOBS" -C src/xz LDFLAGS=-static + + if "$IS_NATIVE_BUILD"; then + make -j"$MAKE_JOBS" -C tests check + fi + + cp -v src/xz/xz.exe "$DESTDIR" + cp -v src/liblzma/.libs/liblzma-5.dll "$DESTDIR/liblzma.dll" + "$STRIP" -v "$DESTDIR/"*.{exe,dll} + + PATH=$OLD_PATH +} + +# Copy files and convert newlines from LF to CR+LF. Optionally add a suffix +# to the destination filename. +# +# The first argument is the destination directory. The second argument is +# the suffix to append to the filenames; use empty string if no extra suffix +# is wanted. The rest of the arguments are the actual filenames. +txtcp() +{ + DESTDIR=$1 + SUFFIX=$2 + shift 2 + for SRCFILE; do + DESTFILE="$DESTDIR/${SRCFILE##*/}$SUFFIX" + echo "Converting '$SRCFILE' -> '$DESTFILE'" + sed s/\$/$'\r'/ < "$SRCFILE" > "$DESTFILE" + done +} + +if type -P i686-w64-mingw32-gcc > /dev/null; then + # 32-bit x86, Win2k or later if using MSVCRT + # + # Uncomment if using MSVCRT and you want the binaries to be compatible + # with old Windows versions on old computers. + #buildit pkg/bin_i686 i686-w64-mingw32 '-march=i686 -mtune=generic' + + # 32-bit x86 with SSE2 (Win2k or later if using MSVCRT) + buildit pkg/bin_i686-sse2 i686-w64-mingw32 \ + '-march=i686 -msse2 -mtune=generic' +else + echo + echo "i686-w64-mingw32-gcc is not in PATH, skipping 32-bit x86 builds" + echo +fi + +if type -P x86_64-w64-mingw32-gcc > /dev/null; then + # x86-64, Windows Vista or later + buildit pkg/bin_x86-64 x86_64-w64-mingw32 \ + '-march=x86-64 -mtune=generic' +else + echo + echo "x86_64-w64-mingw32-gcc is not in PATH, skipping x86-64 build" + echo +fi + +if type -P ps2pdf > /dev/null; then + make pdf +fi + +# Copy the headers, the .def file, and the docs. +# They are the same for all architectures and builds. +mkdir -pv pkg/{include/lzma,doc/{manuals,examples}} +txtcp pkg/include "" src/liblzma/api/lzma.h +txtcp pkg/include/lzma "" src/liblzma/api/lzma/*.h +txtcp pkg/doc "" src/liblzma/liblzma.def +txtcp pkg/doc .txt AUTHORS COPYING COPYING.0BSD NEWS README THANKS +txtcp pkg/doc "" doc/*-file-format.txt \ + windows/README-Windows.txt \ + windows/liblzma-crt-mixing.txt \ + windows/COPYING.MinGW-w64-runtime.txt +txtcp pkg/doc/manuals "" doc/man/txt/{xz,xzdec,lzmainfo}.txt +if [ -d doc/man/pdf-a4 ]; then + cp -v doc/man/pdf-*/{xz,xzdec,lzmainfo}-*.pdf pkg/doc/manuals +fi +# cp -rv doc/api pkg/doc/api +txtcp pkg/doc/examples "" doc/examples/* + +# Create the package. This requires 7z from 7-Zip. +# If it isn't found, this step is skipped. +for SEVENZ in "$(type -P 7z || true)" \ + "$PROGRAMW6432/7-Zip/7z.exe" "$PROGRAMFILES/7-Zip/7z.exe" \ + "/c/Program Files/7-Zip/7z.exe" +do + [ -x "$SEVENZ" ] && break +done + +VER=$(sh build-aux/version.sh) +if [ -x "$SEVENZ" ]; then + cd pkg + "$SEVENZ" a -tzip "../xz-$VER-windows.zip" * + "$SEVENZ" a "../xz-$VER-windows.7z" * +else + echo + echo "NOTE: 7z was not found. xz-$VER-windows.zip" + echo " and xz-$VER-windows.7z were not created." + echo " You can create them yourself from the pkg directory." +fi + +echo +echo "Build completed successfully." +echo diff --git a/cpp/third_party/xz-5.8.3/windows/liblzma-crt-mixing.txt b/cpp/third_party/xz-5.8.3/windows/liblzma-crt-mixing.txt new file mode 100644 index 0000000000..4ef2f8ab39 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/windows/liblzma-crt-mixing.txt @@ -0,0 +1,70 @@ + +liblzma.dll and mixing C runtimes (CRTs) +---------------------------------------- + + If possible, liblzma.dll should be linked against the same CRT + (MSVCRT or UCRT) as the application calling the liblzma functions. + When this isn't possible, liblzma.dll will still work but there + are a few API functions that need extra care. + + Each CRT has its own memory allocator, stdio FILE implementation, + mapping of file descriptors from _open() to Windows' HANDLEs, and + so on. Mixing CRTs is a problem if, for example, one library calls + fopen() and then passes the resulting FILE* to a second library and + these two libraries use different CRTs. liblzma doesn't expose FILE + pointers or file descriptors in the API but the problem can occur + with memory allocation with a few specific functions. + + The most commonly-used API functions in liblzma are such that both + memory allocation and deallocation is done internally by liblzma, + thus most applications won't have any problems with mixing CRTs + with liblzma.dll. The following API functions are the exception: + + lzma/block.h: + lzma_block_header_decode + + lzma/filter.h: + lzma_filters_copy + lzma_filters_free + lzma_properties_decode + lzma_filter_flags_decode + lzma_str_to_filters + lzma_str_from_filters + lzma_str_list_filters + + Excluding lzma_filters_free(), the above functions allocate memory + and leave it to the caller to free it. lzma_filters_free() frees + memory given to it, and that memory may have been allocated outside + of liblzma. + + For example, if application calls lzma_str_list_filters(&ptr, ...) + and then uses free(ptr), something bad (memory corruption, crash) + will happen if the application and liblzma.dll aren't using the + same CRT. This can be worked around with a few lines of extra code. + + All these functions (and many others too) take a pointer to + lzma_allocator structure as an argument. Typically it is set to + NULL to let liblzma use malloc() and free() (and also calloc() + as it is faster than malloc() + memset()). A custom lzma_allocator + can be used to wrap malloc() and free() from application's CRT: + + static void * LZMA_API_CALL + my_alloc(void *opaque, size_t nmemb, size_t size) + { + // liblzma guarantees that this won't overflow. + return malloc(nmemb * size); + } + + static void LZMA_API_CALL + my_free(void *opaque, void *ptr) + { + free(ptr); + } + + static const lzma_allocator allocator + = { &my_alloc, &my_free, NULL }; + + By passing &allocator to the problematic functions, CRT mixing + should not cause any problems. There is no need to use &allocator + with functions other than those listed above. + diff --git a/cpp/third_party/zstd-1.5.7/.buckconfig b/cpp/third_party/zstd-1.5.7/.buckconfig new file mode 100644 index 0000000000..483f6053b2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.buckconfig @@ -0,0 +1,9 @@ +[cxx] + cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 + cflags = -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith + cxxppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 + cxxflags = -std=c++11 -Wno-deprecated-declarations + gtest_dep = //contrib/pzstd:gtest + +[httpserver] + port = 0 diff --git a/cpp/third_party/zstd-1.5.7/.buckversion b/cpp/third_party/zstd-1.5.7/.buckversion new file mode 100644 index 0000000000..892fad966f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.buckversion @@ -0,0 +1 @@ +c8dec2e8da52d483f6dd7c6cd2ad694e8e6fed2b diff --git a/cpp/third_party/zstd-1.5.7/.cirrus.yml b/cpp/third_party/zstd-1.5.7/.cirrus.yml new file mode 100644 index 0000000000..745024bc22 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.cirrus.yml @@ -0,0 +1,9 @@ +task: + name: FreeBSD (make check) + freebsd_instance: + matrix: + image_family: freebsd-14-2 + install_script: pkg install -y gmake coreutils + script: | + MOREFLAGS="-Werror" gmake -j all + gmake check diff --git a/cpp/third_party/zstd-1.5.7/.gitattributes b/cpp/third_party/zstd-1.5.7/.gitattributes new file mode 100644 index 0000000000..6212bd405b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.gitattributes @@ -0,0 +1,21 @@ +# Set the default behavior +* text eol=lf + +# Explicitly declare source files +*.c text eol=lf +*.h text eol=lf + +# Denote files that should not be modified. +*.odt binary +*.png binary + +# Visual Studio +*.sln text eol=crlf +*.vcxproj* text eol=crlf +*.vcproj* text eol=crlf +*.suo binary +*.rc text eol=crlf + +# Windows +*.bat text eol=crlf +*.cmd text eol=crlf diff --git a/cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/bug_report.md b/cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..755a46af14 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Downloads data '...' +2. Run '...' with flags '...' +3. Scroll up on the log to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots and charts** +If applicable, add screenshots and charts to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. Mac] + - Version [e.g. 22] + - Compiler [e.g. gcc] + - Flags [e.g. O2] + - Other relevant hardware specs [e.g. Dual-core] + - Build system [e.g. Makefile] + +**Additional context** +Add any other context about the problem here. diff --git a/cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/feature_request.md b/cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..bbcbbe7d61 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/cpp/third_party/zstd-1.5.7/.github/dependabot.yml b/cpp/third_party/zstd-1.5.7/.github/dependabot.yml new file mode 100644 index 0000000000..5ace4600a1 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/cpp/third_party/zstd-1.5.7/.github/workflows/android-ndk-build.yml b/cpp/third_party/zstd-1.5.7/.github/workflows/android-ndk-build.yml new file mode 100644 index 0000000000..175add4ff9 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/workflows/android-ndk-build.yml @@ -0,0 +1,39 @@ +name: Android NDK Build + +on: + pull_request: + branches: [ dev, release, actionsTest ] + push: + branches: [ actionsTest, '*ndk*' ] + +permissions: read-all + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + + - name: Set up JDK 17 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Android SDK + uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2 + + - name: Install Android NDK + run: | + sdkmanager --install "ndk;27.0.12077973" + echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/27.0.12077973" >> $GITHUB_ENV + + - name: Build with NDK + run: | + export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH + make CC=aarch64-linux-android21-clang \ + AR=llvm-ar \ + RANLIB=llvm-ranlib \ + STRIP=llvm-strip + diff --git a/cpp/third_party/zstd-1.5.7/.github/workflows/commit.yml b/cpp/third_party/zstd-1.5.7/.github/workflows/commit.yml new file mode 100644 index 0000000000..659072861f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/workflows/commit.yml @@ -0,0 +1,104 @@ +name: facebook/zstd/commit +on: + push: + branches: + - dev + pull_request: + branches: + - dev + +permissions: read-all + +jobs: + short-tests-0: + runs-on: ubuntu-latest + services: + docker: + image: fbopensource/zstd-circleci-primary:0.0.1 + options: --entrypoint /bin/bash + steps: + - uses: actions/checkout@v4 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install libcurl4-gnutls-dev + - name: Test + run: | + ./tests/test-license.py + cc -v + CFLAGS="-O0 -Werror -pedantic" make allmost; make clean + make c99build; make clean + make c11build; make clean + make -j regressiontest; make clean + make check; make clean + make cxxtest; make clean + + short-tests-1: + runs-on: ubuntu-latest + services: + docker: + image: fbopensource/zstd-circleci-primary:0.0.1 + options: --entrypoint /bin/bash + steps: + - uses: actions/checkout@v4 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu libc6-dev-ppc64-powerpc-cross libcurl4-gnutls-dev lib64gcc-13-dev-powerpc-cross + - name: gnu90 build + run: make gnu90build && make clean + - name: gnu99 build + run: make gnu99build && make clean + - name: ppc64 build + run: make ppc64build V=1 && make clean + - name: ppc build + run: make ppcbuild V=1 && make clean + - name: arm build + run: make armbuild V=1 && make clean + - name: aarch64 build + run: make aarch64build V=1 && make clean + - name: test-legacy + run: make -C tests test-legacy V=1 && make clean + - name: test-longmatch + run: make -C tests test-longmatch V=1 && make clean + - name: libzstd-nomt build + run: make -C lib libzstd-nomt V=1 && make clean + + regression-test: + runs-on: ubuntu-latest + services: + docker: + image: fbopensource/zstd-circleci-primary:0.0.1 + options: --entrypoint /bin/bash + env: + CIRCLE_ARTIFACTS: "/tmp/circleci-artifacts" + steps: + - uses: actions/checkout@v4 + - name: restore_cache + uses: actions/cache@v4 + with: + key: regression-cache-{{ checksum "tests/regression/data.c" }}-v0 + path: tests/regression/cache + restore-keys: regression-cache-{{ checksum "tests/regression/data.c" }}-v0 + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install libcurl4-gnutls-dev + - name: Regression Test + run: | + make -C programs zstd + make -C tests/regression test + mkdir -p $CIRCLE_ARTIFACTS + ./tests/regression/test \ + --cache tests/regression/cache \ + --output $CIRCLE_ARTIFACTS/results.csv \ + --zstd programs/zstd + echo "NOTE: The new results.csv is uploaded as an artifact to this job" + echo " If this fails, go to the Artifacts pane in CircleCI, " + echo " download /tmp/circleci-artifacts/results.csv, and if they " + echo " are still good, copy it into the repo and commit it." + echo "> diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv" + diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv + - uses: actions/upload-artifact@v4 + with: + path: "/tmp/circleci-artifacts" diff --git a/cpp/third_party/zstd-1.5.7/.github/workflows/dev-long-tests.yml b/cpp/third_party/zstd-1.5.7/.github/workflows/dev-long-tests.yml new file mode 100644 index 0000000000..899a57b754 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/workflows/dev-long-tests.yml @@ -0,0 +1,313 @@ +name: dev-long-tests +# Tests longer than 10mn + +concurrency: + group: long-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + branches: [ dev, release, actionsTest ] + +permissions: read-all + +jobs: + make-all: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: make all + run: make all + + # lasts ~24mn + make-test: + runs-on: ubuntu-latest + env: + DEVNULLRIGHTS: 1 + READFROMBLOCKDEVICE: 1 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: make test + run: make test + + # lasts ~26mn + make-test-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: make test on macos + run: make test + + # lasts ~24mn + make-test-32bit: + runs-on: ubuntu-latest + env: + DEVNULLRIGHTS: 1 + READFROMBLOCKDEVICE: 1 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: make test # note: `make -j test success` seems to require a clean state + run: | + sudo apt-get -qqq update + make libc6install + make clean + CFLAGS="-m32 -O2" make -j test V=1 + + no-intrinsics-fuzztest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: no intrinsics fuzztest + run: MOREFLAGS="-DZSTD_NO_INTRINSICS" make -C tests fuzztest + + tsan-zstreamtest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: thread sanitizer zstreamtest + run: CC=clang ZSTREAM_TESTTIME=-T3mn make tsan-test-zstream + + uasan-zstreamtest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: ub + address sanitizer on zstreamtest + run: CC=clang make uasan-test-zstream + + # lasts ~15mn + tsan-fuzztest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: thread sanitizer fuzztest + run: CC=clang make tsan-fuzztest + + + big-tests-zstreamtest32: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: zstream tests in 32bit mode, with big tests + run: | + sudo apt-get -qqq update + make libc6install + CC=clang make -C tests test-zstream32 FUZZER_FLAGS="--big-tests" + + # lasts ~23mn + gcc-8-asan-ubsan-testzstd: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: gcc-8 + ASan + UBSan + Test Zstd + # See https://askubuntu.com/a/1428822 + run: | + echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list + sudo apt-get -qqq update + make gcc8install + CC=gcc-8 make -j uasan-test-zstd cross.ini < + msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=${{matrix.toolset}} + /t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} /warnaserror + - name: Build ${{matrix.name}} + working-directory: ${{env.GITHUB_WORKSPACE}} + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + if: ${{ matrix.arch != '' }} + run: > + msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=${{matrix.toolset}} + /t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} /warnaserror + /p:InstructionSet=${{matrix.arch}} + + # This tests that we don't accidentally grow the size too much. + # If the size grows intentionally, you can raise these numbers. + # But we do need to think about binary size, since it is a concern. + libzstd-size: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: libzstd size test + run: | + make clean && make -j -C lib libzstd && ./tests/check_size.py lib/libzstd.so 1100000 + make clean && make -j -C lib libzstd ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 400000 + make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 && ./tests/check_size.py lib/libzstd.so 300000 + make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 80000 + + minimal-decompressor-macros: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: minimal decompressor macros + run: | + make clean && make -j all ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror" + make clean && make check ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror" + make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT" + make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT" + make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG" + make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG" + make clean && make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" + make clean && make check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" + make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP=1 MOREFLAGS="-Werror" + make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_GREEDY_AND_UP=1 MOREFLAGS="-Werror" + + dynamic-bmi2: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: dynamic bmi2 tests + run: | + make clean && make -j check MOREFLAGS="-O0 -Werror -mbmi2" + make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1" + make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1 -mbmi2" + make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0" + make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0 -mbmi2" + + test-variants: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: make all variants & validate + run: | + make -j -C programs allVariants MOREFLAGS=-O0 + ./tests/test-variants.sh + + qemu-consistency: + name: QEMU ${{ matrix.name }} + runs-on: ubuntu-24.04 + strategy: + fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed. + matrix: + include: [ + { name: ARM, xcc_pkg: gcc-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static }, + { name: ARM64, xcc_pkg: gcc-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc, xemu_pkg: qemu-system-aarch64,xemu: qemu-aarch64-static }, + { name: PPC, xcc_pkg: gcc-powerpc-linux-gnu, xcc: powerpc-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc-static }, + { name: PPC64LE, xcc_pkg: gcc-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static }, + { name: S390X, xcc_pkg: gcc-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static }, + { name: MIPS, xcc_pkg: gcc-mips-linux-gnu, xcc: mips-linux-gnu-gcc, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static }, + { name: RISC-V, xcc_pkg: gcc-riscv64-linux-gnu, xcc: riscv64-linux-gnu-gcc, xemu_pkg: qemu-system-riscv64,xemu: qemu-riscv64-static }, + { name: M68K, xcc_pkg: gcc-m68k-linux-gnu, xcc: m68k-linux-gnu-gcc, xemu_pkg: qemu-system-m68k, xemu: qemu-m68k-static }, + { name: SPARC, xcc_pkg: gcc-sparc64-linux-gnu, xcc: sparc64-linux-gnu-gcc, xemu_pkg: qemu-system-sparc, xemu: qemu-sparc64-static }, + ] + env: # Set environment variables + XCC: ${{ matrix.xcc }} + XEMU: ${{ matrix.xemu }} + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: apt update & install + run: | + sudo apt-get update + sudo apt-get install gcc-multilib g++-multilib qemu-utils qemu-user-static + sudo apt-get install ${{ matrix.xcc_pkg }} ${{ matrix.xemu_pkg }} + - name: Environment info + run: | + echo && which $XCC + echo && $XCC --version + echo && $XCC -v # Show built-in specs + echo && which $XEMU + echo && $XEMU --version + - name: ARM + if: ${{ matrix.name == 'ARM' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + - name: ARM64 + if: ${{ matrix.name == 'ARM64' }} + run: | + make clean + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make -j check +# This test is only compatible with standard libraries that support BTI (Branch Target Identification). +# Unfortunately, the standard library provided on Ubuntu 24.04 does not have this feature enabled. +# make clean +# LDFLAGS="-static -z force-bti" MOREFLAGS="-mbranch-protection=standard" CC=$XCC QEMU_SYS=$XEMU make check V=1 + - name: PPC + if: ${{ matrix.name == 'PPC' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + - name: PPC64LE + if: ${{ matrix.name == 'PPC64LE' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + - name: S390X + if: ${{ matrix.name == 'S390X' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + - name: MIPS + if: ${{ matrix.name == 'MIPS' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + - name: RISC-V + if: ${{ matrix.name == 'RISC-V' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + - name: M68K + if: ${{ matrix.name == 'M68K' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + - name: SPARC + if: ${{ matrix.name == 'SPARC' }} + run: | + LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check + + mingw-short-test: + runs-on: windows-latest + strategy: + fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed. + matrix: + include: [ + { compiler: gcc, msystem: MINGW32, cflags: "-Werror"}, + { compiler: gcc, msystem: MINGW64, cflags: "-Werror"}, + { compiler: clang, msystem: MINGW64, cflags: "--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion -Wno-unused-command-line-argument"}, + ] + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # tag=v2.26.0 + with: + msystem: ${{ matrix.msystem }} + install: make diffutils + update: true + # Based on https://ariya.io/2020/07/on-github-actions-with-msys2 + - name: install mingw gcc i686 + if: ${{ (matrix.msystem == 'MINGW32') && (matrix.compiler == 'gcc') }} + run: pacman --noconfirm -S mingw-w64-i686-gcc + - name: install mingw gcc x86_64 + if: ${{ (matrix.msystem == 'MINGW64') && (matrix.compiler == 'gcc') }} + run: pacman --noconfirm -S mingw-w64-x86_64-gcc + - name: install mingw clang i686 + if: ${{ (matrix.msystem == 'MINGW32') && (matrix.compiler == 'clang') }} + run: pacman --noconfirm -S mingw-w64-i686-clang + - name: install mingw clang x86_64 + if: ${{ (matrix.msystem == 'MINGW64') && (matrix.compiler == 'clang') }} + run: pacman --noconfirm -S mingw-w64-x86_64-clang + - name: run mingw tests + run: | + make -v + export CC=${{ matrix.compiler }} + $CC --version + CFLAGS="${{ matrix.cflags }}" make -j allzstd + echo "Testing $CC ${{ matrix.msystem }}" + make clean + MSYS="" make check + + visual-runtime-tests: + runs-on: windows-latest + strategy: + matrix: + platform: [x64, Win32] + configuration: [Release] + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # tag=v2.0.0 + - name: Build and run tests + working-directory: ${{env.GITHUB_WORKSPACE}} + env: + ZSTD_BIN: ./zstd.exe + DATAGEN_BIN: ./datagen.exe + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + run: | + msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v142 /t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} + COPY build\VS2010\bin\${{matrix.platform}}_${{matrix.configuration}}\*.exe tests\ + CD tests + sh -e playTests.sh + .\fuzzer.exe -T2m + + # Following instructions at: https://github.com/marketplace/actions/install-cygwin-action + cygwin-tests: + runs-on: windows-latest + steps: + - run: git config --global core.autocrlf input + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # tag=v5 + with: + platform: x86_64 + packages: >- + autoconf, + automake, + gcc-g++, + make, + mingw64-x86_64-gcc-g++, + patch, + perl + - name: cygwin tests + shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}' + run: >- + export PATH=/usr/bin:$(cygpath ${SYSTEMROOT})/system32 && + export CFLAGS="-Werror -O1" && + ls && + make -j allzstd && + make -C tests fuzzer && + ./tests/fuzzer.exe -v -T1m + - name: cygwin install test + shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}' + run: >- + make -j && + make install + + pkg-config: + runs-on: ubuntu-latest + container: + image: debian:testing + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: Install dependencies + run: | + apt -y update + apt -y install --no-install-recommends gcc libc6-dev make pkg-config + - name: Build and install + run: make -C lib install + - name: Test pkg-config + run: | + cc -Wall -Wextra -Wpedantic -Werror -o simple examples/simple_compression.c $(pkg-config --cflags --libs libzstd) + ./simple LICENSE + + versions-compatibility: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: Versions Compatibility Test + run: | + make -C tests versionsTest + + clangbuild: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: make clangbuild + run: | + make clangbuild + + gcc-pgo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: Build PGO Zstd with GCC + env: + CC: gcc + run: | + make -C programs zstd-pgo + ./programs/zstd -b + + clang-pgo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: Build PGO Zstd with Clang + env: + CC: clang + run: | + sudo apt install -y llvm + llvm-profdata --version + make -C programs zstd-pgo + ./programs/zstd -b + + intel-cet-compatibility: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: Build Zstd + run: | + make -j zstd V=1 + readelf -n zstd + - name: Get Intel SDE + run: | + curl -LO https://downloadmirror.intel.com/813591/sde-external-9.33.0-2024-01-07-lin.tar.xz + tar xJvf sde-external-9.33.0-2024-01-07-lin.tar.xz + - name: Configure Permissions + run: | + echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope + - name: Run Under SDE + run: | + sde-external-9.33.0-2024-01-07-lin/sde -cet -cet-raise 0 -cet-endbr-exe -cet-stderr -cet-abort -- ./zstd -b3 + + icx: + # install instructions: https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2025-0/apt-005.html + name: icx-check + runs-on: ubuntu-latest + steps: + - name: install icx + run: | + # download the key to system keyring + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + + # add signed entry to apt sources and configure the APT client to use Intel repository: + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt-get update + sudo apt-get install -y intel-basekit intel-hpckit + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + - name: make check + run: | + source /opt/intel/oneapi/setvars.sh + make CC=icx check diff --git a/cpp/third_party/zstd-1.5.7/.github/workflows/nightly.yml b/cpp/third_party/zstd-1.5.7/.github/workflows/nightly.yml new file mode 100644 index 0000000000..5e531d3b67 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/workflows/nightly.yml @@ -0,0 +1,38 @@ +name: facebook/zstd/nightly +on: + schedule: + - cron: '0 0 * * *' + push: + branches: + - release + - dev + - '*nightly*' +permissions: read-all +jobs: + regression-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev + - name: Regression Test + run: | + make -C programs zstd + make -C tests/regression test + +# Longer tests + #- make -C tests test-zstd-nolegacy && make clean + #- pyenv global 3.4.4; make -C tests versionsTest && make clean + #- make zlibwrapper && make clean + #- gcc -v; make -C tests test32 MOREFLAGS="-I/usr/include/x86_64-linux-gnu" && make clean + #- make uasan && make clean + #- make asan32 && make clean + #- make -C tests test32 CC=clang MOREFLAGS="-g -fsanitize=address -I/usr/include/x86_64-linux-gnu" +# Valgrind tests + #- CFLAGS="-O1 -g" make -C zlibWrapper valgrindTest && make clean + #- make -C tests valgrindTest && make clean +# ARM, AArch64, PowerPC, PowerPC64 tests + #- make ppctest && make clean + #- make ppc64test && make clean + #- make armtest && make clean + #- make aarch64test && make clean diff --git a/cpp/third_party/zstd-1.5.7/.github/workflows/publish-release-artifacts.yml b/cpp/third_party/zstd-1.5.7/.github/workflows/publish-release-artifacts.yml new file mode 100644 index 0000000000..f7af27914c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/workflows/publish-release-artifacts.yml @@ -0,0 +1,73 @@ +name: publish-release-artifacts + +on: + release: + types: + - published + +permissions: read-all + +jobs: + publish-release-artifacts: + permissions: + contents: write # to fetch code and upload artifacts + + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v3 + + - name: Archive + env: + RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }} + RELEASE_SIGNING_KEY_PASSPHRASE: ${{ secrets.RELEASE_SIGNING_KEY_PASSPHRASE }} + run: | + # compute file name + export TAG="$(echo "$GITHUB_REF" | sed -n 's_^refs/tags/__p')" + if [ -z "$TAG" ]; then + echo "action must be run on a tag. GITHUB_REF is not a tag: $GITHUB_REF" + exit 1 + fi + # Attempt to extract "1.2.3" from "v1.2.3" to maintain artifact name backwards compat. + # Otherwise, degrade to using full tag. + export VERSION="$(echo "$TAG" | sed 's_^v\([0-9]\+\.[0-9]\+\.[0-9]\+\)$_\1_')" + export ZSTD_VERSION="zstd-$VERSION" + + # archive + git archive $TAG \ + --prefix $ZSTD_VERSION/ \ + --format tar \ + -o $ZSTD_VERSION.tar + + # Do the rest of the work in a sub-dir so we can glob everything we want to publish. + mkdir artifacts/ + mv $ZSTD_VERSION.tar artifacts/ + cd artifacts/ + + # compress + zstd -k -19 $ZSTD_VERSION.tar + gzip -k -9 $ZSTD_VERSION.tar + + # we only publish the compressed tarballs + rm $ZSTD_VERSION.tar + + # hash + sha256sum $ZSTD_VERSION.tar.zst > $ZSTD_VERSION.tar.zst.sha256 + sha256sum $ZSTD_VERSION.tar.gz > $ZSTD_VERSION.tar.gz.sha256 + + # sign + if [ -n "$RELEASE_SIGNING_KEY" ]; then + export GPG_BATCH_OPTS="--batch --no-use-agent --pinentry-mode loopback --no-tty --yes" + echo "$RELEASE_SIGNING_KEY" | gpg $GPG_BATCH_OPTS --import + gpg $GPG_BATCH_OPTS --armor --sign --sign-with signing@zstd.net --detach-sig --passphrase "$RELEASE_SIGNING_KEY_PASSPHRASE" --output $ZSTD_VERSION.tar.zst.sig $ZSTD_VERSION.tar.zst + gpg $GPG_BATCH_OPTS --armor --sign --sign-with signing@zstd.net --detach-sig --passphrase "$RELEASE_SIGNING_KEY_PASSPHRASE" --output $ZSTD_VERSION.tar.gz.sig $ZSTD_VERSION.tar.gz + fi + + - name: Publish + uses: skx/github-action-publish-binaries@b9ca5643b2f1d7371a6cba7f35333f1461bbc703 # tag=release-2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: artifacts/* diff --git a/cpp/third_party/zstd-1.5.7/.github/workflows/scorecards.yml b/cpp/third_party/zstd-1.5.7/.github/workflows/scorecards.yml new file mode 100644 index 0000000000..e532b03bfb --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/workflows/scorecards.yml @@ -0,0 +1,64 @@ +name: Scorecards supply-chain security +on: + # Only the default branch is supported. + branch_protection_rule: + schedule: + - cron: '22 21 * * 2' + push: + # TODO: Add release branch when supported? + branches: [ "dev" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecards analysis + if: github.repository == 'facebook/zstd' + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Used to receive a badge. + id-token: write + # Needs for private repositories. + contents: read + actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v3 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # tag=v2.4.0 + with: + results_file: results.sarif + results_format: sarif + # (Optional) Read-only PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecards on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} + + # Publish the results for public repositories to enable scorecard badges. For more details, see + # https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories, `publish_results` will automatically be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # tag=v4.3.1 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # tag=v3.28.9 + with: + sarif_file: results.sarif diff --git a/cpp/third_party/zstd-1.5.7/.github/workflows/windows-artifacts.yml b/cpp/third_party/zstd-1.5.7/.github/workflows/windows-artifacts.yml new file mode 100644 index 0000000000..35999476e5 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.github/workflows/windows-artifacts.yml @@ -0,0 +1,58 @@ +name: windows-artifacts + +on: + push: + branches: [ test_artifacts, win_artifacts ] + release: + types: + - published + +permissions: read-all + +jobs: + windows-artifacts: + # see https://ariya.io/2020/07/on-github-actions-with-msys2 + runs-on: windows-latest + # see https://github.com/msys2/setup-msys2 + strategy: + matrix: + include: + - { msystem: mingw64, env: x86_64, ziparch: win64 } + - { msystem: mingw32, env: i686, ziparch: win32 } + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v3 + - uses: msys2/setup-msys2@d44ca8e88d8b43d56cf5670f91747359d5537f97 # tag=v2.26.0 + with: + msystem: ${{ matrix.msystem }} + install: make zlib git p7zip mingw-w64-${{matrix.env}}-gcc + update: true + + - name: display versions + run: | + make -v + cc -v + + - name: Building zlib to static link + run: | + git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib + make -C zlib -f win32/Makefile.gcc libz.a + + - name: Building zstd programs + run: | + CPPFLAGS=-I../zlib LDFLAGS=../zlib/libz.a make -j allzstd MOREFLAGS=-static V=1 + + - name: Create artifacts + run: | + ./lib/dll/example/build_package.bat + mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/ + 7z a -tzip -mx9 zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip zstd-${{ github.ref_name }}-${{matrix.ziparch}}/ + cd .. + + - name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # tag=v4.3.1 + with: + path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip + name: zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip diff --git a/cpp/third_party/zstd-1.5.7/.gitignore b/cpp/third_party/zstd-1.5.7/.gitignore new file mode 100644 index 0000000000..4b50bb186b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/.gitignore @@ -0,0 +1,63 @@ +# Object files +*.o +*.ko +*.dSYM + +# Libraries +*.lib +*.a + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib +*.framework +*.xcframework + +# Executables +/zstd +zstdmt +*.exe +*.out +*.app + +# Test artefacts +tmp* +*.zst +*.zstd +dictionary. +dictionary +NUL +cmakebuild/ +install/ + +# Build artefacts +contrib/linux-kernel/linux/ +projects/ +bin/ +.buckd/ +buck-out/ +build-* +*.gcda + +# IDE +.clang_complete +compile_flags.txt +.clang-format + +# Other files +.directory +_codelite/ +_zstdbench/ +*.idea +*.swp +.DS_Store +googletest/ +*.d +*.vscode +*.code-workspace +compile_commands.json +.clangd +perf.data +perf.data.old diff --git a/cpp/third_party/zstd-1.5.7/CHANGELOG b/cpp/third_party/zstd-1.5.7/CHANGELOG new file mode 100644 index 0000000000..92df0f462e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/CHANGELOG @@ -0,0 +1,863 @@ +V1.5.7 (Feb 2025) +fix: compression bug in 32-bit mode associated with long-lasting sessions +api: new method `ZSTD_compressSequencesAndLiterals()` (#4217, #4232) +api: `ZSTD_getFrameHeader()` works on skippable frames (#4228) +perf: substantial compression speed improvements (up to +30%) on small data, by @TocarIP (#4144) and @cyan4973 (#4165) +perf: improved compression speed (~+5%) for dictionary compression at low levels (#4170) +perf: much faster speed for `--patch-from` at high compression levels (#4276) +perf: higher `--patch-from` compression ratios, notably at high levels (#4288) +perf: better speed for binaries on Windows (@pps83) and when compiled with Visual Studio (@MessyHack) +perf: slight compression ratio improvement thanks to better block boundaries (#4136, #4176, #4178) +perf: slight compression ratio improvement for `dfast`, aka levels 3 and 4 (#4171) +perf: runtime bmi2 detection enabled on x86 32-bit mode (#4251) +cli: multi-threading as default CLI setting, by @daniellerozenblit +cli: new `--max` command (#4290) +build: improve `msbuild` version autodetection, support VS2022, by @ManuelBlanc +build: fix `meson` build by @artem and @Victor-C-Zhang, and on Windows by @bgilbert +build: compatibility with Apple Framework, by @Treata11 +build: improve icc/icx compatibility, by @josepho0918 and @luau-project +build: improve compatibility with Android NDK, by Adenilson Cavalcanti +portability: linux kernel branch, with improved support for Sequence producers (@embg, @gcabiddu, @cyan4973) +portability: improved qnx compatibility, suggested by @rainbowball +portability: improved install script for FreeBSD, by @sunpoet +portability: fixed test suite compatibility with gnu hurd, by @diegonc +doc: clarify specification, by @elasota +misc: improved tests/decodecorpus validation tool (#4102), by antmicro + +V1.5.6 (Mar 2024) +api: Promote `ZSTD_c_targetCBlockSize` to Stable API by @felixhandte +api: new `ZSTD_d_maxBlockSize` experimental parameter, to reduce streaming decompression memory, by @terrelln +perf: improve performance of param `ZSTD_c_targetCBlockSize`, by @Cyan4973 +perf: improved compression of arrays of integers at high compression, by @Cyan4973 +lib: reduce binary size with selective build-time exclusion, by @felixhandte +lib: improved huffman speed on small data and linux kernel, by @terrelln +lib: accept dictionaries with partial literal tables, by @terrelln +lib: fix CCtx size estimation with external sequence producer, by @embg +lib: fix corner case decoder behaviors, by @Cyan4973 and @aimuz +lib: fix zdict prototype mismatch in static_only mode, by @ldv-alt +lib: fix several bugs in magicless-format decoding, by @embg +cli: add common compressed file types to `--exclude-compressed`` by @daniellerozenblit +cli: fix mixing `-c` and `-o` commands with `--rm`, by @Cyan4973 +cli: fix erroneous exclusion of hidden files with `--output-dir-mirror` by @felixhandte +cli: improved time accuracy on BSD, by @felixhandte +cli: better errors on argument parsing, by @KapJI +tests: better compatibility with older versions of `grep`, by @Cyan4973 +tests: lorem ipsum generator as default backup content, by @Cyan4973 +build: cmake improvements by @terrelln, @sighingnow, @gjasny, @JohanMabille, @Saverio976, @gruenich, @teo-tsirpanis +build: bazel support, by @jondo2010 +build: fix cross-compiling for AArch64 with lld by @jcelerier +build: fix Apple platform compatibility, by @nidhijaju +build: fix Visual 2012 and lower compatibility, by @Cyan4973 +build: improve win32 support, by @DimitriPapadopoulos +build: better C90 compliance for zlibWrapper, by @emaste +port: make: fat binaries on macos, by @mredig +port: ARM64EC compatibility for Windows, by @dunhor +port: QNX support by @klausholstjacobsen +port: MSYS2 and Cygwin makefile installation and test support, by @QBos07 +port: risc-v support validation in CI, by @Cyan4973 +port: sparc64 support validation in CI, by @Cyan4973 +port: AIX compatibility, by @likema +port: HP-UX compatibility, by @likema +doc: Improved specification accuracy, by @elasota +bug: Fix and deprecate ZSTD_generateSequences (#3981) + +v1.5.5 (Apr 2023) +fix: fix rare corruption bug affecting the high compression mode, reported by @danlark1 (#3517, @terrelln) +perf: improve mid-level compression speed (#3529, #3533, #3543, @yoniko and #3552, @terrelln) +lib: deprecated bufferless block-level API (#3534) by @terrelln +cli: mmap large dictionaries to save memory, by @daniellerozenblit +cli: improve speed of --patch-from mode (~+50%) (#3545) by @daniellerozenblit +cli: improve i/o speed (~+10%) when processing lots of small files (#3479) by @felixhandte +cli: zstd no longer crashes when requested to write into write-protected directory (#3541) by @felixhandte +cli: fix decompression into block device using -o, reported by @georgmu (#3583) +build: fix zstd CLI compiled with lzma support but not zlib support (#3494) by @Hello71 +build: fix cmake does no longer require 3.18 as minimum version (#3510) by @kou +build: fix MSVC+ClangCL linking issue (#3569) by @tru +build: fix zstd-dll, version of zstd CLI that links to the dynamic library (#3496) by @yoniko +build: fix MSVC warnings (#3495) by @embg +doc: updated zstd specification to clarify corner cases, by @Cyan4973 +doc: document how to create fat binaries for macos (#3568) by @rickmark +misc: improve seekable format ingestion speed (~+100%) for very small chunk sizes (#3544) by @Cyan4973 +misc: tests/fullbench can benchmark multiple files (#3516) by @dloidolt + +v1.5.4 (Feb 2023) +perf: +20% faster huffman decompression for targets that can't compile x64 assembly (#3449, @terrelln) +perf: up to +10% faster streaming compression at levels 1-2 (#3114, @embg) +perf: +4-13% for levels 5-12 by optimizing function generation (#3295, @terrelln) +pref: +3-11% compression speed for `arm` target (#3199, #3164, #3145, #3141, #3138, @JunHe77 and #3139, #3160, @danlark1) +perf: +5-30% faster dictionary compression at levels 1-4 (#3086, #3114, #3152, @embg) +perf: +10-20% cold dict compression speed by prefetching CDict tables (#3177, @embg) +perf: +1% faster compression by removing a branch in ZSTD_fast_noDict (#3129, @felixhandte) +perf: Small compression ratio improvements in high compression mode (#2983, #3391, @Cyan4973 and #3285, #3302, @daniellerozenblit) +perf: small speed improvement by better detecting `STATIC_BMI2` for `clang` (#3080, @TocarIP) +perf: Improved streaming performance when `ZSTD_c_stableInBuffer` is set (#2974, @Cyan4973) +cli: Asynchronous I/O for improved cli speed (#2975, #2985, #3021, #3022, @yoniko) +cli: Change `zstdless` behavior to align with `zless` (#2909, @binhdvo) +cli: Keep original file if `-c` or `--stdout` is given (#3052, @dirkmueller) +cli: Keep original files when result is concatenated into a single output with `-o` (#3450, @Cyan4973) +cli: Preserve Permissions and Ownership of regular files (#3432, @felixhandte) +cli: Print zlib/lz4/lzma library versions with `-vv` (#3030, @terrelln) +cli: Print checksum value for single frame files with `-lv` (#3332, @Cyan4973) +cli: Print `dictID` when present with `-lv` (#3184, @htnhan) +cli: when `stderr` is *not* the console, disable status updates, but preserve final summary (#3458, @Cyan4973) +cli: support `--best` and `--no-name` in `gzip` compatibility mode (#3059, @dirkmueller) +cli: support for `posix` high resolution timer `clock_gettime()`, for improved benchmark accuracy (#3423, @Cyan4973) +cli: improved help/usage (`-h`, `-H`) formatting (#3094, @dirkmueller and #3385, @jonpalmisc) +cli: Fix better handling of bogus numeric values (#3268, @ctkhanhly) +cli: Fix input consists of multiple files _and_ `stdin` (#3222, @yoniko) +cli: Fix tiny files passthrough (#3215, @cgbur) +cli: Fix for `-r` on empty directory (#3027, @brailovich) +cli: Fix empty string as argument for `--output-dir-*` (#3220, @embg) +cli: Fix decompression memory usage reported by `-vv --long` (#3042, @u1f35c, and #3232, @zengyijing) +cli: Fix infinite loop when empty input is passed to trainer (#3081, @terrelln) +cli: Fix `--adapt` doesn't work when `--no-progress` is also set (#3354, @terrelln) +api: Support for Block-Level Sequence Producer (#3333, @embg) +api: Support for in-place decompression (#3432, @terrelln) +api: New `ZSTD_CCtx_setCParams()` function, set all parameters defined in a `ZSTD_compressionParameters` structure (#3403, @Cyan4973) +api: Streaming decompression detects incorrect header ID sooner (#3175, @Cyan4973) +api: Window size resizing optimization for edge case (#3345, @daniellerozenblit) +api: More accurate error codes for busy-loop scenarios (#3413, #3455, @Cyan4973) +api: Fix limit overflow in `compressBound` and `decompressBound` (#3362, #3373, Cyan4973) reported by @nigeltao +api: Deprecate several advanced experimental functions: streaming (#3408, @embg), copy (#3196, @mileshu) +bug: Fix corruption that rarely occurs in 32-bit mode with wlog=25 (#3361, @terrelln) +bug: Fix for block-splitter (#3033, @Cyan4973) +bug: Fixes for Sequence Compression API (#3023, #3040, @Cyan4973) +bug: Fix leaking thread handles on Windows (#3147, @animalize) +bug: Fix timing issues with cmake/meson builds (#3166, #3167, #3170, @Cyan4973) +build: Allow user to select legacy level for cmake (#3050, @shadchin) +build: Enable legacy support by default in cmake (#3079, @niamster) +build: Meson build script improvements (#3039, #3120, #3122, #3327, #3357, @eli-schwartz and #3276, @neheb) +build: Add aarch64 to supported architectures for zstd_trace (#3054, @ooosssososos) +build: support AIX architecture (#3219, @qiongsiwu) +build: Fix `ZSTD_LIB_MINIFY` build macro, which now reduces static library size by half (#3366, @terrelln) +build: Fix Windows issues with Multithreading translation layer (#3364, #3380, @yoniko) and ARM64 target (#3320, @cwoffenden) +build: Fix `cmake` script (#3382, #3392, @terrelln and #3252 @Tachi107 and #3167 @Cyan4973) +doc: Updated man page, providing more details for `--train` mode (#3112, @Cyan4973) +doc: Add decompressor errata document (#3092, @terrelln) +misc: Enable Intel CET (#2992, #2994, @hjl-tools) +misc: Fix `contrib/` seekable format (#3058, @yhoogstrate and #3346, @daniellerozenblit) +misc: Improve speed of the one-file library generator (#3241, @wahern and #3005, @cwoffenden) + +v1.5.3 (dev version, unpublished) + +v1.5.2 (Jan, 2022) +perf: Regain Minimal memset()-ing During Reuse of Compression Contexts (@Cyan4973, #2969) +build: Build Zstd with `noexecstack` on All Architectures (@felixhandte, #2964) +doc: Clarify Licensing (@terrelln, #2981) + +v1.5.1 (Dec, 2021) +perf: rebalanced compression levels, to better match the intended speed/level curve, by @senhuang42 +perf: faster huffman decoder, using x64 assembly, by @terrelln +perf: slightly faster high speed modes (strategies fast & dfast), by @felixhandte +perf: improved binary size and faster compilation times, by @terrelln +perf: new row64 mode, used notably in level 12, by @senhuang42 +perf: faster mid-level compression speed in presence of highly repetitive patterns, by @senhuang42 +perf: minor compression ratio improvements for small data at high levels, by @cyan4973 +perf: reduced stack usage (mostly useful for Linux Kernel), by @terrelln +perf: faster compression speed on incompressible data, by @bindhvo +perf: on-demand reduced ZSTD_DCtx state size, using build macro ZSTD_DECODER_INTERNAL_BUFFER, at a small cost of performance, by @bindhvo +build: allows hiding static symbols in the dynamic library, using build macro, by @skitt +build: support for m68k (Motorola 68000's), by @cyan4973 +build: improved AIX support, by @Helflym +build: improved meson unofficial build, by @eli-schwartz +cli : custom memory limit when training dictionary (#2925), by @embg +cli : report advanced parameters information when compressing in very verbose mode (`-vv`), by @Svetlitski-FB + +v1.5.0 (May 11, 2021) +api: Various functions promoted from experimental to stable API: (#2579-2581, @senhuang42) + `ZSTD_defaultCLevel()` + `ZSTD_getDictID_fromCDict()` +api: Several experimental functions have been deprecated and will emit a compiler warning (#2582, @senhuang42) + `ZSTD_compress_advanced()` + `ZSTD_compress_usingCDict_advanced()` + `ZSTD_compressBegin_advanced()` + `ZSTD_compressBegin_usingCDict_advanced()` + `ZSTD_initCStream_srcSize()` + `ZSTD_initCStream_usingDict()` + `ZSTD_initCStream_usingCDict()` + `ZSTD_initCStream_advanced()` + `ZSTD_initCStream_usingCDict_advanced()` + `ZSTD_resetCStream()` +api: ZSTDMT_NBWORKERS_MAX reduced to 64 for 32-bit environments (@Cyan4973) +perf: Significant speed improvements for middle compression levels (#2494, @senhuang42 @terrelln) +perf: Block splitter to improve compression ratio, enabled by default for high compression levels (#2447, @senhuang42) +perf: Decompression loop refactor, speed improvements on `clang` and for `--long` modes (#2614 #2630, @Cyan4973) +perf: Reduced stack usage during compression and decompression entropy stage (#2522 #2524, @terrelln) +bug: Improve setting permissions of created files (#2525, @felixhandte) +bug: Fix large dictionary non-determinism (#2607, @terrelln) +bug: Fix non-determinism test failures on Linux i686 (#2606, @terrelln) +bug: Fix various dedicated dictionary search bugs (#2540 #2586, @senhuang42 @felixhandte) +bug: Ensure `ZSTD_estimateCCtxSize*() `monotonically increases with compression level (#2538, @senhuang42) +bug: Fix --patch-from mode parameter bound bug with small files (#2637, @occivink) +bug: Fix UBSAN error in decompression (#2625, @terrelln) +bug: Fix superblock compression divide by zero bug (#2592, @senhuang42) +bug: Make the number of physical CPU cores detection more robust (#2517, @PaulBone) +doc: Improve `zdict.h` dictionary training API documentation (#2622, @terrelln) +doc: Note that public `ZSTD_free*()` functions accept NULL pointers (#2521, @animalize) +doc: Add style guide docs for open source contributors (#2626, @Cyan4973) +tests: Better regression test coverage for different dictionary modes (#2559, @senhuang42) +tests: Better test coverage of index reduction (#2603, @terrelln) +tests: OSS-Fuzz coverage for seekable format (#2617, @senhuang42) +tests: Test coverage for ZSTD threadpool API (#2604, @senhuang42) +build: Dynamic library built multithreaded by default (#2584, @senhuang42) +build: Move `zstd_errors.h` and `zdict.h` to `lib/` root (#2597, @terrelln) +build: Allow `ZSTDMT_JOBSIZE_MIN` to be configured at compile-time, reduce default to 512KB (#2611, @Cyan4973) +build: Single file library build script moved to `build/` directory (#2618, @felixhandte) +build: `ZBUFF_*()` is no longer built by default (#2583, @senhuang42) +build: Fixed Meson build (#2548, @SupervisedThinking @kloczek) +build: Fix excessive compiler warnings with clang-cl and CMake (#2600, @nickhutchinson) +build: Detect presence of `md5` on Darwin (#2609, @felixhandte) +build: Avoid SIGBUS on armv6 (#2633, @bmwiedmann) +cli: `--progress` flag added to always display progress bar (#2595, @senhuang42) +cli: Allow reading from block devices with `--force` (#2613, @felixhandte) +cli: Fix CLI filesize display bug (#2550, @Cyan4973) +cli: Fix windows CLI `--filelist` end-of-line bug (#2620, @Cyan4973) +contrib: Various fixes for linux kernel patch (#2539, @terrelln) +contrib: Seekable format - Decompression hanging edge case fix (#2516, @senhuang42) +contrib: Seekable format - New seek table-only API (#2113 #2518, @mdittmer @Cyan4973) +contrib: Seekable format - Fix seek table descriptor check when loading (#2534, @foxeng) +contrib: Seekable format - Decompression fix for large offsets, (#2594, @azat) +misc: Automatically published release tarballs available on Github (#2535, @felixhandte) + +v1.4.9 (Mar 1, 2021) +bug: Use `umask()` to Constrain Created File Permissions (#2495, @felixhandte) +bug: Make Simple Single-Pass Functions Ignore Advanced Parameters (#2498, @terrelln) +api: Add (De)Compression Tracing Functionality (#2482, @terrelln) +api: Support References to Multiple DDicts (#2446, @senhuang42) +api: Add Function to Generate Skippable Frame (#2439, @senhuang42) +perf: New Algorithms for the Long Distance Matcher (#2483, @mpu) +perf: Performance Improvements for Long Distance Matcher (#2464, @mpu) +perf: Don't Shrink Window Log when Streaming with a Dictionary (#2451, @terrelln) +cli: Fix `--output-dir-mirror` rejection of `..` -containing paths (#2512, @felixhandte) +cli: Allow Input From Console When `-f`/`--force` is Passed (#2466, @felixhandte) +cli: Improve Help Message (#2500, @senhuang42) +tests: Remove Flaky Tests (#2455, #2486, #2445, @Cyan4973) +tests: Correctly Invoke md5 Utility on NetBSD (#2492, @niacat) +tests: Avoid Using `stat -c` on NetBSD (#2513, @felixhandte) +build: Zstd CLI Can Now be Linked to Dynamic `libzstd` (#2457, #2454 @Cyan4973) +build: Hide and Avoid Using Static-Only Symbols (#2501, #2504, @skitt) +build: CMake: Enable Only C for lib/ and programs/ Projects (#2498, @concatime) +build: CMake: Use `configure_file()` to Create the `.pc` File (#2462, @lazka) +build: Fix Fuzzer Compiler Detection & Update UBSAN Flags (#2503, @terrelln) +build: Add Guards for `_LARGEFILE_SOURCE` and `_LARGEFILE64_SOURCE` (#2444, @indygreg) +build: Improve `zlibwrapper` Makefile (#2437, @Cyan4973) +contrib: Add `recover_directory` Program (#2473, @terrelln) +doc: Change License Year to 2021 (#2452 & #2465, @terrelln & @senhuang42) +doc: Fix Typos (#2459, @ThomasWaldmann) + +v1.4.8 (Dec 18, 2020) +hotfix: wrong alignment of an internal buffer + +v1.4.7 (Dec 16, 2020) +perf: stronger --long mode at high compression levels, by @senhuang42 +perf: stronger --patch-from at high compression levels, thanks to --long improvements +perf: faster dictionary compression at medium compression levels, by @felixhandte +perf: small speed & memory usage improvements for ZSTD_compress2(), by @terrelln +perf: improved fast compression speeds with Visual Studio, by @animalize +cli : Set nb of threads with environment variable ZSTD_NBTHREADS, by @senhuang42 +cli : accept decompressing files with *.zstd suffix +cli : provide a condensed summary by default when processing multiple files +cli : fix : stdin input no longer confused as user prompt +cli : improve accuracy of several error messages +api : new sequence ingestion API, by @senhuang42 +api : shared thread pool: control total nb of threads used by multiple compression jobs, by @marxin +api : new ZSTD_getDictID_fromCDict(), by @LuAPi +api : zlibWrapper only uses public API, and is compatible with dynamic library, by @terrelln +api : fix : multithreaded compression has predictable output even in special cases (see #2327) (issue not accessible from cli) +api : fix : dictionary compression correctly respects dictionary compression level (see #2303) (issue not accessible from cli) +build: fix cmake script when using path with spaces, by @terrelln +build: improved compile-time detection of aarch64/neon platforms, by @bsdimp +build: Fix building on AIX 5.1, by @likema +build: compile paramgrill with cmake on Windows, requested by @mirh +doc : clarify repcode updates in format specification, by @felixhandte + +v1.4.6 +fix : Always return dstSize_tooSmall when that is the case +fix : Fix ZSTD_initCStream_advanced() with static allocation and no dictionary +perf: Improve small block decompression speed by 20%+, by @terrelln +perf: Reduce compression stack usage by 1 KB, by @terrelln +perf: Improve decompression speed by improving ZSTD_wildcopy, by @helloguo (#2252, #2256) +perf: Improve histogram construction, by @cyan4973 (#2253) +cli : Add --output-dir-mirror option, by @xxie24 (#2219) +cli : Warn when (de)compressing multiple files into a single output, by @senhuang42 (#2279) +cli : Improved progress bar and status summary when (de)compressing multiple files, by @senhuang42 (#2283) +cli : Call stat less often, by @felixhandte (#2262) +cli : Allow --patch-from XXX and --filelist XXX in addition to --patch-from=XXX and --filelist=XXX, by @cyan4973 (#2250) +cli : Allow --patch-from to compress stdin with --stream-size, by @bimbashrestha (#2206) +api : Do not install zbuff.h, since it has long been deprecated, by @cyan4973 (#2166). +api : Fix ZSTD_CCtx_setParameter() with ZSTD_c_compressionLevel to make 0 mean default level, by @i-do-cpp (#2291) +api : Rename ZSTDMT_NBTHREADS_MAX to ZSTDMT_NBWORKERS_MAX, by @marxin (#2228). +build: Install pkg-config file with CMake and MinGW, by @tonytheodore (#2183) +build: Install DLL with CMake on Windows, by @BioDataAnalysis (#2221) +build: Fix DLL install location with CMake, by @xantares and @bimbashrestha (#2186) +build: Add ZSTD_NO_UNUSED_FUNCTIONS macro to hide unused functions +build: Add ZSTD_NO_INTRINSICS macro to avoid explicit intrinsics +build: Add STATIC_BMI2 macro for compile time detection of BMI2 on MSVC, by @Niadb (#2258) +build: Fix -Wcomma warnings, by @cwoffenden +build: Remove distutils requirement for meson build, by @neheb (#2197) +build: Fix cli compilation with uclibc +build: Fix cli compilation without st_mtime, by @ffontaine (#2246) +build: Fix shadowing warnings in library +build: Fix single file library compilation with Enscripten, by @yoshihitoh (#2227) +misc: Improve single file library and include dictBuilder, by @cwoffenden +misc: Allow compression dictionaries with missing symbols +misc: Add freestanding translation script in contrib/freestanding_lib +misc: Collect all of zstd's libc dependencies into zstd_deps.h +doc : Add ZSTD_versionString() to manual, by @animalize +doc : Fix documentation for ZSTD_CCtxParams_setParameter(), by @felixhandte (#2270) + +v1.4.5 (May 22, 2020) +fix : Compression ratio regression on huge files (> 3 GB) using high levels (--ultra) and multithreading, by @terrelln +perf: Improved decompression speed: x64 : +10% (clang) / +5% (gcc); ARM : from +15% to +50%, depending on SoC, by @terrelln +perf: Automatically downsizes ZSTD_DCtx when too large for too long (#2069, by @bimbashreshta) +perf: Improved fast compression speed on aarch64 (#2040, ~+3%, by @caoyzh) +perf: Small level 1 compression speed gains (depending on compiler) +cli : New --patch-from command, create and apply patches from files, by @bimbashreshta +cli : New --filelist= : Provide a list of files to operate upon from a file +cli : -b -d command can now benchmark decompression on multiple files +cli : New --no-content-size command +cli : New --show-default-cparams information command +api : ZDICT_finalizeDictionary() is promoted to stable (#2111) +api : new experimental parameter ZSTD_d_stableOutBuffer (#2094) +build: Generate a single-file libzstd library (#2065, by @cwoffenden) +build: Relative includes no longer require -I compiler flags for zstd lib subdirs (#2103, by @felixhandte) +build: zstd now compiles cleanly under -pedantic (#2099) +build: zstd now compiles with make-4.3 +build: Support mingw cross-compilation from Linux, by @Ericson2314 +build: Meson multi-thread build fix on windows +build: Some misc icc fixes backed by new ci test on travis +misc: bitflip analyzer tool, by @felixhandte +misc: Extend largeNbDicts benchmark to compression +misc: Edit-distance match finder in contrib/ +doc : Improved beginner CONTRIBUTING.md docs +doc : New issue templates for zstd + +v1.4.4 (Nov 6, 2019) +perf: Improved decompression speed, by > 10%, by @terrelln +perf: Better compression speed when re-using a context, by @felixhandte +perf: Fix compression ratio when compressing large files with small dictionary, by @senhuang42 +perf: zstd reference encoder can generate RLE blocks, by @bimbashrestha +perf: minor generic speed optimization, by @davidbolvansky +api: new ability to extract sequences from the parser for analysis, by @bimbashrestha +api: fixed decoding of magic-less frames, by @terrelln +api: fixed ZSTD_initCStream_advanced() performance with fast modes, reported by @QrczakMK +cli: Named pipes support, by @bimbashrestha +cli: short tar's extension support, by @stokito +cli: command --output-dir-flat= , generates target files into requested directory, by @senhuang42 +cli: commands --stream-size=# and --size-hint=#, by @nmagerko +cli: command --exclude-compressed, by @shashank0791 +cli: faster `-t` test mode +cli: improved some error messages, by @vangyzen +cli: fix command `-D dictionary` on Windows, reported by @artyompetrov +cli: fix rare deadlock condition within dictionary builder, by @terrelln +build: single-file decoder with emscripten compilation script, by @cwoffenden +build: fixed zlibWrapper compilation on Visual Studio, reported by @bluenlive +build: fixed deprecation warning for certain gcc version, reported by @jasonma163 +build: fix compilation on old gcc versions, by @cemeyer +build: improved installation directories for cmake script, by Dmitri Shubin +pack: modified pkgconfig, for better integration into openwrt, requested by @neheb +misc: Improved documentation : ZSTD_CLEVEL, DYNAMIC_BMI2, ZSTD_CDict, function deprecation, zstd format +misc: fixed educational decoder : accept larger literals section, and removed UNALIGNED() macro + +v1.4.3 (Aug 20, 2019) +bug: Fix Dictionary Compression Ratio Regression by @cyan4973 (#1709) +bug: Fix Buffer Overflow in legacy v0.3 decompression by @felixhandte (#1722) +build: Add support for IAR C/C++ Compiler for Arm by @joseph0918 (#1705) + +v1.4.2 (Jul 26, 2019) +bug: Fix bug in zstd-0.5 decoder by @terrelln (#1696) +bug: Fix seekable decompression in-memory API by @iburinoc (#1695) +misc: Validate blocks are smaller than size limit by @vivekmg (#1685) +misc: Restructure source files by @ephiepark (#1679) + +v1.4.1 (Jul 20, 2019) +bug: Fix data corruption in niche use cases by @terrelln (#1659) +bug: Fuzz legacy modes, fix uncovered bugs by @terrelln (#1593, #1594, #1595) +bug: Fix out of bounds read by @terrelln (#1590) +perf: Improve decode speed by ~7% @mgrice (#1668) +perf: Slightly improved compression ratio of level 3 and 4 (ZSTD_dfast) by @cyan4973 (#1681) +perf: Slightly faster compression speed when re-using a context by @cyan4973 (#1658) +perf: Improve compression ratio for small windowLog by @cyan4973 (#1624) +perf: Faster compression speed in high compression mode for repetitive data by @terrelln (#1635) +api: Add parameter to generate smaller dictionaries by @tyler-tran (#1656) +cli: Recognize symlinks when built in C99 mode by @felixhandte (#1640) +cli: Expose cpu load indicator for each file on -vv mode by @ephiepark (#1631) +cli: Restrict read permissions on destination files by @chungy (#1644) +cli: zstdgrep: handle -f flag by @felixhandte (#1618) +cli: zstdcat: follow symlinks by @vejnar (#1604) +doc: Remove extra size limit on compressed blocks by @felixhandte (#1689) +doc: Fix typo by @yk-tanigawa (#1633) +doc: Improve documentation on streaming buffer sizes by @cyan4973 (#1629) +build: CMake: support building with LZ4 @leeyoung624 (#1626) +build: CMake: install zstdless and zstdgrep by @leeyoung624 (#1647) +build: CMake: respect existing uninstall target by @j301scott (#1619) +build: Make: skip multithread tests when built without support by @michaelforney (#1620) +build: Make: Fix examples/ test target by @sjnam (#1603) +build: Meson: rename options out of deprecated namespace by @lzutao (#1665) +build: Meson: fix build by @lzutao (#1602) +build: Visual Studio: don't export symbols in static lib by @scharan (#1650) +build: Visual Studio: fix linking by @absotively (#1639) +build: Fix MinGW-W64 build by @myzhang1029 (#1600) +misc: Expand decodecorpus coverage by @ephiepark (#1664) + +v1.4.0 (Apr 17, 2019) +perf: Improve level 1 compression speed in most scenarios by 6% by @gbtucker and @terrelln +api: Move the advanced API, including all functions in the staging section, to the stable section +api: Make ZSTD_e_flush and ZSTD_e_end block for maximum forward progress +api: Rename ZSTD_CCtxParam_getParameter to ZSTD_CCtxParams_getParameter +api: Rename ZSTD_CCtxParam_setParameter to ZSTD_CCtxParams_setParameter +api: Don't export ZSTDMT functions from the shared library by default +api: Require ZSTD_MULTITHREAD to be defined to use ZSTDMT +api: Add ZSTD_decompressBound() to provide an upper bound on decompressed size by @shakeelrao +api: Fix ZSTD_decompressDCtx() corner cases with a dictionary +api: Move ZSTD_getDictID_*() functions to the stable section +api: Add ZSTD_c_literalCompressionMode flag to enable or disable literal compression by @terrelln +api: Allow compression parameters to be set when a dictionary is used +api: Allow setting parameters before or after ZSTD_CCtx_loadDictionary() is called +api: Fix ZSTD_estimateCStreamSize_usingCCtxParams() +api: Setting ZSTD_d_maxWindowLog to 0 means use the default +cli: Ensure that a dictionary is not used to compress itself by @shakeelrao +cli: Add --[no-]compress-literals flag to enable or disable literal compression +doc: Update the examples to use the advanced API +doc: Explain how to transition from old streaming functions to the advanced API in the header +build: Improve the Windows release packages +build: Improve CMake build by @hjmjohnson +build: Build fixes for FreeBSD by @lwhsu +build: Remove redundant warnings by @thatsafunnyname +build: Fix tests on OpenBSD by @bket +build: Extend fuzzer build system to work with the new clang engine +build: CMake now creates the libzstd.so.1 symlink +build: Improve Menson build by @lzutao +misc: Fix symbolic link detection on FreeBSD +misc: Use physical core count for -T0 on FreeBSD by @cemeyer +misc: Fix zstd --list on truncated files by @kostmo +misc: Improve logging in debug mode by @felixhandte +misc: Add CirrusCI tests by @lwhsu +misc: Optimize dictionary memory usage in corner cases +misc: Improve the dictionary builder on small or homogeneous data +misc: Fix spelling across the repo by @jsoref + +v1.3.8 (Dec 28, 2018) +perf: better decompression speed on large files (+7%) and cold dictionaries (+15%) +perf: slightly better compression ratio at high compression modes +api : finalized advanced API, last stage before "stable" status +api : new --rsyncable mode, by @terrelln +api : support decompression of empty frames into NULL (used to be an error) (#1385) +build: new set of macros to build a minimal size decoder, by @felixhandte +build: fix compilation on MIPS32, reported by @clbr (#1441) +build: fix compilation with multiple -arch flags, by @ryandesign +build: highly upgraded meson build, by @lzutao +build: improved buck support, by @obelisk +build: fix cmake script : can create debug build, by @pitrou +build: Makefile : grep works on both colored consoles and systems without color support +build: fixed zstd-pgo, by @bmwiedemann +cli : support ZSTD_CLEVEL environment variable, by @yijinfb (#1423) +cli : --no-progress flag, preserving final summary (#1371), by @terrelln +cli : ensure destination file is not source file (#1422) +cli : clearer error messages, especially when input file not present +doc : clarified zstd_compression_format.md, by @ulikunitz +misc: fixed zstdgrep, returns 1 on failure, by @lzutao +misc: NEWS renamed as CHANGELOG, in accordance with fboss + +v1.3.7 (Oct 20, 2018) +perf: slightly better decompression speed on clang (depending on hardware target) +fix : performance of dictionary compression for small input < 4 KB at levels 9 and 10 +build: no longer build backtrace by default in release mode; restrict further automatic mode +build: control backtrace support through build macro BACKTRACE +misc: added man pages for zstdless and zstdgrep, by @samrussell + +v1.3.6 (Oct 6, 2018) +perf: much faster dictionary builder, by @jenniferliu +perf: faster dictionary compression on small data when using multiple contexts, by @felixhandte +perf: faster dictionary decompression when using a very large number of dictionaries simultaneously +cli : fix : does no longer overwrite destination when source does not exist (#1082) +cli : new command --adapt, for automatic compression level adaptation +api : fix : block api can be streamed with > 4 GB, reported by @catid +api : reduced ZSTD_DDict size by 2 KB +api : minimum negative compression level is defined, and can be queried using ZSTD_minCLevel(). +build: support Haiku target, by @korli +build: Read Legacy format is limited to v0.5+ by default. Can be changed at compile time with macro ZSTD_LEGACY_SUPPORT. +doc : zstd_compression_format.md updated to match wording in IETF RFC 8478 +misc: tests/paramgrill, a parameter optimizer, by @GeorgeLu97 + +v1.3.5 (Jun 29, 2018) +perf: much faster dictionary compression, by @felixhandte +perf: small quality improvement for dictionary generation, by @terrelln +perf: slightly improved high compression levels (notably level 19) +mem : automatic memory release for long duration contexts +cli : fix : overlapLog can be manually set +cli : fix : decoding invalid lz4 frames +api : fix : performance degradation for dictionary compression when using advanced API, by @terrelln +api : change : clarify ZSTD_CCtx_reset() vs ZSTD_CCtx_resetParameters(), by @terrelln +build: select custom libzstd scope through control macros, by @GeorgeLu97 +build: OpenBSD patch, by @bket +build: make and make all are compatible with -j +doc : clarify zstd_compression_format.md, updated for IETF RFC process +misc: pzstd compatible with reproducible compilation, by @lamby + +v1.3.4 (Mar 27, 2018) +perf: faster speed (especially decoding speed) on recent cpus (haswell+) +perf: much better performance associating --long with multi-threading, by @terrelln +perf: better compression at levels 13-15 +cli : asynchronous compression by default, for faster experience (use --single-thread for former behavior) +cli : smoother status report in multi-threading mode +cli : added command --fast=#, for faster compression modes +cli : fix crash when not overwriting existing files, by Pádraig Brady (@pixelb) +api : `nbThreads` becomes `nbWorkers` : 1 triggers asynchronous mode +api : compression levels can be negative, for even more speed +api : ZSTD_getFrameProgression() : get precise progress status of ZSTDMT anytime +api : ZSTDMT can accept new compression parameters during compression +api : implemented all advanced dictionary decompression prototypes +build: improved meson recipe, by Shawn Landden (@shawnl) +build: VS2017 scripts, by @HaydnTrigg +misc: all /contrib projects fixed +misc: added /contrib/docker script by @gyscos + +v1.3.3 (Dec 21, 2017) +perf: faster zstd_opt strategy (levels 16-19) +fix : bug #944 : multithreading with shared dictionary and large data, reported by @gsliepen +cli : fix : content size written in header by default +cli : fix : improved LZ4 format support, by @felixhandte +cli : new : hidden command `-S`, to benchmark multiple files while generating one result per file +api : fix : support large skippable frames, by @terrelln +api : fix : streaming interface was adding a useless 3-bytes null block to small frames +api : change : when setting `pledgedSrcSize`, use `ZSTD_CONTENTSIZE_UNKNOWN` macro value to mean "unknown" +build: fix : compilation under rhel6 and centos6, reported by @pixelb +build: added `check` target + +v1.3.2 (Oct 10, 2017) +new : long range mode, using --long command, by Stella Lau (@stellamplau) +new : ability to generate and decode magicless frames (#591) +changed : maximum nb of threads reduced to 200, to avoid address space exhaustion in 32-bits mode +fix : multi-threading compression works with custom allocators +fix : ZSTD_sizeof_CStream() was over-evaluating memory usage +fix : a rare compression bug when compression generates very large distances and bunch of other conditions (only possible at --ultra -22) +fix : 32-bits build can now decode large offsets (levels 21+) +cli : added LZ4 frame support by default, by Felix Handte (@felixhandte) +cli : improved --list output +cli : new : can split input file for dictionary training, using command -B# +cli : new : clean operation artefact on Ctrl-C interruption +cli : fix : do not change /dev/null permissions when using command -t with root access, reported by @mike155 (#851) +cli : fix : write file size in header in multiple-files mode +api : added macro ZSTD_COMPRESSBOUND() for static allocation +api : experimental : new advanced decompression API +api : fix : sizeof_CCtx() used to over-estimate +build: fix : no-multithread variant compiles without pool.c dependency, reported by Mitchell Blank Jr (@mitchblank) (#819) +build: better compatibility with reproducible builds, by Bernhard M. Wiedemann (@bmwiedemann) (#818) +example : added streaming_memory_usage +license : changed /examples license to BSD + GPLv2 +license : fix a few header files to reflect new license (#825) + +v1.3.1 (Aug 21, 2017) +New license : BSD + GPLv2 +perf: substantially decreased memory usage in Multi-threading mode, thanks to reports by Tino Reichardt (@mcmilk) +perf: Multi-threading supports up to 256 threads. Cap at 256 when more are requested (#760) +cli : improved and fixed --list command, by @ib (#772) +cli : command -vV to list supported formats, by @ib (#771) +build : fixed binary variants, reported by @svenha (#788) +build : fix Visual compilation for non x86/x64 targets, reported by Greg Slazinski (@GregSlazinski) (#718) +API exp : breaking change : ZSTD_getframeHeader() provides more information +API exp : breaking change : pinned down values of error codes +doc : fixed huffman example, by Ulrich Kunitz (@ulikunitz) +new : contrib/adaptive-compression, I/O driven compression strength, by Paul Cruz (@paulcruz74) +new : contrib/long_distance_matching, statistics by Stella Lau (@stellamplau) +updated : contrib/linux-kernel, by Nick Terrell (@terrelln) + +v1.3.0 (Jul 6, 2017) +cli : new : `--list` command, by Paul Cruz +cli : changed : xz/lzma support enabled by default +cli : changed : `-t *` continue processing list after a decompression error +API : added : ZSTD_versionString() +API : promoted to stable status : ZSTD_getFrameContentSize(), by Sean Purcell +API exp : new advanced API : ZSTD_compress_generic(), ZSTD_CCtx_setParameter() +API exp : new : API for static or external allocation : ZSTD_initStatic?Ctx() +API exp : added : ZSTD_decompressBegin_usingDDict(), requested by Guy Riddle (#700) +API exp : clarified memory estimation / measurement functions. +API exp : changed : strongest strategy renamed ZSTD_btultra, fastest strategy ZSTD_fast set to 1 +tools : decodecorpus can generate random dictionary-compressed samples, by Paul Cruz +new : contrib/seekable_format, demo and API, by Sean Purcell +changed : contrib/linux-kernel, updated version and license, by Nick Terrell + +v1.2.0 (May 5, 2017) +cli : changed : Multithreading enabled by default (use target zstd-nomt or HAVE_THREAD=0 to disable) +cli : new : command -T0 means "detect and use nb of cores", by Sean Purcell +cli : new : zstdmt symlink hardwired to `zstd -T0` +cli : new : command --threads=# (#671) +cli : changed : cover dictionary builder by default, for improved quality, by Nick Terrell +cli : new : commands --train-cover and --train-legacy, to select dictionary algorithm and parameters +cli : experimental targets `zstd4` and `xzstd4`, with support for lz4 format, by Sean Purcell +cli : fix : does not output compressed data on console +cli : fix : ignore symbolic links unless --force specified, +API : breaking change : ZSTD_createCDict_advanced(), only use compressionParameters as argument +API : added : prototypes ZSTD_*_usingCDict_advanced(), for direct control over frameParameters. +API : improved: ZSTDMT_compressCCtx() reduced memory usage +API : fix : ZSTDMT_compressCCtx() now provides srcSize in header (#634) +API : fix : src size stored in frame header is controlled at end of frame +API : fix : enforced consistent rules for pledgedSrcSize==0 (#641) +API : fix : error code "GENERIC" replaced by "dstSizeTooSmall" when appropriate +build: improved cmake script, by @Majlen +build: enabled Multi-threading support for *BSD, by Baptiste Daroussin +tools: updated Paramgrill. Command -O# provides best parameters for sample and speed target. +new : contrib/linux-kernel version, by Nick Terrell + +v1.1.4 (Mar 18, 2017) +cli : new : can compress in *.gz format, using --format=gzip command, by Przemyslaw Skibinski +cli : new : advanced benchmark command --priority=rt +cli : fix : write on sparse-enabled file systems in 32-bits mode, by @ds77 +cli : fix : --rm remains silent when input is stdin +cli : experimental : xzstd, with support for xz/lzma decoding, by Przemyslaw Skibinski +speed : improved decompression speed in streaming mode for single shot scenarios (+5%) +memory: DDict (decompression dictionary) memory usage down from 150 KB to 20 KB +arch: 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell +API : new : ZSTD_findFrameCompressedSize(), ZSTD_getFrameContentSize(), ZSTD_findDecompressedSize() +API : changed : dropped support of legacy versions <= v0.3 (can be changed by modifying ZSTD_LEGACY_SUPPORT value) +build : new: meson build system in contrib/meson, by Dima Krasner +build : improved cmake script, by @Majlen +build : added -Wformat-security flag, as recommended by Padraig Brady +doc : new : educational decoder, by Sean Purcell + +v1.1.3 (Feb 7, 2017) +cli : zstd can decompress .gz files (can be disabled with `make zstd-nogz` or `make HAVE_ZLIB=0`) +cli : new : experimental target `make zstdmt`, with multi-threading support +cli : new : improved dictionary builder "cover" (experimental), by Nick Terrell, based on prior work by Giuseppe Ottaviano. +cli : new : advanced commands for detailed parameters, by Przemyslaw Skibinski +cli : fix zstdless on Mac OS-X, by Andrew Janke +cli : fix #232 "compress non-files" +dictBuilder : improved dictionary generation quality, thanks to Nick Terrell +API : new : lib/compress/ZSTDMT_compress.h multithreading API (experimental) +API : new : ZSTD_create?Dict_byReference(), requested by Bartosz Taudul +API : new : ZDICT_finalizeDictionary() +API : fix : ZSTD_initCStream_usingCDict() properly writes dictID into frame header, by Gregory Szorc (#511) +API : fix : all symbols properly exposed in libzstd, by Nick Terrell +build : support for Solaris target, by Przemyslaw Skibinski +doc : clarified specification, by Sean Purcell + +v1.1.2 (Dec 15, 2016) +API : streaming : decompression : changed : automatic implicit reset when chain-decoding new frames without init +API : experimental : added : dictID retrieval functions, and ZSTD_initCStream_srcSize() +API : zbuff : changed : prototypes now generate deprecation warnings +lib : improved : faster decompression speed at ultra compression settings and 32-bits mode +lib : changed : only public ZSTD_ symbols are now exposed +lib : changed : reduced usage of stack memory +lib : fixed : several corner case bugs, by Nick Terrell +cli : new : gzstd, experimental version able to decode .gz files, by Przemyslaw Skibinski +cli : new : preserve file attributes +cli : new : added zstdless and zstdgrep tools +cli : fixed : status displays total amount decoded, even for file consisting of multiple frames (like pzstd) +cli : fixed : zstdcat +zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski +install : better compatibility with FreeBSD, by Dimitry Andric +source tree : changed : zbuff source files moved to lib/deprecated + +v1.1.1 (Nov 2, 2016) +New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption +New : doc/zstd_manual.html, by Przemyslaw Skibinski +Improved : slightly better compression ratio at --ultra levels (>= 20) +Improved : better memory usage when using streaming compression API, thanks to @Rogier-5 report +Added : API : ZSTD_initCStream_usingCDict(), ZSTD_initDStream_usingDDict() (experimental section) +Added : example/multiple_streaming_compression.c +Changed : zstd_errors.h is now installed within /include (and replaces errors_public.h) +Updated man page +Fixed : zstd-small, zstd-compress and zstd-decompress compilation targets + +v1.1.0 (Sep 28, 2016) +New : contrib/pzstd, parallel version of zstd, by Nick Terrell +added : NetBSD install target (#338) +Improved : speed for batches of small files +Improved : speed of zlib wrapper, by Przemyslaw Skibinski +Changed : libzstd on Windows supports legacy formats, by Christophe Chevalier +Fixed : CLI -d output to stdout by default when input is stdin (#322) +Fixed : CLI correctly detects console on Mac OS-X +Fixed : CLI supports recursive mode `-r` on Mac OS-X +Fixed : Legacy decoders use unified error codes, reported by benrg (#341), fixed by Przemyslaw Skibinski +Fixed : compatibility with OpenBSD, reported by Juan Francisco Cantero Hurtado (#319) +Fixed : compatibility with Hurd, by Przemyslaw Skibinski (#365) +Fixed : zstd-pgo, reported by octoploid (#329) + +v1.0.0 (Sep 1, 2016) +Change Licensing, all project is now BSD, Copyright Facebook +Small decompression speed improvement +API : Streaming API supports legacy format +API : ZDICT_getDictID(), ZSTD_sizeof_{CCtx, DCtx, CStream, DStream}(), ZSTD_setDStreamParameter() +CLI supports legacy formats v0.4+ +Fixed : compression fails on certain huge files, reported by Jesse McGrew +Enhanced documentation, by Przemyslaw Skibinski + +v0.8.1 (Aug 18, 2016) +New streaming API +Changed : --ultra now enables levels beyond 19 +Changed : -i# now selects benchmark time in second +Fixed : ZSTD_compress* can now compress > 4 GB in a single pass, reported by Nick Terrell +Fixed : speed regression on specific patterns (#272) +Fixed : support for Z_SYNC_FLUSH, by Dmitry Krot (#291) +Fixed : ICC compilation, by Przemyslaw Skibinski + +v0.8.0 (Aug 2, 2016) +Improved : better speed on clang and gcc -O2, thanks to Eric Biggers +New : Build on FreeBSD and DragonFly, thanks to JrMarino +Changed : modified API : ZSTD_compressEnd() +Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist +Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers +Fixed : large dictionaries (> 384 KB), reported by Ilona Papava +Fixed : checksum correctly checked in single-pass mode +Fixed : combined --test amd --rm, reported by Andreas M. Nilsson +Modified : minor compression level adaptations +Updated : compression format specification to v0.2.0 +changed : zstd.h moved to /lib directory + +v0.7.5 (Aug 1, 2016) +Transition version, supporting decoding of v0.8.x + +v0.7.4 (Jul 17, 2016) +Added : homebrew for Mac, by Daniel Cade +Added : more examples +Fixed : segfault when using small dictionaries, reported by Felix Handte +Modified : default compression level for CLI is now 3 +Updated : specification, to v0.1.1 + +v0.7.3 (Jul 9, 2016) +New : compression format specification +New : `--` separator, stating that all following arguments are file names. Suggested by Chip Turner. +New : `ZSTD_getDecompressedSize()` +New : OpenBSD target, by Juan Francisco Cantero Hurtado +New : `examples` directory +fixed : dictBuilder using HC levels, reported by Bartosz Taudul +fixed : legacy support from ZSTD_decompress_usingDDict(), reported by Felix Handte +fixed : multi-blocks decoding with intermediate uncompressed blocks, reported by Greg Slazinski +modified : removed "mem.h" and "error_public.h" dependencies from "zstd.h" (experimental section) +modified : legacy functions no longer need magic number + +v0.7.2 (Jul 4, 2016) +fixed : ZSTD_decompressBlock() using multiple consecutive blocks. Reported by Greg Slazinski. +fixed : potential segfault on very large files (many gigabytes). Reported by Chip Turner. +fixed : CLI displays system error message when destination file cannot be created (#231). Reported by Chip Turner. + +v0.7.1 (Jun 23, 2016) +fixed : ZBUFF_compressEnd() called multiple times with too small `dst` buffer, reported by Christophe Chevalier +fixed : dictBuilder fails if first sample is too small, reported by Руслан Ковалёв +fixed : corruption issue, reported by cj +modified : checksum enabled by default in command line mode + +v0.7.0 (Jun 17, 2016) +New : Support for directory compression, using `-r`, thanks to Przemyslaw Skibinski +New : Command `--rm`, to remove source file after successful de/compression +New : Visual build scripts, by Christophe Chevalier +New : Support for Sparse File-systems (do not use space for zero-filled sectors) +New : Frame checksum support +New : Support pass-through mode (when using `-df`) +API : more efficient Dictionary API : `ZSTD_compress_usingCDict()`, `ZSTD_decompress_usingDDict()` +API : create dictionary files from custom content, by Giuseppe Ottaviano +API : support for custom malloc/free functions +New : controllable Dictionary ID +New : Support for skippable frames + +v0.6.1 (May 13, 2016) +New : zlib wrapper API, thanks to Przemyslaw Skibinski +New : Ability to compile compressor / decompressor separately +Changed : new lib directory structure +Fixed : Legacy codec v0.5 compatible with dictionary decompression +Fixed : Decoder corruption error (#173) +Fixed : null-string roundtrip (#176) +New : benchmark mode can select directory as input +Experimental : midipix support, VMS support + +v0.6.0 (Apr 13, 2016) +Stronger high compression modes, thanks to Przemyslaw Skibinski +API : ZSTD_getFrameParams() provides size of decompressed content +New : highest compression modes require `--ultra` command to fully unleash their capacity +Fixed : zstd cli return error code > 0 and removes dst file artifact when decompression fails, thanks to Chip Turner + +v0.5.1 (Feb 18, 2016) +New : Optimal parsing => Very high compression modes, thanks to Przemyslaw Skibinski +Changed : Dictionary builder integrated into libzstd and zstd cli +Changed (!) : zstd cli now uses "multiple input files" as default mode. See `zstd -h`. +Fix : high compression modes for big-endian platforms +New : zstd cli : `-t` | `--test` command + +v0.5.0 (Feb 5, 2016) +New : dictionary builder utility +Changed : streaming & dictionary API +Improved : better compression of small data + +v0.4.7 (Jan 22, 2016) +Improved : small compression speed improvement in HC mode +Changed : `zstd_decompress.c` has ZSTD_LEGACY_SUPPORT to 0 by default +fix : bt search bug + +v0.4.6 (Jan 13, 2016) +fix : fast compression mode on Windows +New : cmake configuration file, thanks to Artyom Dymchenko +Improved : high compression mode on repetitive data +New : block-level API +New : ZSTD_duplicateCCtx() + +v0.4.5 (Dec 18, 2015) +new : -m/--multiple : compress/decompress multiple files + +v0.4.4 (Dec 14, 2015) +Fixed : high compression modes for Windows 32 bits +new : external dictionary API extended to buffered mode and accessible through command line +new : windows DLL project, thanks to Christophe Chevalier + +v0.4.3 (Dec 7, 2015) +new : external dictionary API +new : zstd-frugal + +v0.4.2 (Dec 2, 2015) +Generic minor improvements for small blocks +Fixed : big-endian compatibility, by Peter Harris (#85) + +v0.4.1 (Dec 1, 2015) +Fixed : ZSTD_LEGACY_SUPPORT=0 build mode (reported by Luben) +removed `zstd.c` + +v0.4.0 (Nov 29, 2015) +Command line utility compatible with high compression levels +Removed zstdhc => merged into zstd +Added : ZBUFF API (see zstd_buffered.h) +Rolling buffer support + +v0.3.6 (Nov 10, 2015) +small blocks params + +v0.3.5 (Nov 9, 2015) +minor generic compression improvements + +v0.3.4 (Nov 6, 2015) +Faster fast cLevels + +v0.3.3 (Nov 5, 2015) +Small compression ratio improvement + +v0.3.2 (Nov 2, 2015) +Fixed Visual Studio + +v0.3.1 (Nov 2, 2015) +Small compression ratio improvement + +v0.3 (Oct 30, 2015) +HC mode : compression levels 2-26 + +v0.2.2 (Oct 28, 2015) +Fix : Visual Studio 2013 & 2015 release compilation, by Christophe Chevalier + +v0.2.1 (Oct 24, 2015) +Fix : Read errors, advanced fuzzer tests, by Hanno Böck + +v0.2.0 (Oct 22, 2015) +**Breaking format change** +Faster decompression speed +Can still decode v0.1 format + +v0.1.3 (Oct 15, 2015) +fix uninitialization warning, reported by Evan Nemerson + +v0.1.2 (Sep 11, 2015) +frame concatenation support + +v0.1.1 (Aug 27, 2015) +fix compression bug +detects write-flush errors + +v0.1.0 (Aug 25, 2015) +first release diff --git a/cpp/third_party/zstd-1.5.7/CODE_OF_CONDUCT.md b/cpp/third_party/zstd-1.5.7/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..0f7ad8bfc1 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/CODE_OF_CONDUCT.md @@ -0,0 +1,5 @@ +# Code of Conduct + +Facebook has adopted a Code of Conduct that we expect project participants to adhere to. +Please read the [full text](https://code.fb.com/codeofconduct/) +so that you can understand what actions will and will not be tolerated. diff --git a/cpp/third_party/zstd-1.5.7/CONTRIBUTING.md b/cpp/third_party/zstd-1.5.7/CONTRIBUTING.md new file mode 100644 index 0000000000..57be94bf54 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/CONTRIBUTING.md @@ -0,0 +1,489 @@ +# Contributing to Zstandard +We want to make contributing to this project as easy and transparent as +possible. + +## Our Development Process +New versions are being developed in the "dev" branch, +or in their own feature branch. +When they are deemed ready for a release, they are merged into "release". + +As a consequence, all contributions must stage first through "dev" +or their own feature branch. + +## Pull Requests +We actively welcome your pull requests. + +1. Fork the repo and create your branch from `dev`. +2. If you've added code that should be tested, add tests. +3. If you've changed APIs, update the documentation. +4. Ensure the test suite passes. +5. Make sure your code lints. +6. If you haven't already, complete the Contributor License Agreement ("CLA"). + +## Contributor License Agreement ("CLA") +In order to accept your pull request, we need you to submit a CLA. You only need +to do this once to work on any of Facebook's open source projects. + +Complete your CLA here: + +## Workflow +Zstd uses a branch-based workflow for making changes to the codebase. Typically, zstd +will use a new branch per sizable topic. For smaller changes, it is okay to lump multiple +related changes into a branch. + +Our contribution process works in three main stages: +1. Local development + * Update: + * Checkout your fork of zstd if you have not already + ``` + git checkout https://github.com//zstd + cd zstd + ``` + * Update your local dev branch + ``` + git pull https://github.com/facebook/zstd dev + git push origin dev + ``` + * Topic and development: + * Make a new branch on your fork about the topic you're developing for + ``` + # branch names should be concise but sufficiently informative + git checkout -b + git push origin + ``` + * Make commits and push + ``` + # make some changes = + git add -u && git commit -m + git push origin + ``` + * Note: run local tests to ensure that your changes didn't break existing functionality + * Quick check + ``` + make check + ``` + * Longer check + ``` + make test + ``` +2. Code Review and CI tests + * Ensure CI tests pass: + * Before sharing anything to the community, create a pull request in your own fork against the dev branch + and make sure that all GitHub Actions CI tests pass. See the Continuous Integration section below for more information. + * Ensure that static analysis passes on your development machine. See the Static Analysis section + below to see how to do this. + * Create a pull request: + * When you are ready to share you changes to the community, create a pull request from your branch + to facebook:dev. You can do this very easily by clicking 'Create Pull Request' on your fork's home + page. + * From there, select the branch where you made changes as your source branch and facebook:dev + as the destination. + * Examine the diff presented between the two branches to make sure there is nothing unexpected. + * Write a good pull request description: + * While there is no strict template that our contributors follow, we would like them to + sufficiently summarize and motivate the changes they are proposing. We recommend all pull requests, + at least indirectly, address the following points. + * Is this pull request important and why? + * Is it addressing an issue? If so, what issue? (provide links for convenience please) + * Is this a new feature? If so, why is it useful and/or necessary? + * Are there background references and documents that reviewers should be aware of to properly assess this change? + * Note: make sure to point out any design and architectural decisions that you made and the rationale behind them. + * Note: if you have been working with a specific user and would like them to review your work, make sure you mention them using (@) + * Submit the pull request and iterate with feedback. +3. Merge and Release + * Getting approval: + * You will have to iterate on your changes with feedback from other collaborators to reach a point + where your pull request can be safely merged. + * To avoid too many comments on style and convention, make sure that you have a + look at our style section below before creating a pull request. + * Eventually, someone from the zstd team will approve your pull request and not long after merge it into + the dev branch. + * Housekeeping: + * Most PRs are linked with one or more Github issues. If this is the case for your PR, make sure + the corresponding issue is mentioned. If your change 'fixes' or completely addresses the + issue at hand, then please indicate this by requesting that an issue be closed by commenting. + * Just because your changes have been merged does not mean the topic or larger issue is complete. Remember + that the change must make it to an official zstd release for it to be meaningful. We recommend + that contributors track the activity on their pull request and corresponding issue(s) page(s) until + their change makes it to the next release of zstd. Users will often discover bugs in your code or + suggest ways to refine and improve your initial changes even after the pull request is merged. + +## Static Analysis +Static analysis is a process for examining the correctness or validity of a program without actually +executing it. It usually helps us find many simple bugs. Zstd uses clang's `scan-build` tool for +static analysis. You can install it by following the instructions for your OS on https://clang-analyzer.llvm.org/scan-build. + +Once installed, you can ensure that our static analysis tests pass on your local development machine +by running: +``` +make staticAnalyze +``` + +In general, you can use `scan-build` to static analyze any build script. For example, to static analyze +just `contrib/largeNbDicts` and nothing else, you can run: + +``` +scan-build make -C contrib/largeNbDicts largeNbDicts +``` + +### Pitfalls of static analysis +`scan-build` is part of our regular CI suite. Other static analyzers are not. + +It can be useful to look at additional static analyzers once in a while (and we do), but it's not a good idea to multiply the nb of analyzers run continuously at each commit and PR. The reasons are : + +- Static analyzers are full of false positive. The signal to noise ratio is actually pretty low. +- A good CI policy is "zero-warning tolerance". That means that all issues must be solved, including false positives. This quickly becomes a tedious workload. +- Multiple static analyzers will feature multiple kind of false positives, sometimes applying to the same code but in different ways leading to : + + tortuous code, trying to please multiple constraints, hurting readability and therefore maintenance. Sometimes, such complexity introduce other more subtle bugs, that are just out of scope of the analyzers. + + sometimes, these constraints are mutually exclusive : if one try to solve one, the other static analyzer will complain, they can't be both happy at the same time. +- As if that was not enough, the list of false positives change with each version. It's hard enough to follow one static analyzer, but multiple ones with their own update agenda, this quickly becomes a massive velocity reducer. + +This is different from running a static analyzer once in a while, looking at the output, and __cherry picking__ a few warnings that seem helpful, either because they detected a genuine risk of bug, or because it helps expressing the code in a way which is more readable or more difficult to misuse. These kinds of reports can be useful, and are accepted. + +## Continuous Integration +CI tests run every time a pull request (PR) is created or updated. The exact tests +that get run will depend on the destination branch you specify. Some tests take +longer to run than others. Currently, our CI is set up to run a short +series of tests when creating a PR to the dev branch and a longer series of tests +when creating a PR to the release branch. You can look in the configuration files +of the respective CI platform for more information on what gets run when. + +Most people will just want to create a PR with the destination set to their local dev +branch of zstd. You can then find the status of the tests on the PR's page. You can also +re-run tests and cancel running tests from the PR page or from the respective CI's dashboard. + +Almost all of zstd's CI runs on GitHub Actions (configured at `.github/workflows`), which will automatically run on PRs to your +own fork. A small number of tests run on other services (e.g. Travis CI, Circle CI, Appveyor). +These require work to set up on your local fork, and (at least for Travis CI) cost money. +Therefore, if the PR on your local fork passes GitHub Actions, feel free to submit a PR +against the main repo. + +### Third-party CI +A small number of tests cannot run on GitHub Actions, or have yet to be migrated. +For these, we use a variety of third-party services (listed below). It is not necessary to set +these up on your fork in order to contribute to zstd; however, we do link to instructions for those +who want earlier signal. + +| Service | Purpose | Setup Links | Config Path | +|-----------|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------| +| Travis CI | Used for testing on non-x86 architectures such as PowerPC | https://docs.travis-ci.com/user/tutorial/#to-get-started-with-travis-ci-using-github
https://github.com/marketplace/travis-ci | `.travis.yml` | +| AppVeyor | Used for some Windows testing (e.g. cygwin, mingw) | https://www.appveyor.com/blog/2018/10/02/github-apps-integration/
https://github.com/marketplace/appveyor | `appveyor.yml` | +| Cirrus CI | Used for testing on FreeBSD | https://github.com/marketplace/cirrus-ci/ | `.cirrus.yml` | +| Circle CI | Historically was used to provide faster signal,
but we may be able to migrate these to Github Actions | https://circleci.com/docs/2.0/getting-started/#setting-up-circleci
https://youtu.be/Js3hMUsSZ2c
https://circleci.com/docs/2.0/enable-checks/ | `.circleci/config.yml` | + +Note: the instructions linked above mostly cover how to set up a repository with CI from scratch. +The general idea should be the same for setting up CI on your fork of zstd, but you may have to +follow slightly different steps. In particular, please ignore any instructions related to setting up +config files (since zstd already has configs for each of these services). + +## Performance +Performance is extremely important for zstd and we only merge pull requests whose performance +landscape and corresponding trade-offs have been adequately analyzed, reproduced, and presented. +This high bar for performance means that every PR which has the potential to +impact performance takes a very long time for us to properly review. That being said, we +always welcome contributions to improve performance (or worsen performance for the trade-off of +something else). Please keep the following in mind before submitting a performance related PR: + +1. Zstd isn't as old as gzip but it has been around for time now and its evolution is +very well documented via past Github issues and pull requests. It may be the case that your +particular performance optimization has already been considered in the past. Please take some +time to search through old issues and pull requests using keywords specific to your +would-be PR. Of course, just because a topic has already been discussed (and perhaps rejected +on some grounds) in the past, doesn't mean it isn't worth bringing up again. But even in that case, +it will be helpful for you to have context from that topic's history before contributing. +2. The distinction between noise and actual performance gains can unfortunately be very subtle +especially when microbenchmarking extremely small wins or losses. The only remedy to getting +something subtle merged is extensive benchmarking. You will be doing us a great favor if you +take the time to run extensive, long-duration, and potentially cross-(os, platform, process, etc) +benchmarks on your end before submitting a PR. Of course, you will not be able to benchmark +your changes on every single processor and os out there (and neither will we) but do that best +you can:) We've added some things to think about when benchmarking below in the Benchmarking +Performance section which might be helpful for you. +3. Optimizing performance for a certain OS, processor vendor, compiler, or network system is a perfectly +legitimate thing to do as long as it does not harm the overall performance health of Zstd. +This is a hard balance to strike but please keep in mind other aspects of Zstd when +submitting changes that are clang-specific, windows-specific, etc. + +## Benchmarking Performance +Performance microbenchmarking is a tricky subject but also essential for Zstd. We value empirical +testing over theoretical speculation. This guide it not perfect but for most scenarios, it +is a good place to start. + +### Stability +Unfortunately, the most important aspect in being able to benchmark reliably is to have a stable +benchmarking machine. A virtual machine, a machine with shared resources, or your laptop +will typically not be stable enough to obtain reliable benchmark results. If you can get your +hands on a desktop, this is usually a better scenario. + +Of course, benchmarking can be done on non-hyper-stable machines as well. You will just have to +do a little more work to ensure that you are in fact measuring the changes you've made and not +noise. Here are some things you can do to make your benchmarks more stable: + +1. The most simple thing you can do to drastically improve the stability of your benchmark is +to run it multiple times and then aggregate the results of those runs. As a general rule of +thumb, the smaller the change you are trying to measure, the more samples of benchmark runs +you will have to aggregate over to get reliable results. Here are some additional things to keep in +mind when running multiple trials: + * How you aggregate your samples are important. You might be tempted to use the mean of your + results. While this is certainly going to be a more stable number than a raw single sample + benchmark number, you might have more luck by taking the median. The mean is not robust to + outliers whereas the median is. Better still, you could simply take the fastest speed your + benchmark achieved on each run since that is likely the fastest your process will be + capable of running your code. In our experience, this (aggregating by just taking the sample + with the fastest running time) has been the most stable approach. + * The more samples you have, the more stable your benchmarks should be. You can verify + your improved stability by looking at the size of your confidence intervals as you + increase your sample count. These should get smaller and smaller. Eventually hopefully + smaller than the performance win you are expecting. + * Most processors will take some time to get `hot` when running anything. The observations + you collect during that time period will very different from the true performance number. Having + a very large number of sample will help alleviate this problem slightly but you can also + address is directly by simply not including the first `n` iterations of your benchmark in + your aggregations. You can determine `n` by simply looking at the results from each iteration + and then hand picking a good threshold after which the variance in results seems to stabilize. +2. You cannot really get reliable benchmarks if your host machine is simultaneously running +another cpu/memory-intensive application in the background. If you are running benchmarks on your +personal laptop for instance, you should close all applications (including your code editor and +browser) before running your benchmarks. You might also have invisible background applications +running. You can see what these are by looking at either Activity Monitor on Mac or Task Manager +on Windows. You will get more stable benchmark results of you end those processes as well. + * If you have multiple cores, you can even run your benchmark on a reserved core to prevent + pollution from other OS and user processes. There are a number of ways to do this depending + on your OS: + * On linux boxes, you have use https://github.com/lpechacek/cpuset. + * On Windows, you can "Set Processor Affinity" using https://www.thewindowsclub.com/processor-affinity-windows + * On Mac, you can try to use their dedicated affinity API https://developer.apple.com/library/archive/releasenotes/Performance/RN-AffinityAPI/#//apple_ref/doc/uid/TP40006635-CH1-DontLinkElementID_2 +3. To benchmark, you will likely end up writing a separate c/c++ program that will link libzstd. +Dynamically linking your library will introduce some added variation (not a large amount but +definitely some). Statically linking libzstd will be more stable. Static libraries should +be enabled by default when building zstd. +4. Use a profiler with a good high resolution timer. See the section below on profiling for +details on this. +5. Disable frequency scaling, turbo boost and address space randomization (this will vary by OS) +6. Try to avoid storage. On some systems you can use tmpfs. Putting the program, inputs and outputs on +tmpfs avoids touching a real storage system, which can have a pretty big variability. + +Also check our LLVM's guide on benchmarking here: https://llvm.org/docs/Benchmarking.html + +### Zstd benchmark +The fastest signal you can get regarding your performance changes is via the in-build zstd cli +bench option. You can run Zstd as you typically would for your scenario using some set of options +and then additionally also specify the `-b#` option. Doing this will run our benchmarking pipeline +for that options you have just provided. If you want to look at the internals of how this +benchmarking script works, you can check out programs/benchzstd.c + +For example: say you have made a change that you believe improves the speed of zstd level 1. The +very first thing you should use to assess whether you actually achieved any sort of improvement +is `zstd -b`. You might try to do something like this. Note: you can use the `-i` option to +specify a running time for your benchmark in seconds (default is 3 seconds). +Usually, the longer the running time, the more stable your results will be. + +``` +$ git checkout +$ make && cp zstd zstd-old +$ git checkout +$ make && cp zstd zstd-new +$ zstd-old -i5 -b1 + 1 : 8990 -> 3992 (2.252), 302.6 MB/s , 626.4 MB/s +$ zstd-new -i5 -b1 + 1 : 8990 -> 3992 (2.252), 302.8 MB/s , 628.4 MB/s +``` + +Unless your performance win is large enough to be visible despite the intrinsic noise +on your computer, benchzstd alone will likely not be enough to validate the impact of your +changes. For example, the results of the example above indicate that effectively nothing +changed but there could be a small <3% improvement that the noise on the host machine +obscured. So unless you see a large performance win (10-15% consistently) using just +this method of evaluation will not be sufficient. + +### Profiling +There are a number of great profilers out there. We're going to briefly mention how you can +profile your code using `instruments` on mac, `perf` on linux and `visual studio profiler` +on Windows. + +Say you have an idea for a change that you think will provide some good performance gains +for level 1 compression on Zstd. Typically this means, you have identified a section of +code that you think can be made to run faster. + +The first thing you will want to do is make sure that the piece of code is actually taking up +a notable amount of time to run. It is usually not worth optimizing something which accounts for less than +0.0001% of the total running time. Luckily, there are tools to help with this. +Profilers will let you see how much time your code spends inside a particular function. +If your target code snippet is only part of a function, it might be worth trying to +isolate that snippet by moving it to its own function (this is usually not necessary but +might be). + +Most profilers (including the profilers discussed below) will generate a call graph of +functions for you. Your goal will be to find your function of interest in this call graph +and then inspect the time spent inside of it. You might also want to look at the annotated +assembly which most profilers will provide you with. + +#### Instruments +We will once again consider the scenario where you think you've identified a piece of code +whose performance can be improved upon. Follow these steps to profile your code using +Instruments. + +1. Open Instruments +2. Select `Time Profiler` from the list of standard templates +3. Close all other applications except for your instruments window and your terminal +4. Run your benchmarking script from your terminal window + * You will want a benchmark that runs for at least a few seconds (5 seconds will + usually be long enough). This way the profiler will have something to work with + and you will have ample time to attach your profiler to this process:) + * I will just use benchzstd as my benchmarmking script for this example: +``` +$ zstd -b1 -i5 # this will run for 5 seconds +``` +5. Once you run your benchmarking script, switch back over to instruments and attach your +process to the time profiler. You can do this by: + * Clicking on the `All Processes` drop down in the top left of the toolbar. + * Selecting your process from the dropdown. In my case, it is just going to be labeled + `zstd` + * Hitting the bright red record circle button on the top left of the toolbar +6. You profiler will now start collecting metrics from your benchmarking script. Once +you think you have collected enough samples (usually this is the case after 3 seconds of +recording), stop your profiler. +7. Make sure that in toolbar of the bottom window, `profile` is selected. +8. You should be able to see your call graph. + * If you don't see the call graph or an incomplete call graph, make sure you have compiled + zstd and your benchmarking script using debug flags. On mac and linux, this just means + you will have to supply the `-g` flag alone with your build script. You might also + have to provide the `-fno-omit-frame-pointer` flag +9. Dig down the graph to find your function call and then inspect it by double clicking +the list item. You will be able to see the annotated source code and the assembly side by +side. + +#### Perf + +This wiki has a pretty detailed tutorial on getting started working with perf so we'll +leave you to check that out of you're getting started: + +https://perf.wiki.kernel.org/index.php/Tutorial + +Some general notes on perf: +* Use `perf stat -r # ` to quickly get some relevant timing and +counter statistics. Perf uses a high resolution timer and this is likely one +of the first things your team will run when assessing your PR. +* Perf has a long list of hardware counters that can be viewed with `perf --list`. +When measuring optimizations, something worth trying is to make sure the hardware +counters you expect to be impacted by your change are in fact being so. For example, +if you expect the L1 cache misses to decrease with your change, you can look at the +counter `L1-dcache-load-misses` +* Perf hardware counters will not work on a virtual machine. + +#### Visual Studio + +TODO + +## Issues +We use GitHub issues to track public bugs. Please ensure your description is +clear and has sufficient instructions to be able to reproduce the issue. + +Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe +disclosure of security bugs. In those cases, please go through the process +outlined on that page and do not file a public issue. + +## Coding Style +It's a pretty long topic, which is difficult to summarize in a single paragraph. +As a rule of thumbs, try to imitate the coding style of +similar lines of codes around your contribution. +The following is a non-exhaustive list of rules employed in zstd code base: + +### C90 +This code base is following strict C90 standard, +with 2 extensions : 64-bit `long long` types, and variadic macros. +This rule is applied strictly to code within `lib/` and `programs/`. +Sub-project in `contrib/` are allowed to use other conventions. + +### C++ direct compatibility : symbol mangling +All public symbol declarations must be wrapped in `extern “C” { … }`, +so that this project can be compiled as C++98 code, +and linked into C++ applications. + +### Minimal Frugal +This design requirement is fundamental to preserve the portability of the code base. +#### Dependencies +- Reduce dependencies to the minimum possible level. + Any dependency should be considered “bad” by default, + and only tolerated because it provides a service in a better way than can be achieved locally. + The only external dependencies this repository tolerates are + standard C libraries, and in rare cases, system level headers. +- Within `lib/`, this policy is even more drastic. + The only external dependencies allowed are ``, ``, ``, + and even then, not directly. + In particular, no function shall ever allocate on heap directly, + and must use instead `ZSTD_malloc()` and equivalent. + Other accepted non-symbol headers are `` and ``. +- Within the project, there is a strict hierarchy of dependencies that must be respected. + `programs/` is allowed to depend on `lib/`, but only its public API. + Within `lib/`, `lib/common` doesn't depend on any other directory. + `lib/compress` and `lib/decompress` shall not depend on each other. + `lib/dictBuilder` can depend on `lib/common` and `lib/compress`, but not `lib/decompress`. +#### Resources +- Functions in `lib/` must use very little stack space, + several dozens of bytes max. + Everything larger must use the heap allocator, + or require a scratch buffer to be emplaced manually. + +### Naming +* All public symbols are prefixed with `ZSTD_` + + private symbols, with a scope limited to their own unit, are free of this restriction. + However, since `libzstd` source code can be amalgamated, + each symbol name must attempt to be (and remain) unique. + Avoid too generic names that could become ground for future collisions. + This generally implies usage of some form of prefix. +* For symbols (functions and variables), naming convention is `PREFIX_camelCase`. + + In some advanced cases, one can also find : + - `PREFIX_prefix2_camelCase` + - `PREFIX_camelCase_extendedQualifier` +* Multi-words names generally consist of an action followed by object: + - for example : `ZSTD_createCCtx()` +* Prefer positive actions + - `goBackward` rather than `notGoForward` +* Type names (`struct`, etc.) follow similar convention, + except that they are allowed and even invited to start by an Uppercase letter. + Example : `ZSTD_CCtx`, `ZSTD_CDict` +* Macro names are all Capital letters. + The same composition rules (`PREFIX_NAME_QUALIFIER`) apply. +* File names are all lowercase letters. + The convention is `snake_case`. + File names **must** be unique across the entire code base, + even when they stand in clearly separated directories. + +### Qualifiers +* This code base is `const` friendly, if not `const` fanatical. + Any variable that can be `const` (aka. read-only) **must** be `const`. + Any pointer which content will not be modified must be `const`. + This property is then controlled at compiler level. + `const` variables are an important signal to readers that this variable isn't modified. + Conversely, non-const variables are a signal to readers to watch out for modifications later on in the function. +* If a function must be inlined, mention it explicitly, + using project's own portable macros, such as `FORCE_INLINE_ATTR`, + defined in `lib/common/compiler.h`. + +### Debugging +* **Assertions** are welcome, and should be used very liberally, + to control any condition the code expects for its correct execution. + These assertion checks will be run in debug builds, and disabled in production. +* For traces, this project provides its own debug macros, + in particular `DEBUGLOG(level, ...)`, defined in `lib/common/debug.h`. + +### Code documentation +* Avoid code documentation that merely repeats what the code is already stating. + Whenever applicable, prefer employing the code as the primary way to convey explanations. + Example 1 : `int nbTokens = n;` instead of `int i = n; /* i is a nb of tokens *./`. + Example 2 : `assert(size > 0);` instead of `/* here, size should be positive */`. +* At declaration level, the documentation explains how to use the function or variable + and when applicable why it's needed, of the scenarios where it can be useful. +* At implementation level, the documentation explains the general outline of the algorithm employed, + and when applicable why this specific choice was preferred. + +### General layout +* 4 spaces for indentation rather than tabs +* Code documentation shall directly precede function declaration or implementation +* Function implementations and its code documentation should be preceded and followed by an empty line + + +## License +By contributing to Zstandard, you agree that your contributions will be licensed +under both the [LICENSE](LICENSE) file and the [COPYING](COPYING) file in the root directory of this source tree. diff --git a/cpp/third_party/zstd-1.5.7/COPYING b/cpp/third_party/zstd-1.5.7/COPYING new file mode 100644 index 0000000000..ecbc059373 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/cpp/third_party/zstd-1.5.7/LICENSE b/cpp/third_party/zstd-1.5.7/LICENSE new file mode 100644 index 0000000000..75800288cc --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/LICENSE @@ -0,0 +1,30 @@ +BSD License + +For Zstandard software + +Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook, nor Meta, nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/cpp/third_party/zstd-1.5.7/Makefile b/cpp/third_party/zstd-1.5.7/Makefile new file mode 100644 index 0000000000..e8e6bcffe4 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/Makefile @@ -0,0 +1,471 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ + +# verbose mode (print commands) on V=1 or VERBOSE=1 +Q = $(if $(filter 1,$(V) $(VERBOSE)),,@) + +PRGDIR = programs +ZSTDDIR = lib +BUILDIR = build +ZWRAPDIR = zlibWrapper +TESTDIR = tests +FUZZDIR = $(TESTDIR)/fuzz + +# Define nul output +VOID = /dev/null + +# When cross-compiling from linux to windows, you might +# need to specify this as "Windows." Fedora build fails +# without it. +# +# Note: mingw-w64 build from linux to windows does not +# fail on other tested distros (ubuntu, debian) even +# without manually specifying the TARGET_SYSTEM. +TARGET_SYSTEM ?= $(OS) +CP ?= cp + +ifneq (,$(filter Windows%,$(TARGET_SYSTEM))) + EXT =.exe +else + EXT = +endif + +## default: Build lib-release and zstd-release +.PHONY: default +default: lib-release zstd-release + +.PHONY: all +all: allmost examples manual contrib + +.PHONY: allmost +allmost: allzstd zlibwrapper + +# skip zwrapper, can't build that on alternate architectures without the proper zlib installed +.PHONY: allzstd +allzstd: lib + $(Q)$(MAKE) -C $(PRGDIR) all + $(Q)$(MAKE) -C $(TESTDIR) all + +.PHONY: all32 +all32: + $(MAKE) -C $(PRGDIR) zstd32 + $(MAKE) -C $(TESTDIR) all32 + +.PHONY: lib lib-release lib-mt lib-nomt +lib lib-release lib-mt lib-nomt: + $(Q)$(MAKE) -C $(ZSTDDIR) $@ + +.PHONY: zstd zstd-release +zstd zstd-release: + $(Q)$(MAKE) -C $(PRGDIR) $@ + $(Q)ln -sf $(PRGDIR)/zstd$(EXT) zstd$(EXT) + +.PHONY: zstdmt +zstdmt: + $(Q)$(MAKE) -C $(PRGDIR) $@ + $(Q)$(CP) $(PRGDIR)/zstd$(EXT) ./zstdmt$(EXT) + +.PHONY: zlibwrapper +zlibwrapper: lib + $(MAKE) -C $(ZWRAPDIR) all + +## test: run long-duration tests +.PHONY: test +DEBUGLEVEL ?= 1 +test: MOREFLAGS += -g -Werror +test: + DEBUGLEVEL=$(DEBUGLEVEL) MOREFLAGS="$(MOREFLAGS)" $(MAKE) -j -C $(PRGDIR) allVariants + $(MAKE) -C $(TESTDIR) $@ + ZSTD=../../programs/zstd $(MAKE) -C doc/educational_decoder $@ + +## check: run basic tests for `zstd` cli +.PHONY: check +check: + $(Q)$(MAKE) -C $(TESTDIR) $@ + +.PHONY: automated_benchmarking +automated_benchmarking: + $(MAKE) -C $(TESTDIR) $@ + +.PHONY: benchmarking +benchmarking: automated_benchmarking + +## examples: build all examples in `examples/` directory +.PHONY: examples +examples: lib + $(MAKE) -C examples all + +## manual: generate API documentation in html format +.PHONY: manual +manual: + $(MAKE) -C contrib/gen_html $@ + +## man: generate man page +.PHONY: man +man: + $(MAKE) -C programs $@ + +## contrib: build all supported projects in `/contrib` directory +.PHONY: contrib +contrib: lib + $(MAKE) -C contrib/pzstd all + $(MAKE) -C contrib/seekable_format/examples all + $(MAKE) -C contrib/seekable_format/tests test + $(MAKE) -C contrib/largeNbDicts all + $(MAKE) -C contrib/externalSequenceProducer all + cd build/single_file_libs/ ; ./build_decoder_test.sh + cd build/single_file_libs/ ; ./build_library_test.sh + +.PHONY: cleanTabs +cleanTabs: + cd contrib; ./cleanTabs + +.PHONY: clean +clean: + $(Q)$(MAKE) -C $(ZSTDDIR) $@ > $(VOID) + $(Q)$(MAKE) -C $(PRGDIR) $@ > $(VOID) + $(Q)$(MAKE) -C $(TESTDIR) $@ > $(VOID) + $(Q)$(MAKE) -C $(ZWRAPDIR) $@ > $(VOID) + $(Q)$(MAKE) -C examples/ $@ > $(VOID) + $(Q)$(MAKE) -C contrib/gen_html $@ > $(VOID) + $(Q)$(MAKE) -C contrib/pzstd $@ > $(VOID) + $(Q)$(MAKE) -C contrib/seekable_format/examples $@ > $(VOID) + $(Q)$(MAKE) -C contrib/seekable_format/tests $@ > $(VOID) + $(Q)$(MAKE) -C contrib/largeNbDicts $@ > $(VOID) + $(Q)$(MAKE) -C contrib/externalSequenceProducer $@ > $(VOID) + $(Q)$(RM) zstd$(EXT) zstdmt$(EXT) tmp* + $(Q)$(RM) -r lz4 cmakebuild mesonbuild install + @echo Cleaning completed + +#------------------------------------------------------------------------------ +# make install is validated only for Linux, macOS, Hurd and some BSD targets +#------------------------------------------------------------------------------ +ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD MSYS_NT% CYGWIN_NT% Haiku AIX,$(shell sh -c 'MSYSTEM="MSYS" uname') )) + +HOST_OS = POSIX + +MKDIR ?= mkdir -p + +HAVE_COLORNEVER = $(shell echo a | egrep --color=never a > /dev/null 2> /dev/null && echo 1 || echo 0) +EGREP_OPTIONS ?= +ifeq ($(HAVE_COLORNEVER), 1) +EGREP_OPTIONS += --color=never +endif +EGREP = egrep $(EGREP_OPTIONS) + +# Print a two column output of targets and their description. To add a target description, put a +# comment in the Makefile with the format "## : ". For example: +# +## list: Print all targets and their descriptions (if provided) +.PHONY: list +list: + $(Q)TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \ + | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \ + | $(EGREP) -v -e '^[^[:alnum:]]' | sort); \ + { \ + printf "Target Name\tDescription\n"; \ + printf "%0.s-" {1..16}; printf "\t"; printf "%0.s-" {1..40}; printf "\n"; \ + for target in $$TARGETS; do \ + line=$$($(EGREP) "^##[[:space:]]+$$target:" $(lastword $(MAKEFILE_LIST))); \ + description=$$(echo $$line | awk '{i=index($$0,":"); print substr($$0,i+1)}' | xargs); \ + printf "$$target\t$$description\n"; \ + done \ + } | column -t -s $$'\t' + +.PHONY: install armtest usan asan uasan msan asan32 +install: + $(Q)$(MAKE) -C $(ZSTDDIR) $@ + $(Q)$(MAKE) -C $(PRGDIR) $@ + +.PHONY: uninstall +uninstall: + $(Q)$(MAKE) -C $(ZSTDDIR) $@ + $(Q)$(MAKE) -C $(PRGDIR) $@ + +.PHONY: travis-install +travis-install: + $(MAKE) install PREFIX=~/install_test_dir + +.PHONY: clangbuild-darwin-fat +clangbuild-darwin-fat: clean + clang -v + CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch arm64" $(MAKE) zstd-release + mv programs/zstd programs/zstd_arm64 + CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch x86_64" $(MAKE) zstd-release + mv programs/zstd programs/zstd_x64 + lipo -create programs/zstd_x64 programs/zstd_arm64 -output programs/zstd + +.PHONY: gcc5build gcc6build gcc7build clangbuild m32build armbuild aarch64build ppcbuild ppc64build +gcc5build: clean + gcc-5 -v + CC=gcc-5 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)" + +gcc6build: clean + gcc-6 -v + CC=gcc-6 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)" + +gcc7build: clean + gcc-7 -v + CC=gcc-7 $(MAKE) all MOREFLAGS="-Werror $(MOREFLAGS)" + +clangbuild: clean + clang -v + CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" $(MAKE) all + +m32build: clean + gcc -v + $(MAKE) all32 + +armbuild: clean + CC=arm-linux-gnueabi-gcc CFLAGS="-Werror" $(MAKE) allzstd + +aarch64build: clean + CC=aarch64-linux-gnu-gcc CFLAGS="-Werror -O0" $(MAKE) allzstd + +ppcbuild: clean + CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) -j allzstd + +ppc64build: clean + CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) -j allzstd + +.PHONY: armfuzz aarch64fuzz ppcfuzz ppc64fuzz +armfuzz: clean + CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest + +aarch64fuzz: clean + ld -v + CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest + +ppcfuzz: clean + CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static MOREFLAGS="-static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest + +ppc64fuzz: clean + CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS="-m64 -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -C $(TESTDIR) fuzztest + +.PHONY: cxxtest gcc5test gcc6test armtest aarch64test ppctest ppc64test +cxxtest: CXXFLAGS += -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror +cxxtest: clean + $(MAKE) -C $(PRGDIR) all CC="$(CXX) -Wno-deprecated" CFLAGS="$(CXXFLAGS)" # adding -Wno-deprecated to avoid clang++ warning on dealing with C files directly + +gcc5test: clean + gcc-5 -v + $(MAKE) all CC=gcc-5 MOREFLAGS="-Werror $(MOREFLAGS)" + +gcc6test: clean + gcc-6 -v + $(MAKE) all CC=gcc-6 MOREFLAGS="-Werror $(MOREFLAGS)" + +armtest: clean + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" + +aarch64test: + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" + +ppctest: clean + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" + +ppc64test: clean + $(MAKE) -C $(TESTDIR) datagen # use native, faster + $(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" + +.PHONY: arm-ppc-compilation +arm-ppc-compilation: + $(MAKE) -C $(PRGDIR) clean zstd CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" + $(MAKE) -C $(PRGDIR) clean zstd CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static $(MOREFLAGS)" + $(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static $(MOREFLAGS)" + $(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static $(MOREFLAGS)" + +regressiontest: + $(MAKE) -C $(FUZZDIR) regressiontest + +uasanregressiontest: + $(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=address,undefined -Werror" CXXFLAGS="-O3 -fsanitize=address,undefined -Werror" + +msanregressiontest: + $(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=memory -Werror" CXXFLAGS="-O3 -fsanitize=memory -Werror" + +update_regressionResults : REGRESS_RESULTS_DIR := /tmp/regress_results_dir/ +update_regressionResults: + $(MAKE) -j -C programs zstd + $(MAKE) -j -C tests/regression test + $(RM) -r $(REGRESS_RESULTS_DIR) + $(MKDIR) $(REGRESS_RESULTS_DIR) + ./tests/regression/test \ + --cache tests/regression/cache \ + --output $(REGRESS_RESULTS_DIR)/results.csv \ + --zstd programs/zstd + echo "Showing results differences" + ! diff tests/regression/results.csv $(REGRESS_RESULTS_DIR)/results.csv + echo "Updating results.csv" + $(CP) $(REGRESS_RESULTS_DIR)/results.csv tests/regression/results.csv + + +# run UBsan with -fsanitize-recover=pointer-overflow +# this only works with recent compilers such as gcc 8+ +usan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=undefined -Werror $(MOREFLAGS)" + +asan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address -Werror $(MOREFLAGS)" + +asan-%: clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $* + +msan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=memory -fno-omit-frame-pointer -Werror $(MOREFLAGS)" HAVE_LZMA=0 # datagen.c fails this test for no obvious reason + +msan-%: + $(MAKE) clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=memory -fno-omit-frame-pointer -Werror $(MOREFLAGS)" FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" $(MAKE) -j -C $(TESTDIR) HAVE_LZMA=0 $* + +asan32: clean + $(MAKE) -C $(TESTDIR) test32 CC=clang MOREFLAGS="-g -fsanitize=address $(MOREFLAGS)" + +uasan: clean + $(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address,undefined -Werror $(MOREFLAGS)" + +uasan-%: clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address,undefined -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $* + +tsan-%: clean + LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=thread -Werror $(MOREFLAGS)" $(MAKE) -C $(TESTDIR) $* FUZZER_FLAGS="--no-big-tests $(FUZZER_FLAGS)" + +.PHONY: apt-install +apt-install: + # TODO: uncomment once issue 3011 is resolved and remove hack from Github Actions .yml + # sudo apt-get update + sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install $(APT_PACKAGES) + +.PHONY: apt-add-repo +apt-add-repo: + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo apt-get update -y -qq + +.PHONY: ppcinstall arminstall valgrindinstall libc6install gcc6install gcc7install gcc8install gpp6install clang38install lz4install +ppcinstall: + APT_PACKAGES="qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu" $(MAKE) apt-install + +arminstall: + APT_PACKAGES="qemu-system-arm qemu-user-static gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross" $(MAKE) apt-install + +valgrindinstall: + APT_PACKAGES="valgrind" $(MAKE) apt-install + +libc6install: + APT_PACKAGES="libc6-dev-i386 gcc-multilib" $(MAKE) apt-install + +gcc6install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-6 gcc-6-multilib" $(MAKE) apt-install + +gcc7install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-7 gcc-7-multilib" $(MAKE) apt-install + +gcc8install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib" $(MAKE) apt-install + +gpp6install: apt-add-repo + APT_PACKAGES="libc6-dev-i386 g++-multilib gcc-6 g++-6 g++-6-multilib" $(MAKE) apt-install + +clang38install: + APT_PACKAGES="clang-3.8" $(MAKE) apt-install + +# Ubuntu 14.04 ships a too-old lz4 +lz4install: + [ -e lz4 ] || git clone https://github.com/lz4/lz4 && sudo $(MAKE) -C lz4 install + +endif + + +ifneq (,$(filter MSYS%,$(shell sh -c 'MSYSTEM="MSYS" uname') )) +HOST_OS = MSYS +endif + +#------------------------------------------------------------------------ +# target specific tests +#------------------------------------------------------------------------ +ifneq (,$(filter MSYS POSIX,$(HOST_OS))) + +CMAKE ?= cmake +CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON + +ifneq (,$(filter MSYS%,$(shell sh -c 'MSYSTEM="MSYS" uname'))) +CMAKE_PARAMS = -G"MSYS Makefiles" -DZSTD_MULTITHREAD_SUPPORT:BOOL=OFF -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON +endif + +.PHONY: cmakebuild +cmakebuild: + $(CMAKE) --version + $(RM) -r cmakebuild install + $(MKDIR) cmakebuild install + cd cmakebuild; $(CMAKE) -Wdev -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror -O0" -DCMAKE_INSTALL_PREFIX=install $(CMAKE_PARAMS) ../build/cmake + $(CMAKE) --build cmakebuild --target install -- -j V=1 + cd cmakebuild; ctest -V -L Medium + +MESON ?= meson +NINJA ?= ninja + +.PHONY: mesonbuild +mesonbuild: + $(MESON) setup \ + --buildtype=debugoptimized \ + -Db_lundef=false \ + -Dauto_features=enabled \ + -Dbin_programs=true \ + -Dbin_tests=true \ + -Dbin_contrib=true \ + -Ddefault_library=both \ + build/meson mesonbuild + $(NINJA) -C mesonbuild/ + $(MESON) test -C mesonbuild/ --print-errorlogs + $(MESON) install -C mesonbuild --destdir staging/ + +.PHONY: c89build gnu90build c99build gnu99build c11build bmix64build bmix32build bmi32build staticAnalyze +c89build: clean + $(CC) -v + CFLAGS="-std=c89 -Werror -Wno-attributes -Wpedantic -Wno-long-long -Wno-variadic-macros -O0" $(MAKE) lib zstd + +gnu90build: clean + $(CC) -v + CFLAGS="-std=gnu90 -Werror -O0" $(MAKE) allmost + +c99build: clean + $(CC) -v + CFLAGS="-std=c99 -Werror -O0" $(MAKE) allmost + +gnu99build: clean + $(CC) -v + CFLAGS="-std=gnu99 -Werror -O0" $(MAKE) allmost + +c11build: clean + $(CC) -v + CFLAGS="-std=c11 -Werror -O0" $(MAKE) allmost + +bmix64build: clean + $(CC) -v + CFLAGS="-O3 -mbmi -Werror" $(MAKE) -C $(TESTDIR) test + +bmix32build: clean + $(CC) -v + CFLAGS="-O3 -mbmi -mx32 -Werror" $(MAKE) -C $(TESTDIR) test + +bmi32build: clean + $(CC) -v + CFLAGS="-O3 -mbmi -m32 -Werror" $(MAKE) -C $(TESTDIR) test + +# static analyzer test uses clang's scan-build +# does not analyze zlibWrapper, due to detected issues in zlib source code +staticAnalyze: SCANBUILD ?= scan-build +staticAnalyze: + $(CC) -v + CC=$(CC) CPPFLAGS=-g $(SCANBUILD) --status-bugs -v $(MAKE) zstd +endif diff --git a/cpp/third_party/zstd-1.5.7/Package.swift b/cpp/third_party/zstd-1.5.7/Package.swift new file mode 100644 index 0000000000..97f2c6a525 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/Package.swift @@ -0,0 +1,36 @@ +// swift-tools-version:5.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "zstd", + platforms: [ + .macOS(.v10_10), .iOS(.v9), .tvOS(.v9) + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "libzstd", + targets: [ "libzstd" ]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "libzstd", + path: "lib", + sources: [ "common", "compress", "decompress", "dictBuilder" ], + publicHeadersPath: ".", + cSettings: [ + .headerSearchPath(".") + ]) + ], + swiftLanguageVersions: [.v5], + cLanguageStandard: .gnu11, + cxxLanguageStandard: .gnucxx14 +) diff --git a/cpp/third_party/zstd-1.5.7/README.md b/cpp/third_party/zstd-1.5.7/README.md new file mode 100644 index 0000000000..d91ef5df1b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/README.md @@ -0,0 +1,237 @@ +

Zstandard

+ +__Zstandard__, or `zstd` as short version, is a fast lossless compression algorithm, +targeting real-time compression scenarios at zlib-level and better compression ratios. +It's backed by a very fast entropy stage, provided by [Huff0 and FSE library](https://github.com/Cyan4973/FiniteStateEntropy). + +Zstandard's format is stable and documented in [RFC8878](https://datatracker.ietf.org/doc/html/rfc8878). Multiple independent implementations are already available. +This repository represents the reference implementation, provided as an open-source dual [BSD](LICENSE) OR [GPLv2](COPYING) licensed **C** library, +and a command line utility producing and decoding `.zst`, `.gz`, `.xz` and `.lz4` files. +Should your project require another programming language, +a list of known ports and bindings is provided on [Zstandard homepage](https://facebook.github.io/zstd/#other-languages). + +**Development branch status:** + +[![Build Status][travisDevBadge]][travisLink] +[![Build status][CircleDevBadge]][CircleLink] +[![Build status][CirrusDevBadge]][CirrusLink] +[![Fuzzing Status][OSSFuzzBadge]][OSSFuzzLink] + +[travisDevBadge]: https://api.travis-ci.com/facebook/zstd.svg?branch=dev "Continuous Integration test suite" +[travisLink]: https://travis-ci.com/facebook/zstd +[CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite" +[CircleLink]: https://circleci.com/gh/facebook/zstd +[CirrusDevBadge]: https://api.cirrus-ci.com/github/facebook/zstd.svg?branch=dev +[CirrusLink]: https://cirrus-ci.com/github/facebook/zstd +[OSSFuzzBadge]: https://oss-fuzz-build-logs.storage.googleapis.com/badges/zstd.svg +[OSSFuzzLink]: https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zstd + +## Benchmarks + +For reference, several fast compression algorithms were tested and compared +on a desktop featuring a Core i7-9700K CPU @ 4.9GHz +and running Ubuntu 20.04 (`Linux ubu20 5.15.0-101-generic`), +using [lzbench], an open-source in-memory benchmark by @inikep +compiled with [gcc] 9.4.0, +on the [Silesia compression corpus]. + +[lzbench]: https://github.com/inikep/lzbench +[Silesia compression corpus]: https://sun.aei.polsl.pl//~sdeor/index.php?page=silesia +[gcc]: https://gcc.gnu.org/ + +| Compressor name | Ratio | Compression| Decompress.| +| --------------- | ------| -----------| ---------- | +| **zstd 1.5.6 -1** | 2.887 | 510 MB/s | 1580 MB/s | +| [zlib] 1.2.11 -1 | 2.743 | 95 MB/s | 400 MB/s | +| brotli 1.0.9 -0 | 2.702 | 395 MB/s | 430 MB/s | +| **zstd 1.5.6 --fast=1** | 2.437 | 545 MB/s | 1890 MB/s | +| **zstd 1.5.6 --fast=3** | 2.239 | 650 MB/s | 2000 MB/s | +| quicklz 1.5.0 -1 | 2.238 | 525 MB/s | 750 MB/s | +| lzo1x 2.10 -1 | 2.106 | 650 MB/s | 825 MB/s | +| [lz4] 1.9.4 | 2.101 | 700 MB/s | 4000 MB/s | +| lzf 3.6 -1 | 2.077 | 420 MB/s | 830 MB/s | +| snappy 1.1.9 | 2.073 | 530 MB/s | 1660 MB/s | + +[zlib]: https://www.zlib.net/ +[lz4]: https://lz4.github.io/lz4/ + +The negative compression levels, specified with `--fast=#`, +offer faster compression and decompression speed +at the cost of compression ratio. + +Zstd can also offer stronger compression ratios at the cost of compression speed. +Speed vs Compression trade-off is configurable by small increments. +Decompression speed is preserved and remains roughly the same at all settings, +a property shared by most LZ compression algorithms, such as [zlib] or lzma. + +The following tests were run +on a server running Linux Debian (`Linux version 4.14.0-3-amd64`) +with a Core i7-6700K CPU @ 4.0GHz, +using [lzbench], an open-source in-memory benchmark by @inikep +compiled with [gcc] 7.3.0, +on the [Silesia compression corpus]. + +Compression Speed vs Ratio | Decompression Speed +---------------------------|-------------------- +![Compression Speed vs Ratio](doc/images/CSpeed2.png "Compression Speed vs Ratio") | ![Decompression Speed](doc/images/DSpeed3.png "Decompression Speed") + +A few other algorithms can produce higher compression ratios at slower speeds, falling outside of the graph. +For a larger picture including slow modes, [click on this link](doc/images/DCspeed5.png). + + +## The case for Small Data compression + +Previous charts provide results applicable to typical file and stream scenarios (several MB). Small data comes with different perspectives. + +The smaller the amount of data to compress, the more difficult it is to compress. This problem is common to all compression algorithms, and reason is, compression algorithms learn from past data how to compress future data. But at the beginning of a new data set, there is no "past" to build upon. + +To solve this situation, Zstd offers a __training mode__, which can be used to tune the algorithm for a selected type of data. +Training Zstandard is achieved by providing it with a few samples (one file per sample). The result of this training is stored in a file called "dictionary", which must be loaded before compression and decompression. +Using this dictionary, the compression ratio achievable on small data improves dramatically. + +The following example uses the `github-users` [sample set](https://github.com/facebook/zstd/releases/tag/v1.1.3), created from [github public API](https://developer.github.com/v3/users/#get-all-users). +It consists of roughly 10K records weighing about 1KB each. + +Compression Ratio | Compression Speed | Decompression Speed +------------------|-------------------|-------------------- +![Compression Ratio](doc/images/dict-cr.png "Compression Ratio") | ![Compression Speed](doc/images/dict-cs.png "Compression Speed") | ![Decompression Speed](doc/images/dict-ds.png "Decompression Speed") + + +These compression gains are achieved while simultaneously providing _faster_ compression and decompression speeds. + +Training works if there is some correlation in a family of small data samples. The more data-specific a dictionary is, the more efficient it is (there is no _universal dictionary_). +Hence, deploying one dictionary per type of data will provide the greatest benefits. +Dictionary gains are mostly effective in the first few KB. Then, the compression algorithm will gradually use previously decoded content to better compress the rest of the file. + +### Dictionary compression How To: + +1. Create the dictionary + + `zstd --train FullPathToTrainingSet/* -o dictionaryName` + +2. Compress with dictionary + + `zstd -D dictionaryName FILE` + +3. Decompress with dictionary + + `zstd -D dictionaryName --decompress FILE.zst` + + +## Build instructions + +`make` is the officially maintained build system of this project. +All other build systems are "compatible" and 3rd-party maintained, +they may feature small differences in advanced options. +When your system allows it, prefer using `make` to build `zstd` and `libzstd`. + +### Makefile + +If your system is compatible with standard `make` (or `gmake`), +invoking `make` in root directory will generate `zstd` cli in root directory. +It will also create `libzstd` into `lib/`. + +Other available options include: +- `make install` : create and install zstd cli, library and man pages +- `make check` : create and run `zstd`, test its behavior on local platform + +The `Makefile` follows the [GNU Standard Makefile conventions](https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html), +allowing staged install, standard flags, directory variables and command variables. + +For advanced use cases, specialized compilation flags which control binary generation +are documented in [`lib/README.md`](lib/README.md#modular-build) for the `libzstd` library +and in [`programs/README.md`](programs/README.md#compilation-variables) for the `zstd` CLI. + +### cmake + +A `cmake` project generator is provided within `build/cmake`. +It can generate Makefiles or other build scripts +to create `zstd` binary, and `libzstd` dynamic and static libraries. + +By default, `CMAKE_BUILD_TYPE` is set to `Release`. + +#### Support for Fat (Universal2) Output + +`zstd` can be built and installed with support for both Apple Silicon (M1/M2) as well as Intel by using CMake's Universal2 support. +To perform a Fat/Universal2 build and install use the following commands: + +```bash +cmake -B build-cmake-debug -S build/cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64" +cd build-cmake-debug +ninja +sudo ninja install +``` + +### Meson + +A Meson project is provided within [`build/meson`](build/meson). Follow +build instructions in that directory. + +You can also take a look at [`.travis.yml`](.travis.yml) file for an +example about how Meson is used to build this project. + +Note that default build type is **release**. + +### VCPKG +You can build and install zstd [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install zstd + +The zstd port in vcpkg is kept up to date by Microsoft team members and community contributors. +If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + +### Conan + +You can install pre-built binaries for zstd or build it from source using [Conan](https://conan.io/). Use the following command: + +```bash +conan install --requires="zstd/[*]" --build=missing +``` + +The zstd Conan recipe is kept up to date by Conan maintainers and community contributors. +If the version is out of date, please [create an issue or pull request](https://github.com/conan-io/conan-center-index) on the ConanCenterIndex repository. + +### Visual Studio (Windows) + +Going into `build` directory, you will find additional possibilities: +- Projects for Visual Studio 2005, 2008 and 2010. + + VS2010 project is compatible with VS2012, VS2013, VS2015 and VS2017. +- Automated build scripts for Visual compiler by [@KrzysFR](https://github.com/KrzysFR), in `build/VS_scripts`, + which will build `zstd` cli and `libzstd` library without any need to open Visual Studio solution. + +### Buck + +You can build the zstd binary via buck by executing: `buck build programs:zstd` from the root of the repo. +The output binary will be in `buck-out/gen/programs/`. + +### Bazel + +You easily can integrate zstd into your Bazel project by using the module hosted on the [Bazel Central Repository](https://registry.bazel.build/modules/zstd). + +## Testing + +You can run quick local smoke tests by running `make check`. +If you can't use `make`, execute the `playTest.sh` script from the `src/tests` directory. +Two env variables `$ZSTD_BIN` and `$DATAGEN_BIN` are needed for the test script to locate the `zstd` and `datagen` binary. +For information on CI testing, please refer to `TESTING.md`. + +## Status + +Zstandard is currently deployed within Facebook and many other large cloud infrastructures. +It is run continuously to compress large amounts of data in multiple formats and use cases. +Zstandard is considered safe for production environments. + +## License + +Zstandard is dual-licensed under [BSD](LICENSE) OR [GPLv2](COPYING). + +## Contributing + +The `dev` branch is the one where all contributions are merged before reaching `release`. +If you plan to propose a patch, please commit into the `dev` branch, or its own feature branch. +Direct commit to `release` are not permitted. +For more information, please read [CONTRIBUTING](CONTRIBUTING.md). diff --git a/cpp/third_party/zstd-1.5.7/SECURITY.md b/cpp/third_party/zstd-1.5.7/SECURITY.md new file mode 100644 index 0000000000..a5f9a7e1fd --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/SECURITY.md @@ -0,0 +1,15 @@ +# Reporting and Fixing Security Issues + +Please do not open GitHub issues or pull requests - this makes the problem immediately visible to everyone, including malicious actors. Security issues in this open source project can be safely reported via the Meta Bug Bounty program: + +https://www.facebook.com/whitehat + +Meta's security team will triage your report and determine whether or not is it eligible for a bounty under our program. + +# Receiving Vulnerability Notifications + +In the case that a significant security vulnerability is reported to us or discovered by us---without being publicly known---we will, at our discretion, notify high-profile, high-exposure users of Zstandard ahead of our public disclosure of the issue and associated fix. + +If you believe your project would benefit from inclusion in this list, please reach out to one of the maintainers. + + diff --git a/cpp/third_party/zstd-1.5.7/TESTING.md b/cpp/third_party/zstd-1.5.7/TESTING.md new file mode 100644 index 0000000000..df842cc941 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/TESTING.md @@ -0,0 +1,43 @@ +Testing +======= + +Zstandard CI testing is split up into three sections: +short, medium, and long tests. + +Short Tests +----------- +Short tests run on CircleCI for new commits on every branch and pull request. +They consist of the following tests: +- Compilation on all supported targets (x86, x86_64, ARM, AArch64, PowerPC, and PowerPC64) +- Compilation on various versions of gcc, clang, and g++ +- `tests/playTests.sh` on x86_64, without the tests on long data (CLI tests) +- Small tests (`tests/legacy.c`, `tests/longmatch.c`) on x64_64 + +Medium Tests +------------ +Medium tests run on every commit and pull request to `dev` branch, on TravisCI. +They consist of the following tests: +- The following tests run with UBsan and Asan on x86_64 and x86, as well as with + Msan on x86_64 + - `tests/playTests.sh --test-large-data` + - Fuzzer tests: `tests/fuzzer.c`, `tests/zstreamtest.c`, and `tests/decodecorpus.c` +- `tests/zstreamtest.c` under Tsan (streaming mode, including multithreaded mode) +- Valgrind Test (`make -C tests test-valgrind`) (testing CLI and fuzzer under `valgrind`) +- Fuzzer tests (see above) on ARM, AArch64, PowerPC, and PowerPC64 + +Long Tests +---------- +Long tests run on all commits to `release` branch, +and once a day on the current version of `dev` branch, +on TravisCI. +They consist of the following tests: +- Entire test suite (including fuzzers and some other specialized tests) on: + - x86_64 and x86 with UBsan and Asan + - x86_64 with Msan + - ARM, AArch64, PowerPC, and PowerPC64 +- Streaming mode fuzzer with Tsan (for the `zstdmt` testing) +- ZlibWrapper tests, including under valgrind +- Versions test (ensuring `zstd` can decode files from all previous versions) +- `pzstd` with asan and tsan, as well as in 32-bits mode +- Testing `zstd` with legacy mode off +- Entire test suite and make install on macOS diff --git a/cpp/third_party/zstd-1.5.7/contrib/VS2005/README.md b/cpp/third_party/zstd-1.5.7/contrib/VS2005/README.md new file mode 100644 index 0000000000..ec1ef68a06 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/VS2005/README.md @@ -0,0 +1,3 @@ +## Project Support Notice + +The VS2005 Project directory has been moved to the contrib directory in order to indicate that it will no longer be supported. diff --git a/cpp/third_party/zstd-1.5.7/contrib/VS2005/fullbench/fullbench.vcproj b/cpp/third_party/zstd-1.5.7/contrib/VS2005/fullbench/fullbench.vcproj new file mode 100644 index 0000000000..98f8593769 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/VS2005/fullbench/fullbench.vcproj @@ -0,0 +1,440 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/third_party/zstd-1.5.7/contrib/VS2005/fuzzer/fuzzer.vcproj b/cpp/third_party/zstd-1.5.7/contrib/VS2005/fuzzer/fuzzer.vcproj new file mode 100644 index 0000000000..d182535fe2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/VS2005/fuzzer/fuzzer.vcproj @@ -0,0 +1,488 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd.sln b/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd.sln new file mode 100644 index 0000000000..0c31ae126c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd.sln @@ -0,0 +1,55 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "zstd\zstd.vcproj", "{1A2AB08E-5CE7-4C5B-BE55-458157C14051}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer", "fuzzer\fuzzer.vcproj", "{A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench", "fullbench\fullbench.vcproj", "{CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstdlib", "zstdlib\zstdlib.vcproj", "{99DE2A79-7298-4004-A0ED-030D7A3796CA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|Win32.ActiveCfg = Debug|Win32 + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|Win32.Build.0 = Debug|Win32 + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|x64.ActiveCfg = Debug|x64 + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Debug|x64.Build.0 = Debug|x64 + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|Win32.ActiveCfg = Release|Win32 + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|Win32.Build.0 = Release|Win32 + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|x64.ActiveCfg = Release|x64 + {1A2AB08E-5CE7-4C5B-BE55-458157C14051}.Release|x64.Build.0 = Release|x64 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|Win32.ActiveCfg = Debug|Win32 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|Win32.Build.0 = Debug|Win32 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|x64.ActiveCfg = Debug|x64 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Debug|x64.Build.0 = Debug|x64 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|Win32.ActiveCfg = Release|Win32 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|Win32.Build.0 = Release|Win32 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|x64.ActiveCfg = Release|x64 + {A62E89D2-9DDE-42BA-8F9B-9DA74889A6B0}.Release|x64.Build.0 = Release|x64 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|Win32.ActiveCfg = Debug|Win32 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|Win32.Build.0 = Debug|Win32 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|x64.ActiveCfg = Debug|x64 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Debug|x64.Build.0 = Debug|x64 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|Win32.ActiveCfg = Release|Win32 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|Win32.Build.0 = Release|Win32 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|x64.ActiveCfg = Release|x64 + {CC8F1D1B-BA2F-43E3-A71F-FA415D81AAD3}.Release|x64.Build.0 = Release|x64 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|Win32.Build.0 = Debug|Win32 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|x64.ActiveCfg = Debug|x64 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Debug|x64.Build.0 = Debug|x64 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|Win32.ActiveCfg = Release|Win32 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|Win32.Build.0 = Release|Win32 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|x64.ActiveCfg = Release|x64 + {99DE2A79-7298-4004-A0ED-030D7A3796CA}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd/zstd.vcproj b/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd/zstd.vcproj new file mode 100644 index 0000000000..e37ebee391 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstd/zstd.vcproj @@ -0,0 +1,552 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstdlib/zstdlib.vcproj b/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstdlib/zstdlib.vcproj new file mode 100644 index 0000000000..67ddd2dba3 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/VS2005/zstdlib/zstdlib.vcproj @@ -0,0 +1,546 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/third_party/zstd-1.5.7/contrib/cleanTabs b/cpp/third_party/zstd-1.5.7/contrib/cleanTabs new file mode 100755 index 0000000000..215913a90a --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/cleanTabs @@ -0,0 +1,2 @@ +#!/bin/sh +sed -i '' $'s/\t/ /g' ../lib/**/*.{h,c} ../programs/*.{h,c} ../tests/*.c ./**/*.{h,cpp} ../examples/*.c ../zlibWrapper/*.{h,c} diff --git a/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/.gitignore new file mode 100644 index 0000000000..a8e92b69b8 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/.gitignore @@ -0,0 +1 @@ +check_flipped_bits diff --git a/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/Makefile b/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/Makefile new file mode 100644 index 0000000000..ecc9e63952 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/Makefile @@ -0,0 +1,35 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +.PHONY: all +all: check_flipped_bits + +ZSTDLIBDIR ?= ../../lib + +CFLAGS ?= -O3 +CFLAGS += -I$(ZSTDLIBDIR) -I$(ZSTDLIBDIR)/common -I$(ZSTDLIBDIR)/compress \ + -I$(ZSTDLIBDIR)/decompress +CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ + -Wstrict-prototypes -Wundef \ + -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ + -Wredundant-decls -Wmissing-prototypes +CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) +FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) + +.PHONY: $(ZSTDLIBDIR)/libzstd.a +$(ZSTDLIBDIR)/libzstd.a: + $(MAKE) -C $(ZSTDLIBDIR) libzstd.a + +check_flipped_bits: check_flipped_bits.c $(ZSTDLIBDIR)/libzstd.a + $(CC) $(FLAGS) $< -o $@$(EXT) $(ZSTDLIBDIR)/libzstd.a + +.PHONY: clean +clean: + rm -f check_flipped_bits diff --git a/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/check_flipped_bits.c b/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/check_flipped_bits.c new file mode 100644 index 0000000000..09ddd46747 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/diagnose_corruption/check_flipped_bits.c @@ -0,0 +1,400 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#define ZSTD_STATIC_LINKING_ONLY +#include "zstd.h" +#include "zstd_errors.h" + +#include +#include +#include +#include +#include +#include + +typedef struct { + char *input; + size_t input_size; + + char *perturbed; /* same size as input */ + + char *output; + size_t output_size; + + const char *dict_file_name; + const char *dict_file_dir_name; + int32_t dict_id; + char *dict; + size_t dict_size; + ZSTD_DDict* ddict; + + ZSTD_DCtx* dctx; + + int success_count; + int error_counts[ZSTD_error_maxCode]; +} stuff_t; + +static void free_stuff(stuff_t* stuff) { + free(stuff->input); + free(stuff->output); + ZSTD_freeDDict(stuff->ddict); + free(stuff->dict); + ZSTD_freeDCtx(stuff->dctx); +} + +static void usage(void) { + fprintf(stderr, "check_flipped_bits input_filename [-d dict] [-D dict_dir]\n"); + fprintf(stderr, "\n"); + fprintf(stderr, "Arguments:\n"); + fprintf(stderr, " -d file: path to a dictionary file to use.\n"); + fprintf(stderr, " -D dir : path to a directory, with files containing dictionaries, of the\n" + " form DICTID.zstd-dict, e.g., 12345.zstd-dict.\n"); + exit(1); +} + +static void print_summary(stuff_t* stuff) { + int error_code; + fprintf(stderr, "%9d successful decompressions\n", stuff->success_count); + for (error_code = 0; error_code < ZSTD_error_maxCode; error_code++) { + int count = stuff->error_counts[error_code]; + if (count) { + fprintf( + stderr, "%9d failed decompressions with message: %s\n", + count, ZSTD_getErrorString(error_code)); + } + } +} + +static char* readFile(const char* filename, size_t* size) { + struct stat statbuf; + int ret; + FILE* f; + char *buf; + size_t bytes_read; + + ret = stat(filename, &statbuf); + if (ret != 0) { + fprintf(stderr, "stat failed: %m\n"); + return NULL; + } + if ((statbuf.st_mode & S_IFREG) != S_IFREG) { + fprintf(stderr, "Input must be regular file\n"); + return NULL; + } + + *size = statbuf.st_size; + + f = fopen(filename, "r"); + if (f == NULL) { + fprintf(stderr, "fopen failed: %m\n"); + return NULL; + } + + buf = malloc(*size); + if (buf == NULL) { + fprintf(stderr, "malloc failed\n"); + fclose(f); + return NULL; + } + + bytes_read = fread(buf, 1, *size, f); + if (bytes_read != *size) { + fprintf(stderr, "failed to read whole file\n"); + fclose(f); + free(buf); + return NULL; + } + + ret = fclose(f); + if (ret != 0) { + fprintf(stderr, "fclose failed: %m\n"); + free(buf); + return NULL; + } + + return buf; +} + +static ZSTD_DDict* readDict(const char* filename, char **buf, size_t* size, int32_t* dict_id) { + ZSTD_DDict* ddict; + *buf = readFile(filename, size); + if (*buf == NULL) { + fprintf(stderr, "Opening dictionary file '%s' failed\n", filename); + return NULL; + } + + ddict = ZSTD_createDDict_advanced(*buf, *size, ZSTD_dlm_byRef, ZSTD_dct_auto, ZSTD_defaultCMem); + if (ddict == NULL) { + fprintf(stderr, "Failed to create ddict.\n"); + return NULL; + } + if (dict_id != NULL) { + *dict_id = ZSTD_getDictID_fromDDict(ddict); + } + return ddict; +} + +static ZSTD_DDict* readDictByID(stuff_t *stuff, int32_t dict_id, char **buf, size_t* size) { + if (stuff->dict_file_dir_name == NULL) { + return NULL; + } else { + size_t dir_name_len = strlen(stuff->dict_file_dir_name); + int dir_needs_separator = 0; + size_t dict_file_name_alloc_size = dir_name_len + 1 /* '/' */ + 10 /* max int32_t len */ + strlen(".zstd-dict") + 1 /* '\0' */; + char *dict_file_name = malloc(dict_file_name_alloc_size); + ZSTD_DDict* ddict; + int32_t read_dict_id; + if (dict_file_name == NULL) { + fprintf(stderr, "malloc failed.\n"); + return 0; + } + + if (dir_name_len > 0 && stuff->dict_file_dir_name[dir_name_len - 1] != '/') { + dir_needs_separator = 1; + } + + snprintf( + dict_file_name, + dict_file_name_alloc_size, + "%s%s%u.zstd-dict", + stuff->dict_file_dir_name, + dir_needs_separator ? "/" : "", + dict_id); + + /* fprintf(stderr, "Loading dict %u from '%s'.\n", dict_id, dict_file_name); */ + + ddict = readDict(dict_file_name, buf, size, &read_dict_id); + if (ddict == NULL) { + fprintf(stderr, "Failed to create ddict from '%s'.\n", dict_file_name); + free(dict_file_name); + return 0; + } + if (read_dict_id != dict_id) { + fprintf(stderr, "Read dictID (%u) does not match expected (%u).\n", read_dict_id, dict_id); + free(dict_file_name); + ZSTD_freeDDict(ddict); + return 0; + } + + free(dict_file_name); + return ddict; + } +} + +static int init_stuff(stuff_t* stuff, int argc, char *argv[]) { + const char* input_filename; + + if (argc < 2) { + usage(); + } + + input_filename = argv[1]; + stuff->input_size = 0; + stuff->input = readFile(input_filename, &stuff->input_size); + if (stuff->input == NULL) { + fprintf(stderr, "Failed to read input file.\n"); + return 0; + } + + stuff->perturbed = malloc(stuff->input_size); + if (stuff->perturbed == NULL) { + fprintf(stderr, "malloc failed.\n"); + return 0; + } + memcpy(stuff->perturbed, stuff->input, stuff->input_size); + + stuff->output_size = ZSTD_DStreamOutSize(); + stuff->output = malloc(stuff->output_size); + if (stuff->output == NULL) { + fprintf(stderr, "malloc failed.\n"); + return 0; + } + + stuff->dict_file_name = NULL; + stuff->dict_file_dir_name = NULL; + stuff->dict_id = 0; + stuff->dict = NULL; + stuff->dict_size = 0; + stuff->ddict = NULL; + + if (argc > 2) { + if (!strcmp(argv[2], "-d")) { + if (argc > 3) { + stuff->dict_file_name = argv[3]; + } else { + usage(); + } + } else + if (!strcmp(argv[2], "-D")) { + if (argc > 3) { + stuff->dict_file_dir_name = argv[3]; + } else { + usage(); + } + } else { + usage(); + } + } + + if (stuff->dict_file_dir_name) { + int32_t dict_id = ZSTD_getDictID_fromFrame(stuff->input, stuff->input_size); + if (dict_id != 0) { + stuff->ddict = readDictByID(stuff, dict_id, &stuff->dict, &stuff->dict_size); + if (stuff->ddict == NULL) { + fprintf(stderr, "Failed to create cached ddict.\n"); + return 0; + } + stuff->dict_id = dict_id; + } + } else + if (stuff->dict_file_name) { + stuff->ddict = readDict(stuff->dict_file_name, &stuff->dict, &stuff->dict_size, &stuff->dict_id); + if (stuff->ddict == NULL) { + fprintf(stderr, "Failed to create ddict from '%s'.\n", stuff->dict_file_name); + return 0; + } + } + + stuff->dctx = ZSTD_createDCtx(); + if (stuff->dctx == NULL) { + return 0; + } + + stuff->success_count = 0; + memset(stuff->error_counts, 0, sizeof(stuff->error_counts)); + + return 1; +} + +static int test_decompress(stuff_t* stuff) { + size_t ret; + ZSTD_inBuffer in = {stuff->perturbed, stuff->input_size, 0}; + ZSTD_outBuffer out = {stuff->output, stuff->output_size, 0}; + ZSTD_DCtx* dctx = stuff->dctx; + int32_t custom_dict_id = ZSTD_getDictID_fromFrame(in.src, in.size); + char *custom_dict = NULL; + size_t custom_dict_size = 0; + ZSTD_DDict* custom_ddict = NULL; + + if (custom_dict_id != 0 && custom_dict_id != stuff->dict_id) { + /* fprintf(stderr, "Instead of dict %u, this perturbed blob wants dict %u.\n", stuff->dict_id, custom_dict_id); */ + custom_ddict = readDictByID(stuff, custom_dict_id, &custom_dict, &custom_dict_size); + } + + ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only); + + if (custom_ddict != NULL) { + ZSTD_DCtx_refDDict(dctx, custom_ddict); + } else { + ZSTD_DCtx_refDDict(dctx, stuff->ddict); + } + + while (in.pos != in.size) { + out.pos = 0; + ret = ZSTD_decompressStream(dctx, &out, &in); + + if (ZSTD_isError(ret)) { + unsigned int code = ZSTD_getErrorCode(ret); + if (code >= ZSTD_error_maxCode) { + fprintf(stderr, "Received unexpected error code!\n"); + exit(1); + } + stuff->error_counts[code]++; + /* + fprintf( + stderr, "Decompression failed: %s\n", ZSTD_getErrorName(ret)); + */ + if (custom_ddict != NULL) { + ZSTD_freeDDict(custom_ddict); + free(custom_dict); + } + return 0; + } + } + + stuff->success_count++; + + if (custom_ddict != NULL) { + ZSTD_freeDDict(custom_ddict); + free(custom_dict); + } + return 1; +} + +static int perturb_bits(stuff_t* stuff) { + size_t pos; + size_t bit; + for (pos = 0; pos < stuff->input_size; pos++) { + unsigned char old_val = stuff->input[pos]; + if (pos % 1000 == 0) { + fprintf(stderr, "Perturbing byte %zu / %zu\n", pos, stuff->input_size); + } + for (bit = 0; bit < 8; bit++) { + unsigned char new_val = old_val ^ (1 << bit); + stuff->perturbed[pos] = new_val; + if (test_decompress(stuff)) { + fprintf( + stderr, + "Flipping byte %zu bit %zu (0x%02x -> 0x%02x) " + "produced a successful decompression!\n", + pos, bit, old_val, new_val); + } + } + stuff->perturbed[pos] = old_val; + } + return 1; +} + +static int perturb_bytes(stuff_t* stuff) { + size_t pos; + size_t new_val; + for (pos = 0; pos < stuff->input_size; pos++) { + unsigned char old_val = stuff->input[pos]; + if (pos % 1000 == 0) { + fprintf(stderr, "Perturbing byte %zu / %zu\n", pos, stuff->input_size); + } + for (new_val = 0; new_val < 256; new_val++) { + stuff->perturbed[pos] = new_val; + if (test_decompress(stuff)) { + fprintf( + stderr, + "Changing byte %zu (0x%02x -> 0x%02x) " + "produced a successful decompression!\n", + pos, old_val, (unsigned char)new_val); + } + } + stuff->perturbed[pos] = old_val; + } + return 1; +} + +int main(int argc, char* argv[]) { + stuff_t stuff; + + if(!init_stuff(&stuff, argc, argv)) { + fprintf(stderr, "Failed to init.\n"); + return 1; + } + + if (test_decompress(&stuff)) { + fprintf(stderr, "Blob already decompresses successfully!\n"); + return 1; + } + + perturb_bits(&stuff); + + perturb_bytes(&stuff); + + print_summary(&stuff); + + free_stuff(&stuff); + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/docker/Dockerfile b/cpp/third_party/zstd-1.5.7/contrib/docker/Dockerfile new file mode 100644 index 0000000000..912bf19497 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/docker/Dockerfile @@ -0,0 +1,20 @@ +# Dockerfile +# First image to build the binary +FROM alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10ba3f0efb90a as builder + +RUN apk --no-cache add make gcc libc-dev +COPY . /src +RUN mkdir /pkg && cd /src && make && make DESTDIR=/pkg install + +# Second minimal image to only keep the built binary +FROM alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10ba3f0efb90a + +# Copy the built files +COPY --from=builder /pkg / + +# Copy the license as well +RUN mkdir -p /usr/local/share/licenses/zstd +COPY --from=builder /src/LICENSE /usr/local/share/licences/zstd/ + +# Just run `zstd` if no other command is given +CMD ["/usr/local/bin/zstd"] diff --git a/cpp/third_party/zstd-1.5.7/contrib/docker/README.md b/cpp/third_party/zstd-1.5.7/contrib/docker/README.md new file mode 100644 index 0000000000..43f6d7a1ae --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/docker/README.md @@ -0,0 +1,20 @@ + +## Requirement + +The `Dockerfile` script requires a version of `docker` >= 17.05 + +## Installing docker + +The official docker install docs use a ppa with a modern version available: +https://docs.docker.com/install/linux/docker-ce/ubuntu/ + +## How to run + +`docker build -t zstd .` + +## test + +``` +echo foo | docker run -i --rm zstd | docker run -i --rm zstd zstdcat +foo +``` diff --git a/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/.gitignore new file mode 100644 index 0000000000..147710aee7 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/.gitignore @@ -0,0 +1,2 @@ +# build artifacts +externalSequenceProducer diff --git a/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/Makefile b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/Makefile new file mode 100644 index 0000000000..0591ae01ba --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/Makefile @@ -0,0 +1,40 @@ +# ################################################################ +# Copyright (c) Yann Collet, Meta Platforms, Inc. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +PROGDIR = ../../programs +LIBDIR = ../../lib + +LIBZSTD = $(LIBDIR)/libzstd.a + +CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/compress -I$(LIBDIR)/common + +CFLAGS ?= -O3 +CFLAGS += -std=gnu99 +DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum \ + -Wstrict-prototypes -Wundef -Wpointer-arith \ + -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ + -Wredundant-decls +CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) + +default: externalSequenceProducer + +all: externalSequenceProducer + +externalSequenceProducer: sequence_producer.c main.c $(LIBZSTD) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +.PHONY: $(LIBZSTD) +$(LIBZSTD): + $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)" + +clean: + $(RM) *.o + $(MAKE) -C $(LIBDIR) clean > /dev/null + $(RM) externalSequenceProducer diff --git a/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/README.md b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/README.md new file mode 100644 index 0000000000..c16a170073 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/README.md @@ -0,0 +1,14 @@ +externalSequenceProducer +===================== + +`externalSequenceProducer` is a test tool for the Block-Level Sequence Producer API. +It demonstrates how to use the API to perform a simple round-trip test. + +A sample sequence producer is provided in sequence_producer.c, but the user can swap +this out with a different one if desired. The sample sequence producer implements +LZ parsing with a 1KB hashtable. Dictionary-based parsing is not currently supported. + +Command line : +``` +externalSequenceProducer filename +``` diff --git a/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/main.c b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/main.c new file mode 100644 index 0000000000..e67e295383 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/main.c @@ -0,0 +1,107 @@ +/* + * Copyright (c) Yann Collet, Meta Platforms, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include +#include +#include +#include + +#define ZSTD_STATIC_LINKING_ONLY +#include "zstd.h" +#include "zstd_errors.h" +#include "sequence_producer.h" // simpleSequenceProducer + +#define CHECK(res) \ +do { \ + if (ZSTD_isError(res)) { \ + printf("ERROR: %s\n", ZSTD_getErrorName(res)); \ + return 1; \ + } \ +} while (0) \ + +int main(int argc, char *argv[]) { + if (argc != 2) { + printf("Usage: externalSequenceProducer \n"); + return 1; + } + + ZSTD_CCtx* const zc = ZSTD_createCCtx(); + + int simpleSequenceProducerState = 0xdeadbeef; + + // Here is the crucial bit of code! + ZSTD_registerSequenceProducer( + zc, + &simpleSequenceProducerState, + simpleSequenceProducer + ); + + { + size_t const res = ZSTD_CCtx_setParameter(zc, ZSTD_c_enableSeqProducerFallback, 1); + CHECK(res); + } + + FILE *f = fopen(argv[1], "rb"); + assert(f); + { + int const ret = fseek(f, 0, SEEK_END); + assert(ret == 0); + } + size_t const srcSize = ftell(f); + { + int const ret = fseek(f, 0, SEEK_SET); + assert(ret == 0); + } + + char* const src = malloc(srcSize + 1); + assert(src); + { + size_t const ret = fread(src, srcSize, 1, f); + assert(ret == 1); + int const ret2 = fclose(f); + assert(ret2 == 0); + } + + size_t const dstSize = ZSTD_compressBound(srcSize); + char* const dst = malloc(dstSize); + assert(dst); + + size_t const cSize = ZSTD_compress2(zc, dst, dstSize, src, srcSize); + CHECK(cSize); + + char* const val = malloc(srcSize); + assert(val); + + { + size_t const res = ZSTD_decompress(val, srcSize, dst, cSize); + CHECK(res); + } + + if (memcmp(src, val, srcSize) == 0) { + printf("Compression and decompression were successful!\n"); + printf("Original size: %lu\n", srcSize); + printf("Compressed size: %lu\n", cSize); + } else { + printf("ERROR: input and validation buffers don't match!\n"); + for (size_t i = 0; i < srcSize; i++) { + if (src[i] != val[i]) { + printf("First bad index: %zu\n", i); + break; + } + } + return 1; + } + + ZSTD_freeCCtx(zc); + free(src); + free(dst); + free(val); + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.c b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.c new file mode 100644 index 0000000000..60a2f9572b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) Yann Collet, Meta Platforms, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "zstd_compress_internal.h" +#include "sequence_producer.h" + +#define HSIZE 1024 +static U32 const HLOG = 10; +static U32 const MLS = 4; +static U32 const BADIDX = 0xffffffff; + +size_t simpleSequenceProducer( + void* sequenceProducerState, + ZSTD_Sequence* outSeqs, size_t outSeqsCapacity, + const void* src, size_t srcSize, + const void* dict, size_t dictSize, + int compressionLevel, + size_t windowSize +) { + const BYTE* const istart = (const BYTE*)src; + const BYTE* const iend = istart + srcSize; + const BYTE* ip = istart; + const BYTE* anchor = istart; + size_t seqCount = 0; + U32 hashTable[HSIZE]; + + (void)sequenceProducerState; + (void)dict; + (void)dictSize; + (void)outSeqsCapacity; + (void)compressionLevel; + + { int i; + for (i=0; i < HSIZE; i++) { + hashTable[i] = BADIDX; + } } + + while (ip + MLS < iend) { + size_t const hash = ZSTD_hashPtr(ip, HLOG, MLS); + U32 const matchIndex = hashTable[hash]; + hashTable[hash] = (U32)(ip - istart); + + if (matchIndex != BADIDX) { + const BYTE* const match = istart + matchIndex; + U32 const matchLen = (U32)ZSTD_count(ip, match, iend); + if (matchLen >= ZSTD_MINMATCH_MIN) { + U32 const litLen = (U32)(ip - anchor); + U32 const offset = (U32)(ip - match); + ZSTD_Sequence const seq = { + offset, litLen, matchLen, 0 + }; + + /* Note: it's crucial to stay within the window size! */ + if (offset <= windowSize) { + outSeqs[seqCount++] = seq; + ip += matchLen; + anchor = ip; + continue; + } + } + } + + ip++; + } + + { ZSTD_Sequence const finalSeq = { + 0, (U32)(iend - anchor), 0, 0 + }; + outSeqs[seqCount++] = finalSeq; + } + + return seqCount; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.h b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.h new file mode 100644 index 0000000000..19f9982ac3 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/externalSequenceProducer/sequence_producer.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) Yann Collet, Meta Platforms, Inc. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef MATCHFINDER_H +#define MATCHFINDER_H + +#define ZSTD_STATIC_LINKING_ONLY +#include "zstd.h" + +size_t simpleSequenceProducer( + void* sequenceProducerState, + ZSTD_Sequence* outSeqs, size_t outSeqsCapacity, + const void* src, size_t srcSize, + const void* dict, size_t dictSize, + int compressionLevel, + size_t windowSize +); + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/freestanding_lib/freestanding.py b/cpp/third_party/zstd-1.5.7/contrib/freestanding_lib/freestanding.py new file mode 100755 index 0000000000..df6983245d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/freestanding_lib/freestanding.py @@ -0,0 +1,774 @@ +#!/usr/bin/env python3 +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ########################################################################## + +import argparse +import contextlib +import os +import re +import shutil +import sys +from typing import Optional + + +INCLUDED_SUBDIRS = ["common", "compress", "decompress"] + +SKIPPED_FILES = [ + "common/mem.h", + "common/zstd_deps.h", + "common/pool.c", + "common/pool.h", + "common/threading.c", + "common/threading.h", + "common/zstd_trace.h", + "compress/zstdmt_compress.h", + "compress/zstdmt_compress.c", +] + +XXHASH_FILES = [ + "common/xxhash.c", + "common/xxhash.h", +] + + +class FileLines(object): + def __init__(self, filename): + self.filename = filename + with open(self.filename, "r") as f: + self.lines = f.readlines() + + def write(self): + with open(self.filename, "w") as f: + f.write("".join(self.lines)) + + +class PartialPreprocessor(object): + """ + Looks for simple ifdefs and ifndefs and replaces them. + Handles && and ||. + Has fancy logic to handle translating elifs to ifs. + Only looks for macros in the first part of the expression with no + parens. + Does not handle multi-line macros (only looks in first line). + """ + def __init__(self, defs: [(str, Optional[str])], replaces: [(str, str)], undefs: [str]): + MACRO_GROUP = r"(?P[a-zA-Z_][a-zA-Z_0-9]*)" + ELIF_GROUP = r"(?Pel)?" + OP_GROUP = r"(?P&&|\|\|)?" + + self._defs = {macro:value for macro, value in defs} + self._replaces = {macro:value for macro, value in replaces} + self._defs.update(self._replaces) + self._undefs = set(undefs) + + self._define = re.compile(r"\s*#\s*define") + self._if = re.compile(r"\s*#\s*if") + self._elif = re.compile(r"\s*#\s*(?Pel)if") + self._else = re.compile(r"\s*#\s*(?Pelse)") + self._endif = re.compile(r"\s*#\s*endif") + + self._ifdef = re.compile(fr"\s*#\s*if(?Pn)?def {MACRO_GROUP}\s*") + self._if_defined = re.compile( + fr"\s*#\s*{ELIF_GROUP}if\s+(?P!)?\s*defined\s*\(\s*{MACRO_GROUP}\s*\)\s*{OP_GROUP}" + ) + self._if_defined_value = re.compile( + fr"\s*#\s*{ELIF_GROUP}if\s+defined\s*\(\s*{MACRO_GROUP}\s*\)\s*" + fr"(?P&&)\s*" + fr"(?P\()?\s*" + fr"(?P[a-zA-Z_][a-zA-Z_0-9]*)\s*" + fr"(?P[=>[0-9]*)\s*" + fr"(?P\))?\s*" + ) + self._if_true = re.compile( + fr"\s*#\s*{ELIF_GROUP}if\s+{MACRO_GROUP}\s*{OP_GROUP}" + ) + + self._c_comment = re.compile(r"/\*.*?\*/") + self._cpp_comment = re.compile(r"//") + + def _log(self, *args, **kwargs): + print(*args, **kwargs) + + def _strip_comments(self, line): + # First strip c-style comments (may include //) + while True: + m = self._c_comment.search(line) + if m is None: + break + line = line[:m.start()] + line[m.end():] + + # Then strip cpp-style comments + m = self._cpp_comment.search(line) + if m is not None: + line = line[:m.start()] + + return line + + def _fixup_indentation(self, macro, replace: [str]): + if len(replace) == 0: + return replace + if len(replace) == 1 and self._define.match(replace[0]) is None: + # If there is only one line, only replace defines + return replace + + + all_pound = True + for line in replace: + if not line.startswith('#'): + all_pound = False + if all_pound: + replace = [line[1:] for line in replace] + + min_spaces = len(replace[0]) + for line in replace: + spaces = 0 + for i, c in enumerate(line): + if c != ' ': + # Non-preprocessor line ==> skip the fixup + if not all_pound and c != '#': + return replace + spaces = i + break + min_spaces = min(min_spaces, spaces) + + replace = [line[min_spaces:] for line in replace] + + if all_pound: + replace = ["#" + line for line in replace] + + return replace + + def _handle_if_block(self, macro, idx, is_true, prepend): + """ + Remove the #if or #elif block starting on this line. + """ + REMOVE_ONE = 0 + KEEP_ONE = 1 + REMOVE_REST = 2 + + if is_true: + state = KEEP_ONE + else: + state = REMOVE_ONE + + line = self._inlines[idx] + is_if = self._if.match(line) is not None + assert is_if or self._elif.match(line) is not None + depth = 0 + + start_idx = idx + + idx += 1 + replace = prepend + finished = False + while idx < len(self._inlines): + line = self._inlines[idx] + # Nested if statement + if self._if.match(line): + depth += 1 + idx += 1 + continue + # We're inside a nested statement + if depth > 0: + if self._endif.match(line): + depth -= 1 + idx += 1 + continue + + # We're at the original depth + + # Looking only for an endif. + # We've found a true statement, but haven't + # completely elided the if block, so we just + # remove the remainder. + if state == REMOVE_REST: + if self._endif.match(line): + if is_if: + # Remove the endif because we took the first if + idx += 1 + finished = True + break + idx += 1 + continue + + if state == KEEP_ONE: + m = self._elif.match(line) + if self._endif.match(line): + replace += self._inlines[start_idx + 1:idx] + idx += 1 + finished = True + break + if self._elif.match(line) or self._else.match(line): + replace += self._inlines[start_idx + 1:idx] + state = REMOVE_REST + idx += 1 + continue + + if state == REMOVE_ONE: + m = self._elif.match(line) + if m is not None: + if is_if: + idx += 1 + b = m.start('elif') + e = m.end('elif') + assert e - b == 2 + replace.append(line[:b] + line[e:]) + finished = True + break + m = self._else.match(line) + if m is not None: + if is_if: + idx += 1 + while self._endif.match(self._inlines[idx]) is None: + replace.append(self._inlines[idx]) + idx += 1 + idx += 1 + finished = True + break + if self._endif.match(line): + if is_if: + # Remove the endif because no other elifs + idx += 1 + finished = True + break + idx += 1 + continue + if not finished: + raise RuntimeError("Unterminated if block!") + + replace = self._fixup_indentation(macro, replace) + + self._log(f"\tHardwiring {macro}") + if start_idx > 0: + self._log(f"\t\t {self._inlines[start_idx - 1][:-1]}") + for x in range(start_idx, idx): + self._log(f"\t\t- {self._inlines[x][:-1]}") + for line in replace: + self._log(f"\t\t+ {line[:-1]}") + if idx < len(self._inlines): + self._log(f"\t\t {self._inlines[idx][:-1]}") + + return idx, replace + + def _preprocess_once(self): + outlines = [] + idx = 0 + changed = False + while idx < len(self._inlines): + line = self._inlines[idx] + sline = self._strip_comments(line) + m = self._ifdef.fullmatch(sline) + if_true = False + if m is None: + m = self._if_defined_value.fullmatch(sline) + if m is None: + m = self._if_defined.match(sline) + if m is None: + m = self._if_true.match(sline) + if_true = (m is not None) + if m is None: + outlines.append(line) + idx += 1 + continue + + groups = m.groupdict() + macro = groups['macro'] + op = groups.get('op') + + if not (macro in self._defs or macro in self._undefs): + outlines.append(line) + idx += 1 + continue + + defined = macro in self._defs + + # Needed variables set: + # resolved: Is the statement fully resolved? + # is_true: If resolved, is the statement true? + ifdef = False + if if_true: + if not defined: + outlines.append(line) + idx += 1 + continue + + defined_value = self._defs[macro] + is_int = True + try: + defined_value = int(defined_value) + except TypeError: + is_int = False + except ValueError: + is_int = False + + resolved = is_int + is_true = (defined_value != 0) + + if resolved and op is not None: + if op == '&&': + resolved = not is_true + else: + assert op == '||' + resolved = is_true + + else: + ifdef = groups.get('not') is None + elseif = groups.get('elif') is not None + + macro2 = groups.get('macro2') + cmp = groups.get('cmp') + value = groups.get('value') + openp = groups.get('openp') + closep = groups.get('closep') + + is_true = (ifdef == defined) + resolved = True + if op is not None: + if op == '&&': + resolved = not is_true + else: + assert op == '||' + resolved = is_true + + if macro2 is not None and not resolved: + assert ifdef and defined and op == '&&' and cmp is not None + # If the statement is true, but we have a single value check, then + # check the value. + defined_value = self._defs[macro] + are_ints = True + try: + defined_value = int(defined_value) + value = int(value) + except TypeError: + are_ints = False + except ValueError: + are_ints = False + if ( + macro == macro2 and + ((openp is None) == (closep is None)) and + are_ints + ): + resolved = True + if cmp == '<': + is_true = defined_value < value + elif cmp == '<=': + is_true = defined_value <= value + elif cmp == '==': + is_true = defined_value == value + elif cmp == '!=': + is_true = defined_value != value + elif cmp == '>=': + is_true = defined_value >= value + elif cmp == '>': + is_true = defined_value > value + else: + resolved = False + + if op is not None and not resolved: + # Remove the first op in the line + spaces + if op == '&&': + opre = op + else: + assert op == '||' + opre = r'\|\|' + needle = re.compile(fr"(?P\s*#\s*(el)?if\s+).*?(?P{opre}\s*)") + match = needle.match(line) + assert match is not None + newline = line[:match.end('if')] + line[match.end('op'):] + + self._log(f"\tHardwiring partially resolved {macro}") + self._log(f"\t\t- {line[:-1]}") + self._log(f"\t\t+ {newline[:-1]}") + + outlines.append(newline) + idx += 1 + continue + + # Skip any statements we cannot fully compute + if not resolved: + outlines.append(line) + idx += 1 + continue + + prepend = [] + if macro in self._replaces: + assert not ifdef + assert op is None + value = self._replaces.pop(macro) + prepend = [f"#define {macro} {value}\n"] + + idx, replace = self._handle_if_block(macro, idx, is_true, prepend) + outlines += replace + changed = True + + return changed, outlines + + def preprocess(self, filename): + with open(filename, 'r') as f: + self._inlines = f.readlines() + changed = True + iters = 0 + while changed: + iters += 1 + changed, outlines = self._preprocess_once() + self._inlines = outlines + + with open(filename, 'w') as f: + f.write(''.join(self._inlines)) + + +class Freestanding(object): + def __init__( + self, zstd_deps: str, mem: str, source_lib: str, output_lib: str, + external_xxhash: bool, xxh64_state: Optional[str], + xxh64_prefix: Optional[str], rewritten_includes: [(str, str)], + defs: [(str, Optional[str])], replaces: [(str, str)], + undefs: [str], excludes: [str], seds: [str], spdx: bool, + ): + self._zstd_deps = zstd_deps + self._mem = mem + self._src_lib = source_lib + self._dst_lib = output_lib + self._external_xxhash = external_xxhash + self._xxh64_state = xxh64_state + self._xxh64_prefix = xxh64_prefix + self._rewritten_includes = rewritten_includes + self._defs = defs + self._replaces = replaces + self._undefs = undefs + self._excludes = excludes + self._seds = seds + self._spdx = spdx + + def _dst_lib_file_paths(self): + """ + Yields all the file paths in the dst_lib. + """ + for root, dirname, filenames in os.walk(self._dst_lib): + for filename in filenames: + filepath = os.path.join(root, filename) + yield filepath + + def _log(self, *args, **kwargs): + print(*args, **kwargs) + + def _copy_file(self, lib_path): + suffixes = [".c", ".h", ".S"] + if not any((lib_path.endswith(suffix) for suffix in suffixes)): + return + if lib_path in SKIPPED_FILES: + self._log(f"\tSkipping file: {lib_path}") + return + if self._external_xxhash and lib_path in XXHASH_FILES: + self._log(f"\tSkipping xxhash file: {lib_path}") + return + + src_path = os.path.join(self._src_lib, lib_path) + dst_path = os.path.join(self._dst_lib, lib_path) + self._log(f"\tCopying: {src_path} -> {dst_path}") + shutil.copyfile(src_path, dst_path) + + def _copy_source_lib(self): + self._log("Copying source library into output library") + + assert os.path.exists(self._src_lib) + os.makedirs(self._dst_lib, exist_ok=True) + self._copy_file("zstd.h") + self._copy_file("zstd_errors.h") + for subdir in INCLUDED_SUBDIRS: + src_dir = os.path.join(self._src_lib, subdir) + dst_dir = os.path.join(self._dst_lib, subdir) + + assert os.path.exists(src_dir) + os.makedirs(dst_dir, exist_ok=True) + + for filename in os.listdir(src_dir): + lib_path = os.path.join(subdir, filename) + self._copy_file(lib_path) + + def _copy_zstd_deps(self): + dst_zstd_deps = os.path.join(self._dst_lib, "common", "zstd_deps.h") + self._log(f"Copying zstd_deps: {self._zstd_deps} -> {dst_zstd_deps}") + shutil.copyfile(self._zstd_deps, dst_zstd_deps) + + def _copy_mem(self): + dst_mem = os.path.join(self._dst_lib, "common", "mem.h") + self._log(f"Copying mem: {self._mem} -> {dst_mem}") + shutil.copyfile(self._mem, dst_mem) + + def _hardwire_preprocessor(self, name: str, value: Optional[str] = None, undef=False): + """ + If value=None then hardwire that it is defined, but not what the value is. + If undef=True then value must be None. + If value='' then the macro is defined to '' exactly. + """ + assert not (undef and value is not None) + for filepath in self._dst_lib_file_paths(): + file = FileLines(filepath) + + def _hardwire_defines(self): + self._log("Hardwiring macros") + partial_preprocessor = PartialPreprocessor(self._defs, self._replaces, self._undefs) + for filepath in self._dst_lib_file_paths(): + partial_preprocessor.preprocess(filepath) + + def _remove_excludes(self): + self._log("Removing excluded sections") + for exclude in self._excludes: + self._log(f"\tRemoving excluded sections for: {exclude}") + begin_re = re.compile(f"BEGIN {exclude}") + end_re = re.compile(f"END {exclude}") + for filepath in self._dst_lib_file_paths(): + file = FileLines(filepath) + outlines = [] + skipped = [] + emit = True + for line in file.lines: + if emit and begin_re.search(line) is not None: + assert end_re.search(line) is None + emit = False + if emit: + outlines.append(line) + else: + skipped.append(line) + if end_re.search(line) is not None: + assert begin_re.search(line) is None + self._log(f"\t\tRemoving excluded section: {exclude}") + for s in skipped: + self._log(f"\t\t\t- {s}") + emit = True + skipped = [] + if not emit: + raise RuntimeError("Excluded section unfinished!") + file.lines = outlines + file.write() + + def _rewrite_include(self, original, rewritten): + self._log(f"\tRewriting include: {original} -> {rewritten}") + regex = re.compile(f"\\s*#\\s*include\\s*(?P{original})") + for filepath in self._dst_lib_file_paths(): + file = FileLines(filepath) + for i, line in enumerate(file.lines): + match = regex.match(line) + if match is None: + continue + s = match.start('include') + e = match.end('include') + file.lines[i] = line[:s] + rewritten + line[e:] + file.write() + + def _rewrite_includes(self): + self._log("Rewriting includes") + for original, rewritten in self._rewritten_includes: + self._rewrite_include(original, rewritten) + + def _replace_xxh64_prefix(self): + if self._xxh64_prefix is None: + return + self._log(f"Replacing XXH64 prefix with {self._xxh64_prefix}") + replacements = [] + if self._xxh64_state is not None: + replacements.append( + (re.compile(r"([^\w]|^)(?PXXH64_state_t)([^\w]|$)"), self._xxh64_state) + ) + if self._xxh64_prefix is not None: + replacements.append( + (re.compile(r"([^\w]|^)(?PXXH64)[\(_]"), self._xxh64_prefix) + ) + for filepath in self._dst_lib_file_paths(): + file = FileLines(filepath) + for i, line in enumerate(file.lines): + modified = False + for regex, replacement in replacements: + match = regex.search(line) + while match is not None: + modified = True + b = match.start('orig') + e = match.end('orig') + line = line[:b] + replacement + line[e:] + match = regex.search(line) + if modified: + self._log(f"\t- {file.lines[i][:-1]}") + self._log(f"\t+ {line[:-1]}") + file.lines[i] = line + file.write() + + def _parse_sed(self, sed): + assert sed[0] == 's' + delim = sed[1] + match = re.fullmatch(f's{delim}(.+){delim}(.*){delim}(.*)', sed) + assert match is not None + regex = re.compile(match.group(1)) + format_str = match.group(2) + is_global = match.group(3) == 'g' + return regex, format_str, is_global + + def _process_sed(self, sed): + self._log(f"Processing sed: {sed}") + regex, format_str, is_global = self._parse_sed(sed) + + for filepath in self._dst_lib_file_paths(): + file = FileLines(filepath) + for i, line in enumerate(file.lines): + modified = False + while True: + match = regex.search(line) + if match is None: + break + replacement = format_str.format(match.groups(''), match.groupdict('')) + b = match.start() + e = match.end() + line = line[:b] + replacement + line[e:] + modified = True + if not is_global: + break + if modified: + self._log(f"\t- {file.lines[i][:-1]}") + self._log(f"\t+ {line[:-1]}") + file.lines[i] = line + file.write() + + def _process_seds(self): + self._log("Processing seds") + for sed in self._seds: + self._process_sed(sed) + + def _process_spdx(self): + if not self._spdx: + return + self._log("Processing spdx") + SPDX_C = "// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause\n" + SPDX_H_S = "/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */\n" + for filepath in self._dst_lib_file_paths(): + file = FileLines(filepath) + if file.lines[0] == SPDX_C or file.lines[0] == SPDX_H_S: + continue + for line in file.lines: + if "SPDX-License-Identifier" in line: + raise RuntimeError(f"Unexpected SPDX license identifier: {file.filename} {repr(line)}") + if file.filename.endswith(".c"): + file.lines.insert(0, SPDX_C) + elif file.filename.endswith(".h") or file.filename.endswith(".S"): + file.lines.insert(0, SPDX_H_S) + else: + raise RuntimeError(f"Unexpected file extension: {file.filename}") + file.write() + + + + def go(self): + self._copy_source_lib() + self._copy_zstd_deps() + self._copy_mem() + self._hardwire_defines() + self._remove_excludes() + self._rewrite_includes() + self._replace_xxh64_prefix() + self._process_seds() + self._process_spdx() + + +def parse_optional_pair(defines: [str]) -> [(str, Optional[str])]: + output = [] + for define in defines: + parsed = define.split('=') + if len(parsed) == 1: + output.append((parsed[0], None)) + elif len(parsed) == 2: + output.append((parsed[0], parsed[1])) + else: + raise RuntimeError(f"Bad define: {define}") + return output + + +def parse_pair(rewritten_includes: [str]) -> [(str, str)]: + output = [] + for rewritten_include in rewritten_includes: + parsed = rewritten_include.split('=') + if len(parsed) == 2: + output.append((parsed[0], parsed[1])) + else: + raise RuntimeError(f"Bad rewritten include: {rewritten_include}") + return output + + + +def main(name, args): + parser = argparse.ArgumentParser(prog=name) + parser.add_argument("--zstd-deps", default="zstd_deps.h", help="Zstd dependencies file") + parser.add_argument("--mem", default="mem.h", help="Memory module") + parser.add_argument("--source-lib", default="../../lib", help="Location of the zstd library") + parser.add_argument("--output-lib", default="./freestanding_lib", help="Where to output the freestanding zstd library") + parser.add_argument("--xxhash", default=None, help="Alternate external xxhash include e.g. --xxhash=''. If set xxhash is not included.") + parser.add_argument("--xxh64-state", default=None, help="Alternate XXH64 state type (excluding _) e.g. --xxh64-state='struct xxh64_state'") + parser.add_argument("--xxh64-prefix", default=None, help="Alternate XXH64 function prefix (excluding _) e.g. --xxh64-prefix=xxh64") + parser.add_argument("--rewrite-include", default=[], dest="rewritten_includes", action="append", help="Rewrite an include REGEX=NEW (e.g. '=')") + parser.add_argument("--sed", default=[], dest="seds", action="append", help="Apply a sed replacement. Format: `s/REGEX/FORMAT/[g]`. REGEX is a Python regex. FORMAT is a Python format string formatted by the regex dict.") + parser.add_argument("--spdx", action="store_true", help="Add SPDX License Identifiers") + parser.add_argument("-D", "--define", default=[], dest="defs", action="append", help="Pre-define this macro (can be passed multiple times)") + parser.add_argument("-U", "--undefine", default=[], dest="undefs", action="append", help="Pre-undefine this macro (can be passed multiple times)") + parser.add_argument("-R", "--replace", default=[], dest="replaces", action="append", help="Pre-define this macro and replace the first ifndef block with its definition") + parser.add_argument("-E", "--exclude", default=[], dest="excludes", action="append", help="Exclude all lines between 'BEGIN ' and 'END '") + args = parser.parse_args(args) + + # Always remove threading + if "ZSTD_MULTITHREAD" not in args.undefs: + args.undefs.append("ZSTD_MULTITHREAD") + + args.defs = parse_optional_pair(args.defs) + for name, _ in args.defs: + if name in args.undefs: + raise RuntimeError(f"{name} is both defined and undefined!") + + # Always set tracing to 0 + if "ZSTD_NO_TRACE" not in (arg[0] for arg in args.defs): + args.defs.append(("ZSTD_NO_TRACE", None)) + args.defs.append(("ZSTD_TRACE", "0")) + + args.replaces = parse_pair(args.replaces) + for name, _ in args.replaces: + if name in args.undefs or name in args.defs: + raise RuntimeError(f"{name} is both replaced and (un)defined!") + + args.rewritten_includes = parse_pair(args.rewritten_includes) + + external_xxhash = False + if args.xxhash is not None: + external_xxhash = True + args.rewritten_includes.append(('"(\\.\\./common/)?xxhash.h"', args.xxhash)) + + if args.xxh64_prefix is not None: + if not external_xxhash: + raise RuntimeError("--xxh64-prefix may only be used with --xxhash provided") + + if args.xxh64_state is not None: + if not external_xxhash: + raise RuntimeError("--xxh64-state may only be used with --xxhash provided") + + Freestanding( + args.zstd_deps, + args.mem, + args.source_lib, + args.output_lib, + external_xxhash, + args.xxh64_state, + args.xxh64_prefix, + args.rewritten_includes, + args.defs, + args.replaces, + args.undefs, + args.excludes, + args.seds, + args.spdx, + ).go() + +if __name__ == "__main__": + main(sys.argv[0], sys.argv[1:]) diff --git a/cpp/third_party/zstd-1.5.7/contrib/gen_html/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/gen_html/.gitignore new file mode 100644 index 0000000000..3446114287 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/gen_html/.gitignore @@ -0,0 +1,3 @@ +# make artefact +gen_html +zstd_manual.html diff --git a/cpp/third_party/zstd-1.5.7/contrib/gen_html/Makefile b/cpp/third_party/zstd-1.5.7/contrib/gen_html/Makefile new file mode 100644 index 0000000000..f93669e023 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/gen_html/Makefile @@ -0,0 +1,51 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +CXXFLAGS ?= -O3 +CXXFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wno-comment +CXXFLAGS += $(MOREFLAGS) +FLAGS = $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) + +ZSTDAPI = ../../lib/zstd.h +ZSTDMANUAL = ../../doc/zstd_manual.html +LIBVER_MAJOR_SCRIPT:=`sed -n '/define ZSTD_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(ZSTDAPI)` +LIBVER_MINOR_SCRIPT:=`sed -n '/define ZSTD_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(ZSTDAPI)` +LIBVER_PATCH_SCRIPT:=`sed -n '/define ZSTD_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < $(ZSTDAPI)` +LIBVER_SCRIPT:= $(LIBVER_MAJOR_SCRIPT).$(LIBVER_MINOR_SCRIPT).$(LIBVER_PATCH_SCRIPT) +LIBVER := $(shell echo $(LIBVER_SCRIPT)) + + +# Define *.exe as extension for Windows systems +ifneq (,$(filter Windows%,$(OS))) +EXT =.exe +else +EXT = +endif + + +.PHONY: default +default: gen_html + +.PHONY: all +all: manual + +gen_html: gen_html.cpp + $(CXX) $(FLAGS) $^ -o $@$(EXT) + +$(ZSTDMANUAL): gen_html $(ZSTDAPI) + echo "Update zstd manual in /doc" + ./gen_html$(EXT) $(LIBVER) $(ZSTDAPI) $(ZSTDMANUAL) + +.PHONY: manual +manual: gen_html $(ZSTDMANUAL) + +.PHONY: clean +clean: + @$(RM) gen_html$(EXT) + @echo Cleaning completed diff --git a/cpp/third_party/zstd-1.5.7/contrib/gen_html/README.md b/cpp/third_party/zstd-1.5.7/contrib/gen_html/README.md new file mode 100644 index 0000000000..63a4caa250 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/gen_html/README.md @@ -0,0 +1,31 @@ +gen_html - a program for automatic generation of zstd manual +============================================================ + +#### Introduction + +This simple C++ program generates a single-page HTML manual from `zstd.h`. + +The format of recognized comment blocks is following: +- comments of type `/*!` mean: this is a function declaration; switch comments with declarations +- comments of type `/**` and `/*-` mean: this is a comment; use a `

` header for the first line +- comments of type `/*=` and `/**=` mean: use a `

` header and show also all functions until first empty line +- comments of type `/*X` where `X` is different from above-mentioned are ignored + +Moreover: +- `ZSTDLIB_API` is removed to improve readability +- `typedef` are detected and included even if uncommented +- comments of type `/**<` and `/*!<` are detected and only function declaration is highlighted (bold) + + +#### Usage + +The program requires 3 parameters: +``` +gen_html [zstd_version] [input_file] [output_html] +``` + +To compile program and generate zstd manual we have used: +``` +make +./gen_html.exe 1.1.1 ../../lib/zstd.h zstd_manual.html +``` diff --git a/cpp/third_party/zstd-1.5.7/contrib/gen_html/gen-zstd-manual.sh b/cpp/third_party/zstd-1.5.7/contrib/gen_html/gen-zstd-manual.sh new file mode 100755 index 0000000000..57a8b6ea51 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/gen_html/gen-zstd-manual.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +LIBVER_MAJOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` +LIBVER_MINOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` +LIBVER_PATCH_SCRIPT=`sed -n '/define ZSTD_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` +LIBVER_SCRIPT=$LIBVER_MAJOR_SCRIPT.$LIBVER_MINOR_SCRIPT.$LIBVER_PATCH_SCRIPT + +echo ZSTD_VERSION=$LIBVER_SCRIPT +./gen_html $LIBVER_SCRIPT ../../lib/zstd.h ./zstd_manual.html diff --git a/cpp/third_party/zstd-1.5.7/contrib/gen_html/gen_html.cpp b/cpp/third_party/zstd-1.5.7/contrib/gen_html/gen_html.cpp new file mode 100644 index 0000000000..adf0f41b90 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/gen_html/gen_html.cpp @@ -0,0 +1,225 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +#include +#include +#include +#include +using namespace std; + + +/* trim string at the beginning and at the end */ +void trim(string& s, string characters) +{ + size_t p = s.find_first_not_of(characters); + s.erase(0, p); + + p = s.find_last_not_of(characters); + if (string::npos != p) + s.erase(p+1); +} + + +/* trim C++ style comments */ +void trim_comments(string &s) +{ + size_t spos, epos; + + spos = s.find("/*"); + epos = s.find("*/"); + s = s.substr(spos+3, epos-(spos+3)); +} + + +/* get lines until a given terminator */ +vector get_lines(vector& input, int& linenum, string terminator) +{ + vector out; + string line; + size_t epos; + + while ((size_t)linenum < input.size()) { + line = input[linenum]; + + if (terminator.empty() && line.empty()) { linenum--; break; } + + epos = line.find(terminator); + if (!terminator.empty() && epos!=string::npos) { + out.push_back(line); + break; + } + out.push_back(line); + linenum++; + } + return out; +} + + +/* print line with ZSTDLIB_API removed and C++ comments not bold */ +void print_line(stringstream &sout, string line) +{ + size_t spos; + + if (line.substr(0,12) == "ZSTDLIB_API ") line = line.substr(12); + spos = line.find("/*"); + if (spos!=string::npos) { + sout << line.substr(0, spos); + sout << "" << line.substr(spos) << "" << endl; + } else { + // fprintf(stderr, "lines=%s\n", line.c_str()); + sout << line << endl; + } +} + + +int main(int argc, char *argv[]) { + char exclam; + int linenum, chapter = 1; + vector input, lines, comments, chapters; + string line, version; + size_t spos, l; + stringstream sout; + ifstream istream; + ofstream ostream; + + if (argc < 4) { + cout << "usage: " << argv[0] << " [zstd_version] [input_file] [output_html]" << endl; + return 1; + } + + version = "zstd " + string(argv[1]) + " Manual"; + + istream.open(argv[2], ifstream::in); + if (!istream.is_open()) { + cout << "Error opening file " << argv[2] << endl; + return 1; + } + + ostream.open(argv[3], ifstream::out); + if (!ostream.is_open()) { + cout << "Error opening file " << argv[3] << endl; + return 1; + } + + while (getline(istream, line)) { + input.push_back(line); + } + + for (linenum=0; (size_t)linenum < input.size(); linenum++) { + line = input[linenum]; + + /* typedefs are detected and included even if uncommented */ + if (line.substr(0,7) == "typedef" && line.find("{")!=string::npos) { + lines = get_lines(input, linenum, "}"); + sout << "
";
+            for (l=0; l

" << endl; + continue; + } + + /* comments of type /**< and /*!< are detected and only function declaration is highlighted (bold) */ + if ((line.find("/**<")!=string::npos || line.find("/*!<")!=string::npos) && line.find("*/")!=string::npos) { + sout << "
";
+            print_line(sout, line);
+            sout << "

" << endl; + continue; + } + + spos = line.find("/**="); + if (spos==string::npos) { + spos = line.find("/*!"); + if (spos==string::npos) + spos = line.find("/**"); + if (spos==string::npos) + spos = line.find("/*-"); + if (spos==string::npos) + spos = line.find("/*="); + if (spos==string::npos) + continue; + exclam = line[spos+2]; + } + else exclam = '='; + + comments = get_lines(input, linenum, "*/"); + if (!comments.empty()) comments[0] = line.substr(spos+3); + if (!comments.empty()) comments[comments.size()-1] = comments[comments.size()-1].substr(0, comments[comments.size()-1].find("*/")); + for (l=0; l"; + for (l=0; l

"; + for (l=0; l
" << endl << endl; + } else if (exclam == '=') { /* comments of type /*= and /**= mean: use a

header and show also all functions until first empty line */ + trim(comments[0], " "); + sout << "

" << comments[0] << "

";
+            for (l=1; l
";
+            lines = get_lines(input, ++linenum, "");
+            for (l=0; l
" << endl; + } else { /* comments of type /** and /*- mean: this is a comment; use a

header for the first line */ + if (comments.empty()) continue; + + trim(comments[0], " "); + sout << "

" << comments[0] << "

";
+            chapters.push_back(comments[0]);
+            chapter++;
+
+            for (l=1; l 1)
+                sout << "
" << endl << endl; + else + sout << "
" << endl << endl; + } + } + + ostream << "\n\n\n" << version << "\n\n" << endl; + ostream << "

" << version << "

\n"; + ostream << "Note: the content of this file has been automatically generated by parsing \"zstd.h\" \n"; + + ostream << "
\n

Contents

\n
    \n"; + for (size_t i=0; i" << chapters[i].c_str() << "\n"; + ostream << "
\n
\n"; + + ostream << sout.str(); + ostream << "" << endl << "" << endl; + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/.gitignore new file mode 100644 index 0000000000..e77c4e4967 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/.gitignore @@ -0,0 +1,2 @@ +# build artifacts +largeNbDicts diff --git a/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/Makefile b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/Makefile new file mode 100644 index 0000000000..40734e62e4 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/Makefile @@ -0,0 +1,58 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +PROGDIR = ../../programs +LIBDIR = ../../lib + +LIBZSTD = $(LIBDIR)/libzstd.a + +CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/common -I$(LIBDIR)/dictBuilder -I$(PROGDIR) + +CFLAGS ?= -O3 +CFLAGS += -std=gnu99 +DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum \ + -Wstrict-prototypes -Wundef -Wpointer-arith \ + -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ + -Wredundant-decls +CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) + + +default: largeNbDicts + +all : largeNbDicts + +largeNbDicts: util.o timefn.o benchfn.o datagen.o xxhash.o largeNbDicts.c $(LIBZSTD) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +.PHONY: $(LIBZSTD) +$(LIBZSTD): + $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)" + +benchfn.o: $(PROGDIR)/benchfn.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + +timefn.o: $(PROGDIR)/timefn.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + +datagen.o: $(PROGDIR)/datagen.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + +util.o: $(PROGDIR)/util.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + + +xxhash.o : $(LIBDIR)/common/xxhash.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + + +clean: + $(RM) *.o + $(MAKE) -C $(LIBDIR) clean > /dev/null + $(RM) largeNbDicts diff --git a/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/README.md b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/README.md new file mode 100644 index 0000000000..010102c904 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/README.md @@ -0,0 +1,33 @@ +largeNbDicts +===================== + +`largeNbDicts` is a benchmark test tool +dedicated to the specific scenario of +dictionary decompression using a very large number of dictionaries. +When dictionaries are constantly changing, they are always "cold", +suffering from increased latency due to cache misses. + +The tool is created in a bid to investigate performance for this scenario, +and experiment mitigation techniques. + +Command line : +``` +largeNbDicts [Options] filename(s) + +Options : +-z : benchmark compression (default) +-d : benchmark decompression +-r : recursively load all files in subdirectories (default: off) +-B# : split input into blocks of size # (default: no split) +-# : use compression level # (default: 3) +-D # : use # as a dictionary (default: create one) +-i# : nb benchmark rounds (default: 6) +--nbBlocks=#: use # blocks for bench (default: one per file) +--nbDicts=# : create # dictionaries for bench (default: one per block) +-h : help (this text) + +Advanced Options (see zstd.h for documentation) : +--dedicated-dict-search +--dict-content-type=# +--dict-attach-pref=# +``` diff --git a/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/largeNbDicts.c b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/largeNbDicts.c new file mode 100644 index 0000000000..6502f12275 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/largeNbDicts/largeNbDicts.c @@ -0,0 +1,1085 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* largeNbDicts + * This is a benchmark test tool + * dedicated to the specific case of dictionary decompression + * using a very large nb of dictionaries + * thus suffering latency from lots of cache misses. + * It's created in a bid to investigate performance and find optimizations. */ + + +/*--- Dependencies ---*/ + +#include /* size_t */ +#include /* malloc, free, abort, qsort*/ +#include /* fprintf */ +#include /* UINT_MAX */ +#include /* assert */ + +#include "util.h" +#include "benchfn.h" +#define ZSTD_STATIC_LINKING_ONLY +#include "zstd.h" +#include "zdict.h" + + +/*--- Constants --- */ + +#define KB *(1<<10) +#define MB *(1<<20) + +#define BLOCKSIZE_DEFAULT 0 /* no slicing into blocks */ +#define DICTSIZE (4 KB) +#define CLEVEL_DEFAULT 3 +#define DICT_LOAD_METHOD ZSTD_dlm_byCopy + +#define BENCH_TIME_DEFAULT_S 6 +#define RUN_TIME_DEFAULT_MS 1000 +#define BENCH_TIME_DEFAULT_MS (BENCH_TIME_DEFAULT_S * RUN_TIME_DEFAULT_MS) + +#define DISPLAY_LEVEL_DEFAULT 3 + +#define BENCH_SIZE_MAX (1200 MB) + + +/*--- Macros ---*/ + +#define CONTROL(c) { if (!(c)) abort(); } +#undef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + + +/*--- Display Macros ---*/ + +#define DISPLAY(...) fprintf(stdout, __VA_ARGS__) +#define DISPLAYLEVEL(l, ...) { if (g_displayLevel>=l) { DISPLAY(__VA_ARGS__); } } +static int g_displayLevel = DISPLAY_LEVEL_DEFAULT; /* 0 : no display, 1: errors, 2 : + result + interaction + warnings, 3 : + progression, 4 : + information */ + + +/*--- buffer_t ---*/ + +typedef struct { + void* ptr; + size_t size; + size_t capacity; +} buffer_t; + +static const buffer_t kBuffNull = { NULL, 0, 0 }; + +/* @return : kBuffNull if any error */ +static buffer_t createBuffer(size_t capacity) +{ + assert(capacity > 0); + void* const ptr = malloc(capacity); + if (ptr==NULL) return kBuffNull; + + buffer_t buffer; + buffer.ptr = ptr; + buffer.capacity = capacity; + buffer.size = 0; + return buffer; +} + +static void freeBuffer(buffer_t buff) +{ + free(buff.ptr); +} + + +static void fillBuffer_fromHandle(buffer_t* buff, FILE* f) +{ + size_t const readSize = fread(buff->ptr, 1, buff->capacity, f); + buff->size = readSize; +} + + +/* @return : kBuffNull if any error */ +static buffer_t createBuffer_fromFile(const char* fileName) +{ + U64 const fileSize = UTIL_getFileSize(fileName); + size_t const bufferSize = (size_t) fileSize; + + if (fileSize == UTIL_FILESIZE_UNKNOWN) return kBuffNull; + assert((U64)bufferSize == fileSize); /* check overflow */ + + { FILE* const f = fopen(fileName, "rb"); + if (f == NULL) return kBuffNull; + + buffer_t buff = createBuffer(bufferSize); + CONTROL(buff.ptr != NULL); + + fillBuffer_fromHandle(&buff, f); + CONTROL(buff.size == buff.capacity); + + fclose(f); /* do nothing specific if fclose() fails */ + return buff; + } +} + + +/* @return : kBuffNull if any error */ +static buffer_t +createDictionaryBuffer(const char* dictionaryName, + const void* srcBuffer, + const size_t* srcBlockSizes, size_t nbBlocks, + size_t requestedDictSize) +{ + if (dictionaryName) { + DISPLAYLEVEL(3, "loading dictionary %s \n", dictionaryName); + return createBuffer_fromFile(dictionaryName); /* note : result might be kBuffNull */ + + } else { + + DISPLAYLEVEL(3, "creating dictionary, of target size %u bytes \n", + (unsigned)requestedDictSize); + void* const dictBuffer = malloc(requestedDictSize); + CONTROL(dictBuffer != NULL); + + assert(nbBlocks <= UINT_MAX); + size_t const dictSize = ZDICT_trainFromBuffer(dictBuffer, requestedDictSize, + srcBuffer, + srcBlockSizes, (unsigned)nbBlocks); + CONTROL(!ZSTD_isError(dictSize)); + + buffer_t result; + result.ptr = dictBuffer; + result.capacity = requestedDictSize; + result.size = dictSize; + return result; + } +} + +/*! BMK_loadFiles() : + * Loads `buffer`, with content from files listed within `fileNamesTable`. + * Fills `buffer` entirely. + * @return : 0 on success, !=0 on error */ +static int loadFiles(void* buffer, size_t bufferSize, + size_t* fileSizes, + const char* const * fileNamesTable, unsigned nbFiles) +{ + size_t pos = 0, totalSize = 0; + + for (unsigned n=0; n 0); + void* const srcBuffer = malloc(loadedSize); + assert(srcBuffer != NULL); + + assert(nbFiles > 0); + size_t* const fileSizes = (size_t*)calloc(nbFiles, sizeof(*fileSizes)); + assert(fileSizes != NULL); + + /* Load input buffer */ + int const errorCode = loadFiles(srcBuffer, loadedSize, + fileSizes, + fileNamesTable, nbFiles); + assert(errorCode == 0); + + void** sliceTable = (void**)malloc(nbFiles * sizeof(*sliceTable)); + assert(sliceTable != NULL); + + char* const ptr = (char*)srcBuffer; + size_t pos = 0; + unsigned fileNb = 0; + for ( ; (pos < loadedSize) && (fileNb < nbFiles); fileNb++) { + sliceTable[fileNb] = ptr + pos; + pos += fileSizes[fileNb]; + } + assert(pos == loadedSize); + assert(fileNb == nbFiles); + + + buffer_t buffer; + buffer.ptr = srcBuffer; + buffer.capacity = loadedSize; + buffer.size = loadedSize; + + slice_collection_t slices; + slices.slicePtrs = sliceTable; + slices.capacities = fileSizes; + slices.nbSlices = nbFiles; + + buffer_collection_t bc; + bc.buffer = buffer; + bc.slices = slices; + return bc; +} + + + + +/*--- ddict_collection_t ---*/ + +typedef struct { + ZSTD_DDict** ddicts; + size_t nbDDict; +} ddict_collection_t; + +typedef struct { + ZSTD_CDict** cdicts; + size_t nbCDict; +} cdict_collection_t; + +static const cdict_collection_t kNullCDictCollection = { NULL, 0 }; + +static void freeCDictCollection(cdict_collection_t cdictc) +{ + for (size_t dictNb=0; dictNb < cdictc.nbCDict; dictNb++) { + ZSTD_freeCDict(cdictc.cdicts[dictNb]); + } + free(cdictc.cdicts); +} + +/* returns .buffers=NULL if operation fails */ +static cdict_collection_t createCDictCollection(const void* dictBuffer, size_t dictSize, size_t nbCDict, ZSTD_dictContentType_e dictContentType, ZSTD_CCtx_params* cctxParams) +{ + ZSTD_CDict** const cdicts = malloc(nbCDict * sizeof(ZSTD_CDict*)); + if (cdicts==NULL) return kNullCDictCollection; + for (size_t dictNb=0; dictNb < nbCDict; dictNb++) { + cdicts[dictNb] = ZSTD_createCDict_advanced2(dictBuffer, dictSize, DICT_LOAD_METHOD, dictContentType, cctxParams, ZSTD_defaultCMem); + CONTROL(cdicts[dictNb] != NULL); + } + cdict_collection_t cdictc; + cdictc.cdicts = cdicts; + cdictc.nbCDict = nbCDict; + return cdictc; +} + +static const ddict_collection_t kNullDDictCollection = { NULL, 0 }; + +static void freeDDictCollection(ddict_collection_t ddictc) +{ + for (size_t dictNb=0; dictNb < ddictc.nbDDict; dictNb++) { + ZSTD_freeDDict(ddictc.ddicts[dictNb]); + } + free(ddictc.ddicts); +} + +/* returns .buffers=NULL if operation fails */ +static ddict_collection_t createDDictCollection(const void* dictBuffer, size_t dictSize, size_t nbDDict) +{ + ZSTD_DDict** const ddicts = malloc(nbDDict * sizeof(ZSTD_DDict*)); + assert(ddicts != NULL); + if (ddicts==NULL) return kNullDDictCollection; + for (size_t dictNb=0; dictNb < nbDDict; dictNb++) { + ddicts[dictNb] = ZSTD_createDDict(dictBuffer, dictSize); + assert(ddicts[dictNb] != NULL); + } + ddict_collection_t ddictc; + ddictc.ddicts = ddicts; + ddictc.nbDDict = nbDDict; + return ddictc; +} + + +/* mess with addresses, so that linear scanning dictionaries != linear address scanning */ +void shuffleCDictionaries(cdict_collection_t dicts) +{ + size_t const nbDicts = dicts.nbCDict; + for (size_t r=0; rcctx, ci->dictionaries.cdicts[ci->dictNb]); + ZSTD_compress2(ci->cctx, + dst, srcSize, + src, srcSize); + + ci->dictNb = ci->dictNb + 1; + if (ci->dictNb >= ci->nbDicts) ci->dictNb = 0; + + return srcSize; +} + +/* benched function */ +size_t decompress(const void* src, size_t srcSize, void* dst, size_t dstCapacity, void* payload) +{ + decompressInstructions* const di = (decompressInstructions*) payload; + + size_t const result = ZSTD_decompress_usingDDict(di->dctx, + dst, dstCapacity, + src, srcSize, + di->dictionaries.ddicts[di->dictNb]); + + di->dictNb = di->dictNb + 1; + if (di->dictNb >= di->nbDicts) di->dictNb = 0; + + return result; +} + +typedef enum { + fastest = 0, + median = 1, +} metricAggregatePref_e; + +/* compareFunction() : + * Sort input in decreasing order when used with qsort() */ +int compareFunction(const void *a, const void *b) +{ + double x = *(const double *)a; + double y = *(const double *)b; + if (x < y) + return 1; + else if (x > y) + return -1; + return 0; +} + +double aggregateData(double *data, size_t size, + metricAggregatePref_e metricAggregatePref) +{ + qsort(data, size, sizeof(*data), compareFunction); + if (metricAggregatePref == fastest) + return data[0]; + else /* median */ + return (data[(size - 1) / 2] + data[size / 2]) / 2; +} + +static int benchMem(slice_collection_t dstBlocks, slice_collection_t srcBlocks, + ddict_collection_t ddictionaries, + cdict_collection_t cdictionaries, unsigned nbRounds, + int benchCompression, const char *exeName, + ZSTD_CCtx_params *cctxParams, + metricAggregatePref_e metricAggregatePref) +{ + assert(dstBlocks.nbSlices == srcBlocks.nbSlices); + if (benchCompression) assert(cctxParams); + + unsigned const ms_per_round = RUN_TIME_DEFAULT_MS; + unsigned const total_time_ms = nbRounds * ms_per_round; + + double *const speedPerRound = (double *)malloc(nbRounds * sizeof(double)); + + BMK_timedFnState_t* const benchState = + BMK_createTimedFnState(total_time_ms, ms_per_round); + + decompressInstructions di = createDecompressInstructions(ddictionaries); + compressInstructions ci = + createCompressInstructions(cdictionaries, cctxParams); + void* payload = benchCompression ? (void*)&ci : (void*)&di; + BMK_benchParams_t const bp = { + .benchFn = benchCompression ? compress : decompress, + .benchPayload = payload, + .initFn = NULL, + .initPayload = NULL, + .errorFn = ZSTD_isError, + .blockCount = dstBlocks.nbSlices, + .srcBuffers = (const void* const*) srcBlocks.slicePtrs, + .srcSizes = srcBlocks.capacities, + .dstBuffers = dstBlocks.slicePtrs, + .dstCapacities = dstBlocks.capacities, + .blockResults = NULL + }; + + size_t roundNb = 0; + for (;;) { + BMK_runOutcome_t const outcome = BMK_benchTimedFn(benchState, bp); + CONTROL(BMK_isSuccessful_runOutcome(outcome)); + + BMK_runTime_t const result = BMK_extract_runTime(outcome); + double const dTime_ns = result.nanoSecPerRun; + double const dTime_sec = (double)dTime_ns / 1000000000; + size_t const srcSize = result.sumOfReturn; + double const speed_MBps = (double)srcSize / dTime_sec / (1 MB); + speedPerRound[roundNb] = speed_MBps; + if (benchCompression) + DISPLAY("Compression Speed : %.1f MB/s \r", speed_MBps); + else + DISPLAY("Decompression Speed : %.1f MB/s \r", speed_MBps); + + fflush(stdout); + if (BMK_isCompleted_TimedFn(benchState)) break; + roundNb++; + } + DISPLAY("\n"); + /* BMK_benchTimedFn may not run exactly nbRounds iterations */ + double speedAggregated = + aggregateData(speedPerRound, roundNb + 1, metricAggregatePref); + if (metricAggregatePref == fastest) + DISPLAY("Fastest Speed : %.1f MB/s \n", speedAggregated); + else + DISPLAY("Median Speed : %.1f MB/s \n", speedAggregated); + + char* csvFileName = malloc(strlen(exeName) + 5); + strcpy(csvFileName, exeName); + strcat(csvFileName, ".csv"); + FILE* csvFile = fopen(csvFileName, "r"); + if (!csvFile) { + csvFile = fopen(csvFileName, "wt"); + assert(csvFile); + fprintf(csvFile, "%s\n", exeName); + /* Print table headers */ + fprintf( + csvFile, + "Compression/Decompression,Level,nbDicts,dictAttachPref,metricAggregatePref,Speed\n"); + } else { + fclose(csvFile); + csvFile = fopen(csvFileName, "at"); + assert(csvFile); + } + + int cLevel = -1; + int dictAttachPref = -1; + if (benchCompression) { + ZSTD_CCtxParams_getParameter(cctxParams, ZSTD_c_compressionLevel, + &cLevel); + ZSTD_CCtxParams_getParameter(cctxParams, ZSTD_c_forceAttachDict, + &dictAttachPref); + } + fprintf(csvFile, "%s,%d,%ld,%d,%d,%.1f\n", + benchCompression ? "Compression" : "Decompression", cLevel, + benchCompression ? ci.nbDicts : di.nbDicts, dictAttachPref, + metricAggregatePref, speedAggregated); + fclose(csvFile); + free(csvFileName); + + freeDecompressInstructions(di); + freeCompressInstructions(ci); + BMK_freeTimedFnState(benchState); + + return 0; /* success */ +} + + +/*! bench() : + * fileName : file to load for benchmarking purpose + * dictionary : optional (can be NULL), file to load as dictionary, + * if none provided : will be calculated on the fly by the program. + * @return : 0 is success, 1+ otherwise */ +int bench(const char **fileNameTable, unsigned nbFiles, const char *dictionary, + size_t blockSize, int clevel, unsigned nbDictMax, unsigned nbBlocks, + unsigned nbRounds, int benchCompression, + ZSTD_dictContentType_e dictContentType, ZSTD_CCtx_params *cctxParams, + const char *exeName, metricAggregatePref_e metricAggregatePref) +{ + int result = 0; + + DISPLAYLEVEL(3, "loading %u files... \n", nbFiles); + buffer_collection_t const srcs = createBufferCollection_fromFiles(fileNameTable, nbFiles); + CONTROL(srcs.buffer.ptr != NULL); + buffer_t srcBuffer = srcs.buffer; + size_t const srcSize = srcBuffer.size; + DISPLAYLEVEL(3, "created src buffer of size %.1f MB \n", + (double)srcSize / (1 MB)); + + slice_collection_t const srcSlices = splitSlices(srcs.slices, blockSize, nbBlocks); + nbBlocks = (unsigned)(srcSlices.nbSlices); + DISPLAYLEVEL(3, "split input into %u blocks ", nbBlocks); + if (blockSize) + DISPLAYLEVEL(3, "of max size %u bytes ", (unsigned)blockSize); + DISPLAYLEVEL(3, "\n"); + size_t const totalSrcSlicesSize = sliceCollection_totalCapacity(srcSlices); + + + size_t* const dstCapacities = malloc(nbBlocks * sizeof(*dstCapacities)); + CONTROL(dstCapacities != NULL); + size_t dstBufferCapacity = 0; + for (size_t bnb=0; bnb='0') && (**stringPtr <='9')) { + unsigned const max = (((unsigned)(-1)) / 10) - 1; + assert(result <= max); /* check overflow */ + result *= 10, result += (unsigned)**stringPtr - '0', (*stringPtr)++ ; + } + if ((**stringPtr=='K') || (**stringPtr=='M')) { + unsigned const maxK = ((unsigned)(-1)) >> 10; + assert(result <= maxK); /* check overflow */ + result <<= 10; + if (**stringPtr=='M') { + assert(result <= maxK); /* check overflow */ + result <<= 10; + } + (*stringPtr)++; /* skip `K` or `M` */ + if (**stringPtr=='i') (*stringPtr)++; + if (**stringPtr=='B') (*stringPtr)++; + } + return result; +} + +/** longCommandWArg() : + * check if *stringPtr is the same as longCommand. + * If yes, @return 1 and advances *stringPtr to the position which immediately follows longCommand. + * @return 0 and doesn't modify *stringPtr otherwise. + */ +static int longCommandWArg(const char** stringPtr, const char* longCommand) +{ + size_t const comSize = strlen(longCommand); + int const result = !strncmp(*stringPtr, longCommand, comSize); + if (result) *stringPtr += comSize; + return result; +} + + +int usage(const char* exeName) +{ + DISPLAY (" \n"); + DISPLAY (" %s [Options] filename(s) \n", exeName); + DISPLAY (" \n"); + DISPLAY ("Options : \n"); + DISPLAY ("-z : benchmark compression (default) \n"); + DISPLAY ("-d : benchmark decompression \n"); + DISPLAY ("-r : recursively load all files in subdirectories (default: off) \n"); + DISPLAY ("-B# : split input into blocks of size # (default: no split) \n"); + DISPLAY ("-# : use compression level # (default: %u) \n", CLEVEL_DEFAULT); + DISPLAY ("-D # : use # as a dictionary (default: create one) \n"); + DISPLAY ("-i# : nb benchmark rounds (default: %u) \n", BENCH_TIME_DEFAULT_S); + DISPLAY ("-p# : print speed for all rounds 0=fastest 1=median (default: 0) \n"); + DISPLAY ("--nbBlocks=#: use # blocks for bench (default: one per file) \n"); + DISPLAY ("--nbDicts=# : create # dictionaries for bench (default: one per block) \n"); + DISPLAY ("-h : help (this text) \n"); + DISPLAY (" \n"); + DISPLAY ("Advanced Options (see zstd.h for documentation) : \n"); + DISPLAY ("--dedicated-dict-search\n"); + DISPLAY ("--dict-content-type=#\n"); + DISPLAY ("--dict-attach-pref=#\n"); + return 0; +} + +int bad_usage(const char* exeName) +{ + DISPLAY (" bad usage : \n"); + usage(exeName); + return 1; +} + +int main (int argc, const char** argv) +{ + int recursiveMode = 0; + int benchCompression = 1; + int dedicatedDictSearch = 0; + unsigned nbRounds = BENCH_TIME_DEFAULT_S; + const char* const exeName = argv[0]; + + if (argc < 2) return bad_usage(exeName); + + const char** nameTable = (const char**)malloc((size_t)argc * sizeof(const char*)); + assert(nameTable != NULL); + unsigned nameIdx = 0; + + const char* dictionary = NULL; + int cLevel = CLEVEL_DEFAULT; + size_t blockSize = BLOCKSIZE_DEFAULT; + unsigned nbDicts = 0; /* determine nbDicts automatically: 1 dictionary per block */ + unsigned nbBlocks = 0; /* determine nbBlocks automatically, from source and blockSize */ + ZSTD_dictContentType_e dictContentType = ZSTD_dct_auto; + ZSTD_dictAttachPref_e dictAttachPref = ZSTD_dictDefaultAttach; + ZSTD_ParamSwitch_e prefetchCDictTables = ZSTD_ps_auto; + metricAggregatePref_e metricAggregatePref = fastest; + + for (int argNb = 1; argNb < argc ; argNb++) { + const char* argument = argv[argNb]; + if (!strcmp(argument, "-h")) { free(nameTable); return usage(exeName); } + if (!strcmp(argument, "-d")) { benchCompression = 0; continue; } + if (!strcmp(argument, "-z")) { benchCompression = 1; continue; } + if (!strcmp(argument, "-r")) { recursiveMode = 1; continue; } + if (!strcmp(argument, "-D")) { argNb++; assert(argNb < argc); dictionary = argv[argNb]; continue; } + if (longCommandWArg(&argument, "-i")) { nbRounds = readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "-p")) { metricAggregatePref = (int)readU32FromChar(&argument); continue;} + if (longCommandWArg(&argument, "--dictionary=")) { dictionary = argument; continue; } + if (longCommandWArg(&argument, "-B")) { blockSize = readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "--blockSize=")) { blockSize = readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "--nbDicts=")) { nbDicts = readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "--nbBlocks=")) { nbBlocks = readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "--clevel=")) { cLevel = (int)readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "--dedicated-dict-search")) { dedicatedDictSearch = 1; continue; } + if (longCommandWArg(&argument, "--dict-content-type=")) { dictContentType = (int)readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "--dict-attach-pref=")) { dictAttachPref = (int)readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "--prefetch-cdict-tables=")) { prefetchCDictTables = (int)readU32FromChar(&argument); continue; } + if (longCommandWArg(&argument, "-")) { cLevel = (int)readU32FromChar(&argument); continue; } + /* anything that's not a command is a filename */ + nameTable[nameIdx++] = argument; + } + + FileNamesTable* filenameTable; + + if (recursiveMode) { +#ifndef UTIL_HAS_CREATEFILELIST + assert(0); /* missing capability, do not run */ +#endif + filenameTable = UTIL_createExpandedFNT(nameTable, nameIdx, 1 /* follow_links */); + } else { + filenameTable = UTIL_assembleFileNamesTable(nameTable, nameIdx, NULL); + nameTable = NULL; /* UTIL_createFileNamesTable() takes ownership of nameTable */ + } + + ZSTD_CCtx_params* cctxParams = ZSTD_createCCtxParams(); + ZSTD_CCtxParams_init(cctxParams, cLevel); + ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_enableDedicatedDictSearch, dedicatedDictSearch); + ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_nbWorkers, 0); + ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_forceAttachDict, dictAttachPref); + ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_prefetchCDictTables, prefetchCDictTables); + + int result = + bench(filenameTable->fileNames, (unsigned)filenameTable->tableSize, + dictionary, blockSize, cLevel, nbDicts, nbBlocks, nbRounds, + benchCompression, dictContentType, cctxParams, exeName, + metricAggregatePref); + + UTIL_freeFileNamesTable(filenameTable); + free(nameTable); + ZSTD_freeCCtxParams(cctxParams); + + return result; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/.gitignore new file mode 100644 index 0000000000..d8dfeef21e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/.gitignore @@ -0,0 +1,4 @@ +!lib/zstd +!lib/zstd/* +*.o +*.a diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/Makefile b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/Makefile new file mode 100644 index 0000000000..63dd15d958 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/Makefile @@ -0,0 +1,108 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ + +.PHONY: libzstd +libzstd: + rm -rf linux + mkdir -p linux + mkdir -p linux/include/linux + mkdir -p linux/lib/zstd + ../freestanding_lib/freestanding.py \ + --source-lib ../../lib \ + --output-lib linux/lib/zstd \ + --xxhash '' \ + --xxh64-state 'struct xxh64_state' \ + --xxh64-prefix 'xxh64' \ + --rewrite-include '=' \ + --rewrite-include '=' \ + --rewrite-include '"\.\./zstd.h"=' \ + --rewrite-include '"(\.\./)?zstd_errors.h"=' \ + --sed 's,/\*\*\*,/* *,g' \ + --sed 's,/\*\*,/*,g' \ + --spdx \ + -DZSTD_NO_INTRINSICS \ + -DZSTD_NO_UNUSED_FUNCTIONS \ + -DZSTD_LEGACY_SUPPORT=0 \ + -DZSTD_STATIC_LINKING_ONLY \ + -DFSE_STATIC_LINKING_ONLY \ + -DXXH_STATIC_LINKING_ONLY \ + -D__GNUC__ \ + -D__linux__=1 \ + -DSTATIC_BMI2=0 \ + -DZSTD_ADDRESS_SANITIZER=0 \ + -DZSTD_MEMORY_SANITIZER=0 \ + -DZSTD_DATAFLOW_SANITIZER=0 \ + -DZSTD_COMPRESS_HEAPMODE=1 \ + -UNO_PREFETCH \ + -U__cplusplus \ + -UZSTD_DLL_EXPORT \ + -UZSTD_DLL_IMPORT \ + -U__ICCARM__ \ + -UZSTD_MULTITHREAD \ + -U_MSC_VER \ + -U_WIN32 \ + -RZSTDLIB_VISIBLE= \ + -RZSTDERRORLIB_VISIBLE= \ + -RZSTD_FALLTHROUGH=fallthrough \ + -DZSTD_HAVE_WEAK_SYMBOLS=0 \ + -DZSTD_TRACE=0 \ + -DZSTD_NO_TRACE \ + -DZSTD_DISABLE_ASM \ + -DZSTD_LINUX_KERNEL + rm linux/lib/zstd/decompress/huf_decompress_amd64.S + mv linux/lib/zstd/zstd.h linux/include/linux/zstd_lib.h + mv linux/lib/zstd/zstd_errors.h linux/include/linux/ + cp linux_zstd.h linux/include/linux/zstd.h + cp zstd_common_module.c linux/lib/zstd + cp zstd_compress_module.c linux/lib/zstd + cp zstd_decompress_module.c linux/lib/zstd + cp decompress_sources.h linux/lib/zstd + cp linux.mk linux/lib/zstd/Makefile + +LINUX ?= $(HOME)/repos/linux + +.PHONY: import +import: libzstd + rm -f $(LINUX)/include/linux/zstd.h + rm -f $(LINUX)/include/linux/zstd_errors.h + rm -rf $(LINUX)/lib/zstd + cp linux/include/linux/zstd.h $(LINUX)/include/linux + cp linux/include/linux/zstd_lib.h $(LINUX)/include/linux + cp linux/include/linux/zstd_errors.h $(LINUX)/include/linux + cp -r linux/lib/zstd $(LINUX)/lib + +import-upstream: + rm -rf $(LINUX)/lib/zstd + mkdir $(LINUX)/lib/zstd + cp ../../lib/zstd.h $(LINUX)/include/linux/zstd_lib.h + cp -r ../../lib/common $(LINUX)/lib/zstd + cp -r ../../lib/compress $(LINUX)/lib/zstd + cp -r ../../lib/decompress $(LINUX)/lib/zstd + mv $(LINUX)/lib/zstd/zstd_errors.h $(LINUX)/include/linux + rm $(LINUX)/lib/zstd/common/threading.* + rm $(LINUX)/lib/zstd/common/pool.* + rm $(LINUX)/lib/zstd/common/xxhash.* + rm $(LINUX)/lib/zstd/compress/zstdmt_* + +DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ + -Wstrict-prototypes -Wundef -Wpointer-arith \ + -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ + -Wredundant-decls -Wmissing-prototypes -Wc++-compat \ + -Wimplicit-fallthrough + +.PHONY: test +test: libzstd + $(MAKE) -C test run-test CFLAGS="-O3 $(CFLAGS) $(DEBUGFLAGS) -Werror" -j + +.PHONY: clean +clean: + $(RM) -rf linux + $(MAKE) -C test clean diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/README.md b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/README.md new file mode 100644 index 0000000000..bfa070d179 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/README.md @@ -0,0 +1,14 @@ +# Zstd in the Linux Kernel + +This directory contains the scripts needed to transform upstream zstd into the version imported into the kernel. All the transforms are automated and tested by our continuous integration. + +## Upgrading Zstd in the Linux Kernel + +1. `cd` into this directory. +2. Run `make libzstd` and read the output. Make sure that all the diffs printed and changes made by the script are correct. +3. Run `make test` and ensure that it passes. +4. Import zstd into the Linux Kernel `make import LINUX=/path/to/linux/repo` +5. Inspect the diff for sanity. +6. Check the Linux Kernel history for zstd. If any patches were made to the kernel version of zstd, but not to upstream zstd, then port them upstream if necessary. +7. Test the diff. Benchmark if necessary. Make sure to test multiple architectures: At least x86, i386, and arm. +8. Submit the patch to the LKML. diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-benchmark.sh b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-benchmark.sh new file mode 100755 index 0000000000..5e28da9c6d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-benchmark.sh @@ -0,0 +1,104 @@ +# !/bin/sh +set -e + +# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. +# The VM is running on a Macbook Pro with a 3.1 GHz Intel Core i7 processor and +# 16 GB of RAM and an SSD. + +# silesia is a directory that can be downloaded from +# http://mattmahoney.net/dc/silesia.html +# ls -l silesia/ +# total 203M +# -rwxr-xr-x 1 terrelln 9.8M Apr 12 2002 dickens +# -rwxr-xr-x 1 terrelln 49M May 31 2002 mozilla +# -rwxr-xr-x 1 terrelln 9.6M Mar 20 2003 mr +# -rwxr-xr-x 1 terrelln 32M Apr 2 2002 nci +# -rwxr-xr-x 1 terrelln 5.9M Jul 4 2002 ooffice +# -rwxr-xr-x 1 terrelln 9.7M Apr 11 2002 osdb +# -rwxr-xr-x 1 terrelln 6.4M Apr 2 2002 reymont +# -rwxr-xr-x 1 terrelln 21M Mar 25 2002 samba +# -rwxr-xr-x 1 terrelln 7.0M Mar 24 2002 sao +# -rwxr-xr-x 1 terrelln 40M Mar 25 2002 webster +# -rwxr-xr-x 1 terrelln 8.1M Apr 4 2002 x-ray +# -rwxr-xr-x 1 terrelln 5.1M Nov 30 2000 xml + +# $HOME is on a ext4 filesystem +BENCHMARK_DIR="$HOME/silesia/" +N=10 + +# Normalize the environment +sudo umount /mnt/btrfs 2> /dev/null > /dev/null || true +sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs +sudo rm -rf /mnt/btrfs/* +sync +sudo umount /mnt/btrfs +sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs + +# Run the benchmark +echo "Compression" +time sh -c "for i in \$(seq $N); do sudo cp -r $BENCHMARK_DIR /mnt/btrfs/\$i; done; sync" + +echo "Approximate compression ratio" +printf "%d / %d\n" \ + $(df /mnt/btrfs --output=used -B 1 | tail -n 1) \ + $(sudo du /mnt/btrfs -b -d 0 | tr '\t' '\n' | head -n 1); + +# Unmount and remount to avoid any caching +sudo umount /mnt/btrfs +sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs + +echo "Decompression" +time sudo tar -c /mnt/btrfs 2> /dev/null | wc -c > /dev/null + +sudo rm -rf /mnt/btrfs/* +sudo umount /mnt/btrfs + +# Run for each of -o compress-force={none, lzo, zlib, zstd} 5 times and take the +# min time and ratio. +# Ran zstd with compression levels {1, 3, 6, 9, 12, 15}. +# Original size: 2119415342 B (using du /mnt/btrfs) + +# none +# compress: 4.205 s +# decompress: 3.090 s +# ratio: 0.99 + +# lzo +# compress: 5.328 s +# decompress: 4.793 s +# ratio: 1.66 + +# zlib +# compress: 32.588 s +# decompress: 8.791 s +# ratio : 2.58 + +# zstd 1 +# compress: 8.147 s +# decompress: 5.527 s +# ratio : 2.57 + +# zstd 3 +# compress: 12.207 s +# decompress: 5.195 s +# ratio : 2.71 + +# zstd 6 +# compress: 30.253 s +# decompress: 5.324 s +# ratio : 2.87 + +# zstd 9 +# compress: 49.659 s +# decompress: 5.220 s +# ratio : 2.92 + +# zstd 12 +# compress: 99.245 s +# decompress: 5.193 s +# ratio : 2.93 + +# zstd 15 +# compress: 196.997 s +# decompress: 5.992 s +# ratio : 3.01 diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-extract-benchmark.sh b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-extract-benchmark.sh new file mode 100755 index 0000000000..69721d0935 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/btrfs-extract-benchmark.sh @@ -0,0 +1,99 @@ +# !/bin/sh +set -e + +# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. +# The VM is running on a Macbook Pro with a 3.1 GHz Intel Core i7 processor and +# 16 GB of RAM and an SSD. + +# silesia is a directory that can be downloaded from +# http://mattmahoney.net/dc/silesia.html +# ls -l silesia/ +# total 203M +# -rwxr-xr-x 1 terrelln 9.8M Apr 12 2002 dickens +# -rwxr-xr-x 1 terrelln 49M May 31 2002 mozilla +# -rwxr-xr-x 1 terrelln 9.6M Mar 20 2003 mr +# -rwxr-xr-x 1 terrelln 32M Apr 2 2002 nci +# -rwxr-xr-x 1 terrelln 5.9M Jul 4 2002 ooffice +# -rwxr-xr-x 1 terrelln 9.7M Apr 11 2002 osdb +# -rwxr-xr-x 1 terrelln 6.4M Apr 2 2002 reymont +# -rwxr-xr-x 1 terrelln 21M Mar 25 2002 samba +# -rwxr-xr-x 1 terrelln 7.0M Mar 24 2002 sao +# -rwxr-xr-x 1 terrelln 40M Mar 25 2002 webster +# -rwxr-xr-x 1 terrelln 8.1M Apr 4 2002 x-ray +# -rwxr-xr-x 1 terrelln 5.1M Nov 30 2000 xml + +# $HOME is on a ext4 filesystem +BENCHMARK_FILE="linux-4.11.6.tar" +BENCHMARK_DIR="$HOME/$BENCHMARK_FILE" + +# Normalize the environment +sudo umount /mnt/btrfs 2> /dev/null > /dev/null || true +sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs +sudo rm -rf /mnt/btrfs/* +sync +sudo umount /mnt/btrfs +sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs + +# Run the benchmark +echo "Copy" +time sh -c "sudo cp -r $BENCHMARK_DIR /mnt/btrfs/$BENCHMARK_FILE && sync" + +echo "Approximate tarred compression ratio" +printf "%d / %d\n" \ + $(df /mnt/btrfs --output=used -B 1 | tail -n 1) \ + $(sudo du /mnt/btrfs -b -d 0 | tr '\t' '\n' | head -n 1); + +# Unmount and remount to avoid any caching +sudo umount /mnt/btrfs +sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs + +echo "Extract" +time sh -c "sudo tar -C /mnt/btrfs -xf /mnt/btrfs/$BENCHMARK_FILE && sync" + +# Remove the tarball, leaving only the extracted data +sudo rm /mnt/btrfs/$BENCHMARK_FILE +# Unmount and remount to avoid any caching +sudo umount /mnt/btrfs +sudo mount -t btrfs $@ /dev/sda3 /mnt/btrfs + +echo "Approximate extracted compression ratio" +printf "%d / %d\n" \ + $(df /mnt/btrfs --output=used -B 1 | tail -n 1) \ + $(sudo du /mnt/btrfs -b -d 0 | tr '\t' '\n' | head -n 1); + +echo "Read" +time sudo tar -c /mnt/btrfs 2> /dev/null | wc -c > /dev/null + +sudo rm -rf /mnt/btrfs/* +sudo umount /mnt/btrfs + +# Run for each of -o compress-force={none, lzo, zlib, zstd} 5 times and take the +# min time and ratio. + +# none +# copy: 0.981 s +# extract: 5.501 s +# read: 8.807 s +# tarball ratio: 0.97 +# extracted ratio: 0.78 + +# lzo +# copy: 1.631 s +# extract: 8.458 s +# read: 8.585 s +# tarball ratio: 2.06 +# extracted ratio: 1.38 + +# zlib +# copy: 7.750 s +# extract: 21.544 s +# read: 11.744 s +# tarball ratio : 3.40 +# extracted ratio: 1.86 + +# zstd 1 +# copy: 2.579 s +# extract: 11.479 s +# read: 9.389 s +# tarball ratio : 3.57 +# extracted ratio: 1.85 diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/decompress_sources.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/decompress_sources.h new file mode 100644 index 0000000000..8a47eb2a45 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/decompress_sources.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* + * This file includes every .c file needed for decompression. + * It is used by lib/decompress_unzstd.c to include the decompression + * source into the translation-unit, so it can be used for kernel + * decompression. + */ + +/* + * Disable the ASM Huffman implementation because we need to + * include all the sources. + */ +#define ZSTD_DISABLE_ASM 1 + +#include "common/debug.c" +#include "common/entropy_common.c" +#include "common/error_private.c" +#include "common/fse_decompress.c" +#include "common/zstd_common.c" +#include "decompress/huf_decompress.c" +#include "decompress/zstd_ddict.c" +#include "decompress/zstd_decompress.c" +#include "decompress/zstd_decompress_block.c" +#include "zstd_decompress_module.c" diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux.mk b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux.mk new file mode 100644 index 0000000000..be218b5e0e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux.mk @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ +obj-$(CONFIG_ZSTD_COMPRESS) += zstd_compress.o +obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd_decompress.o +obj-$(CONFIG_ZSTD_COMMON) += zstd_common.o + +zstd_compress-y := \ + zstd_compress_module.o \ + compress/fse_compress.o \ + compress/hist.o \ + compress/huf_compress.o \ + compress/zstd_compress.o \ + compress/zstd_compress_literals.o \ + compress/zstd_compress_sequences.o \ + compress/zstd_compress_superblock.o \ + compress/zstd_double_fast.o \ + compress/zstd_fast.o \ + compress/zstd_lazy.o \ + compress/zstd_ldm.o \ + compress/zstd_opt.o \ + compress/zstd_preSplit.o \ + +zstd_decompress-y := \ + zstd_decompress_module.o \ + decompress/huf_decompress.o \ + decompress/zstd_ddict.o \ + decompress/zstd_decompress.o \ + decompress/zstd_decompress_block.o \ + +zstd_common-y := \ + zstd_common_module.o \ + common/debug.o \ + common/entropy_common.o \ + common/error_private.o \ + common/fse_decompress.o \ + common/zstd_common.o \ diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux_zstd.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux_zstd.h new file mode 100644 index 0000000000..dda8a2d7d2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/linux_zstd.h @@ -0,0 +1,525 @@ +/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd) and + * the GPLv2 (found in the COPYING file in the root directory of + * https://github.com/facebook/zstd). You may select, at your option, one of the + * above-listed licenses. + */ + +#ifndef LINUX_ZSTD_H +#define LINUX_ZSTD_H + +/** + * This is a kernel-style API that wraps the upstream zstd API, which cannot be + * used directly because the symbols aren't exported. It exposes the minimal + * functionality which is currently required by users of zstd in the kernel. + * Expose extra functions from lib/zstd/zstd.h as needed. + */ + +/* ====== Dependency ====== */ +#include +#include +#include + +/* ====== Helper Functions ====== */ +/** + * zstd_compress_bound() - maximum compressed size in worst case scenario + * @src_size: The size of the data to compress. + * + * Return: The maximum compressed size in the worst case scenario. + */ +size_t zstd_compress_bound(size_t src_size); + +/** + * zstd_is_error() - tells if a size_t function result is an error code + * @code: The function result to check for error. + * + * Return: Non-zero iff the code is an error. + */ +unsigned int zstd_is_error(size_t code); + +/** + * enum zstd_error_code - zstd error codes + */ +typedef ZSTD_ErrorCode zstd_error_code; + +/** + * zstd_get_error_code() - translates an error function result to an error code + * @code: The function result for which zstd_is_error(code) is true. + * + * Return: A unique error code for this error. + */ +zstd_error_code zstd_get_error_code(size_t code); + +/** + * zstd_get_error_name() - translates an error function result to a string + * @code: The function result for which zstd_is_error(code) is true. + * + * Return: An error string corresponding to the error code. + */ +const char *zstd_get_error_name(size_t code); + +/** + * zstd_min_clevel() - minimum allowed compression level + * + * Return: The minimum allowed compression level. + */ +int zstd_min_clevel(void); + +/** + * zstd_max_clevel() - maximum allowed compression level + * + * Return: The maximum allowed compression level. + */ +int zstd_max_clevel(void); + +/* ====== Parameter Selection ====== */ + +/** + * enum zstd_strategy - zstd compression search strategy + * + * From faster to stronger. See zstd_lib.h. + */ +typedef ZSTD_strategy zstd_strategy; + +/** + * struct zstd_compression_parameters - zstd compression parameters + * @windowLog: Log of the largest match distance. Larger means more + * compression, and more memory needed during decompression. + * @chainLog: Fully searched segment. Larger means more compression, + * slower, and more memory (useless for fast). + * @hashLog: Dispatch table. Larger means more compression, + * slower, and more memory. + * @searchLog: Number of searches. Larger means more compression and slower. + * @searchLength: Match length searched. Larger means faster decompression, + * sometimes less compression. + * @targetLength: Acceptable match size for optimal parser (only). Larger means + * more compression, and slower. + * @strategy: The zstd compression strategy. + * + * See zstd_lib.h. + */ +typedef ZSTD_compressionParameters zstd_compression_parameters; + +/** + * struct zstd_frame_parameters - zstd frame parameters + * @contentSizeFlag: Controls whether content size will be present in the + * frame header (when known). + * @checksumFlag: Controls whether a 32-bit checksum is generated at the + * end of the frame for error detection. + * @noDictIDFlag: Controls whether dictID will be saved into the frame + * header when using dictionary compression. + * + * The default value is all fields set to 0. See zstd_lib.h. + */ +typedef ZSTD_frameParameters zstd_frame_parameters; + +/** + * struct zstd_parameters - zstd parameters + * @cParams: The compression parameters. + * @fParams: The frame parameters. + */ +typedef ZSTD_parameters zstd_parameters; + +/** + * zstd_get_params() - returns zstd_parameters for selected level + * @level: The compression level + * @estimated_src_size: The estimated source size to compress or 0 + * if unknown. + * + * Return: The selected zstd_parameters. + */ +zstd_parameters zstd_get_params(int level, + unsigned long long estimated_src_size); + +typedef ZSTD_CCtx zstd_cctx; +typedef ZSTD_cParameter zstd_cparameter; + +/** + * zstd_cctx_set_param() - sets a compression parameter + * @cctx: The context. Must have been initialized with zstd_init_cctx(). + * @param: The parameter to set. + * @value: The value to set the parameter to. + * + * Return: Zero or an error, which can be checked using zstd_is_error(). + */ +size_t zstd_cctx_set_param(zstd_cctx *cctx, zstd_cparameter param, int value); + +/* ====== Single-pass Compression ====== */ + +/** + * zstd_cctx_workspace_bound() - max memory needed to initialize a zstd_cctx + * @parameters: The compression parameters to be used. + * + * If multiple compression parameters might be used, the caller must call + * zstd_cctx_workspace_bound() for each set of parameters and use the maximum + * size. + * + * Return: A lower bound on the size of the workspace that is passed to + * zstd_init_cctx(). + */ +size_t zstd_cctx_workspace_bound(const zstd_compression_parameters *parameters); + +/** + * zstd_cctx_workspace_bound_with_ext_seq_prod() - max memory needed to + * initialize a zstd_cctx when using the block-level external sequence + * producer API. + * @parameters: The compression parameters to be used. + * + * If multiple compression parameters might be used, the caller must call + * this function for each set of parameters and use the maximum size. + * + * Return: A lower bound on the size of the workspace that is passed to + * zstd_init_cctx(). + */ +size_t zstd_cctx_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *parameters); + +/** + * zstd_init_cctx() - initialize a zstd compression context + * @workspace: The workspace to emplace the context into. It must outlive + * the returned context. + * @workspace_size: The size of workspace. Use zstd_cctx_workspace_bound() to + * determine how large the workspace must be. + * + * Return: A zstd compression context or NULL on error. + */ +zstd_cctx *zstd_init_cctx(void *workspace, size_t workspace_size); + +/** + * zstd_compress_cctx() - compress src into dst with the initialized parameters + * @cctx: The context. Must have been initialized with zstd_init_cctx(). + * @dst: The buffer to compress src into. + * @dst_capacity: The size of the destination buffer. May be any size, but + * ZSTD_compressBound(srcSize) is guaranteed to be large enough. + * @src: The data to compress. + * @src_size: The size of the data to compress. + * @parameters: The compression parameters to be used. + * + * Return: The compressed size or an error, which can be checked using + * zstd_is_error(). + */ +size_t zstd_compress_cctx(zstd_cctx *cctx, void *dst, size_t dst_capacity, + const void *src, size_t src_size, const zstd_parameters *parameters); + +/* ====== Single-pass Decompression ====== */ + +typedef ZSTD_DCtx zstd_dctx; + +/** + * zstd_dctx_workspace_bound() - max memory needed to initialize a zstd_dctx + * + * Return: A lower bound on the size of the workspace that is passed to + * zstd_init_dctx(). + */ +size_t zstd_dctx_workspace_bound(void); + +/** + * zstd_init_dctx() - initialize a zstd decompression context + * @workspace: The workspace to emplace the context into. It must outlive + * the returned context. + * @workspace_size: The size of workspace. Use zstd_dctx_workspace_bound() to + * determine how large the workspace must be. + * + * Return: A zstd decompression context or NULL on error. + */ +zstd_dctx *zstd_init_dctx(void *workspace, size_t workspace_size); + +/** + * zstd_decompress_dctx() - decompress zstd compressed src into dst + * @dctx: The decompression context. + * @dst: The buffer to decompress src into. + * @dst_capacity: The size of the destination buffer. Must be at least as large + * as the decompressed size. If the caller cannot upper bound the + * decompressed size, then it's better to use the streaming API. + * @src: The zstd compressed data to decompress. Multiple concatenated + * frames and skippable frames are allowed. + * @src_size: The exact size of the data to decompress. + * + * Return: The decompressed size or an error, which can be checked using + * zstd_is_error(). + */ +size_t zstd_decompress_dctx(zstd_dctx *dctx, void *dst, size_t dst_capacity, + const void *src, size_t src_size); + +/* ====== Streaming Buffers ====== */ + +/** + * struct zstd_in_buffer - input buffer for streaming + * @src: Start of the input buffer. + * @size: Size of the input buffer. + * @pos: Position where reading stopped. Will be updated. + * Necessarily 0 <= pos <= size. + * + * See zstd_lib.h. + */ +typedef ZSTD_inBuffer zstd_in_buffer; + +/** + * struct zstd_out_buffer - output buffer for streaming + * @dst: Start of the output buffer. + * @size: Size of the output buffer. + * @pos: Position where writing stopped. Will be updated. + * Necessarily 0 <= pos <= size. + * + * See zstd_lib.h. + */ +typedef ZSTD_outBuffer zstd_out_buffer; + +/* ====== Streaming Compression ====== */ + +typedef ZSTD_CStream zstd_cstream; + +/** + * zstd_cstream_workspace_bound() - memory needed to initialize a zstd_cstream + * @cparams: The compression parameters to be used for compression. + * + * Return: A lower bound on the size of the workspace that is passed to + * zstd_init_cstream(). + */ +size_t zstd_cstream_workspace_bound(const zstd_compression_parameters *cparams); + +/** + * zstd_cstream_workspace_bound_with_ext_seq_prod() - memory needed to initialize + * a zstd_cstream when using the block-level external sequence producer API. + * @cparams: The compression parameters to be used for compression. + * + * Return: A lower bound on the size of the workspace that is passed to + * zstd_init_cstream(). + */ +size_t zstd_cstream_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *cparams); + +/** + * zstd_init_cstream() - initialize a zstd streaming compression context + * @parameters The zstd parameters to use for compression. + * @pledged_src_size: If params.fParams.contentSizeFlag == 1 then the caller + * must pass the source size (zero means empty source). + * Otherwise, the caller may optionally pass the source + * size, or zero if unknown. + * @workspace: The workspace to emplace the context into. It must outlive + * the returned context. + * @workspace_size: The size of workspace. + * Use zstd_cstream_workspace_bound(params->cparams) to + * determine how large the workspace must be. + * + * Return: The zstd streaming compression context or NULL on error. + */ +zstd_cstream *zstd_init_cstream(const zstd_parameters *parameters, + unsigned long long pledged_src_size, void *workspace, size_t workspace_size); + +/** + * zstd_reset_cstream() - reset the context using parameters from creation + * @cstream: The zstd streaming compression context to reset. + * @pledged_src_size: Optionally the source size, or zero if unknown. + * + * Resets the context using the parameters from creation. Skips dictionary + * loading, since it can be reused. If `pledged_src_size` is non-zero the frame + * content size is always written into the frame header. + * + * Return: Zero or an error, which can be checked using + * zstd_is_error(). + */ +size_t zstd_reset_cstream(zstd_cstream *cstream, + unsigned long long pledged_src_size); + +/** + * zstd_compress_stream() - streaming compress some of input into output + * @cstream: The zstd streaming compression context. + * @output: Destination buffer. `output->pos` is updated to indicate how much + * compressed data was written. + * @input: Source buffer. `input->pos` is updated to indicate how much data + * was read. Note that it may not consume the entire input, in which + * case `input->pos < input->size`, and it's up to the caller to + * present remaining data again. + * + * The `input` and `output` buffers may be any size. Guaranteed to make some + * forward progress if `input` and `output` are not empty. + * + * Return: A hint for the number of bytes to use as the input for the next + * function call or an error, which can be checked using + * zstd_is_error(). + */ +size_t zstd_compress_stream(zstd_cstream *cstream, zstd_out_buffer *output, + zstd_in_buffer *input); + +/** + * zstd_flush_stream() - flush internal buffers into output + * @cstream: The zstd streaming compression context. + * @output: Destination buffer. `output->pos` is updated to indicate how much + * compressed data was written. + * + * zstd_flush_stream() must be called until it returns 0, meaning all the data + * has been flushed. Since zstd_flush_stream() causes a block to be ended, + * calling it too often will degrade the compression ratio. + * + * Return: The number of bytes still present within internal buffers or an + * error, which can be checked using zstd_is_error(). + */ +size_t zstd_flush_stream(zstd_cstream *cstream, zstd_out_buffer *output); + +/** + * zstd_end_stream() - flush internal buffers into output and end the frame + * @cstream: The zstd streaming compression context. + * @output: Destination buffer. `output->pos` is updated to indicate how much + * compressed data was written. + * + * zstd_end_stream() must be called until it returns 0, meaning all the data has + * been flushed and the frame epilogue has been written. + * + * Return: The number of bytes still present within internal buffers or an + * error, which can be checked using zstd_is_error(). + */ +size_t zstd_end_stream(zstd_cstream *cstream, zstd_out_buffer *output); + +/* ====== Streaming Decompression ====== */ + +typedef ZSTD_DStream zstd_dstream; + +/** + * zstd_dstream_workspace_bound() - memory needed to initialize a zstd_dstream + * @max_window_size: The maximum window size allowed for compressed frames. + * + * Return: A lower bound on the size of the workspace that is passed + * to zstd_init_dstream(). + */ +size_t zstd_dstream_workspace_bound(size_t max_window_size); + +/** + * zstd_init_dstream() - initialize a zstd streaming decompression context + * @max_window_size: The maximum window size allowed for compressed frames. + * @workspace: The workspace to emplace the context into. It must outlive + * the returned context. + * @workspaceSize: The size of workspace. + * Use zstd_dstream_workspace_bound(max_window_size) to + * determine how large the workspace must be. + * + * Return: The zstd streaming decompression context. + */ +zstd_dstream *zstd_init_dstream(size_t max_window_size, void *workspace, + size_t workspace_size); + +/** + * zstd_reset_dstream() - reset the context using parameters from creation + * @dstream: The zstd streaming decompression context to reset. + * + * Resets the context using the parameters from creation. Skips dictionary + * loading, since it can be reused. + * + * Return: Zero or an error, which can be checked using zstd_is_error(). + */ +size_t zstd_reset_dstream(zstd_dstream *dstream); + +/** + * zstd_decompress_stream() - streaming decompress some of input into output + * @dstream: The zstd streaming decompression context. + * @output: Destination buffer. `output.pos` is updated to indicate how much + * decompressed data was written. + * @input: Source buffer. `input.pos` is updated to indicate how much data was + * read. Note that it may not consume the entire input, in which case + * `input.pos < input.size`, and it's up to the caller to present + * remaining data again. + * + * The `input` and `output` buffers may be any size. Guaranteed to make some + * forward progress if `input` and `output` are not empty. + * zstd_decompress_stream() will not consume the last byte of the frame until + * the entire frame is flushed. + * + * Return: Returns 0 iff a frame is completely decoded and fully flushed. + * Otherwise returns a hint for the number of bytes to use as the + * input for the next function call or an error, which can be checked + * using zstd_is_error(). The size hint will never load more than the + * frame. + */ +size_t zstd_decompress_stream(zstd_dstream *dstream, zstd_out_buffer *output, + zstd_in_buffer *input); + +/* ====== Frame Inspection Functions ====== */ + +/** + * zstd_find_frame_compressed_size() - returns the size of a compressed frame + * @src: Source buffer. It should point to the start of a zstd encoded + * frame or a skippable frame. + * @src_size: The size of the source buffer. It must be at least as large as the + * size of the frame. + * + * Return: The compressed size of the frame pointed to by `src` or an error, + * which can be check with zstd_is_error(). + * Suitable to pass to ZSTD_decompress() or similar functions. + */ +size_t zstd_find_frame_compressed_size(const void *src, size_t src_size); + +/** + * zstd_register_sequence_producer() - exposes the zstd library function + * ZSTD_registerSequenceProducer(). This is used for the block-level external + * sequence producer API. See upstream zstd.h for detailed documentation. + */ +typedef ZSTD_sequenceProducer_F zstd_sequence_producer_f; +void zstd_register_sequence_producer( + zstd_cctx *cctx, + void* sequence_producer_state, + zstd_sequence_producer_f sequence_producer +); + +/** + * struct zstd_frame_params - zstd frame parameters stored in the frame header + * @frameContentSize: The frame content size, or ZSTD_CONTENTSIZE_UNKNOWN if not + * present. + * @windowSize: The window size, or 0 if the frame is a skippable frame. + * @blockSizeMax: The maximum block size. + * @frameType: The frame type (zstd or skippable) + * @headerSize: The size of the frame header. + * @dictID: The dictionary id, or 0 if not present. + * @checksumFlag: Whether a checksum was used. + * + * See zstd_lib.h. + */ +typedef ZSTD_FrameHeader zstd_frame_header; + +/** + * zstd_get_frame_header() - extracts parameters from a zstd or skippable frame + * @params: On success the frame parameters are written here. + * @src: The source buffer. It must point to a zstd or skippable frame. + * @src_size: The size of the source buffer. + * + * Return: 0 on success. If more data is required it returns how many bytes + * must be provided to make forward progress. Otherwise it returns + * an error, which can be checked using zstd_is_error(). + */ +size_t zstd_get_frame_header(zstd_frame_header *params, const void *src, + size_t src_size); + +/** + * struct zstd_sequence - a sequence of literals or a match + * + * @offset: The offset of the match + * @litLength: The literal length of the sequence + * @matchLength: The match length of the sequence + * @rep: Represents which repeat offset is used + */ +typedef ZSTD_Sequence zstd_sequence; + +/** + * zstd_compress_sequences_and_literals() - compress an array of zstd_sequence and literals + * + * @cctx: The zstd compression context. + * @dst: The buffer to compress the data into. + * @dst_capacity: The size of the destination buffer. + * @in_seqs: The array of zstd_sequence to compress. + * @in_seqs_size: The number of sequences in in_seqs. + * @literals: The literals associated to the sequences to be compressed. + * @lit_size: The size of the literals in the literals buffer. + * @lit_capacity: The size of the literals buffer. + * @decompressed_size: The size of the input data + * + * Return: The compressed size or an error, which can be checked using + * zstd_is_error(). + */ +size_t zstd_compress_sequences_and_literals(zstd_cctx *cctx, void* dst, size_t dst_capacity, + const zstd_sequence *in_seqs, size_t in_seqs_size, + const void* literals, size_t lit_size, size_t lit_capacity, + size_t decompressed_size); + +#endif /* LINUX_ZSTD_H */ diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/mem.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/mem.h new file mode 100644 index 0000000000..d9bd752fe1 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/mem.h @@ -0,0 +1,262 @@ +/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef MEM_H_MODULE +#define MEM_H_MODULE + +/*-**************************************** +* Dependencies +******************************************/ +#include /* get_unaligned, put_unaligned* */ +#include /* inline */ +#include /* swab32, swab64 */ +#include /* size_t, ptrdiff_t */ +#include "debug.h" /* DEBUG_STATIC_ASSERT */ + +/*-**************************************** +* Compiler specifics +******************************************/ +#undef MEM_STATIC /* may be already defined from common/compiler.h */ +#define MEM_STATIC static inline + +/*-************************************************************** +* Basic Types +*****************************************************************/ +typedef uint8_t BYTE; +typedef uint8_t U8; +typedef int8_t S8; +typedef uint16_t U16; +typedef int16_t S16; +typedef uint32_t U32; +typedef int32_t S32; +typedef uint64_t U64; +typedef int64_t S64; + +/*-************************************************************** +* Memory I/O API +*****************************************************************/ +/*=== Static platform detection ===*/ +MEM_STATIC unsigned MEM_32bits(void); +MEM_STATIC unsigned MEM_64bits(void); +MEM_STATIC unsigned MEM_isLittleEndian(void); + +/*=== Native unaligned read/write ===*/ +MEM_STATIC U16 MEM_read16(const void* memPtr); +MEM_STATIC U32 MEM_read32(const void* memPtr); +MEM_STATIC U64 MEM_read64(const void* memPtr); +MEM_STATIC size_t MEM_readST(const void* memPtr); + +MEM_STATIC void MEM_write16(void* memPtr, U16 value); +MEM_STATIC void MEM_write32(void* memPtr, U32 value); +MEM_STATIC void MEM_write64(void* memPtr, U64 value); + +/*=== Little endian unaligned read/write ===*/ +MEM_STATIC U16 MEM_readLE16(const void* memPtr); +MEM_STATIC U32 MEM_readLE24(const void* memPtr); +MEM_STATIC U32 MEM_readLE32(const void* memPtr); +MEM_STATIC U64 MEM_readLE64(const void* memPtr); +MEM_STATIC size_t MEM_readLEST(const void* memPtr); + +MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val); +MEM_STATIC void MEM_writeLE24(void* memPtr, U32 val); +MEM_STATIC void MEM_writeLE32(void* memPtr, U32 val32); +MEM_STATIC void MEM_writeLE64(void* memPtr, U64 val64); +MEM_STATIC void MEM_writeLEST(void* memPtr, size_t val); + +/*=== Big endian unaligned read/write ===*/ +MEM_STATIC U32 MEM_readBE32(const void* memPtr); +MEM_STATIC U64 MEM_readBE64(const void* memPtr); +MEM_STATIC size_t MEM_readBEST(const void* memPtr); + +MEM_STATIC void MEM_writeBE32(void* memPtr, U32 val32); +MEM_STATIC void MEM_writeBE64(void* memPtr, U64 val64); +MEM_STATIC void MEM_writeBEST(void* memPtr, size_t val); + +/*=== Byteswap ===*/ +MEM_STATIC U32 MEM_swap32(U32 in); +MEM_STATIC U64 MEM_swap64(U64 in); +MEM_STATIC size_t MEM_swapST(size_t in); + +/*-************************************************************** +* Memory I/O Implementation +*****************************************************************/ +MEM_STATIC unsigned MEM_32bits(void) +{ + return sizeof(size_t) == 4; +} + +MEM_STATIC unsigned MEM_64bits(void) +{ + return sizeof(size_t) == 8; +} + +#if defined(__LITTLE_ENDIAN) +#define MEM_LITTLE_ENDIAN 1 +#else +#define MEM_LITTLE_ENDIAN 0 +#endif + +MEM_STATIC unsigned MEM_isLittleEndian(void) +{ + return MEM_LITTLE_ENDIAN; +} + +MEM_STATIC U16 MEM_read16(const void *memPtr) +{ + return get_unaligned((const U16 *)memPtr); +} + +MEM_STATIC U32 MEM_read32(const void *memPtr) +{ + return get_unaligned((const U32 *)memPtr); +} + +MEM_STATIC U64 MEM_read64(const void *memPtr) +{ + return get_unaligned((const U64 *)memPtr); +} + +MEM_STATIC size_t MEM_readST(const void *memPtr) +{ + return get_unaligned((const size_t *)memPtr); +} + +MEM_STATIC void MEM_write16(void *memPtr, U16 value) +{ + put_unaligned(value, (U16 *)memPtr); +} + +MEM_STATIC void MEM_write32(void *memPtr, U32 value) +{ + put_unaligned(value, (U32 *)memPtr); +} + +MEM_STATIC void MEM_write64(void *memPtr, U64 value) +{ + put_unaligned(value, (U64 *)memPtr); +} + +/*=== Little endian r/w ===*/ + +MEM_STATIC U16 MEM_readLE16(const void *memPtr) +{ + return get_unaligned_le16(memPtr); +} + +MEM_STATIC void MEM_writeLE16(void *memPtr, U16 val) +{ + put_unaligned_le16(val, memPtr); +} + +MEM_STATIC U32 MEM_readLE24(const void *memPtr) +{ + return MEM_readLE16(memPtr) + (((const BYTE *)memPtr)[2] << 16); +} + +MEM_STATIC void MEM_writeLE24(void *memPtr, U32 val) +{ + MEM_writeLE16(memPtr, (U16)val); + ((BYTE *)memPtr)[2] = (BYTE)(val >> 16); +} + +MEM_STATIC U32 MEM_readLE32(const void *memPtr) +{ + return get_unaligned_le32(memPtr); +} + +MEM_STATIC void MEM_writeLE32(void *memPtr, U32 val32) +{ + put_unaligned_le32(val32, memPtr); +} + +MEM_STATIC U64 MEM_readLE64(const void *memPtr) +{ + return get_unaligned_le64(memPtr); +} + +MEM_STATIC void MEM_writeLE64(void *memPtr, U64 val64) +{ + put_unaligned_le64(val64, memPtr); +} + +MEM_STATIC size_t MEM_readLEST(const void *memPtr) +{ + if (MEM_32bits()) + return (size_t)MEM_readLE32(memPtr); + else + return (size_t)MEM_readLE64(memPtr); +} + +MEM_STATIC void MEM_writeLEST(void *memPtr, size_t val) +{ + if (MEM_32bits()) + MEM_writeLE32(memPtr, (U32)val); + else + MEM_writeLE64(memPtr, (U64)val); +} + +/*=== Big endian r/w ===*/ + +MEM_STATIC U32 MEM_readBE32(const void *memPtr) +{ + return get_unaligned_be32(memPtr); +} + +MEM_STATIC void MEM_writeBE32(void *memPtr, U32 val32) +{ + put_unaligned_be32(val32, memPtr); +} + +MEM_STATIC U64 MEM_readBE64(const void *memPtr) +{ + return get_unaligned_be64(memPtr); +} + +MEM_STATIC void MEM_writeBE64(void *memPtr, U64 val64) +{ + put_unaligned_be64(val64, memPtr); +} + +MEM_STATIC size_t MEM_readBEST(const void *memPtr) +{ + if (MEM_32bits()) + return (size_t)MEM_readBE32(memPtr); + else + return (size_t)MEM_readBE64(memPtr); +} + +MEM_STATIC void MEM_writeBEST(void *memPtr, size_t val) +{ + if (MEM_32bits()) + MEM_writeBE32(memPtr, (U32)val); + else + MEM_writeBE64(memPtr, (U64)val); +} + +MEM_STATIC U32 MEM_swap32(U32 in) +{ + return swab32(in); +} + +MEM_STATIC U64 MEM_swap64(U64 in) +{ + return swab64(in); +} + +MEM_STATIC size_t MEM_swapST(size_t in) +{ + if (MEM_32bits()) + return (size_t)MEM_swap32((U32)in); + else + return (size_t)MEM_swap64((U64)in); +} + +#endif /* MEM_H_MODULE */ diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/squashfs-benchmark.sh b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/squashfs-benchmark.sh new file mode 100755 index 0000000000..02dfd7325b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/squashfs-benchmark.sh @@ -0,0 +1,39 @@ +# !/bin/sh +set -e + +# Benchmarks run on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM. +# The VM is running on a Macbook Pro with a 3.1 GHz Intel Core i7 processor and +# 16 GB of RAM and an SSD. + +# $BENCHMARK_DIR is generated with the following commands, from the Ubuntu image +# ubuntu-16.10-desktop-amd64.iso. +# > mkdir mnt +# > sudo mount -o loop ubuntu-16.10-desktop-amd64.iso mnt +# > cp mnt/casper/filesystem.squashfs . +# > sudo unsquashfs filesystem.squashfs + +# $HOME is on a ext4 filesystem +BENCHMARK_DIR="$HOME/squashfs-root/" +BENCHMARK_FS="$HOME/filesystem.squashfs" + +# Normalize the environment +sudo rm -f $BENCHMARK_FS 2> /dev/null > /dev/null || true +sudo umount /mnt/squashfs 2> /dev/null > /dev/null || true + +# Run the benchmark +echo "Compression" +echo "sudo mksquashfs $BENCHMARK_DIR $BENCHMARK_FS $@" +time sudo mksquashfs $BENCHMARK_DIR $BENCHMARK_FS $@ 2> /dev/null > /dev/null + +echo "Approximate compression ratio" +printf "%d / %d\n" \ + $(sudo du -sx --block-size=1 $BENCHMARK_DIR | cut -f1) \ + $(sudo du -sx --block-size=1 $BENCHMARK_FS | cut -f1); + +# Mount the filesystem +sudo mount -t squashfs $BENCHMARK_FS /mnt/squashfs + +echo "Decompression" +time sudo tar -c /mnt/squashfs 2> /dev/null | wc -c > /dev/null + +sudo umount /mnt/squashfs diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/Makefile b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/Makefile new file mode 100644 index 0000000000..67b55e6650 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/Makefile @@ -0,0 +1,49 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ + +LINUX := ../linux +LINUX_ZSTDLIB := $(LINUX)/lib/zstd + +CPPFLAGS += -I$(LINUX)/include -I$(LINUX_ZSTDLIB) -Iinclude -DNDEBUG -Wno-deprecated-declarations +# Don't poison the workspace, it currently doesn't work with static allocation and workspace reuse +CPPFLAGS += -DZSTD_ASAN_DONT_POISON_WORKSPACE + +LINUX_ZSTD_MODULE := $(wildcard $(LINUX_ZSTDLIB)/*.c) +LINUX_ZSTD_COMMON := $(wildcard $(LINUX_ZSTDLIB)/common/*.c) +LINUX_ZSTD_COMPRESS := $(wildcard $(LINUX_ZSTDLIB)/compress/*.c) +LINUX_ZSTD_DECOMPRESS := $(wildcard $(LINUX_ZSTDLIB)/decompress/*.c $(LINUX_ZSTDLIB)/decompress/*.S) +LINUX_ZSTD_FILES := $(LINUX_ZSTD_MODULE) $(LINUX_ZSTD_COMMON) $(LINUX_ZSTD_COMPRESS) $(LINUX_ZSTD_DECOMPRESS) +LINUX_ZSTD_OBJECTS0 := $(LINUX_ZSTD_FILES:.c=.o) +LINUX_ZSTD_OBJECTS := $(LINUX_ZSTD_OBJECTS0:.S=.o) + +%.o: %.S + $(COMPILE.S) $(OUTPUT_OPTION) $< + +liblinuxzstd.a: $(LINUX_ZSTD_OBJECTS) + $(AR) $(ARFLAGS) $@ $^ + +test: test.c liblinuxzstd.a + $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $^ -o $@ + +static_test: static_test.c + $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $^ -o $@ + +run-test: test static_test + ./macro-test.sh + ./test + ./static_test + +.PHONY: +clean: + $(RM) -f $(LINUX_ZSTDLIB)/*.o + $(RM) -f $(LINUX_ZSTDLIB)/**/*.o + $(RM) -f *.o *.a + $(RM) -f static_test + $(RM) -f test diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/compiler.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/compiler.h new file mode 100644 index 0000000000..988ce4a20f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/compiler.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_COMPILER_H +#define LINUX_COMPILER_H + +#ifndef inline +#define inline __inline __attribute__((unused)) +#endif + +#ifndef noinline +#define noinline __attribute__((noinline)) +#endif + +#define fallthrough __attribute__((__fallthrough__)) + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/errno.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/errno.h new file mode 100644 index 0000000000..b4bdcba0ea --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/errno.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_ERRNO_H +#define LINUX_ERRNO_H + +#define EINVAL 22 + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/kernel.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/kernel.h new file mode 100644 index 0000000000..a4d791cd1d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/kernel.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_KERNEL_H +#define LINUX_KERNEL_H + +#define WARN_ON(x) + +#define PTR_ALIGN(p, a) (typeof(p))ALIGN((unsigned long long)(p), (a)) +#define ALIGN(x, a) ALIGN_MASK((x), (a) - 1) +#define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/limits.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/limits.h new file mode 100644 index 0000000000..574aa7b343 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/limits.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_LIMITS_H +#define LINUX_LIMITS_H + +#include + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/math64.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/math64.h new file mode 100644 index 0000000000..7f6713e73b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/math64.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_MATH64_H +#define LINUX_MATH64_H + +#define div_u64(dividend, divisor) ((dividend) / (divisor)) + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/module.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/module.h new file mode 100644 index 0000000000..06ef56f9eb --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/module.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_MODULE_H +#define LINUX_MODULE_H + +#define EXPORT_SYMBOL(symbol) \ + void* __##symbol = symbol +#define EXPORT_SYMBOL_GPL(symbol) \ + void* __##symbol = symbol +#define MODULE_LICENSE(license) +#define MODULE_DESCRIPTION(description) + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/printk.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/printk.h new file mode 100644 index 0000000000..92a25278e7 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/printk.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_PRINTK_H +#define LINUX_PRINTK_H + +#define pr_debug(...) + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/stddef.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/stddef.h new file mode 100644 index 0000000000..15c7408fcd --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/stddef.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_STDDEF_H +#define LINUX_STDDEF_H + +#include + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/swab.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/swab.h new file mode 100644 index 0000000000..2b48b434c9 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/swab.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_SWAB_H +#define LINUX_SWAB_H + +#define swab32(x) __builtin_bswap32((x)) +#define swab64(x) __builtin_bswap64((x)) + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/types.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/types.h new file mode 100644 index 0000000000..b413db6f98 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/types.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#ifndef LINUX_TYPES_H +#define LINUX_TYPES_H + +#include +#include + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/unaligned.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/unaligned.h new file mode 100644 index 0000000000..86ec4ca389 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/unaligned.h @@ -0,0 +1,187 @@ +#ifndef ASM_UNALIGNED_H +#define ASM_UNALIGNED_H + +#include +#include + +#ifndef __LITTLE_ENDIAN +# if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN__) +# define __LITTLE_ENDIAN 1 +# endif +#endif + +#ifdef __LITTLE_ENDIAN +# define _IS_LITTLE_ENDIAN 1 +#else +# define _IS_LITTLE_ENDIAN 0 +#endif + +static unsigned _isLittleEndian(void) +{ + const union { uint32_t u; uint8_t c[4]; } one = { 1 }; + assert(_IS_LITTLE_ENDIAN == one.c[0]); + (void)one; + return _IS_LITTLE_ENDIAN; +} + +static uint16_t _swap16(uint16_t in) +{ + return ((in & 0xF) << 8) + ((in & 0xF0) >> 8); +} + +static uint32_t _swap32(uint32_t in) +{ + return __builtin_bswap32(in); +} + +static uint64_t _swap64(uint64_t in) +{ + return __builtin_bswap64(in); +} + +/* Little endian */ +static uint16_t get_unaligned_le16(const void* memPtr) +{ + uint16_t val; + __builtin_memcpy(&val, memPtr, sizeof(val)); + if (!_isLittleEndian()) _swap16(val); + return val; +} + +static uint32_t get_unaligned_le32(const void* memPtr) +{ + uint32_t val; + __builtin_memcpy(&val, memPtr, sizeof(val)); + if (!_isLittleEndian()) _swap32(val); + return val; +} + +static uint64_t get_unaligned_le64(const void* memPtr) +{ + uint64_t val; + __builtin_memcpy(&val, memPtr, sizeof(val)); + if (!_isLittleEndian()) _swap64(val); + return val; +} + +static void put_unaligned_le16(uint16_t value, void* memPtr) +{ + if (!_isLittleEndian()) value = _swap16(value); + __builtin_memcpy(memPtr, &value, sizeof(value)); +} + +static void put_unaligned_le32(uint32_t value, void* memPtr) +{ + if (!_isLittleEndian()) value = _swap32(value); + __builtin_memcpy(memPtr, &value, sizeof(value)); +} + +static void put_unaligned_le64(uint64_t value, void* memPtr) +{ + if (!_isLittleEndian()) value = _swap64(value); + __builtin_memcpy(memPtr, &value, sizeof(value)); +} + +/* big endian */ +static uint32_t get_unaligned_be32(const void* memPtr) +{ + uint32_t val; + __builtin_memcpy(&val, memPtr, sizeof(val)); + if (_isLittleEndian()) _swap32(val); + return val; +} + +static uint64_t get_unaligned_be64(const void* memPtr) +{ + uint64_t val; + __builtin_memcpy(&val, memPtr, sizeof(val)); + if (_isLittleEndian()) _swap64(val); + return val; +} + +static void put_unaligned_be32(uint32_t value, void* memPtr) +{ + if (_isLittleEndian()) value = _swap32(value); + __builtin_memcpy(memPtr, &value, sizeof(value)); +} + +static void put_unaligned_be64(uint64_t value, void* memPtr) +{ + if (_isLittleEndian()) value = _swap64(value); + __builtin_memcpy(memPtr, &value, sizeof(value)); +} + +/* generic */ +extern void __bad_unaligned_access_size(void); + +#define __get_unaligned_le(ptr) ((typeof(*(ptr)))({ \ + __builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \ + __builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_le16((ptr)), \ + __builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_le32((ptr)), \ + __builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_le64((ptr)), \ + __bad_unaligned_access_size())))); \ + })) + +#define __get_unaligned_be(ptr) ((typeof(*(ptr)))({ \ + __builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \ + __builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_be16((ptr)), \ + __builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_be32((ptr)), \ + __builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_be64((ptr)), \ + __bad_unaligned_access_size())))); \ + })) + +#define __put_unaligned_le(val, ptr) \ + ({ \ + void *__gu_p = (ptr); \ + switch (sizeof(*(ptr))) { \ + case 1: \ + *(uint8_t *)__gu_p = (uint8_t)(val); \ + break; \ + case 2: \ + put_unaligned_le16((uint16_t)(val), __gu_p); \ + break; \ + case 4: \ + put_unaligned_le32((uint32_t)(val), __gu_p); \ + break; \ + case 8: \ + put_unaligned_le64((uint64_t)(val), __gu_p); \ + break; \ + default: \ + __bad_unaligned_access_size(); \ + break; \ + } \ + (void)0; \ + }) + +#define __put_unaligned_be(val, ptr) \ + ({ \ + void *__gu_p = (ptr); \ + switch (sizeof(*(ptr))) { \ + case 1: \ + *(uint8_t *)__gu_p = (uint8_t)(val); \ + break; \ + case 2: \ + put_unaligned_be16((uint16_t)(val), __gu_p); \ + break; \ + case 4: \ + put_unaligned_be32((uint32_t)(val), __gu_p); \ + break; \ + case 8: \ + put_unaligned_be64((uint64_t)(val), __gu_p); \ + break; \ + default: \ + __bad_unaligned_access_size(); \ + break; \ + } \ + (void)0; \ + }) + +#if _IS_LITTLE_ENDIAN +# define get_unaligned __get_unaligned_le +# define put_unaligned __put_unaligned_le +#else +# define get_unaligned __get_unaligned_be +# define put_unaligned __put_unaligned_be +#endif + +#endif // ASM_UNALIGNED_H diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/xxhash.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/xxhash.h new file mode 100644 index 0000000000..f993eb9eed --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/include/linux/xxhash.h @@ -0,0 +1,745 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Copyright (C) 2012-2016, Yann Collet. + * + * BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation. This program is dual-licensed; you may select + * either version 2 of the GNU General Public License ("GPL") or BSD license + * ("BSD"). + * + * You can contact the author at: + * - xxHash homepage: https://cyan4973.github.io/xxHash/ + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + +/* + * Notice extracted from xxHash homepage: + * + * xxHash is an extremely fast Hash algorithm, running at RAM speed limits. + * It also successfully passes all tests from the SMHasher suite. + * + * Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 + * Duo @3GHz) + * + * Name Speed Q.Score Author + * xxHash 5.4 GB/s 10 + * CrapWow 3.2 GB/s 2 Andrew + * MumurHash 3a 2.7 GB/s 10 Austin Appleby + * SpookyHash 2.0 GB/s 10 Bob Jenkins + * SBox 1.4 GB/s 9 Bret Mulvey + * Lookup3 1.2 GB/s 9 Bob Jenkins + * SuperFastHash 1.2 GB/s 1 Paul Hsieh + * CityHash64 1.05 GB/s 10 Pike & Alakuijala + * FNV 0.55 GB/s 5 Fowler, Noll, Vo + * CRC32 0.43 GB/s 9 + * MD5-32 0.33 GB/s 10 Ronald L. Rivest + * SHA1-32 0.28 GB/s 10 + * + * Q.Score is a measure of quality of the hash function. + * It depends on successfully passing SMHasher test set. + * 10 is a perfect score. + * + * A 64-bits version, named xxh64 offers much better speed, + * but for 64-bits applications only. + * Name Speed on 64 bits Speed on 32 bits + * xxh64 13.8 GB/s 1.9 GB/s + * xxh32 6.8 GB/s 6.0 GB/s + */ + +#ifndef XXHASH_H +#define XXHASH_H + +#include + +#define XXH_API static inline __attribute__((unused)) +/*-**************************** + * Simple Hash Functions + *****************************/ + +/** + * xxh32() - calculate the 32-bit hash of the input with a given seed. + * + * @input: The data to hash. + * @length: The length of the data to hash. + * @seed: The seed can be used to alter the result predictably. + * + * Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s + * + * Return: The 32-bit hash of the data. + */ +XXH_API uint32_t xxh32(const void *input, size_t length, uint32_t seed); + +/** + * xxh64() - calculate the 64-bit hash of the input with a given seed. + * + * @input: The data to hash. + * @length: The length of the data to hash. + * @seed: The seed can be used to alter the result predictably. + * + * This function runs 2x faster on 64-bit systems, but slower on 32-bit systems. + * + * Return: The 64-bit hash of the data. + */ +XXH_API uint64_t xxh64(const void *input, size_t length, uint64_t seed); + +/** + * xxhash() - calculate wordsize hash of the input with a given seed + * @input: The data to hash. + * @length: The length of the data to hash. + * @seed: The seed can be used to alter the result predictably. + * + * If the hash does not need to be comparable between machines with + * different word sizes, this function will call whichever of xxh32() + * or xxh64() is faster. + * + * Return: wordsize hash of the data. + */ + +static inline unsigned long xxhash(const void *input, size_t length, + uint64_t seed) +{ + if (sizeof(size_t) == 8) + return xxh64(input, length, seed); + else + return xxh32(input, length, seed); +} + +/*-**************************** + * Streaming Hash Functions + *****************************/ + +/* + * These definitions are only meant to allow allocation of XXH state + * statically, on stack, or in a struct for example. + * Do not use members directly. + */ + +/** + * struct xxh32_state - private xxh32 state, do not use members directly + */ +struct xxh32_state { + uint32_t total_len_32; + uint32_t large_len; + uint32_t v1; + uint32_t v2; + uint32_t v3; + uint32_t v4; + uint32_t mem32[4]; + uint32_t memsize; +}; + +/** + * struct xxh32_state - private xxh64 state, do not use members directly + */ +struct xxh64_state { + uint64_t total_len; + uint64_t v1; + uint64_t v2; + uint64_t v3; + uint64_t v4; + uint64_t mem64[4]; + uint32_t memsize; +}; + +/** + * xxh32_reset() - reset the xxh32 state to start a new hashing operation + * + * @state: The xxh32 state to reset. + * @seed: Initialize the hash state with this seed. + * + * Call this function on any xxh32_state to prepare for a new hashing operation. + */ +XXH_API void xxh32_reset(struct xxh32_state *state, uint32_t seed); + +/** + * xxh32_update() - hash the data given and update the xxh32 state + * + * @state: The xxh32 state to update. + * @input: The data to hash. + * @length: The length of the data to hash. + * + * After calling xxh32_reset() call xxh32_update() as many times as necessary. + * + * Return: Zero on success, otherwise an error code. + */ +XXH_API int xxh32_update(struct xxh32_state *state, const void *input, size_t length); + +/** + * xxh32_digest() - produce the current xxh32 hash + * + * @state: Produce the current xxh32 hash of this state. + * + * A hash value can be produced at any time. It is still possible to continue + * inserting input into the hash state after a call to xxh32_digest(), and + * generate new hashes later on, by calling xxh32_digest() again. + * + * Return: The xxh32 hash stored in the state. + */ +XXH_API uint32_t xxh32_digest(const struct xxh32_state *state); + +/** + * xxh64_reset() - reset the xxh64 state to start a new hashing operation + * + * @state: The xxh64 state to reset. + * @seed: Initialize the hash state with this seed. + */ +XXH_API void xxh64_reset(struct xxh64_state *state, uint64_t seed); + +/** + * xxh64_update() - hash the data given and update the xxh64 state + * @state: The xxh64 state to update. + * @input: The data to hash. + * @length: The length of the data to hash. + * + * After calling xxh64_reset() call xxh64_update() as many times as necessary. + * + * Return: Zero on success, otherwise an error code. + */ +XXH_API int xxh64_update(struct xxh64_state *state, const void *input, size_t length); + +/** + * xxh64_digest() - produce the current xxh64 hash + * + * @state: Produce the current xxh64 hash of this state. + * + * A hash value can be produced at any time. It is still possible to continue + * inserting input into the hash state after a call to xxh64_digest(), and + * generate new hashes later on, by calling xxh64_digest() again. + * + * Return: The xxh64 hash stored in the state. + */ +XXH_API uint64_t xxh64_digest(const struct xxh64_state *state); + +/*-************************** + * Utils + ***************************/ + +/** + * xxh32_copy_state() - copy the source state into the destination state + * + * @src: The source xxh32 state. + * @dst: The destination xxh32 state. + */ +XXH_API void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src); + +/** + * xxh64_copy_state() - copy the source state into the destination state + * + * @src: The source xxh64 state. + * @dst: The destination xxh64 state. + */ +XXH_API void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src); + +/* + * xxHash - Extremely Fast Hash algorithm + * Copyright (C) 2012-2016, Yann Collet. + * + * BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the + * Free Software Foundation. This program is dual-licensed; you may select + * either version 2 of the GNU General Public License ("GPL") or BSD license + * ("BSD"). + * + * You can contact the author at: + * - xxHash homepage: https://cyan4973.github.io/xxHash/ + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + +#include +#include +#include +#include +#include + +/*-************************************* + * Macros + **************************************/ +#define xxh_rotl32(x, r) ((x << r) | (x >> (32 - r))) +#define xxh_rotl64(x, r) ((x << r) | (x >> (64 - r))) + +#ifdef __LITTLE_ENDIAN +# define XXH_CPU_LITTLE_ENDIAN 1 +#else +# define XXH_CPU_LITTLE_ENDIAN 0 +#endif + +/*-************************************* + * Constants + **************************************/ +static const uint32_t PRIME32_1 = 2654435761U; +static const uint32_t PRIME32_2 = 2246822519U; +static const uint32_t PRIME32_3 = 3266489917U; +static const uint32_t PRIME32_4 = 668265263U; +static const uint32_t PRIME32_5 = 374761393U; + +static const uint64_t PRIME64_1 = 11400714785074694791ULL; +static const uint64_t PRIME64_2 = 14029467366897019727ULL; +static const uint64_t PRIME64_3 = 1609587929392839161ULL; +static const uint64_t PRIME64_4 = 9650029242287828579ULL; +static const uint64_t PRIME64_5 = 2870177450012600261ULL; + +/*-************************** + * Utils + ***************************/ +XXH_API void xxh32_copy_state(struct xxh32_state *dst, const struct xxh32_state *src) +{ + __builtin_memcpy(dst, src, sizeof(*dst)); +} + +XXH_API void xxh64_copy_state(struct xxh64_state *dst, const struct xxh64_state *src) +{ + __builtin_memcpy(dst, src, sizeof(*dst)); +} + +/*-*************************** + * Simple Hash Functions + ****************************/ +static uint32_t xxh32_round(uint32_t seed, const uint32_t input) +{ + seed += input * PRIME32_2; + seed = xxh_rotl32(seed, 13); + seed *= PRIME32_1; + return seed; +} + +XXH_API uint32_t xxh32(const void *input, const size_t len, const uint32_t seed) +{ + const uint8_t *p = (const uint8_t *)input; + const uint8_t *b_end = p + len; + uint32_t h32; + + if (len >= 16) { + const uint8_t *const limit = b_end - 16; + uint32_t v1 = seed + PRIME32_1 + PRIME32_2; + uint32_t v2 = seed + PRIME32_2; + uint32_t v3 = seed + 0; + uint32_t v4 = seed - PRIME32_1; + + do { + v1 = xxh32_round(v1, get_unaligned_le32(p)); + p += 4; + v2 = xxh32_round(v2, get_unaligned_le32(p)); + p += 4; + v3 = xxh32_round(v3, get_unaligned_le32(p)); + p += 4; + v4 = xxh32_round(v4, get_unaligned_le32(p)); + p += 4; + } while (p <= limit); + + h32 = xxh_rotl32(v1, 1) + xxh_rotl32(v2, 7) + + xxh_rotl32(v3, 12) + xxh_rotl32(v4, 18); + } else { + h32 = seed + PRIME32_5; + } + + h32 += (uint32_t)len; + + while (p + 4 <= b_end) { + h32 += get_unaligned_le32(p) * PRIME32_3; + h32 = xxh_rotl32(h32, 17) * PRIME32_4; + p += 4; + } + + while (p < b_end) { + h32 += (*p) * PRIME32_5; + h32 = xxh_rotl32(h32, 11) * PRIME32_1; + p++; + } + + h32 ^= h32 >> 15; + h32 *= PRIME32_2; + h32 ^= h32 >> 13; + h32 *= PRIME32_3; + h32 ^= h32 >> 16; + + return h32; +} + +static uint64_t xxh64_round(uint64_t acc, const uint64_t input) +{ + acc += input * PRIME64_2; + acc = xxh_rotl64(acc, 31); + acc *= PRIME64_1; + return acc; +} + +static uint64_t xxh64_merge_round(uint64_t acc, uint64_t val) +{ + val = xxh64_round(0, val); + acc ^= val; + acc = acc * PRIME64_1 + PRIME64_4; + return acc; +} + +XXH_API uint64_t xxh64(const void *input, const size_t len, const uint64_t seed) +{ + const uint8_t *p = (const uint8_t *)input; + const uint8_t *const b_end = p + len; + uint64_t h64; + + if (len >= 32) { + const uint8_t *const limit = b_end - 32; + uint64_t v1 = seed + PRIME64_1 + PRIME64_2; + uint64_t v2 = seed + PRIME64_2; + uint64_t v3 = seed + 0; + uint64_t v4 = seed - PRIME64_1; + + do { + v1 = xxh64_round(v1, get_unaligned_le64(p)); + p += 8; + v2 = xxh64_round(v2, get_unaligned_le64(p)); + p += 8; + v3 = xxh64_round(v3, get_unaligned_le64(p)); + p += 8; + v4 = xxh64_round(v4, get_unaligned_le64(p)); + p += 8; + } while (p <= limit); + + h64 = xxh_rotl64(v1, 1) + xxh_rotl64(v2, 7) + + xxh_rotl64(v3, 12) + xxh_rotl64(v4, 18); + h64 = xxh64_merge_round(h64, v1); + h64 = xxh64_merge_round(h64, v2); + h64 = xxh64_merge_round(h64, v3); + h64 = xxh64_merge_round(h64, v4); + + } else { + h64 = seed + PRIME64_5; + } + + h64 += (uint64_t)len; + + while (p + 8 <= b_end) { + const uint64_t k1 = xxh64_round(0, get_unaligned_le64(p)); + + h64 ^= k1; + h64 = xxh_rotl64(h64, 27) * PRIME64_1 + PRIME64_4; + p += 8; + } + + if (p + 4 <= b_end) { + h64 ^= (uint64_t)(get_unaligned_le32(p)) * PRIME64_1; + h64 = xxh_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; + p += 4; + } + + while (p < b_end) { + h64 ^= (*p) * PRIME64_5; + h64 = xxh_rotl64(h64, 11) * PRIME64_1; + p++; + } + + h64 ^= h64 >> 33; + h64 *= PRIME64_2; + h64 ^= h64 >> 29; + h64 *= PRIME64_3; + h64 ^= h64 >> 32; + + return h64; +} + +/*-************************************************** + * Advanced Hash Functions + ***************************************************/ +XXH_API void xxh32_reset(struct xxh32_state *statePtr, const uint32_t seed) +{ + /* use a local state for memcpy() to avoid strict-aliasing warnings */ + struct xxh32_state state; + + __builtin_memset(&state, 0, sizeof(state)); + state.v1 = seed + PRIME32_1 + PRIME32_2; + state.v2 = seed + PRIME32_2; + state.v3 = seed + 0; + state.v4 = seed - PRIME32_1; + __builtin_memcpy(statePtr, &state, sizeof(state)); +} + +XXH_API void xxh64_reset(struct xxh64_state *statePtr, const uint64_t seed) +{ + /* use a local state for memcpy() to avoid strict-aliasing warnings */ + struct xxh64_state state; + + __builtin_memset(&state, 0, sizeof(state)); + state.v1 = seed + PRIME64_1 + PRIME64_2; + state.v2 = seed + PRIME64_2; + state.v3 = seed + 0; + state.v4 = seed - PRIME64_1; + __builtin_memcpy(statePtr, &state, sizeof(state)); +} + +XXH_API int xxh32_update(struct xxh32_state *state, const void *input, const size_t len) +{ + const uint8_t *p = (const uint8_t *)input; + const uint8_t *const b_end = p + len; + + if (input == NULL) + return -EINVAL; + + state->total_len_32 += (uint32_t)len; + state->large_len |= (len >= 16) | (state->total_len_32 >= 16); + + if (state->memsize + len < 16) { /* fill in tmp buffer */ + __builtin_memcpy((uint8_t *)(state->mem32) + state->memsize, input, len); + state->memsize += (uint32_t)len; + return 0; + } + + if (state->memsize) { /* some data left from previous update */ + const uint32_t *p32 = state->mem32; + + __builtin_memcpy((uint8_t *)(state->mem32) + state->memsize, input, + 16 - state->memsize); + + state->v1 = xxh32_round(state->v1, get_unaligned_le32(p32)); + p32++; + state->v2 = xxh32_round(state->v2, get_unaligned_le32(p32)); + p32++; + state->v3 = xxh32_round(state->v3, get_unaligned_le32(p32)); + p32++; + state->v4 = xxh32_round(state->v4, get_unaligned_le32(p32)); + p32++; + + p += 16-state->memsize; + state->memsize = 0; + } + + if (p <= b_end - 16) { + const uint8_t *const limit = b_end - 16; + uint32_t v1 = state->v1; + uint32_t v2 = state->v2; + uint32_t v3 = state->v3; + uint32_t v4 = state->v4; + + do { + v1 = xxh32_round(v1, get_unaligned_le32(p)); + p += 4; + v2 = xxh32_round(v2, get_unaligned_le32(p)); + p += 4; + v3 = xxh32_round(v3, get_unaligned_le32(p)); + p += 4; + v4 = xxh32_round(v4, get_unaligned_le32(p)); + p += 4; + } while (p <= limit); + + state->v1 = v1; + state->v2 = v2; + state->v3 = v3; + state->v4 = v4; + } + + if (p < b_end) { + __builtin_memcpy(state->mem32, p, (size_t)(b_end-p)); + state->memsize = (uint32_t)(b_end-p); + } + + return 0; +} + +XXH_API uint32_t xxh32_digest(const struct xxh32_state *state) +{ + const uint8_t *p = (const uint8_t *)state->mem32; + const uint8_t *const b_end = (const uint8_t *)(state->mem32) + + state->memsize; + uint32_t h32; + + if (state->large_len) { + h32 = xxh_rotl32(state->v1, 1) + xxh_rotl32(state->v2, 7) + + xxh_rotl32(state->v3, 12) + xxh_rotl32(state->v4, 18); + } else { + h32 = state->v3 /* == seed */ + PRIME32_5; + } + + h32 += state->total_len_32; + + while (p + 4 <= b_end) { + h32 += get_unaligned_le32(p) * PRIME32_3; + h32 = xxh_rotl32(h32, 17) * PRIME32_4; + p += 4; + } + + while (p < b_end) { + h32 += (*p) * PRIME32_5; + h32 = xxh_rotl32(h32, 11) * PRIME32_1; + p++; + } + + h32 ^= h32 >> 15; + h32 *= PRIME32_2; + h32 ^= h32 >> 13; + h32 *= PRIME32_3; + h32 ^= h32 >> 16; + + return h32; +} + +XXH_API int xxh64_update(struct xxh64_state *state, const void *input, const size_t len) +{ + const uint8_t *p = (const uint8_t *)input; + const uint8_t *const b_end = p + len; + + if (input == NULL) + return -EINVAL; + + state->total_len += len; + + if (state->memsize + len < 32) { /* fill in tmp buffer */ + __builtin_memcpy(((uint8_t *)state->mem64) + state->memsize, input, len); + state->memsize += (uint32_t)len; + return 0; + } + + if (state->memsize) { /* tmp buffer is full */ + uint64_t *p64 = state->mem64; + + __builtin_memcpy(((uint8_t *)p64) + state->memsize, input, + 32 - state->memsize); + + state->v1 = xxh64_round(state->v1, get_unaligned_le64(p64)); + p64++; + state->v2 = xxh64_round(state->v2, get_unaligned_le64(p64)); + p64++; + state->v3 = xxh64_round(state->v3, get_unaligned_le64(p64)); + p64++; + state->v4 = xxh64_round(state->v4, get_unaligned_le64(p64)); + + p += 32 - state->memsize; + state->memsize = 0; + } + + if (p + 32 <= b_end) { + const uint8_t *const limit = b_end - 32; + uint64_t v1 = state->v1; + uint64_t v2 = state->v2; + uint64_t v3 = state->v3; + uint64_t v4 = state->v4; + + do { + v1 = xxh64_round(v1, get_unaligned_le64(p)); + p += 8; + v2 = xxh64_round(v2, get_unaligned_le64(p)); + p += 8; + v3 = xxh64_round(v3, get_unaligned_le64(p)); + p += 8; + v4 = xxh64_round(v4, get_unaligned_le64(p)); + p += 8; + } while (p <= limit); + + state->v1 = v1; + state->v2 = v2; + state->v3 = v3; + state->v4 = v4; + } + + if (p < b_end) { + __builtin_memcpy(state->mem64, p, (size_t)(b_end-p)); + state->memsize = (uint32_t)(b_end - p); + } + + return 0; +} + +XXH_API uint64_t xxh64_digest(const struct xxh64_state *state) +{ + const uint8_t *p = (const uint8_t *)state->mem64; + const uint8_t *const b_end = (const uint8_t *)state->mem64 + + state->memsize; + uint64_t h64; + + if (state->total_len >= 32) { + const uint64_t v1 = state->v1; + const uint64_t v2 = state->v2; + const uint64_t v3 = state->v3; + const uint64_t v4 = state->v4; + + h64 = xxh_rotl64(v1, 1) + xxh_rotl64(v2, 7) + + xxh_rotl64(v3, 12) + xxh_rotl64(v4, 18); + h64 = xxh64_merge_round(h64, v1); + h64 = xxh64_merge_round(h64, v2); + h64 = xxh64_merge_round(h64, v3); + h64 = xxh64_merge_round(h64, v4); + } else { + h64 = state->v3 + PRIME64_5; + } + + h64 += (uint64_t)state->total_len; + + while (p + 8 <= b_end) { + const uint64_t k1 = xxh64_round(0, get_unaligned_le64(p)); + + h64 ^= k1; + h64 = xxh_rotl64(h64, 27) * PRIME64_1 + PRIME64_4; + p += 8; + } + + if (p + 4 <= b_end) { + h64 ^= (uint64_t)(get_unaligned_le32(p)) * PRIME64_1; + h64 = xxh_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; + p += 4; + } + + while (p < b_end) { + h64 ^= (*p) * PRIME64_5; + h64 = xxh_rotl64(h64, 11) * PRIME64_1; + p++; + } + + h64 ^= h64 >> 33; + h64 *= PRIME64_2; + h64 ^= h64 >> 29; + h64 *= PRIME64_3; + h64 ^= h64 >> 32; + + return h64; +} + +#endif /* XXHASH_H */ diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/macro-test.sh b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/macro-test.sh new file mode 100755 index 0000000000..9ea84aa66b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/macro-test.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env sh + +set -e + +SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) +INCLUDE_DIR="$SCRIPT_DIR/../linux/include" +LIB_DIR="$SCRIPT_DIR/../linux/lib" + + +print() { + printf '%b' "${*}" +} + +println() { + printf '%b\n' "${*}" +} + +die() { + println "$@" 1>&2 + exit 1 +} + +test_not_present() { + print "Testing that '$1' is not present... " + grep -r $1 "$INCLUDE_DIR" "$LIB_DIR" && die "Fail!" + println "Okay" +} + +println "This test checks that the macro removal process worked as expected" +println "If this test fails, then freestanding.py wasn't able to remove one of these" +println "macros from the source code completely. You'll either need to rewrite the check" +println "or improve freestanding.py." +println "" + +test_not_present "ZSTD_NO_INTRINSICS" +test_not_present "ZSTD_NO_UNUSED_FUNCTIONS" +test_not_present "ZSTD_LEGACY_SUPPORT" +test_not_present "STATIC_BMI2" +test_not_present "ZSTD_DLL_EXPORT" +test_not_present "ZSTD_DLL_IMPORT" +test_not_present "__ICCARM__" +test_not_present "_MSC_VER" +test_not_present "_WIN32" +test_not_present "__linux__" diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/static_test.c b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/static_test.c new file mode 100644 index 0000000000..ba4a420d41 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/static_test.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#include +#include +#include +#include + +#include "decompress_sources.h" +#include + +#define CONTROL(x) \ + do { \ + if (!(x)) { \ + fprintf(stderr, "%s:%u: %s failed!\n", __FUNCTION__, __LINE__, #x); \ + abort(); \ + } \ + } while (0) + + +static const char kEmptyZstdFrame[] = { + 0x28, 0xb5, 0x2f, 0xfd, 0x24, 0x00, 0x01, 0x00, 0x00, 0x99, 0xe9, 0xd8, 0x51 +}; + +static void test_decompress_unzstd(void) { + fprintf(stderr, "Testing decompress unzstd... "); + { + size_t const wkspSize = zstd_dctx_workspace_bound(); + void* wksp = malloc(wkspSize); + ZSTD_DCtx* dctx = zstd_init_dctx(wksp, wkspSize); + CONTROL(wksp != NULL); + CONTROL(dctx != NULL); + { + size_t const dSize = zstd_decompress_dctx(dctx, NULL, 0, kEmptyZstdFrame, sizeof(kEmptyZstdFrame)); + CONTROL(!zstd_is_error(dSize)); + CONTROL(dSize == 0); + } + free(wksp); + } + fprintf(stderr, "Ok\n"); +} + +int main(void) { + test_decompress_unzstd(); + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/test.c b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/test.c new file mode 100644 index 0000000000..0f4ba3f45e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/test/test.c @@ -0,0 +1,229 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ +#include +#include +#include +#include + +#include + +#define CONTROL(x) \ + do { \ + if (!(x)) { \ + fprintf(stderr, "%s:%u: %s failed!\n", __FUNCTION__, __LINE__, #x); \ + abort(); \ + } \ + } while (0) + +typedef struct { + char *data; + char *data2; + size_t dataSize; + char *comp; + size_t compSize; +} test_data_t; + +static test_data_t create_test_data(void) { + test_data_t data; + data.dataSize = 128 * 1024; + data.data = (char*)malloc(data.dataSize); + CONTROL(data.data != NULL); + data.data2 = (char*)malloc(data.dataSize); + CONTROL(data.data2 != NULL); + data.compSize = zstd_compress_bound(data.dataSize); + data.comp = (char*)malloc(data.compSize); + CONTROL(data.comp != NULL); + memset(data.data, 0, data.dataSize); + return data; +} + +static void free_test_data(test_data_t const *data) { + free(data->data); + free(data->data2); + free(data->comp); +} + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +static void test_btrfs(test_data_t const *data) { + size_t const size = MIN(data->dataSize, 128 * 1024); + fprintf(stderr, "testing btrfs use cases... "); + for (int level = -1; level < 16; ++level) { + zstd_parameters params = zstd_get_params(level, size); + size_t const workspaceSize = + MAX(zstd_cstream_workspace_bound(¶ms.cParams), + zstd_dstream_workspace_bound(size)); + void *workspace = malloc(workspaceSize); + + char const *ip = data->data; + char const *iend = ip + size; + char *op = data->comp; + char *oend = op + data->compSize; + + CONTROL(params.cParams.windowLog <= 17); + CONTROL(workspace != NULL); + { + zstd_cstream *cctx = zstd_init_cstream(¶ms, size, workspace, workspaceSize); + zstd_out_buffer out = {NULL, 0, 0}; + zstd_in_buffer in = {NULL, 0, 0}; + CONTROL(cctx != NULL); + for (;;) { + if (in.pos == in.size) { + in.src = ip; + in.size = MIN(4096, iend - ip); + in.pos = 0; + ip += in.size; + } + + if (out.pos == out.size) { + out.dst = op; + out.size = MIN(4096, oend - op); + out.pos = 0; + op += out.size; + } + + if (ip != iend || in.pos < in.size) { + CONTROL(!zstd_is_error(zstd_compress_stream(cctx, &out, &in))); + } else { + size_t const ret = zstd_end_stream(cctx, &out); + CONTROL(!zstd_is_error(ret)); + if (ret == 0) { + break; + } + } + } + op += out.pos; + } + + ip = data->comp; + iend = op; + op = data->data2; + oend = op + size; + { + zstd_dstream *dctx = zstd_init_dstream(1ULL << params.cParams.windowLog, workspace, workspaceSize); + zstd_out_buffer out = {NULL, 0, 0}; + zstd_in_buffer in = {NULL, 0, 0}; + CONTROL(dctx != NULL); + for (;;) { + if (in.pos == in.size) { + in.src = ip; + in.size = MIN(4096, iend - ip); + in.pos = 0; + ip += in.size; + } + + if (out.pos == out.size) { + out.dst = op; + out.size = MIN(4096, oend - op); + out.pos = 0; + op += out.size; + } + { + size_t const ret = zstd_decompress_stream(dctx, &out, &in); + CONTROL(!zstd_is_error(ret)); + if (ret == 0) { + break; + } + } + } + } + CONTROL((size_t)(op - data->data2) == data->dataSize); + CONTROL(!memcmp(data->data, data->data2, data->dataSize)); + free(workspace); + } + fprintf(stderr, "Ok\n"); +} + +static void test_decompress_unzstd(test_data_t const *data) { + size_t cSize; + fprintf(stderr, "Testing decompress unzstd... "); + { + zstd_parameters params = zstd_get_params(19, 0); + size_t const wkspSize = zstd_cctx_workspace_bound(¶ms.cParams); + void* wksp = malloc(wkspSize); + zstd_cctx* cctx = zstd_init_cctx(wksp, wkspSize); + CONTROL(wksp != NULL); + CONTROL(cctx != NULL); + cSize = zstd_compress_cctx(cctx, data->comp, data->compSize, data->data, data->dataSize, ¶ms); + CONTROL(!zstd_is_error(cSize)); + free(wksp); + } + { + size_t const wkspSize = zstd_dctx_workspace_bound(); + void* wksp = malloc(wkspSize); + zstd_dctx* dctx = zstd_init_dctx(wksp, wkspSize); + CONTROL(wksp != NULL); + CONTROL(dctx != NULL); + { + size_t const dSize = zstd_decompress_dctx(dctx, data->data2, data->dataSize, data->comp, cSize); + CONTROL(!zstd_is_error(dSize)); + CONTROL(dSize == data->dataSize); + } + CONTROL(!memcmp(data->data, data->data2, data->dataSize)); + free(wksp); + } + fprintf(stderr, "Ok\n"); +} + +static void test_f2fs(void) { + fprintf(stderr, "testing f2fs uses... "); + CONTROL(zstd_min_clevel() < 0); + CONTROL(zstd_max_clevel() == 22); + fprintf(stderr, "Ok\n"); +} + +static char *g_stack = NULL; + +static void __attribute__((noinline)) use(void *x) { + asm volatile("" : "+r"(x)); +} + +static void __attribute__((noinline)) fill_stack(void) { + memset(g_stack, 0x33, 8192); +} + +static void __attribute__((noinline)) set_stack(void) { + + char stack[8192]; + g_stack = stack; + use(g_stack); +} + +static void __attribute__((noinline)) check_stack(void) { + size_t cleanStack = 0; + while (cleanStack < 8192 && g_stack[cleanStack] == 0x33) { + ++cleanStack; + } + { + size_t const stackSize = 8192 - cleanStack; + fprintf(stderr, "Maximum stack size: %zu\n", stackSize); + CONTROL(stackSize <= 2048 + 512); + } +} + +static void test_stack_usage(test_data_t const *data) { + set_stack(); + fill_stack(); + test_f2fs(); + test_btrfs(data); + test_decompress_unzstd(data); + check_stack(); +} + +int main(void) { + test_data_t data = create_test_data(); + test_f2fs(); + test_btrfs(&data); + test_decompress_unzstd(&data); + test_stack_usage(&data); + free_test_data(&data); + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_common_module.c b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_common_module.c new file mode 100644 index 0000000000..466828e357 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_common_module.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include + +#include "common/huf.h" +#include "common/fse.h" +#include "common/zstd_internal.h" + +// Export symbols shared by compress and decompress into a common module + +#undef ZSTD_isError /* defined within zstd_internal.h */ +EXPORT_SYMBOL_GPL(FSE_readNCount); +EXPORT_SYMBOL_GPL(HUF_readStats); +EXPORT_SYMBOL_GPL(HUF_readStats_wksp); +EXPORT_SYMBOL_GPL(ZSTD_isError); +EXPORT_SYMBOL_GPL(ZSTD_getErrorName); +EXPORT_SYMBOL_GPL(ZSTD_getErrorCode); + +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_DESCRIPTION("Zstd Common"); diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_compress_module.c b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_compress_module.c new file mode 100644 index 0000000000..804efe6d5b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_compress_module.c @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include +#include +#include +#include + +#include "common/zstd_deps.h" +#include "common/zstd_internal.h" +#include "compress/zstd_compress_internal.h" + +#define ZSTD_FORWARD_IF_ERR(ret) \ + do { \ + size_t const __ret = (ret); \ + if (ZSTD_isError(__ret)) \ + return __ret; \ + } while (0) + +static size_t zstd_cctx_init(zstd_cctx *cctx, const zstd_parameters *parameters, + unsigned long long pledged_src_size) +{ + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_reset( + cctx, ZSTD_reset_session_and_parameters)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setPledgedSrcSize( + cctx, pledged_src_size)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_windowLog, parameters->cParams.windowLog)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_hashLog, parameters->cParams.hashLog)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_chainLog, parameters->cParams.chainLog)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_searchLog, parameters->cParams.searchLog)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_minMatch, parameters->cParams.minMatch)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_targetLength, parameters->cParams.targetLength)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_strategy, parameters->cParams.strategy)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_contentSizeFlag, parameters->fParams.contentSizeFlag)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_checksumFlag, parameters->fParams.checksumFlag)); + ZSTD_FORWARD_IF_ERR(ZSTD_CCtx_setParameter( + cctx, ZSTD_c_dictIDFlag, !parameters->fParams.noDictIDFlag)); + return 0; +} + +int zstd_min_clevel(void) +{ + return ZSTD_minCLevel(); +} +EXPORT_SYMBOL(zstd_min_clevel); + +int zstd_max_clevel(void) +{ + return ZSTD_maxCLevel(); +} +EXPORT_SYMBOL(zstd_max_clevel); + +size_t zstd_compress_bound(size_t src_size) +{ + return ZSTD_compressBound(src_size); +} +EXPORT_SYMBOL(zstd_compress_bound); + +zstd_parameters zstd_get_params(int level, + unsigned long long estimated_src_size) +{ + return ZSTD_getParams(level, estimated_src_size, 0); +} +EXPORT_SYMBOL(zstd_get_params); + +size_t zstd_cctx_set_param(zstd_cctx *cctx, ZSTD_cParameter param, int value) +{ + return ZSTD_CCtx_setParameter(cctx, param, value); +} +EXPORT_SYMBOL(zstd_cctx_set_param); + +size_t zstd_cctx_workspace_bound(const zstd_compression_parameters *cparams) +{ + return ZSTD_estimateCCtxSize_usingCParams(*cparams); +} +EXPORT_SYMBOL(zstd_cctx_workspace_bound); + +// Used by zstd_cctx_workspace_bound_with_ext_seq_prod() +static size_t dummy_external_sequence_producer( + void *sequenceProducerState, + ZSTD_Sequence *outSeqs, size_t outSeqsCapacity, + const void *src, size_t srcSize, + const void *dict, size_t dictSize, + int compressionLevel, + size_t windowSize) +{ + (void)sequenceProducerState; + (void)outSeqs; (void)outSeqsCapacity; + (void)src; (void)srcSize; + (void)dict; (void)dictSize; + (void)compressionLevel; + (void)windowSize; + return ZSTD_SEQUENCE_PRODUCER_ERROR; +} + +static void init_cctx_params_from_compress_params( + ZSTD_CCtx_params *cctx_params, + const zstd_compression_parameters *compress_params) +{ + ZSTD_parameters zstd_params; + memset(&zstd_params, 0, sizeof(zstd_params)); + zstd_params.cParams = *compress_params; + ZSTD_CCtxParams_init_advanced(cctx_params, zstd_params); +} + +size_t zstd_cctx_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *compress_params) +{ + ZSTD_CCtx_params cctx_params; + init_cctx_params_from_compress_params(&cctx_params, compress_params); + ZSTD_CCtxParams_registerSequenceProducer(&cctx_params, NULL, dummy_external_sequence_producer); + return ZSTD_estimateCCtxSize_usingCCtxParams(&cctx_params); +} +EXPORT_SYMBOL(zstd_cctx_workspace_bound_with_ext_seq_prod); + +size_t zstd_cstream_workspace_bound_with_ext_seq_prod(const zstd_compression_parameters *compress_params) +{ + ZSTD_CCtx_params cctx_params; + init_cctx_params_from_compress_params(&cctx_params, compress_params); + ZSTD_CCtxParams_registerSequenceProducer(&cctx_params, NULL, dummy_external_sequence_producer); + return ZSTD_estimateCStreamSize_usingCCtxParams(&cctx_params); +} +EXPORT_SYMBOL(zstd_cstream_workspace_bound_with_ext_seq_prod); + +zstd_cctx *zstd_init_cctx(void *workspace, size_t workspace_size) +{ + if (workspace == NULL) + return NULL; + return ZSTD_initStaticCCtx(workspace, workspace_size); +} +EXPORT_SYMBOL(zstd_init_cctx); + +size_t zstd_compress_cctx(zstd_cctx *cctx, void *dst, size_t dst_capacity, + const void *src, size_t src_size, const zstd_parameters *parameters) +{ + ZSTD_FORWARD_IF_ERR(zstd_cctx_init(cctx, parameters, src_size)); + return ZSTD_compress2(cctx, dst, dst_capacity, src, src_size); +} +EXPORT_SYMBOL(zstd_compress_cctx); + +size_t zstd_cstream_workspace_bound(const zstd_compression_parameters *cparams) +{ + return ZSTD_estimateCStreamSize_usingCParams(*cparams); +} +EXPORT_SYMBOL(zstd_cstream_workspace_bound); + +zstd_cstream *zstd_init_cstream(const zstd_parameters *parameters, + unsigned long long pledged_src_size, void *workspace, size_t workspace_size) +{ + zstd_cstream *cstream; + + if (workspace == NULL) + return NULL; + + cstream = ZSTD_initStaticCStream(workspace, workspace_size); + if (cstream == NULL) + return NULL; + + /* 0 means unknown in linux zstd API but means 0 in new zstd API */ + if (pledged_src_size == 0) + pledged_src_size = ZSTD_CONTENTSIZE_UNKNOWN; + + if (ZSTD_isError(zstd_cctx_init(cstream, parameters, pledged_src_size))) + return NULL; + + return cstream; +} +EXPORT_SYMBOL(zstd_init_cstream); + +size_t zstd_reset_cstream(zstd_cstream *cstream, + unsigned long long pledged_src_size) +{ + if (pledged_src_size == 0) + pledged_src_size = ZSTD_CONTENTSIZE_UNKNOWN; + ZSTD_FORWARD_IF_ERR( ZSTD_CCtx_reset(cstream, ZSTD_reset_session_only) ); + ZSTD_FORWARD_IF_ERR( ZSTD_CCtx_setPledgedSrcSize(cstream, pledged_src_size) ); + return 0; +} +EXPORT_SYMBOL(zstd_reset_cstream); + +size_t zstd_compress_stream(zstd_cstream *cstream, zstd_out_buffer *output, + zstd_in_buffer *input) +{ + return ZSTD_compressStream(cstream, output, input); +} +EXPORT_SYMBOL(zstd_compress_stream); + +size_t zstd_flush_stream(zstd_cstream *cstream, zstd_out_buffer *output) +{ + return ZSTD_flushStream(cstream, output); +} +EXPORT_SYMBOL(zstd_flush_stream); + +size_t zstd_end_stream(zstd_cstream *cstream, zstd_out_buffer *output) +{ + return ZSTD_endStream(cstream, output); +} +EXPORT_SYMBOL(zstd_end_stream); + +void zstd_register_sequence_producer( + zstd_cctx *cctx, + void* sequence_producer_state, + zstd_sequence_producer_f sequence_producer +) { + ZSTD_registerSequenceProducer(cctx, sequence_producer_state, sequence_producer); +} +EXPORT_SYMBOL(zstd_register_sequence_producer); + +size_t zstd_compress_sequences_and_literals(zstd_cctx *cctx, void* dst, size_t dst_capacity, + const zstd_sequence *in_seqs, size_t in_seqs_size, + const void* literals, size_t lit_size, size_t lit_capacity, + size_t decompressed_size) +{ + return ZSTD_compressSequencesAndLiterals(cctx, dst, dst_capacity, in_seqs, + in_seqs_size, literals, lit_size, + lit_capacity, decompressed_size); +} +EXPORT_SYMBOL(zstd_compress_sequences_and_literals); + +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_DESCRIPTION("Zstd Compressor"); diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_decompress_module.c b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_decompress_module.c new file mode 100644 index 0000000000..7d31518e9d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_decompress_module.c @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include +#include +#include +#include + +#include "common/zstd_deps.h" + +/* Common symbols. zstd_compress must depend on zstd_decompress. */ + +unsigned int zstd_is_error(size_t code) +{ + return ZSTD_isError(code); +} +EXPORT_SYMBOL(zstd_is_error); + +zstd_error_code zstd_get_error_code(size_t code) +{ + return ZSTD_getErrorCode(code); +} +EXPORT_SYMBOL(zstd_get_error_code); + +const char *zstd_get_error_name(size_t code) +{ + return ZSTD_getErrorName(code); +} +EXPORT_SYMBOL(zstd_get_error_name); + +/* Decompression symbols. */ + +size_t zstd_dctx_workspace_bound(void) +{ + return ZSTD_estimateDCtxSize(); +} +EXPORT_SYMBOL(zstd_dctx_workspace_bound); + +zstd_dctx *zstd_init_dctx(void *workspace, size_t workspace_size) +{ + if (workspace == NULL) + return NULL; + return ZSTD_initStaticDCtx(workspace, workspace_size); +} +EXPORT_SYMBOL(zstd_init_dctx); + +size_t zstd_decompress_dctx(zstd_dctx *dctx, void *dst, size_t dst_capacity, + const void *src, size_t src_size) +{ + return ZSTD_decompressDCtx(dctx, dst, dst_capacity, src, src_size); +} +EXPORT_SYMBOL(zstd_decompress_dctx); + +size_t zstd_dstream_workspace_bound(size_t max_window_size) +{ + return ZSTD_estimateDStreamSize(max_window_size); +} +EXPORT_SYMBOL(zstd_dstream_workspace_bound); + +zstd_dstream *zstd_init_dstream(size_t max_window_size, void *workspace, + size_t workspace_size) +{ + if (workspace == NULL) + return NULL; + (void)max_window_size; + return ZSTD_initStaticDStream(workspace, workspace_size); +} +EXPORT_SYMBOL(zstd_init_dstream); + +size_t zstd_reset_dstream(zstd_dstream *dstream) +{ + return ZSTD_DCtx_reset(dstream, ZSTD_reset_session_only); +} +EXPORT_SYMBOL(zstd_reset_dstream); + +size_t zstd_decompress_stream(zstd_dstream *dstream, zstd_out_buffer *output, + zstd_in_buffer *input) +{ + return ZSTD_decompressStream(dstream, output, input); +} +EXPORT_SYMBOL(zstd_decompress_stream); + +size_t zstd_find_frame_compressed_size(const void *src, size_t src_size) +{ + return ZSTD_findFrameCompressedSize(src, src_size); +} +EXPORT_SYMBOL(zstd_find_frame_compressed_size); + +size_t zstd_get_frame_header(zstd_frame_header *header, const void *src, + size_t src_size) +{ + return ZSTD_getFrameHeader(header, src, src_size); +} +EXPORT_SYMBOL(zstd_get_frame_header); + +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_DESCRIPTION("Zstd Decompressor"); diff --git a/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_deps.h b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_deps.h new file mode 100644 index 0000000000..f931f7d0e2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/linux-kernel/zstd_deps.h @@ -0,0 +1,121 @@ +/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* + * This file provides common libc dependencies that zstd requires. + * The purpose is to allow replacing this file with a custom implementation + * to compile zstd without libc support. + */ + +/* Need: + * NULL + * INT_MAX + * UINT_MAX + * ZSTD_memcpy() + * ZSTD_memset() + * ZSTD_memmove() + */ +#ifndef ZSTD_DEPS_COMMON +#define ZSTD_DEPS_COMMON + +#include +#include + +#define ZSTD_memcpy(d,s,n) __builtin_memcpy((d),(s),(n)) +#define ZSTD_memmove(d,s,n) __builtin_memmove((d),(s),(n)) +#define ZSTD_memset(d,s,n) __builtin_memset((d),(s),(n)) + +#endif /* ZSTD_DEPS_COMMON */ + +/* + * Define malloc as always failing. That means the user must + * either use ZSTD_customMem or statically allocate memory. + * Need: + * ZSTD_malloc() + * ZSTD_free() + * ZSTD_calloc() + */ +#ifdef ZSTD_DEPS_NEED_MALLOC +#ifndef ZSTD_DEPS_MALLOC +#define ZSTD_DEPS_MALLOC + +#define ZSTD_malloc(s) ({ (void)(s); NULL; }) +#define ZSTD_free(p) ((void)(p)) +#define ZSTD_calloc(n,s) ({ (void)(n); (void)(s); NULL; }) + +#endif /* ZSTD_DEPS_MALLOC */ +#endif /* ZSTD_DEPS_NEED_MALLOC */ + +/* + * Provides 64-bit math support. + * Need: + * U64 ZSTD_div64(U64 dividend, U32 divisor) + */ +#ifdef ZSTD_DEPS_NEED_MATH64 +#ifndef ZSTD_DEPS_MATH64 +#define ZSTD_DEPS_MATH64 + +#include + +static uint64_t ZSTD_div64(uint64_t dividend, uint32_t divisor) { + return div_u64(dividend, divisor); +} + +#endif /* ZSTD_DEPS_MATH64 */ +#endif /* ZSTD_DEPS_NEED_MATH64 */ + +/* + * This is only requested when DEBUGLEVEL >= 1, meaning + * it is disabled in production. + * Need: + * assert() + */ +#ifdef ZSTD_DEPS_NEED_ASSERT +#ifndef ZSTD_DEPS_ASSERT +#define ZSTD_DEPS_ASSERT + +#include + +#define assert(x) WARN_ON(!(x)) + +#endif /* ZSTD_DEPS_ASSERT */ +#endif /* ZSTD_DEPS_NEED_ASSERT */ + +/* + * This is only requested when DEBUGLEVEL >= 2, meaning + * it is disabled in production. + * Need: + * ZSTD_DEBUG_PRINT() + */ +#ifdef ZSTD_DEPS_NEED_IO +#ifndef ZSTD_DEPS_IO +#define ZSTD_DEPS_IO + +#include + +#define ZSTD_DEBUG_PRINT(...) pr_debug(__VA_ARGS__) + +#endif /* ZSTD_DEPS_IO */ +#endif /* ZSTD_DEPS_NEED_IO */ + +/* + * Only requested when MSAN is enabled. + * Need: + * intptr_t + */ +#ifdef ZSTD_DEPS_NEED_STDINT +#ifndef ZSTD_DEPS_STDINT +#define ZSTD_DEPS_STDINT + +/* intptr_t already provided by ZSTD_DEPS_COMMON */ + +#endif /* ZSTD_DEPS_STDINT */ +#endif /* ZSTD_DEPS_NEED_STDINT */ diff --git a/cpp/third_party/zstd-1.5.7/contrib/match_finders/README.md b/cpp/third_party/zstd-1.5.7/contrib/match_finders/README.md new file mode 100644 index 0000000000..54055c3708 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/match_finders/README.md @@ -0,0 +1,42 @@ +## Edit Distance Match Finder + +``` +/* This match finder leverages techniques used in file comparison algorithms + * to find matches between a dictionary and a source file. + * + * The original motivation for studying this approach was to try and optimize + * Zstandard for the use case of patching: the most common scenario being + * updating an existing software package with the next version. When patching, + * the difference between the old version of the package and the new version + * is generally tiny (most of the new file will be identical to + * the old one). In more technical terms, the edit distance (the minimal number + * of changes required to take one sequence of bytes to another) between the + * files would be small relative to the size of the file. + * + * Various 'diffing' algorithms utilize this notion of edit distance and + * the corresponding concept of a minimal edit script between two + * sequences to identify the regions within two files where they differ. + * The core algorithm used in this match finder is described in: + * + * "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers, + * Algorithmica Vol. 1, 1986, pp. 251-266, + * . + * + * Additional algorithmic heuristics for speed improvement have also been included. + * These we inspired from implementations of various regular and binary diffing + * algorithms such as GNU diff, bsdiff, and Xdelta. + * + * Note: after some experimentation, this approach proved to not provide enough + * utility to justify the additional CPU used in finding matches. The one area + * where this approach consistently outperforms Zstandard even on level 19 is + * when compressing small files (<10 KB) using an equally small dictionary that + * is very similar to the source file. For the use case that this was intended, + * (large similar files) this approach by itself took 5-10X longer than zstd-19 and + * generally resulted in 2-3X larger files. The core advantage that zstd-19 has + * over this approach for match finding is the overlapping matches. This approach + * cannot find any. + * + * I'm leaving this in the contrib section in case this ever becomes interesting + * to explore again. + * */ +``` diff --git a/cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.c b/cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.c new file mode 100644 index 0000000000..d685cdd9e2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.c @@ -0,0 +1,558 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/*-************************************* +* Dependencies +***************************************/ + +/* Currently relies on qsort when combining contiguous matches. This can probably + * be avoided but would require changes to the algorithm. The qsort is far from + * the bottleneck in this algorithm even for medium sized files so it's probably + * not worth trying to address */ +#include +#include + +#include "zstd_edist.h" +#include "mem.h" + +/*-************************************* +* Constants +***************************************/ + +/* Just a sential for the entries of the diagonal matrix */ +#define ZSTD_EDIST_DIAG_MAX (S32)(1 << 30) + +/* How large should a snake be to be considered a 'big' snake. + * For an explanation of what a 'snake' is with respect to the + * edit distance matrix, see the linked paper in zstd_edist.h */ +#define ZSTD_EDIST_SNAKE_THRESH 20 + +/* After how many iterations should we start to use the heuristic + * based on 'big' snakes */ +#define ZSTD_EDIST_SNAKE_ITER_THRESH 200 + +/* After how many iterations should be just give up and take + * the best available edit script for this round */ +#define ZSTD_EDIST_EXPENSIVE_THRESH 1024 + +/*-************************************* +* Structures +***************************************/ + +typedef struct { + U32 dictIdx; + U32 srcIdx; + U32 matchLength; +} ZSTD_eDist_match; + +typedef struct { + const BYTE* dict; + const BYTE* src; + size_t dictSize; + size_t srcSize; + S32* forwardDiag; /* Entries of the forward diagonal stored here */ + S32* backwardDiag; /* Entries of the backward diagonal stored here. + * Note: this buffer and the 'forwardDiag' buffer + * are contiguous. See the ZSTD_eDist_genSequences */ + ZSTD_eDist_match* matches; /* Accumulate matches of length 1 in this buffer. + * In a subsequence post-processing step, we combine + * contiguous matches. */ + U32 nbMatches; +} ZSTD_eDist_state; + +typedef struct { + S32 dictMid; /* The mid diagonal for the dictionary */ + S32 srcMid; /* The mid diagonal for the source */ + int lowUseHeuristics; /* Should we use heuristics for the low part */ + int highUseHeuristics; /* Should we use heuristics for the high part */ +} ZSTD_eDist_partition; + +/*-************************************* +* Internal +***************************************/ + +static void ZSTD_eDist_diag(ZSTD_eDist_state* state, + ZSTD_eDist_partition* partition, + S32 dictLow, S32 dictHigh, S32 srcLow, + S32 srcHigh, int useHeuristics) +{ + S32* const forwardDiag = state->forwardDiag; + S32* const backwardDiag = state->backwardDiag; + const BYTE* const dict = state->dict; + const BYTE* const src = state->src; + + S32 const diagMin = dictLow - srcHigh; + S32 const diagMax = dictHigh - srcLow; + S32 const forwardMid = dictLow - srcLow; + S32 const backwardMid = dictHigh - srcHigh; + + S32 forwardMin = forwardMid; + S32 forwardMax = forwardMid; + S32 backwardMin = backwardMid; + S32 backwardMax = backwardMid; + int odd = (forwardMid - backwardMid) & 1; + U32 iterations; + + forwardDiag[forwardMid] = dictLow; + backwardDiag[backwardMid] = dictHigh; + + /* Main loop for updating diag entries. Unless useHeuristics is + * set to false, this loop will run until it finds the minimal + * edit script */ + for (iterations = 1;;iterations++) { + S32 diag; + int bigSnake = 0; + + if (forwardMin > diagMin) { + forwardMin--; + forwardDiag[forwardMin - 1] = -1; + } else { + forwardMin++; + } + + if (forwardMax < diagMax) { + forwardMax++; + forwardDiag[forwardMax + 1] = -1; + } else { + forwardMax--; + } + + for (diag = forwardMax; diag >= forwardMin; diag -= 2) { + S32 dictIdx; + S32 srcIdx; + S32 low = forwardDiag[diag - 1]; + S32 high = forwardDiag[diag + 1]; + S32 dictIdx0 = low < high ? high : low + 1; + + for (dictIdx = dictIdx0, srcIdx = dictIdx0 - diag; + dictIdx < dictHigh && srcIdx < srcHigh && dict[dictIdx] == src[srcIdx]; + dictIdx++, srcIdx++) continue; + + if (dictIdx - dictIdx0 > ZSTD_EDIST_SNAKE_THRESH) + bigSnake = 1; + + forwardDiag[diag] = dictIdx; + + if (odd && backwardMin <= diag && diag <= backwardMax && backwardDiag[diag] <= dictIdx) { + partition->dictMid = dictIdx; + partition->srcMid = srcIdx; + partition->lowUseHeuristics = 0; + partition->highUseHeuristics = 0; + return; + } + } + + if (backwardMin > diagMin) { + backwardMin--; + backwardDiag[backwardMin - 1] = ZSTD_EDIST_DIAG_MAX; + } else { + backwardMin++; + } + + if (backwardMax < diagMax) { + backwardMax++; + backwardDiag[backwardMax + 1] = ZSTD_EDIST_DIAG_MAX; + } else { + backwardMax--; + } + + + for (diag = backwardMax; diag >= backwardMin; diag -= 2) { + S32 dictIdx; + S32 srcIdx; + S32 low = backwardDiag[diag - 1]; + S32 high = backwardDiag[diag + 1]; + S32 dictIdx0 = low < high ? low : high - 1; + + for (dictIdx = dictIdx0, srcIdx = dictIdx0 - diag; + dictLow < dictIdx && srcLow < srcIdx && dict[dictIdx - 1] == src[srcIdx - 1]; + dictIdx--, srcIdx--) continue; + + if (dictIdx0 - dictIdx > ZSTD_EDIST_SNAKE_THRESH) + bigSnake = 1; + + backwardDiag[diag] = dictIdx; + + if (!odd && forwardMin <= diag && diag <= forwardMax && dictIdx <= forwardDiag[diag]) { + partition->dictMid = dictIdx; + partition->srcMid = srcIdx; + partition->lowUseHeuristics = 0; + partition->highUseHeuristics = 0; + return; + } + } + + if (!useHeuristics) + continue; + + /* Everything under this point is a heuristic. Using these will + * substantially speed up the match finding. In some cases, taking + * the total match finding time from several minutes to seconds. + * Of course, the caveat is that the edit script found may no longer + * be optimal */ + + /* Big snake heuristic */ + if (iterations > ZSTD_EDIST_SNAKE_ITER_THRESH && bigSnake) { + { + S32 best = 0; + + for (diag = forwardMax; diag >= forwardMin; diag -= 2) { + S32 diagDiag = diag - forwardMid; + S32 dictIdx = forwardDiag[diag]; + S32 srcIdx = dictIdx - diag; + S32 v = (dictIdx - dictLow) * 2 - diagDiag; + + if (v > 12 * (iterations + (diagDiag < 0 ? -diagDiag : diagDiag))) { + if (v > best + && dictLow + ZSTD_EDIST_SNAKE_THRESH <= dictIdx && dictIdx <= dictHigh + && srcLow + ZSTD_EDIST_SNAKE_THRESH <= srcIdx && srcIdx <= srcHigh) { + S32 k; + for (k = 1; dict[dictIdx - k] == src[srcIdx - k]; k++) { + if (k == ZSTD_EDIST_SNAKE_THRESH) { + best = v; + partition->dictMid = dictIdx; + partition->srcMid = srcIdx; + break; + } + } + } + } + } + + if (best > 0) { + partition->lowUseHeuristics = 0; + partition->highUseHeuristics = 1; + return; + } + } + + { + S32 best = 0; + + for (diag = backwardMax; diag >= backwardMin; diag -= 2) { + S32 diagDiag = diag - backwardMid; + S32 dictIdx = backwardDiag[diag]; + S32 srcIdx = dictIdx - diag; + S32 v = (dictHigh - dictIdx) * 2 + diagDiag; + + if (v > 12 * (iterations + (diagDiag < 0 ? -diagDiag : diagDiag))) { + if (v > best + && dictLow < dictIdx && dictIdx <= dictHigh - ZSTD_EDIST_SNAKE_THRESH + && srcLow < srcIdx && srcIdx <= srcHigh - ZSTD_EDIST_SNAKE_THRESH) { + int k; + for (k = 0; dict[dictIdx + k] == src[srcIdx + k]; k++) { + if (k == ZSTD_EDIST_SNAKE_THRESH - 1) { + best = v; + partition->dictMid = dictIdx; + partition->srcMid = srcIdx; + break; + } + } + } + } + } + + if (best > 0) { + partition->lowUseHeuristics = 1; + partition->highUseHeuristics = 0; + return; + } + } + } + + /* More general 'too expensive' heuristic */ + if (iterations >= ZSTD_EDIST_EXPENSIVE_THRESH) { + S32 forwardDictSrcBest; + S32 forwardDictBest = 0; + S32 backwardDictSrcBest; + S32 backwardDictBest = 0; + + forwardDictSrcBest = -1; + for (diag = forwardMax; diag >= forwardMin; diag -= 2) { + S32 dictIdx = MIN(forwardDiag[diag], dictHigh); + S32 srcIdx = dictIdx - diag; + + if (srcHigh < srcIdx) { + dictIdx = srcHigh + diag; + srcIdx = srcHigh; + } + + if (forwardDictSrcBest < dictIdx + srcIdx) { + forwardDictSrcBest = dictIdx + srcIdx; + forwardDictBest = dictIdx; + } + } + + backwardDictSrcBest = ZSTD_EDIST_DIAG_MAX; + for (diag = backwardMax; diag >= backwardMin; diag -= 2) { + S32 dictIdx = MAX(dictLow, backwardDiag[diag]); + S32 srcIdx = dictIdx - diag; + + if (srcIdx < srcLow) { + dictIdx = srcLow + diag; + srcIdx = srcLow; + } + + if (dictIdx + srcIdx < backwardDictSrcBest) { + backwardDictSrcBest = dictIdx + srcIdx; + backwardDictBest = dictIdx; + } + } + + if ((dictHigh + srcHigh) - backwardDictSrcBest < forwardDictSrcBest - (dictLow + srcLow)) { + partition->dictMid = forwardDictBest; + partition->srcMid = forwardDictSrcBest - forwardDictBest; + partition->lowUseHeuristics = 0; + partition->highUseHeuristics = 1; + } else { + partition->dictMid = backwardDictBest; + partition->srcMid = backwardDictSrcBest - backwardDictBest; + partition->lowUseHeuristics = 1; + partition->highUseHeuristics = 0; + } + return; + } + } +} + +static void ZSTD_eDist_insertMatch(ZSTD_eDist_state* state, + S32 const dictIdx, S32 const srcIdx) +{ + state->matches[state->nbMatches].dictIdx = dictIdx; + state->matches[state->nbMatches].srcIdx = srcIdx; + state->matches[state->nbMatches].matchLength = 1; + state->nbMatches++; +} + +static int ZSTD_eDist_compare(ZSTD_eDist_state* state, + S32 dictLow, S32 dictHigh, S32 srcLow, + S32 srcHigh, int useHeuristics) +{ + const BYTE* const dict = state->dict; + const BYTE* const src = state->src; + + /* Found matches while traversing from the low end */ + while (dictLow < dictHigh && srcLow < srcHigh && dict[dictLow] == src[srcLow]) { + ZSTD_eDist_insertMatch(state, dictLow, srcLow); + dictLow++; + srcLow++; + } + + /* Found matches while traversing from the high end */ + while (dictLow < dictHigh && srcLow < srcHigh && dict[dictHigh - 1] == src[srcHigh - 1]) { + ZSTD_eDist_insertMatch(state, dictHigh - 1, srcHigh - 1); + dictHigh--; + srcHigh--; + } + + /* If the low and high end end up touching. If we wanted to make + * note of the differences like most diffing algorithms do, we would + * do so here. In our case, we're only concerned with matches + * Note: if you wanted to find the edit distance of the algorithm, + * you could just accumulate the cost for an insertion/deletion + * below. */ + if (dictLow == dictHigh) { + while (srcLow < srcHigh) { + /* Reaching this point means inserting src[srcLow] into + * the current position of dict */ + srcLow++; + } + } else if (srcLow == srcHigh) { + while (dictLow < dictHigh) { + /* Reaching this point means deleting dict[dictLow] from + * the current position of dict */ + dictLow++; + } + } else { + ZSTD_eDist_partition partition; + partition.dictMid = 0; + partition.srcMid = 0; + ZSTD_eDist_diag(state, &partition, dictLow, dictHigh, + srcLow, srcHigh, useHeuristics); + if (ZSTD_eDist_compare(state, dictLow, partition.dictMid, + srcLow, partition.srcMid, partition.lowUseHeuristics)) + return 1; + if (ZSTD_eDist_compare(state, partition.dictMid, dictHigh, + partition.srcMid, srcHigh, partition.highUseHeuristics)) + return 1; + } + + return 0; +} + +static int ZSTD_eDist_matchComp(const void* p, const void* q) +{ + S32 const l = ((ZSTD_eDist_match*)p)->srcIdx; + S32 const r = ((ZSTD_eDist_match*)q)->srcIdx; + return (l - r); +} + +/* The matches from the approach above will all be of the form + * (dictIdx, srcIdx, 1). This method combines contiguous matches + * of length MINMATCH or greater. Matches less than MINMATCH + * are discarded */ +static void ZSTD_eDist_combineMatches(ZSTD_eDist_state* state) +{ + /* Create a new buffer to put the combined matches into + * and memcpy to state->matches after */ + ZSTD_eDist_match* combinedMatches = + ZSTD_malloc(state->nbMatches * sizeof(ZSTD_eDist_match), + ZSTD_defaultCMem); + + U32 nbCombinedMatches = 1; + size_t i; + + /* Make sure that the srcIdx and dictIdx are in sorted order. + * The combination step won't work otherwise */ + qsort(state->matches, state->nbMatches, sizeof(ZSTD_eDist_match), ZSTD_eDist_matchComp); + + memcpy(combinedMatches, state->matches, sizeof(ZSTD_eDist_match)); + for (i = 1; i < state->nbMatches; i++) { + ZSTD_eDist_match const match = state->matches[i]; + ZSTD_eDist_match const combinedMatch = + combinedMatches[nbCombinedMatches - 1]; + if (combinedMatch.srcIdx + combinedMatch.matchLength == match.srcIdx && + combinedMatch.dictIdx + combinedMatch.matchLength == match.dictIdx) { + combinedMatches[nbCombinedMatches - 1].matchLength++; + } else { + /* Discard matches that are less than MINMATCH */ + if (combinedMatches[nbCombinedMatches - 1].matchLength < MINMATCH) { + nbCombinedMatches--; + } + + memcpy(combinedMatches + nbCombinedMatches, + state->matches + i, sizeof(ZSTD_eDist_match)); + nbCombinedMatches++; + } + } + memcpy(state->matches, combinedMatches, nbCombinedMatches * sizeof(ZSTD_eDist_match)); + state->nbMatches = nbCombinedMatches; + ZSTD_free(combinedMatches, ZSTD_defaultCMem); +} + +static size_t ZSTD_eDist_convertMatchesToSequences(ZSTD_Sequence* sequences, + ZSTD_eDist_state* state) +{ + const ZSTD_eDist_match* matches = state->matches; + size_t const nbMatches = state->nbMatches; + size_t const dictSize = state->dictSize; + size_t nbSequences = 0; + size_t i; + for (i = 0; i < nbMatches; i++) { + ZSTD_eDist_match const match = matches[i]; + U32 const litLength = !i ? match.srcIdx : + match.srcIdx - (matches[i - 1].srcIdx + matches[i - 1].matchLength); + U32 const offset = (match.srcIdx + dictSize) - match.dictIdx; + U32 const matchLength = match.matchLength; + sequences[nbSequences].offset = offset; + sequences[nbSequences].litLength = litLength; + sequences[nbSequences].matchLength = matchLength; + nbSequences++; + } + return nbSequences; +} + +/*-************************************* +* Internal utils +***************************************/ + +static size_t ZSTD_eDist_hamingDist(const BYTE* const a, + const BYTE* const b, size_t n) +{ + size_t i; + size_t dist = 0; + for (i = 0; i < n; i++) + dist += a[i] != b[i]; + return dist; +} + +/* This is a pretty naive recursive implementation that should only + * be used for quick tests obviously. Don't try and run this on a + * GB file or something. There are faster implementations. Use those + * if you need to run it for large files. */ +static size_t ZSTD_eDist_levenshteinDist(const BYTE* const s, + size_t const sn, const BYTE* const t, + size_t const tn) +{ + size_t a, b, c; + + if (!sn) + return tn; + if (!tn) + return sn; + + if (s[sn - 1] == t[tn - 1]) + return ZSTD_eDist_levenshteinDist( + s, sn - 1, t, tn - 1); + + a = ZSTD_eDist_levenshteinDist(s, sn - 1, t, tn - 1); + b = ZSTD_eDist_levenshteinDist(s, sn, t, tn - 1); + c = ZSTD_eDist_levenshteinDist(s, sn - 1, t, tn); + + if (a > b) + a = b; + if (a > c) + a = c; + + return a + 1; +} + +static void ZSTD_eDist_validateMatches(ZSTD_eDist_match* matches, + size_t const nbMatches, const BYTE* const dict, + size_t const dictSize, const BYTE* const src, + size_t const srcSize) +{ + size_t i; + for (i = 0; i < nbMatches; i++) { + ZSTD_eDist_match match = matches[i]; + U32 const dictIdx = match.dictIdx; + U32 const srcIdx = match.srcIdx; + U32 const matchLength = match.matchLength; + + assert(dictIdx + matchLength < dictSize); + assert(srcIdx + matchLength < srcSize); + assert(!memcmp(dict + dictIdx, src + srcIdx, matchLength)); + } +} + +/*-************************************* +* API +***************************************/ + +size_t ZSTD_eDist_genSequences(ZSTD_Sequence* sequences, + const void* dict, size_t dictSize, + const void* src, size_t srcSize, + int useHeuristics) +{ + size_t const nbDiags = dictSize + srcSize + 3; + S32* buffer = ZSTD_malloc(nbDiags * 2 * sizeof(S32), ZSTD_defaultCMem); + ZSTD_eDist_state state; + size_t nbSequences = 0; + + state.dict = (const BYTE*)dict; + state.src = (const BYTE*)src; + state.dictSize = dictSize; + state.srcSize = srcSize; + state.forwardDiag = buffer; + state.backwardDiag = buffer + nbDiags; + state.forwardDiag += srcSize + 1; + state.backwardDiag += srcSize + 1; + state.matches = ZSTD_malloc(srcSize * sizeof(ZSTD_eDist_match), ZSTD_defaultCMem); + state.nbMatches = 0; + + ZSTD_eDist_compare(&state, 0, dictSize, 0, srcSize, 1); + ZSTD_eDist_combineMatches(&state); + nbSequences = ZSTD_eDist_convertMatchesToSequences(sequences, &state); + + ZSTD_free(buffer, ZSTD_defaultCMem); + ZSTD_free(state.matches, ZSTD_defaultCMem); + + return nbSequences; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.h b/cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.h new file mode 100644 index 0000000000..c739e2abc5 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/match_finders/zstd_edist.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* This match finder leverages techniques used in file comparison algorithms + * to find matches between a dictionary and a source file. + * + * The original motivation for studying this approach was to try and optimize + * Zstandard for the use case of patching: the most common scenario being + * updating an existing software package with the next version. When patching, + * the difference between the old version of the package and the new version + * is generally tiny (most of the new file will be identical to + * the old one). In more technical terms, the edit distance (the minimal number + * of changes required to take one sequence of bytes to another) between the + * files would be small relative to the size of the file. + * + * Various 'diffing' algorithms utilize this notion of edit distance and + * the corresponding concept of a minimal edit script between two + * sequences to identify the regions within two files where they differ. + * The core algorithm used in this match finder is described in: + * + * "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers, + * Algorithmica Vol. 1, 1986, pp. 251-266, + * . + * + * Additional algorithmic heuristics for speed improvement have also been included. + * These we inspired from implementations of various regular and binary diffing + * algorithms such as GNU diff, bsdiff, and Xdelta. + * + * Note: after some experimentation, this approach proved to not provide enough + * utility to justify the additional CPU used in finding matches. The one area + * where this approach consistently outperforms Zstandard even on level 19 is + * when compressing small files (<10 KB) using an equally small dictionary that + * is very similar to the source file. For the use case that this was intended, + * (large similar files) this approach by itself took 5-10X longer than zstd-19 and + * generally resulted in 2-3X larger files. The core advantage that zstd-19 has + * over this approach for match finding is the overlapping matches. This approach + * cannot find any. + * + * I'm leaving this in the contrib section in case this ever becomes interesting + * to explore again. + * */ + +#ifndef ZSTD_EDIST_H +#define ZSTD_EDIST_H + +/*-************************************* +* Dependencies +***************************************/ + +#include +#include "zstd_internal.h" /* ZSTD_Sequence */ + +/*! ZSTD_eDist_genSequences() : + * Will populate the provided ZSTD_Sequence buffer with sequences + * based on the optimal or near-optimal (depending on 'useHeuristics') + * edit script between 'dict' and 'src.' + * @return : the number of sequences found */ +size_t ZSTD_eDist_genSequences(ZSTD_Sequence* sequences, + const void* dict, size_t dictSize, + const void* src, size_t srcSize, + int useHeuristics); + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/premake/premake4.lua b/cpp/third_party/zstd-1.5.7/contrib/premake/premake4.lua new file mode 100644 index 0000000000..6675e2e481 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/premake/premake4.lua @@ -0,0 +1,6 @@ +-- Include zstd.lua in your GENie or premake4 file, which exposes a project_zstd function +dofile('zstd.lua') + +solution 'example' + configurations { 'Debug', 'Release' } + project_zstd('../../lib/') diff --git a/cpp/third_party/zstd-1.5.7/contrib/premake/zstd.lua b/cpp/third_party/zstd-1.5.7/contrib/premake/zstd.lua new file mode 100644 index 0000000000..df1ace3ee8 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/premake/zstd.lua @@ -0,0 +1,80 @@ +-- This GENie/premake file copies the behavior of the Makefile in the lib folder. +-- Basic usage: project_zstd(ZSTD_DIR) + +function project_zstd(dir, compression, decompression, deprecated, dictbuilder, legacy) + if compression == nil then compression = true end + if decompression == nil then decompression = true end + if deprecated == nil then deprecated = false end + if dictbuilder == nil then dictbuilder = false end + + if legacy == nil then legacy = 0 end + + if not compression then + dictbuilder = false + deprecated = false + end + + if not decompression then + legacy = 0 + deprecated = false + end + + project 'zstd' + kind 'StaticLib' + language 'C' + + files { + dir .. 'zstd.h', + dir .. 'common/**.c', + dir .. 'common/**.h' + } + + if compression then + files { + dir .. 'compress/**.c', + dir .. 'compress/**.h' + } + end + + if decompression then + files { + dir .. 'decompress/**.c', + dir .. 'decompress/**.h' + } + end + + if dictbuilder then + files { + dir .. 'dictBuilder/**.c', + dir .. 'dictBuilder/**.h' + } + end + + if deprecated then + files { + dir .. 'deprecated/**.c', + dir .. 'deprecated/**.h' + } + end + + if legacy ~= 0 then + if legacy >= 8 then + files { + dir .. 'legacy/zstd_v0' .. (legacy - 7) .. '.*' + } + end + includedirs { + dir .. 'legacy' + } + end + + includedirs { + dir, + dir .. 'common' + } + + defines { + 'XXH_NAMESPACE=ZSTD_', + 'ZSTD_LEGACY_SUPPORT=' .. legacy + } +end diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/pzstd/.gitignore new file mode 100644 index 0000000000..84e68fb07d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/.gitignore @@ -0,0 +1,2 @@ +# compilation result +pzstd diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/BUCK b/cpp/third_party/zstd-1.5.7/contrib/pzstd/BUCK new file mode 100644 index 0000000000..d04eeedd8a --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/BUCK @@ -0,0 +1,72 @@ +cxx_library( + name='libpzstd', + visibility=['PUBLIC'], + header_namespace='', + exported_headers=[ + 'ErrorHolder.h', + 'Logging.h', + 'Pzstd.h', + ], + headers=[ + 'SkippableFrame.h', + ], + srcs=[ + 'Pzstd.cpp', + 'SkippableFrame.cpp', + ], + deps=[ + ':options', + '//contrib/pzstd/utils:utils', + '//lib:mem', + '//lib:zstd', + ], +) + +cxx_library( + name='options', + visibility=['PUBLIC'], + header_namespace='', + exported_headers=['Options.h'], + srcs=['Options.cpp'], + deps=[ + '//contrib/pzstd/utils:scope_guard', + '//lib:zstd', + '//programs:util', + ], +) + +cxx_binary( + name='pzstd', + visibility=['PUBLIC'], + srcs=['main.cpp'], + deps=[ + ':libpzstd', + ':options', + ], +) + +# Must run "make googletest" first +cxx_library( + name='gtest', + srcs=glob([ + 'googletest/googletest/src/gtest-all.cc', + 'googletest/googlemock/src/gmock-all.cc', + 'googletest/googlemock/src/gmock_main.cc', + ]), + header_namespace='', + exported_headers=subdir_glob([ + ('googletest/googletest/include', '**/*.h'), + ('googletest/googlemock/include', '**/*.h'), + ]), + headers=subdir_glob([ + ('googletest/googletest', 'src/*.cc'), + ('googletest/googletest', 'src/*.h'), + ('googletest/googlemock', 'src/*.cc'), + ('googletest/googlemock', 'src/*.h'), + ]), + platform_linker_flags=[ + ('android', []), + ('', ['-lpthread']), + ], + visibility=['PUBLIC'], +) diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/ErrorHolder.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/ErrorHolder.h new file mode 100644 index 0000000000..2c2797edea --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/ErrorHolder.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include +#include +#include +#include + +namespace pzstd { + +// Coordinates graceful shutdown of the pzstd pipeline +class ErrorHolder { + std::atomic error_; + std::string message_; + + public: + ErrorHolder() : error_(false) {} + + bool hasError() noexcept { + return error_.load(); + } + + void setError(std::string message) noexcept { + // Given multiple possibly concurrent calls, exactly one will ever succeed. + bool expected = false; + if (error_.compare_exchange_strong(expected, true)) { + message_ = std::move(message); + } + } + + bool check(bool predicate, std::string message) noexcept { + if (!predicate) { + setError(std::move(message)); + } + return !hasError(); + } + + std::string getError() noexcept { + error_.store(false); + return std::move(message_); + } + + ~ErrorHolder() { + assert(!hasError()); + } +}; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/Logging.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Logging.h new file mode 100644 index 0000000000..84a08d2008 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Logging.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include +#include + +namespace pzstd { + +constexpr int kLogError = 1; +constexpr int kLogInfo = 2; +constexpr int kLogDebug = 3; +constexpr int kLogVerbose = 4; + +class Logger { + std::mutex mutex_; + FILE* out_; + const int level_; + + using Clock = std::chrono::system_clock; + Clock::time_point lastUpdate_; + std::chrono::milliseconds refreshRate_; + + public: + explicit Logger(int level, FILE* out = stderr) + : out_(out), level_(level), lastUpdate_(Clock::now()), + refreshRate_(150) {} + + + bool logsAt(int level) { + return level <= level_; + } + + template + void operator()(int level, const char *fmt, Args... args) { + if (level > level_) { + return; + } + std::lock_guard lock(mutex_); + std::fprintf(out_, fmt, args...); + } + + template + void update(int level, const char *fmt, Args... args) { + if (level > level_) { + return; + } + std::lock_guard lock(mutex_); + auto now = Clock::now(); + if (now - lastUpdate_ > refreshRate_) { + lastUpdate_ = now; + std::fprintf(out_, "\r"); + std::fprintf(out_, fmt, args...); + } + } + + void clear(int level) { + if (level > level_) { + return; + } + std::lock_guard lock(mutex_); + std::fprintf(out_, "\r%79s\r", ""); + } +}; + +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/Makefile b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Makefile new file mode 100644 index 0000000000..e4b3e8a21f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Makefile @@ -0,0 +1,265 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +# Standard variables for installation +DESTDIR ?= +PREFIX ?= /usr/local +BINDIR := $(PREFIX)/bin + +ZSTDDIR = ../../lib +PROGDIR = ../../programs + +# External program to use to run tests, e.g. qemu or valgrind +TESTPROG ?= +# Flags to pass to the tests +TESTFLAGS ?= + +# We use gcc/clang to generate the header dependencies of files +DEPFLAGS = -MMD -MP -MF $*.Td +POSTCOMPILE = mv -f $*.Td $*.d + +# CFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS are for the users to override +CFLAGS ?= -O3 -Wall -Wextra +CXXFLAGS ?= -O3 -Wall -Wextra -pedantic +CPPFLAGS ?= +LDFLAGS ?= + +# PZstd uses legacy APIs +CFLAGS += -Wno-deprecated-declarations + +# Include flags +PZSTD_INC = -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(PROGDIR) -I. +GTEST_INC = -isystem googletest/googletest/include + +# Set the minimum required by gtest +PZSTD_CXX_STD := -std=c++14 + +PZSTD_CPPFLAGS = $(PZSTD_INC) +PZSTD_CCXXFLAGS = +PZSTD_CFLAGS = $(PZSTD_CCXXFLAGS) +PZSTD_CXXFLAGS = $(PZSTD_CCXXFLAGS) $(PZSTD_CXX_STD) +PZSTD_LDFLAGS = +EXTRA_FLAGS = +ALL_CFLAGS = $(EXTRA_FLAGS) $(CPPFLAGS) $(PZSTD_CPPFLAGS) $(CFLAGS) $(PZSTD_CFLAGS) +ALL_CXXFLAGS = $(EXTRA_FLAGS) $(CPPFLAGS) $(PZSTD_CPPFLAGS) $(CXXFLAGS) $(PZSTD_CXXFLAGS) +ALL_LDFLAGS = $(EXTRA_FLAGS) $(CXXFLAGS) $(LDFLAGS) $(PZSTD_LDFLAGS) + + +# gtest libraries need to go before "-lpthread" because they depend on it. +GTEST_LIB = -L googletest/build/googlemock/gtest +LIBS = + +# Compilation commands +LD_COMMAND = $(CXX) $^ $(ALL_LDFLAGS) $(LIBS) -pthread -o $@ +CC_COMMAND = $(CC) $(DEPFLAGS) $(ALL_CFLAGS) -c $< -o $@ +CXX_COMMAND = $(CXX) $(DEPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@ + +# List all the pzstd source files so we can determine their dependencies +PZSTD_SRCS := $(wildcard *.cpp) +PZSTD_TESTS := $(wildcard test/*.cpp) +UTILS_TESTS := $(wildcard utils/test/*.cpp) +ALL_SRCS := $(PZSTD_SRCS) $(PZSTD_TESTS) $(UTILS_TESTS) + + +# Define *.exe as extension for Windows systems +ifneq (,$(filter Windows%,$(OS))) +EXT =.exe +else +EXT = +endif + +# Standard targets +.PHONY: default +default: all + +.PHONY: test-pzstd +test-pzstd: TESTFLAGS=--gtest_filter=-*ExtremelyLarge* +test-pzstd: clean googletest pzstd tests check + +.PHONY: test-pzstd32 +test-pzstd32: clean googletest32 all32 check + +.PHONY: test-pzstd-tsan +test-pzstd-tsan: LDFLAGS=-fuse-ld=gold +test-pzstd-tsan: TESTFLAGS=--gtest_filter=-*ExtremelyLarge* +test-pzstd-tsan: clean googletest tsan check + +.PHONY: test-pzstd-asan +test-pzstd-asan: LDFLAGS=-fuse-ld=gold +test-pzstd-asan: TESTFLAGS=--gtest_filter=-*ExtremelyLarge* +test-pzstd-asan: clean asan check + +.PHONY: check +check: + $(TESTPROG) ./utils/test/BufferTest$(EXT) $(TESTFLAGS) + $(TESTPROG) ./utils/test/RangeTest$(EXT) $(TESTFLAGS) + $(TESTPROG) ./utils/test/ResourcePoolTest$(EXT) $(TESTFLAGS) + $(TESTPROG) ./utils/test/ScopeGuardTest$(EXT) $(TESTFLAGS) + $(TESTPROG) ./utils/test/ThreadPoolTest$(EXT) $(TESTFLAGS) + $(TESTPROG) ./utils/test/WorkQueueTest$(EXT) $(TESTFLAGS) + $(TESTPROG) ./test/OptionsTest$(EXT) $(TESTFLAGS) + $(TESTPROG) ./test/PzstdTest$(EXT) $(TESTFLAGS) + +.PHONY: install +install: PZSTD_CPPFLAGS += -DNDEBUG +install: pzstd$(EXT) + install -d -m 755 $(DESTDIR)$(BINDIR)/ + install -m 755 pzstd$(EXT) $(DESTDIR)$(BINDIR)/pzstd$(EXT) + +.PHONY: uninstall +uninstall: + $(RM) $(DESTDIR)$(BINDIR)/pzstd$(EXT) + +# Targets for many different builds +.PHONY: all +all: PZSTD_CPPFLAGS += -DNDEBUG +all: pzstd$(EXT) + +.PHONY: debug +debug: EXTRA_FLAGS += -g +debug: pzstd$(EXT) tests roundtrip + +.PHONY: tsan +tsan: PZSTD_CCXXFLAGS += -fsanitize=thread -fPIC +tsan: PZSTD_LDFLAGS += -fsanitize=thread +tsan: debug + +.PHONY: asan +asan: EXTRA_FLAGS += -fsanitize=address +asan: debug + +.PHONY: ubsan +ubsan: EXTRA_FLAGS += -fsanitize=undefined +ubsan: debug + +.PHONY: all32 +all32: EXTRA_FLAGS += -m32 +all32: all tests roundtrip + +.PHONY: debug32 +debug32: EXTRA_FLAGS += -m32 +debug32: debug + +.PHONY: asan32 +asan32: EXTRA_FLAGS += -m32 +asan32: asan + +.PHONY: tsan32 +tsan32: EXTRA_FLAGS += -m32 +tsan32: tsan + +.PHONY: ubsan32 +ubsan32: EXTRA_FLAGS += -m32 +ubsan32: ubsan + +# Run long round trip tests +.PHONY: roundtripcheck +roundtripcheck: roundtrip check + $(TESTPROG) ./test/RoundTripTest$(EXT) $(TESTFLAGS) + +# Build the main binary +pzstd$(EXT): main.o $(PROGDIR)/util.o Options.o Pzstd.o SkippableFrame.o $(ZSTDDIR)/libzstd.a + $(LD_COMMAND) + +# Target that depends on all the tests +.PHONY: tests +tests: EXTRA_FLAGS += -Wno-deprecated-declarations +tests: $(patsubst %,%$(EXT),$(basename $(PZSTD_TESTS) $(UTILS_TESTS))) + +# Build the round trip tests +.PHONY: roundtrip +roundtrip: EXTRA_FLAGS += -Wno-deprecated-declarations +roundtrip: test/RoundTripTest$(EXT) + +# Use the static library that zstd builds for simplicity and +# so we get the compiler options correct +.PHONY: $(ZSTDDIR)/libzstd.a +$(ZSTDDIR)/libzstd.a: + CFLAGS="$(ALL_CFLAGS)" LDFLAGS="$(ALL_LDFLAGS)" $(MAKE) -C $(ZSTDDIR) libzstd.a + +# Rules to build the tests +test/RoundTripTest$(EXT): test/RoundTripTest.o $(PROGDIR)/datagen.o \ + $(PROGDIR)/util.o Options.o \ + Pzstd.o SkippableFrame.o $(ZSTDDIR)/libzstd.a + $(LD_COMMAND) + +test/%Test$(EXT): PZSTD_LDFLAGS += $(GTEST_LIB) +test/%Test$(EXT): LIBS += -lgtest -lgtest_main +test/%Test$(EXT): test/%Test.o $(PROGDIR)/datagen.o \ + $(PROGDIR)/util.o Options.o Pzstd.o \ + SkippableFrame.o $(ZSTDDIR)/libzstd.a + $(LD_COMMAND) + +utils/test/%Test$(EXT): PZSTD_LDFLAGS += $(GTEST_LIB) +utils/test/%Test$(EXT): LIBS += -lgtest -lgtest_main +utils/test/%Test$(EXT): utils/test/%Test.o + $(LD_COMMAND) + + +GTEST_CMAKEFLAGS = + +# Install googletest +.PHONY: googletest +googletest: PZSTD_CCXXFLAGS += -fPIC +googletest: + @$(RM) -rf googletest + @git clone https://github.com/google/googletest + @mkdir -p googletest/build + @cd googletest/build && cmake $(GTEST_CMAKEFLAGS) -DCMAKE_CXX_FLAGS="$(ALL_CXXFLAGS)" .. && $(MAKE) + +.PHONY: googletest32 +googletest32: PZSTD_CCXXFLAGS += -m32 +googletest32: googletest + +.PHONY: googletest-mingw64 +googletest-mingw64: GTEST_CMAKEFLAGS += -G "MSYS Makefiles" +googletest-mingw64: googletest + +.PHONY: clean +clean: + $(RM) -f *.o pzstd$(EXT) *.Td *.d + $(RM) -f test/*.o test/*Test$(EXT) test/*.Td test/*.d + $(RM) -f utils/test/*.o utils/test/*Test$(EXT) utils/test/*.Td utils/test/*.d + $(RM) -f $(PROGDIR)/*.o $(PROGDIR)/*.Td $(PROGDIR)/*.d + $(MAKE) -C $(ZSTDDIR) clean + @echo Cleaning completed + + +# Cancel implicit rules +%.o: %.c +%.o: %.cpp + +# Object file rules +%.o: %.c + $(CC_COMMAND) + $(POSTCOMPILE) + +$(PROGDIR)/%.o: $(PROGDIR)/%.c + $(CC_COMMAND) + $(POSTCOMPILE) + +%.o: %.cpp + $(CXX_COMMAND) + $(POSTCOMPILE) + +test/%.o: PZSTD_CPPFLAGS += $(GTEST_INC) +test/%.o: test/%.cpp + $(CXX_COMMAND) + $(POSTCOMPILE) + +utils/test/%.o: PZSTD_CPPFLAGS += $(GTEST_INC) +utils/test/%.o: utils/test/%.cpp + $(CXX_COMMAND) + $(POSTCOMPILE) + +# Dependency file stuff +.PRECIOUS: %.d test/%.d utils/test/%.d + +# Include rules that specify header file dependencies +-include $(patsubst %,%.d,$(basename $(ALL_SRCS))) diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.cpp new file mode 100644 index 0000000000..90841b9bb0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.cpp @@ -0,0 +1,424 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "Options.h" +#include "util.h" +#include "utils/ScopeGuard.h" + +#include +#include +#include +#include +#include +#include +#include + + +namespace pzstd { + +namespace { +unsigned defaultNumThreads() { +#ifdef PZSTD_NUM_THREADS + return PZSTD_NUM_THREADS; +#else + return std::thread::hardware_concurrency(); +#endif +} + +unsigned parseUnsigned(const char **arg) { + unsigned result = 0; + while (**arg >= '0' && **arg <= '9') { + result *= 10; + result += **arg - '0'; + ++(*arg); + } + return result; +} + +const char *getArgument(const char *options, const char **argv, int &i, + int argc) { + if (options[1] != 0) { + return options + 1; + } + ++i; + if (i == argc) { + std::fprintf(stderr, "Option -%c requires an argument, but none provided\n", + *options); + return nullptr; + } + return argv[i]; +} + +const std::string kZstdExtension = ".zst"; +constexpr char kStdIn[] = "-"; +constexpr char kStdOut[] = "-"; +constexpr unsigned kDefaultCompressionLevel = 3; +constexpr unsigned kMaxNonUltraCompressionLevel = 19; + +#ifdef _WIN32 +const char nullOutput[] = "nul"; +#else +const char nullOutput[] = "/dev/null"; +#endif + +void notSupported(const char *option) { + std::fprintf(stderr, "Operation not supported: %s\n", option); +} + +void usage() { + std::fprintf(stderr, "Usage:\n"); + std::fprintf(stderr, " pzstd [args] [FILE(s)]\n"); + std::fprintf(stderr, "Parallel ZSTD options:\n"); + std::fprintf(stderr, " -p, --processes # : number of threads to use for (de)compression (default:)\n"); + + std::fprintf(stderr, "ZSTD options:\n"); + std::fprintf(stderr, " -# : # compression level (1-%d, default:%d)\n", kMaxNonUltraCompressionLevel, kDefaultCompressionLevel); + std::fprintf(stderr, " -d, --decompress : decompression\n"); + std::fprintf(stderr, " -o file : result stored into `file` (only if 1 input file)\n"); + std::fprintf(stderr, " -f, --force : overwrite output without prompting, (de)compress links\n"); + std::fprintf(stderr, " --rm : remove source file(s) after successful (de)compression\n"); + std::fprintf(stderr, " -k, --keep : preserve source file(s) (default)\n"); + std::fprintf(stderr, " -h, --help : display help and exit\n"); + std::fprintf(stderr, " -V, --version : display version number and exit\n"); + std::fprintf(stderr, " -v, --verbose : verbose mode; specify multiple times to increase log level (default:2)\n"); + std::fprintf(stderr, " -q, --quiet : suppress warnings; specify twice to suppress errors too\n"); + std::fprintf(stderr, " -c, --stdout : write to standard output (even if it is the console)\n"); +#ifdef UTIL_HAS_CREATEFILELIST + std::fprintf(stderr, " -r : operate recursively on directories\n"); +#endif + std::fprintf(stderr, " --ultra : enable levels beyond %i, up to %i (requires more memory)\n", kMaxNonUltraCompressionLevel, ZSTD_maxCLevel()); + std::fprintf(stderr, " -C, --check : integrity check (default)\n"); + std::fprintf(stderr, " --no-check : no integrity check\n"); + std::fprintf(stderr, " -t, --test : test compressed file integrity\n"); + std::fprintf(stderr, " -- : all arguments after \"--\" are treated as files\n"); +} +} // anonymous namespace + +Options::Options() + : numThreads(defaultNumThreads()), maxWindowLog(23), + compressionLevel(kDefaultCompressionLevel), decompress(false), + overwrite(false), keepSource(true), writeMode(WriteMode::Auto), + checksum(true), verbosity(2) {} + +Options::Status Options::parse(int argc, const char **argv) { + bool test = false; + bool recursive = false; + bool ultra = false; + bool forceStdout = false; + bool followLinks = false; + // Local copy of input files, which are pointers into argv. + std::vector localInputFiles; + for (int i = 1; i < argc; ++i) { + const char *arg = argv[i]; + // Protect against empty arguments + if (arg[0] == 0) { + continue; + } + // Everything after "--" is an input file + if (!std::strcmp(arg, "--")) { + ++i; + std::copy(argv + i, argv + argc, std::back_inserter(localInputFiles)); + break; + } + // Long arguments that don't have a short option + { + bool isLongOption = true; + if (!std::strcmp(arg, "--rm")) { + keepSource = false; + } else if (!std::strcmp(arg, "--ultra")) { + ultra = true; + maxWindowLog = 0; + } else if (!std::strcmp(arg, "--no-check")) { + checksum = false; + } else if (!std::strcmp(arg, "--sparse")) { + writeMode = WriteMode::Sparse; + notSupported("Sparse mode"); + return Status::Failure; + } else if (!std::strcmp(arg, "--no-sparse")) { + writeMode = WriteMode::Regular; + notSupported("Sparse mode"); + return Status::Failure; + } else if (!std::strcmp(arg, "--dictID")) { + notSupported(arg); + return Status::Failure; + } else if (!std::strcmp(arg, "--no-dictID")) { + notSupported(arg); + return Status::Failure; + } else { + isLongOption = false; + } + if (isLongOption) { + continue; + } + } + // Arguments with a short option simply set their short option. + const char *options = nullptr; + if (!std::strcmp(arg, "--processes")) { + options = "p"; + } else if (!std::strcmp(arg, "--version")) { + options = "V"; + } else if (!std::strcmp(arg, "--help")) { + options = "h"; + } else if (!std::strcmp(arg, "--decompress")) { + options = "d"; + } else if (!std::strcmp(arg, "--force")) { + options = "f"; + } else if (!std::strcmp(arg, "--stdout")) { + options = "c"; + } else if (!std::strcmp(arg, "--keep")) { + options = "k"; + } else if (!std::strcmp(arg, "--verbose")) { + options = "v"; + } else if (!std::strcmp(arg, "--quiet")) { + options = "q"; + } else if (!std::strcmp(arg, "--check")) { + options = "C"; + } else if (!std::strcmp(arg, "--test")) { + options = "t"; + } else if (arg[0] == '-' && arg[1] != 0) { + options = arg + 1; + } else { + localInputFiles.emplace_back(arg); + continue; + } + assert(options != nullptr); + + bool finished = false; + while (!finished && *options != 0) { + // Parse the compression level + if (*options >= '0' && *options <= '9') { + compressionLevel = parseUnsigned(&options); + continue; + } + + switch (*options) { + case 'h': + case 'H': + usage(); + return Status::Message; + case 'V': + std::fprintf(stderr, "PZSTD version: %s.\n", ZSTD_VERSION_STRING); + return Status::Message; + case 'p': { + finished = true; + const char *optionArgument = getArgument(options, argv, i, argc); + if (optionArgument == nullptr) { + return Status::Failure; + } + if (*optionArgument < '0' || *optionArgument > '9') { + std::fprintf(stderr, "Option -p expects a number, but %s provided\n", + optionArgument); + return Status::Failure; + } + numThreads = parseUnsigned(&optionArgument); + if (*optionArgument != 0) { + std::fprintf(stderr, + "Option -p expects a number, but %u%s provided\n", + numThreads, optionArgument); + return Status::Failure; + } + break; + } + case 'o': { + finished = true; + const char *optionArgument = getArgument(options, argv, i, argc); + if (optionArgument == nullptr) { + return Status::Failure; + } + outputFile = optionArgument; + break; + } + case 'C': + checksum = true; + break; + case 'k': + keepSource = true; + break; + case 'd': + decompress = true; + break; + case 'f': + overwrite = true; + forceStdout = true; + followLinks = true; + break; + case 't': + test = true; + decompress = true; + break; +#ifdef UTIL_HAS_CREATEFILELIST + case 'r': + recursive = true; + break; +#endif + case 'c': + outputFile = kStdOut; + forceStdout = true; + break; + case 'v': + ++verbosity; + break; + case 'q': + --verbosity; + // Ignore them for now + break; + // Unsupported options from Zstd + case 'D': + case 's': + notSupported("Zstd dictionaries."); + return Status::Failure; + case 'b': + case 'e': + case 'i': + case 'B': + notSupported("Zstd benchmarking options."); + return Status::Failure; + default: + std::fprintf(stderr, "Invalid argument: %s\n", arg); + return Status::Failure; + } + if (!finished) { + ++options; + } + } // while (*options != 0); + } // for (int i = 1; i < argc; ++i); + + // Set options for test mode + if (test) { + outputFile = nullOutput; + keepSource = true; + } + + // Input file defaults to standard input if not provided. + if (localInputFiles.empty()) { + localInputFiles.emplace_back(kStdIn); + } + + // Check validity of input files + if (localInputFiles.size() > 1) { + const auto it = std::find(localInputFiles.begin(), localInputFiles.end(), + std::string{kStdIn}); + if (it != localInputFiles.end()) { + std::fprintf( + stderr, + "Cannot specify standard input when handling multiple files\n"); + return Status::Failure; + } + } + if (localInputFiles.size() > 1 || recursive) { + if (!outputFile.empty() && outputFile != nullOutput) { + std::fprintf( + stderr, + "Cannot specify an output file when handling multiple inputs\n"); + return Status::Failure; + } + } + + g_utilDisplayLevel = verbosity; + // Remove local input files that are symbolic links + if (!followLinks) { + localInputFiles.erase(std::remove_if(localInputFiles.begin(), localInputFiles.end(), + [&](const char *path) { + bool isLink = UTIL_isLink(path); + if (isLink && verbosity >= 2) { + std::fprintf( + stderr, + "Warning : %s is symbolic link, ignoring\n", + path); + } + return isLink; + }), localInputFiles.end()); + } + + // Translate input files/directories into files to (de)compress + if (recursive) { + FileNamesTable* const files = UTIL_createExpandedFNT(localInputFiles.data(), localInputFiles.size(), followLinks); + if (files == nullptr) { + std::fprintf(stderr, "Error traversing directories\n"); + return Status::Failure; + } + auto guard = + makeScopeGuard([&] { UTIL_freeFileNamesTable(files); }); + if (files->tableSize == 0) { + std::fprintf(stderr, "No files found\n"); + return Status::Failure; + } + inputFiles.resize(files->tableSize); + std::copy(files->fileNames, files->fileNames + files->tableSize, inputFiles.begin()); + } else { + inputFiles.resize(localInputFiles.size()); + std::copy(localInputFiles.begin(), localInputFiles.end(), + inputFiles.begin()); + } + localInputFiles.clear(); + assert(!inputFiles.empty()); + + // If reading from standard input, default to standard output + if (inputFiles[0] == kStdIn && outputFile.empty()) { + assert(inputFiles.size() == 1); + outputFile = "-"; + } + + if (inputFiles[0] == kStdIn && IS_CONSOLE(stdin)) { + assert(inputFiles.size() == 1); + std::fprintf(stderr, "Cannot read input from interactive console\n"); + return Status::Failure; + } + if (outputFile == "-" && IS_CONSOLE(stdout) && !(forceStdout && decompress)) { + std::fprintf(stderr, "Will not write to console stdout unless -c or -f is " + "specified and decompressing\n"); + return Status::Failure; + } + + // Check compression level + { + unsigned maxCLevel = + ultra ? ZSTD_maxCLevel() : kMaxNonUltraCompressionLevel; + if (compressionLevel > maxCLevel || compressionLevel == 0) { + std::fprintf(stderr, "Invalid compression level %u.\n", compressionLevel); + return Status::Failure; + } + } + + // Check that numThreads is set + if (numThreads == 0) { + std::fprintf(stderr, "Invalid arguments: # of threads not specified " + "and unable to determine hardware concurrency.\n"); + return Status::Failure; + } + + // Modify verbosity + // If we are piping input and output, turn off interaction + if (inputFiles[0] == kStdIn && outputFile == kStdOut && verbosity == 2) { + verbosity = 1; + } + // If we are in multi-file mode, turn off interaction + if (inputFiles.size() > 1 && verbosity == 2) { + verbosity = 1; + } + + return Status::Success; +} + +std::string Options::getOutputFile(const std::string &inputFile) const { + if (!outputFile.empty()) { + return outputFile; + } + // Attempt to add/remove zstd extension from the input file + if (decompress) { + int stemSize = inputFile.size() - kZstdExtension.size(); + if (stemSize > 0 && inputFile.substr(stemSize) == kZstdExtension) { + return inputFile.substr(0, stemSize); + } else { + return ""; + } + } else { + return inputFile + kZstdExtension; + } +} +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.h new file mode 100644 index 0000000000..92c18a350c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Options.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#define ZSTD_STATIC_LINKING_ONLY +#define ZSTD_DISABLE_DEPRECATE_WARNINGS /* No deprecation warnings, pzstd itself is deprecated + * and uses deprecated functions + */ +#include "zstd.h" +#undef ZSTD_STATIC_LINKING_ONLY + +#include +#include +#include + +namespace pzstd { + +struct Options { + enum class WriteMode { Regular, Auto, Sparse }; + + unsigned numThreads; + unsigned maxWindowLog; + unsigned compressionLevel; + bool decompress; + std::vector inputFiles; + std::string outputFile; + bool overwrite; + bool keepSource; + WriteMode writeMode; + bool checksum; + int verbosity; + + enum class Status { + Success, // Successfully parsed options + Failure, // Failure to parse options + Message // Options specified to print a message (e.g. "-h") + }; + + Options(); + Options(unsigned numThreads, unsigned maxWindowLog, unsigned compressionLevel, + bool decompress, std::vector inputFiles, + std::string outputFile, bool overwrite, bool keepSource, + WriteMode writeMode, bool checksum, int verbosity) + : numThreads(numThreads), maxWindowLog(maxWindowLog), + compressionLevel(compressionLevel), decompress(decompress), + inputFiles(std::move(inputFiles)), outputFile(std::move(outputFile)), + overwrite(overwrite), keepSource(keepSource), writeMode(writeMode), + checksum(checksum), verbosity(verbosity) {} + + Status parse(int argc, const char **argv); + + ZSTD_parameters determineParameters() const { + ZSTD_parameters params = ZSTD_getParams(compressionLevel, 0, 0); + params.fParams.contentSizeFlag = 0; + params.fParams.checksumFlag = checksum; + if (maxWindowLog != 0 && params.cParams.windowLog > maxWindowLog) { + params.cParams.windowLog = maxWindowLog; + params.cParams = ZSTD_adjustCParams(params.cParams, 0, 0); + } + return params; + } + + std::string getOutputFile(const std::string &inputFile) const; +}; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.cpp new file mode 100644 index 0000000000..048a006b3b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.cpp @@ -0,0 +1,626 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "platform.h" /* Large Files support, SET_BINARY_MODE */ +#include "Pzstd.h" +#include "SkippableFrame.h" +#include "utils/FileSystem.h" +#include "utils/Portability.h" +#include "utils/Range.h" +#include "utils/ScopeGuard.h" +#include "utils/ThreadPool.h" +#include "utils/WorkQueue.h" + +#include +#include +#include +#include +#include +#include +#include + + +namespace pzstd { + +namespace { +#ifdef _WIN32 +const std::string nullOutput = "nul"; +#else +const std::string nullOutput = "/dev/null"; +#endif +} + +using std::size_t; + +static std::uintmax_t fileSizeOrZero(const std::string &file) { + if (file == "-") { + return 0; + } + std::error_code ec; + auto size = file_size(file, ec); + if (ec) { + size = 0; + } + return size; +} + +static std::uint64_t handleOneInput(const Options &options, + const std::string &inputFile, + FILE* inputFd, + const std::string &outputFile, + FILE* outputFd, + SharedState& state) { + auto inputSize = fileSizeOrZero(inputFile); + // WorkQueue outlives ThreadPool so in the case of error we are certain + // we don't accidentally try to call push() on it after it is destroyed + WorkQueue> outs{options.numThreads + 1}; + std::uint64_t bytesRead; + std::uint64_t bytesWritten; + { + // Initialize the (de)compression thread pool with numThreads + ThreadPool executor(options.numThreads); + // Run the reader thread on an extra thread + ThreadPool readExecutor(1); + if (!options.decompress) { + // Add a job that reads the input and starts all the compression jobs + readExecutor.add( + [&state, &outs, &executor, inputFd, inputSize, &options, &bytesRead] { + bytesRead = asyncCompressChunks( + state, + outs, + executor, + inputFd, + inputSize, + options.numThreads, + options.determineParameters()); + }); + // Start writing + bytesWritten = writeFile(state, outs, outputFd, options.decompress); + } else { + // Add a job that reads the input and starts all the decompression jobs + readExecutor.add([&state, &outs, &executor, inputFd, &bytesRead] { + bytesRead = asyncDecompressFrames(state, outs, executor, inputFd); + }); + // Start writing + bytesWritten = writeFile(state, outs, outputFd, options.decompress); + } + } + if (!state.errorHolder.hasError()) { + std::string inputFileName = inputFile == "-" ? "stdin" : inputFile; + std::string outputFileName = outputFile == "-" ? "stdout" : outputFile; + if (!options.decompress) { + double ratio = static_cast(bytesWritten) / + static_cast(bytesRead + !bytesRead); + state.log(kLogInfo, "%-20s :%6.2f%% (%6" PRIu64 " => %6" PRIu64 + " bytes, %s)\n", + inputFileName.c_str(), ratio * 100, bytesRead, bytesWritten, + outputFileName.c_str()); + } else { + state.log(kLogInfo, "%-20s: %" PRIu64 " bytes \n", + inputFileName.c_str(),bytesWritten); + } + } + return bytesWritten; +} + +static FILE *openInputFile(const std::string &inputFile, + ErrorHolder &errorHolder) { + if (inputFile == "-") { + SET_BINARY_MODE(stdin); + return stdin; + } + // Check if input file is a directory + { + std::error_code ec; + if (is_directory(inputFile, ec)) { + errorHolder.setError("Output file is a directory -- ignored"); + return nullptr; + } + } + auto inputFd = std::fopen(inputFile.c_str(), "rb"); + if (!errorHolder.check(inputFd != nullptr, "Failed to open input file")) { + return nullptr; + } + return inputFd; +} + +static FILE *openOutputFile(const Options &options, + const std::string &outputFile, + SharedState& state) { + if (outputFile == "-") { + SET_BINARY_MODE(stdout); + return stdout; + } + // Check if the output file exists and then open it + if (!options.overwrite && outputFile != nullOutput) { + auto outputFd = std::fopen(outputFile.c_str(), "rb"); + if (outputFd != nullptr) { + std::fclose(outputFd); + if (!state.log.logsAt(kLogInfo)) { + state.errorHolder.setError("Output file exists"); + return nullptr; + } + state.log( + kLogInfo, + "pzstd: %s already exists; do you wish to overwrite (y/n) ? ", + outputFile.c_str()); + int c = getchar(); + if (c != 'y' && c != 'Y') { + state.errorHolder.setError("Not overwritten"); + return nullptr; + } + } + } + auto outputFd = std::fopen(outputFile.c_str(), "wb"); + if (!state.errorHolder.check( + outputFd != nullptr, "Failed to open output file")) { + return nullptr; + } + return outputFd; +} + +int pzstdMain(const Options &options) { + int returnCode = 0; + SharedState state(options); + for (const auto& input : options.inputFiles) { + // Setup the shared state + auto printErrorGuard = makeScopeGuard([&] { + if (state.errorHolder.hasError()) { + returnCode = 1; + state.log(kLogError, "pzstd: %s: %s.\n", input.c_str(), + state.errorHolder.getError().c_str()); + } + }); + // Open the input file + auto inputFd = openInputFile(input, state.errorHolder); + if (inputFd == nullptr) { + continue; + } + auto closeInputGuard = makeScopeGuard([&] { std::fclose(inputFd); }); + // Open the output file + auto outputFile = options.getOutputFile(input); + if (!state.errorHolder.check(outputFile != "", + "Input file does not have extension .zst")) { + continue; + } + auto outputFd = openOutputFile(options, outputFile, state); + if (outputFd == nullptr) { + continue; + } + auto closeOutputGuard = makeScopeGuard([&] { std::fclose(outputFd); }); + // (de)compress the file + handleOneInput(options, input, inputFd, outputFile, outputFd, state); + if (state.errorHolder.hasError()) { + continue; + } + // Delete the input file if necessary + if (!options.keepSource) { + // Be sure that we are done and have written everything before we delete + if (!state.errorHolder.check(std::fclose(inputFd) == 0, + "Failed to close input file")) { + continue; + } + closeInputGuard.dismiss(); + if (!state.errorHolder.check(std::fclose(outputFd) == 0, + "Failed to close output file")) { + continue; + } + closeOutputGuard.dismiss(); + if (std::remove(input.c_str()) != 0) { + state.errorHolder.setError("Failed to remove input file"); + continue; + } + } + } + // Returns 1 if any of the files failed to (de)compress. + return returnCode; +} + +/// Construct a `ZSTD_inBuffer` that points to the data in `buffer`. +static ZSTD_inBuffer makeZstdInBuffer(const Buffer& buffer) { + return ZSTD_inBuffer{buffer.data(), buffer.size(), 0}; +} + +/** + * Advance `buffer` and `inBuffer` by the amount of data read, as indicated by + * `inBuffer.pos`. + */ +void advance(Buffer& buffer, ZSTD_inBuffer& inBuffer) { + auto pos = inBuffer.pos; + inBuffer.src = static_cast(inBuffer.src) + pos; + inBuffer.size -= pos; + inBuffer.pos = 0; + return buffer.advance(pos); +} + +/// Construct a `ZSTD_outBuffer` that points to the data in `buffer`. +static ZSTD_outBuffer makeZstdOutBuffer(Buffer& buffer) { + return ZSTD_outBuffer{buffer.data(), buffer.size(), 0}; +} + +/** + * Split `buffer` and advance `outBuffer` by the amount of data written, as + * indicated by `outBuffer.pos`. + */ +Buffer split(Buffer& buffer, ZSTD_outBuffer& outBuffer) { + auto pos = outBuffer.pos; + outBuffer.dst = static_cast(outBuffer.dst) + pos; + outBuffer.size -= pos; + outBuffer.pos = 0; + return buffer.splitAt(pos); +} + +/** + * Stream chunks of input from `in`, compress it, and stream it out to `out`. + * + * @param state The shared state + * @param in Queue that we `pop()` input buffers from + * @param out Queue that we `push()` compressed output buffers to + * @param maxInputSize An upper bound on the size of the input + */ +static void compress( + SharedState& state, + std::shared_ptr in, + std::shared_ptr out, + size_t maxInputSize) { + auto& errorHolder = state.errorHolder; + auto guard = makeScopeGuard([&] { + in->finish(); + out->finish(); + }); + // Initialize the CCtx + auto ctx = state.cStreamPool->get(); + if (!errorHolder.check(ctx != nullptr, "Failed to allocate ZSTD_CStream")) { + return; + } + { + auto err = ZSTD_CCtx_reset(ctx.get(), ZSTD_reset_session_only); + if (!errorHolder.check(!ZSTD_isError(err), ZSTD_getErrorName(err))) { + return; + } + } + + // Allocate space for the result + auto outBuffer = Buffer(ZSTD_compressBound(maxInputSize)); + auto zstdOutBuffer = makeZstdOutBuffer(outBuffer); + { + Buffer inBuffer; + // Read a buffer in from the input queue + while (in->pop(inBuffer) && !errorHolder.hasError()) { + auto zstdInBuffer = makeZstdInBuffer(inBuffer); + // Compress the whole buffer and send it to the output queue + while (!inBuffer.empty() && !errorHolder.hasError()) { + if (!errorHolder.check( + !outBuffer.empty(), "ZSTD_compressBound() was too small")) { + return; + } + // Compress + auto err = + ZSTD_compressStream(ctx.get(), &zstdOutBuffer, &zstdInBuffer); + if (!errorHolder.check(!ZSTD_isError(err), ZSTD_getErrorName(err))) { + return; + } + // Split the compressed data off outBuffer and pass to the output queue + out->push(split(outBuffer, zstdOutBuffer)); + // Forget about the data we already compressed + advance(inBuffer, zstdInBuffer); + } + } + } + // Write the epilog + size_t bytesLeft; + do { + if (!errorHolder.check( + !outBuffer.empty(), "ZSTD_compressBound() was too small")) { + return; + } + bytesLeft = ZSTD_endStream(ctx.get(), &zstdOutBuffer); + if (!errorHolder.check( + !ZSTD_isError(bytesLeft), ZSTD_getErrorName(bytesLeft))) { + return; + } + out->push(split(outBuffer, zstdOutBuffer)); + } while (bytesLeft != 0 && !errorHolder.hasError()); +} + +/** + * Calculates how large each independently compressed frame should be. + * + * @param size The size of the source if known, 0 otherwise + * @param numThreads The number of threads available to run compression jobs on + * @param params The zstd parameters to be used for compression + */ +static size_t calculateStep( + std::uintmax_t size, + size_t numThreads, + const ZSTD_parameters ¶ms) { + (void)size; + (void)numThreads; + // Not validated to work correctly for window logs > 23. + // It will definitely fail if windowLog + 2 is >= 4GB because + // the skippable frame can only store sizes up to 4GB. + assert(params.cParams.windowLog <= 23); + return size_t{1} << (params.cParams.windowLog + 2); +} + +namespace { +enum class FileStatus { Continue, Done, Error }; +/// Determines the status of the file descriptor `fd`. +FileStatus fileStatus(FILE* fd) { + if (std::feof(fd)) { + return FileStatus::Done; + } else if (std::ferror(fd)) { + return FileStatus::Error; + } + return FileStatus::Continue; +} +} // anonymous namespace + +/** + * Reads `size` data in chunks of `chunkSize` and puts it into `queue`. + * Will read less if an error or EOF occurs. + * Returns the status of the file after all of the reads have occurred. + */ +static FileStatus +readData(BufferWorkQueue& queue, size_t chunkSize, size_t size, FILE* fd, + std::uint64_t *totalBytesRead) { + Buffer buffer(size); + while (!buffer.empty()) { + auto bytesRead = + std::fread(buffer.data(), 1, std::min(chunkSize, buffer.size()), fd); + *totalBytesRead += bytesRead; + queue.push(buffer.splitAt(bytesRead)); + auto status = fileStatus(fd); + if (status != FileStatus::Continue) { + return status; + } + } + return FileStatus::Continue; +} + +std::uint64_t asyncCompressChunks( + SharedState& state, + WorkQueue>& chunks, + ThreadPool& executor, + FILE* fd, + std::uintmax_t size, + size_t numThreads, + ZSTD_parameters params) { + auto chunksGuard = makeScopeGuard([&] { chunks.finish(); }); + std::uint64_t bytesRead = 0; + + // Break the input up into chunks of size `step` and compress each chunk + // independently. + size_t step = calculateStep(size, numThreads, params); + state.log(kLogDebug, "Chosen frame size: %zu\n", step); + auto status = FileStatus::Continue; + while (status == FileStatus::Continue && !state.errorHolder.hasError()) { + // Make a new input queue that we will put the chunk's input data into. + auto in = std::make_shared(); + auto inGuard = makeScopeGuard([&] { in->finish(); }); + // Make a new output queue that compress will put the compressed data into. + auto out = std::make_shared(); + // Start compression in the thread pool + executor.add([&state, in, out, step] { + return compress( + state, std::move(in), std::move(out), step); + }); + // Pass the output queue to the writer thread. + chunks.push(std::move(out)); + state.log(kLogVerbose, "%s\n", "Starting a new frame"); + // Fill the input queue for the compression job we just started + status = readData(*in, ZSTD_CStreamInSize(), step, fd, &bytesRead); + } + state.errorHolder.check(status != FileStatus::Error, "Error reading input"); + return bytesRead; +} + +/** + * Decompress a frame, whose data is streamed into `in`, and stream the output + * to `out`. + * + * @param state The shared state + * @param in Queue that we `pop()` input buffers from. It contains + * exactly one compressed frame. + * @param out Queue that we `push()` decompressed output buffers to + */ +static void decompress( + SharedState& state, + std::shared_ptr in, + std::shared_ptr out) { + auto& errorHolder = state.errorHolder; + auto guard = makeScopeGuard([&] { + in->finish(); + out->finish(); + }); + // Initialize the DCtx + auto ctx = state.dStreamPool->get(); + if (!errorHolder.check(ctx != nullptr, "Failed to allocate ZSTD_DStream")) { + return; + } + { + auto err = ZSTD_DCtx_reset(ctx.get(), ZSTD_reset_session_only); + if (!errorHolder.check(!ZSTD_isError(err), ZSTD_getErrorName(err))) { + return; + } + } + + const size_t outSize = ZSTD_DStreamOutSize(); + Buffer inBuffer; + size_t returnCode = 0; + // Read a buffer in from the input queue + while (in->pop(inBuffer) && !errorHolder.hasError()) { + auto zstdInBuffer = makeZstdInBuffer(inBuffer); + // Decompress the whole buffer and send it to the output queue + while (!inBuffer.empty() && !errorHolder.hasError()) { + // Allocate a buffer with at least outSize bytes. + Buffer outBuffer(outSize); + auto zstdOutBuffer = makeZstdOutBuffer(outBuffer); + // Decompress + returnCode = + ZSTD_decompressStream(ctx.get(), &zstdOutBuffer, &zstdInBuffer); + if (!errorHolder.check( + !ZSTD_isError(returnCode), ZSTD_getErrorName(returnCode))) { + return; + } + // Pass the buffer with the decompressed data to the output queue + out->push(split(outBuffer, zstdOutBuffer)); + // Advance past the input we already read + advance(inBuffer, zstdInBuffer); + if (returnCode == 0) { + // The frame is over, prepare to (maybe) start a new frame + ZSTD_initDStream(ctx.get()); + } + } + } + if (!errorHolder.check(returnCode <= 1, "Incomplete block")) { + return; + } + // We've given ZSTD_decompressStream all of our data, but there may still + // be data to read. + while (returnCode == 1) { + // Allocate a buffer with at least outSize bytes. + Buffer outBuffer(outSize); + auto zstdOutBuffer = makeZstdOutBuffer(outBuffer); + // Pass in no input. + ZSTD_inBuffer zstdInBuffer{nullptr, 0, 0}; + // Decompress + returnCode = + ZSTD_decompressStream(ctx.get(), &zstdOutBuffer, &zstdInBuffer); + if (!errorHolder.check( + !ZSTD_isError(returnCode), ZSTD_getErrorName(returnCode))) { + return; + } + // Pass the buffer with the decompressed data to the output queue + out->push(split(outBuffer, zstdOutBuffer)); + } +} + +std::uint64_t asyncDecompressFrames( + SharedState& state, + WorkQueue>& frames, + ThreadPool& executor, + FILE* fd) { + auto framesGuard = makeScopeGuard([&] { frames.finish(); }); + std::uint64_t totalBytesRead = 0; + + // Split the source up into its component frames. + // If we find our recognized skippable frame we know the next frames size + // which means that we can decompress each standard frame in independently. + // Otherwise, we will decompress using only one decompression task. + const size_t chunkSize = ZSTD_DStreamInSize(); + auto status = FileStatus::Continue; + while (status == FileStatus::Continue && !state.errorHolder.hasError()) { + // Make a new input queue that we will put the frames's bytes into. + auto in = std::make_shared(); + auto inGuard = makeScopeGuard([&] { in->finish(); }); + // Make a output queue that decompress will put the decompressed data into + auto out = std::make_shared(); + + size_t frameSize; + { + // Calculate the size of the next frame. + // frameSize is 0 if the frame info can't be decoded. + Buffer buffer(SkippableFrame::kSize); + auto bytesRead = std::fread(buffer.data(), 1, buffer.size(), fd); + totalBytesRead += bytesRead; + status = fileStatus(fd); + if (bytesRead == 0 && status != FileStatus::Continue) { + break; + } + buffer.subtract(buffer.size() - bytesRead); + frameSize = SkippableFrame::tryRead(buffer.range()); + in->push(std::move(buffer)); + } + if (frameSize == 0) { + // We hit a non SkippableFrame, so this will be the last job. + // Make sure that we don't use too much memory + in->setMaxSize(64); + out->setMaxSize(64); + } + // Start decompression in the thread pool + executor.add([&state, in, out] { + return decompress(state, std::move(in), std::move(out)); + }); + // Pass the output queue to the writer thread + frames.push(std::move(out)); + if (frameSize == 0) { + // We hit a non SkippableFrame ==> not compressed by pzstd or corrupted + // Pass the rest of the source to this decompression task + state.log(kLogVerbose, "%s\n", + "Input not in pzstd format, falling back to serial decompression"); + while (status == FileStatus::Continue && !state.errorHolder.hasError()) { + status = readData(*in, chunkSize, chunkSize, fd, &totalBytesRead); + } + break; + } + state.log(kLogVerbose, "Decompressing a frame of size %zu", frameSize); + // Fill the input queue for the decompression job we just started + status = readData(*in, chunkSize, frameSize, fd, &totalBytesRead); + } + state.errorHolder.check(status != FileStatus::Error, "Error reading input"); + return totalBytesRead; +} + +/// Write `data` to `fd`, returns true iff success. +static bool writeData(ByteRange data, FILE* fd) { + while (!data.empty()) { + data.advance(std::fwrite(data.begin(), 1, data.size(), fd)); + if (std::ferror(fd)) { + return false; + } + } + return true; +} + +std::uint64_t writeFile( + SharedState& state, + WorkQueue>& outs, + FILE* outputFd, + bool decompress) { + auto& errorHolder = state.errorHolder; + auto outsFinishGuard = makeScopeGuard([&outs] { outs.finish(); }); + auto lineClearGuard = makeScopeGuard([&state] { + state.log.clear(kLogInfo); + }); + std::uint64_t bytesWritten = 0; + std::shared_ptr out; + // Grab the output queue for each decompression job (in order). + while (outs.pop(out)) { + auto outFinishGuard = makeScopeGuard([&out] { out->finish(); }); + if (errorHolder.hasError()) { + continue; + } + if (!decompress) { + // If we are compressing and want to write skippable frames we can't + // start writing before compression is done because we need to know the + // compressed size. + // Wait for the compressed size to be available and write skippable frame + assert(uint64_t(out->size()) < uint64_t(1) << 32); + SkippableFrame frame(uint32_t(out->size())); + if (!writeData(frame.data(), outputFd)) { + errorHolder.setError("Failed to write output"); + return bytesWritten; + } + bytesWritten += frame.kSize; + } + // For each chunk of the frame: Pop it from the queue and write it + Buffer buffer; + while (out->pop(buffer) && !errorHolder.hasError()) { + if (!writeData(buffer.range(), outputFd)) { + errorHolder.setError("Failed to write output"); + return bytesWritten; + } + bytesWritten += buffer.size(); + state.log.update(kLogInfo, "Written: %u MB ", + static_cast(bytesWritten >> 20)); + } + } + return bytesWritten; +} +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.h new file mode 100644 index 0000000000..3645e59426 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/Pzstd.h @@ -0,0 +1,153 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include "ErrorHolder.h" +#include "Logging.h" +#include "Options.h" +#include "utils/Buffer.h" +#include "utils/Range.h" +#include "utils/ResourcePool.h" +#include "utils/ThreadPool.h" +#include "utils/WorkQueue.h" +#define ZSTD_STATIC_LINKING_ONLY +#define ZSTD_DISABLE_DEPRECATE_WARNINGS /* No deprecation warnings, pzstd itself is deprecated + * and uses deprecated functions + */ +#include "zstd.h" +#undef ZSTD_STATIC_LINKING_ONLY + +#include +#include +#include + +namespace pzstd { +/** + * Runs pzstd with `options` and returns the number of bytes written. + * An error occurred if `errorHandler.hasError()`. + * + * @param options The pzstd options to use for (de)compression + * @returns 0 upon success and non-zero on failure. + */ +int pzstdMain(const Options& options); + +class SharedState { + public: + SharedState(const Options& options) : log(options.verbosity) { + if (!options.decompress) { + auto parameters = options.determineParameters(); + cStreamPool.reset(new ResourcePool{ + [this, parameters]() -> ZSTD_CStream* { + this->log(kLogVerbose, "%s\n", "Creating new ZSTD_CStream"); + auto zcs = ZSTD_createCStream(); + if (zcs) { + auto err = ZSTD_initCStream_advanced( + zcs, nullptr, 0, parameters, 0); + if (ZSTD_isError(err)) { + ZSTD_freeCStream(zcs); + return nullptr; + } + } + return zcs; + }, + [](ZSTD_CStream *zcs) { + ZSTD_freeCStream(zcs); + }}); + } else { + dStreamPool.reset(new ResourcePool{ + [this]() -> ZSTD_DStream* { + this->log(kLogVerbose, "%s\n", "Creating new ZSTD_DStream"); + auto zds = ZSTD_createDStream(); + if (zds) { + auto err = ZSTD_initDStream(zds); + if (ZSTD_isError(err)) { + ZSTD_freeDStream(zds); + return nullptr; + } + } + return zds; + }, + [](ZSTD_DStream *zds) { + ZSTD_freeDStream(zds); + }}); + } + } + + ~SharedState() { + // The resource pools have references to this, so destroy them first. + cStreamPool.reset(); + dStreamPool.reset(); + } + + Logger log; + ErrorHolder errorHolder; + std::unique_ptr> cStreamPool; + std::unique_ptr> dStreamPool; +}; + +/** + * Streams input from `fd`, breaks input up into chunks, and compresses each + * chunk independently. Output of each chunk gets streamed to a queue, and + * the output queues get put into `chunks` in order. + * + * @param state The shared state + * @param chunks Each compression jobs output queue gets `pushed()` here + * as soon as it is available + * @param executor The thread pool to run compression jobs in + * @param fd The input file descriptor + * @param size The size of the input file if known, 0 otherwise + * @param numThreads The number of threads in the thread pool + * @param parameters The zstd parameters to use for compression + * @returns The number of bytes read from the file + */ +std::uint64_t asyncCompressChunks( + SharedState& state, + WorkQueue>& chunks, + ThreadPool& executor, + FILE* fd, + std::uintmax_t size, + std::size_t numThreads, + ZSTD_parameters parameters); + +/** + * Streams input from `fd`. If pzstd headers are available it breaks the input + * up into independent frames. It sends each frame to an independent + * decompression job. Output of each frame gets streamed to a queue, and + * the output queues get put into `frames` in order. + * + * @param state The shared state + * @param frames Each decompression jobs output queue gets `pushed()` here + * as soon as it is available + * @param executor The thread pool to run compression jobs in + * @param fd The input file descriptor + * @returns The number of bytes read from the file + */ +std::uint64_t asyncDecompressFrames( + SharedState& state, + WorkQueue>& frames, + ThreadPool& executor, + FILE* fd); + +/** + * Streams input in from each queue in `outs` in order, and writes the data to + * `outputFd`. + * + * @param state The shared state + * @param outs A queue of output queues, one for each + * (de)compression job. + * @param outputFd The file descriptor to write to + * @param decompress Are we decompressing? + * @returns The number of bytes written + */ +std::uint64_t writeFile( + SharedState& state, + WorkQueue>& outs, + FILE* outputFd, + bool decompress); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/README.md b/cpp/third_party/zstd-1.5.7/contrib/pzstd/README.md new file mode 100644 index 0000000000..bc8f831f82 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/README.md @@ -0,0 +1,56 @@ +# Parallel Zstandard (PZstandard) + +Parallel Zstandard is a Pigz-like tool for Zstandard. +It provides Zstandard format compatible compression and decompression that is able to utilize multiple cores. +It breaks the input up into equal sized chunks and compresses each chunk independently into a Zstandard frame. +It then concatenates the frames together to produce the final compressed output. +Pzstandard will write a 12 byte header for each frame that is a skippable frame in the Zstandard format, which tells PZstandard the size of the next compressed frame. +PZstandard supports parallel decompression of files compressed with PZstandard. +When decompressing files compressed with Zstandard, PZstandard does IO in one thread, and decompression in another. + +## Usage + +PZstandard supports the same command line interface as Zstandard, but also provides the `-p` option to specify the number of threads. +Dictionary mode is not currently supported. + +Basic usage + + pzstd input-file -o output-file -p num-threads -# # Compression + pzstd -d input-file -o output-file -p num-threads # Decompression + +PZstandard also supports piping and fifo pipes + + cat input-file | pzstd -p num-threads -# -c > /dev/null + +For more options + + pzstd --help + +PZstandard tries to pick a smart default number of threads if not specified (displayed in `pzstd --help`). +If this number is not suitable, during compilation you can define `PZSTD_NUM_THREADS` to the number of threads you prefer. + +## Benchmarks + +As a reference, PZstandard and Pigz were compared on an Intel Core i7 @ 3.1 GHz, each using 4 threads, with the [Silesia compression corpus](https://sun.aei.polsl.pl//~sdeor/index.php?page=silesia). + +Compression Speed vs Ratio with 4 Threads | Decompression Speed with 4 Threads +------------------------------------------|----------------------------------- +![Compression Speed vs Ratio](images/Cspeed.png "Compression Speed vs Ratio") | ![Decompression Speed](images/Dspeed.png "Decompression Speed") + +The test procedure was to run each of the following commands 2 times for each compression level, and take the minimum time. + + time pzstd -# -p 4 -c silesia.tar > silesia.tar.zst + time pzstd -d -p 4 -c silesia.tar.zst > /dev/null + + time pigz -# -p 4 -k -c silesia.tar > silesia.tar.gz + time pigz -d -p 4 -k -c silesia.tar.gz > /dev/null + +PZstandard was tested using compression levels 1-19, and Pigz was tested using compression levels 1-9. +Pigz cannot do parallel decompression, it simply does each of reading, decompression, and writing on separate threads. + +## Tests + +Tests require that you have [gtest](https://github.com/google/googletest) installed. +Set `GTEST_INC` and `GTEST_LIB` in `Makefile` to specify the location of the gtest headers and libraries. +Alternatively, run `make googletest`, which will clone googletest and build it. +Run `make tests && make check` to run tests. diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.cpp new file mode 100644 index 0000000000..3bea4eb65b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "SkippableFrame.h" +#include "mem.h" +#include "utils/Range.h" + +#include + +using namespace pzstd; + +SkippableFrame::SkippableFrame(std::uint32_t size) : frameSize_(size) { + MEM_writeLE32(data_.data(), kSkippableFrameMagicNumber); + MEM_writeLE32(data_.data() + 4, kFrameContentsSize); + MEM_writeLE32(data_.data() + 8, frameSize_); +} + +/* static */ std::size_t SkippableFrame::tryRead(ByteRange bytes) { + if (bytes.size() < SkippableFrame::kSize || + MEM_readLE32(bytes.begin()) != kSkippableFrameMagicNumber || + MEM_readLE32(bytes.begin() + 4) != kFrameContentsSize) { + return 0; + } + return MEM_readLE32(bytes.begin() + 8); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.h new file mode 100644 index 0000000000..817415e923 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/SkippableFrame.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include "utils/Range.h" + +#include +#include +#include +#include + +namespace pzstd { +/** + * We put a skippable frame before each frame. + * It contains a skippable frame magic number, the size of the skippable frame, + * and the size of the next frame. + * Each skippable frame is exactly 12 bytes in little endian format. + * The first 8 bytes are for compatibility with the ZSTD format. + * If we have N threads, the output will look like + * + * [0x184D2A50|4|size1] [frame1 of size size1] + * [0x184D2A50|4|size2] [frame2 of size size2] + * ... + * [0x184D2A50|4|sizeN] [frameN of size sizeN] + * + * Each sizeX is 4 bytes. + * + * These skippable frames should allow us to skip through the compressed file + * and only load at most N pages. + */ +class SkippableFrame { + public: + static constexpr std::size_t kSize = 12; + + private: + std::uint32_t frameSize_; + std::array data_; + static constexpr std::uint32_t kSkippableFrameMagicNumber = 0x184D2A50; + // Could be improved if the size fits in less bytes + static constexpr std::uint32_t kFrameContentsSize = kSize - 8; + + public: + // Write the skippable frame to data_ in LE format. + explicit SkippableFrame(std::uint32_t size); + + // Read the skippable frame from bytes in LE format. + static std::size_t tryRead(ByteRange bytes); + + ByteRange data() const { + return {data_.data(), data_.size()}; + } + + // Size of the next frame. + std::size_t frameSize() const { + return frameSize_; + } +}; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/images/Cspeed.png b/cpp/third_party/zstd-1.5.7/contrib/pzstd/images/Cspeed.png new file mode 100644 index 0000000000000000000000000000000000000000..aca4f663ea2e98b6df7c1344b51af99757549d8a GIT binary patch literal 69804 zcmeFZWn5I<_Xi5dAi{&7f~ce-B8}1@VbG~`BOwivLk%!s)7^r^&|T7?G}0XdC?$== zAbt0M0nhKbFYlZC`M(fh_MCI}Uh&;)eb?IOt-P!l0p2w{3=9kc3GqiyFfg#cU|^gv z#Ki%hcwiW|g8wjWpNKuc$ZjW}1Am-*F0N*afkAo^{SVV9t{Yq;j3M#pzM>=MBJx}e zxnb<#kMYsq<~xziGC>l!61X;Aw{Jee!t}iHIw3oouEjZ*Dc?-_hhyn{wmYkQ0EwCw zp>o}(?ge>j;VD1Ti`3*2;#iTRjb9AzZVesoD5uIon&ZlU-r^<}_LrcET>SqSq;>^kp9W?N|LaQX zw-}fOH+dEx{O{C>aO1$(>LxF<=zk1~-w>{0I(NSOzZU(84ve|NWWE1uH9@#UY*L<| zS^h04v>;Z`5wYRx#P#U?*Wmvx@&Er?O#W(i_piAH;b*EBwQyOE8hewn7AwdJa5_Ch z-3WLk41-nfuZ33^rl&LPHoEUMa`^ot+s{_mmBamWbXDOg85S-zktQbAv)UzoQ$Gx> z>lckJEQ(ZgV13$7(#X|UTNCF$_&J$XQE^XxKhV`6nZLmZ(SNN+}IOW?j(M!qU+H1^Jxm-}@R?EE=bzWJ4=2TYc6sGAk?}5h_L#fDw1Mif1+6}sorn1ES-c9W81LpfKP2A@P;hSP+&K-8P|7G&Z)247j)9U|2Z9?h zZPp>ricN%DoEvEf@ zwd4MRj@8aNz3v@Jy!_tY-ob$?6lXNs(+7oDqY{$MWD}_*wi%z-LP!Ur$2Jhgkdcv* zrCFiFQh~kI&z2MG?uT3MOZrs1s&(V!^oXe4USahA_Y)+=8(7~LX zdp@a-YZpNbC2XS$H5Dv}aBWFbNEs%rT78MRZB;gR3mOvZc5b4?y#~|#csru5L2GW* zNs$5*8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#?hg~xkO#FJUsF& z_wIS*zRi=4Sy}I@TPsDxrfima2JKj0(4cUkIotoeZJv||p(6xp(lZQKr&ZoBJ2{s5 z6H*tfRpe@R_U=jYFB-m*KF#@v<-~-3ym{w9=gI#3!Dh)fAE_wMf0q*;xyms^!pJEG zGrkHes?@Iw`Pu4Y=}w<$L6#=R%Evy_^+Q{mq&jBC&o&M}$=l98p-pQpSaJVKzU`TW zkNY&tDs|#h>X7{l?mSA9m?N$J=)+5Kz~w!Vs(vbYfE25~yl5SaKwpPt zV7QunmjPslI`sw7QzNjeoI%!;hwi81qgo%V?QOUpND6QHbjJOZeDf?ep*P3f1pa#6 zg3jL}F-DiPuaZP6j=Fuo0`pb5EyzDOzW8fyMZ{rYQjEI}t!gl-FDX}q09|+;_dOfG zj=%|T2dNZR=PF55Bf;;9O$hS${xg1TY_@D~tvcqR-C~Kg9<$l;YUNQqHL=T{_Gmwt z-bRq2Vit&rOG@L2*LB>h0v}wB`uZ8C>0b3OYq@{$_s2ij9E_S7lfemJ5_|f pQ%ftJInO=Pm*Hvg*8yQhk811c_TYJD@K0(mmS(m)>89>y{sO6Bn*jg- literal 0 HcmV?d00001 diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/main.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/main.cpp new file mode 100644 index 0000000000..422b4a56a7 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/main.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "ErrorHolder.h" +#include "Options.h" +#include "Pzstd.h" + +using namespace pzstd; + +int main(int argc, const char** argv) { + Options options; + switch (options.parse(argc, argv)) { + case Options::Status::Failure: + return 1; + case Options::Status::Message: + return 0; + default: + break; + } + + return pzstdMain(options); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/BUCK b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/BUCK new file mode 100644 index 0000000000..6d3fdd3c26 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/BUCK @@ -0,0 +1,37 @@ +cxx_test( + name='options_test', + srcs=['OptionsTest.cpp'], + deps=['//contrib/pzstd:options'], +) + +cxx_test( + name='pzstd_test', + srcs=['PzstdTest.cpp'], + deps=[ + ':round_trip', + '//contrib/pzstd:libpzstd', + '//contrib/pzstd/utils:scope_guard', + '//programs:datagen', + ], +) + +cxx_binary( + name='round_trip_test', + srcs=['RoundTripTest.cpp'], + deps=[ + ':round_trip', + '//contrib/pzstd/utils:scope_guard', + '//programs:datagen', + ] +) + +cxx_library( + name='round_trip', + header_namespace='test', + exported_headers=['RoundTrip.h'], + deps=[ + '//contrib/pzstd:libpzstd', + '//contrib/pzstd:options', + '//contrib/pzstd/utils:scope_guard', + ] +) diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/OptionsTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/OptionsTest.cpp new file mode 100644 index 0000000000..91e39750d0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/OptionsTest.cpp @@ -0,0 +1,536 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "Options.h" + +#include +#include + +using namespace pzstd; + +namespace pzstd { +bool operator==(const Options &lhs, const Options &rhs) { + return lhs.numThreads == rhs.numThreads && + lhs.maxWindowLog == rhs.maxWindowLog && + lhs.compressionLevel == rhs.compressionLevel && + lhs.decompress == rhs.decompress && lhs.inputFiles == rhs.inputFiles && + lhs.outputFile == rhs.outputFile && lhs.overwrite == rhs.overwrite && + lhs.keepSource == rhs.keepSource && lhs.writeMode == rhs.writeMode && + lhs.checksum == rhs.checksum && lhs.verbosity == rhs.verbosity; +} + +std::ostream &operator<<(std::ostream &out, const Options &opt) { + out << "{"; + { + out << "\n\t" + << "numThreads: " << opt.numThreads; + out << ",\n\t" + << "maxWindowLog: " << opt.maxWindowLog; + out << ",\n\t" + << "compressionLevel: " << opt.compressionLevel; + out << ",\n\t" + << "decompress: " << opt.decompress; + out << ",\n\t" + << "inputFiles: {"; + { + bool first = true; + for (const auto &file : opt.inputFiles) { + if (!first) { + out << ","; + } + first = false; + out << "\n\t\t" << file; + } + } + out << "\n\t}"; + out << ",\n\t" + << "outputFile: " << opt.outputFile; + out << ",\n\t" + << "overwrite: " << opt.overwrite; + out << ",\n\t" + << "keepSource: " << opt.keepSource; + out << ",\n\t" + << "writeMode: " << static_cast(opt.writeMode); + out << ",\n\t" + << "checksum: " << opt.checksum; + out << ",\n\t" + << "verbosity: " << opt.verbosity; + } + out << "\n}"; + return out; +} +} + +namespace { +#ifdef _WIN32 +const char nullOutput[] = "nul"; +#else +const char nullOutput[] = "/dev/null"; +#endif + +constexpr auto autoMode = Options::WriteMode::Auto; +} // anonymous namespace + +#define EXPECT_SUCCESS(...) EXPECT_EQ(Options::Status::Success, __VA_ARGS__) +#define EXPECT_FAILURE(...) EXPECT_EQ(Options::Status::Failure, __VA_ARGS__) +#define EXPECT_MESSAGE(...) EXPECT_EQ(Options::Status::Message, __VA_ARGS__) + +template +std::array makeArray(Args... args) { + return {{nullptr, args...}}; +} + +TEST(Options, ValidInputs) { + { + Options options; + auto args = makeArray("--processes", "5", "-o", "x", "y", "-f"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {5, 23, 3, false, {"y"}, "x", + true, true, autoMode, true, 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("-p", "1", "input", "-19"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {1, 23, 19, false, {"input"}, "", + false, true, autoMode, true, 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = + makeArray("--ultra", "-22", "-p", "1", "-o", "x", "-d", "x.zst", "-f"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {1, 0, 22, true, {"x.zst"}, "x", + true, true, autoMode, true, 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("--processes", "100", "hello.zst", "--decompress", + "--force"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {100, 23, 3, true, {"hello.zst"}, "", true, + true, autoMode, true, 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("x", "-dp", "1", "-c"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {1, 23, 3, true, {"x"}, "-", + false, true, autoMode, true, 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("x", "-dp", "1", "--stdout"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {1, 23, 3, true, {"x"}, "-", + false, true, autoMode, true, 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("-p", "1", "x", "-5", "-fo", "-", "--ultra", "-d"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {1, 0, 5, true, {"x"}, "-", + true, true, autoMode, true, 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("silesia.tar", "-o", "silesia.tar.pzstd", "-p", "2"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {2, + 23, + 3, + false, + {"silesia.tar"}, + "silesia.tar.pzstd", + false, + true, + autoMode, + true, + 2}; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("x", "-p", "1"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "-p", "1"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + } +} + +TEST(Options, GetOutputFile) { + { + Options options; + auto args = makeArray("x"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ("x.zst", options.getOutputFile(options.inputFiles[0])); + } + { + Options options; + auto args = makeArray("x", "y", "-o", nullOutput); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(nullOutput, options.getOutputFile(options.inputFiles[0])); + } + { + Options options; + auto args = makeArray("x.zst", "-do", nullOutput); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(nullOutput, options.getOutputFile(options.inputFiles[0])); + } + { + Options options; + auto args = makeArray("x.zst", "-d"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ("x", options.getOutputFile(options.inputFiles[0])); + } + { + Options options; + auto args = makeArray("xzst", "-d"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ("", options.getOutputFile(options.inputFiles[0])); + } + { + Options options; + auto args = makeArray("xzst", "-doxx"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ("xx", options.getOutputFile(options.inputFiles[0])); + } +} + +TEST(Options, MultipleFiles) { + { + Options options; + auto args = makeArray("x", "y", "z"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected; + expected.inputFiles = {"x", "y", "z"}; + expected.verbosity = 1; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("x", "y", "z", "-o", nullOutput); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected; + expected.inputFiles = {"x", "y", "z"}; + expected.outputFile = nullOutput; + expected.verbosity = 1; + EXPECT_EQ(expected, options); + } + { + Options options; + auto args = makeArray("x", "y", "-o-"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "y", "-o", "file"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("-qqvd12qp4", "-f", "x", "--", "--rm", "-c"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + Options expected = {4, 23, 12, true, {"x", "--rm", "-c"}, + "", true, true, autoMode, true, + 0}; + EXPECT_EQ(expected, options); + } +} + +TEST(Options, NumThreads) { + { + Options options; + auto args = makeArray("x", "-dfo", "-"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "-p", "0", "-fo", "-"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("-f", "-p", "-o", "-"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } +} + +TEST(Options, BadCompressionLevel) { + { + Options options; + auto args = makeArray("x", "-20"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "--ultra", "-23"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "--1"); // negative 1? + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } +} + +TEST(Options, InvalidOption) { + { + Options options; + auto args = makeArray("x", "-x"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } +} + +TEST(Options, BadOutputFile) { + { + Options options; + auto args = makeArray("notzst", "-d", "-p", "1"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ("", options.getOutputFile(options.inputFiles.front())); + } +} + +TEST(Options, BadOptionsWithArguments) { + { + Options options; + auto args = makeArray("x", "-pf"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "-p", "10f"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "-p"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "-o"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("x", "-o"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } +} + +TEST(Options, KeepSource) { + { + Options options; + auto args = makeArray("x", "--rm", "-k"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.keepSource); + } + { + Options options; + auto args = makeArray("x", "--rm", "--keep"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.keepSource); + } + { + Options options; + auto args = makeArray("x"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.keepSource); + } + { + Options options; + auto args = makeArray("x", "--rm"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(false, options.keepSource); + } +} + +TEST(Options, Verbosity) { + { + Options options; + auto args = makeArray("x"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(2, options.verbosity); + } + { + Options options; + auto args = makeArray("--quiet", "-qq", "x"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(-1, options.verbosity); + } + { + Options options; + auto args = makeArray("x", "y"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(1, options.verbosity); + } + { + Options options; + auto args = makeArray("--", "x", "y"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(1, options.verbosity); + } + { + Options options; + auto args = makeArray("-qv", "x", "y"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(1, options.verbosity); + } + { + Options options; + auto args = makeArray("-v", "x", "y"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(3, options.verbosity); + } + { + Options options; + auto args = makeArray("-v", "x"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(3, options.verbosity); + } +} + +TEST(Options, TestMode) { + { + Options options; + auto args = makeArray("x", "-t"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.keepSource); + EXPECT_EQ(true, options.decompress); + EXPECT_EQ(nullOutput, options.outputFile); + } + { + Options options; + auto args = makeArray("x", "--test", "--rm", "-ohello"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.keepSource); + EXPECT_EQ(true, options.decompress); + EXPECT_EQ(nullOutput, options.outputFile); + } +} + +TEST(Options, Checksum) { + { + Options options; + auto args = makeArray("x.zst", "--no-check", "-Cd"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.checksum); + } + { + Options options; + auto args = makeArray("x"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.checksum); + } + { + Options options; + auto args = makeArray("x", "--no-check", "--check"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(true, options.checksum); + } + { + Options options; + auto args = makeArray("x", "--no-check"); + EXPECT_SUCCESS(options.parse(args.size(), args.data())); + EXPECT_EQ(false, options.checksum); + } +} + +TEST(Options, InputFiles) { + { + Options options; + auto args = makeArray("-cd"); + options.parse(args.size(), args.data()); + EXPECT_EQ(1, options.inputFiles.size()); + EXPECT_EQ("-", options.inputFiles[0]); + EXPECT_EQ("-", options.outputFile); + } + { + Options options; + auto args = makeArray(); + options.parse(args.size(), args.data()); + EXPECT_EQ(1, options.inputFiles.size()); + EXPECT_EQ("-", options.inputFiles[0]); + EXPECT_EQ("-", options.outputFile); + } + { + Options options; + auto args = makeArray("-d"); + options.parse(args.size(), args.data()); + EXPECT_EQ(1, options.inputFiles.size()); + EXPECT_EQ("-", options.inputFiles[0]); + EXPECT_EQ("-", options.outputFile); + } + { + Options options; + auto args = makeArray("x", "-"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } +} + +TEST(Options, InvalidOptions) { + { + Options options; + auto args = makeArray("-ibasdf"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("- "); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("-n15"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("-0", "x"); + EXPECT_FAILURE(options.parse(args.size(), args.data())); + } +} + +TEST(Options, Extras) { + { + Options options; + auto args = makeArray("-h"); + EXPECT_MESSAGE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("-H"); + EXPECT_MESSAGE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("-V"); + EXPECT_MESSAGE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("--help"); + EXPECT_MESSAGE(options.parse(args.size(), args.data())); + } + { + Options options; + auto args = makeArray("--version"); + EXPECT_MESSAGE(options.parse(args.size(), args.data())); + } +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/PzstdTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/PzstdTest.cpp new file mode 100644 index 0000000000..3249f860af --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/PzstdTest.cpp @@ -0,0 +1,147 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "Pzstd.h" +#include "datagen.h" +#include "test/RoundTrip.h" +#include "utils/ScopeGuard.h" + +#include +#include +#include +#include +#include + +using namespace std; +using namespace pzstd; + +TEST(Pzstd, SmallSizes) { + unsigned seed = std::random_device{}(); + std::fprintf(stderr, "Pzstd.SmallSizes seed: %u\n", seed); + std::mt19937 gen(seed); + + for (unsigned len = 1; len < 256; ++len) { + if (len % 16 == 0) { + std::fprintf(stderr, "%u / 16\n", len / 16); + } + std::string inputFile = std::tmpnam(nullptr); + auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); + { + static uint8_t buf[256]; + RDG_genBuffer(buf, len, 0.5, 0.0, gen()); + auto fd = std::fopen(inputFile.c_str(), "wb"); + auto written = std::fwrite(buf, 1, len, fd); + std::fclose(fd); + ASSERT_EQ(written, len); + } + for (unsigned numThreads = 1; numThreads <= 2; ++numThreads) { + for (unsigned level = 1; level <= 4; level *= 4) { + auto errorGuard = makeScopeGuard([&] { + std::fprintf(stderr, "# threads: %u\n", numThreads); + std::fprintf(stderr, "compression level: %u\n", level); + }); + Options options; + options.overwrite = true; + options.inputFiles = {inputFile}; + options.numThreads = numThreads; + options.compressionLevel = level; + options.verbosity = 1; + ASSERT_TRUE(roundTrip(options)); + errorGuard.dismiss(); + } + } + } +} + +TEST(Pzstd, LargeSizes) { + unsigned seed = std::random_device{}(); + std::fprintf(stderr, "Pzstd.LargeSizes seed: %u\n", seed); + std::mt19937 gen(seed); + + for (unsigned len = 1 << 20; len <= (1 << 24); len *= 2) { + std::string inputFile = std::tmpnam(nullptr); + auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); + { + std::unique_ptr buf(new uint8_t[len]); + RDG_genBuffer(buf.get(), len, 0.5, 0.0, gen()); + auto fd = std::fopen(inputFile.c_str(), "wb"); + auto written = std::fwrite(buf.get(), 1, len, fd); + std::fclose(fd); + ASSERT_EQ(written, len); + } + for (unsigned numThreads = 1; numThreads <= 16; numThreads *= 4) { + for (unsigned level = 1; level <= 4; level *= 4) { + auto errorGuard = makeScopeGuard([&] { + std::fprintf(stderr, "# threads: %u\n", numThreads); + std::fprintf(stderr, "compression level: %u\n", level); + }); + Options options; + options.overwrite = true; + options.inputFiles = {inputFile}; + options.numThreads = std::min(numThreads, options.numThreads); + options.compressionLevel = level; + options.verbosity = 1; + ASSERT_TRUE(roundTrip(options)); + errorGuard.dismiss(); + } + } + } +} + +TEST(Pzstd, DISABLED_ExtremelyLargeSize) { + unsigned seed = std::random_device{}(); + std::fprintf(stderr, "Pzstd.ExtremelyLargeSize seed: %u\n", seed); + std::mt19937 gen(seed); + + std::string inputFile = std::tmpnam(nullptr); + auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); + + { + // Write 4GB + 64 MB + constexpr size_t kLength = 1 << 26; + std::unique_ptr buf(new uint8_t[kLength]); + auto fd = std::fopen(inputFile.c_str(), "wb"); + auto closeGuard = makeScopeGuard([&] { std::fclose(fd); }); + for (size_t i = 0; i < (1 << 6) + 1; ++i) { + RDG_genBuffer(buf.get(), kLength, 0.5, 0.0, gen()); + auto written = std::fwrite(buf.get(), 1, kLength, fd); + if (written != kLength) { + std::fprintf(stderr, "Failed to write file, skipping test\n"); + return; + } + } + } + + Options options; + options.overwrite = true; + options.inputFiles = {inputFile}; + options.compressionLevel = 1; + if (options.numThreads == 0) { + options.numThreads = 1; + } + ASSERT_TRUE(roundTrip(options)); +} + +TEST(Pzstd, ExtremelyCompressible) { + std::string inputFile = std::tmpnam(nullptr); + auto guard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); + { + std::unique_ptr buf(new uint8_t[10000]); + std::memset(buf.get(), 'a', 10000); + auto fd = std::fopen(inputFile.c_str(), "wb"); + auto written = std::fwrite(buf.get(), 1, 10000, fd); + std::fclose(fd); + ASSERT_EQ(written, 10000); + } + Options options; + options.overwrite = true; + options.inputFiles = {inputFile}; + options.numThreads = 1; + options.compressionLevel = 1; + ASSERT_TRUE(roundTrip(options)); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTrip.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTrip.h new file mode 100644 index 0000000000..f777622a39 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTrip.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include "Options.h" +#include "Pzstd.h" +#include "utils/ScopeGuard.h" + +#include +#include +#include +#include + +namespace pzstd { + +inline bool check(std::string source, std::string decompressed) { + std::unique_ptr sBuf(new std::uint8_t[1024]); + std::unique_ptr dBuf(new std::uint8_t[1024]); + + auto sFd = std::fopen(source.c_str(), "rb"); + auto dFd = std::fopen(decompressed.c_str(), "rb"); + auto guard = makeScopeGuard([&] { + std::fclose(sFd); + std::fclose(dFd); + }); + + size_t sRead, dRead; + + do { + sRead = std::fread(sBuf.get(), 1, 1024, sFd); + dRead = std::fread(dBuf.get(), 1, 1024, dFd); + if (std::ferror(sFd) || std::ferror(dFd)) { + return false; + } + if (sRead != dRead) { + return false; + } + + for (size_t i = 0; i < sRead; ++i) { + if (sBuf.get()[i] != dBuf.get()[i]) { + return false; + } + } + } while (sRead == 1024); + if (!std::feof(sFd) || !std::feof(dFd)) { + return false; + } + return true; +} + +inline bool roundTrip(Options& options) { + if (options.inputFiles.size() != 1) { + return false; + } + std::string source = options.inputFiles.front(); + std::string compressedFile = std::tmpnam(nullptr); + std::string decompressedFile = std::tmpnam(nullptr); + auto guard = makeScopeGuard([&] { + std::remove(compressedFile.c_str()); + std::remove(decompressedFile.c_str()); + }); + + { + options.outputFile = compressedFile; + options.decompress = false; + if (pzstdMain(options) != 0) { + return false; + } + } + { + options.decompress = true; + options.inputFiles.front() = compressedFile; + options.outputFile = decompressedFile; + if (pzstdMain(options) != 0) { + return false; + } + } + return check(source, decompressedFile); +} +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTripTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTripTest.cpp new file mode 100644 index 0000000000..27c5028e88 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/test/RoundTripTest.cpp @@ -0,0 +1,84 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "datagen.h" +#include "Options.h" +#include "test/RoundTrip.h" +#include "utils/ScopeGuard.h" + +#include +#include +#include +#include +#include + +using namespace std; +using namespace pzstd; + +namespace { +string +writeData(size_t size, double matchProba, double litProba, unsigned seed) { + std::unique_ptr buf(new uint8_t[size]); + RDG_genBuffer(buf.get(), size, matchProba, litProba, seed); + string file = tmpnam(nullptr); + auto fd = std::fopen(file.c_str(), "wb"); + auto guard = makeScopeGuard([&] { std::fclose(fd); }); + auto bytesWritten = std::fwrite(buf.get(), 1, size, fd); + if (bytesWritten != size) { + std::abort(); + } + return file; +} + +template +string generateInputFile(Generator& gen) { + // Use inputs ranging from 1 Byte to 2^16 Bytes + std::uniform_int_distribution size{1, 1 << 16}; + std::uniform_real_distribution<> prob{0, 1}; + return writeData(size(gen), prob(gen), prob(gen), gen()); +} + +template +Options generateOptions(Generator& gen, const string& inputFile) { + Options options; + options.inputFiles = {inputFile}; + options.overwrite = true; + + std::uniform_int_distribution numThreads{1, 32}; + std::uniform_int_distribution compressionLevel{1, 10}; + + options.numThreads = numThreads(gen); + options.compressionLevel = compressionLevel(gen); + + return options; +} +} + +int main() { + std::mt19937 gen(std::random_device{}()); + + auto newlineGuard = makeScopeGuard([] { std::fprintf(stderr, "\n"); }); + for (unsigned i = 0; i < 10000; ++i) { + if (i % 100 == 0) { + std::fprintf(stderr, "Progress: %u%%\r", i / 100); + } + auto inputFile = generateInputFile(gen); + auto inputGuard = makeScopeGuard([&] { std::remove(inputFile.c_str()); }); + for (unsigned i = 0; i < 10; ++i) { + auto options = generateOptions(gen, inputFile); + if (!roundTrip(options)) { + std::fprintf(stderr, "numThreads: %u\n", options.numThreads); + std::fprintf(stderr, "level: %u\n", options.compressionLevel); + std::fprintf(stderr, "decompress? %u\n", (unsigned)options.decompress); + std::fprintf(stderr, "file: %s\n", inputFile.c_str()); + return 1; + } + } + } + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/BUCK b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/BUCK new file mode 100644 index 0000000000..e757f41207 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/BUCK @@ -0,0 +1,75 @@ +cxx_library( + name='buffer', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['Buffer.h'], + deps=[':range'], +) + +cxx_library( + name='file_system', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['FileSystem.h'], + deps=[':range'], +) + +cxx_library( + name='likely', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['Likely.h'], +) + +cxx_library( + name='range', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['Range.h'], + deps=[':likely'], +) + +cxx_library( + name='resource_pool', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['ResourcePool.h'], +) + +cxx_library( + name='scope_guard', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['ScopeGuard.h'], +) + +cxx_library( + name='thread_pool', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['ThreadPool.h'], + deps=[':work_queue'], +) + +cxx_library( + name='work_queue', + visibility=['PUBLIC'], + header_namespace='utils', + exported_headers=['WorkQueue.h'], + deps=[':buffer'], +) + +cxx_library( + name='utils', + visibility=['PUBLIC'], + deps=[ + ':buffer', + ':file_system', + ':likely', + ':range', + ':resource_pool', + ':scope_guard', + ':thread_pool', + ':work_queue', + ], +) diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Buffer.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Buffer.h new file mode 100644 index 0000000000..a85f770ba1 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Buffer.h @@ -0,0 +1,99 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include "utils/Range.h" + +#include +#include +#include + +namespace pzstd { + +/** + * A `Buffer` has a pointer to a shared buffer, and a range of the buffer that + * it owns. + * The idea is that you can allocate one buffer, and write chunks into it + * and break off those chunks. + * The underlying buffer is reference counted, and will be destroyed when all + * `Buffer`s that reference it are destroyed. + */ +class Buffer { + std::shared_ptr buffer_; + MutableByteRange range_; + + static void delete_buffer(unsigned char* buffer) { + delete[] buffer; + } + + public: + /// Construct an empty buffer that owns no data. + explicit Buffer() {} + + /// Construct a `Buffer` that owns a new underlying buffer of size `size`. + explicit Buffer(std::size_t size) + : buffer_(new unsigned char[size], delete_buffer), + range_(buffer_.get(), buffer_.get() + size) {} + + explicit Buffer(std::shared_ptr buffer, MutableByteRange data) + : buffer_(buffer), range_(data) {} + + Buffer(Buffer&&) = default; + Buffer& operator=(Buffer&&) = default; + + /** + * Splits the data into two pieces: [begin, begin + n), [begin + n, end). + * Their data both points into the same underlying buffer. + * Modifies the original `Buffer` to point to only [begin + n, end). + * + * @param n The offset to split at. + * @returns A buffer that owns the data [begin, begin + n). + */ + Buffer splitAt(std::size_t n) { + auto firstPiece = range_.subpiece(0, n); + range_.advance(n); + return Buffer(buffer_, firstPiece); + } + + /// Modifies the buffer to point to the range [begin + n, end). + void advance(std::size_t n) { + range_.advance(n); + } + + /// Modifies the buffer to point to the range [begin, end - n). + void subtract(std::size_t n) { + range_.subtract(n); + } + + /// Returns a read only `Range` pointing to the `Buffer`s data. + ByteRange range() const { + return range_; + } + /// Returns a mutable `Range` pointing to the `Buffer`s data. + MutableByteRange range() { + return range_; + } + + const unsigned char* data() const { + return range_.data(); + } + + unsigned char* data() { + return range_.data(); + } + + std::size_t size() const { + return range_.size(); + } + + bool empty() const { + return range_.empty(); + } +}; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/FileSystem.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/FileSystem.h new file mode 100644 index 0000000000..8d57d05f0f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/FileSystem.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include "utils/Portability.h" +#include "utils/Range.h" + +#include +#include +#include +#include +#include + +// A small subset of `std::filesystem`. +// `std::filesystem` should be a drop in replacement. +// See https://en.cppreference.com/w/cpp/filesystem for documentation. + +namespace pzstd { + +// using file_status = ... causes gcc to emit a false positive warning +#if defined(_MSC_VER) +typedef struct ::_stat64 file_status; +#else +typedef struct ::stat file_status; +#endif + +/// https://en.cppreference.com/w/cpp/filesystem/status +inline file_status status(StringPiece path, std::error_code& ec) noexcept { + file_status status; +#if defined(_MSC_VER) + const auto error = ::_stat64(path.data(), &status); +#else + const auto error = ::stat(path.data(), &status); +#endif + if (error) { + ec.assign(errno, std::generic_category()); + } else { + ec.clear(); + } + return status; +} + +/// https://en.cppreference.com/w/cpp/filesystem/is_regular_file +inline bool is_regular_file(file_status status) noexcept { +#if defined(S_ISREG) + return S_ISREG(status.st_mode); +#elif !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) + return (status.st_mode & S_IFMT) == S_IFREG; +#else + static_assert(false, "No POSIX stat() support."); +#endif +} + +/// https://en.cppreference.com/w/cpp/filesystem/is_regular_file +inline bool is_regular_file(StringPiece path, std::error_code& ec) noexcept { + return is_regular_file(status(path, ec)); +} + +/// https://en.cppreference.com/w/cpp/filesystem/is_directory +inline bool is_directory(file_status status) noexcept { +#if defined(S_ISDIR) + return S_ISDIR(status.st_mode); +#elif !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) + return (status.st_mode & S_IFMT) == S_IFDIR; +#else + static_assert(false, "NO POSIX stat() support."); +#endif +} + +/// https://en.cppreference.com/w/cpp/filesystem/is_directory +inline bool is_directory(StringPiece path, std::error_code& ec) noexcept { + return is_directory(status(path, ec)); +} + +/// https://en.cppreference.com/w/cpp/filesystem/file_size +inline std::uintmax_t file_size( + StringPiece path, + std::error_code& ec) noexcept { + auto stat = status(path, ec); + if (ec) { + return std::numeric_limits::max(); + } + if (!is_regular_file(stat)) { + ec.assign(ENOTSUP, std::generic_category()); + return std::numeric_limits::max(); + } + ec.clear(); + return stat.st_size; +} +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Likely.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Likely.h new file mode 100644 index 0000000000..52243a64ea --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Likely.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +/** + * Compiler hints to indicate the fast path of an "if" branch: whether + * the if condition is likely to be true or false. + * + * @author Tudor Bosman (tudorb@fb.com) + */ + +#pragma once + +#undef LIKELY +#undef UNLIKELY + +#if defined(__GNUC__) && __GNUC__ >= 4 +#define LIKELY(x) (__builtin_expect((x), 1)) +#define UNLIKELY(x) (__builtin_expect((x), 0)) +#else +#define LIKELY(x) (x) +#define UNLIKELY(x) (x) +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Portability.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Portability.h new file mode 100644 index 0000000000..ef1f86e51f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Portability.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +#pragma once + +#include + +// Required for windows, which defines min/max, but we want the std:: version. +#undef min +#undef max diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Range.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Range.h new file mode 100644 index 0000000000..0fd8f9f865 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/Range.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +/** + * A subset of `folly/Range.h`. + * All code copied verbatim modulo formatting + */ +#pragma once + +#include "utils/Likely.h" +#include "utils/Portability.h" + +#include +#include +#include +#include +#include +#include + +namespace pzstd { + +namespace detail { +/* + *Use IsCharPointer::type to enable const char* or char*. + *Use IsCharPointer::const_type to enable only const char*. +*/ +template +struct IsCharPointer {}; + +template <> +struct IsCharPointer { + typedef int type; +}; + +template <> +struct IsCharPointer { + typedef int const_type; + typedef int type; +}; + +} // namespace detail + +template +class Range { + Iter b_; + Iter e_; + + public: + using size_type = std::size_t; + using iterator = Iter; + using const_iterator = Iter; + using value_type = typename std::remove_reference< + typename std::iterator_traits::reference>::type; + using reference = typename std::iterator_traits::reference; + + constexpr Range() : b_(), e_() {} + constexpr Range(Iter begin, Iter end) : b_(begin), e_(end) {} + + constexpr Range(Iter begin, size_type size) : b_(begin), e_(begin + size) {} + + template ::type = 0> + /* implicit */ Range(Iter str) : b_(str), e_(str + std::strlen(str)) {} + + template ::const_type = 0> + /* implicit */ Range(const std::string& str) + : b_(str.data()), e_(b_ + str.size()) {} + + // Allow implicit conversion from Range to Range if From is + // implicitly convertible to To. + template < + class OtherIter, + typename std::enable_if< + (!std::is_same::value && + std::is_convertible::value), + int>::type = 0> + constexpr /* implicit */ Range(const Range& other) + : b_(other.begin()), e_(other.end()) {} + + Range(const Range&) = default; + Range(Range&&) = default; + + Range& operator=(const Range&) = default; + Range& operator=(Range&&) = default; + + constexpr size_type size() const { + return e_ - b_; + } + bool empty() const { + return b_ == e_; + } + Iter data() const { + return b_; + } + Iter begin() const { + return b_; + } + Iter end() const { + return e_; + } + + void advance(size_type n) { + if (UNLIKELY(n > size())) { + throw std::out_of_range("index out of range"); + } + b_ += n; + } + + void subtract(size_type n) { + if (UNLIKELY(n > size())) { + throw std::out_of_range("index out of range"); + } + e_ -= n; + } + + Range subpiece(size_type first, size_type length = std::string::npos) const { + if (UNLIKELY(first > size())) { + throw std::out_of_range("index out of range"); + } + + return Range(b_ + first, std::min(length, size() - first)); + } +}; + +using ByteRange = Range; +using MutableByteRange = Range; +using StringPiece = Range; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ResourcePool.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ResourcePool.h new file mode 100644 index 0000000000..7c4bb62358 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ResourcePool.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include +#include +#include +#include +#include + +namespace pzstd { + +/** + * An unbounded pool of resources. + * A `ResourcePool` requires a factory function that takes allocates `T*` and + * a free function that frees a `T*`. + * Calling `ResourcePool::get()` will give you a new `ResourcePool::UniquePtr` + * to a `T`, and when it goes out of scope the resource will be returned to the + * pool. + * The `ResourcePool` *must* survive longer than any resources it hands out. + * Remember that `ResourcePool` hands out mutable `T`s, so make sure to clean + * up the resource before or after every use. + */ +template +class ResourcePool { + public: + class Deleter; + using Factory = std::function; + using Free = std::function; + using UniquePtr = std::unique_ptr; + + private: + std::mutex mutex_; + Factory factory_; + Free free_; + std::vector resources_; + unsigned inUse_; + + public: + /** + * Creates a `ResourcePool`. + * + * @param factory The function to use to create new resources. + * @param free The function to use to free resources created by `factory`. + */ + ResourcePool(Factory factory, Free free) + : factory_(std::move(factory)), free_(std::move(free)), inUse_(0) {} + + /** + * @returns A unique pointer to a resource. The resource is null iff + * there are no available resources and `factory()` returns null. + */ + UniquePtr get() { + std::lock_guard lock(mutex_); + if (!resources_.empty()) { + UniquePtr resource{resources_.back(), Deleter{*this}}; + resources_.pop_back(); + ++inUse_; + return resource; + } + UniquePtr resource{factory_(), Deleter{*this}}; + ++inUse_; + return resource; + } + + ~ResourcePool() noexcept { + assert(inUse_ == 0); + for (const auto resource : resources_) { + free_(resource); + } + } + + class Deleter { + ResourcePool *pool_; + public: + explicit Deleter(ResourcePool &pool) : pool_(&pool) {} + + void operator() (T *resource) { + std::lock_guard lock(pool_->mutex_); + // Make sure we don't put null resources into the pool + if (resource) { + pool_->resources_.push_back(resource); + } + assert(pool_->inUse_ > 0); + --pool_->inUse_; + } + }; +}; + +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ScopeGuard.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ScopeGuard.h new file mode 100644 index 0000000000..911fd98421 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ScopeGuard.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include + +namespace pzstd { + +/** + * Dismissable scope guard. + * `Function` must be callable and take no parameters. + * Unless `dismiss()` is called, the callable is executed upon destruction of + * `ScopeGuard`. + * + * Example: + * + * auto guard = makeScopeGuard([&] { cleanup(); }); + */ +template +class ScopeGuard { + Function function; + bool dismissed; + + public: + explicit ScopeGuard(Function&& function) + : function(std::move(function)), dismissed(false) {} + + void dismiss() { + dismissed = true; + } + + ~ScopeGuard() noexcept { + if (!dismissed) { + function(); + } + } +}; + +/// Creates a scope guard from `function`. +template +ScopeGuard makeScopeGuard(Function&& function) { + return ScopeGuard(std::forward(function)); +} +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ThreadPool.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ThreadPool.h new file mode 100644 index 0000000000..a087d7c1cf --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/ThreadPool.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include "utils/WorkQueue.h" + +#include +#include +#include +#include + +namespace pzstd { +/// A simple thread pool that pulls tasks off its queue in FIFO order. +class ThreadPool { + std::vector threads_; + + WorkQueue> tasks_; + + public: + /// Constructs a thread pool with `numThreads` threads. + explicit ThreadPool(std::size_t numThreads) { + threads_.reserve(numThreads); + for (std::size_t i = 0; i < numThreads; ++i) { + threads_.emplace_back([this] { + std::function task; + while (tasks_.pop(task)) { + task(); + } + }); + } + } + + /// Finishes all tasks currently in the queue. + ~ThreadPool() { + tasks_.finish(); + for (auto& thread : threads_) { + thread.join(); + } + } + + /** + * Adds `task` to the queue of tasks to execute. Since `task` is a + * `std::function<>`, it cannot be a move only type. So any lambda passed must + * not capture move only types (like `std::unique_ptr`). + * + * @param task The task to execute. + */ + void add(std::function task) { + tasks_.push(std::move(task)); + } +}; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/WorkQueue.h b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/WorkQueue.h new file mode 100644 index 0000000000..07842e5981 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/WorkQueue.h @@ -0,0 +1,182 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#pragma once + +#include "utils/Buffer.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pzstd { + +/// Unbounded thread-safe work queue. +template +class WorkQueue { + // Protects all member variable access + std::mutex mutex_; + std::condition_variable readerCv_; + std::condition_variable writerCv_; + std::condition_variable finishCv_; + + std::queue queue_; + bool done_; + std::size_t maxSize_; + + // Must have lock to call this function + bool full() const { + if (maxSize_ == 0) { + return false; + } + return queue_.size() >= maxSize_; + } + + public: + /** + * Constructs an empty work queue with an optional max size. + * If `maxSize == 0` the queue size is unbounded. + * + * @param maxSize The maximum allowed size of the work queue. + */ + WorkQueue(std::size_t maxSize = 0) : done_(false), maxSize_(maxSize) {} + + /** + * Push an item onto the work queue. Notify a single thread that work is + * available. If `finish()` has been called, do nothing and return false. + * If `push()` returns false, then `item` has not been moved from. + * + * @param item Item to push onto the queue. + * @returns True upon success, false if `finish()` has been called. An + * item was pushed iff `push()` returns true. + */ + bool push(T&& item) { + { + std::unique_lock lock(mutex_); + while (full() && !done_) { + writerCv_.wait(lock); + } + if (done_) { + return false; + } + queue_.push(std::move(item)); + } + readerCv_.notify_one(); + return true; + } + + /** + * Attempts to pop an item off the work queue. It will block until data is + * available or `finish()` has been called. + * + * @param[out] item If `pop` returns `true`, it contains the popped item. + * If `pop` returns `false`, it is unmodified. + * @returns True upon success. False if the queue is empty and + * `finish()` has been called. + */ + bool pop(T& item) { + { + std::unique_lock lock(mutex_); + while (queue_.empty() && !done_) { + readerCv_.wait(lock); + } + if (queue_.empty()) { + assert(done_); + return false; + } + item = std::move(queue_.front()); + queue_.pop(); + } + writerCv_.notify_one(); + return true; + } + + /** + * Sets the maximum queue size. If `maxSize == 0` then it is unbounded. + * + * @param maxSize The new maximum queue size. + */ + void setMaxSize(std::size_t maxSize) { + { + std::lock_guard lock(mutex_); + maxSize_ = maxSize; + } + writerCv_.notify_all(); + } + + /** + * Promise that either the reader side or the writer side is done. + * If the writer is done, `push()` won't be called again, so once the queue + * is empty there will never be any more work. If the reader is done, `pop()` + * won't be called again, so further items pushed will just be ignored. + */ + void finish() { + { + std::lock_guard lock(mutex_); + done_ = true; + } + readerCv_.notify_all(); + writerCv_.notify_all(); + finishCv_.notify_all(); + } + + /// Blocks until `finish()` has been called (but the queue may not be empty). + void waitUntilFinished() { + std::unique_lock lock(mutex_); + while (!done_) { + finishCv_.wait(lock); + } + } +}; + +/// Work queue for `Buffer`s that knows the total number of bytes in the queue. +class BufferWorkQueue { + WorkQueue queue_; + std::atomic size_; + + public: + BufferWorkQueue(std::size_t maxSize = 0) : queue_(maxSize), size_(0) {} + + void push(Buffer buffer) { + size_.fetch_add(buffer.size()); + queue_.push(std::move(buffer)); + } + + bool pop(Buffer& buffer) { + bool result = queue_.pop(buffer); + if (result) { + size_.fetch_sub(buffer.size()); + } + return result; + } + + void setMaxSize(std::size_t maxSize) { + queue_.setMaxSize(maxSize); + } + + void finish() { + queue_.finish(); + } + + /** + * Blocks until `finish()` has been called. + * + * @returns The total number of bytes of all the `Buffer`s currently in the + * queue. + */ + std::size_t size() { + queue_.waitUntilFinished(); + return size_.load(); + } +}; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BUCK b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BUCK new file mode 100644 index 0000000000..a5113cab6b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BUCK @@ -0,0 +1,35 @@ +cxx_test( + name='buffer_test', + srcs=['BufferTest.cpp'], + deps=['//contrib/pzstd/utils:buffer'], +) + +cxx_test( + name='range_test', + srcs=['RangeTest.cpp'], + deps=['//contrib/pzstd/utils:range'], +) + +cxx_test( + name='resource_pool_test', + srcs=['ResourcePoolTest.cpp'], + deps=['//contrib/pzstd/utils:resource_pool'], +) + +cxx_test( + name='scope_guard_test', + srcs=['ScopeGuardTest.cpp'], + deps=['//contrib/pzstd/utils:scope_guard'], +) + +cxx_test( + name='thread_pool_test', + srcs=['ThreadPoolTest.cpp'], + deps=['//contrib/pzstd/utils:thread_pool'], +) + +cxx_test( + name='work_queue_test', + srcs=['RangeTest.cpp'], + deps=['//contrib/pzstd/utils:work_queue'], +) diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BufferTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BufferTest.cpp new file mode 100644 index 0000000000..58bf08dcd6 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/BufferTest.cpp @@ -0,0 +1,89 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "utils/Buffer.h" +#include "utils/Range.h" + +#include +#include + +using namespace pzstd; + +namespace { +void deleter(const unsigned char* buf) { + delete[] buf; +} +} + +TEST(Buffer, Constructors) { + Buffer empty; + EXPECT_TRUE(empty.empty()); + EXPECT_EQ(0, empty.size()); + + Buffer sized(5); + EXPECT_FALSE(sized.empty()); + EXPECT_EQ(5, sized.size()); + + Buffer moved(std::move(sized)); + EXPECT_FALSE(sized.empty()); + EXPECT_EQ(5, sized.size()); + + Buffer assigned; + assigned = std::move(moved); + EXPECT_FALSE(sized.empty()); + EXPECT_EQ(5, sized.size()); +} + +TEST(Buffer, BufferManagement) { + std::shared_ptr buf(new unsigned char[10], deleter); + { + Buffer acquired(buf, MutableByteRange(buf.get(), buf.get() + 10)); + EXPECT_EQ(2, buf.use_count()); + Buffer moved(std::move(acquired)); + EXPECT_EQ(2, buf.use_count()); + Buffer assigned; + assigned = std::move(moved); + EXPECT_EQ(2, buf.use_count()); + + Buffer split = assigned.splitAt(5); + EXPECT_EQ(3, buf.use_count()); + + split.advance(1); + assigned.subtract(1); + EXPECT_EQ(3, buf.use_count()); + } + EXPECT_EQ(1, buf.use_count()); +} + +TEST(Buffer, Modifiers) { + Buffer buf(10); + { + unsigned char i = 0; + for (auto& byte : buf.range()) { + byte = i++; + } + } + + auto prefix = buf.splitAt(2); + + ASSERT_EQ(2, prefix.size()); + EXPECT_EQ(0, *prefix.data()); + + ASSERT_EQ(8, buf.size()); + EXPECT_EQ(2, *buf.data()); + + buf.advance(2); + EXPECT_EQ(4, *buf.data()); + + EXPECT_EQ(9, *(buf.range().end() - 1)); + + buf.subtract(2); + EXPECT_EQ(7, *(buf.range().end() - 1)); + + EXPECT_EQ(4, buf.size()); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/RangeTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/RangeTest.cpp new file mode 100644 index 0000000000..8b7dee2719 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/RangeTest.cpp @@ -0,0 +1,82 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "utils/Range.h" + +#include +#include + +using namespace pzstd; + +// Range is directly copied from folly. +// Just some sanity tests to make sure everything seems to work. + +TEST(Range, Constructors) { + StringPiece empty; + EXPECT_TRUE(empty.empty()); + EXPECT_EQ(0, empty.size()); + + std::string str = "hello"; + { + Range piece(str.begin(), str.end()); + EXPECT_EQ(5, piece.size()); + EXPECT_EQ('h', *piece.data()); + EXPECT_EQ('o', *(piece.end() - 1)); + } + + { + StringPiece piece(str.data(), str.size()); + EXPECT_EQ(5, piece.size()); + EXPECT_EQ('h', *piece.data()); + EXPECT_EQ('o', *(piece.end() - 1)); + } + + { + StringPiece piece(str); + EXPECT_EQ(5, piece.size()); + EXPECT_EQ('h', *piece.data()); + EXPECT_EQ('o', *(piece.end() - 1)); + } + + { + StringPiece piece(str.c_str()); + EXPECT_EQ(5, piece.size()); + EXPECT_EQ('h', *piece.data()); + EXPECT_EQ('o', *(piece.end() - 1)); + } +} + +TEST(Range, Modifiers) { + StringPiece range("hello world"); + ASSERT_EQ(11, range.size()); + + { + auto hello = range.subpiece(0, 5); + EXPECT_EQ(5, hello.size()); + EXPECT_EQ('h', *hello.data()); + EXPECT_EQ('o', *(hello.end() - 1)); + } + { + auto hello = range; + hello.subtract(6); + EXPECT_EQ(5, hello.size()); + EXPECT_EQ('h', *hello.data()); + EXPECT_EQ('o', *(hello.end() - 1)); + } + { + auto world = range; + world.advance(6); + EXPECT_EQ(5, world.size()); + EXPECT_EQ('w', *world.data()); + EXPECT_EQ('d', *(world.end() - 1)); + } + + std::string expected = "hello world"; + EXPECT_EQ(expected, std::string(range.begin(), range.end())); + EXPECT_EQ(expected, std::string(range.data(), range.size())); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ResourcePoolTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ResourcePoolTest.cpp new file mode 100644 index 0000000000..750ee084b0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ResourcePoolTest.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "utils/ResourcePool.h" + +#include +#include +#include + +using namespace pzstd; + +TEST(ResourcePool, FullTest) { + unsigned numCreated = 0; + unsigned numDeleted = 0; + { + ResourcePool pool( + [&numCreated] { ++numCreated; return new int{5}; }, + [&numDeleted](int *x) { ++numDeleted; delete x; }); + + { + auto i = pool.get(); + EXPECT_EQ(5, *i); + *i = 6; + } + { + auto i = pool.get(); + EXPECT_EQ(6, *i); + auto j = pool.get(); + EXPECT_EQ(5, *j); + *j = 7; + } + { + auto i = pool.get(); + EXPECT_EQ(6, *i); + auto j = pool.get(); + EXPECT_EQ(7, *j); + } + } + EXPECT_EQ(2, numCreated); + EXPECT_EQ(numCreated, numDeleted); +} + +TEST(ResourcePool, ThreadSafe) { + std::atomic numCreated{0}; + std::atomic numDeleted{0}; + { + ResourcePool pool( + [&numCreated] { ++numCreated; return new int{0}; }, + [&numDeleted](int *x) { ++numDeleted; delete x; }); + auto push = [&pool] { + for (int i = 0; i < 100; ++i) { + auto x = pool.get(); + ++*x; + } + }; + std::thread t1{push}; + std::thread t2{push}; + t1.join(); + t2.join(); + + auto x = pool.get(); + auto y = pool.get(); + EXPECT_EQ(200, *x + *y); + } + EXPECT_GE(2, numCreated); + EXPECT_EQ(numCreated, numDeleted); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ScopeGuardTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ScopeGuardTest.cpp new file mode 100644 index 0000000000..0f77cdf38b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ScopeGuardTest.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "utils/ScopeGuard.h" + +#include + +using namespace pzstd; + +TEST(ScopeGuard, Dismiss) { + { + auto guard = makeScopeGuard([&] { EXPECT_TRUE(false); }); + guard.dismiss(); + } +} + +TEST(ScopeGuard, Executes) { + bool executed = false; + { + auto guard = makeScopeGuard([&] { executed = true; }); + } + EXPECT_TRUE(executed); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ThreadPoolTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ThreadPoolTest.cpp new file mode 100644 index 0000000000..a01052e605 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/ThreadPoolTest.cpp @@ -0,0 +1,71 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "utils/ThreadPool.h" + +#include +#include +#include +#include +#include + +using namespace pzstd; + +TEST(ThreadPool, Ordering) { + std::vector results; + + { + ThreadPool executor(1); + for (int i = 0; i < 10; ++i) { + executor.add([ &results, i ] { results.push_back(i); }); + } + } + + for (int i = 0; i < 10; ++i) { + EXPECT_EQ(i, results[i]); + } +} + +TEST(ThreadPool, AllJobsFinished) { + std::atomic numFinished{0}; + std::atomic start{false}; + { + std::cerr << "Creating executor" << std::endl; + ThreadPool executor(5); + for (int i = 0; i < 10; ++i) { + executor.add([ &numFinished, &start ] { + while (!start.load()) { + std::this_thread::yield(); + } + ++numFinished; + }); + } + std::cerr << "Starting" << std::endl; + start.store(true); + std::cerr << "Finishing" << std::endl; + } + EXPECT_EQ(10, numFinished.load()); +} + +TEST(ThreadPool, AddJobWhileJoining) { + std::atomic done{false}; + { + ThreadPool executor(1); + executor.add([&executor, &done] { + while (!done.load()) { + std::this_thread::yield(); + } + // Sleep for a second to be sure that we are joining + std::this_thread::sleep_for(std::chrono::seconds(1)); + executor.add([] { + EXPECT_TRUE(false); + }); + }); + done.store(true); + } +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/WorkQueueTest.cpp b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/WorkQueueTest.cpp new file mode 100644 index 0000000000..16600bb603 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/pzstd/utils/test/WorkQueueTest.cpp @@ -0,0 +1,282 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ +#include "utils/Buffer.h" +#include "utils/WorkQueue.h" + +#include +#include +#include +#include +#include +#include + +using namespace pzstd; + +namespace { +struct Popper { + WorkQueue* queue; + int* results; + std::mutex* mutex; + + void operator()() { + int result; + while (queue->pop(result)) { + std::lock_guard lock(*mutex); + results[result] = result; + } + } +}; +} + +TEST(WorkQueue, SingleThreaded) { + WorkQueue queue; + int result; + + queue.push(5); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(5, result); + + queue.push(1); + queue.push(2); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(1, result); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(2, result); + + queue.push(1); + queue.push(2); + queue.finish(); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(1, result); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(2, result); + EXPECT_FALSE(queue.pop(result)); + + queue.waitUntilFinished(); +} + +TEST(WorkQueue, SPSC) { + WorkQueue queue; + const int max = 100; + + for (int i = 0; i < 10; ++i) { + queue.push(int{i}); + } + + std::thread thread([ &queue, max ] { + int result; + for (int i = 0;; ++i) { + if (!queue.pop(result)) { + EXPECT_EQ(i, max); + break; + } + EXPECT_EQ(i, result); + } + }); + + std::this_thread::yield(); + for (int i = 10; i < max; ++i) { + queue.push(int{i}); + } + queue.finish(); + + thread.join(); +} + +TEST(WorkQueue, SPMC) { + WorkQueue queue; + std::vector results(50, -1); + std::mutex mutex; + std::vector threads; + for (int i = 0; i < 5; ++i) { + threads.emplace_back(Popper{&queue, results.data(), &mutex}); + } + + for (int i = 0; i < 50; ++i) { + queue.push(int{i}); + } + queue.finish(); + + for (auto& thread : threads) { + thread.join(); + } + + for (int i = 0; i < 50; ++i) { + EXPECT_EQ(i, results[i]); + } +} + +TEST(WorkQueue, MPMC) { + WorkQueue queue; + std::vector results(100, -1); + std::mutex mutex; + std::vector popperThreads; + for (int i = 0; i < 4; ++i) { + popperThreads.emplace_back(Popper{&queue, results.data(), &mutex}); + } + + std::vector pusherThreads; + for (int i = 0; i < 2; ++i) { + auto min = i * 50; + auto max = (i + 1) * 50; + pusherThreads.emplace_back( + [ &queue, min, max ] { + for (int i = min; i < max; ++i) { + queue.push(int{i}); + } + }); + } + + for (auto& thread : pusherThreads) { + thread.join(); + } + queue.finish(); + + for (auto& thread : popperThreads) { + thread.join(); + } + + for (int i = 0; i < 100; ++i) { + EXPECT_EQ(i, results[i]); + } +} + +TEST(WorkQueue, BoundedSizeWorks) { + WorkQueue queue(1); + int result; + queue.push(5); + queue.pop(result); + queue.push(5); + queue.pop(result); + queue.push(5); + queue.finish(); + queue.pop(result); + EXPECT_EQ(5, result); +} + +TEST(WorkQueue, BoundedSizePushAfterFinish) { + WorkQueue queue(1); + int result; + queue.push(5); + std::thread pusher([&queue] { + queue.push(6); + }); + // Dirtily try and make sure that pusher has run. + std::this_thread::sleep_for(std::chrono::seconds(1)); + queue.finish(); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(5, result); + EXPECT_FALSE(queue.pop(result)); + + pusher.join(); +} + +TEST(WorkQueue, SetMaxSize) { + WorkQueue queue(2); + int result; + queue.push(5); + queue.push(6); + queue.setMaxSize(1); + std::thread pusher([&queue] { + queue.push(7); + }); + // Dirtily try and make sure that pusher has run. + std::this_thread::sleep_for(std::chrono::seconds(1)); + queue.finish(); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(5, result); + EXPECT_TRUE(queue.pop(result)); + EXPECT_EQ(6, result); + EXPECT_FALSE(queue.pop(result)); + + pusher.join(); +} + +TEST(WorkQueue, BoundedSizeMPMC) { + WorkQueue queue(10); + std::vector results(200, -1); + std::mutex mutex; + std::cerr << "Creating popperThreads" << std::endl; + std::vector popperThreads; + for (int i = 0; i < 4; ++i) { + popperThreads.emplace_back(Popper{&queue, results.data(), &mutex}); + } + + std::cerr << "Creating pusherThreads" << std::endl; + std::vector pusherThreads; + for (int i = 0; i < 2; ++i) { + auto min = i * 100; + auto max = (i + 1) * 100; + pusherThreads.emplace_back( + [ &queue, min, max ] { + for (int i = min; i < max; ++i) { + queue.push(int{i}); + } + }); + } + + std::cerr << "Joining pusherThreads" << std::endl; + for (auto& thread : pusherThreads) { + thread.join(); + } + std::cerr << "Finishing queue" << std::endl; + queue.finish(); + + std::cerr << "Joining popperThreads" << std::endl; + for (auto& thread : popperThreads) { + thread.join(); + } + + std::cerr << "Inspecting results" << std::endl; + for (int i = 0; i < 200; ++i) { + EXPECT_EQ(i, results[i]); + } +} + +TEST(WorkQueue, FailedPush) { + WorkQueue> queue; + std::unique_ptr x(new int{5}); + EXPECT_TRUE(queue.push(std::move(x))); + EXPECT_EQ(nullptr, x); + queue.finish(); + x.reset(new int{6}); + EXPECT_FALSE(queue.push(std::move(x))); + EXPECT_NE(nullptr, x); + EXPECT_EQ(6, *x); +} + +TEST(BufferWorkQueue, SizeCalculatedCorrectly) { + { + BufferWorkQueue queue; + queue.finish(); + EXPECT_EQ(0, queue.size()); + } + { + BufferWorkQueue queue; + queue.push(Buffer(10)); + queue.finish(); + EXPECT_EQ(10, queue.size()); + } + { + BufferWorkQueue queue; + queue.push(Buffer(10)); + queue.push(Buffer(5)); + queue.finish(); + EXPECT_EQ(15, queue.size()); + } + { + BufferWorkQueue queue; + queue.push(Buffer(10)); + queue.push(Buffer(5)); + queue.finish(); + Buffer buffer; + queue.pop(buffer); + EXPECT_EQ(5, queue.size()); + } +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/recovery/Makefile b/cpp/third_party/zstd-1.5.7/contrib/recovery/Makefile new file mode 100644 index 0000000000..be6ea4b0e9 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/recovery/Makefile @@ -0,0 +1,35 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +.PHONY: all +all: recover_directory + +ZSTDLIBDIR ?= ../../lib +PROGRAMDIR ?= ../../programs + +CFLAGS ?= -O3 +CFLAGS += -I$(ZSTDLIBDIR) -I$(PROGRAMDIR) +CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum \ + -Wstrict-prototypes -Wundef \ + -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ + -Wredundant-decls -Wmissing-prototypes +CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) +FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) + +.PHONY: $(ZSTDLIBDIR)/libzstd.a +$(ZSTDLIBDIR)/libzstd.a: + $(MAKE) -C $(ZSTDLIBDIR) libzstd.a + +recover_directory: recover_directory.c $(ZSTDLIBDIR)/libzstd.a $(PROGRAMDIR)/util.c + $(CC) $(FLAGS) $^ -o $@$(EXT) + +.PHONY: clean +clean: + rm -f recover_directory diff --git a/cpp/third_party/zstd-1.5.7/contrib/recovery/recover_directory.c b/cpp/third_party/zstd-1.5.7/contrib/recovery/recover_directory.c new file mode 100644 index 0000000000..b9bd7ab499 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/recovery/recover_directory.c @@ -0,0 +1,152 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include +#include +#include + +#define ZSTD_STATIC_LINKING_ONLY +#include "util.h" +#include "zstd.h" + +#define CHECK(cond, ...) \ + do { \ + if (!(cond)) { \ + fprintf(stderr, "%s:%d CHECK(%s) failed: ", __FILE__, __LINE__, #cond); \ + fprintf(stderr, "" __VA_ARGS__); \ + fprintf(stderr, "\n"); \ + exit(1); \ + } \ + } while (0) + +static void usage(char const *program) { + fprintf(stderr, "USAGE: %s FILE.zst PREFIX\n", program); + fprintf(stderr, "FILE.zst: A zstd compressed file with multiple frames\n"); + fprintf(stderr, "PREFIX: The output prefix. Uncompressed files will be " + "created named ${PREFIX}0 ${PREFIX}1...\n\n"); + fprintf(stderr, "This program takes concatenated zstd frames and " + "decompresses them into individual files.\n"); + fprintf(stderr, "E.g. files created with a command like: zstd -r directory " + "-o file.zst\n"); +} + +typedef struct { + char *data; + size_t size; + size_t frames; + size_t maxFrameSize; +} ZstdFrames; + +static ZstdFrames readFile(char const *fileName) { + U64 const fileSize = UTIL_getFileSize(fileName); + CHECK(fileSize != UTIL_FILESIZE_UNKNOWN, "Unknown file size!"); + + char *const data = (char *)malloc(fileSize); + CHECK(data != NULL, "Allocation failed"); + + FILE *file = fopen(fileName, "rb"); + CHECK(file != NULL, "fopen failed"); + + size_t const readSize = fread(data, 1, fileSize, file); + CHECK(readSize == fileSize, "fread failed"); + + fclose(file); + ZstdFrames frames; + frames.data = (char *)data; + frames.size = fileSize; + frames.frames = 0; + + size_t index; + size_t maxFrameSize = 0; + for (index = 0; index < fileSize;) { + size_t const frameSize = + ZSTD_findFrameCompressedSize(data + index, fileSize - index); + CHECK(!ZSTD_isError(frameSize), "Bad zstd frame: %s", + ZSTD_getErrorName(frameSize)); + if (frameSize > maxFrameSize) + maxFrameSize = frameSize; + frames.frames += 1; + index += frameSize; + } + CHECK(index == fileSize, "Zstd file corrupt!"); + frames.maxFrameSize = maxFrameSize; + + return frames; +} + +static int computePadding(size_t numFrames) { + return snprintf(NULL, 0, "%u", (unsigned)numFrames); +} + +int main(int argc, char **argv) { + if (argc != 3) { + usage(argv[0]); + exit(1); + } + char const *const zstdFile = argv[1]; + char const *const prefix = argv[2]; + + ZstdFrames frames = readFile(zstdFile); + + if (frames.frames <= 1) { + fprintf( + stderr, + "%s only has %u zstd frame. Simply use `zstd -d` to decompress it.\n", + zstdFile, (unsigned)frames.frames); + exit(1); + } + + int const padding = computePadding(frames.frames - 1); + + size_t const outFileNameSize = strlen(prefix) + padding + 1; + char* outFileName = malloc(outFileNameSize); + CHECK(outFileName != NULL, "Allocation failure"); + + size_t const bufferSize = 128 * 1024; + void *buffer = malloc(bufferSize); + CHECK(buffer != NULL, "Allocation failure"); + + ZSTD_DCtx* dctx = ZSTD_createDCtx(); + CHECK(dctx != NULL, "Allocation failure"); + + fprintf(stderr, "Recovering %u files...\n", (unsigned)frames.frames); + + size_t index; + size_t frame = 0; + for (index = 0; index < frames.size; ++frame) { + size_t const frameSize = + ZSTD_findFrameCompressedSize(frames.data + index, frames.size - index); + + int const ret = snprintf(outFileName, outFileNameSize, "%s%0*u", prefix, padding, (unsigned)frame); + CHECK(ret >= 0 && (size_t)ret <= outFileNameSize, "snprintf failed!"); + + FILE* outFile = fopen(outFileName, "wb"); + CHECK(outFile != NULL, "fopen failed"); + + ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only); + ZSTD_inBuffer in = {frames.data + index, frameSize, 0}; + while (in.pos < in.size) { + ZSTD_outBuffer out = {buffer, bufferSize, 0}; + CHECK(!ZSTD_isError(ZSTD_decompressStream(dctx, &out, &in)), "decompression failed"); + size_t const writeSize = fwrite(out.dst, 1, out.pos, outFile); + CHECK(writeSize == out.pos, "fwrite failed"); + } + fclose(outFile); + fprintf(stderr, "Recovered %s\n", outFileName); + index += frameSize; + } + fprintf(stderr, "Complete\n"); + + free(outFileName); + ZSTD_freeDCtx(dctx); + free(buffer); + free(frames.data); + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/README.md b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/README.md new file mode 100644 index 0000000000..fedf96bab4 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/README.md @@ -0,0 +1,42 @@ +# Zstandard Seekable Format + +The seekable format splits compressed data into a series of independent "frames", +each compressed individually, +so that decompression of a section in the middle of an archive +only requires zstd to decompress at most a frame's worth of extra data, +instead of the entire archive. + +The frames are appended, so that the decompression of the entire payload +still regenerates the original content, using any compliant zstd decoder. + +On top of that, the seekable format generates a jump table, +which makes it possible to jump directly to the position of the relevant frame +when requesting only a segment of the data. +The jump table is simply ignored by zstd decoders unaware of the seekable format. + +The format is delivered with an API to create seekable archives +and to retrieve arbitrary segments inside the archive. + +### Maximum Frame Size parameter + +When creating a seekable archive, the main parameter is the maximum frame size. + +At compression time, user can manually select the boundaries between segments, +but they don't have to: long segments will be automatically split +when larger than selected maximum frame size. + +Small frame sizes reduce decompression cost when requesting small segments, +because the decoder will nonetheless have to decompress an entire frame +to recover just a single byte from it. + +A good rule of thumb is to select a maximum frame size roughly equivalent +to the access pattern when it's known. +For example, if the application tends to request 4KB blocks, +then it's a good idea to set a maximum frame size in the vicinity of 4 KB. + +But small frame sizes also reduce compression ratio, +and increase the cost for the jump table, +so there is a balance to find. + +In general, try to avoid really tiny frame sizes (<1 KB), +which would have a large negative impact on compression ratio. diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/.gitignore new file mode 100644 index 0000000000..0b83f5e11c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/.gitignore @@ -0,0 +1,5 @@ +seekable_compression +seekable_decompression +seekable_decompression_mem +parallel_processing +parallel_compression diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/Makefile b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/Makefile new file mode 100644 index 0000000000..fcc04587ce --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/Makefile @@ -0,0 +1,53 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +# This Makefile presumes libzstd is built, using `make` in / or /lib/ + +ZSTDLIB_PATH = ../../../lib +ZSTDLIB_NAME = libzstd.a +ZSTDLIB = $(ZSTDLIB_PATH)/$(ZSTDLIB_NAME) + +CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I../ -I../../../lib -I../../../lib/common + +CFLAGS ?= -O3 +CFLAGS += -g + +SEEKABLE_OBJS = ../zstdseek_compress.c ../zstdseek_decompress.c $(ZSTDLIB) + +.PHONY: default all clean test + +default: all + +all: seekable_compression seekable_decompression seekable_decompression_mem \ + parallel_processing + +$(ZSTDLIB): + make -C $(ZSTDLIB_PATH) $(ZSTDLIB_NAME) + +seekable_compression : seekable_compression.c $(SEEKABLE_OBJS) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +seekable_decompression : seekable_decompression.c $(SEEKABLE_OBJS) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +seekable_decompression_mem : seekable_decompression_mem.c $(SEEKABLE_OBJS) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +parallel_processing : parallel_processing.c $(SEEKABLE_OBJS) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ -pthread + +parallel_compression : parallel_compression.c $(SEEKABLE_OBJS) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ -pthread + +clean: + @rm -f core *.o tmp* result* *.zst \ + seekable_compression seekable_decompression \ + seekable_decompression_mem \ + parallel_processing parallel_compression + @echo Cleaning completed diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_compression.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_compression.c new file mode 100644 index 0000000000..4e06fae324 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_compression.c @@ -0,0 +1,214 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +#include // malloc, free, exit, atoi +#include // fprintf, perror, feof, fopen, etc. +#include // strlen, memset, strcat +#define ZSTD_STATIC_LINKING_ONLY +#include // presumes zstd library is installed +#include +#if defined(WIN32) || defined(_WIN32) +# include +# define SLEEP(x) Sleep(x) +#else +# include +# define SLEEP(x) usleep(x * 1000) +#endif + +#include "xxhash.h" + +#include "pool.h" // use zstd thread pool for demo + +#include "../zstd_seekable.h" + +static void* malloc_orDie(size_t size) +{ + void* const buff = malloc(size); + if (buff) return buff; + /* error */ + perror("malloc:"); + exit(1); +} + +static FILE* fopen_orDie(const char *filename, const char *instruction) +{ + FILE* const inFile = fopen(filename, instruction); + if (inFile) return inFile; + /* error */ + perror(filename); + exit(3); +} + +static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) +{ + size_t const readSize = fread(buffer, 1, sizeToRead, file); + if (readSize == sizeToRead) return readSize; /* good */ + if (feof(file)) return readSize; /* good, reached end of file */ + /* error */ + perror("fread"); + exit(4); +} + +static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) +{ + size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); + if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ + /* error */ + perror("fwrite"); + exit(5); +} + +static size_t fclose_orDie(FILE* file) +{ + if (!fclose(file)) return 0; + /* error */ + perror("fclose"); + exit(6); +} + +static void fseek_orDie(FILE* file, long int offset, int origin) +{ + if (!fseek(file, offset, origin)) { + if (!fflush(file)) return; + } + /* error */ + perror("fseek"); + exit(7); +} + +static long int ftell_orDie(FILE* file) +{ + long int off = ftell(file); + if (off != -1) return off; + /* error */ + perror("ftell"); + exit(8); +} + +struct job { + const void* src; + size_t srcSize; + void* dst; + size_t dstSize; + + unsigned checksum; + + int compressionLevel; + int done; +}; + +static void compressFrame(void* opaque) +{ + struct job* job = opaque; + + job->checksum = XXH64(job->src, job->srcSize, 0); + + size_t ret = ZSTD_compress(job->dst, job->dstSize, job->src, job->srcSize, job->compressionLevel); + if (ZSTD_isError(ret)) { + fprintf(stderr, "ZSTD_compress() error : %s \n", ZSTD_getErrorName(ret)); + exit(20); + } + + job->dstSize = ret; + job->done = 1; +} + +static void compressFile_orDie(const char* fname, const char* outName, int cLevel, unsigned frameSize, int nbThreads) +{ + POOL_ctx* pool = POOL_create(nbThreads, nbThreads); + if (pool == NULL) { fprintf(stderr, "POOL_create() error \n"); exit(9); } + + FILE* const fin = fopen_orDie(fname, "rb"); + FILE* const fout = fopen_orDie(outName, "wb"); + + if (ZSTD_compressBound(frameSize) > 0xFFFFFFFFU) { fprintf(stderr, "Frame size too large \n"); exit(10); } + unsigned dstSize = ZSTD_compressBound(frameSize); + + + fseek_orDie(fin, 0, SEEK_END); + long int length = ftell_orDie(fin); + fseek_orDie(fin, 0, SEEK_SET); + + size_t numFrames = (length + frameSize - 1) / frameSize; + + struct job* jobs = malloc_orDie(sizeof(struct job) * numFrames); + + size_t i; + for(i = 0; i < numFrames; i++) { + void* in = malloc_orDie(frameSize); + void* out = malloc_orDie(dstSize); + + size_t inSize = fread_orDie(in, frameSize, fin); + + jobs[i].src = in; + jobs[i].srcSize = inSize; + jobs[i].dst = out; + jobs[i].dstSize = dstSize; + jobs[i].compressionLevel = cLevel; + jobs[i].done = 0; + POOL_add(pool, compressFrame, &jobs[i]); + } + + ZSTD_frameLog* fl = ZSTD_seekable_createFrameLog(1); + if (fl == NULL) { fprintf(stderr, "ZSTD_seekable_createFrameLog() failed \n"); exit(11); } + for (i = 0; i < numFrames; i++) { + while (!jobs[i].done) SLEEP(5); /* wake up every 5 milliseconds to check */ + fwrite_orDie(jobs[i].dst, jobs[i].dstSize, fout); + free((void*)jobs[i].src); + free(jobs[i].dst); + + size_t ret = ZSTD_seekable_logFrame(fl, jobs[i].dstSize, jobs[i].srcSize, jobs[i].checksum); + if (ZSTD_isError(ret)) { fprintf(stderr, "ZSTD_seekable_logFrame() error : %s \n", ZSTD_getErrorName(ret)); } + } + + { unsigned char seekTableBuff[1024]; + ZSTD_outBuffer out = {seekTableBuff, 1024, 0}; + while (ZSTD_seekable_writeSeekTable(fl, &out) != 0) { + fwrite_orDie(seekTableBuff, out.pos, fout); + out.pos = 0; + } + fwrite_orDie(seekTableBuff, out.pos, fout); + } + + ZSTD_seekable_freeFrameLog(fl); + free(jobs); + fclose_orDie(fout); + fclose_orDie(fin); +} + +static const char* createOutFilename_orDie(const char* filename) +{ + size_t const inL = strlen(filename); + size_t const outL = inL + 5; + void* outSpace = malloc_orDie(outL); + memset(outSpace, 0, outL); + strcat(outSpace, filename); + strcat(outSpace, ".zst"); + return (const char*)outSpace; +} + +int main(int argc, const char** argv) { + const char* const exeName = argv[0]; + if (argc!=4) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s FILE FRAME_SIZE NB_THREADS\n", exeName); + return 1; + } + + { const char* const inFileName = argv[1]; + unsigned const frameSize = (unsigned)atoi(argv[2]); + int const nbThreads = atoi(argv[3]); + + const char* const outFileName = createOutFilename_orDie(inFileName); + compressFile_orDie(inFileName, outFileName, 5, frameSize, nbThreads); + } + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_processing.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_processing.c new file mode 100644 index 0000000000..928371025c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/parallel_processing.c @@ -0,0 +1,194 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +/* + * A simple demo that sums up all the bytes in the file in parallel using + * seekable decompression and the zstd thread pool + */ + +#include // malloc, exit +#include // fprintf, perror, feof +#include // strerror +#include // errno +#define ZSTD_STATIC_LINKING_ONLY +#include // presumes zstd library is installed +#include +#if defined(_WIN32) +# include +# define SLEEP(x) Sleep(x) +#else +# include +# define SLEEP(x) usleep(x * 1000) +#endif + +#include "pool.h" // use zstd thread pool for demo + +#include "../zstd_seekable.h" + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) + +static void* malloc_orDie(size_t size) +{ + void* const buff = malloc(size); + if (buff) return buff; + /* error */ + perror("malloc"); + exit(1); +} + +static void* realloc_orDie(void* ptr, size_t size) +{ + ptr = realloc(ptr, size); + if (ptr) return ptr; + /* error */ + perror("realloc"); + exit(1); +} + +static FILE* fopen_orDie(const char *filename, const char *instruction) +{ + FILE* const inFile = fopen(filename, instruction); + if (inFile) return inFile; + /* error */ + perror(filename); + exit(3); +} + +static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) +{ + size_t const readSize = fread(buffer, 1, sizeToRead, file); + if (readSize == sizeToRead) return readSize; /* good */ + if (feof(file)) return readSize; /* good, reached end of file */ + /* error */ + perror("fread"); + exit(4); +} + +static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) +{ + size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); + if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ + /* error */ + perror("fwrite"); + exit(5); +} + +static size_t fclose_orDie(FILE* file) +{ + if (!fclose(file)) return 0; + /* error */ + perror("fclose"); + exit(6); +} + +static void fseek_orDie(FILE* file, long int offset, int origin) { + if (!fseek(file, offset, origin)) { + if (!fflush(file)) return; + } + /* error */ + perror("fseek"); + exit(7); +} + +struct sum_job { + const char* fname; + unsigned long long sum; + unsigned frameNb; + int done; +}; + +static void sumFrame(void* opaque) +{ + struct sum_job* job = (struct sum_job*)opaque; + job->done = 0; + + FILE* const fin = fopen_orDie(job->fname, "rb"); + + ZSTD_seekable* const seekable = ZSTD_seekable_create(); + if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } + + size_t const initResult = ZSTD_seekable_initFile(seekable, fin); + if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } + + size_t const frameSize = ZSTD_seekable_getFrameDecompressedSize(seekable, job->frameNb); + unsigned char* data = malloc_orDie(frameSize); + + size_t result = ZSTD_seekable_decompressFrame(seekable, data, frameSize, job->frameNb); + if (ZSTD_isError(result)) { fprintf(stderr, "ZSTD_seekable_decompressFrame() error : %s \n", ZSTD_getErrorName(result)); exit(12); } + + unsigned long long sum = 0; + size_t i; + for (i = 0; i < frameSize; i++) { + sum += data[i]; + } + job->sum = sum; + job->done = 1; + + fclose(fin); + ZSTD_seekable_free(seekable); + free(data); +} + +static void sumFile_orDie(const char* fname, int nbThreads) +{ + POOL_ctx* pool = POOL_create(nbThreads, nbThreads); + if (pool == NULL) { fprintf(stderr, "POOL_create() error \n"); exit(9); } + + FILE* const fin = fopen_orDie(fname, "rb"); + + ZSTD_seekable* const seekable = ZSTD_seekable_create(); + if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } + + size_t const initResult = ZSTD_seekable_initFile(seekable, fin); + if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } + + unsigned const numFrames = ZSTD_seekable_getNumFrames(seekable); + struct sum_job* jobs = (struct sum_job*)malloc(numFrames * sizeof(struct sum_job)); + + unsigned fnb; + for (fnb = 0; fnb < numFrames; fnb++) { + jobs[fnb] = (struct sum_job){ fname, 0, fnb, 0 }; + POOL_add(pool, sumFrame, &jobs[fnb]); + } + + unsigned long long total = 0; + + for (fnb = 0; fnb < numFrames; fnb++) { + while (!jobs[fnb].done) SLEEP(5); /* wake up every 5 milliseconds to check */ + total += jobs[fnb].sum; + } + + printf("Sum: %llu\n", total); + + POOL_free(pool); + ZSTD_seekable_free(seekable); + fclose(fin); + free(jobs); +} + + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc!=3) { + fprintf(stderr, "wrong arguments\n"); + fprintf(stderr, "usage:\n"); + fprintf(stderr, "%s FILE NB_THREADS\n", exeName); + return 1; + } + + { + const char* const inFilename = argv[1]; + int const nbThreads = atoi(argv[2]); + sumFile_orDie(inFilename, nbThreads); + } + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_compression.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_compression.c new file mode 100644 index 0000000000..c3d227dd05 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_compression.c @@ -0,0 +1,136 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +#include // malloc, free, exit, atoi +#include // fprintf, perror, feof, fopen, etc. +#include // strlen, memset, strcat +#define ZSTD_STATIC_LINKING_ONLY +#include // presumes zstd library is installed + +#include "../zstd_seekable.h" + +static void* malloc_orDie(size_t size) +{ + void* const buff = malloc(size); + if (buff) return buff; + /* error */ + perror("malloc:"); + exit(1); +} + +static FILE* fopen_orDie(const char *filename, const char *instruction) +{ + FILE* const inFile = fopen(filename, instruction); + if (inFile) return inFile; + /* error */ + perror(filename); + exit(3); +} + +static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) +{ + size_t const readSize = fread(buffer, 1, sizeToRead, file); + if (readSize == sizeToRead) return readSize; /* good */ + if (feof(file)) return readSize; /* good, reached end of file */ + /* error */ + perror("fread"); + exit(4); +} + +static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) +{ + size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); + if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ + /* error */ + perror("fwrite"); + exit(5); +} + +static size_t fclose_orDie(FILE* file) +{ + if (!fclose(file)) return 0; + /* error */ + perror("fclose"); + exit(6); +} + +static void compressFile_orDie(const char* fname, const char* outName, int cLevel, unsigned frameSize) +{ + FILE* const fin = fopen_orDie(fname, "rb"); + FILE* const fout = fopen_orDie(outName, "wb"); + size_t const buffInSize = ZSTD_CStreamInSize(); /* can always read one full block */ + void* const buffIn = malloc_orDie(buffInSize); + size_t const buffOutSize = ZSTD_CStreamOutSize(); /* can always flush a full block */ + void* const buffOut = malloc_orDie(buffOutSize); + + ZSTD_seekable_CStream* const cstream = ZSTD_seekable_createCStream(); + if (cstream==NULL) { fprintf(stderr, "ZSTD_seekable_createCStream() error \n"); exit(10); } + size_t const initResult = ZSTD_seekable_initCStream(cstream, cLevel, 1, frameSize); + if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_initCStream() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } + + size_t read, toRead = buffInSize; + while( (read = fread_orDie(buffIn, toRead, fin)) ) { + ZSTD_inBuffer input = { buffIn, read, 0 }; + while (input.pos < input.size) { + ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; + toRead = ZSTD_seekable_compressStream(cstream, &output , &input); /* toRead is guaranteed to be <= ZSTD_CStreamInSize() */ + if (ZSTD_isError(toRead)) { fprintf(stderr, "ZSTD_seekable_compressStream() error : %s \n", ZSTD_getErrorName(toRead)); exit(12); } + if (toRead > buffInSize) toRead = buffInSize; /* Safely handle case when `buffInSize` is manually changed to a value < ZSTD_CStreamInSize()*/ + fwrite_orDie(buffOut, output.pos, fout); + } + } + + while (1) { + ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; + size_t const remainingToFlush = ZSTD_seekable_endStream(cstream, &output); /* close stream */ + if (ZSTD_isError(remainingToFlush)) { fprintf(stderr, "ZSTD_seekable_endStream() error : %s \n", ZSTD_getErrorName(remainingToFlush)); exit(13); } + fwrite_orDie(buffOut, output.pos, fout); + if (!remainingToFlush) break; + } + + ZSTD_seekable_freeCStream(cstream); + fclose_orDie(fout); + fclose_orDie(fin); + free(buffIn); + free(buffOut); +} + +static char* createOutFilename_orDie(const char* filename) +{ + size_t const inL = strlen(filename); + size_t const outL = inL + 5; + void* outSpace = malloc_orDie(outL); + memset(outSpace, 0, outL); + strcat(outSpace, filename); + strcat(outSpace, ".zst"); + return (char*)outSpace; +} + +#define CLEVEL_DEFAULT 5 +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + if (argc<3 || argc>4) { + printf("wrong arguments \n"); + printf("usage: \n"); + printf("%s FILE FRAME_SIZE [LEVEL] \n", exeName); + return 1; + } + + { const char* const inFileName = argv[1]; + unsigned const frameSize = (unsigned)atoi(argv[2]); + int const cLevel = (argc==4) ? atoi(argv[3]) : CLEVEL_DEFAULT; + + char* const outFileName = createOutFilename_orDie(inFileName); + compressFile_orDie(inFileName, outFileName, cLevel, frameSize); + free(outFileName); + } + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression.c new file mode 100644 index 0000000000..7edbca87d0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression.c @@ -0,0 +1,141 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + + +#include // malloc, exit +#include // fprintf, perror, feof +#include // strerror +#include // errno +#define ZSTD_STATIC_LINKING_ONLY +#include // presumes zstd library is installed +#include + +#include "../zstd_seekable.h" + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) + +static void* malloc_orDie(size_t size) +{ + void* const buff = malloc(size); + if (buff) return buff; + /* error */ + perror("malloc"); + exit(1); +} + +static void* realloc_orDie(void* ptr, size_t size) +{ + ptr = realloc(ptr, size); + if (ptr) return ptr; + /* error */ + perror("realloc"); + exit(1); +} + +static FILE* fopen_orDie(const char *filename, const char *instruction) +{ + FILE* const inFile = fopen(filename, instruction); + if (inFile) return inFile; + /* error */ + perror(filename); + exit(3); +} + +static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) +{ + size_t const readSize = fread(buffer, 1, sizeToRead, file); + if (readSize == sizeToRead) return readSize; /* good */ + if (feof(file)) return readSize; /* good, reached end of file */ + /* error */ + perror("fread"); + exit(4); +} + +static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) +{ + size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); + if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ + /* error */ + perror("fwrite"); + exit(5); +} + +static size_t fclose_orDie(FILE* file) +{ + if (!fclose(file)) return 0; + /* error */ + perror("fclose"); + exit(6); +} + +static void fseek_orDie(FILE* file, long int offset, int origin) { + if (!fseek(file, offset, origin)) { + if (!fflush(file)) return; + } + /* error */ + perror("fseek"); + exit(7); +} + + +static void decompressFile_orDie(const char* fname, off_t startOffset, off_t endOffset) +{ + FILE* const fin = fopen_orDie(fname, "rb"); + FILE* const fout = stdout; + size_t const buffOutSize = ZSTD_DStreamOutSize(); /* Guarantee to successfully flush at least one complete compressed block in all circumstances. */ + void* const buffOut = malloc_orDie(buffOutSize); + + ZSTD_seekable* const seekable = ZSTD_seekable_create(); + if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } + + size_t const initResult = ZSTD_seekable_initFile(seekable, fin); + if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } + + while (startOffset < endOffset) { + size_t const result = ZSTD_seekable_decompress(seekable, buffOut, MIN(endOffset - startOffset, buffOutSize), startOffset); + if (!result) { + break; + } + + if (ZSTD_isError(result)) { + fprintf(stderr, "ZSTD_seekable_decompress() error : %s \n", + ZSTD_getErrorName(result)); + exit(12); + } + fwrite_orDie(buffOut, result, fout); + startOffset += result; + } + + ZSTD_seekable_free(seekable); + fclose_orDie(fin); + fclose_orDie(fout); + free(buffOut); +} + + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc!=4) { + fprintf(stderr, "wrong arguments\n"); + fprintf(stderr, "usage:\n"); + fprintf(stderr, "%s FILE START END\n", exeName); + return 1; + } + + { + const char* const inFilename = argv[1]; + off_t const startOffset = atoll(argv[2]); + off_t const endOffset = atoll(argv[3]); + decompressFile_orDie(inFilename, startOffset, endOffset); + } + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression_mem.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression_mem.c new file mode 100644 index 0000000000..44a06fbbfb --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/examples/seekable_decompression_mem.c @@ -0,0 +1,147 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + + +#include // malloc, exit +#include // fprintf, perror, feof +#include // strerror +#include // errno +#define ZSTD_STATIC_LINKING_ONLY +#include // presumes zstd library is installed +#include + +#include "zstd_seekable.h" + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) + +#define MAX_FILE_SIZE (8 * 1024 * 1024) + +static void* malloc_orDie(size_t size) +{ + void* const buff = malloc(size); + if (buff) return buff; + /* error */ + perror("malloc"); + exit(1); +} + +static void* realloc_orDie(void* ptr, size_t size) +{ + ptr = realloc(ptr, size); + if (ptr) return ptr; + /* error */ + perror("realloc"); + exit(1); +} + +static FILE* fopen_orDie(const char *filename, const char *instruction) +{ + FILE* const inFile = fopen(filename, instruction); + if (inFile) return inFile; + /* error */ + perror(filename); + exit(3); +} + +static size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) +{ + size_t const readSize = fread(buffer, 1, sizeToRead, file); + if (readSize == sizeToRead) return readSize; /* good */ + if (feof(file)) return readSize; /* good, reached end of file */ + /* error */ + perror("fread"); + exit(4); +} + +static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) +{ + size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); + if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ + /* error */ + perror("fwrite"); + exit(5); +} + +static size_t fclose_orDie(FILE* file) +{ + if (!fclose(file)) return 0; + /* error */ + perror("fclose"); + exit(6); +} + +static void fseek_orDie(FILE* file, long int offset, int origin) { + if (!fseek(file, offset, origin)) { + if (!fflush(file)) return; + } + /* error */ + perror("fseek"); + exit(7); +} + + +static void decompressFile_orDie(const char* fname, off_t startOffset, off_t endOffset) +{ + FILE* const fin = fopen_orDie(fname, "rb"); + FILE* const fout = stdout; + // Just for demo purposes, assume file is <= MAX_FILE_SIZE + void* const buffIn = malloc_orDie(MAX_FILE_SIZE); + size_t const inSize = fread_orDie(buffIn, MAX_FILE_SIZE, fin); + size_t const buffOutSize = ZSTD_DStreamOutSize(); /* Guarantee to successfully flush at least one complete compressed block in all circumstances. */ + void* const buffOut = malloc_orDie(buffOutSize); + + ZSTD_seekable* const seekable = ZSTD_seekable_create(); + if (seekable==NULL) { fprintf(stderr, "ZSTD_seekable_create() error \n"); exit(10); } + + size_t const initResult = ZSTD_seekable_initBuff(seekable, buffIn, inSize); + if (ZSTD_isError(initResult)) { fprintf(stderr, "ZSTD_seekable_init() error : %s \n", ZSTD_getErrorName(initResult)); exit(11); } + + while (startOffset < endOffset) { + size_t const result = ZSTD_seekable_decompress(seekable, buffOut, MIN(endOffset - startOffset, buffOutSize), startOffset); + if (!result) { + break; + } + + if (ZSTD_isError(result)) { + fprintf(stderr, "ZSTD_seekable_decompress() error : %s \n", + ZSTD_getErrorName(result)); + exit(12); + } + fwrite_orDie(buffOut, result, fout); + startOffset += result; + } + + ZSTD_seekable_free(seekable); + fclose_orDie(fin); + fclose_orDie(fout); + free(buffIn); + free(buffOut); +} + + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc!=4) { + fprintf(stderr, "wrong arguments\n"); + fprintf(stderr, "usage:\n"); + fprintf(stderr, "%s FILE START END\n", exeName); + return 1; + } + + { + const char* const inFilename = argv[1]; + off_t const startOffset = atoll(argv[2]); + off_t const endOffset = atoll(argv[3]); + decompressFile_orDie(inFilename, startOffset, endOffset); + } + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/.gitignore b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/.gitignore new file mode 100644 index 0000000000..f831eaf37c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/.gitignore @@ -0,0 +1 @@ +seekable_tests diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/Makefile b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/Makefile new file mode 100644 index 0000000000..a81f2229fa --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/Makefile @@ -0,0 +1,38 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +# This Makefile presumes libzstd is built, using `make` in / or /lib/ + +ZSTDLIB_PATH = ../../../lib +ZSTDLIB_NAME = libzstd.a +ZSTDLIB = $(ZSTDLIB_PATH)/$(ZSTDLIB_NAME) + +CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I../ -I$(ZSTDLIB_PATH) -I$(ZSTDLIB_PATH)/common + +CFLAGS ?= -O3 +CFLAGS += -g -Wall -Wextra -Wcast-qual -Wcast-align -Wconversion \ + -Wformat=2 -Wstrict-aliasing=1 + +SEEKABLE_OBJS = ../zstdseek_compress.c ../zstdseek_decompress.c $(ZSTDLIB) + +.PHONY: default clean test +default: test + +test: seekable_tests + ./seekable_tests + +$(ZSTDLIB): + $(MAKE) -C $(ZSTDLIB_PATH) $(ZSTDLIB_NAME) + +seekable_tests : $(SEEKABLE_OBJS) + +clean: + @$(RM) core *.o tmp* result* *.zst \ + seekable_tests + @echo Cleaning completed diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/seekable_tests.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/seekable_tests.c new file mode 100644 index 0000000000..f89bdc930c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/tests/seekable_tests.c @@ -0,0 +1,363 @@ +#include +#include +#include // malloc +#include +#include +#include + +#include "../zstd_seekable.h" + + +/* ZSTD_seekable_customFile implementation that reads/seeks a buffer while keeping track of total bytes read */ +typedef struct { + const void *ptr; + size_t size; + size_t pos; + size_t totalRead; +} buffWrapperWithTotal_t; + +static int readBuffWithTotal(void* opaque, void* buffer, size_t n) +{ + buffWrapperWithTotal_t* const buff = (buffWrapperWithTotal_t*)opaque; + assert(buff != NULL); + if (buff->pos + n > buff->size) return -1; + memcpy(buffer, (const char*)buff->ptr + buff->pos, n); + buff->pos += n; + buff->totalRead += n; + return 0; +} + +static int seekBuffWithTotal(void* opaque, long long offset, int origin) +{ + buffWrapperWithTotal_t* const buff = (buffWrapperWithTotal_t*) opaque; + unsigned long long newOffset; + assert(buff != NULL); + switch (origin) { + case SEEK_SET: + assert(offset >= 0); + newOffset = (unsigned long long)offset; + break; + case SEEK_CUR: + newOffset = (unsigned long long)((long long)buff->pos + offset); + break; + case SEEK_END: + newOffset = (unsigned long long)((long long)buff->size + offset); + break; + default: + assert(0); /* not possible */ + } + if (newOffset > buff->size) { + return -1; + } + buff->pos = newOffset; + return 0; +} + +/* Basic unit tests for zstd seekable format */ +int main(int argc, const char** argv) +{ + unsigned testNb = 1; + (void)argc; (void)argv; + printf("Beginning zstd seekable format tests...\n"); + + printf("Test %u - simple round trip: ", testNb++); + { size_t const inSize = 4000; + void* const inBuffer = malloc(inSize); + assert(inBuffer != NULL); + + size_t const seekCapacity = 5000; + void* const seekBuffer = malloc(seekCapacity); + assert(seekBuffer != NULL); + size_t seekSize; + + size_t const outCapacity = inSize; + void* const outBuffer = malloc(outCapacity); + assert(outBuffer != NULL); + + ZSTD_seekable_CStream* const zscs = ZSTD_seekable_createCStream(); + assert(zscs != NULL); + + { size_t const initStatus = ZSTD_seekable_initCStream(zscs, 9, 0 /* checksumFlag */, (unsigned)inSize /* maxFrameSize */); + assert(!ZSTD_isError(initStatus)); + } + + { ZSTD_outBuffer outb = { .dst=seekBuffer, .pos=0, .size=seekCapacity }; + ZSTD_inBuffer inb = { .src=inBuffer, .pos=0, .size=inSize }; + + size_t const cStatus = ZSTD_seekable_compressStream(zscs, &outb, &inb); + assert(!ZSTD_isError(cStatus)); + assert(inb.pos == inb.size); + + size_t const endStatus = ZSTD_seekable_endStream(zscs, &outb); + assert(!ZSTD_isError(endStatus)); + seekSize = outb.pos; + } + + ZSTD_seekable* const stream = ZSTD_seekable_create(); + assert(stream != NULL); + { size_t const initStatus = ZSTD_seekable_initBuff(stream, seekBuffer, seekSize); + assert(!ZSTD_isError(initStatus)); } + + { size_t const decStatus = ZSTD_seekable_decompress(stream, outBuffer, outCapacity, 0); + assert(decStatus == inSize); } + + /* unit test ZSTD_seekTable functions */ + ZSTD_seekTable* const zst = ZSTD_seekTable_create_fromSeekable(stream); + assert(zst != NULL); + + unsigned const nbFrames = ZSTD_seekTable_getNumFrames(zst); + assert(nbFrames > 0); + + unsigned long long const frame0Offset = ZSTD_seekTable_getFrameCompressedOffset(zst, 0); + assert(frame0Offset == 0); + + unsigned long long const content0Offset = ZSTD_seekTable_getFrameDecompressedOffset(zst, 0); + assert(content0Offset == 0); + + size_t const cSize = ZSTD_seekTable_getFrameCompressedSize(zst, 0); + assert(!ZSTD_isError(cSize)); + assert(cSize <= seekCapacity); + + size_t const origSize = ZSTD_seekTable_getFrameDecompressedSize(zst, 0); + assert(origSize == inSize); + + unsigned const fo1idx = ZSTD_seekTable_offsetToFrameIndex(zst, 1); + assert(fo1idx == 0); + + free(inBuffer); + free(seekBuffer); + free(outBuffer); + ZSTD_seekable_freeCStream(zscs); + ZSTD_seekTable_free(zst); + ZSTD_seekable_free(stream); + } + printf("Success!\n"); + + + printf("Test %u - check that seekable decompress does not hang: ", testNb++); + { /* Github issue #2335 */ + const size_t compressed_size = 17; + const uint8_t compressed_data[17] = { + '^', + '*', + 'M', + '\x18', + '\t', + '\x00', + '\x00', + '\x00', + '\x00', + '\x00', + '\x00', + '\x00', + (uint8_t)('\x03'), + (uint8_t)('\xb1'), + (uint8_t)('\xea'), + (uint8_t)('\x92'), + (uint8_t)('\x8f'), + }; + const size_t uncompressed_size = 32; + uint8_t uncompressed_data[32]; + + ZSTD_seekable* const stream = ZSTD_seekable_create(); + assert(stream != NULL); + { size_t const status = ZSTD_seekable_initBuff(stream, compressed_data, compressed_size); + if (ZSTD_isError(status)) { + ZSTD_seekable_free(stream); + goto _test_error; + } } + + /* Should return an error, but not hang */ + { const size_t offset = 2; + size_t const status = ZSTD_seekable_decompress(stream, uncompressed_data, uncompressed_size, offset); + if (!ZSTD_isError(status)) { + ZSTD_seekable_free(stream); + goto _test_error; + } } + + ZSTD_seekable_free(stream); + } + printf("Success!\n"); + + printf("Test %u - check #2 that seekable decompress does not hang: ", testNb++); + { /* Github issue #FIXME */ + const size_t compressed_size = 27; + const uint8_t compressed_data[27] = { + (uint8_t)'\x28', + (uint8_t)'\xb5', + (uint8_t)'\x2f', + (uint8_t)'\xfd', + (uint8_t)'\x00', + (uint8_t)'\x32', + (uint8_t)'\x91', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x5e', + (uint8_t)'\x2a', + (uint8_t)'\x4d', + (uint8_t)'\x18', + (uint8_t)'\x09', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\x00', + (uint8_t)'\xb1', + (uint8_t)'\xea', + (uint8_t)'\x92', + (uint8_t)'\x8f', + }; + const size_t uncompressed_size = 400; + uint8_t uncompressed_data[400]; + + ZSTD_seekable* stream = ZSTD_seekable_create(); + size_t status = ZSTD_seekable_initBuff(stream, compressed_data, compressed_size); + if (ZSTD_isError(status)) { + ZSTD_seekable_free(stream); + goto _test_error; + } + + const size_t offset = 2; + /* Should return an error, but not hang */ + status = ZSTD_seekable_decompress(stream, uncompressed_data, uncompressed_size, offset); + if (!ZSTD_isError(status)) { + ZSTD_seekable_free(stream); + goto _test_error; + } + + ZSTD_seekable_free(stream); + } + printf("Success!\n"); + + + printf("Test %u - check ZSTD magic in compressing empty string: ", testNb++); + { // compressing empty string should return a zstd header + size_t const capacity = 255; + char* inBuffer = malloc(capacity); + assert(inBuffer != NULL); + inBuffer[0] = '\0'; + void* const outBuffer = malloc(capacity); + assert(outBuffer != NULL); + + ZSTD_seekable_CStream *s = ZSTD_seekable_createCStream(); + ZSTD_seekable_initCStream(s, 1, 1, 255); + + ZSTD_inBuffer input = { .src=inBuffer, .pos=0, .size=0 }; + ZSTD_outBuffer output = { .dst=outBuffer, .pos=0, .size=capacity }; + + ZSTD_seekable_compressStream(s, &output, &input); + ZSTD_seekable_endStream(s, &output); + + if((((char*)output.dst)[0] != '\x28') | (((char*)output.dst)[1] != '\xb5') | (((char*)output.dst)[2] != '\x2f') | (((char*)output.dst)[3] != '\xfd')) { + printf("%#02x %#02x %#02x %#02x\n", ((char*)output.dst)[0], ((char*)output.dst)[1] , ((char*)output.dst)[2] , ((char*)output.dst)[3] ); + + free(inBuffer); + free(outBuffer); + ZSTD_seekable_freeCStream(s); + goto _test_error; + } + + free(inBuffer); + free(outBuffer); + ZSTD_seekable_freeCStream(s); + } + printf("Success!\n"); + + + printf("Test %u - multiple decompress calls: ", testNb++); + { char const inBuffer[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt"; + size_t const inSize = sizeof(inBuffer); + + size_t const seekCapacity = 5000; + void* const seekBuffer = malloc(seekCapacity); + assert(seekBuffer != NULL); + size_t seekSize; + + size_t const outCapacity = inSize; + char* const outBuffer = malloc(outCapacity); + assert(outBuffer != NULL); + + ZSTD_seekable_CStream* const zscs = ZSTD_seekable_createCStream(); + assert(zscs != NULL); + + /* compress test data with a small frame size to ensure multiple frames in the output */ + unsigned const maxFrameSize = 40; + { size_t const initStatus = ZSTD_seekable_initCStream(zscs, 9, 0 /* checksumFlag */, maxFrameSize); + assert(!ZSTD_isError(initStatus)); + } + + { ZSTD_outBuffer outb = { .dst=seekBuffer, .pos=0, .size=seekCapacity }; + ZSTD_inBuffer inb = { .src=inBuffer, .pos=0, .size=inSize }; + + while (inb.pos < inb.size) { + size_t const cStatus = ZSTD_seekable_compressStream(zscs, &outb, &inb); + assert(!ZSTD_isError(cStatus)); + } + + size_t const endStatus = ZSTD_seekable_endStream(zscs, &outb); + assert(!ZSTD_isError(endStatus)); + seekSize = outb.pos; + } + + ZSTD_seekable* const stream = ZSTD_seekable_create(); + assert(stream != NULL); + buffWrapperWithTotal_t buffWrapper = {seekBuffer, seekSize, 0, 0}; + { ZSTD_seekable_customFile srcFile = {&buffWrapper, &readBuffWithTotal, &seekBuffWithTotal}; + size_t const initStatus = ZSTD_seekable_initAdvanced(stream, srcFile); + assert(!ZSTD_isError(initStatus)); } + + /* Perform a series of small reads and seeks (repeatedly read 1 byte and skip 1 byte) + and check that we didn't reread input data unnecessarily */ + size_t pos; + for (pos = 0; pos < inSize; pos += 2) { + size_t const decStatus = ZSTD_seekable_decompress(stream, outBuffer, 1, pos); + if (decStatus != 1 || outBuffer[0] != inBuffer[pos]) { + goto _test_error; + } + } + if (buffWrapper.totalRead > seekSize) { + /* We read more than the compressed size, meaning there were some rereads. + This is unneeded because we only seeked forward. */ + printf("Too much data read: %zu read, with compressed size %zu\n", buffWrapper.totalRead, seekSize); + goto _test_error; + } + + /* Perform some reads and seeks to ensure correctness */ + struct { + size_t offset; + size_t size; + } const tests[] = { /* Assume the frame size is 40 */ + {20, 40}, /* read partial data from two frames */ + {60, 10}, /* continue reading from the same offset */ + {50, 20}, /* seek backward within the same frame */ + {10, 10}, /* seek backward to a different frame */ + {25, 10}, /* seek forward within the same frame */ + {60, 10}, /* seek forward to a different frame */ + }; + size_t idx; + for (idx = 0; idx < sizeof(tests) / sizeof(tests[0]); idx++) { + size_t const decStatus = ZSTD_seekable_decompress(stream, outBuffer, tests[idx].size, tests[idx].offset); + if (decStatus != tests[idx].size || memcmp(outBuffer, inBuffer + tests[idx].offset, tests[idx].size) != 0) { + goto _test_error; + } + } + + free(seekBuffer); + free(outBuffer); + ZSTD_seekable_freeCStream(zscs); + ZSTD_seekable_free(stream); + } + printf("Success!\n"); + + /* TODO: Add more tests */ + printf("Finished tests\n"); + return 0; + +_test_error: + printf("test failed! Exiting..\n"); + return 1; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable.h b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable.h new file mode 100644 index 0000000000..b1f83d0e0a --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable.h @@ -0,0 +1,226 @@ +#ifndef SEEKABLE_H +#define SEEKABLE_H + +#include +#include "zstd.h" /* ZSTDLIB_API */ + +#if defined (__cplusplus) +extern "C" { +#endif + + +#define ZSTD_seekTableFooterSize 9 + +#define ZSTD_SEEKABLE_MAGICNUMBER 0x8F92EAB1 + +#define ZSTD_SEEKABLE_MAXFRAMES 0x8000000U + +/* Limit maximum size to avoid potential issues storing the compressed size */ +#define ZSTD_SEEKABLE_MAX_FRAME_DECOMPRESSED_SIZE 0x40000000U + +/*-**************************************************************************** +* Seekable Format +* +* The seekable format splits the compressed data into a series of "frames", +* each compressed individually so that decompression of a section in the +* middle of an archive only requires zstd to decompress at most a frame's +* worth of extra data, instead of the entire archive. +******************************************************************************/ + +typedef struct ZSTD_seekable_CStream_s ZSTD_seekable_CStream; +typedef struct ZSTD_seekable_s ZSTD_seekable; +typedef struct ZSTD_seekTable_s ZSTD_seekTable; + +/*-**************************************************************************** +* Seekable compression - HowTo +* A ZSTD_seekable_CStream object is required to tracking streaming operation. +* Use ZSTD_seekable_createCStream() and ZSTD_seekable_freeCStream() to create/ +* release resources. +* +* Streaming objects are reusable to avoid allocation and deallocation, +* to start a new compression operation call ZSTD_seekable_initCStream() on the +* compressor. +* +* Data streamed to the seekable compressor will automatically be split into +* frames of size `maxFrameSize` (provided in ZSTD_seekable_initCStream()), +* or if none is provided, will be cut off whenever ZSTD_seekable_endFrame() is +* called or when the default maximum frame size (2GB) is reached. +* +* Use ZSTD_seekable_initCStream() to initialize a ZSTD_seekable_CStream object +* for a new compression operation. +* - `maxFrameSize` indicates the size at which to automatically start a new +* seekable frame. +* `maxFrameSize == 0` implies the default maximum size. +* Smaller frame sizes allow faster decompression of small segments, +* since retrieving a single byte requires decompression of +* the full frame where the byte belongs. +* In general, size the frames to roughly correspond to +* the access granularity (when it's known). +* But small sizes also reduce compression ratio. +* Avoid really tiny frame sizes (< 1 KB), +* that would hurt compression ratio considerably. +* - `checksumFlag` indicates whether or not the seek table should include frame +* checksums on the uncompressed data for verification. +* @return : a size hint for input to provide for compression, or an error code +* checkable with ZSTD_isError() +* +* Use ZSTD_seekable_compressStream() repetitively to consume input stream. +* The function will automatically update both `pos` fields. +* Note that it may not consume the entire input, in which case `pos < size`, +* and it's up to the caller to present again remaining data. +* @return : a size hint, preferred nb of bytes to use as input for next +* function call or an error code, which can be tested using +* ZSTD_isError(). +* Note 1 : it's just a hint, to help latency a little, any other +* value will work fine. +* +* At any time, call ZSTD_seekable_endFrame() to end the current frame and +* start a new one. +* +* ZSTD_seekable_endStream() will end the current frame, and then write the seek +* table so that decompressors can efficiently find compressed frames. +* ZSTD_seekable_endStream() may return a number > 0 if it was unable to flush +* all the necessary data to `output`. In this case, it should be called again +* until all remaining data is flushed out and 0 is returned. +******************************************************************************/ + +/*===== Seekable compressor management =====*/ +ZSTDLIB_API ZSTD_seekable_CStream* ZSTD_seekable_createCStream(void); +ZSTDLIB_API size_t ZSTD_seekable_freeCStream(ZSTD_seekable_CStream* zcs); + +/*===== Seekable compression functions =====*/ +ZSTDLIB_API size_t ZSTD_seekable_initCStream(ZSTD_seekable_CStream* zcs, int compressionLevel, int checksumFlag, unsigned maxFrameSize); +ZSTDLIB_API size_t ZSTD_seekable_compressStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input); +ZSTDLIB_API size_t ZSTD_seekable_endFrame(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output); +ZSTDLIB_API size_t ZSTD_seekable_endStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output); + +/*= Raw seek table API + * These functions allow for the seek table to be constructed directly. + * This table can then be appended to a file of concatenated frames. + * This allows the frames to be compressed independently, even in parallel, + * and compiled together afterward into a seekable archive. + * + * Use ZSTD_seekable_createFrameLog() to allocate and initialize a tracking + * structure. + * + * Call ZSTD_seekable_logFrame() once for each frame in the archive. + * checksum is optional, and will not be used if checksumFlag was 0 when the + * frame log was created. If present, it should be the least significant 32 + * bits of the XXH64 hash of the uncompressed data. + * + * Call ZSTD_seekable_writeSeekTable to serialize the data into a seek table. + * If the entire table was written, the return value will be 0. Otherwise, + * it will be equal to the number of bytes left to write. */ +typedef struct ZSTD_frameLog_s ZSTD_frameLog; +ZSTDLIB_API ZSTD_frameLog* ZSTD_seekable_createFrameLog(int checksumFlag); +ZSTDLIB_API size_t ZSTD_seekable_freeFrameLog(ZSTD_frameLog* fl); +ZSTDLIB_API size_t ZSTD_seekable_logFrame(ZSTD_frameLog* fl, unsigned compressedSize, unsigned decompressedSize, unsigned checksum); +ZSTDLIB_API size_t ZSTD_seekable_writeSeekTable(ZSTD_frameLog* fl, ZSTD_outBuffer* output); + + +/*-**************************************************************************** +* Seekable decompression - HowTo +* A ZSTD_seekable object is required to tracking the seekTable. +* +* Call ZSTD_seekable_init* to initialize a ZSTD_seekable object with the +* the seek table provided in the input. +* There are three modes for ZSTD_seekable_init: +* - ZSTD_seekable_initBuff() : An in-memory API. The data contained in +* `src` should be the entire seekable file, including the seek table. +* `src` should be kept alive and unmodified until the ZSTD_seekable object +* is freed or reset. +* - ZSTD_seekable_initFile() : A simplified file API using stdio. fread and +* fseek will be used to access the required data for building the seek +* table and doing decompression operations. `src` should not be closed +* or modified until the ZSTD_seekable object is freed or reset. +* - ZSTD_seekable_initAdvanced() : A general API allowing the client to +* provide its own read and seek callbacks. +* + ZSTD_seekable_read() : read exactly `n` bytes into `buffer`. +* Premature EOF should be treated as an error. +* + ZSTD_seekable_seek() : seek the read head to `offset` from `origin`, +* where origin is either SEEK_SET (beginning of +* file), or SEEK_END (end of file). +* Both functions should return a non-negative value in case of success, and a +* negative value in case of failure. If implementing using this API and +* stdio, be careful with files larger than 4GB and fseek. All of these +* functions return an error code checkable with ZSTD_isError(). +* +* Call ZSTD_seekable_decompress to decompress `dstSize` bytes at decompressed +* offset `offset`. ZSTD_seekable_decompress may have to decompress the entire +* prefix of the frame before the desired data if it has not already processed +* this section. If ZSTD_seekable_decompress is called multiple times for a +* consecutive range of data, it will efficiently retain the decompressor object +* and avoid redecompressing frame prefixes. The return value is the number of +* bytes decompressed, or an error code checkable with ZSTD_isError(). +* +* The seek table access functions can be used to obtain the data contained +* in the seek table. If frameIndex is larger than the value returned by +* ZSTD_seekable_getNumFrames(), they will return error codes checkable with +* ZSTD_isError(). Note that since the offset access functions return +* unsigned long long instead of size_t, in this case they will instead return +* the value ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE. +******************************************************************************/ + +/*===== Seekable decompressor management =====*/ +ZSTDLIB_API ZSTD_seekable* ZSTD_seekable_create(void); +ZSTDLIB_API size_t ZSTD_seekable_free(ZSTD_seekable* zs); + +/*===== Seekable decompression functions =====*/ +ZSTDLIB_API size_t ZSTD_seekable_initBuff(ZSTD_seekable* zs, const void* src, size_t srcSize); +ZSTDLIB_API size_t ZSTD_seekable_initFile(ZSTD_seekable* zs, FILE* src); +ZSTDLIB_API size_t ZSTD_seekable_decompress(ZSTD_seekable* zs, void* dst, size_t dstSize, unsigned long long offset); +ZSTDLIB_API size_t ZSTD_seekable_decompressFrame(ZSTD_seekable* zs, void* dst, size_t dstSize, unsigned frameIndex); + +#define ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE (0ULL-2) +/*===== Seekable seek table access functions =====*/ +ZSTDLIB_API unsigned ZSTD_seekable_getNumFrames(const ZSTD_seekable* zs); +ZSTDLIB_API unsigned long long ZSTD_seekable_getFrameCompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex); +ZSTDLIB_API unsigned long long ZSTD_seekable_getFrameDecompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex); +ZSTDLIB_API size_t ZSTD_seekable_getFrameCompressedSize(const ZSTD_seekable* zs, unsigned frameIndex); +ZSTDLIB_API size_t ZSTD_seekable_getFrameDecompressedSize(const ZSTD_seekable* zs, unsigned frameIndex); +ZSTDLIB_API unsigned ZSTD_seekable_offsetToFrameIndex(const ZSTD_seekable* zs, unsigned long long offset); + + +/*-**************************************************************************** +* Direct exploitation of the seekTable +* +* Memory constrained use cases that manage multiple archives +* benefit from retaining multiple archive seek tables +* without retaining a ZSTD_seekable instance for each. +* +* Below API allow the above-mentioned use cases +* to initialize a ZSTD_seekable, extract its (smaller) ZSTD_seekTable, +* then throw the ZSTD_seekable away to save memory. +* +* Standard ZSTD operations can then be used +* to decompress frames based on seek table offsets. +******************************************************************************/ + +/*===== Independent seek table management =====*/ +ZSTDLIB_API ZSTD_seekTable* ZSTD_seekTable_create_fromSeekable(const ZSTD_seekable* zs); +ZSTDLIB_API size_t ZSTD_seekTable_free(ZSTD_seekTable* st); + +/*===== Direct seek table access functions =====*/ +ZSTDLIB_API unsigned ZSTD_seekTable_getNumFrames(const ZSTD_seekTable* st); +ZSTDLIB_API unsigned long long ZSTD_seekTable_getFrameCompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex); +ZSTDLIB_API unsigned long long ZSTD_seekTable_getFrameDecompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex); +ZSTDLIB_API size_t ZSTD_seekTable_getFrameCompressedSize(const ZSTD_seekTable* st, unsigned frameIndex); +ZSTDLIB_API size_t ZSTD_seekTable_getFrameDecompressedSize(const ZSTD_seekTable* st, unsigned frameIndex); +ZSTDLIB_API unsigned ZSTD_seekTable_offsetToFrameIndex(const ZSTD_seekTable* st, unsigned long long offset); + + +/*===== Seekable advanced I/O API =====*/ +typedef int(ZSTD_seekable_read)(void* opaque, void* buffer, size_t n); +typedef int(ZSTD_seekable_seek)(void* opaque, long long offset, int origin); +typedef struct { + void* opaque; + ZSTD_seekable_read* read; + ZSTD_seekable_seek* seek; +} ZSTD_seekable_customFile; +ZSTDLIB_API size_t ZSTD_seekable_initAdvanced(ZSTD_seekable* zs, ZSTD_seekable_customFile src); + +#if defined (__cplusplus) +} +#endif + +#endif diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable_compression_format.md b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable_compression_format.md new file mode 100644 index 0000000000..7bd0790e81 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstd_seekable_compression_format.md @@ -0,0 +1,116 @@ +# Zstandard Seekable Format + +### Notices + +Copyright (c) Meta Platforms, Inc. and affiliates. + +Permission is granted to copy and distribute this document +for any purpose and without charge, +including translations into other languages +and incorporation into compilations, +provided that the copyright notice and this notice are preserved, +and that any substantive changes or deletions from the original +are clearly marked. +Distribution of this document is unlimited. + +### Version +0.1.0 (11/04/17) + +## Introduction +This document defines a format for compressed data to be stored so that subranges of the data can be efficiently decompressed without requiring the entire document to be decompressed. +This is done by splitting up the input data into frames, +each of which are compressed independently, +and so can be decompressed independently. +Decompression then takes advantage of a provided 'seek table', which allows the decompressor to immediately jump to the desired data. This is done in a way that is compatible with the original Zstandard format by placing the seek table in a Zstandard skippable frame. + +### Overall conventions +In this document: +- square brackets i.e. `[` and `]` are used to indicate optional fields or parameters. +- the naming convention for identifiers is `Mixed_Case_With_Underscores` +- All numeric fields are little-endian unless specified otherwise + +## Format + +The format consists of a number of frames (Zstandard compressed frames and skippable frames), followed by a final skippable frame at the end containing the seek table. + +### Seek Table Format +The structure of the seek table frame is as follows: + +|`Skippable_Magic_Number`|`Frame_Size`|`[Seek_Table_Entries]`|`Seek_Table_Footer`| +|------------------------|------------|----------------------|-------------------| +| 4 bytes | 4 bytes | 8-12 bytes each | 9 bytes | + +__`Skippable_Magic_Number`__ + +Value : 0x184D2A5E. +This is for compatibility with [Zstandard skippable frames]. +Since it is legal for other Zstandard skippable frames to use the same +magic number, it is not recommended for a decoder to recognize frames +solely on this. + +__`Frame_Size`__ + +The total size of the skippable frame, not including the `Skippable_Magic_Number` or `Frame_Size`. +This is for compatibility with [Zstandard skippable frames]. + +[Zstandard skippable frames]: https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#skippable-frames + +#### `Seek_Table_Footer` +The seek table footer format is as follows: + +|`Number_Of_Frames`|`Seek_Table_Descriptor`|`Seekable_Magic_Number`| +|------------------|-----------------------|-----------------------| +| 4 bytes | 1 byte | 4 bytes | + +__`Seekable_Magic_Number`__ + +Value : 0x8F92EAB1. +This value must be the last bytes present in the compressed file so that decoders +can efficiently find it and determine if there is an actual seek table present. + +__`Number_Of_Frames`__ + +The number of stored frames in the data. + +__`Seek_Table_Descriptor`__ + +A bitfield describing the format of the seek table. + +| Bit number | Field name | +| ---------- | ---------- | +| 7 | `Checksum_Flag` | +| 6-2 | `Reserved_Bits` | +| 1-0 | `Unused_Bits` | + +While only `Checksum_Flag` currently exists, there are 7 other bits in this field that can be used for future changes to the format, +for example the addition of inline dictionaries. + +__`Checksum_Flag`__ + +If the checksum flag is set, each of the seek table entries contains a 4 byte checksum of the uncompressed data contained in its frame. + +`Reserved_Bits` are not currently used but may be used in the future for breaking changes, so a compliant decoder should ensure they are set to 0. `Unused_Bits` may be used in the future for non-breaking changes, so a compliant decoder should not interpret these bits. + +#### __`Seek_Table_Entries`__ + +`Seek_Table_Entries` consists of `Number_Of_Frames` (one for each frame in the data, not including the seek table frame) entries of the following form, in sequence: + +|`Compressed_Size`|`Decompressed_Size`|`[Checksum]`| +|-----------------|-------------------|------------| +| 4 bytes | 4 bytes | 4 bytes | + +__`Compressed_Size`__ + +The compressed size of the frame. +The cumulative sum of the `Compressed_Size` fields of frames `0` to `i` gives the offset in the compressed file of frame `i+1`. + +__`Decompressed_Size`__ + +The size of the decompressed data contained in the frame. For skippable or otherwise empty frames, this value is 0. + +__`Checksum`__ + +Only present if `Checksum_Flag` is set in the `Seek_Table_Descriptor`. Value : the least significant 32 bits of the XXH64 digest of the uncompressed data, stored in little-endian format. + +## Version Changes +- 0.1.0: initial version diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_compress.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_compress.c new file mode 100644 index 0000000000..4997807d25 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_compress.c @@ -0,0 +1,365 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + */ + +#include /* malloc, free */ +#include /* UINT_MAX */ +#include + +#define XXH_STATIC_LINKING_ONLY +#include "xxhash.h" + +#define ZSTD_STATIC_LINKING_ONLY +#include "zstd.h" +#include "zstd_errors.h" +#include "mem.h" + +#include "zstd_seekable.h" + +#define CHECK_Z(f) { size_t const ret = (f); if (ret != 0) return ret; } + +#undef ERROR +#define ERROR(name) ((size_t)-ZSTD_error_##name) + +#undef MIN +#undef MAX +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +typedef struct { + U32 cSize; + U32 dSize; + U32 checksum; +} framelogEntry_t; + +struct ZSTD_frameLog_s { + framelogEntry_t* entries; + U32 size; + U32 capacity; + + int checksumFlag; + + /* for use when streaming out the seek table */ + U32 seekTablePos; + U32 seekTableIndex; +} framelog_t; + +struct ZSTD_seekable_CStream_s { + ZSTD_CStream* cstream; + ZSTD_frameLog framelog; + + U32 frameCSize; + U32 frameDSize; + + XXH64_state_t xxhState; + + U32 maxFrameSize; + + int writingSeekTable; +}; + +static size_t ZSTD_seekable_frameLog_allocVec(ZSTD_frameLog* fl) +{ + /* allocate some initial space */ + size_t const FRAMELOG_STARTING_CAPACITY = 16; + fl->entries = (framelogEntry_t*)malloc( + sizeof(framelogEntry_t) * FRAMELOG_STARTING_CAPACITY); + if (fl->entries == NULL) return ERROR(memory_allocation); + fl->capacity = (U32)FRAMELOG_STARTING_CAPACITY; + return 0; +} + +static size_t ZSTD_seekable_frameLog_freeVec(ZSTD_frameLog* fl) +{ + if (fl != NULL) free(fl->entries); + return 0; +} + +ZSTD_frameLog* ZSTD_seekable_createFrameLog(int checksumFlag) +{ + ZSTD_frameLog* const fl = (ZSTD_frameLog*)malloc(sizeof(ZSTD_frameLog)); + if (fl == NULL) return NULL; + + if (ZSTD_isError(ZSTD_seekable_frameLog_allocVec(fl))) { + free(fl); + return NULL; + } + + fl->checksumFlag = checksumFlag; + fl->seekTablePos = 0; + fl->seekTableIndex = 0; + fl->size = 0; + + return fl; +} + +size_t ZSTD_seekable_freeFrameLog(ZSTD_frameLog* fl) +{ + ZSTD_seekable_frameLog_freeVec(fl); + free(fl); + return 0; +} + +ZSTD_seekable_CStream* ZSTD_seekable_createCStream(void) +{ + ZSTD_seekable_CStream* const zcs = (ZSTD_seekable_CStream*)malloc(sizeof(ZSTD_seekable_CStream)); + if (zcs == NULL) return NULL; + + memset(zcs, 0, sizeof(*zcs)); + + zcs->cstream = ZSTD_createCStream(); + if (zcs->cstream == NULL) goto failed1; + + if (ZSTD_isError(ZSTD_seekable_frameLog_allocVec(&zcs->framelog))) goto failed2; + + return zcs; + +failed2: + ZSTD_freeCStream(zcs->cstream); +failed1: + free(zcs); + return NULL; +} + +size_t ZSTD_seekable_freeCStream(ZSTD_seekable_CStream* zcs) +{ + if (zcs == NULL) return 0; /* support free on null */ + ZSTD_freeCStream(zcs->cstream); + ZSTD_seekable_frameLog_freeVec(&zcs->framelog); + free(zcs); + return 0; +} + +size_t ZSTD_seekable_initCStream(ZSTD_seekable_CStream* zcs, + int compressionLevel, + int checksumFlag, + unsigned maxFrameSize) +{ + zcs->framelog.size = 0; + zcs->frameCSize = 0; + zcs->frameDSize = 0; + + /* make sure maxFrameSize has a reasonable value */ + if (maxFrameSize > ZSTD_SEEKABLE_MAX_FRAME_DECOMPRESSED_SIZE) { + return ERROR(frameParameter_unsupported); + } + + zcs->maxFrameSize = maxFrameSize ? + maxFrameSize : ZSTD_SEEKABLE_MAX_FRAME_DECOMPRESSED_SIZE; + + zcs->framelog.checksumFlag = checksumFlag; + if (zcs->framelog.checksumFlag) { + XXH64_reset(&zcs->xxhState, 0); + } + + zcs->framelog.seekTablePos = 0; + zcs->framelog.seekTableIndex = 0; + zcs->writingSeekTable = 0; + + return ZSTD_initCStream(zcs->cstream, compressionLevel); +} + +size_t ZSTD_seekable_logFrame(ZSTD_frameLog* fl, + unsigned compressedSize, + unsigned decompressedSize, + unsigned checksum) +{ + if (fl->size == ZSTD_SEEKABLE_MAXFRAMES) + return ERROR(frameIndex_tooLarge); + + /* grow the buffer if required */ + if (fl->size == fl->capacity) { + /* exponential size increase for constant amortized runtime */ + size_t const newCapacity = fl->capacity * 2; + framelogEntry_t* const newEntries = (framelogEntry_t*)realloc(fl->entries, + sizeof(framelogEntry_t) * newCapacity); + + if (newEntries == NULL) return ERROR(memory_allocation); + + fl->entries = newEntries; + assert(newCapacity <= UINT_MAX); + fl->capacity = (U32)newCapacity; + } + + fl->entries[fl->size] = (framelogEntry_t){ + compressedSize, decompressedSize, checksum + }; + fl->size++; + + return 0; +} + +size_t ZSTD_seekable_endFrame(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output) +{ + size_t const prevOutPos = output->pos; + /* end the frame */ + size_t ret = ZSTD_endStream(zcs->cstream, output); + + zcs->frameCSize += (U32)(output->pos - prevOutPos); + + /* need to flush before doing the rest */ + if (ret) return ret; + + /* frame done */ + + /* store the frame data for later */ + ret = ZSTD_seekable_logFrame( + &zcs->framelog, zcs->frameCSize, zcs->frameDSize, + zcs->framelog.checksumFlag + ? XXH64_digest(&zcs->xxhState) & 0xFFFFFFFFU + : 0); + if (ret) return ret; + + /* reset for the next frame */ + zcs->frameCSize = 0; + zcs->frameDSize = 0; + + ZSTD_CCtx_reset(zcs->cstream, ZSTD_reset_session_only); + if (zcs->framelog.checksumFlag) XXH64_reset(&zcs->xxhState, 0); + + return 0; +} + +size_t ZSTD_seekable_compressStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input) +{ + const BYTE* const inBase = (const BYTE*) input->src + input->pos; + size_t inLen = input->size - input->pos; + + assert(zcs->maxFrameSize < INT_MAX); + ZSTD_CCtx_setParameter(zcs->cstream, ZSTD_c_srcSizeHint, (int)zcs->maxFrameSize); + inLen = MIN(inLen, (size_t)(zcs->maxFrameSize - zcs->frameDSize)); + + /* if we haven't finished flushing the last frame, don't start writing a new one */ + if (inLen > 0) { + ZSTD_inBuffer inTmp = { inBase, inLen, 0 }; + size_t const prevOutPos = output->pos; + + size_t const ret = ZSTD_compressStream(zcs->cstream, output, &inTmp); + + if (zcs->framelog.checksumFlag) { + XXH64_update(&zcs->xxhState, inBase, inTmp.pos); + } + + zcs->frameCSize += (U32)(output->pos - prevOutPos); + zcs->frameDSize += (U32)inTmp.pos; + + input->pos += inTmp.pos; + + if (ZSTD_isError(ret)) return ret; + } + + if (zcs->maxFrameSize == zcs->frameDSize) { + /* log the frame and start over */ + size_t const ret = ZSTD_seekable_endFrame(zcs, output); + if (ZSTD_isError(ret)) return ret; + + /* get the client ready for the next frame */ + return (size_t)zcs->maxFrameSize; + } + + return (size_t)(zcs->maxFrameSize - zcs->frameDSize); +} + +static inline size_t ZSTD_seekable_seekTableSize(const ZSTD_frameLog* fl) +{ + size_t const sizePerFrame = 8 + (fl->checksumFlag?4:0); + size_t const seekTableLen = ZSTD_SKIPPABLEHEADERSIZE + + sizePerFrame * fl->size + + ZSTD_seekTableFooterSize; + + return seekTableLen; +} + +static inline size_t ZSTD_stwrite32(ZSTD_frameLog* fl, + ZSTD_outBuffer* output, U32 const value, + U32 const offset) +{ + if (fl->seekTablePos < offset + 4) { + BYTE tmp[4]; /* so that we can work with buffers too small to write a whole word to */ + size_t const lenWrite = + MIN(output->size - output->pos, offset + 4 - fl->seekTablePos); + MEM_writeLE32(tmp, value); + memcpy((BYTE*)output->dst + output->pos, + tmp + (fl->seekTablePos - offset), lenWrite); + output->pos += lenWrite; + fl->seekTablePos += (U32)lenWrite; + + if (lenWrite < 4) return ZSTD_seekable_seekTableSize(fl) - fl->seekTablePos; + } + return 0; +} + +size_t ZSTD_seekable_writeSeekTable(ZSTD_frameLog* fl, ZSTD_outBuffer* output) +{ + /* seekTableIndex: the current index in the table and + * seekTableSize: the amount of the table written so far + * + * This function is written this way so that if it has to return early + * because of a small buffer, it can keep going where it left off. + */ + + size_t const sizePerFrame = 8 + (fl->checksumFlag?4:0); + size_t const seekTableLen = ZSTD_seekable_seekTableSize(fl); + + CHECK_Z(ZSTD_stwrite32(fl, output, ZSTD_MAGIC_SKIPPABLE_START | 0xE, 0)); + assert(seekTableLen <= (size_t)UINT_MAX); + CHECK_Z(ZSTD_stwrite32(fl, output, (U32)seekTableLen - ZSTD_SKIPPABLEHEADERSIZE, 4)); + + while (fl->seekTableIndex < fl->size) { + unsigned long long const start = ZSTD_SKIPPABLEHEADERSIZE + sizePerFrame * fl->seekTableIndex; + assert(start + 8 <= UINT_MAX); + CHECK_Z(ZSTD_stwrite32(fl, output, + fl->entries[fl->seekTableIndex].cSize, + (U32)start + 0)); + + CHECK_Z(ZSTD_stwrite32(fl, output, + fl->entries[fl->seekTableIndex].dSize, + (U32)start + 4)); + + if (fl->checksumFlag) { + CHECK_Z(ZSTD_stwrite32( + fl, output, fl->entries[fl->seekTableIndex].checksum, + (U32)start + 8)); + } + + fl->seekTableIndex++; + } + + assert(seekTableLen <= UINT_MAX); + CHECK_Z(ZSTD_stwrite32(fl, output, fl->size, + (U32)seekTableLen - ZSTD_seekTableFooterSize)); + + if (output->size - output->pos < 1) return seekTableLen - fl->seekTablePos; + if (fl->seekTablePos < seekTableLen - 4) { + BYTE const sfd = (BYTE)((fl->checksumFlag) << 7); + + ((BYTE*)output->dst)[output->pos] = sfd; + output->pos++; + fl->seekTablePos++; + } + + CHECK_Z(ZSTD_stwrite32(fl, output, ZSTD_SEEKABLE_MAGICNUMBER, + (U32)seekTableLen - 4)); + + if (fl->seekTablePos != seekTableLen) return ERROR(GENERIC); + return 0; +} + +size_t ZSTD_seekable_endStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output) +{ + if (!zcs->writingSeekTable) { + const size_t endFrame = ZSTD_seekable_endFrame(zcs, output); + if (ZSTD_isError(endFrame)) return endFrame; + /* return an accurate size hint */ + if (endFrame) return endFrame + ZSTD_seekable_seekTableSize(&zcs->framelog); + } + + zcs->writingSeekTable = 1; + + return ZSTD_seekable_writeSeekTable(&zcs->framelog, output); +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_decompress.c b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_decompress.c new file mode 100644 index 0000000000..ab9088a106 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seekable_format/zstdseek_decompress.c @@ -0,0 +1,600 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* ********************************************************* +* Turn on Large Files support (>4GB) for 32-bit Linux/Unix +***********************************************************/ +#if !defined(__64BIT__) || defined(__MINGW32__) /* No point defining Large file for 64 bit but MinGW-w64 requires it */ +# if !defined(_FILE_OFFSET_BITS) +# define _FILE_OFFSET_BITS 64 /* turn off_t into a 64-bit type for ftello, fseeko */ +# endif +# if !defined(_LARGEFILE_SOURCE) /* obsolete macro, replaced with _FILE_OFFSET_BITS */ +# define _LARGEFILE_SOURCE 1 /* Large File Support extension (LFS) - fseeko, ftello */ +# endif +# if defined(_AIX) || defined(__hpux) +# define _LARGE_FILES /* Large file support on 32-bits AIX and HP-UX */ +# endif +#endif + +/* ************************************************************ +* Detect POSIX version +* PLATFORM_POSIX_VERSION = 0 for non-Unix e.g. Windows +* PLATFORM_POSIX_VERSION = 1 for Unix-like but non-POSIX +* PLATFORM_POSIX_VERSION > 1 is equal to found _POSIX_VERSION +* Value of PLATFORM_POSIX_VERSION can be forced on command line +***************************************************************/ +#ifndef PLATFORM_POSIX_VERSION + +# if (defined(__APPLE__) && defined(__MACH__)) || defined(__SVR4) || defined(_AIX) || defined(__hpux) /* POSIX.1-2001 (SUSv3) conformant */ \ + || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) /* BSD distros */ + /* exception rule : force posix version to 200112L, + * note: it's better to use unistd.h's _POSIX_VERSION whenever possible */ +# define PLATFORM_POSIX_VERSION 200112L + +/* try to determine posix version through official unistd.h's _POSIX_VERSION (https://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html). + * note : there is no simple way to know in advance if is present or not on target system, + * Posix specification mandates its presence and its content, but target system must respect this spec. + * It's necessary to _not_ #include whenever target OS is not unix-like + * otherwise it will block preprocessing stage. + * The following list of build macros tries to "guess" if target OS is likely unix-like, and therefore can #include + */ +# elif !defined(_WIN32) \ + && ( defined(__unix__) || defined(__unix) \ + || defined(__midipix__) || defined(__VMS) || defined(__HAIKU__) ) + +# if defined(__linux__) || defined(__linux) || defined(__CYGWIN__) +# ifndef _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L /* feature test macro : https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html */ +# endif +# endif +# include /* declares _POSIX_VERSION */ +# if defined(_POSIX_VERSION) /* POSIX compliant */ +# define PLATFORM_POSIX_VERSION _POSIX_VERSION +# else +# define PLATFORM_POSIX_VERSION 1 +# endif + +# ifdef __UCLIBC__ +# ifndef __USE_MISC +# define __USE_MISC /* enable st_mtim on uclibc */ +# endif +# endif + +# else /* non-unix target platform (like Windows) */ +# define PLATFORM_POSIX_VERSION 0 +# endif + +#endif /* PLATFORM_POSIX_VERSION */ + + +/* ************************************************************ +* Avoid fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW +***************************************************************/ +#if defined(LIBC_NO_FSEEKO) +/* Some older libc implementations don't include these functions (e.g. Bionic < 24) */ +# define LONG_SEEK fseek +#elif defined(_MSC_VER) && _MSC_VER >= 1400 +# define LONG_SEEK _fseeki64 +#elif !defined(__64BIT__) && (PLATFORM_POSIX_VERSION >= 200112L) /* No point defining Large file for 64 bit */ +# define LONG_SEEK fseeko +#elif defined(__MINGW32__) && !defined(__STRICT_ANSI__) && !defined(__NO_MINGW_LFS) && defined(__MSVCRT__) +# define LONG_SEEK fseeko64 +#elif defined(_WIN32) && !defined(__DJGPP__) +# include + static int LONG_SEEK(FILE* file, __int64 offset, int origin) { + LARGE_INTEGER off; + DWORD method; + off.QuadPart = offset; + if (origin == SEEK_END) + method = FILE_END; + else if (origin == SEEK_CUR) + method = FILE_CURRENT; + else + method = FILE_BEGIN; + + if (SetFilePointerEx((HANDLE) _get_osfhandle(_fileno(file)), off, NULL, method)) + return 0; + else + return -1; + } +#else +# define LONG_SEEK fseek +#endif + +#include /* malloc, free */ +#include /* FILE* */ +#include /* UNIT_MAX */ +#include + +#define XXH_STATIC_LINKING_ONLY +#include "xxhash.h" + +#define ZSTD_STATIC_LINKING_ONLY +#include "zstd.h" +#include "zstd_errors.h" +#include "mem.h" +#include "zstd_seekable.h" + +#undef ERROR +#define ERROR(name) ((size_t)-ZSTD_error_##name) + +#define CHECK_IO(f) { int const errcod = (f); if (errcod < 0) return ERROR(seekableIO); } + +#undef MIN +#undef MAX +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +#define ZSTD_SEEKABLE_NO_OUTPUT_PROGRESS_MAX 16 + +/* Special-case callbacks for FILE* and in-memory modes, so that we can treat + * them the same way as the advanced API */ +static int ZSTD_seekable_read_FILE(void* opaque, void* buffer, size_t n) +{ + size_t const result = fread(buffer, 1, n, (FILE*)opaque); + if (result != n) { + return -1; + } + return 0; +} + +static int ZSTD_seekable_seek_FILE(void* opaque, long long offset, int origin) +{ + int const ret = LONG_SEEK((FILE*)opaque, offset, origin); + if (ret) return ret; + return fflush((FILE*)opaque); +} + +typedef struct { + const void *ptr; + size_t size; + size_t pos; +} buffWrapper_t; + +static int ZSTD_seekable_read_buff(void* opaque, void* buffer, size_t n) +{ + buffWrapper_t* const buff = (buffWrapper_t*)opaque; + assert(buff != NULL); + if (buff->pos + n > buff->size) return -1; + memcpy(buffer, (const BYTE*)buff->ptr + buff->pos, n); + buff->pos += n; + return 0; +} + +static int ZSTD_seekable_seek_buff(void* opaque, long long offset, int origin) +{ + buffWrapper_t* const buff = (buffWrapper_t*) opaque; + unsigned long long newOffset; + assert(buff != NULL); + switch (origin) { + case SEEK_SET: + assert(offset >= 0); + newOffset = (unsigned long long)offset; + break; + case SEEK_CUR: + newOffset = (unsigned long long)((long long)buff->pos + offset); + break; + case SEEK_END: + newOffset = (unsigned long long)((long long)buff->size + offset); + break; + default: + assert(0); /* not possible */ + } + if (newOffset > buff->size) { + return -1; + } + buff->pos = newOffset; + return 0; +} + +typedef struct { + U64 cOffset; + U64 dOffset; + U32 checksum; +} seekEntry_t; + +struct ZSTD_seekTable_s { + seekEntry_t* entries; + size_t tableLen; + + int checksumFlag; +}; + +#define SEEKABLE_BUFF_SIZE ZSTD_BLOCKSIZE_MAX + +struct ZSTD_seekable_s { + ZSTD_DStream* dstream; + ZSTD_seekTable seekTable; + ZSTD_seekable_customFile src; + + U64 decompressedOffset; + U32 curFrame; + + BYTE inBuff[SEEKABLE_BUFF_SIZE]; /* need to do our own input buffering */ + BYTE outBuff[SEEKABLE_BUFF_SIZE]; /* so we can efficiently decompress the + starts of chunks before we get to the + desired section */ + ZSTD_inBuffer in; /* maintain continuity across ZSTD_seekable_decompress operations */ + buffWrapper_t buffWrapper; /* for `src.opaque` in in-memory mode */ + + XXH64_state_t xxhState; +}; + +ZSTD_seekable* ZSTD_seekable_create(void) +{ + ZSTD_seekable* const zs = (ZSTD_seekable*)malloc(sizeof(ZSTD_seekable)); + if (zs == NULL) return NULL; + + /* also initializes stage to zsds_init */ + memset(zs, 0, sizeof(*zs)); + + zs->dstream = ZSTD_createDStream(); + if (zs->dstream == NULL) { + free(zs); + return NULL; + } + + return zs; +} + +size_t ZSTD_seekable_free(ZSTD_seekable* zs) +{ + if (zs == NULL) return 0; /* support free on null */ + ZSTD_freeDStream(zs->dstream); + free(zs->seekTable.entries); + free(zs); + return 0; +} + +ZSTD_seekTable* ZSTD_seekTable_create_fromSeekable(const ZSTD_seekable* zs) +{ + assert(zs != NULL); + if (zs->seekTable.entries == NULL) return NULL; + ZSTD_seekTable* const st = (ZSTD_seekTable*)malloc(sizeof(ZSTD_seekTable)); + if (st==NULL) return NULL; + + st->checksumFlag = zs->seekTable.checksumFlag; + st->tableLen = zs->seekTable.tableLen; + + /* Allocate an extra entry at the end to match logic of initial allocation */ + size_t const entriesSize = sizeof(seekEntry_t) * (zs->seekTable.tableLen + 1); + seekEntry_t* const entries = (seekEntry_t*)malloc(entriesSize); + if (entries==NULL) { + free(st); + return NULL; + } + + memcpy(entries, zs->seekTable.entries, entriesSize); + st->entries = entries; + return st; +} + +size_t ZSTD_seekTable_free(ZSTD_seekTable* st) +{ + if (st == NULL) return 0; /* support free on null */ + free(st->entries); + free(st); + return 0; +} + +/** ZSTD_seekable_offsetToFrameIndex() : + * Performs a binary search to find the last frame with a decompressed offset + * <= pos + * @return : the frame's index */ +unsigned ZSTD_seekable_offsetToFrameIndex(const ZSTD_seekable* zs, unsigned long long pos) +{ + return ZSTD_seekTable_offsetToFrameIndex(&zs->seekTable, pos); +} + +unsigned ZSTD_seekTable_offsetToFrameIndex(const ZSTD_seekTable* st, unsigned long long pos) +{ + U32 lo = 0; + U32 hi = (U32)st->tableLen; + assert(st->tableLen <= UINT_MAX); + + if (pos >= st->entries[st->tableLen].dOffset) { + return (unsigned)st->tableLen; + } + + while (lo + 1 < hi) { + U32 const mid = lo + ((hi - lo) >> 1); + if (st->entries[mid].dOffset <= pos) { + lo = mid; + } else { + hi = mid; + } + } + return lo; +} + +unsigned ZSTD_seekable_getNumFrames(const ZSTD_seekable* zs) +{ + return ZSTD_seekTable_getNumFrames(&zs->seekTable); +} + +unsigned ZSTD_seekTable_getNumFrames(const ZSTD_seekTable* st) +{ + assert(st->tableLen <= UINT_MAX); + return (unsigned)st->tableLen; +} + +unsigned long long ZSTD_seekable_getFrameCompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex) +{ + return ZSTD_seekTable_getFrameCompressedOffset(&zs->seekTable, frameIndex); +} + +unsigned long long ZSTD_seekTable_getFrameCompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex) +{ + if (frameIndex >= st->tableLen) return ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE; + return st->entries[frameIndex].cOffset; +} + +unsigned long long ZSTD_seekable_getFrameDecompressedOffset(const ZSTD_seekable* zs, unsigned frameIndex) +{ + return ZSTD_seekTable_getFrameDecompressedOffset(&zs->seekTable, frameIndex); +} + +unsigned long long ZSTD_seekTable_getFrameDecompressedOffset(const ZSTD_seekTable* st, unsigned frameIndex) +{ + if (frameIndex >= st->tableLen) return ZSTD_SEEKABLE_FRAMEINDEX_TOOLARGE; + return st->entries[frameIndex].dOffset; +} + +size_t ZSTD_seekable_getFrameCompressedSize(const ZSTD_seekable* zs, unsigned frameIndex) +{ + return ZSTD_seekTable_getFrameCompressedSize(&zs->seekTable, frameIndex); +} + +size_t ZSTD_seekTable_getFrameCompressedSize(const ZSTD_seekTable* st, unsigned frameIndex) +{ + if (frameIndex >= st->tableLen) return ERROR(frameIndex_tooLarge); + return st->entries[frameIndex + 1].cOffset - + st->entries[frameIndex].cOffset; +} + +size_t ZSTD_seekable_getFrameDecompressedSize(const ZSTD_seekable* zs, unsigned frameIndex) +{ + return ZSTD_seekTable_getFrameDecompressedSize(&zs->seekTable, frameIndex); +} + +size_t ZSTD_seekTable_getFrameDecompressedSize(const ZSTD_seekTable* st, unsigned frameIndex) +{ + if (frameIndex > st->tableLen) return ERROR(frameIndex_tooLarge); + return st->entries[frameIndex + 1].dOffset - + st->entries[frameIndex].dOffset; +} + +static size_t ZSTD_seekable_loadSeekTable(ZSTD_seekable* zs) +{ + int checksumFlag; + ZSTD_seekable_customFile src = zs->src; + /* read the footer, fixed size */ + CHECK_IO(src.seek(src.opaque, -(int)ZSTD_seekTableFooterSize, SEEK_END)); + CHECK_IO(src.read(src.opaque, zs->inBuff, ZSTD_seekTableFooterSize)); + + if (MEM_readLE32(zs->inBuff + 5) != ZSTD_SEEKABLE_MAGICNUMBER) { + return ERROR(prefix_unknown); + } + + { BYTE const sfd = zs->inBuff[4]; + checksumFlag = sfd >> 7; + + /* check reserved bits */ + if ((sfd >> 2) & 0x1f) { + return ERROR(corruption_detected); + } } + + { U32 const numFrames = MEM_readLE32(zs->inBuff); + U32 const sizePerEntry = 8 + (checksumFlag?4:0); + U32 const tableSize = sizePerEntry * numFrames; + U32 const frameSize = tableSize + ZSTD_seekTableFooterSize + ZSTD_SKIPPABLEHEADERSIZE; + + U32 remaining = frameSize - ZSTD_seekTableFooterSize; /* don't need to re-read footer */ + { U32 const toRead = MIN(remaining, SEEKABLE_BUFF_SIZE); + CHECK_IO(src.seek(src.opaque, -(S64)frameSize, SEEK_END)); + CHECK_IO(src.read(src.opaque, zs->inBuff, toRead)); + remaining -= toRead; + } + + if (MEM_readLE32(zs->inBuff) != (ZSTD_MAGIC_SKIPPABLE_START | 0xE)) { + return ERROR(prefix_unknown); + } + if (MEM_readLE32(zs->inBuff+4) + ZSTD_SKIPPABLEHEADERSIZE != frameSize) { + return ERROR(prefix_unknown); + } + + { /* Allocate an extra entry at the end so that we can do size + * computations on the last element without special case */ + seekEntry_t* const entries = (seekEntry_t*)malloc(sizeof(seekEntry_t) * (numFrames + 1)); + + U32 idx = 0; + U32 pos = 8; + + U64 cOffset = 0; + U64 dOffset = 0; + + if (entries == NULL) return ERROR(memory_allocation); + + /* compute cumulative positions */ + for (; idx < numFrames; idx++) { + if (pos + sizePerEntry > SEEKABLE_BUFF_SIZE) { + U32 const offset = SEEKABLE_BUFF_SIZE - pos; + U32 const toRead = MIN(remaining, SEEKABLE_BUFF_SIZE - offset); + memmove(zs->inBuff, zs->inBuff + pos, offset); /* move any data we haven't read yet */ + CHECK_IO(src.read(src.opaque, zs->inBuff+offset, toRead)); + remaining -= toRead; + pos = 0; + } + entries[idx].cOffset = cOffset; + entries[idx].dOffset = dOffset; + + cOffset += MEM_readLE32(zs->inBuff + pos); + pos += 4; + dOffset += MEM_readLE32(zs->inBuff + pos); + pos += 4; + if (checksumFlag) { + entries[idx].checksum = MEM_readLE32(zs->inBuff + pos); + pos += 4; + } + } + entries[numFrames].cOffset = cOffset; + entries[numFrames].dOffset = dOffset; + + zs->seekTable.entries = entries; + zs->seekTable.tableLen = numFrames; + zs->seekTable.checksumFlag = checksumFlag; + return 0; + } + } +} + +size_t ZSTD_seekable_initBuff(ZSTD_seekable* zs, const void* src, size_t srcSize) +{ + zs->buffWrapper = (buffWrapper_t){src, srcSize, 0}; + { ZSTD_seekable_customFile srcFile = {&zs->buffWrapper, + &ZSTD_seekable_read_buff, + &ZSTD_seekable_seek_buff}; + return ZSTD_seekable_initAdvanced(zs, srcFile); } +} + +size_t ZSTD_seekable_initFile(ZSTD_seekable* zs, FILE* src) +{ + ZSTD_seekable_customFile srcFile = {src, &ZSTD_seekable_read_FILE, + &ZSTD_seekable_seek_FILE}; + return ZSTD_seekable_initAdvanced(zs, srcFile); +} + +size_t ZSTD_seekable_initAdvanced(ZSTD_seekable* zs, ZSTD_seekable_customFile src) +{ + zs->src = src; + + { const size_t seekTableInit = ZSTD_seekable_loadSeekTable(zs); + if (ZSTD_isError(seekTableInit)) return seekTableInit; } + + zs->decompressedOffset = (U64)-1; + zs->curFrame = (U32)-1; + + { const size_t dstreamInit = ZSTD_initDStream(zs->dstream); + if (ZSTD_isError(dstreamInit)) return dstreamInit; } + return 0; +} + +size_t ZSTD_seekable_decompress(ZSTD_seekable* zs, void* dst, size_t len, unsigned long long offset) +{ + unsigned long long const eos = zs->seekTable.entries[zs->seekTable.tableLen].dOffset; + if (offset + len > eos) { + len = eos - offset; + } + + U32 targetFrame = ZSTD_seekable_offsetToFrameIndex(zs, offset); + U32 noOutputProgressCount = 0; + size_t srcBytesRead = 0; + do { + /* check if we can continue from a previous decompress job */ + if (targetFrame != zs->curFrame || offset < zs->decompressedOffset) { + zs->decompressedOffset = zs->seekTable.entries[targetFrame].dOffset; + zs->curFrame = targetFrame; + + assert(zs->seekTable.entries[targetFrame].cOffset < LLONG_MAX); + CHECK_IO(zs->src.seek(zs->src.opaque, + (long long)zs->seekTable.entries[targetFrame].cOffset, + SEEK_SET)); + zs->in = (ZSTD_inBuffer){zs->inBuff, 0, 0}; + XXH64_reset(&zs->xxhState, 0); + ZSTD_DCtx_reset(zs->dstream, ZSTD_reset_session_only); + if (zs->buffWrapper.size && srcBytesRead > zs->buffWrapper.size) { + return ERROR(seekableIO); + } + } + + while (zs->decompressedOffset < offset + len) { + size_t toRead; + ZSTD_outBuffer outTmp; + size_t prevOutPos; + size_t prevInPos; + size_t forwardProgress; + if (zs->decompressedOffset < offset) { + /* dummy decompressions until we get to the target offset */ + outTmp = (ZSTD_outBuffer){zs->outBuff, (size_t) (MIN(SEEKABLE_BUFF_SIZE, offset - zs->decompressedOffset)), 0}; + } else { + outTmp = (ZSTD_outBuffer){dst, len, (size_t) (zs->decompressedOffset - offset)}; + } + + prevOutPos = outTmp.pos; + prevInPos = zs->in.pos; + toRead = ZSTD_decompressStream(zs->dstream, &outTmp, &zs->in); + if (ZSTD_isError(toRead)) { + return toRead; + } + + if (zs->seekTable.checksumFlag) { + XXH64_update(&zs->xxhState, (BYTE*)outTmp.dst + prevOutPos, + outTmp.pos - prevOutPos); + } + forwardProgress = outTmp.pos - prevOutPos; + if (forwardProgress == 0) { + if (noOutputProgressCount++ > ZSTD_SEEKABLE_NO_OUTPUT_PROGRESS_MAX) { + return ERROR(seekableIO); + } + } else { + noOutputProgressCount = 0; + } + zs->decompressedOffset += forwardProgress; + srcBytesRead += zs->in.pos - prevInPos; + + if (toRead == 0) { + /* frame complete */ + + /* verify checksum */ + if (zs->seekTable.checksumFlag && + (XXH64_digest(&zs->xxhState) & 0xFFFFFFFFU) != + zs->seekTable.entries[targetFrame].checksum) { + return ERROR(corruption_detected); + } + + if (zs->decompressedOffset < offset + len) { + /* go back to the start and force a reset of the stream */ + targetFrame = ZSTD_seekable_offsetToFrameIndex(zs, zs->decompressedOffset); + /* in this case it will fail later with corruption_detected, since last block does not have checksum */ + assert(targetFrame != zs->seekTable.tableLen); + } + break; + } + + /* read in more data if we're done with this buffer */ + if (zs->in.pos == zs->in.size) { + toRead = MIN(toRead, SEEKABLE_BUFF_SIZE); + CHECK_IO(zs->src.read(zs->src.opaque, zs->inBuff, toRead)); + zs->in.size = toRead; + zs->in.pos = 0; + } + } /* while (zs->decompressedOffset < offset + len) */ + } while (zs->decompressedOffset != offset + len); + + return len; +} + +size_t ZSTD_seekable_decompressFrame(ZSTD_seekable* zs, void* dst, size_t dstSize, unsigned frameIndex) +{ + if (frameIndex >= zs->seekTable.tableLen) { + return ERROR(frameIndex_tooLarge); + } + + { size_t const decompressedSize = + zs->seekTable.entries[frameIndex + 1].dOffset - + zs->seekTable.entries[frameIndex].dOffset; + if (dstSize < decompressedSize) { + return ERROR(dstSize_tooSmall); + } + return ZSTD_seekable_decompress( + zs, dst, decompressedSize, + zs->seekTable.entries[frameIndex].dOffset); + } +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/seqBench/Makefile b/cpp/third_party/zstd-1.5.7/contrib/seqBench/Makefile new file mode 100644 index 0000000000..e7f08a42cc --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seqBench/Makefile @@ -0,0 +1,58 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# ################################################################ + +PROGDIR = ../../programs +LIBDIR = ../../lib + +LIBZSTD = $(LIBDIR)/libzstd.a + +CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/common -I$(LIBDIR)/dictBuilder -I$(PROGDIR) + +CFLAGS ?= -O3 -g +CFLAGS += -std=gnu99 +DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum \ + -Wstrict-prototypes -Wundef -Wpointer-arith \ + -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ + -Wredundant-decls +CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) + + +default: seqBench + +all : seqBench + +seqBench: util.o timefn.o benchfn.o datagen.o xxhash.o seqBench.c $(LIBZSTD) + $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +.PHONY: $(LIBZSTD) +$(LIBZSTD): + $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)" + +benchfn.o: $(PROGDIR)/benchfn.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + +timefn.o: $(PROGDIR)/timefn.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + +datagen.o: $(PROGDIR)/datagen.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + +util.o: $(PROGDIR)/util.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + + +xxhash.o : $(LIBDIR)/common/xxhash.c + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -c + + +clean: + $(RM) *.o + $(MAKE) -C $(LIBDIR) clean > /dev/null + $(RM) seqBench diff --git a/cpp/third_party/zstd-1.5.7/contrib/seqBench/seqBench.c b/cpp/third_party/zstd-1.5.7/contrib/seqBench/seqBench.c new file mode 100644 index 0000000000..7efebec7be --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/seqBench/seqBench.c @@ -0,0 +1,53 @@ +#define ZSTD_STATIC_LINKING_ONLY +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) { + ZSTD_CCtx* zc = ZSTD_createCCtx(); + + if (argc != 2) { + printf("Usage: seqBench \n"); // TODO provide the block delim option here + return 1; + } + + FILE *f = fopen(argv[1], "rb"); + fseek(f, 0, SEEK_END); + long inBufSize = ftell(f); + fseek(f, 0, SEEK_SET); + + char *inBuf = malloc(inBufSize + 1); + fread(inBuf, inBufSize, 1, f); + fclose(f); + + size_t seqsSize = ZSTD_sequenceBound(inBufSize); + ZSTD_Sequence *seqs = (ZSTD_Sequence*)malloc(seqsSize * sizeof(ZSTD_Sequence)); + char *outBuf = malloc(ZSTD_compressBound(inBufSize)); + + ZSTD_generateSequences(zc, seqs, seqsSize, inBuf, inBufSize); + ZSTD_CCtx_setParameter(zc, ZSTD_c_blockDelimiters, ZSTD_sf_explicitBlockDelimiters); + size_t outBufSize = ZSTD_compressSequences(zc, outBuf, inBufSize, seqs, seqsSize, inBuf, inBufSize); + if (ZSTD_isError(outBufSize)) { + printf("ERROR: %lu\n", outBufSize); + return 1; + } + + char *validationBuf = malloc(inBufSize); + ZSTD_decompress(validationBuf, inBufSize, outBuf, outBufSize); + + if (memcmp(inBuf, validationBuf, inBufSize) == 0) { + printf("Compression and decompression were successful!\n"); + } else { + printf("ERROR: input and validation buffers don't match!\n"); + for (int i = 0; i < inBufSize; i++) { + if (inBuf[i] != validationBuf[i]) { + printf("First bad index: %d\n", i); + break; + } + } + } + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/contrib/snap/snapcraft.yaml b/cpp/third_party/zstd-1.5.7/contrib/snap/snapcraft.yaml new file mode 100644 index 0000000000..0a77946ae0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/contrib/snap/snapcraft.yaml @@ -0,0 +1,28 @@ +name: zstd +version: git +summary: Zstandard - Fast real-time compression algorithm +description: | + Zstandard, or zstd as short version, is a fast lossless compression + algorithm, targeting real-time compression scenarios at zlib-level and better + compression ratios. It's backed by a very fast entropy stage, provided by + Huff0 and FSE library + +grade: devel # must be 'stable' to release into candidate/stable channels +confinement: devmode # use 'strict' once you have the right plugs and slots + +apps: + zstd: + command: usr/local/bin/zstd + plugs: [home, removable-media] + zstdgrep: + command: usr/local/bin/zstdgrep + plugs: [home, removable-media] + zstdless: + command: usr/local/bin/zstdless + plugs: [home, removable-media] + +parts: + zstd: + source: . + plugin: make + build-packages: [g++] diff --git a/cpp/third_party/zstd-1.5.7/doc/README.md b/cpp/third_party/zstd-1.5.7/doc/README.md new file mode 100644 index 0000000000..8f3babcdbb --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/README.md @@ -0,0 +1,26 @@ +Zstandard Documentation +======================= + +This directory contains material defining the Zstandard format, +as well as detailed instructions to use `zstd` library. + +__`zstd_manual.html`__ : Documentation of `zstd.h` API, in html format. +Unfortunately, Github doesn't display `html` files in parsed format, just as source code. +For a readable display of html API documentation of latest release, +use this link: [https://raw.githack.com/facebook/zstd/release/doc/zstd_manual.html](https://raw.githack.com/facebook/zstd/release/doc/zstd_manual.html) . + +__`zstd_compression_format.md`__ : This document defines the Zstandard compression format. +Compliant decoders must adhere to this document, +and compliant encoders must generate data that follows it. + +Should you look for resources to develop your own port of Zstandard algorithm, +you may find the following resources useful : + +__`educational_decoder`__ : This directory contains an implementation of a Zstandard decoder, +compliant with the Zstandard compression format. +It can be used, for example, to better understand the format, +or as the basis for a separate implementation of Zstandard decoder. + +[__`decode_corpus`__](https://github.com/facebook/zstd/tree/dev/tests#decodecorpus---tool-to-generate-zstandard-frames-for-decoder-testing) : +This tool, stored in `/tests` directory, is able to generate random valid frames, +which is useful if you wish to test your decoder and verify it fully supports the specification. diff --git a/cpp/third_party/zstd-1.5.7/doc/decompressor_errata.md b/cpp/third_party/zstd-1.5.7/doc/decompressor_errata.md new file mode 100644 index 0000000000..b570f73145 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/decompressor_errata.md @@ -0,0 +1,148 @@ +Decompressor Errata +=================== + +This document captures known decompressor bugs, where the decompressor rejects a valid zstd frame. +Each entry will contain: +1. The last affected decompressor versions. +2. The decompressor components affected. +2. Whether the compressed frame could ever be produced by the reference compressor. +3. An example frame (hexadecimal string when it can be short enough, link to golden file otherwise) +4. A description of the bug. + +The document is in reverse chronological order, with the bugs that affect the most recent zstd decompressor versions listed first. + + +No sequence using the 2-bytes format +------------------------------------------------ + +**Last affected version**: v1.5.5 + +**Affected decompressor component(s)**: Library & CLI + +**Produced by the reference compressor**: No + +**Example Frame**: see zstd/tests/golden-decompression/zeroSeq_2B.zst + +The zstd decoder incorrectly expects FSE tables when there are 0 sequences present in the block +if the value 0 is encoded using the 2-bytes format. +Instead, it should immediately end the sequence section, and move on to next block. + +This situation was never generated by the reference compressor, +because representing 0 sequences with the 2-bytes format is inefficient +(the 1-byte format is always used in this case). + + +Compressed block with a size of exactly 128 KB +------------------------------------------------ + +**Last affected version**: v1.5.2 + +**Affected decompressor component(s)**: Library & CLI + +**Produced by the reference compressor**: No + +**Example Frame**: see zstd/tests/golden-decompression/block-128k.zst + +The zstd decoder incorrectly rejected blocks of type `Compressed_Block` when their size was exactly 128 KB. +Note that `128 KB - 1` was accepted, and `128 KB + 1` is forbidden by the spec. + +This type of block was never generated by the reference compressor. + +These blocks used to be disallowed by the spec up until spec version 0.3.2 when the restriction was lifted by [PR#1689](https://github.com/facebook/zstd/pull/1689). + +> A Compressed_Block has the extra restriction that Block_Size is always strictly less than the decompressed size. If this condition cannot be respected, the block must be sent uncompressed instead (Raw_Block). + + +Compressed block with 0 literals and 0 sequences +------------------------------------------------ + +**Last affected version**: v1.5.2 + +**Affected decompressor component(s)**: Library & CLI + +**Produced by the reference compressor**: No + +**Example Frame**: `28b5 2ffd 2000 1500 0000 00` + +The zstd decoder incorrectly rejected blocks of type `Compressed_Block` that encodes literals as `Raw_Literals_Block` with no literals, and has no sequences. + +This type of block was never generated by the reference compressor. + +Additionally, these blocks were disallowed by the spec up until spec version 0.3.2 when the restriction was lifted by [PR#1689](https://github.com/facebook/zstd/pull/1689). + +> A Compressed_Block has the extra restriction that Block_Size is always strictly less than the decompressed size. If this condition cannot be respected, the block must be sent uncompressed instead (Raw_Block). + + +First block is RLE block +------------------------ + +**Last affected version**: v1.4.3 + +**Affected decompressor component(s)**: CLI only + +**Produced by the reference compressor**: No + +**Example Frame**: `28b5 2ffd a001 0002 0002 0010 000b 0000 00` + +The zstd CLI decompressor rejected cases where the first block was an RLE block whose `Block_Size` is 131072, and the frame contains more than one block. +This only affected the zstd CLI, and not the library. + +The example is an RLE block with 131072 bytes, followed by a second RLE block with 1 byte. + +The compressor currently works around this limitation by explicitly avoiding producing RLE blocks as the first +block. + +https://github.com/facebook/zstd/blob/8814aa5bfa74f05a86e55e9d508da177a893ceeb/lib/compress/zstd_compress.c#L3527-L3535 + + +Tiny FSE Table & Block +---------------------- + +**Last affected version**: v1.3.4 + +**Affected decompressor component(s)**: Library & CLI + +**Produced by the reference compressor**: Possibly until version v1.3.4, but probably never + +**Example Frame**: `28b5 2ffd 2027 c500 0080 f3f1 f0ec ebc6 c5c7 f09d 4300 0000 e0e0 0658 0100 603e 52` + +The zstd library rejected blocks of type `Compressed_Block` whose offset of the last table with type `FSE_Compressed_Mode` was less than 4 bytes from the end of the block. + +In more depth, let `Last_Table_Offset` be the offset in the compressed block (excluding the header) that +the last table with type `FSE_Compressed_Mode` started. If `Block_Content - Last_Table_Offset < 4` then +the buggy zstd decompressor would reject the block. This occurs when the last serialized table is 2 bytes +and the bitstream size is 1 byte. + +For example: +* There is 1 sequence in the block +* `Literals_Lengths_Mode` is `FSE_Compressed_Mode` & the serialized table size is 2 bytes +* `Offsets_Mode` is `Predefined_Mode` +* `Match_Lengths_Mode` is `Predefined_Mode` +* The bitstream is 1 byte. E.g. there is only one sequence and it fits in 1 byte. + +The total `Block_Content` is `5` bytes, and `Last_Table_Offset` is `2`. + +See the compressor workaround code: + +https://github.com/facebook/zstd/blob/8814aa5bfa74f05a86e55e9d508da177a893ceeb/lib/compress/zstd_compress.c#L2667-L2682 + +Magicless format +---------------------- + +**Last affected version**: v1.5.5 + +**Affected decompressor component(s)**: Library + +**Produced by the reference compressor**: Yes (example: https://gist.github.com/embg/9940726094f4cf2cef162cffe9319232) + +**Example Frame**: `27 b5 2f fd 00 03 19 00 00 66 6f 6f 3f ba c4 59` + +v1.5.6 fixes several bugs in which the magicless-format decoder rejects valid frames. +These include but are not limited to: +* Valid frames that happen to begin with a legacy magic number (little-endian) +* Valid frames that happen to begin with a skippable magic number (little-endian) + +If you are affected by this issue and cannot update to v1.5.6 or later, there is a +workaround to recover affected data. Simply prepend the ZSTD magic number +`0xFD2FB528` (little-endian) to your data and decompress using the standard-format +decoder. diff --git a/cpp/third_party/zstd-1.5.7/doc/decompressor_permissive.md b/cpp/third_party/zstd-1.5.7/doc/decompressor_permissive.md new file mode 100644 index 0000000000..164d6c86d6 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/decompressor_permissive.md @@ -0,0 +1,80 @@ +Decompressor Permissiveness to Invalid Data +=========================================== + +This document describes the behavior of the reference decompressor in cases +where it accepts formally invalid data instead of reporting an error. + +While the reference decompressor *must* decode any compliant frame following +the specification, its ability to detect erroneous data is on a best effort +basis: the decoder may accept input data that would be formally invalid, +when it causes no risk to the decoder, and which detection would cost too much +complexity or speed regression. + +In practice, the vast majority of invalid data are detected, if only because +many corruption events are dangerous for the decoder process (such as +requesting an out-of-bound memory access) and many more are easy to check. + +This document lists a few known cases where invalid data was formerly accepted +by the decoder, and what has changed since. + + +Truncated Huffman states +------------------------ + +**Last affected version**: v1.5.6 + +**Produced by the reference compressor**: No + +**Example Frame**: `28b5 2ffd 0000 5500 0072 8001 0420 7e1f 02aa 00` + +When using FSE-compressed Huffman weights, the compressed weight bitstream +could contain fewer bits than necessary to decode the initial states. + +The reference decompressor up to v1.5.6 will decode truncated or missing +initial states as zero, which can result in a valid Huffman tree if only +the second state is truncated. + +In newer versions, truncated initial states are reported as a corruption +error by the decoder. + + +Offset == 0 +----------- + +**Last affected version**: v1.5.5 + +**Produced by the reference compressor**: No + +**Example Frame**: `28b5 2ffd 0000 4500 0008 0002 002f 430b ae` + +If a sequence is decoded with `literals_length = 0` and `offset_value = 3` +while `Repeated_Offset_1 = 1`, the computed offset will be `0`, which is +invalid. + +The reference decompressor up to v1.5.5 processes this case as if the computed +offset was `1`, including inserting `1` into the repeated offset list. +This prevents the output buffer from remaining uninitialized, thus denying a +potential attack vector from an untrusted source. +However, in the rare case where this scenario would be the outcome of a +transmission or storage error, the decoder relies on the checksum to detect +the error. + +In newer versions, this case is always detected and reported as a corruption error. + + +Non-zeroes reserved bits +------------------------ + +**Last affected version**: v1.5.5 + +**Produced by the reference compressor**: No + +The Sequences section of each block has a header, and one of its elements is a +byte, which describes the compression mode of each symbol. +This byte contains 2 reserved bits which must be set to zero. + +The reference decompressor up to v1.5.5 just ignores these 2 bits. +This behavior has no consequence for the rest of the frame decoding process. + +In newer versions, the 2 reserved bits are actively checked for value zero, +and the decoder reports a corruption error if they are not. diff --git a/cpp/third_party/zstd-1.5.7/doc/educational_decoder/.gitignore b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/.gitignore new file mode 100644 index 0000000000..b801306fad --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/.gitignore @@ -0,0 +1,2 @@ +# Build artifacts +harness diff --git a/cpp/third_party/zstd-1.5.7/doc/educational_decoder/Makefile b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/Makefile new file mode 100644 index 0000000000..b3154d9afc --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/Makefile @@ -0,0 +1,62 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ + +ZSTD ?= zstd # note: requires zstd installation on local system + +UNAME?= $(shell sh -c 'MSYSTEM="MSYS" uname') +ifeq ($(UNAME), SunOS) +DIFF ?= gdiff +else +DIFF ?= diff +endif + +HARNESS_FILES=*.c + +MULTITHREAD_LDFLAGS = -pthread +DEBUGFLAGS= -g -DZSTD_DEBUG=1 +CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \ + -I$(ZSTDDIR)/dictBuilder -I$(ZSTDDIR)/deprecated -I$(PRGDIR) +CFLAGS ?= -O2 +CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum \ + -Wredundant-decls -Wstrict-prototypes -Wundef \ + -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \ + -std=c99 +CFLAGS += $(DEBUGFLAGS) +CFLAGS += $(MOREFLAGS) +FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MULTITHREAD_LDFLAGS) + +harness: $(HARNESS_FILES) + $(CC) $(FLAGS) $^ -o $@ + +clean: + @$(RM) harness *.o + @$(RM) -rf harness.dSYM # MacOS specific + +test: harness + # + # Testing single-file decompression with educational decoder + # + @$(ZSTD) -f README.md -o tmp.zst + @./harness tmp.zst tmp + @$(DIFF) -s tmp README.md + @$(RM) tmp* + # + # Testing dictionary decompression with education decoder + # + # note : files are presented multiple for training, to reach minimum threshold + @$(ZSTD) --train harness.c zstd_decompress.c zstd_decompress.h README.md \ + harness.c zstd_decompress.c zstd_decompress.h README.md \ + harness.c zstd_decompress.c zstd_decompress.h README.md \ + -o dictionary + @$(ZSTD) -f README.md -D dictionary -o tmp.zst + @./harness tmp.zst tmp dictionary + @$(DIFF) -s tmp README.md + @$(RM) tmp* dictionary diff --git a/cpp/third_party/zstd-1.5.7/doc/educational_decoder/README.md b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/README.md new file mode 100644 index 0000000000..c89451ca07 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/README.md @@ -0,0 +1,36 @@ +Educational Decoder +=================== + +`zstd_decompress.c` is a self-contained implementation in C99 of a decoder, +according to the [Zstandard format specification]. +While it does not implement as many features as the reference decoder, +such as the streaming API or content checksums, it is written to be easy to +follow and understand, to help understand how the Zstandard format works. +It's laid out to match the [format specification], +so it can be used to understand how complex segments could be implemented. +It also contains implementations of Huffman and FSE table decoding. + +[Zstandard format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md +[format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md + +While the library's primary objective is code clarity, +it also happens to compile into a small object file. +The object file can be made even smaller by removing error messages, +using the macro directive `ZDEC_NO_MESSAGE` at compilation time. +This can be reduced even further by foregoing dictionary support, +by defining `ZDEC_NO_DICTIONARY`. + +`harness.c` provides a simple test harness around the decoder: + + harness [dictionary] + +As an additional resource to be used with this decoder, +see the `decodecorpus` tool in the [tests] directory. +It generates valid Zstandard frames that can be used to verify +a Zstandard decoder implementation. +Note that to use the tool to verify this decoder implementation, +the --content-size flag should be set, +as this decoder does not handle streaming decoding, +and so it must know the decompressed size in advance. + +[tests]: https://github.com/facebook/zstd/blob/dev/tests/ diff --git a/cpp/third_party/zstd-1.5.7/doc/educational_decoder/harness.c b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/harness.c new file mode 100644 index 0000000000..12c5a801be --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/harness.c @@ -0,0 +1,119 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include +#include + +#include "zstd_decompress.h" + +typedef unsigned char u8; + +// If the data doesn't have decompressed size with it, fallback on assuming the +// compression ratio is at most 16 +#define MAX_COMPRESSION_RATIO (16) + +// Protect against allocating too much memory for output +#define MAX_OUTPUT_SIZE ((size_t)1024 * 1024 * 1024) + +// Error message then exit +#define ERR_OUT(...) { fprintf(stderr, __VA_ARGS__); exit(1); } + + +typedef struct { + u8* address; + size_t size; +} buffer_s; + +static void freeBuffer(buffer_s b) { free(b.address); } + +static buffer_s read_file(const char *path) +{ + FILE* const f = fopen(path, "rb"); + if (!f) ERR_OUT("failed to open file %s \n", path); + + fseek(f, 0L, SEEK_END); + size_t const size = (size_t)ftell(f); + rewind(f); + + void* const ptr = malloc(size); + if (!ptr) ERR_OUT("failed to allocate memory to hold %s \n", path); + + size_t const read = fread(ptr, 1, size, f); + if (read != size) ERR_OUT("error while reading file %s \n", path); + + fclose(f); + buffer_s const b = { ptr, size }; + return b; +} + +static void write_file(const char* path, const u8* ptr, size_t size) +{ + FILE* const f = fopen(path, "wb"); + if (!f) ERR_OUT("failed to open file %s \n", path); + + size_t written = 0; + while (written < size) { + written += fwrite(ptr+written, 1, size, f); + if (ferror(f)) ERR_OUT("error while writing file %s\n", path); + } + + fclose(f); +} + +int main(int argc, char **argv) +{ + if (argc < 3) + ERR_OUT("usage: %s [dictionary] \n", argv[0]); + + buffer_s const input = read_file(argv[1]); + + buffer_s dict = { NULL, 0 }; + if (argc >= 4) { + dict = read_file(argv[3]); + } + + size_t out_capacity = ZSTD_get_decompressed_size(input.address, input.size); + if (out_capacity == (size_t)-1) { + out_capacity = MAX_COMPRESSION_RATIO * input.size; + fprintf(stderr, "WARNING: Compressed data does not contain " + "decompressed size, going to assume the compression " + "ratio is at most %d (decompressed size of at most " + "%u) \n", + MAX_COMPRESSION_RATIO, (unsigned)out_capacity); + } + if (out_capacity > MAX_OUTPUT_SIZE) + ERR_OUT("Required output size too large for this implementation \n"); + + u8* const output = malloc(out_capacity); + if (!output) ERR_OUT("failed to allocate memory \n"); + + dictionary_t* const parsed_dict = create_dictionary(); + if (dict.size) { +#if defined (ZDEC_NO_DICTIONARY) + printf("dict.size = %zu \n", dict.size); + ERR_OUT("no dictionary support \n"); +#else + parse_dictionary(parsed_dict, dict.address, dict.size); +#endif + } + size_t const decompressed_size = + ZSTD_decompress_with_dict(output, out_capacity, + input.address, input.size, + parsed_dict); + + free_dictionary(parsed_dict); + + write_file(argv[2], output, decompressed_size); + + freeBuffer(input); + freeBuffer(dict); + free(output); + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.c b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.c new file mode 100644 index 0000000000..839e085b48 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.c @@ -0,0 +1,2323 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/// Zstandard educational decoder implementation +/// See https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md + +#include // uint8_t, etc. +#include // malloc, free, exit +#include // fprintf +#include // memset, memcpy +#include "zstd_decompress.h" + + +/******* IMPORTANT CONSTANTS *********************************************/ + +// Zstandard frame +// "Magic_Number +// 4 Bytes, little-endian format. Value : 0xFD2FB528" +#define ZSTD_MAGIC_NUMBER 0xFD2FB528U + +// The size of `Block_Content` is limited by `Block_Maximum_Size`, +#define ZSTD_BLOCK_SIZE_MAX ((size_t)128 * 1024) + +// literal blocks can't be larger than their block +#define MAX_LITERALS_SIZE ZSTD_BLOCK_SIZE_MAX + + +/******* UTILITY MACROS AND TYPES *********************************************/ +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) + +#if defined(ZDEC_NO_MESSAGE) +#define MESSAGE(...) +#else +#define MESSAGE(...) fprintf(stderr, "" __VA_ARGS__) +#endif + +/// This decoder calls exit(1) when it encounters an error, however a production +/// library should propagate error codes +#define ERROR(s) \ + do { \ + MESSAGE("Error: %s\n", s); \ + exit(1); \ + } while (0) +#define INP_SIZE() \ + ERROR("Input buffer smaller than it should be or input is " \ + "corrupted") +#define OUT_SIZE() ERROR("Output buffer too small for output") +#define CORRUPTION() ERROR("Corruption detected while decompressing") +#define BAD_ALLOC() ERROR("Memory allocation error") +#define IMPOSSIBLE() ERROR("An impossibility has occurred") + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; + +typedef int8_t i8; +typedef int16_t i16; +typedef int32_t i32; +typedef int64_t i64; +/******* END UTILITY MACROS AND TYPES *****************************************/ + +/******* IMPLEMENTATION PRIMITIVE PROTOTYPES **********************************/ +/// The implementations for these functions can be found at the bottom of this +/// file. They implement low-level functionality needed for the higher level +/// decompression functions. + +/*** IO STREAM OPERATIONS *************/ + +/// ostream_t/istream_t are used to wrap the pointers/length data passed into +/// ZSTD_decompress, so that all IO operations are safely bounds checked +/// They are written/read forward, and reads are treated as little-endian +/// They should be used opaquely to ensure safety +typedef struct { + u8 *ptr; + size_t len; +} ostream_t; + +typedef struct { + const u8 *ptr; + size_t len; + + // Input often reads a few bits at a time, so maintain an internal offset + int bit_offset; +} istream_t; + +/// The following two functions are the only ones that allow the istream to be +/// non-byte aligned + +/// Reads `num` bits from a bitstream, and updates the internal offset +static inline u64 IO_read_bits(istream_t *const in, const int num_bits); +/// Backs-up the stream by `num` bits so they can be read again +static inline void IO_rewind_bits(istream_t *const in, const int num_bits); +/// If the remaining bits in a byte will be unused, advance to the end of the +/// byte +static inline void IO_align_stream(istream_t *const in); + +/// Write the given byte into the output stream +static inline void IO_write_byte(ostream_t *const out, u8 symb); + +/// Returns the number of bytes left to be read in this stream. The stream must +/// be byte aligned. +static inline size_t IO_istream_len(const istream_t *const in); + +/// Advances the stream by `len` bytes, and returns a pointer to the chunk that +/// was skipped. The stream must be byte aligned. +static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len); +/// Advances the stream by `len` bytes, and returns a pointer to the chunk that +/// was skipped so it can be written to. +static inline u8 *IO_get_write_ptr(ostream_t *const out, size_t len); + +/// Advance the inner state by `len` bytes. The stream must be byte aligned. +static inline void IO_advance_input(istream_t *const in, size_t len); + +/// Returns an `ostream_t` constructed from the given pointer and length. +static inline ostream_t IO_make_ostream(u8 *out, size_t len); +/// Returns an `istream_t` constructed from the given pointer and length. +static inline istream_t IO_make_istream(const u8 *in, size_t len); + +/// Returns an `istream_t` with the same base as `in`, and length `len`. +/// Then, advance `in` to account for the consumed bytes. +/// `in` must be byte aligned. +static inline istream_t IO_make_sub_istream(istream_t *const in, size_t len); +/*** END IO STREAM OPERATIONS *********/ + +/*** BITSTREAM OPERATIONS *************/ +/// Read `num` bits (up to 64) from `src + offset`, where `offset` is in bits, +/// and return them interpreted as a little-endian unsigned integer. +static inline u64 read_bits_LE(const u8 *src, const int num_bits, + const size_t offset); + +/// Read bits from the end of a HUF or FSE bitstream. `offset` is in bits, so +/// it updates `offset` to `offset - bits`, and then reads `bits` bits from +/// `src + offset`. If the offset becomes negative, the extra bits at the +/// bottom are filled in with `0` bits instead of reading from before `src`. +static inline u64 STREAM_read_bits(const u8 *src, const int bits, + i64 *const offset); +/*** END BITSTREAM OPERATIONS *********/ + +/*** BIT COUNTING OPERATIONS **********/ +/// Returns the index of the highest set bit in `num`, or `-1` if `num == 0` +static inline int highest_set_bit(const u64 num); +/*** END BIT COUNTING OPERATIONS ******/ + +/*** HUFFMAN PRIMITIVES ***************/ +// Table decode method uses exponential memory, so we need to limit depth +#define HUF_MAX_BITS (16) + +// Limit the maximum number of symbols to 256 so we can store a symbol in a byte +#define HUF_MAX_SYMBS (256) + +/// Structure containing all tables necessary for efficient Huffman decoding +typedef struct { + u8 *symbols; + u8 *num_bits; + int max_bits; +} HUF_dtable; + +/// Decode a single symbol and read in enough bits to refresh the state +static inline u8 HUF_decode_symbol(const HUF_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset); +/// Read in a full state's worth of bits to initialize it +static inline void HUF_init_state(const HUF_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset); + +/// Decompresses a single Huffman stream, returns the number of bytes decoded. +/// `src_len` must be the exact length of the Huffman-coded block. +static size_t HUF_decompress_1stream(const HUF_dtable *const dtable, + ostream_t *const out, istream_t *const in); +/// Same as previous but decodes 4 streams, formatted as in the Zstandard +/// specification. +/// `src_len` must be the exact length of the Huffman-coded block. +static size_t HUF_decompress_4stream(const HUF_dtable *const dtable, + ostream_t *const out, istream_t *const in); + +/// Initialize a Huffman decoding table using the table of bit counts provided +static void HUF_init_dtable(HUF_dtable *const table, const u8 *const bits, + const int num_symbs); +/// Initialize a Huffman decoding table using the table of weights provided +/// Weights follow the definition provided in the Zstandard specification +static void HUF_init_dtable_usingweights(HUF_dtable *const table, + const u8 *const weights, + const int num_symbs); + +/// Free the malloc'ed parts of a decoding table +static void HUF_free_dtable(HUF_dtable *const dtable); +/*** END HUFFMAN PRIMITIVES ***********/ + +/*** FSE PRIMITIVES *******************/ +/// For more description of FSE see +/// https://github.com/Cyan4973/FiniteStateEntropy/ + +// FSE table decoding uses exponential memory, so limit the maximum accuracy +#define FSE_MAX_ACCURACY_LOG (15) +// Limit the maximum number of symbols so they can be stored in a single byte +#define FSE_MAX_SYMBS (256) + +/// The tables needed to decode FSE encoded streams +typedef struct { + u8 *symbols; + u8 *num_bits; + u16 *new_state_base; + int accuracy_log; +} FSE_dtable; + +/// Return the symbol for the current state +static inline u8 FSE_peek_symbol(const FSE_dtable *const dtable, + const u16 state); +/// Read the number of bits necessary to update state, update, and shift offset +/// back to reflect the bits read +static inline void FSE_update_state(const FSE_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset); + +/// Combine peek and update: decode a symbol and update the state +static inline u8 FSE_decode_symbol(const FSE_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset); + +/// Read bits from the stream to initialize the state and shift offset back +static inline void FSE_init_state(const FSE_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset); + +/// Decompress two interleaved bitstreams (e.g. compressed Huffman weights) +/// using an FSE decoding table. `src_len` must be the exact length of the +/// block. +static size_t FSE_decompress_interleaved2(const FSE_dtable *const dtable, + ostream_t *const out, + istream_t *const in); + +/// Initialize a decoding table using normalized frequencies. +static void FSE_init_dtable(FSE_dtable *const dtable, + const i16 *const norm_freqs, const int num_symbs, + const int accuracy_log); + +/// Decode an FSE header as defined in the Zstandard format specification and +/// use the decoded frequencies to initialize a decoding table. +static void FSE_decode_header(FSE_dtable *const dtable, istream_t *const in, + const int max_accuracy_log); + +/// Initialize an FSE table that will always return the same symbol and consume +/// 0 bits per symbol, to be used for RLE mode in sequence commands +static void FSE_init_dtable_rle(FSE_dtable *const dtable, const u8 symb); + +/// Free the malloc'ed parts of a decoding table +static void FSE_free_dtable(FSE_dtable *const dtable); +/*** END FSE PRIMITIVES ***************/ + +/******* END IMPLEMENTATION PRIMITIVE PROTOTYPES ******************************/ + +/******* ZSTD HELPER STRUCTS AND PROTOTYPES ***********************************/ + +/// A small structure that can be reused in various places that need to access +/// frame header information +typedef struct { + // The size of window that we need to be able to contiguously store for + // references + size_t window_size; + // The total output size of this compressed frame + size_t frame_content_size; + + // The dictionary id if this frame uses one + u32 dictionary_id; + + // Whether or not the content of this frame has a checksum + int content_checksum_flag; + // Whether or not the output for this frame is in a single segment + int single_segment_flag; +} frame_header_t; + +/// The context needed to decode blocks in a frame +typedef struct { + frame_header_t header; + + // The total amount of data available for backreferences, to determine if an + // offset too large to be correct + size_t current_total_output; + + const u8 *dict_content; + size_t dict_content_len; + + // Entropy encoding tables so they can be repeated by future blocks instead + // of retransmitting + HUF_dtable literals_dtable; + FSE_dtable ll_dtable; + FSE_dtable ml_dtable; + FSE_dtable of_dtable; + + // The last 3 offsets for the special "repeat offsets". + u64 previous_offsets[3]; +} frame_context_t; + +/// The decoded contents of a dictionary so that it doesn't have to be repeated +/// for each frame that uses it +struct dictionary_s { + // Entropy tables + HUF_dtable literals_dtable; + FSE_dtable ll_dtable; + FSE_dtable ml_dtable; + FSE_dtable of_dtable; + + // Raw content for backreferences + u8 *content; + size_t content_size; + + // Offset history to prepopulate the frame's history + u64 previous_offsets[3]; + + u32 dictionary_id; +}; + +/// A tuple containing the parts necessary to decode and execute a ZSTD sequence +/// command +typedef struct { + u32 literal_length; + u32 match_length; + u32 offset; +} sequence_command_t; + +/// The decoder works top-down, starting at the high level like Zstd frames, and +/// working down to lower more technical levels such as blocks, literals, and +/// sequences. The high-level functions roughly follow the outline of the +/// format specification: +/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md + +/// Before the implementation of each high-level function declared here, the +/// prototypes for their helper functions are defined and explained + +/// Decode a single Zstd frame, or error if the input is not a valid frame. +/// Accepts a dict argument, which may be NULL indicating no dictionary. +/// See +/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frame-concatenation +static void decode_frame(ostream_t *const out, istream_t *const in, + const dictionary_t *const dict); + +// Decode data in a compressed block +static void decompress_block(frame_context_t *const ctx, ostream_t *const out, + istream_t *const in); + +// Decode the literals section of a block +static size_t decode_literals(frame_context_t *const ctx, istream_t *const in, + u8 **const literals); + +// Decode the sequences part of a block +static size_t decode_sequences(frame_context_t *const ctx, istream_t *const in, + sequence_command_t **const sequences); + +// Execute the decoded sequences on the literals block +static void execute_sequences(frame_context_t *const ctx, ostream_t *const out, + const u8 *const literals, + const size_t literals_len, + const sequence_command_t *const sequences, + const size_t num_sequences); + +// Copies literals and returns the total literal length that was copied +static u32 copy_literals(const size_t seq, istream_t *litstream, + ostream_t *const out); + +// Given an offset code from a sequence command (either an actual offset value +// or an index for previous offset), computes the correct offset and updates +// the offset history +static size_t compute_offset(sequence_command_t seq, u64 *const offset_hist); + +// Given an offset, match length, and total output, as well as the frame +// context for the dictionary, determines if the dictionary is used and +// executes the copy operation +static void execute_match_copy(frame_context_t *const ctx, size_t offset, + size_t match_length, size_t total_output, + ostream_t *const out); + +/******* END ZSTD HELPER STRUCTS AND PROTOTYPES *******************************/ + +size_t ZSTD_decompress(void *const dst, const size_t dst_len, + const void *const src, const size_t src_len) { + dictionary_t* const uninit_dict = create_dictionary(); + size_t const decomp_size = ZSTD_decompress_with_dict(dst, dst_len, src, + src_len, uninit_dict); + free_dictionary(uninit_dict); + return decomp_size; +} + +size_t ZSTD_decompress_with_dict(void *const dst, const size_t dst_len, + const void *const src, const size_t src_len, + dictionary_t* parsed_dict) { + + istream_t in = IO_make_istream(src, src_len); + ostream_t out = IO_make_ostream(dst, dst_len); + + // "A content compressed by Zstandard is transformed into a Zstandard frame. + // Multiple frames can be appended into a single file or stream. A frame is + // totally independent, has a defined beginning and end, and a set of + // parameters which tells the decoder how to decompress it." + + /* this decoder assumes decompression of a single frame */ + decode_frame(&out, &in, parsed_dict); + + return (size_t)(out.ptr - (u8 *)dst); +} + +/******* FRAME DECODING ******************************************************/ + +static void decode_data_frame(ostream_t *const out, istream_t *const in, + const dictionary_t *const dict); +static void init_frame_context(frame_context_t *const context, + istream_t *const in, + const dictionary_t *const dict); +static void free_frame_context(frame_context_t *const context); +static void parse_frame_header(frame_header_t *const header, + istream_t *const in); +static void frame_context_apply_dict(frame_context_t *const ctx, + const dictionary_t *const dict); + +static void decompress_data(frame_context_t *const ctx, ostream_t *const out, + istream_t *const in); + +static void decode_frame(ostream_t *const out, istream_t *const in, + const dictionary_t *const dict) { + const u32 magic_number = (u32)IO_read_bits(in, 32); + if (magic_number == ZSTD_MAGIC_NUMBER) { + // ZSTD frame + decode_data_frame(out, in, dict); + + return; + } + + // not a real frame or a skippable frame + ERROR("Tried to decode non-ZSTD frame"); +} + +/// Decode a frame that contains compressed data. Not all frames do as there +/// are skippable frames. +/// See +/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#general-structure-of-zstandard-frame-format +static void decode_data_frame(ostream_t *const out, istream_t *const in, + const dictionary_t *const dict) { + frame_context_t ctx; + + // Initialize the context that needs to be carried from block to block + init_frame_context(&ctx, in, dict); + + if (ctx.header.frame_content_size != 0 && + ctx.header.frame_content_size > out->len) { + OUT_SIZE(); + } + + decompress_data(&ctx, out, in); + + free_frame_context(&ctx); +} + +/// Takes the information provided in the header and dictionary, and initializes +/// the context for this frame +static void init_frame_context(frame_context_t *const context, + istream_t *const in, + const dictionary_t *const dict) { + // Most fields in context are correct when initialized to 0 + memset(context, 0, sizeof(frame_context_t)); + + // Parse data from the frame header + parse_frame_header(&context->header, in); + + // Set up the offset history for the repeat offset commands + context->previous_offsets[0] = 1; + context->previous_offsets[1] = 4; + context->previous_offsets[2] = 8; + + // Apply details from the dict if it exists + frame_context_apply_dict(context, dict); +} + +static void free_frame_context(frame_context_t *const context) { + HUF_free_dtable(&context->literals_dtable); + + FSE_free_dtable(&context->ll_dtable); + FSE_free_dtable(&context->ml_dtable); + FSE_free_dtable(&context->of_dtable); + + memset(context, 0, sizeof(frame_context_t)); +} + +static void parse_frame_header(frame_header_t *const header, + istream_t *const in) { + // "The first header's byte is called the Frame_Header_Descriptor. It tells + // which other fields are present. Decoding this byte is enough to tell the + // size of Frame_Header. + // + // Bit number Field name + // 7-6 Frame_Content_Size_flag + // 5 Single_Segment_flag + // 4 Unused_bit + // 3 Reserved_bit + // 2 Content_Checksum_flag + // 1-0 Dictionary_ID_flag" + const u8 descriptor = (u8)IO_read_bits(in, 8); + + // decode frame header descriptor into flags + const u8 frame_content_size_flag = descriptor >> 6; + const u8 single_segment_flag = (descriptor >> 5) & 1; + const u8 reserved_bit = (descriptor >> 3) & 1; + const u8 content_checksum_flag = (descriptor >> 2) & 1; + const u8 dictionary_id_flag = descriptor & 3; + + if (reserved_bit != 0) { + CORRUPTION(); + } + + header->single_segment_flag = single_segment_flag; + header->content_checksum_flag = content_checksum_flag; + + // decode window size + if (!single_segment_flag) { + // "Provides guarantees on maximum back-reference distance that will be + // used within compressed data. This information is important for + // decoders to allocate enough memory. + // + // Bit numbers 7-3 2-0 + // Field name Exponent Mantissa" + u8 window_descriptor = (u8)IO_read_bits(in, 8); + u8 exponent = window_descriptor >> 3; + u8 mantissa = window_descriptor & 7; + + // Use the algorithm from the specification to compute window size + // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor + size_t window_base = (size_t)1 << (10 + exponent); + size_t window_add = (window_base / 8) * mantissa; + header->window_size = window_base + window_add; + } + + // decode dictionary id if it exists + if (dictionary_id_flag) { + // "This is a variable size field, which contains the ID of the + // dictionary required to properly decode the frame. Note that this + // field is optional. When it's not present, it's up to the caller to + // make sure it uses the correct dictionary. Format is little-endian." + const int bytes_array[] = {0, 1, 2, 4}; + const int bytes = bytes_array[dictionary_id_flag]; + + header->dictionary_id = (u32)IO_read_bits(in, bytes * 8); + } else { + header->dictionary_id = 0; + } + + // decode frame content size if it exists + if (single_segment_flag || frame_content_size_flag) { + // "This is the original (uncompressed) size. This information is + // optional. The Field_Size is provided according to value of + // Frame_Content_Size_flag. The Field_Size can be equal to 0 (not + // present), 1, 2, 4 or 8 bytes. Format is little-endian." + // + // if frame_content_size_flag == 0 but single_segment_flag is set, we + // still have a 1 byte field + const int bytes_array[] = {1, 2, 4, 8}; + const int bytes = bytes_array[frame_content_size_flag]; + + header->frame_content_size = IO_read_bits(in, bytes * 8); + if (bytes == 2) { + // "When Field_Size is 2, the offset of 256 is added." + header->frame_content_size += 256; + } + } else { + header->frame_content_size = 0; + } + + if (single_segment_flag) { + // "The Window_Descriptor byte is optional. It is absent when + // Single_Segment_flag is set. In this case, the maximum back-reference + // distance is the content size itself, which can be any value from 1 to + // 2^64-1 bytes (16 EB)." + header->window_size = header->frame_content_size; + } +} + +/// Decompress the data from a frame block by block +static void decompress_data(frame_context_t *const ctx, ostream_t *const out, + istream_t *const in) { + // "A frame encapsulates one or multiple blocks. Each block can be + // compressed or not, and has a guaranteed maximum content size, which + // depends on frame parameters. Unlike frames, each block depends on + // previous blocks for proper decoding. However, each block can be + // decompressed without waiting for its successor, allowing streaming + // operations." + int last_block = 0; + do { + // "Last_Block + // + // The lowest bit signals if this block is the last one. Frame ends + // right after this block. + // + // Block_Type and Block_Size + // + // The next 2 bits represent the Block_Type, while the remaining 21 bits + // represent the Block_Size. Format is little-endian." + last_block = (int)IO_read_bits(in, 1); + const int block_type = (int)IO_read_bits(in, 2); + const size_t block_len = IO_read_bits(in, 21); + + switch (block_type) { + case 0: { + // "Raw_Block - this is an uncompressed block. Block_Size is the + // number of bytes to read and copy." + const u8 *const read_ptr = IO_get_read_ptr(in, block_len); + u8 *const write_ptr = IO_get_write_ptr(out, block_len); + + // Copy the raw data into the output + memcpy(write_ptr, read_ptr, block_len); + + ctx->current_total_output += block_len; + break; + } + case 1: { + // "RLE_Block - this is a single byte, repeated N times. In which + // case, Block_Size is the size to regenerate, while the + // "compressed" block is just 1 byte (the byte to repeat)." + const u8 *const read_ptr = IO_get_read_ptr(in, 1); + u8 *const write_ptr = IO_get_write_ptr(out, block_len); + + // Copy `block_len` copies of `read_ptr[0]` to the output + memset(write_ptr, read_ptr[0], block_len); + + ctx->current_total_output += block_len; + break; + } + case 2: { + // "Compressed_Block - this is a Zstandard compressed block, + // detailed in another section of this specification. Block_Size is + // the compressed size. + + // Create a sub-stream for the block + istream_t block_stream = IO_make_sub_istream(in, block_len); + decompress_block(ctx, out, &block_stream); + break; + } + case 3: + // "Reserved - this is not a block. This value cannot be used with + // current version of this specification." + CORRUPTION(); + break; + default: + IMPOSSIBLE(); + } + } while (!last_block); + + if (ctx->header.content_checksum_flag) { + // This program does not support checking the checksum, so skip over it + // if it's present + IO_advance_input(in, 4); + } +} +/******* END FRAME DECODING ***************************************************/ + +/******* BLOCK DECOMPRESSION **************************************************/ +static void decompress_block(frame_context_t *const ctx, ostream_t *const out, + istream_t *const in) { + // "A compressed block consists of 2 sections : + // + // Literals_Section + // Sequences_Section" + + + // Part 1: decode the literals block + u8 *literals = NULL; + const size_t literals_size = decode_literals(ctx, in, &literals); + + // Part 2: decode the sequences block + sequence_command_t *sequences = NULL; + const size_t num_sequences = + decode_sequences(ctx, in, &sequences); + + // Part 3: combine literals and sequence commands to generate output + execute_sequences(ctx, out, literals, literals_size, sequences, + num_sequences); + free(literals); + free(sequences); +} +/******* END BLOCK DECOMPRESSION **********************************************/ + +/******* LITERALS DECODING ****************************************************/ +static size_t decode_literals_simple(istream_t *const in, u8 **const literals, + const int block_type, + const int size_format); +static size_t decode_literals_compressed(frame_context_t *const ctx, + istream_t *const in, + u8 **const literals, + const int block_type, + const int size_format); +static void decode_huf_table(HUF_dtable *const dtable, istream_t *const in); +static void fse_decode_hufweights(ostream_t *weights, istream_t *const in, + int *const num_symbs); + +static size_t decode_literals(frame_context_t *const ctx, istream_t *const in, + u8 **const literals) { + // "Literals can be stored uncompressed or compressed using Huffman prefix + // codes. When compressed, an optional tree description can be present, + // followed by 1 or 4 streams." + // + // "Literals_Section_Header + // + // Header is in charge of describing how literals are packed. It's a + // byte-aligned variable-size bitfield, ranging from 1 to 5 bytes, using + // little-endian convention." + // + // "Literals_Block_Type + // + // This field uses 2 lowest bits of first byte, describing 4 different block + // types" + // + // size_format takes between 1 and 2 bits + int block_type = (int)IO_read_bits(in, 2); + int size_format = (int)IO_read_bits(in, 2); + + if (block_type <= 1) { + // Raw or RLE literals block + return decode_literals_simple(in, literals, block_type, + size_format); + } else { + // Huffman compressed literals + return decode_literals_compressed(ctx, in, literals, block_type, + size_format); + } +} + +/// Decodes literals blocks in raw or RLE form +static size_t decode_literals_simple(istream_t *const in, u8 **const literals, + const int block_type, + const int size_format) { + size_t size; + switch (size_format) { + // These cases are in the form ?0 + // In this case, the ? bit is actually part of the size field + case 0: + case 2: + // "Size_Format uses 1 bit. Regenerated_Size uses 5 bits (0-31)." + IO_rewind_bits(in, 1); + size = IO_read_bits(in, 5); + break; + case 1: + // "Size_Format uses 2 bits. Regenerated_Size uses 12 bits (0-4095)." + size = IO_read_bits(in, 12); + break; + case 3: + // "Size_Format uses 2 bits. Regenerated_Size uses 20 bits (0-1048575)." + size = IO_read_bits(in, 20); + break; + default: + // Size format is in range 0-3 + IMPOSSIBLE(); + } + + if (size > MAX_LITERALS_SIZE) { + CORRUPTION(); + } + + *literals = malloc(size); + if (!*literals) { + BAD_ALLOC(); + } + + switch (block_type) { + case 0: { + // "Raw_Literals_Block - Literals are stored uncompressed." + const u8 *const read_ptr = IO_get_read_ptr(in, size); + memcpy(*literals, read_ptr, size); + break; + } + case 1: { + // "RLE_Literals_Block - Literals consist of a single byte value repeated N times." + const u8 *const read_ptr = IO_get_read_ptr(in, 1); + memset(*literals, read_ptr[0], size); + break; + } + default: + IMPOSSIBLE(); + } + + return size; +} + +/// Decodes Huffman compressed literals +static size_t decode_literals_compressed(frame_context_t *const ctx, + istream_t *const in, + u8 **const literals, + const int block_type, + const int size_format) { + size_t regenerated_size, compressed_size; + // Only size_format=0 has 1 stream, so default to 4 + int num_streams = 4; + switch (size_format) { + case 0: + // "A single stream. Both Compressed_Size and Regenerated_Size use 10 + // bits (0-1023)." + num_streams = 1; + // Fall through as it has the same size format + /* fallthrough */ + case 1: + // "4 streams. Both Compressed_Size and Regenerated_Size use 10 bits + // (0-1023)." + regenerated_size = IO_read_bits(in, 10); + compressed_size = IO_read_bits(in, 10); + break; + case 2: + // "4 streams. Both Compressed_Size and Regenerated_Size use 14 bits + // (0-16383)." + regenerated_size = IO_read_bits(in, 14); + compressed_size = IO_read_bits(in, 14); + break; + case 3: + // "4 streams. Both Compressed_Size and Regenerated_Size use 18 bits + // (0-262143)." + regenerated_size = IO_read_bits(in, 18); + compressed_size = IO_read_bits(in, 18); + break; + default: + // Impossible + IMPOSSIBLE(); + } + if (regenerated_size > MAX_LITERALS_SIZE) { + CORRUPTION(); + } + + *literals = malloc(regenerated_size); + if (!*literals) { + BAD_ALLOC(); + } + + ostream_t lit_stream = IO_make_ostream(*literals, regenerated_size); + istream_t huf_stream = IO_make_sub_istream(in, compressed_size); + + if (block_type == 2) { + // Decode the provided Huffman table + // "This section is only present when Literals_Block_Type type is + // Compressed_Literals_Block (2)." + + HUF_free_dtable(&ctx->literals_dtable); + decode_huf_table(&ctx->literals_dtable, &huf_stream); + } else { + // If the previous Huffman table is being repeated, ensure it exists + if (!ctx->literals_dtable.symbols) { + CORRUPTION(); + } + } + + size_t symbols_decoded; + if (num_streams == 1) { + symbols_decoded = HUF_decompress_1stream(&ctx->literals_dtable, &lit_stream, &huf_stream); + } else { + symbols_decoded = HUF_decompress_4stream(&ctx->literals_dtable, &lit_stream, &huf_stream); + } + + if (symbols_decoded != regenerated_size) { + CORRUPTION(); + } + + return regenerated_size; +} + +// Decode the Huffman table description +static void decode_huf_table(HUF_dtable *const dtable, istream_t *const in) { + // "All literal values from zero (included) to last present one (excluded) + // are represented by Weight with values from 0 to Max_Number_of_Bits." + + // "This is a single byte value (0-255), which describes how to decode the list of weights." + const u8 header = IO_read_bits(in, 8); + + u8 weights[HUF_MAX_SYMBS]; + memset(weights, 0, sizeof(weights)); + + int num_symbs; + + if (header >= 128) { + // "This is a direct representation, where each Weight is written + // directly as a 4 bits field (0-15). The full representation occupies + // ((Number_of_Symbols+1)/2) bytes, meaning it uses a last full byte + // even if Number_of_Symbols is odd. Number_of_Symbols = headerByte - + // 127" + num_symbs = header - 127; + const size_t bytes = (num_symbs + 1) / 2; + + const u8 *const weight_src = IO_get_read_ptr(in, bytes); + + for (int i = 0; i < num_symbs; i++) { + // "They are encoded forward, 2 + // weights to a byte with the first weight taking the top four bits + // and the second taking the bottom four (e.g. the following + // operations could be used to read the weights: Weight[0] = + // (Byte[0] >> 4), Weight[1] = (Byte[0] & 0xf), etc.)." + if (i % 2 == 0) { + weights[i] = weight_src[i / 2] >> 4; + } else { + weights[i] = weight_src[i / 2] & 0xf; + } + } + } else { + // The weights are FSE encoded, decode them before we can construct the + // table + istream_t fse_stream = IO_make_sub_istream(in, header); + ostream_t weight_stream = IO_make_ostream(weights, HUF_MAX_SYMBS); + fse_decode_hufweights(&weight_stream, &fse_stream, &num_symbs); + } + + // Construct the table using the decoded weights + HUF_init_dtable_usingweights(dtable, weights, num_symbs); +} + +static void fse_decode_hufweights(ostream_t *weights, istream_t *const in, + int *const num_symbs) { + const int MAX_ACCURACY_LOG = 7; + + FSE_dtable dtable; + + // "An FSE bitstream starts by a header, describing probabilities + // distribution. It will create a Decoding Table. For a list of Huffman + // weights, maximum accuracy is 7 bits." + FSE_decode_header(&dtable, in, MAX_ACCURACY_LOG); + + // Decode the weights + *num_symbs = FSE_decompress_interleaved2(&dtable, weights, in); + + FSE_free_dtable(&dtable); +} +/******* END LITERALS DECODING ************************************************/ + +/******* SEQUENCE DECODING ****************************************************/ +/// The combination of FSE states needed to decode sequences +typedef struct { + FSE_dtable ll_table; + FSE_dtable of_table; + FSE_dtable ml_table; + + u16 ll_state; + u16 of_state; + u16 ml_state; +} sequence_states_t; + +/// Different modes to signal to decode_seq_tables what to do +typedef enum { + seq_literal_length = 0, + seq_offset = 1, + seq_match_length = 2, +} seq_part_t; + +typedef enum { + seq_predefined = 0, + seq_rle = 1, + seq_fse = 2, + seq_repeat = 3, +} seq_mode_t; + +/// The predefined FSE distribution tables for `seq_predefined` mode +static const i16 SEQ_LITERAL_LENGTH_DEFAULT_DIST[36] = { + 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, -1, -1, -1, -1}; +static const i16 SEQ_OFFSET_DEFAULT_DIST[29] = { + 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1}; +static const i16 SEQ_MATCH_LENGTH_DEFAULT_DIST[53] = { + 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1}; + +/// The sequence decoding baseline and number of additional bits to read/add +/// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#the-codes-for-literals-lengths-match-lengths-and-offsets +static const u32 SEQ_LITERAL_LENGTH_BASELINES[36] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 18, 20, 22, 24, 28, 32, 40, + 48, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}; +static const u8 SEQ_LITERAL_LENGTH_EXTRA_BITS[36] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + +static const u32 SEQ_MATCH_LENGTH_BASELINES[53] = { + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 37, 39, 41, 43, 47, 51, 59, 67, 83, + 99, 131, 259, 515, 1027, 2051, 4099, 8195, 16387, 32771, 65539}; +static const u8 SEQ_MATCH_LENGTH_EXTRA_BITS[53] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 2, 2, 3, 3, 4, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; + +/// Offset decoding is simpler so we just need a maximum code value +static const u8 SEQ_MAX_CODES[3] = {35, (u8)-1, 52}; + +static void decompress_sequences(frame_context_t *const ctx, + istream_t *const in, + sequence_command_t *const sequences, + const size_t num_sequences); +static sequence_command_t decode_sequence(sequence_states_t *const state, + const u8 *const src, + i64 *const offset, + int lastSequence); +static void decode_seq_table(FSE_dtable *const table, istream_t *const in, + const seq_part_t type, const seq_mode_t mode); + +static size_t decode_sequences(frame_context_t *const ctx, istream_t *in, + sequence_command_t **const sequences) { + // "A compressed block is a succession of sequences . A sequence is a + // literal copy command, followed by a match copy command. A literal copy + // command specifies a length. It is the number of bytes to be copied (or + // extracted) from the literal section. A match copy command specifies an + // offset and a length. The offset gives the position to copy from, which + // can be within a previous block." + + size_t num_sequences; + + // "Number_of_Sequences + // + // This is a variable size field using between 1 and 3 bytes. Let's call its + // first byte byte0." + u8 header = IO_read_bits(in, 8); + if (header < 128) { + // "Number_of_Sequences = byte0 . Uses 1 byte." + num_sequences = header; + } else if (header < 255) { + // "Number_of_Sequences = ((byte0-128) << 8) + byte1 . Uses 2 bytes." + num_sequences = ((header - 128) << 8) + IO_read_bits(in, 8); + } else { + // "Number_of_Sequences = byte1 + (byte2<<8) + 0x7F00 . Uses 3 bytes." + num_sequences = IO_read_bits(in, 16) + 0x7F00; + } + + if (num_sequences == 0) { + // "There are no sequences. The sequence section stops there." + *sequences = NULL; + return 0; + } + + *sequences = malloc(num_sequences * sizeof(sequence_command_t)); + if (!*sequences) { + BAD_ALLOC(); + } + + decompress_sequences(ctx, in, *sequences, num_sequences); + return num_sequences; +} + +/// Decompress the FSE encoded sequence commands +static void decompress_sequences(frame_context_t *const ctx, istream_t *in, + sequence_command_t *const sequences, + const size_t num_sequences) { + // "The Sequences_Section regroup all symbols required to decode commands. + // There are 3 symbol types : literals lengths, offsets and match lengths. + // They are encoded together, interleaved, in a single bitstream." + + // "Symbol compression modes + // + // This is a single byte, defining the compression mode of each symbol + // type." + // + // Bit number : Field name + // 7-6 : Literals_Lengths_Mode + // 5-4 : Offsets_Mode + // 3-2 : Match_Lengths_Mode + // 1-0 : Reserved + u8 compression_modes = IO_read_bits(in, 8); + + if ((compression_modes & 3) != 0) { + // Reserved bits set + CORRUPTION(); + } + + // "Following the header, up to 3 distribution tables can be described. When + // present, they are in this order : + // + // Literals lengths + // Offsets + // Match Lengths" + // Update the tables we have stored in the context + decode_seq_table(&ctx->ll_dtable, in, seq_literal_length, + (compression_modes >> 6) & 3); + + decode_seq_table(&ctx->of_dtable, in, seq_offset, + (compression_modes >> 4) & 3); + + decode_seq_table(&ctx->ml_dtable, in, seq_match_length, + (compression_modes >> 2) & 3); + + + sequence_states_t states; + + // Initialize the decoding tables + { + states.ll_table = ctx->ll_dtable; + states.of_table = ctx->of_dtable; + states.ml_table = ctx->ml_dtable; + } + + const size_t len = IO_istream_len(in); + const u8 *const src = IO_get_read_ptr(in, len); + + // "After writing the last bit containing information, the compressor writes + // a single 1-bit and then fills the byte with 0-7 0 bits of padding." + const int padding = 8 - highest_set_bit(src[len - 1]); + // The offset starts at the end because FSE streams are read backwards + i64 bit_offset = (i64)(len * 8 - (size_t)padding); + + // "The bitstream starts with initial state values, each using the required + // number of bits in their respective accuracy, decoded previously from + // their normalized distribution. + // + // It starts by Literals_Length_State, followed by Offset_State, and finally + // Match_Length_State." + FSE_init_state(&states.ll_table, &states.ll_state, src, &bit_offset); + FSE_init_state(&states.of_table, &states.of_state, src, &bit_offset); + FSE_init_state(&states.ml_table, &states.ml_state, src, &bit_offset); + + for (size_t i = 0; i < num_sequences; i++) { + // Decode sequences one by one + sequences[i] = decode_sequence(&states, src, &bit_offset, i==num_sequences-1); + } + + if (bit_offset != 0) { + CORRUPTION(); + } +} + +// Decode a single sequence and update the state +static sequence_command_t decode_sequence(sequence_states_t *const states, + const u8 *const src, + i64 *const offset, + int lastSequence) { + // "Each symbol is a code in its own context, which specifies Baseline and + // Number_of_Bits to add. Codes are FSE compressed, and interleaved with raw + // additional bits in the same bitstream." + + // Decode symbols, but don't update states + const u8 of_code = FSE_peek_symbol(&states->of_table, states->of_state); + const u8 ll_code = FSE_peek_symbol(&states->ll_table, states->ll_state); + const u8 ml_code = FSE_peek_symbol(&states->ml_table, states->ml_state); + + // Offset doesn't need a max value as it's not decoded using a table + if (ll_code > SEQ_MAX_CODES[seq_literal_length] || + ml_code > SEQ_MAX_CODES[seq_match_length]) { + CORRUPTION(); + } + + // Read the interleaved bits + sequence_command_t seq; + // "Decoding starts by reading the Number_of_Bits required to decode Offset. + // It then does the same for Match_Length, and then for Literals_Length." + seq.offset = ((u32)1 << of_code) + STREAM_read_bits(src, of_code, offset); + + seq.match_length = + SEQ_MATCH_LENGTH_BASELINES[ml_code] + + STREAM_read_bits(src, SEQ_MATCH_LENGTH_EXTRA_BITS[ml_code], offset); + + seq.literal_length = + SEQ_LITERAL_LENGTH_BASELINES[ll_code] + + STREAM_read_bits(src, SEQ_LITERAL_LENGTH_EXTRA_BITS[ll_code], offset); + + // "If it is not the last sequence in the block, the next operation is to + // update states. Using the rules pre-calculated in the decoding tables, + // Literals_Length_State is updated, followed by Match_Length_State, and + // then Offset_State." + // If the stream is complete don't read bits to update state + if (!lastSequence) { + FSE_update_state(&states->ll_table, &states->ll_state, src, offset); + FSE_update_state(&states->ml_table, &states->ml_state, src, offset); + FSE_update_state(&states->of_table, &states->of_state, src, offset); + } + + return seq; +} + +/// Given a sequence part and table mode, decode the FSE distribution +/// Errors if the mode is `seq_repeat` without a pre-existing table in `table` +static void decode_seq_table(FSE_dtable *const table, istream_t *const in, + const seq_part_t type, const seq_mode_t mode) { + // Constant arrays indexed by seq_part_t + const i16 *const default_distributions[] = {SEQ_LITERAL_LENGTH_DEFAULT_DIST, + SEQ_OFFSET_DEFAULT_DIST, + SEQ_MATCH_LENGTH_DEFAULT_DIST}; + const size_t default_distribution_lengths[] = {36, 29, 53}; + const size_t default_distribution_accuracies[] = {6, 5, 6}; + + const size_t max_accuracies[] = {9, 8, 9}; + + if (mode != seq_repeat) { + // Free old one before overwriting + FSE_free_dtable(table); + } + + switch (mode) { + case seq_predefined: { + // "Predefined_Mode : uses a predefined distribution table." + const i16 *distribution = default_distributions[type]; + const size_t symbs = default_distribution_lengths[type]; + const size_t accuracy_log = default_distribution_accuracies[type]; + + FSE_init_dtable(table, distribution, symbs, accuracy_log); + break; + } + case seq_rle: { + // "RLE_Mode : it's a single code, repeated Number_of_Sequences times." + const u8 symb = IO_get_read_ptr(in, 1)[0]; + FSE_init_dtable_rle(table, symb); + break; + } + case seq_fse: { + // "FSE_Compressed_Mode : standard FSE compression. A distribution table + // will be present " + FSE_decode_header(table, in, max_accuracies[type]); + break; + } + case seq_repeat: + // "Repeat_Mode : reuse distribution table from previous compressed + // block." + // Nothing to do here, table will be unchanged + if (!table->symbols) { + // This mode is invalid if we don't already have a table + CORRUPTION(); + } + break; + default: + // Impossible, as mode is from 0-3 + IMPOSSIBLE(); + break; + } + +} +/******* END SEQUENCE DECODING ************************************************/ + +/******* SEQUENCE EXECUTION ***************************************************/ +static void execute_sequences(frame_context_t *const ctx, ostream_t *const out, + const u8 *const literals, + const size_t literals_len, + const sequence_command_t *const sequences, + const size_t num_sequences) { + istream_t litstream = IO_make_istream(literals, literals_len); + + u64 *const offset_hist = ctx->previous_offsets; + size_t total_output = ctx->current_total_output; + + for (size_t i = 0; i < num_sequences; i++) { + const sequence_command_t seq = sequences[i]; + { + const u32 literals_size = copy_literals(seq.literal_length, &litstream, out); + total_output += literals_size; + } + + size_t const offset = compute_offset(seq, offset_hist); + + size_t const match_length = seq.match_length; + + execute_match_copy(ctx, offset, match_length, total_output, out); + + total_output += match_length; + } + + // Copy any leftover literals + { + size_t len = IO_istream_len(&litstream); + copy_literals(len, &litstream, out); + total_output += len; + } + + ctx->current_total_output = total_output; +} + +static u32 copy_literals(const size_t literal_length, istream_t *litstream, + ostream_t *const out) { + // If the sequence asks for more literals than are left, the + // sequence must be corrupted + if (literal_length > IO_istream_len(litstream)) { + CORRUPTION(); + } + + u8 *const write_ptr = IO_get_write_ptr(out, literal_length); + const u8 *const read_ptr = + IO_get_read_ptr(litstream, literal_length); + // Copy literals to output + memcpy(write_ptr, read_ptr, literal_length); + + return literal_length; +} + +static size_t compute_offset(sequence_command_t seq, u64 *const offset_hist) { + size_t offset; + // Offsets are special, we need to handle the repeat offsets + if (seq.offset <= 3) { + // "The first 3 values define a repeated offset and we will call + // them Repeated_Offset1, Repeated_Offset2, and Repeated_Offset3. + // They are sorted in recency order, with Repeated_Offset1 meaning + // 'most recent one'". + + // Use 0 indexing for the array + u32 idx = seq.offset - 1; + if (seq.literal_length == 0) { + // "There is an exception though, when current sequence's + // literals length is 0. In this case, repeated offsets are + // shifted by one, so Repeated_Offset1 becomes Repeated_Offset2, + // Repeated_Offset2 becomes Repeated_Offset3, and + // Repeated_Offset3 becomes Repeated_Offset1 - 1_byte." + idx++; + } + + if (idx == 0) { + offset = offset_hist[0]; + } else { + // If idx == 3 then literal length was 0 and the offset was 3, + // as per the exception listed above + offset = idx < 3 ? offset_hist[idx] : offset_hist[0] - 1; + + // If idx == 1 we don't need to modify offset_hist[2], since + // we're using the second-most recent code + if (idx > 1) { + offset_hist[2] = offset_hist[1]; + } + offset_hist[1] = offset_hist[0]; + offset_hist[0] = offset; + } + } else { + // When it's not a repeat offset: + // "if (Offset_Value > 3) offset = Offset_Value - 3;" + offset = seq.offset - 3; + + // Shift back history + offset_hist[2] = offset_hist[1]; + offset_hist[1] = offset_hist[0]; + offset_hist[0] = offset; + } + return offset; +} + +static void execute_match_copy(frame_context_t *const ctx, size_t offset, + size_t match_length, size_t total_output, + ostream_t *const out) { + u8 *write_ptr = IO_get_write_ptr(out, match_length); + if (total_output <= ctx->header.window_size) { + // In this case offset might go back into the dictionary + if (offset > total_output + ctx->dict_content_len) { + // The offset goes beyond even the dictionary + CORRUPTION(); + } + + if (offset > total_output) { + // "The rest of the dictionary is its content. The content act + // as a "past" in front of data to compress or decompress, so it + // can be referenced in sequence commands." + const size_t dict_copy = + MIN(offset - total_output, match_length); + const size_t dict_offset = + ctx->dict_content_len - (offset - total_output); + + memcpy(write_ptr, ctx->dict_content + dict_offset, dict_copy); + write_ptr += dict_copy; + match_length -= dict_copy; + } + } else if (offset > ctx->header.window_size) { + CORRUPTION(); + } + + // We must copy byte by byte because the match length might be larger + // than the offset + // ex: if the output so far was "abc", a command with offset=3 and + // match_length=6 would produce "abcabcabc" as the new output + for (size_t j = 0; j < match_length; j++) { + *write_ptr = *(write_ptr - offset); + write_ptr++; + } +} +/******* END SEQUENCE EXECUTION ***********************************************/ + +/******* OUTPUT SIZE COUNTING *************************************************/ +/// Get the decompressed size of an input stream so memory can be allocated in +/// advance. +/// This implementation assumes `src` points to a single ZSTD-compressed frame +size_t ZSTD_get_decompressed_size(const void *src, const size_t src_len) { + istream_t in = IO_make_istream(src, src_len); + + // get decompressed size from ZSTD frame header + { + const u32 magic_number = (u32)IO_read_bits(&in, 32); + + if (magic_number == ZSTD_MAGIC_NUMBER) { + // ZSTD frame + frame_header_t header; + parse_frame_header(&header, &in); + + if (header.frame_content_size == 0 && !header.single_segment_flag) { + // Content size not provided, we can't tell + return (size_t)-1; + } + + return header.frame_content_size; + } else { + // not a real frame or skippable frame + ERROR("ZSTD frame magic number did not match"); + } + } +} +/******* END OUTPUT SIZE COUNTING *********************************************/ + +/******* DICTIONARY PARSING ***************************************************/ +dictionary_t* create_dictionary(void) { + dictionary_t* const dict = calloc(1, sizeof(dictionary_t)); + if (!dict) { + BAD_ALLOC(); + } + return dict; +} + +/// Free an allocated dictionary +void free_dictionary(dictionary_t *const dict) { + HUF_free_dtable(&dict->literals_dtable); + FSE_free_dtable(&dict->ll_dtable); + FSE_free_dtable(&dict->of_dtable); + FSE_free_dtable(&dict->ml_dtable); + + free(dict->content); + + memset(dict, 0, sizeof(dictionary_t)); + + free(dict); +} + + +#if !defined(ZDEC_NO_DICTIONARY) +#define DICT_SIZE_ERROR() ERROR("Dictionary size cannot be less than 8 bytes") +#define NULL_SRC() ERROR("Tried to create dictionary with pointer to null src"); + +static void init_dictionary_content(dictionary_t *const dict, + istream_t *const in); + +void parse_dictionary(dictionary_t *const dict, const void *src, + size_t src_len) { + const u8 *byte_src = (const u8 *)src; + memset(dict, 0, sizeof(dictionary_t)); + if (src == NULL) { /* cannot initialize dictionary with null src */ + NULL_SRC(); + } + if (src_len < 8) { + DICT_SIZE_ERROR(); + } + + istream_t in = IO_make_istream(byte_src, src_len); + + const u32 magic_number = IO_read_bits(&in, 32); + if (magic_number != 0xEC30A437) { + // raw content dict + IO_rewind_bits(&in, 32); + init_dictionary_content(dict, &in); + return; + } + + dict->dictionary_id = IO_read_bits(&in, 32); + + // "Entropy_Tables : following the same format as the tables in compressed + // blocks. They are stored in following order : Huffman tables for literals, + // FSE table for offsets, FSE table for match lengths, and FSE table for + // literals lengths. It's finally followed by 3 offset values, populating + // recent offsets (instead of using {1,4,8}), stored in order, 4-bytes + // little-endian each, for a total of 12 bytes. Each recent offset must have + // a value < dictionary size." + decode_huf_table(&dict->literals_dtable, &in); + decode_seq_table(&dict->of_dtable, &in, seq_offset, seq_fse); + decode_seq_table(&dict->ml_dtable, &in, seq_match_length, seq_fse); + decode_seq_table(&dict->ll_dtable, &in, seq_literal_length, seq_fse); + + // Read in the previous offset history + dict->previous_offsets[0] = IO_read_bits(&in, 32); + dict->previous_offsets[1] = IO_read_bits(&in, 32); + dict->previous_offsets[2] = IO_read_bits(&in, 32); + + // Ensure the provided offsets aren't too large + // "Each recent offset must have a value < dictionary size." + for (int i = 0; i < 3; i++) { + if (dict->previous_offsets[i] > src_len) { + ERROR("Dictionary corrupted"); + } + } + + // "Content : The rest of the dictionary is its content. The content act as + // a "past" in front of data to compress or decompress, so it can be + // referenced in sequence commands." + init_dictionary_content(dict, &in); +} + +static void init_dictionary_content(dictionary_t *const dict, + istream_t *const in) { + // Copy in the content + dict->content_size = IO_istream_len(in); + dict->content = malloc(dict->content_size); + if (!dict->content) { + BAD_ALLOC(); + } + + const u8 *const content = IO_get_read_ptr(in, dict->content_size); + + memcpy(dict->content, content, dict->content_size); +} + +static void HUF_copy_dtable(HUF_dtable *const dst, + const HUF_dtable *const src) { + if (src->max_bits == 0) { + memset(dst, 0, sizeof(HUF_dtable)); + return; + } + + const size_t size = (size_t)1 << src->max_bits; + dst->max_bits = src->max_bits; + + dst->symbols = malloc(size); + dst->num_bits = malloc(size); + if (!dst->symbols || !dst->num_bits) { + BAD_ALLOC(); + } + + memcpy(dst->symbols, src->symbols, size); + memcpy(dst->num_bits, src->num_bits, size); +} + +static void FSE_copy_dtable(FSE_dtable *const dst, const FSE_dtable *const src) { + if (src->accuracy_log == 0) { + memset(dst, 0, sizeof(FSE_dtable)); + return; + } + + size_t size = (size_t)1 << src->accuracy_log; + dst->accuracy_log = src->accuracy_log; + + dst->symbols = malloc(size); + dst->num_bits = malloc(size); + dst->new_state_base = malloc(size * sizeof(u16)); + if (!dst->symbols || !dst->num_bits || !dst->new_state_base) { + BAD_ALLOC(); + } + + memcpy(dst->symbols, src->symbols, size); + memcpy(dst->num_bits, src->num_bits, size); + memcpy(dst->new_state_base, src->new_state_base, size * sizeof(u16)); +} + +/// A dictionary acts as initializing values for the frame context before +/// decompression, so we implement it by applying it's predetermined +/// tables and content to the context before beginning decompression +static void frame_context_apply_dict(frame_context_t *const ctx, + const dictionary_t *const dict) { + // If the content pointer is NULL then it must be an empty dict + if (!dict || !dict->content) + return; + + // If the requested dictionary_id is non-zero, the correct dictionary must + // be present + if (ctx->header.dictionary_id != 0 && + ctx->header.dictionary_id != dict->dictionary_id) { + ERROR("Wrong dictionary provided"); + } + + // Copy the dict content to the context for references during sequence + // execution + ctx->dict_content = dict->content; + ctx->dict_content_len = dict->content_size; + + // If it's a formatted dict copy the precomputed tables in so they can + // be used in the table repeat modes + if (dict->dictionary_id != 0) { + // Deep copy the entropy tables so they can be freed independently of + // the dictionary struct + HUF_copy_dtable(&ctx->literals_dtable, &dict->literals_dtable); + FSE_copy_dtable(&ctx->ll_dtable, &dict->ll_dtable); + FSE_copy_dtable(&ctx->of_dtable, &dict->of_dtable); + FSE_copy_dtable(&ctx->ml_dtable, &dict->ml_dtable); + + // Copy the repeated offsets + memcpy(ctx->previous_offsets, dict->previous_offsets, + sizeof(ctx->previous_offsets)); + } +} + +#else // ZDEC_NO_DICTIONARY is defined + +static void frame_context_apply_dict(frame_context_t *const ctx, + const dictionary_t *const dict) { + (void)ctx; + if (dict && dict->content) ERROR("dictionary not supported"); +} + +#endif +/******* END DICTIONARY PARSING ***********************************************/ + +/******* IO STREAM OPERATIONS *************************************************/ + +/// Reads `num` bits from a bitstream, and updates the internal offset +static inline u64 IO_read_bits(istream_t *const in, const int num_bits) { + if (num_bits > 64 || num_bits <= 0) { + ERROR("Attempt to read an invalid number of bits"); + } + + const size_t bytes = (num_bits + in->bit_offset + 7) / 8; + const size_t full_bytes = (num_bits + in->bit_offset) / 8; + if (bytes > in->len) { + INP_SIZE(); + } + + const u64 result = read_bits_LE(in->ptr, num_bits, in->bit_offset); + + in->bit_offset = (num_bits + in->bit_offset) % 8; + in->ptr += full_bytes; + in->len -= full_bytes; + + return result; +} + +/// If a non-zero number of bits have been read from the current byte, advance +/// the offset to the next byte +static inline void IO_rewind_bits(istream_t *const in, int num_bits) { + if (num_bits < 0) { + ERROR("Attempting to rewind stream by a negative number of bits"); + } + + // move the offset back by `num_bits` bits + const int new_offset = in->bit_offset - num_bits; + // determine the number of whole bytes we have to rewind, rounding up to an + // integer number (e.g. if `new_offset == -5`, `bytes == 1`) + const i64 bytes = -(new_offset - 7) / 8; + + in->ptr -= bytes; + in->len += bytes; + // make sure the resulting `bit_offset` is positive, as mod in C does not + // convert numbers from negative to positive (e.g. -22 % 8 == -6) + in->bit_offset = ((new_offset % 8) + 8) % 8; +} + +/// If the remaining bits in a byte will be unused, advance to the end of the +/// byte +static inline void IO_align_stream(istream_t *const in) { + if (in->bit_offset != 0) { + if (in->len == 0) { + INP_SIZE(); + } + in->ptr++; + in->len--; + in->bit_offset = 0; + } +} + +/// Write the given byte into the output stream +static inline void IO_write_byte(ostream_t *const out, u8 symb) { + if (out->len == 0) { + OUT_SIZE(); + } + + out->ptr[0] = symb; + out->ptr++; + out->len--; +} + +/// Returns the number of bytes left to be read in this stream. The stream must +/// be byte aligned. +static inline size_t IO_istream_len(const istream_t *const in) { + return in->len; +} + +/// Returns a pointer where `len` bytes can be read, and advances the internal +/// state. The stream must be byte aligned. +static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len) { + if (len > in->len) { + INP_SIZE(); + } + if (in->bit_offset != 0) { + ERROR("Attempting to operate on a non-byte aligned stream"); + } + const u8 *const ptr = in->ptr; + in->ptr += len; + in->len -= len; + + return ptr; +} +/// Returns a pointer to write `len` bytes to, and advances the internal state +static inline u8 *IO_get_write_ptr(ostream_t *const out, size_t len) { + if (len > out->len) { + OUT_SIZE(); + } + u8 *const ptr = out->ptr; + out->ptr += len; + out->len -= len; + + return ptr; +} + +/// Advance the inner state by `len` bytes +static inline void IO_advance_input(istream_t *const in, size_t len) { + if (len > in->len) { + INP_SIZE(); + } + if (in->bit_offset != 0) { + ERROR("Attempting to operate on a non-byte aligned stream"); + } + + in->ptr += len; + in->len -= len; +} + +/// Returns an `ostream_t` constructed from the given pointer and length +static inline ostream_t IO_make_ostream(u8 *out, size_t len) { + return (ostream_t) { out, len }; +} + +/// Returns an `istream_t` constructed from the given pointer and length +static inline istream_t IO_make_istream(const u8 *in, size_t len) { + return (istream_t) { in, len, 0 }; +} + +/// Returns an `istream_t` with the same base as `in`, and length `len` +/// Then, advance `in` to account for the consumed bytes +/// `in` must be byte aligned +static inline istream_t IO_make_sub_istream(istream_t *const in, size_t len) { + // Consume `len` bytes of the parent stream + const u8 *const ptr = IO_get_read_ptr(in, len); + + // Make a substream using the pointer to those `len` bytes + return IO_make_istream(ptr, len); +} +/******* END IO STREAM OPERATIONS *********************************************/ + +/******* BITSTREAM OPERATIONS *************************************************/ +/// Read `num` bits (up to 64) from `src + offset`, where `offset` is in bits +static inline u64 read_bits_LE(const u8 *src, const int num_bits, + const size_t offset) { + if (num_bits > 64) { + ERROR("Attempt to read an invalid number of bits"); + } + + // Skip over bytes that aren't in range + src += offset / 8; + size_t bit_offset = offset % 8; + u64 res = 0; + + int shift = 0; + int left = num_bits; + while (left > 0) { + u64 mask = left >= 8 ? 0xff : (((u64)1 << left) - 1); + // Read the next byte, shift it to account for the offset, and then mask + // out the top part if we don't need all the bits + res += (((u64)*src++ >> bit_offset) & mask) << shift; + shift += 8 - bit_offset; + left -= 8 - bit_offset; + bit_offset = 0; + } + + return res; +} + +/// Read bits from the end of a HUF or FSE bitstream. `offset` is in bits, so +/// it updates `offset` to `offset - bits`, and then reads `bits` bits from +/// `src + offset`. If the offset becomes negative, the extra bits at the +/// bottom are filled in with `0` bits instead of reading from before `src`. +static inline u64 STREAM_read_bits(const u8 *const src, const int bits, + i64 *const offset) { + *offset = *offset - bits; + size_t actual_off = *offset; + size_t actual_bits = bits; + // Don't actually read bits from before the start of src, so if `*offset < + // 0` fix actual_off and actual_bits to reflect the quantity to read + if (*offset < 0) { + actual_bits += *offset; + actual_off = 0; + } + u64 res = read_bits_LE(src, actual_bits, actual_off); + + if (*offset < 0) { + // Fill in the bottom "overflowed" bits with 0's + res = -*offset >= 64 ? 0 : (res << -*offset); + } + return res; +} +/******* END BITSTREAM OPERATIONS *********************************************/ + +/******* BIT COUNTING OPERATIONS **********************************************/ +/// Returns `x`, where `2^x` is the largest power of 2 less than or equal to +/// `num`, or `-1` if `num == 0`. +static inline int highest_set_bit(const u64 num) { + for (int i = 63; i >= 0; i--) { + if (((u64)1 << i) <= num) { + return i; + } + } + return -1; +} +/******* END BIT COUNTING OPERATIONS ******************************************/ + +/******* HUFFMAN PRIMITIVES ***************************************************/ +static inline u8 HUF_decode_symbol(const HUF_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset) { + // Look up the symbol and number of bits to read + const u8 symb = dtable->symbols[*state]; + const u8 bits = dtable->num_bits[*state]; + const u16 rest = STREAM_read_bits(src, bits, offset); + // Shift `bits` bits out of the state, keeping the low order bits that + // weren't necessary to determine this symbol. Then add in the new bits + // read from the stream. + *state = ((*state << bits) + rest) & (((u16)1 << dtable->max_bits) - 1); + + return symb; +} + +static inline void HUF_init_state(const HUF_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset) { + // Read in a full `dtable->max_bits` bits to initialize the state + const u8 bits = dtable->max_bits; + *state = STREAM_read_bits(src, bits, offset); +} + +static size_t HUF_decompress_1stream(const HUF_dtable *const dtable, + ostream_t *const out, + istream_t *const in) { + const size_t len = IO_istream_len(in); + if (len == 0) { + INP_SIZE(); + } + const u8 *const src = IO_get_read_ptr(in, len); + + // "Each bitstream must be read backward, that is starting from the end down + // to the beginning. Therefore it's necessary to know the size of each + // bitstream. + // + // It's also necessary to know exactly which bit is the latest. This is + // detected by a final bit flag : the highest bit of latest byte is a + // final-bit-flag. Consequently, a last byte of 0 is not possible. And the + // final-bit-flag itself is not part of the useful bitstream. Hence, the + // last byte contains between 0 and 7 useful bits." + const int padding = 8 - highest_set_bit(src[len - 1]); + + // Offset starts at the end because HUF streams are read backwards + i64 bit_offset = len * 8 - padding; + u16 state; + + HUF_init_state(dtable, &state, src, &bit_offset); + + size_t symbols_written = 0; + while (bit_offset > -dtable->max_bits) { + // Iterate over the stream, decoding one symbol at a time + IO_write_byte(out, HUF_decode_symbol(dtable, &state, src, &bit_offset)); + symbols_written++; + } + // "The process continues up to reading the required number of symbols per + // stream. If a bitstream is not entirely and exactly consumed, hence + // reaching exactly its beginning position with all bits consumed, the + // decoding process is considered faulty." + + // When all symbols have been decoded, the final state value shouldn't have + // any data from the stream, so it should have "read" dtable->max_bits from + // before the start of `src` + // Therefore `offset`, the edge to start reading new bits at, should be + // dtable->max_bits before the start of the stream + if (bit_offset != -dtable->max_bits) { + CORRUPTION(); + } + + return symbols_written; +} + +static size_t HUF_decompress_4stream(const HUF_dtable *const dtable, + ostream_t *const out, istream_t *const in) { + // "Compressed size is provided explicitly : in the 4-streams variant, + // bitstreams are preceded by 3 unsigned little-endian 16-bits values. Each + // value represents the compressed size of one stream, in order. The last + // stream size is deducted from total compressed size and from previously + // decoded stream sizes" + const size_t csize1 = IO_read_bits(in, 16); + const size_t csize2 = IO_read_bits(in, 16); + const size_t csize3 = IO_read_bits(in, 16); + + istream_t in1 = IO_make_sub_istream(in, csize1); + istream_t in2 = IO_make_sub_istream(in, csize2); + istream_t in3 = IO_make_sub_istream(in, csize3); + istream_t in4 = IO_make_sub_istream(in, IO_istream_len(in)); + + size_t total_output = 0; + // Decode each stream independently for simplicity + // If we wanted to we could decode all 4 at the same time for speed, + // utilizing more execution units + total_output += HUF_decompress_1stream(dtable, out, &in1); + total_output += HUF_decompress_1stream(dtable, out, &in2); + total_output += HUF_decompress_1stream(dtable, out, &in3); + total_output += HUF_decompress_1stream(dtable, out, &in4); + + return total_output; +} + +/// Initializes a Huffman table using canonical Huffman codes +/// For more explanation on canonical Huffman codes see +/// https://www.cs.scranton.edu/~mccloske/courses/cmps340/huff_canonical_dec2015.html +/// Codes within a level are allocated in symbol order (i.e. smaller symbols get +/// earlier codes) +static void HUF_init_dtable(HUF_dtable *const table, const u8 *const bits, + const int num_symbs) { + memset(table, 0, sizeof(HUF_dtable)); + if (num_symbs > HUF_MAX_SYMBS) { + ERROR("Too many symbols for Huffman"); + } + + u8 max_bits = 0; + u16 rank_count[HUF_MAX_BITS + 1]; + memset(rank_count, 0, sizeof(rank_count)); + + // Count the number of symbols for each number of bits, and determine the + // depth of the tree + for (int i = 0; i < num_symbs; i++) { + if (bits[i] > HUF_MAX_BITS) { + ERROR("Huffman table depth too large"); + } + max_bits = MAX(max_bits, bits[i]); + rank_count[bits[i]]++; + } + + const size_t table_size = 1 << max_bits; + table->max_bits = max_bits; + table->symbols = malloc(table_size); + table->num_bits = malloc(table_size); + + if (!table->symbols || !table->num_bits) { + free(table->symbols); + free(table->num_bits); + BAD_ALLOC(); + } + + // "Symbols are sorted by Weight. Within same Weight, symbols keep natural + // order. Symbols with a Weight of zero are removed. Then, starting from + // lowest weight, prefix codes are distributed in order." + + u32 rank_idx[HUF_MAX_BITS + 1]; + // Initialize the starting codes for each rank (number of bits) + rank_idx[max_bits] = 0; + for (int i = max_bits; i >= 1; i--) { + rank_idx[i - 1] = rank_idx[i] + rank_count[i] * (1 << (max_bits - i)); + // The entire range takes the same number of bits so we can memset it + memset(&table->num_bits[rank_idx[i]], i, rank_idx[i - 1] - rank_idx[i]); + } + + if (rank_idx[0] != table_size) { + CORRUPTION(); + } + + // Allocate codes and fill in the table + for (int i = 0; i < num_symbs; i++) { + if (bits[i] != 0) { + // Allocate a code for this symbol and set its range in the table + const u16 code = rank_idx[bits[i]]; + // Since the code doesn't care about the bottom `max_bits - bits[i]` + // bits of state, it gets a range that spans all possible values of + // the lower bits + const u16 len = 1 << (max_bits - bits[i]); + memset(&table->symbols[code], i, len); + rank_idx[bits[i]] += len; + } + } +} + +static void HUF_init_dtable_usingweights(HUF_dtable *const table, + const u8 *const weights, + const int num_symbs) { + // +1 because the last weight is not transmitted in the header + if (num_symbs + 1 > HUF_MAX_SYMBS) { + ERROR("Too many symbols for Huffman"); + } + + u8 bits[HUF_MAX_SYMBS]; + + u64 weight_sum = 0; + for (int i = 0; i < num_symbs; i++) { + // Weights are in the same range as bit count + if (weights[i] > HUF_MAX_BITS) { + CORRUPTION(); + } + weight_sum += weights[i] > 0 ? (u64)1 << (weights[i] - 1) : 0; + } + + // Find the first power of 2 larger than the sum + const int max_bits = highest_set_bit(weight_sum) + 1; + const u64 left_over = ((u64)1 << max_bits) - weight_sum; + // If the left over isn't a power of 2, the weights are invalid + if (left_over & (left_over - 1)) { + CORRUPTION(); + } + + // left_over is used to find the last weight as it's not transmitted + // by inverting 2^(weight - 1) we can determine the value of last_weight + const int last_weight = highest_set_bit(left_over) + 1; + + for (int i = 0; i < num_symbs; i++) { + // "Number_of_Bits = Number_of_Bits ? Max_Number_of_Bits + 1 - Weight : 0" + bits[i] = weights[i] > 0 ? (max_bits + 1 - weights[i]) : 0; + } + bits[num_symbs] = + max_bits + 1 - last_weight; // Last weight is always non-zero + + HUF_init_dtable(table, bits, num_symbs + 1); +} + +static void HUF_free_dtable(HUF_dtable *const dtable) { + free(dtable->symbols); + free(dtable->num_bits); + memset(dtable, 0, sizeof(HUF_dtable)); +} +/******* END HUFFMAN PRIMITIVES ***********************************************/ + +/******* FSE PRIMITIVES *******************************************************/ +/// For more description of FSE see +/// https://github.com/Cyan4973/FiniteStateEntropy/ + +/// Allow a symbol to be decoded without updating state +static inline u8 FSE_peek_symbol(const FSE_dtable *const dtable, + const u16 state) { + return dtable->symbols[state]; +} + +/// Consumes bits from the input and uses the current state to determine the +/// next state +static inline void FSE_update_state(const FSE_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset) { + const u8 bits = dtable->num_bits[*state]; + const u16 rest = STREAM_read_bits(src, bits, offset); + *state = dtable->new_state_base[*state] + rest; +} + +/// Decodes a single FSE symbol and updates the offset +static inline u8 FSE_decode_symbol(const FSE_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset) { + const u8 symb = FSE_peek_symbol(dtable, *state); + FSE_update_state(dtable, state, src, offset); + return symb; +} + +static inline void FSE_init_state(const FSE_dtable *const dtable, + u16 *const state, const u8 *const src, + i64 *const offset) { + // Read in a full `accuracy_log` bits to initialize the state + const u8 bits = dtable->accuracy_log; + *state = STREAM_read_bits(src, bits, offset); +} + +static size_t FSE_decompress_interleaved2(const FSE_dtable *const dtable, + ostream_t *const out, + istream_t *const in) { + const size_t len = IO_istream_len(in); + if (len == 0) { + INP_SIZE(); + } + const u8 *const src = IO_get_read_ptr(in, len); + + // "Each bitstream must be read backward, that is starting from the end down + // to the beginning. Therefore it's necessary to know the size of each + // bitstream. + // + // It's also necessary to know exactly which bit is the latest. This is + // detected by a final bit flag : the highest bit of latest byte is a + // final-bit-flag. Consequently, a last byte of 0 is not possible. And the + // final-bit-flag itself is not part of the useful bitstream. Hence, the + // last byte contains between 0 and 7 useful bits." + const int padding = 8 - highest_set_bit(src[len - 1]); + i64 offset = len * 8 - padding; + + u16 state1, state2; + // "The first state (State1) encodes the even indexed symbols, and the + // second (State2) encodes the odd indexes. State1 is initialized first, and + // then State2, and they take turns decoding a single symbol and updating + // their state." + FSE_init_state(dtable, &state1, src, &offset); + FSE_init_state(dtable, &state2, src, &offset); + + // Decode until we overflow the stream + // Since we decode in reverse order, overflowing the stream is offset going + // negative + size_t symbols_written = 0; + while (1) { + // "The number of symbols to decode is determined by tracking bitStream + // overflow condition: If updating state after decoding a symbol would + // require more bits than remain in the stream, it is assumed the extra + // bits are 0. Then, the symbols for each of the final states are + // decoded and the process is complete." + IO_write_byte(out, FSE_decode_symbol(dtable, &state1, src, &offset)); + symbols_written++; + if (offset < 0) { + // There's still a symbol to decode in state2 + IO_write_byte(out, FSE_peek_symbol(dtable, state2)); + symbols_written++; + break; + } + + IO_write_byte(out, FSE_decode_symbol(dtable, &state2, src, &offset)); + symbols_written++; + if (offset < 0) { + // There's still a symbol to decode in state1 + IO_write_byte(out, FSE_peek_symbol(dtable, state1)); + symbols_written++; + break; + } + } + + return symbols_written; +} + +static void FSE_init_dtable(FSE_dtable *const dtable, + const i16 *const norm_freqs, const int num_symbs, + const int accuracy_log) { + if (accuracy_log > FSE_MAX_ACCURACY_LOG) { + ERROR("FSE accuracy too large"); + } + if (num_symbs > FSE_MAX_SYMBS) { + ERROR("Too many symbols for FSE"); + } + + dtable->accuracy_log = accuracy_log; + + const size_t size = (size_t)1 << accuracy_log; + dtable->symbols = malloc(size * sizeof(u8)); + dtable->num_bits = malloc(size * sizeof(u8)); + dtable->new_state_base = malloc(size * sizeof(u16)); + + if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) { + BAD_ALLOC(); + } + + // Used to determine how many bits need to be read for each state, + // and where the destination range should start + // Needs to be u16 because max value is 2 * max number of symbols, + // which can be larger than a byte can store + u16 state_desc[FSE_MAX_SYMBS]; + + // "Symbols are scanned in their natural order for "less than 1" + // probabilities. Symbols with this probability are being attributed a + // single cell, starting from the end of the table. These symbols define a + // full state reset, reading Accuracy_Log bits." + int high_threshold = size; + for (int s = 0; s < num_symbs; s++) { + // Scan for low probability symbols to put at the top + if (norm_freqs[s] == -1) { + dtable->symbols[--high_threshold] = s; + state_desc[s] = 1; + } + } + + // "All remaining symbols are sorted in their natural order. Starting from + // symbol 0 and table position 0, each symbol gets attributed as many cells + // as its probability. Cell allocation is spread, not linear." + // Place the rest in the table + const u16 step = (size >> 1) + (size >> 3) + 3; + const u16 mask = size - 1; + u16 pos = 0; + for (int s = 0; s < num_symbs; s++) { + if (norm_freqs[s] <= 0) { + continue; + } + + state_desc[s] = norm_freqs[s]; + + for (int i = 0; i < norm_freqs[s]; i++) { + // Give `norm_freqs[s]` states to symbol s + dtable->symbols[pos] = s; + // "A position is skipped if already occupied, typically by a "less + // than 1" probability symbol." + do { + pos = (pos + step) & mask; + } while (pos >= + high_threshold); + // Note: no other collision checking is necessary as `step` is + // coprime to `size`, so the cycle will visit each position exactly + // once + } + } + if (pos != 0) { + CORRUPTION(); + } + + // Now we can fill baseline and num bits + for (size_t i = 0; i < size; i++) { + u8 symbol = dtable->symbols[i]; + u16 next_state_desc = state_desc[symbol]++; + // Fills in the table appropriately, next_state_desc increases by symbol + // over time, decreasing number of bits + dtable->num_bits[i] = (u8)(accuracy_log - highest_set_bit(next_state_desc)); + // Baseline increases until the bit threshold is passed, at which point + // it resets to 0 + dtable->new_state_base[i] = + ((u16)next_state_desc << dtable->num_bits[i]) - size; + } +} + +/// Decode an FSE header as defined in the Zstandard format specification and +/// use the decoded frequencies to initialize a decoding table. +static void FSE_decode_header(FSE_dtable *const dtable, istream_t *const in, + const int max_accuracy_log) { + // "An FSE distribution table describes the probabilities of all symbols + // from 0 to the last present one (included) on a normalized scale of 1 << + // Accuracy_Log . + // + // It's a bitstream which is read forward, in little-endian fashion. It's + // not necessary to know its exact size, since it will be discovered and + // reported by the decoding process. + if (max_accuracy_log > FSE_MAX_ACCURACY_LOG) { + ERROR("FSE accuracy too large"); + } + + // The bitstream starts by reporting on which scale it operates. + // Accuracy_Log = low4bits + 5. Note that maximum Accuracy_Log for literal + // and match lengths is 9, and for offsets is 8. Higher values are + // considered errors." + const int accuracy_log = 5 + IO_read_bits(in, 4); + if (accuracy_log > max_accuracy_log) { + ERROR("FSE accuracy too large"); + } + + // "Then follows each symbol value, from 0 to last present one. The number + // of bits used by each field is variable. It depends on : + // + // Remaining probabilities + 1 : example : Presuming an Accuracy_Log of 8, + // and presuming 100 probabilities points have already been distributed, the + // decoder may read any value from 0 to 255 - 100 + 1 == 156 (inclusive). + // Therefore, it must read log2sup(156) == 8 bits. + // + // Value decoded : small values use 1 less bit : example : Presuming values + // from 0 to 156 (inclusive) are possible, 255-156 = 99 values are remaining + // in an 8-bits field. They are used this way : first 99 values (hence from + // 0 to 98) use only 7 bits, values from 99 to 156 use 8 bits. " + + i32 remaining = 1 << accuracy_log; + i16 frequencies[FSE_MAX_SYMBS]; + + int symb = 0; + while (remaining > 0 && symb < FSE_MAX_SYMBS) { + // Log of the number of possible values we could read + int bits = highest_set_bit(remaining + 1) + 1; + + u16 val = IO_read_bits(in, bits); + + // Try to mask out the lower bits to see if it qualifies for the "small + // value" threshold + const u16 lower_mask = ((u16)1 << (bits - 1)) - 1; + const u16 threshold = ((u16)1 << bits) - 1 - (remaining + 1); + + if ((val & lower_mask) < threshold) { + IO_rewind_bits(in, 1); + val = val & lower_mask; + } else if (val > lower_mask) { + val = val - threshold; + } + + // "Probability is obtained from Value decoded by following formula : + // Proba = value - 1" + const i16 proba = (i16)val - 1; + + // "It means value 0 becomes negative probability -1. -1 is a special + // probability, which means "less than 1". Its effect on distribution + // table is described in next paragraph. For the purpose of calculating + // cumulated distribution, it counts as one." + remaining -= proba < 0 ? -proba : proba; + + frequencies[symb] = proba; + symb++; + + // "When a symbol has a probability of zero, it is followed by a 2-bits + // repeat flag. This repeat flag tells how many probabilities of zeroes + // follow the current one. It provides a number ranging from 0 to 3. If + // it is a 3, another 2-bits repeat flag follows, and so on." + if (proba == 0) { + // Read the next two bits to see how many more 0s + int repeat = IO_read_bits(in, 2); + + while (1) { + for (int i = 0; i < repeat && symb < FSE_MAX_SYMBS; i++) { + frequencies[symb++] = 0; + } + if (repeat == 3) { + repeat = IO_read_bits(in, 2); + } else { + break; + } + } + } + } + IO_align_stream(in); + + // "When last symbol reaches cumulated total of 1 << Accuracy_Log, decoding + // is complete. If the last symbol makes cumulated total go above 1 << + // Accuracy_Log, distribution is considered corrupted." + if (remaining != 0 || symb >= FSE_MAX_SYMBS) { + CORRUPTION(); + } + + // Initialize the decoding table using the determined weights + FSE_init_dtable(dtable, frequencies, symb, accuracy_log); +} + +static void FSE_init_dtable_rle(FSE_dtable *const dtable, const u8 symb) { + dtable->symbols = malloc(sizeof(u8)); + dtable->num_bits = malloc(sizeof(u8)); + dtable->new_state_base = malloc(sizeof(u16)); + + if (!dtable->symbols || !dtable->num_bits || !dtable->new_state_base) { + BAD_ALLOC(); + } + + // This setup will always have a state of 0, always return symbol `symb`, + // and never consume any bits + dtable->symbols[0] = symb; + dtable->num_bits[0] = 0; + dtable->new_state_base[0] = 0; + dtable->accuracy_log = 0; +} + +static void FSE_free_dtable(FSE_dtable *const dtable) { + free(dtable->symbols); + free(dtable->num_bits); + free(dtable->new_state_base); + memset(dtable, 0, sizeof(FSE_dtable)); +} +/******* END FSE PRIMITIVES ***************************************************/ diff --git a/cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.h b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.h new file mode 100644 index 0000000000..c13c8134de --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/educational_decoder/zstd_decompress.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include /* size_t */ + +/******* EXPOSED TYPES ********************************************************/ +/* +* Contains the parsed contents of a dictionary +* This includes Huffman and FSE tables used for decoding and data on offsets +*/ +typedef struct dictionary_s dictionary_t; +/******* END EXPOSED TYPES ****************************************************/ + +/******* DECOMPRESSION FUNCTIONS **********************************************/ +/// Zstandard decompression functions. +/// `dst` must point to a space at least as large as the reconstructed output. +size_t ZSTD_decompress(void *const dst, const size_t dst_len, + const void *const src, const size_t src_len); + +/// If `dict != NULL` and `dict_len >= 8`, does the same thing as +/// `ZSTD_decompress` but uses the provided dict +size_t ZSTD_decompress_with_dict(void *const dst, const size_t dst_len, + const void *const src, const size_t src_len, + dictionary_t* parsed_dict); + +/// Get the decompressed size of an input stream so memory can be allocated in +/// advance +/// Returns -1 if the size can't be determined +/// Assumes decompression of a single frame +size_t ZSTD_get_decompressed_size(const void *const src, const size_t src_len); +/******* END DECOMPRESSION FUNCTIONS ******************************************/ + +/******* DICTIONARY MANAGEMENT ***********************************************/ +/* + * Return a valid dictionary_t pointer for use with dictionary initialization + * or decompression + */ +dictionary_t* create_dictionary(void); + +/* + * Parse a provided dictionary blob for use in decompression + * `src` -- must point to memory space representing the dictionary + * `src_len` -- must provide the dictionary size + * `dict` -- will contain the parsed contents of the dictionary and + * can be used for decompression + */ +void parse_dictionary(dictionary_t *const dict, const void *src, + size_t src_len); + +/* + * Free internal Huffman tables, FSE tables, and dictionary content + */ +void free_dictionary(dictionary_t *const dict); +/******* END DICTIONARY MANAGEMENT *******************************************/ diff --git a/cpp/third_party/zstd-1.5.7/doc/images/CSpeed2.png b/cpp/third_party/zstd-1.5.7/doc/images/CSpeed2.png new file mode 100644 index 0000000000000000000000000000000000000000..42affa46ea4789c4d722fc47e3aa71d23058faf2 GIT binary patch literal 73335 zcmeFZRX~)_`#uZ^NC={$NQ#6=E8U?;N_T^RbVx6~qM%aJ9ZEOS9R?{~(nxp1()?!u zKVLCKQ%4#A%GHmMfBNk`|3+u*1=Is!^MENW1eW>>w_IuhIt%9T6Ev z0O9X1R_{GT7W2)Aia+M$?jN56W81FZ zr>1^Li#wZTB1`yx?4trfP@<#;vGC5{djzZZM#m|%Rq>V~{^#gn27!*QWlMx*k$-Ke zRu>7Gp1AL>!sUNXU4jXwJ|Gl0xc1NUjR5QNwnOXv=dso;}y8nO67f$W}Ln#Zq{Ic-)cR9VGfhudeDvFDX>yK7Km`wY!(lWS1pZrp=7#bkj zbl%5RXQG`;6mWH|S{f)2v0ojf&(6*c3J<4}PkH)~|3HPJ1S`*Dr`M*Pmnt$caw9a? z<;nHyA6NN1xwyHfCjzQn1C> z*EbDAZDpiF8T$_3l6UHAT($S0gXbPe{pZzJcj&aw^^4RDI(NW0kr&;Fb!M)mj}!9q z<=obNv>W@f)jio9_qXP)C;iyPU%YtHu^24ZuJTF&_#Ky%jl#JL%e~)BN9b%Qb5+~s7TyZ#5a}-@zScsf0WMY!xGQ%7n zNN7=7cjXysD~ktJ;*rBM1mpVzXZF^Q1`JG6xmyM0- z*rDh*?!9T43`FNb`j_TgH=hdXLvdDzw z__lHPNM7gSIcb&@{^Rw4=Lxh_R3gWVHOCV9`T3Qt9S(A1oWv+kt#fKA!!^ieUZY8y&}@_1bI|@bcE8*?)v=gE3M3uCTjp>xf@4EMw` zh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r_rO(@nyY551%cKXzg|HAA0LIvSFd6Pw?c z5p-SQ7vv<_Epdo41qhZCdkV+k)BGaLS0#o%-_1i4oBD?~bU@<>-&g0z4&TTL9hXbC zW3VA`MUI(z<80IZi}OZF1}Rc<5J;v`R66P{C&jQvUr62mFd5nDoshC)$xEL<;w;Me zlf|DAK3w8PZl*zxPcgUR6vGa@KeALPA$8i?(6E@DPVwQ^N(X+ho>%dTaoV%@PvGkN zIMr*t3NU`0akR*pr*)rIQ3x$+gAORu?@+!WEz|e`cKC$}uy@FNjOf5aeEx94dfae# z8^*k!sKGCwp#t4gF!5%2c5rM*Q{_{N=ctJ8xR@~bmEK9W#!HJ zLtAial3TdIi62me-Pg0!C@<8wLs-2?mt9q3-ZRr3L5R{s{k>lndm)HL=5ecZ?yN)OtLg66iR!P6a1@ z5yq3(-3H2zoJB1(uiQ?bKeYGAFKI%HSiIju1GyJ|d{H7@WJ|2M2v8}Z kkNMaC_Sd5~#zZ%vFoveu=-i&l647a4m#-~a#s literal 0 HcmV?d00001 diff --git a/cpp/third_party/zstd-1.5.7/doc/images/DSpeed3.png b/cpp/third_party/zstd-1.5.7/doc/images/DSpeed3.png new file mode 100644 index 0000000000000000000000000000000000000000..4818b11180a74514e1f7af61e0a9dcd91e6b4b07 GIT binary patch literal 27123 zcmeIbXIPVK7d0q|3V1{X0i|0I0RfQ?QY`e|r6Wjh(tEQZAVsQlr1wY-5Sof0T}mi{ zfYJ#8qy-@Y-~AwX-g#%P@5j_@X8fV&knof|x$nK#UTf`bu!@rO8B!Y3W5jXWiVByNoz2Cb(O3`4l?3@GT14k0 zju9OEMRH@rIy1{=D1y&=fSB^n>w%(7?@e3D;yr5A<6~kT4wV>eHJJ%A|2`!+Z_{j7 zQZd6n|6ZnzIMRc8s#EjNiKXg(@*Ld*@ipeASK4ZQ`lo(hl!(+Ypt0ZRKV~1CWj5!wkfAR^KR)U9Ko}sl}94zMhSkV3P#c4Zqt!wNc zQow`DpmtzG*C1FAR_pxZ($R;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KFM>`{L#8LKr z$%$}!miBY&B-Jd9n~vAC9VH!?0P9cV+ea0Ok%;Off%I;{_E<5pGe`$g2>yw(enWcs z6e}~#0t@X$uDm(%@Yn6h8irTeojDVuv&l4R*t7{LQ%WbA1Kz%iy~QAwsu$Yrot_cm zPn^WKZGJFW@cy~HX!H#xfk}&co)pKB$eZY5AsBlThP+#r$|?a@e-tbK^XbG1gMo1M7v6p{`{Sa- z=_$5-Js86yG-95^6SB#|87fTZU6`qReB}@O`IzL9u@?{B_){t)Q!AG{eJSo?Lel1J zO_Qfwd@**pS#a+OU#*5cgooFob!nuwv1$`AAj~tEry8=2r=M56;DB#J2l(A6F+1-96D| z7P^kmTHTHJUEPf}WF_ItP7ke}*vvY)b3>UkJT$P$^oYV`=nY)He`5=I_l1g<9<_js zUDi;3s6_DW>&9f)meQ7xnORIK-L=W;()^x33OZy->QTJ0y zNk+8U@atlZjLd!0iiB~8<2)1;6bA(vDQ)yw?>>JzeP*n5nZPhsO1gR}e=K9ixI5Cl z#^1GkJyDK4?-UJljWMFGElOI+5H37K$Nz}=2z*FEu~b)CKLik>GLnC_2#oA>bRd@a ozklwznftopEhHc?lG^=H%etl4sXFW{;npY$4^?F4^aM$n*aa+ literal 0 HcmV?d00001 diff --git a/cpp/third_party/zstd-1.5.7/doc/images/dict-cr.png b/cpp/third_party/zstd-1.5.7/doc/images/dict-cr.png new file mode 100644 index 0000000000000000000000000000000000000000..6da34da46bde23942c10e100a3354681399c3e66 GIT binary patch literal 90412 zcmeFZ`CF6c7B*TpyU=b6)Y_IZTdA^J6+{d(iEan#Mu>=t%oda&Q3FJT1d>Q;>i`&$ zY8XPIqJ%j`LJ21Of>V$VlcB-S#_w!S}rfgY8FhtHo%Vu{pXWLro*D? z#pkI%N5Vh(#OAB_KN}##H>OMWeRAaB{u5anmZ;J74U2aP0M&!O6=}^lV>zYue0PP{ zajW}VuEX~2{r6PN540_l4?Zc{_h>^}Zrdl{uN?c*JM~lFtG~7V`sHtJQ25C4PZ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%cyMD# z98als!I>k{v}|Qag&$=Z@X_VSCvq*`bCrFBqidQF5w;Q!F#+_aFWAZb$_%?&hcg`8 zGB|Sl6^uG1+@v@NK{~l%N>m{=%^+IW>9}5vN=zC4p+&?Z8(%Wz(-EX6H&C4;T@Q(x zo%~yaBdpL|vm0Nb0-nipyrVY*KE{c@2REB5EKzm`)*^z!tc+UnWFPOMG2J=r6BA2jclT+M6j zxr42dL<}0Hu#Kbp^{c<~K^O)q4a}AfW4;zB{6S|7LCiwK9zgBZxCq~Rw$!a+f~sd57JYCRBpt)=+dRSl>k4TK*rWt zzv?k!{IBR^I&`T$r{Z54-=Al2S5Em_ChoNQT=+|lhqv}VTr1wa^tLeJMgMT%XYhBx OBjjlKmo;CU%=;hEEK0rr literal 0 HcmV?d00001 diff --git a/cpp/third_party/zstd-1.5.7/doc/images/dict-cs.png b/cpp/third_party/zstd-1.5.7/doc/images/dict-cs.png new file mode 100644 index 0000000000000000000000000000000000000000..a0d8d250565c82f1634b434b93c80d034650e080 GIT binary patch literal 91518 zcmd?R`(KiGA3wfs@8#~hnQLvC=Qg+8R%vFam_XfWwwaPyc}z-69F!<{- z{d_(zvrh*3Tm0ANzwf>Gp2fGveNVmj-ljY6z4x!y4>kjT`E#*)2KcoJcgp{N?>*qz z%>oDiNjx5od+$A~k2iicAsK%HA36Nqx4uVCr*4{Oj~3K@e_QnFGgM0Qz{;=H^u>|~ zaY1jocSYh3KiRvvd)JFMhWB^nzWt+Z|BjS5lmDGZw?iI1o!WJwPy{rem5dOmDO zU;lA9>?D==_dQxIR;;@5M06=>5w=P`Sun@qPw zZIib}t5=sdNBbOKocP3aJ>}z6D(%aZ@%2c8{zjy(wSPiqT&IdBC1%&zE&YB^js4>H zzl-gQzMI@^7EBH+on6?IFk6OqtDu;=zFE|+QkL~kGv4wz=iAm^xh}S88kyrS2A*B| zJ49N$ZD&j$N-wQ1tc<@4tmkGTAO?KiBBBxOcTur%h3g%vwy8g5?p+jErUFr<`hkKc zso%xb(g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--git a/cpp/third_party/zstd-1.5.7/doc/images/zstd_cdict_v1_3_5.png b/cpp/third_party/zstd-1.5.7/doc/images/zstd_cdict_v1_3_5.png new file mode 100644 index 0000000000000000000000000000000000000000..cce67c83abbf8a8ff62f16eda279fc3088efc8f3 GIT binary patch literal 93969 zcmbq)byOQ&*KcajLa|byI7N#UcbB38io1KU;u>fR#flUOBxs8Sg1cLBr?^A$26qXP zoA!CX=l$;e_nx(8W#-JxnX}Kf-`@Kq;;pJY4i*^}006*IRFKsG0PbI)k0bp1=pM|8 z_6h*t38TG?%v*a)O8`J20t~i&o1jn9b8sSx_$>KMI_#}X91FvTM0|r+V}<#Wzti8o zaSX4!&l(xd`{wJLdn86+T8B5!vA=w}PwWxQcE7*Dl}KGm|NSy)`URy#6AJ1-;&SJ{ zx#T`__5L1Bc(C=40e=gPhPL^>7}6Kd2OloKiporCKRWezusqpF04VPCZ&)6=DtSy0 zXMeL%SJ&ir#r(+w@NL(6YEVf{e*3;+o4AM!keqWto~I5>|#-2W|!@#?ll~8G-_zd`XklqfdA=n) z#rD8$xW5>J@jdLPAn$`)98d@WFu89{r05>4&{KIrz--+i^NMd(@}0~pQSW2w%#5DB#?y^)=r-=eS%JOB_Hk_zUb=tqF}BU6 zJ^2^;;o_yprQ*$fsZVXRdISMaTtg^Bu%ua6$jqY-Llx)?@P{HyI`vk)EFK*_Kf-WL zyZk82V4qNzgRg;M&w&s`a3fwKaG<~`n)&$PKE!(SI^(hSvF5QqR|+KKg&Lc*W2#=Y zUf9gn8CI-}EY+2_{BPY}Z6xv}iX`g0Hr0g+>WTsb3Vo_Cg^tvZgr1~?d=Cke&5|vb zt?X2ZuxCjskn;Q{_x1$dldlUWPYiN3U7;wO{N;)mkJX#G{ZbYfoHGWR62CW^3MC{QI$CtV~hvjqWL zOaoP=)PE?xeDhsnrJ%itR%TR(OSK$$l(ic5Or_6&SqBb8#E)Ua=o31CW;&eyP+DtW zYuk;d8^Rm+HXacrMP@2xD5drjYJXxer!n2`s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_party/zstd-1.5.7/doc/images/zstd_logo86.png new file mode 100644 index 0000000000000000000000000000000000000000..8abefe21b1e172b9683392057421984f64c8c9a4 GIT binary patch literal 13069 zcmeHucQ~Bi*7oS4Bw7&NDA9%)z4sb52qJ>PVAL^2??jF05+s7?q9#g02!as3mk^@& zE;`>xekJF7&wJkQT-W#hcU*gB_Fn5=_g;JLwf5tghe#bQ6=DJ!0ssI&tfs1{i~iI@ zzqIkO(C?X^*9OoZcqlbZCA>vEI#MQ<80M1<0DxA{Ti*z!3-w?^Af2t@4lpK^7Xrov z^MqRi0G<;i&+k7q5ph?#gb>`oXjGD*tF-sRWoS5*vl?J!yH{A$MIjK}{{e4uQ4lcS zb9r{?cG;St`vAo`YT(WJQl>DU0Z%*a^6b`@$M(v(f502RdMbavsoc{8<#{&0<+YF! zU%!jfgY7xYjPRznXM>>=C*GD9C(7Dpqs|{6a`-c7ung>-yJcOtF+a`_X&%LCvoUVi zHwbvyESd4SY%8F-(JbGr@LYUd=B$paKK*@ct0zy&l1JtCt-uv$l(47nF@4ESQ)4f9 z&g|q|>K^8XEH~wi8`uw|S`VXdXvsTm*@tF)neN&<@fVlrzFYq| z$@$~iyiF(r5dNMylwSGW_Ya?MQYvWdw0yCQew?#XWi9mMU6;h0qOU{0rAp^;6bGO5u!ktDNW1Bo zxmePSeY6nv>{xs6j6BFVDv{#Ri#h8gNb1c5h0h4*2E9+G4qZEY{3%MnH#d!6$7jlw zk~J!y4-FM$#e?!+xONEDOzv?Q=yv2L8Dslr8*2)U>e@S2jrJGkK79bM5*qcUm2$_T zbLFf5G2+7*^89+K zMr=`xj$Zdu&v9Id@SPg*j?aL-Sreb$bnC#8jTryq>I^7Z0v0S?LC0@ApH>0c;v2sr zv6}im6v8DUwbLWCSviu*nN^)QT9jXG31%7m3X2(2TUND+oeW{QzEiEdB_gfrFdE|( z?pp?s>7{kJK085cIPNpl;H(C(7J9t(I_Fb<`>Q(cJTcw+H7CDg*4N(qb4LjtG*tb~ zwzJ=S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8!H=AS zA8GpsDfMTd&gsY2f4NFvbAlu zwGH3ew%yvc-rRb)v1z=qd4FTmXk*i0V^e#5Lu-9QaeYI6eM4@2Lt$-QW^G+)bxmM( zjc0X@Yjurdb&YmqmEhMx(CfRKoUl#J3HUHyB8CZ-m4j?OL~z5#*3p%IbMPvR1iQeM1#m0MU;Qd(C2=H2_c z`i75fpF6vHdi(kZhDXLHzb`JWtZi;>@9Z5M9v`2ao}FKGzudG$Pl#cmuA*3=gD;!_ z0APuzDaz@4PE3wqy=7G=!I?4nTJ4B#`x9+dj!uihquiM&=%#76>*hshFLl)AZ4amIH?clmC=@q9( zE&+loB?_XWVTnCtkK959+3_D$r+bc)yiC)4@i1cc0>4z6Af7HCHA>oVa;J*n?o<|q z0t5OF$aCl93Z2qcyXh{9gaqewR?&U7q0giV6`*#Mbk&)AyAHmkCDK6xfi0U{=X z8KcExLFqW3RF4cMafa{zI8=$!1uMrdkWxDn4L&y`CVN$}9lnt-b^GISr~? z?}nkvdT>Y>J5Uy;Y`7`$>Bosj@*|{X6NsNa_+|0YL0fr!uTvJzI9N$4YzKRZ@>-L&(&G!5bp1L#}5`BR0I~q!a9D; z&XrAi+ioBOGRjJf-Jkh_iRM1ld`I|S- z?Ks&U4v*|6yNY>%wgp2IViaD#jwsB12^@5P7k|KMn1f+_*ip%34tiqLZuG1}P(PU2 zz6eB5RuDTpu$xC1y}>YT7T_;>&gpDu4VseE>a$@Le~>OO-W0!RNg%J{{S|N)3pEq literal 0 HcmV?d00001 diff --git a/cpp/third_party/zstd-1.5.7/doc/zstd_compression_format.md b/cpp/third_party/zstd-1.5.7/doc/zstd_compression_format.md new file mode 100644 index 0000000000..a2bf20cbc7 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/zstd_compression_format.md @@ -0,0 +1,1771 @@ +Zstandard Compression Format +============================ + +### Notices + +Copyright (c) Meta Platforms, Inc. and affiliates. + +Permission is granted to copy and distribute this document +for any purpose and without charge, +including translations into other languages +and incorporation into compilations, +provided that the copyright notice and this notice are preserved, +and that any substantive changes or deletions from the original +are clearly marked. +Distribution of this document is unlimited. + +### Version + +0.4.3 (2024-10-07) + + +Introduction +------------ + +The purpose of this document is to define a lossless compressed data format, +that is independent of CPU type, operating system, +file system and character set, suitable for +file compression, pipe and streaming compression, +using the [Zstandard algorithm](https://facebook.github.io/zstd/). +The text of the specification assumes a basic background in programming +at the level of bits and other primitive data representations. + +The data can be produced or consumed, +even for an arbitrarily long sequentially presented input data stream, +using only an a priori bounded amount of intermediate storage, +and hence can be used in data communications. +The format uses the Zstandard compression method, +and optional [xxHash-64 checksum method](https://cyan4973.github.io/xxHash/), +for detection of data corruption. + +The data format defined by this specification +does not attempt to allow random access to compressed data. + +Unless otherwise indicated below, +a compliant compressor must produce data sets +that conform to the specifications presented here. +It doesn’t need to support all options though. + +A compliant decompressor must be able to decompress +at least one working set of parameters +that conforms to the specifications presented here. +It may also ignore informative fields, such as checksum. +Whenever it does not support a parameter defined in the compressed stream, +it must produce a non-ambiguous error code and associated error message +explaining which parameter is unsupported. + +This specification is intended for use by implementers of software +to compress data into Zstandard format and/or decompress data from Zstandard format. +The Zstandard format is supported by an open source reference implementation, +written in portable C, and available at : https://github.com/facebook/zstd . + + +### Overall conventions +In this document: +- square brackets i.e. `[` and `]` are used to indicate optional fields or parameters. +- the naming convention for identifiers is `Mixed_Case_With_Underscores` + +### Definitions +Content compressed by Zstandard is transformed into a Zstandard __frame__. +Multiple frames can be appended into a single file or stream. +A frame is completely independent, has a defined beginning and end, +and a set of parameters which tells the decoder how to decompress it. + +A frame encapsulates one or multiple __blocks__. +Each block contains arbitrary content, which is described by its header, +and has a guaranteed maximum content size, which depends on frame parameters. +Unlike frames, each block depends on previous blocks for proper decoding. +However, each block can be decompressed without waiting for its successor, +allowing streaming operations. + +Overview +--------- +- [Frames](#frames) + - [Zstandard frames](#zstandard-frames) + - [Blocks](#blocks) + - [Literals Section](#literals-section) + - [Sequences Section](#sequences-section) + - [Sequence Execution](#sequence-execution) + - [Skippable frames](#skippable-frames) +- [Entropy Encoding](#entropy-encoding) + - [FSE](#fse) + - [Huffman Coding](#huffman-coding) +- [Dictionary Format](#dictionary-format) + +Frames +------ +Zstandard compressed data is made of one or more __frames__. +Each frame is independent and can be decompressed independently of other frames. +The decompressed content of multiple concatenated frames is the concatenation of +each frame decompressed content. + +There are two frame formats defined by Zstandard: + Zstandard frames and Skippable frames. +Zstandard frames contain compressed data, while +skippable frames contain custom user metadata. + +## Zstandard frames +The structure of a single Zstandard frame is following: + +| `Magic_Number` | `Frame_Header` |`Data_Block`| [More data blocks] | [`Content_Checksum`] | +|:--------------:|:--------------:|:----------:| ------------------ |:--------------------:| +| 4 bytes | 2-14 bytes | n bytes | | 0-4 bytes | + +__`Magic_Number`__ + +4 Bytes, __little-endian__ format. +Value : 0xFD2FB528 +Note: This value was selected to be less probable to find at the beginning of some random file. +It avoids trivial patterns (0x00, 0xFF, repeated bytes, increasing bytes, etc.), +contains byte values outside of ASCII range, +and doesn't map into UTF8 space. +It reduces the chances that a text file represent this value by accident. + +__`Frame_Header`__ + +2 to 14 Bytes, detailed in [`Frame_Header`](#frame_header). + +__`Data_Block`__ + +Detailed in [`Blocks`](#blocks). +That’s where compressed data is stored. + +__`Content_Checksum`__ + +An optional 32-bit checksum, only present if `Content_Checksum_flag` is set. +The content checksum is the result +of [xxh64() hash function](https://cyan4973.github.io/xxHash/) +digesting the original (decoded) data as input, and a seed of zero. +The low 4 bytes of the checksum are stored in __little-endian__ format. + +### `Frame_Header` + +The `Frame_Header` has a variable size, with a minimum of 2 bytes, +and up to 14 bytes depending on optional parameters. +The structure of `Frame_Header` is following: + +| `Frame_Header_Descriptor` | [`Window_Descriptor`] | [`Dictionary_ID`] | [`Frame_Content_Size`] | +| ------------------------- | --------------------- | ----------------- | ---------------------- | +| 1 byte | 0-1 byte | 0-4 bytes | 0-8 bytes | + +#### `Frame_Header_Descriptor` + +The first header's byte is called the `Frame_Header_Descriptor`. +It describes which other fields are present. +Decoding this byte is enough to tell the size of `Frame_Header`. + +| Bit number | Field name | +| ---------- | ---------- | +| 7-6 | `Frame_Content_Size_flag` | +| 5 | `Single_Segment_flag` | +| 4 | `Unused_bit` | +| 3 | `Reserved_bit` | +| 2 | `Content_Checksum_flag` | +| 1-0 | `Dictionary_ID_flag` | + +In this table, bit 7 is the highest bit, while bit 0 is the lowest one. + +__`Frame_Content_Size_flag`__ + +This is a 2-bits flag (`= Frame_Header_Descriptor >> 6`), +specifying if `Frame_Content_Size` (the decompressed data size) +is provided within the header. +`Flag_Value` provides `FCS_Field_Size`, +which is the number of bytes used by `Frame_Content_Size` +according to the following table: + +| `Flag_Value` | 0 | 1 | 2 | 3 | +| -------------- | ------ | --- | --- | --- | +|`FCS_Field_Size`| 0 or 1 | 2 | 4 | 8 | + +When `Flag_Value` is `0`, `FCS_Field_Size` depends on `Single_Segment_flag` : +if `Single_Segment_flag` is set, `FCS_Field_Size` is 1. +Otherwise, `FCS_Field_Size` is 0 : `Frame_Content_Size` is not provided. + +__`Single_Segment_flag`__ + +If this flag is set, +data must be regenerated within a single continuous memory segment. + +In this case, `Window_Descriptor` byte is skipped, +but `Frame_Content_Size` is necessarily present. +As a consequence, the decoder must allocate a memory segment +of size equal or larger than `Frame_Content_Size`. + +In order to preserve the decoder from unreasonable memory requirements, +a decoder is allowed to reject a compressed frame +which requests a memory size beyond decoder's authorized range. + +For broader compatibility, decoders are recommended to support +memory sizes of at least 8 MB. +This is only a recommendation, +each decoder is free to support higher or lower limits, +depending on local limitations. + +__`Unused_bit`__ + +A decoder compliant with this specification version shall not interpret this bit. +It might be used in any future version, +to signal a property which is transparent to properly decode the frame. +An encoder compliant with this specification version must set this bit to zero. + +__`Reserved_bit`__ + +This bit is reserved for some future feature. +Its value _must be zero_. +A decoder compliant with this specification version must ensure it is not set. +This bit may be used in a future revision, +to signal a feature that must be interpreted to decode the frame correctly. + +__`Content_Checksum_flag`__ + +If this flag is set, a 32-bits `Content_Checksum` will be present at frame's end. +See `Content_Checksum` paragraph. + +__`Dictionary_ID_flag`__ + +This is a 2-bits flag (`= FHD & 3`), +telling if a dictionary ID is provided within the header. +It also specifies the size of this field as `DID_Field_Size`. + +|`Flag_Value` | 0 | 1 | 2 | 3 | +| -------------- | --- | --- | --- | --- | +|`DID_Field_Size`| 0 | 1 | 2 | 4 | + +#### `Window_Descriptor` + +Provides guarantees on minimum memory buffer required to decompress a frame. +This information is important for decoders to allocate enough memory. + +The `Window_Descriptor` byte is optional. +When `Single_Segment_flag` is set, `Window_Descriptor` is not present. +In this case, `Window_Size` is `Frame_Content_Size`, +which can be any value from 0 to 2^64-1 bytes (16 ExaBytes). + +| Bit numbers | 7-3 | 2-0 | +| ----------- | ---------- | ---------- | +| Field name | `Exponent` | `Mantissa` | + +The minimum memory buffer size is called `Window_Size`. +It is described by the following formulas : +``` +windowLog = 10 + Exponent; +windowBase = 1 << windowLog; +windowAdd = (windowBase / 8) * Mantissa; +Window_Size = windowBase + windowAdd; +``` +The minimum `Window_Size` is 1 KB. +The maximum `Window_Size` is `(1<<41) + 7*(1<<38)` bytes, which is 3.75 TB. + +In general, larger `Window_Size` tend to improve compression ratio, +but at the cost of memory usage. + +To properly decode compressed data, +a decoder will need to allocate a buffer of at least `Window_Size` bytes. + +In order to preserve decoder from unreasonable memory requirements, +a decoder is allowed to reject a compressed frame +which requests a memory size beyond decoder's authorized range. + +For improved interoperability, +it's recommended for decoders to support `Window_Size` of up to 8 MB, +and it's recommended for encoders to not generate frame requiring `Window_Size` larger than 8 MB. +It's merely a recommendation though, +decoders are free to support larger or lower limits, +depending on local limitations. + +#### `Dictionary_ID` + +This is a variable size field, which contains +the ID of the dictionary required to properly decode the frame. +`Dictionary_ID` field is optional. When it's not present, +it's up to the decoder to know which dictionary to use. + +`Dictionary_ID` field size is provided by `DID_Field_Size`. +`DID_Field_Size` is directly derived from value of `Dictionary_ID_flag`. +1 byte can represent an ID 0-255. +2 bytes can represent an ID 0-65535. +4 bytes can represent an ID 0-4294967295. +Format is __little-endian__. + +It's allowed to represent a small ID (for example `13`) +with a large 4-bytes dictionary ID, even if it is less efficient. + +A value of `0` has same meaning as no `Dictionary_ID`, +in which case the frame may or may not need a dictionary to be decoded, +and the ID of such a dictionary is not specified. +The decoder must know this information by other means. + +#### `Frame_Content_Size` + +This is the original (uncompressed) size. This information is optional. +`Frame_Content_Size` uses a variable number of bytes, provided by `FCS_Field_Size`. +`FCS_Field_Size` is provided by the value of `Frame_Content_Size_flag`. +`FCS_Field_Size` can be equal to 0 (not present), 1, 2, 4 or 8 bytes. + +| `FCS_Field_Size` | Range | +| ---------------- | ---------- | +| 0 | unknown | +| 1 | 0 - 255 | +| 2 | 256 - 65791| +| 4 | 0 - 2^32-1 | +| 8 | 0 - 2^64-1 | + +`Frame_Content_Size` format is __little-endian__. +When `FCS_Field_Size` is 1, 4 or 8 bytes, the value is read directly. +When `FCS_Field_Size` is 2, _the offset of 256 is added_. +It's allowed to represent a small size (for example `18`) using any compatible variant. + + +Blocks +------- + +After `Magic_Number` and `Frame_Header`, there are some number of blocks. +Each frame must have at least one block, +but there is no upper limit on the number of blocks per frame. + +The structure of a block is as follows: + +| `Block_Header` | `Block_Content` | +|:--------------:|:---------------:| +| 3 bytes | n bytes | + +__`Block_Header`__ + +`Block_Header` uses 3 bytes, written using __little-endian__ convention. +It contains 3 fields : + +| `Last_Block` | `Block_Type` | `Block_Size` | +|:------------:|:------------:|:------------:| +| bit 0 | bits 1-2 | bits 3-23 | + +__`Last_Block`__ + +The lowest bit signals if this block is the last one. +The frame will end after this last block. +It may be followed by an optional `Content_Checksum` +(see [Zstandard Frames](#zstandard-frames)). + +__`Block_Type`__ + +The next 2 bits represent the `Block_Type`. +`Block_Type` influences the meaning of `Block_Size`. +There are 4 block types : + +| Value | 0 | 1 | 2 | 3 | +| ------------ | ----------- | ----------- | ------------------ | --------- | +| `Block_Type` | `Raw_Block` | `RLE_Block` | `Compressed_Block` | `Reserved`| + +- `Raw_Block` - this is an uncompressed block. + `Block_Content` contains `Block_Size` bytes. + +- `RLE_Block` - this is a single byte, repeated `Block_Size` times. + `Block_Content` consists of a single byte. + On the decompression side, this byte must be repeated `Block_Size` times. + +- `Compressed_Block` - this is a [Zstandard compressed block](#compressed-blocks), + explained later on. + `Block_Size` is the length of `Block_Content`, the compressed data. + The decompressed size is not known, + but its maximum possible value is guaranteed (see below) + +- `Reserved` - this is not a block. + This value cannot be used with current version of this specification. + If such a value is present, it is considered corrupted data. + +__`Block_Size`__ + +The upper 21 bits of `Block_Header` represent the `Block_Size`. + +When `Block_Type` is `Compressed_Block` or `Raw_Block`, +`Block_Size` is the size of `Block_Content` (hence excluding `Block_Header`). + +When `Block_Type` is `RLE_Block`, since `Block_Content`’s size is always 1, +`Block_Size` represents the number of times this byte must be repeated. + +`Block_Size` is limited by `Block_Maximum_Size` (see below). + +__`Block_Content`__ and __`Block_Maximum_Size`__ + +The size of `Block_Content` is limited by `Block_Maximum_Size`, +which is the smallest of: +- `Window_Size` +- 128 KB + +`Block_Maximum_Size` is constant for a given frame. +This maximum is applicable to both the decompressed size +and the compressed size of any block in the frame. + +The reasoning for this limit is that a decoder can read this information +at the beginning of a frame and use it to allocate buffers. +The guarantees on the size of blocks ensure that +the buffers will be large enough for any following block of the valid frame. + + +Compressed Blocks +----------------- +To decompress a compressed block, the compressed size must be provided +from `Block_Size` field within `Block_Header`. + +A compressed block consists of 2 sections : +- [Literals Section](#literals-section) +- [Sequences Section](#sequences-section) + +The results of the two sections are then combined to produce the decompressed +data in [Sequence Execution](#sequence-execution) + +#### Prerequisites +To decode a compressed block, the following elements are necessary : +- Previous decoded data, up to a distance of `Window_Size`, + or beginning of the Frame, whichever is smaller. +- List of "recent offsets" from previous `Compressed_Block`. +- The previous Huffman tree, required by `Treeless_Literals_Block` type +- Previous FSE decoding tables, required by `Repeat_Mode` + for each symbol type (literals lengths, match lengths, offsets) + +Note that decoding tables aren't always from the previous `Compressed_Block`. + +- Every decoding table can come from a dictionary. +- The Huffman tree comes from the previous `Compressed_Literals_Block`. + +Literals Section +---------------- +All literals are regrouped in the first part of the block. +They can be decoded first, and then copied during [Sequence Execution], +or they can be decoded on the flow during [Sequence Execution]. + +Literals can be stored uncompressed or compressed using Huffman prefix codes. +When compressed, a tree description may optionally be present, +followed by 1 or 4 streams. + +| `Literals_Section_Header` | [`Huffman_Tree_Description`] | [jumpTable] | Stream1 | [Stream2] | [Stream3] | [Stream4] | +| ------------------------- | ---------------------------- | ----------- | ------- | --------- | --------- | --------- | + + +### `Literals_Section_Header` + +Header is in charge of describing how literals are packed. +It's a byte-aligned variable-size bitfield, ranging from 1 to 5 bytes, +using __little-endian__ convention. + +| `Literals_Block_Type` | `Size_Format` | `Regenerated_Size` | [`Compressed_Size`] | +| --------------------- | ------------- | ------------------ | ------------------- | +| 2 bits | 1 - 2 bits | 5 - 20 bits | 0 - 18 bits | + +In this representation, bits on the left are the lowest bits. + +__`Literals_Block_Type`__ + +This field uses 2 lowest bits of first byte, describing 4 different block types : + +| `Literals_Block_Type` | Value | +| --------------------------- | ----- | +| `Raw_Literals_Block` | 0 | +| `RLE_Literals_Block` | 1 | +| `Compressed_Literals_Block` | 2 | +| `Treeless_Literals_Block` | 3 | + +- `Raw_Literals_Block` - Literals are stored uncompressed. +- `RLE_Literals_Block` - Literals consist of a single byte value + repeated `Regenerated_Size` times. +- `Compressed_Literals_Block` - This is a standard Huffman-compressed block, + starting with a Huffman tree description. + In this mode, there are at least 2 different literals represented in the Huffman tree description. + See details below. +- `Treeless_Literals_Block` - This is a Huffman-compressed block, + using Huffman tree _from previous Huffman-compressed literals block_. + `Huffman_Tree_Description` will be skipped. + Note: If this mode is triggered without any previous Huffman-table in the frame + (or [dictionary](#dictionary-format)), this should be treated as data corruption. + +__`Size_Format`__ + +`Size_Format` is divided into 2 families : + +- For `Raw_Literals_Block` and `RLE_Literals_Block`, + it's only necessary to decode `Regenerated_Size`. + There is no `Compressed_Size` field. +- For `Compressed_Block` and `Treeless_Literals_Block`, + it's required to decode both `Compressed_Size` + and `Regenerated_Size` (the decompressed size). + It's also necessary to decode the number of streams (1 or 4). + +For values spanning several bytes, convention is __little-endian__. + +__`Size_Format` for `Raw_Literals_Block` and `RLE_Literals_Block`__ : + +`Size_Format` uses 1 _or_ 2 bits. +Its value is : `Size_Format = (Literals_Section_Header[0]>>2) & 3` + +- `Size_Format` == 00 or 10 : `Size_Format` uses 1 bit. + `Regenerated_Size` uses 5 bits (0-31). + `Literals_Section_Header` uses 1 byte. + `Regenerated_Size = Literals_Section_Header[0]>>3` +- `Size_Format` == 01 : `Size_Format` uses 2 bits. + `Regenerated_Size` uses 12 bits (0-4095). + `Literals_Section_Header` uses 2 bytes. + `Regenerated_Size = (Literals_Section_Header[0]>>4) + (Literals_Section_Header[1]<<4)` +- `Size_Format` == 11 : `Size_Format` uses 2 bits. + `Regenerated_Size` uses 20 bits (0-1048575). + `Literals_Section_Header` uses 3 bytes. + `Regenerated_Size = (Literals_Section_Header[0]>>4) + (Literals_Section_Header[1]<<4) + (Literals_Section_Header[2]<<12)` + +Only Stream1 is present for these cases. +Note : it's allowed to represent a short value (for example `27`) +using a long format, even if it's less efficient. + +__`Size_Format` for `Compressed_Literals_Block` and `Treeless_Literals_Block`__ : + +`Size_Format` always uses 2 bits. + +- `Size_Format` == 00 : _A single stream_. + Both `Regenerated_Size` and `Compressed_Size` use 10 bits (0-1023). + `Literals_Section_Header` uses 3 bytes. +- `Size_Format` == 01 : 4 streams. + Both `Regenerated_Size` and `Compressed_Size` use 10 bits (6-1023). + `Literals_Section_Header` uses 3 bytes. +- `Size_Format` == 10 : 4 streams. + Both `Regenerated_Size` and `Compressed_Size` use 14 bits (6-16383). + `Literals_Section_Header` uses 4 bytes. +- `Size_Format` == 11 : 4 streams. + Both `Regenerated_Size` and `Compressed_Size` use 18 bits (6-262143). + `Literals_Section_Header` uses 5 bytes. + +Both `Compressed_Size` and `Regenerated_Size` fields follow __little-endian__ convention. +Note: `Compressed_Size` __includes__ the size of the Huffman Tree description +_when_ it is present. +Note 2: `Compressed_Size` can never be `==0`. +Even in single-stream scenario, assuming an empty content, it must be `>=1`, +since it contains at least the final end bit flag. +In 4-streams scenario, a valid `Compressed_Size` is necessarily `>= 10` +(6 bytes for the jump table, + 4x1 bytes for the 4 streams). + +4 streams is faster than 1 stream in decompression speed, +by exploiting instruction level parallelism. +But it's also more expensive, +costing on average ~7.3 bytes more than the 1 stream mode, mostly from the jump table. + +In general, use the 4 streams mode when there are more literals to decode, +to favor higher decompression speeds. +Note that beyond >1KB of literals, the 4 streams mode is compulsory. + +Note that a minimum of 6 bytes is required for the 4 streams mode. +That's a technical minimum, but it's not recommended to employ the 4 streams mode +for such a small quantity, that would be wasteful. +A more practical lower bound would be around ~256 bytes. + +#### Raw Literals Block +The data in Stream1 is `Regenerated_Size` bytes long, +it contains the raw literals data to be used during [Sequence Execution]. + +#### RLE Literals Block +Stream1 consists of a single byte which should be repeated `Regenerated_Size` times +to generate the decoded literals. + +#### Compressed Literals Block and Treeless Literals Block +Both of these modes contain Huffman encoded data. + +For `Treeless_Literals_Block`, +the Huffman table comes from previously compressed literals block, +or from a dictionary. + + +### `Huffman_Tree_Description` +This section is only present when `Literals_Block_Type` type is `Compressed_Literals_Block` (`2`). +The tree describes the weights of all literals symbols that can be present in the literals block, at least 2 and up to 256. +The format of the Huffman tree description can be found at [Huffman Tree description](#huffman-tree-description). +The size of `Huffman_Tree_Description` is determined during decoding process, +it must be used to determine where streams begin. +`Total_Streams_Size = Compressed_Size - Huffman_Tree_Description_Size`. + + +### Jump Table +The Jump Table is only present when there are 4 Huffman-coded streams. + +Reminder : Huffman compressed data consists of either 1 or 4 streams. + +If only one stream is present, it is a single bitstream occupying the entire +remaining portion of the literals block, encoded as described in +[Huffman-Coded Streams](#huffman-coded-streams). + +If there are four streams, `Literals_Section_Header` only provided +enough information to know the decompressed and compressed sizes +of all four streams _combined_. +The decompressed size of _each_ stream is equal to `(Regenerated_Size+3)/4`, +except for the last stream which may be up to 3 bytes smaller, +to reach a total decompressed size as specified in `Regenerated_Size`. + +The compressed size of each stream is provided explicitly in the Jump Table. +Jump Table is 6 bytes long, and consists of three 2-byte __little-endian__ fields, +describing the compressed sizes of the first three streams. +`Stream4_Size` is computed from `Total_Streams_Size` minus sizes of other streams: + +`Stream4_Size = Total_Streams_Size - 6 - Stream1_Size - Stream2_Size - Stream3_Size`. + +`Stream4_Size` is necessarily `>= 1`. Therefore, +if `Total_Streams_Size < Stream1_Size + Stream2_Size + Stream3_Size + 6 + 1`, +data is considered corrupted. + +Each of these 4 bitstreams is then decoded independently as a Huffman-Coded stream, +as described in [Huffman-Coded Streams](#huffman-coded-streams) + + +Sequences Section +----------------- +A compressed block is a succession of _sequences_ . +A sequence is a literal copy command, followed by a match copy command. +A literal copy command specifies a length. +It is the number of bytes to be copied (or extracted) from the Literals Section. +A match copy command specifies an offset and a length. + +When all _sequences_ are decoded, +if there are literals left in the _literals section_, +these bytes are added at the end of the block. + +This is described in more detail in [Sequence Execution](#sequence-execution). + +The `Sequences_Section` regroup all symbols required to decode commands. +There are 3 symbol types : literals lengths, offsets and match lengths. +They are encoded together, interleaved, in a single _bitstream_. + +The `Sequences_Section` starts by a header, +followed by optional probability tables for each symbol type, +followed by the bitstream. + +| `Sequences_Section_Header` | [`Literals_Length_Table`] | [`Offset_Table`] | [`Match_Length_Table`] | bitStream | +| -------------------------- | ------------------------- | ---------------- | ---------------------- | --------- | + +To decode the `Sequences_Section`, it's required to know its size. +Its size is deduced from the size of `Literals_Section`: +`Sequences_Section_Size = Block_Size - Literals_Section_Size`. + + +#### `Sequences_Section_Header` + +Consists of 2 items: +- `Number_of_Sequences` +- Symbol compression modes + +__`Number_of_Sequences`__ + +This is a variable size field using between 1 and 3 bytes. +Let's call its first byte `byte0`. +- `if (byte0 < 128)` : `Number_of_Sequences = byte0` . Uses 1 byte. +- `if (byte0 < 255)` : `Number_of_Sequences = ((byte0 - 0x80) << 8) + byte1`. Uses 2 bytes. + Note that the 2 bytes format fully overlaps the 1 byte format. +- `if (byte0 == 255)`: `Number_of_Sequences = byte1 + (byte2<<8) + 0x7F00`. Uses 3 bytes. + +`if (Number_of_Sequences == 0)` : there are no sequences. + The sequence section stops immediately, + FSE tables used in `Repeat_Mode` aren't updated. + Block's decompressed content is defined solely by the Literals Section content. + +__Symbol compression modes__ + +This is a single byte, defining the compression mode of each symbol type. + +|Bit number| 7-6 | 5-4 | 3-2 | 1-0 | +| -------- | ----------------------- | -------------- | -------------------- | ---------- | +|Field name| `Literals_Lengths_Mode` | `Offsets_Mode` | `Match_Lengths_Mode` | `Reserved` | + +The last field, `Reserved`, must be all-zeroes. + +`Literals_Lengths_Mode`, `Offsets_Mode` and `Match_Lengths_Mode` define the `Compression_Mode` of +literals lengths, offsets, and match lengths symbols respectively. + +They follow the same enumeration : + +| Value | 0 | 1 | 2 | 3 | +| ------------------ | ----------------- | ---------- | --------------------- | ------------- | +| `Compression_Mode` | `Predefined_Mode` | `RLE_Mode` | `FSE_Compressed_Mode` | `Repeat_Mode` | + +- `Predefined_Mode` : A predefined FSE distribution table is used, defined in + [default distributions](#default-distributions). + No distribution table will be present. +- `RLE_Mode` : The table description consists of a single byte, which contains the symbol's value. + This symbol will be used for all sequences. +- `FSE_Compressed_Mode` : standard FSE compression. + A distribution table will be present. + The format of this distribution table is described in [FSE Table Description](#fse-table-description). + Note that the maximum allowed accuracy log for literals length and match length tables is 9, + and the maximum accuracy log for the offsets table is 8. + `FSE_Compressed_Mode` must not be used when only one symbol is present, + `RLE_Mode` should be used instead (although any other mode will work). +- `Repeat_Mode` : The table used in the previous `Compressed_Block` with `Number_of_Sequences > 0` will be used again, + or if this is the first block, table in the dictionary will be used. + Note that this includes `RLE_mode`, so if `Repeat_Mode` follows `RLE_Mode`, the same symbol will be repeated. + It also includes `Predefined_Mode`, in which case `Repeat_Mode` will have same outcome as `Predefined_Mode`. + No distribution table will be present. + If this mode is used without any previous sequence table in the frame + (nor [dictionary](#dictionary-format)) to repeat, this should be treated as corruption. + +#### The codes for literals lengths, match lengths, and offsets. + +Each symbol is a _code_ in its own context, +which specifies `Baseline` and `Number_of_Bits` to add. +_Codes_ are FSE compressed, +and interleaved with raw additional bits in the same bitstream. + +##### Literals length codes + +Literals length codes are values ranging from `0` to `35` included. +They define lengths from 0 to 131071 bytes. +The literals length is equal to the decoded `Baseline` plus +the result of reading `Number_of_Bits` bits from the bitstream, +as a __little-endian__ value. + +| `Literals_Length_Code` | 0-15 | +| ---------------------- | ---------------------- | +| length | `Literals_Length_Code` | +| `Number_of_Bits` | 0 | + +| `Literals_Length_Code` | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | +| ---------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| `Baseline` | 16 | 18 | 20 | 22 | 24 | 28 | 32 | 40 | +| `Number_of_Bits` | 1 | 1 | 1 | 1 | 2 | 2 | 3 | 3 | + +| `Literals_Length_Code` | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | +| ---------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| `Baseline` | 48 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | +| `Number_of_Bits` | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | + +| `Literals_Length_Code` | 32 | 33 | 34 | 35 | +| ---------------------- | ---- | ---- | ---- | ---- | +| `Baseline` | 8192 |16384 |32768 |65536 | +| `Number_of_Bits` | 13 | 14 | 15 | 16 | + + +##### Match length codes + +Match length codes are values ranging from `0` to `52` included. +They define lengths from 3 to 131074 bytes. +The match length is equal to the decoded `Baseline` plus +the result of reading `Number_of_Bits` bits from the bitstream, +as a __little-endian__ value. + +| `Match_Length_Code` | 0-31 | +| ------------------- | ----------------------- | +| value | `Match_Length_Code` + 3 | +| `Number_of_Bits` | 0 | + +| `Match_Length_Code` | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | +| ------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| `Baseline` | 35 | 37 | 39 | 41 | 43 | 47 | 51 | 59 | +| `Number_of_Bits` | 1 | 1 | 1 | 1 | 2 | 2 | 3 | 3 | + +| `Match_Length_Code` | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | +| ------------------- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| `Baseline` | 67 | 83 | 99 | 131 | 259 | 515 | 1027 | 2051 | +| `Number_of_Bits` | 4 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | + +| `Match_Length_Code` | 48 | 49 | 50 | 51 | 52 | +| ------------------- | ---- | ---- | ---- | ---- | ---- | +| `Baseline` | 4099 | 8195 |16387 |32771 |65539 | +| `Number_of_Bits` | 12 | 13 | 14 | 15 | 16 | + +##### Offset codes + +Offset codes are values ranging from `0` to `N`. + +A decoder is free to limit its maximum `N` supported. +Recommendation is to support at least up to `22`. +For information, at the time of this writing. +the reference decoder supports a maximum `N` value of `31`. + +An offset code is also the number of additional bits to read in __little-endian__ fashion, +and can be translated into an `Offset_Value` using the following formulas : + +``` +Offset_Value = (1 << offsetCode) + readNBits(offsetCode); +if (Offset_Value > 3) offset = Offset_Value - 3; +``` +It means that maximum `Offset_Value` is `(2^(N+1))-1` +supporting back-reference distances up to `(2^(N+1))-4`, +but is limited by [maximum back-reference distance](#window_descriptor). + +`Offset_Value` from 1 to 3 are special : they define "repeat codes". +This is described in more detail in [Repeat Offsets](#repeat-offsets). + +#### Decoding Sequences +FSE bitstreams are read in reverse direction than written. In zstd, +the compressor writes bits forward into a block and the decompressor +must read the bitstream _backwards_. + +To find the start of the bitstream it is therefore necessary to +know the offset of the last byte of the block which can be found +by counting `Block_Size` bytes after the block header. + +After writing the last bit containing information, the compressor +writes a single `1`-bit and then fills the byte with 0-7 `0` bits of +padding. The last byte of the compressed bitstream cannot be `0` for +that reason. + +When decompressing, the last byte containing the padding is the first +byte to read. The decompressor needs to skip 0-7 initial `0`-bits and +the first `1`-bit it occurs. Afterwards, the useful part of the bitstream +begins. + +FSE decoding requires a 'state' to be carried from symbol to symbol. +For more explanation on FSE decoding, see the [FSE section](#fse). + +For sequence decoding, a separate state keeps track of each +literal lengths, offsets, and match lengths symbols. +Some FSE primitives are also used. +For more details on the operation of these primitives, see the [FSE section](#fse). + +##### Starting states +The bitstream starts with initial FSE state values, +each using the required number of bits in their respective _accuracy_, +decoded previously from their normalized distribution. + +It starts by `Literals_Length_State`, +followed by `Offset_State`, +and finally `Match_Length_State`. + +Reminder : always keep in mind that all values are read _backward_, +so the 'start' of the bitstream is at the highest position in memory, +immediately before the last `1`-bit for padding. + +After decoding the starting states, a single sequence is decoded +`Number_Of_Sequences` times. +These sequences are decoded in order from first to last. +Since the compressor writes the bitstream in the forward direction, +this means the compressor must encode the sequences starting with the last +one and ending with the first. + +##### Decoding a sequence +For each of the symbol types, the FSE state can be used to determine the appropriate code. +The code then defines the `Baseline` and `Number_of_Bits` to read for each type. +See the [description of the codes] for how to determine these values. + +[description of the codes]: #the-codes-for-literals-lengths-match-lengths-and-offsets + +Decoding starts by reading the `Number_of_Bits` required to decode `Offset`. +It then does the same for `Match_Length`, and then for `Literals_Length`. +This sequence is then used for [sequence execution](#sequence-execution). + +If it is not the last sequence in the block, +the next operation is to update states. +Using the rules pre-calculated in the decoding tables, +`Literals_Length_State` is updated, +followed by `Match_Length_State`, +and then `Offset_State`. +See the [FSE section](#fse) for details on how to update states from the bitstream. + +This operation will be repeated `Number_of_Sequences` times. +At the end, the bitstream shall be entirely consumed, +otherwise the bitstream is considered corrupted. + +#### Default Distributions +If `Predefined_Mode` is selected for a symbol type, +its FSE decoding table is generated from a predefined distribution table defined here. +For details on how to convert this distribution into a decoding table, see the [FSE section]. + +[FSE section]: #from-normalized-distribution-to-decoding-tables + +##### Literals Length +The decoding table uses an accuracy log of 6 bits (64 states). +``` +short literalsLength_defaultDistribution[36] = + { 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, + -1,-1,-1,-1 }; +``` + +##### Match Length +The decoding table uses an accuracy log of 6 bits (64 states). +``` +short matchLengths_defaultDistribution[53] = + { 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,-1,-1, + -1,-1,-1,-1,-1 }; +``` + +##### Offset Codes +The decoding table uses an accuracy log of 5 bits (32 states), +and supports a maximum `N` value of 28, allowing offset values up to 536,870,908 . + +If any sequence in the compressed block requires a larger offset than this, +it's not possible to use the default distribution to represent it. +``` +short offsetCodes_defaultDistribution[29] = + { 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1,-1,-1,-1,-1,-1 }; +``` + + +Sequence Execution +------------------ +Once literals and sequences have been decoded, +they are combined to produce the decoded content of a block. + +Each sequence consists of a tuple of (`literals_length`, `offset_value`, `match_length`), +decoded as described in the [Sequences Section](#sequences-section). +To execute a sequence, first copy `literals_length` bytes +from the decoded literals to the output. + +Then `match_length` bytes are copied from previous decoded data. +The offset to copy from is determined by `offset_value`: +if `offset_value > 3`, then the offset is `offset_value - 3`. +If `offset_value` is from 1-3, the offset is a special repeat offset value. +See the [repeat offset](#repeat-offsets) section for how the offset is determined +in this case. + +The offset is defined as from the current position, so an offset of 6 +and a match length of 3 means that 3 bytes should be copied from 6 bytes back. +Note that all offsets leading to previously decoded data +must be smaller than `Window_Size` defined in `Frame_Header_Descriptor`. + +#### Repeat offsets +As seen in [Sequence Execution](#sequence-execution), +the first 3 values define a repeated offset and we will call them +`Repeated_Offset1`, `Repeated_Offset2`, and `Repeated_Offset3`. +They are sorted in recency order, with `Repeated_Offset1` meaning "most recent one". + +If `offset_value == 1`, then the offset used is `Repeated_Offset1`, etc. + +There is an exception though, when current sequence's `literals_length = 0`. +In this case, repeated offsets are shifted by one, +so an `offset_value` of 1 means `Repeated_Offset2`, +an `offset_value` of 2 means `Repeated_Offset3`, +and an `offset_value` of 3 means `Repeated_Offset1 - 1`. + +In the final case, if `Repeated_Offset1 - 1` evaluates to 0, then the +data is considered corrupted. + +For the first block, the starting offset history is populated with following values : +`Repeated_Offset1`=1, `Repeated_Offset2`=4, `Repeated_Offset3`=8, +unless a dictionary is used, in which case they come from the dictionary. + +Then each block gets its starting offset history from the ending values of the most recent `Compressed_Block`. +Note that blocks which are not `Compressed_Block` are skipped, they do not contribute to offset history. + +[Offset Codes]: #offset-codes + +###### Offset updates rules + +During the execution of the sequences of a `Compressed_Block`, the +`Repeated_Offsets`' values are kept up to date, so that they always represent +the three most-recently used offsets. In order to achieve that, they are +updated after executing each sequence in the following way: + +When the sequence's `offset_value` does not refer to one of the +`Repeated_Offsets`--when it has value greater than 3, or when it has value 3 +and the sequence's `literals_length` is zero--the `Repeated_Offsets`' values +are shifted back one, and `Repeated_Offset1` takes on the value of the +just-used offset. + +Otherwise, when the sequence's `offset_value` refers to one of the +`Repeated_Offsets`--when it has value 1 or 2, or when it has value 3 and the +sequence's `literals_length` is non-zero--the `Repeated_Offsets` are re-ordered +so that `Repeated_Offset1` takes on the value of the used Repeated_Offset, and +the existing values are pushed back from the first `Repeated_Offset` through to +the `Repeated_Offset` selected by the `offset_value`. This effectively performs +a single-stepped wrapping rotation of the values of these offsets, so that +their order again reflects the recency of their use. + +The following table shows the values of the `Repeated_Offsets` as a series of +sequences are applied to them: + +| `offset_value` | `literals_length` | `Repeated_Offset1` | `Repeated_Offset2` | `Repeated_Offset3` | Comment | +|:--------------:|:-----------------:|:------------------:|:------------------:|:------------------:|:-----------------------:| +| | | 1 | 4 | 8 | starting values | +| 1114 | 11 | 1111 | 1 | 4 | non-repeat | +| 1 | 22 | 1111 | 1 | 4 | repeat 1: no change | +| 2225 | 22 | 2222 | 1111 | 1 | non-repeat | +| 1114 | 111 | 1111 | 2222 | 1111 | non-repeat | +| 3336 | 33 | 3333 | 1111 | 2222 | non-repeat | +| 2 | 22 | 1111 | 3333 | 2222 | repeat 2: swap 1 & 2 | +| 3 | 33 | 2222 | 1111 | 3333 | repeat 3: rotate 3 to 1 | +| 3 | 0 | 2221 | 2222 | 1111 | special case : insert `repeat1 - 1` | +| 1 | 0 | 2222 | 2221 | 1111 | == repeat 2 | + + +Skippable Frames +---------------- + +| `Magic_Number` | `Frame_Size` | `User_Data` | +|:--------------:|:------------:|:-----------:| +| 4 bytes | 4 bytes | n bytes | + +Skippable frames allow the insertion of user-defined metadata +into a flow of concatenated frames. + +Skippable frames defined in this specification are compatible with [LZ4] ones. + +[LZ4]:https://lz4.github.io/lz4/ + +From a compliant decoder perspective, skippable frames need just be skipped, +and their content ignored, resuming decoding after the skippable frame. + +It can be noted that a skippable frame +can be used to watermark a stream of concatenated frames +embedding any kind of tracking information (even just a UUID). +Users wary of such possibility should scan the stream of concatenated frames +in an attempt to detect such frame for analysis or removal. + +__`Magic_Number`__ + +4 Bytes, __little-endian__ format. +Value : 0x184D2A5?, which means any value from 0x184D2A50 to 0x184D2A5F. +All 16 values are valid to identify a skippable frame. +This specification doesn't detail any specific tagging for skippable frames. + +__`Frame_Size`__ + +This is the size, in bytes, of the following `User_Data` +(without including the magic number nor the size field itself). +This field is represented using 4 Bytes, __little-endian__ format, unsigned 32-bits. +This means `User_Data` can’t be bigger than (2^32-1) bytes. + +__`User_Data`__ + +The `User_Data` can be anything. Data will just be skipped by the decoder. + + + +Entropy Encoding +---------------- +Two types of entropy encoding are used by the Zstandard format: +FSE, and Huffman coding. +Huffman is used to compress literals, +while FSE is used for all other symbols +(`Literals_Length_Code`, `Match_Length_Code`, offset codes) +and to compress Huffman headers. + + +FSE +--- +FSE, short for Finite State Entropy, is an entropy codec based on [ANS]. +FSE encoding/decoding involves a state that is carried over between symbols. +Decoding must be done in the opposite direction as encoding. +Therefore, all FSE bitstreams are read from end to beginning. +Note that the order of the bits in the stream is not reversed, +we just read each multi-bits element in the reverse order they are encoded. + +For additional details on FSE, see [Finite State Entropy]. + +[Finite State Entropy]:https://github.com/Cyan4973/FiniteStateEntropy/ + +FSE decoding is directed by a decoding table with a power of 2 size, each row containing three elements: +`Symbol`, `Num_Bits`, and `Baseline`. +The `log2` of the table size is its `Accuracy_Log`. +An FSE state value represents an index in this table. + +To obtain the initial state value, consume `Accuracy_Log` bits from the stream as a __little-endian__ value. +The first symbol in the stream is the `Symbol` indicated in the table for that state. +To obtain the next state value, +the decoder should consume `Num_Bits` bits from the stream as a __little-endian__ value and add it to `Baseline`. + +[ANS]: https://en.wikipedia.org/wiki/Asymmetric_Numeral_Systems + +### FSE Table Description +To decode an FSE bitstream, it is necessary to build its FSE decoding table. +The decoding table is derived from a distribution of Probabilities. +The Zstandard format encodes distributions of Probabilities as follows: + +The distribution of probabilities is described in a bitstream which is read forward, +in __little-endian__ fashion. +The amount of bytes consumed from the bitstream to describe the distribution +is discovered at the end of the decoding process. + +The bitstream starts by reporting on which scale the distribution operates. +Let's `low4Bits` designate the lowest 4 bits of the first byte : +`Accuracy_Log = low4bits + 5`. + +An FSE distribution table describes the probabilities of all symbols +from `0` to the last present one (included) in natural order. +The sum of probabilities is normalized to reach a power of 2 total of `1 << Accuracy_Log` . +There must be two or more symbols with non-zero probabilities. + +The number of bits used to decode each probability is variable. +It depends on : + +- Remaining probabilities + 1 : + __example__ : + Presuming an `Accuracy_Log` of 8, + and presuming 100 probability points have already been distributed, + the decoder may read any value from `0` to `256 - 100 + 1 == 157` (inclusive). + Therefore, it may read up to `log2sup(157) == 8` bits, where `log2sup(N)` + is the smallest integer `T` that satisfies `(1 << T) > N`. + +- Value decoded : small values use 1 less bit : + __example__ : + Presuming values from 0 to 157 (inclusive) are possible, + 255-157 = 98 values are remaining in an 8-bits field. + They are used this way : + first 98 values (hence from 0 to 97) use only 7 bits, + values from 98 to 157 use 8 bits. + This is achieved through this scheme : + + | 8-bit field read | Value decoded | Nb of bits consumed | + | ---------------- | ------------- | ------------------- | + | 0 - 97 | 0 - 97 | 7 | + | 98 - 127 | 98 - 127 | 8 | + | 128 - 225 | 0 - 97 | 7 | + | 226 - 255 | 128 - 157 | 8 | + +Probability is derived from Value decoded using the following formula: +`Probality = Value - 1` + +Consequently, a Probability of `0` is described by a Value `1`. + +A Value `0` is used to signal a special case, named "Probability `-1`". +It describes a probability which should have been "less than 1". +Its effect on the decoding table building process is described in the [next section]. +For the purpose of counting total allocated probability points, it counts as one. + +[next section]:#from-normalized-distribution-to-decoding-tables + +Symbols probabilities are read one by one, in order. +After each probability is decoded, the total nb of probability points is updated. +This is used to determine how many bits must be read to decode the probability of next symbol. + +When a symbol has a __probability__ of `zero` (decoded from reading a Value `1`), +it is followed by a 2-bits repeat flag. +This repeat flag tells how many probabilities of zeroes follow the current one. +It provides a number ranging from 0 to 3. +If it is a 3, another 2-bits repeat flag follows, and so on. + +When the Probability for a symbol makes cumulated total reach `1 << Accuracy_Log`, +then it's the last symbol, and decoding is complete. + +Then the decoder can tell how many bytes were used in this process, +and how many symbols are present. +The bitstream consumes a round number of bytes. +Any remaining bit within the last byte is just unused. + +If this process results in a non-zero probability for a symbol outside of the +valid range of symbols that the FSE table is defined for, even if that symbol is +not used, then the data is considered corrupted. +For the specific case of offset codes, +a decoder implementation may reject a frame containing a non-zero probability +for an offset code larger than the largest offset code supported by the decoder +implementation. + +#### From normalized distribution to decoding tables + +The normalized distribution of probabilities is enough +to create a unique decoding table. +It is generated using the following build rule : + +The table has a size of `Table_Size = 1 << Accuracy_Log`. +Each row specifies the decoded symbol, +and instructions to reach the next state (`Number_of_Bits` and `Baseline`). + +Symbols are first scanned in their natural order for "less than 1" probabilities +(previously decoded from a Value of `0`). +Symbols with this special probability are being attributed a single row, +starting from the end of the table and retreating. +These symbols define a full state reset, reading `Accuracy_Log` bits. + +Then, all remaining symbols, sorted in natural order, are allocated rows. +Starting from smallest present symbol, and table position `0`, +each symbol gets allocated as many rows as its probability. + +Row allocation is not linear, it follows this order, in modular arithmetic: +``` +position += (tableSize>>1) + (tableSize>>3) + 3; +position &= tableSize-1; +``` + +Using above ordering rule, each symbol gets allocated as many rows as its probability. +If a position is already occupied by a "less than 1" probability symbol, +it is simply skipped, and the next position is allocated instead. +Once enough rows have been allocated for the current symbol, +the allocation process continues, using the next symbol, in natural order. +This process guarantees that the table is entirely and exactly filled. + +Each row specifies a decoded symbol, and is accessed by current state value. +It also specifies `Number_of_Bits` and `Baseline`, which are required to determine next state value. + +To correctly set these fields, it's necessary to sort all occurrences of each symbol in state value order, +and then attribute N+1 bits to lower rows, and N bits to higher rows, +following the process described below (using an example): + +__Example__ : +Presuming an `Accuracy_Log` of 7, +let's imagine a symbol with a Probability of 5: +it receives 5 rows, corresponding to 5 state values between `0` and `127`. + +In this example, the first state value happens to be `1` (after unspecified previous symbols). +The next 4 states are then determined using above modular arithmetic rule, +which specifies to add `64+16+3 = 83` modulo `128` to jump to next position, +producing the following series: `1`, `84`, `39`, `122`, `77` (modular arithmetic). +(note: the next symbol will then start at `32`). + +These state values are then sorted in natural order, +resulting in the following series: `1`, `39`, `77`, `84`, `122`. + +The next power of 2 after 5 is 8. +Therefore, the probability space will be divided into 8 equal parts. +Since the probability space is `1<<7 = 128` large, each share is `128/8 = 16` large. + +In order to reach 8 shares, the `8-5 = 3` lowest states will count "double", +doubling their shares (32 in width), hence requiring one more bit. + +Baseline is assigned starting from the lowest state using fewer bits, +continuing in natural state order, looping back at the beginning. +Each state takes its allocated range from Baseline, sized by its `Number_of_Bits`. + +| state order | 0 | 1 | 2 | 3 | 4 | +| ---------------- | ----- | ----- | ------ | ---- | ------ | +| state value | 1 | 39 | 77 | 84 | 122 | +| width | 32 | 32 | 32 | 16 | 16 | +| `Number_of_Bits` | 5 | 5 | 5 | 4 | 4 | +| allocation order | 3 | 4 | 5 | 1 | 2 | +| `Baseline` | 32 | 64 | 96 | 0 | 16 | +| range | 32-63 | 64-95 | 96-127 | 0-15 | 16-31 | + +During decoding, the next state value is determined by using current state value as row number, +then reading the required `Number_of_Bits` from the bitstream, and adding the specified `Baseline`. + +Note: +as a trivial example, it follows that, for a symbol with a Probability of `1`, +`Baseline` is necessarily `0`, and `Number_of_Bits` is necessarily `Accuracy_Log`. + +See [Appendix A] to see the outcome of this process applied to the default distributions. + +[Appendix A]: #appendix-a---decoding-tables-for-predefined-codes + + +Huffman Coding +-------------- +Zstandard Huffman-coded streams are read backwards, +similar to the FSE bitstreams. +Therefore, to find the start of the bitstream, it is required to +know the offset of the last byte of the Huffman-coded stream. + +After writing the last bit containing information, the compressor +writes a single `1`-bit and then fills the byte with 0-7 `0` bits of +padding. The last byte of the compressed bitstream cannot be `0` for +that reason. + +When decompressing, the last byte containing the padding is the first +byte to read. The decompressor needs to skip 0-7 initial `0`-bits and +the first `1`-bit it occurs. Afterwards, the useful part of the bitstream +begins. + +The bitstream contains Huffman-coded symbols in __little-endian__ order, +with the codes defined by the method below. + +### Huffman Tree Description + +Prefix coding represents symbols from an a priori known alphabet +by bit sequences (codewords), one codeword for each symbol, +in a manner such that different symbols may be represented +by bit sequences of different lengths, +but a parser can always parse an encoded string +unambiguously symbol-by-symbol. + +Given an alphabet with known symbol frequencies, +the Huffman algorithm allows the construction of an optimal prefix code +using the fewest bits of any possible prefix codes for that alphabet. + +Prefix code must not exceed a maximum code length. +More bits improve accuracy but cost more header size, +and require more memory or more complex decoding operations. +This specification limits maximum code length to 11 bits. + +#### Representation + +All literal symbols from zero (included) to last present one (excluded) +are represented by `Weight` with values from `0` to `Max_Number_of_Bits`. +Transformation from `Weight` to `Number_of_Bits` follows this formula : +``` +Number_of_Bits = Weight ? (Max_Number_of_Bits + 1 - Weight) : 0 +``` +When a literal symbol is not present, it receives a `Weight` of 0. +The least frequent symbol receives a `Weight` of 1. +If no literal has a `Weight` of 1, then the data is considered corrupted. +If there are not at least two literals with non-zero `Weight`, then the data +is considered corrupted. +The most frequent symbol receives a `Weight` anywhere between 1 and 11 (max). +The last symbol's `Weight` is deduced from previously retrieved Weights, +by completing to the nearest power of 2. It's necessarily non 0. +If it's not possible to reach a clean power of 2 with a single `Weight` value, +the Huffman Tree Description is considered invalid. +This final power of 2 gives `Max_Number_of_Bits`, the depth of the current tree. +`Max_Number_of_Bits` must be <= 11, +otherwise the representation is considered corrupted. + +__Example__ : +Let's presume the following Huffman tree must be described : + +| literal symbol | A | B | C | D | E | F | +| ---------------- | --- | --- | --- | --- | --- | --- | +| `Number_of_Bits` | 1 | 2 | 3 | 0 | 4 | 4 | + +The tree depth is 4, since its longest elements uses 4 bits +(longest elements are the ones with smallest frequency). + +All symbols will now receive a `Weight` instead of `Number_of_Bits`. +Weight formula is : +``` +Weight = Number_of_Bits ? (Max_Number_of_Bits + 1 - Number_of_Bits) : 0 +``` +It gives the following series of Weights : + +| literal symbol | A | B | C | D | E | F | +| -------------- | --- | --- | --- | --- | --- | --- | +| `Weight` | 4 | 3 | 2 | 0 | 1 | 1 | + +This list will be sent to the decoder, with the following modifications: + +- `F` will not be listed, because it can be determined from previous symbols +- nor will symbols above `F` as they are all 0 +- on the other hand, all symbols before `A`, starting with `\0`, will be listed, with a Weight of 0. + +The decoder will do the inverse operation : +having collected weights of literal symbols from `A` to `E`, +it knows the last literal, `F`, is present with a non-zero `Weight`. +The `Weight` of `F` can be determined by advancing to the next power of 2. +The sum of `2^(Weight-1)` (excluding 0's) is : +`8 + 4 + 2 + 0 + 1 = 15`. +Nearest larger power of 2 value is 16. +Therefore, `Max_Number_of_Bits = log2(16) = 4` and `Weight[F] = log_2(16 - 15) + 1 = 1`. + +#### Huffman Tree header + +This is a single byte value (0-255), +which describes how the series of weights is encoded. + +- if `headerByte` < 128 : + the series of weights is compressed using FSE (see below). + The length of the FSE-compressed series is equal to `headerByte` (0-127). + +- if `headerByte` >= 128 : + + the series of weights uses a direct representation, + where each `Weight` is encoded directly as a 4 bits field (0-15). + + They are encoded forward, 2 weights to a byte, + first weight taking the top four bits and second one taking the bottom four. + * e.g. the following operations could be used to read the weights: + `Weight[0] = (Byte[0] >> 4), Weight[1] = (Byte[0] & 0xf)`, etc. + + The full representation occupies `Ceiling(Number_of_Weights/2)` bytes, + meaning it uses only full bytes even if `Number_of_Weights` is odd. + + `Number_of_Weights = headerByte - 127`. + * Note that maximum `Number_of_Weights` is 255-127 = 128, + therefore, only up to 128 `Weight` can be encoded using direct representation. + * Since the last non-zero `Weight` is _not_ encoded, + this scheme is compatible with alphabet sizes of up to 129 symbols, + hence including literal symbol 128. + * If any literal symbol > 128 has a non-zero `Weight`, + direct representation is not possible. + In such case, it's necessary to use FSE compression. + + +#### Finite State Entropy (FSE) compression of Huffman weights + +In this case, the series of Huffman weights is compressed using FSE compression. +It's a single bitstream with 2 interleaved states, +sharing a single distribution table. + +To decode an FSE bitstream, it is necessary to know its compressed size. +Compressed size is provided by `headerByte`. +It's also necessary to know its _maximum possible_ decompressed size, +which is `255`, since literal symbols span from `0` to `255`, +and last symbol's `Weight` is not represented. + +An FSE bitstream starts by a header, describing probabilities distribution. +It will create a Decoding Table. +For a list of Huffman weights, the maximum accuracy log is 6 bits. +For more description see the [FSE header description](#fse-table-description) + +The Huffman header compression uses 2 states, +which share the same FSE distribution table. +The first state (`State1`) encodes the even indexed symbols, +and the second (`State2`) encodes the odd indexed symbols. +`State1` is initialized first, and then `State2`, and they take turns +decoding a single symbol and updating their state. +For more details on these FSE operations, see the [FSE section](#fse). + +The number of symbols to decode is determined +by tracking bitStream overflow condition: +If updating state after decoding a symbol would require more bits than +remain in the stream, it is assumed that extra bits are 0. Then, +symbols for each of the final states are decoded and the process is complete. + +If this process would produce more weights than the maximum number of decoded +weights (255), then the data is considered corrupted. + +If either of the 2 initial states are absent or truncated, then the data is +considered corrupted. Consequently, it is not possible to encode fewer than +2 weights using this mode. + +#### Conversion from weights to Huffman prefix codes + +All present symbols shall now have a `Weight` value. +It is possible to transform weights into `Number_of_Bits`, using this formula: +``` +Number_of_Bits = (Weight>0) ? Max_Number_of_Bits + 1 - Weight : 0 +``` +In order to determine which prefix code is assigned to each Symbol, +Symbols are first sorted by `Weight`, then by natural sequential order. +Symbols with a `Weight` of zero are removed. +Then, starting from lowest `Weight` (hence highest `Number_of_Bits`), +prefix codes are assigned in ascending order. + +__Example__ : +Let's assume the following list of weights has been decoded: + +| Literal | A | B | C | D | E | F | +| -------- | --- | --- | --- | --- | --- | --- | +| `Weight` | 4 | 3 | 2 | 0 | 1 | 1 | + +Sorted by weight and then natural sequential order, +it gives the following prefix codes distribution: + +| Literal | D | E | F | C | B | A | +| ---------------- | --- | ---- | ---- | ---- | ---- | ---- | +| `Weight` | 0 | 1 | 1 | 2 | 3 | 4 | +| `Number_of_Bits` | 0 | 4 | 4 | 3 | 2 | 1 | +| prefix code | N/A | 0000 | 0001 | 001 | 01 | 1 | +| ascending order | N/A | 0000 | 0001 | 001x | 01xx | 1xxx | + +### Huffman-coded Streams + +Given a Huffman decoding table, +it's possible to decode a Huffman-coded stream. + +Each bitstream must be read _backward_, +that is starting from the end down to the beginning. +Therefore it's necessary to know the size of each bitstream. + +It's also necessary to know exactly which _bit_ is the last one. +This is detected by a final bit flag : +the highest bit of latest byte is a final-bit-flag. +Consequently, a last byte of `0` is not possible. +And the final-bit-flag itself is not part of the useful bitstream. +Hence, the last byte contains between 0 and 7 useful bits. + +Starting from the end, +it's possible to read the bitstream in a __little-endian__ fashion, +keeping track of already used bits. Since the bitstream is encoded in reverse +order, starting from the end read symbols in forward order. + +For example, if the literal sequence `ABEF` was encoded using above prefix code, +it would be encoded (in reverse order) as: + +|Symbol | F | E | B | A | Padding | +|--------|------|------|----|---|---------| +|Encoding|`0000`|`0001`|`01`|`1`| `00001` | + +Resulting in following 2-bytes bitstream : +``` +00010000 00001101 +``` + +Here is an alternative representation with the symbol codes separated by underscore: +``` +0001_0000 00001_1_01 +``` + +Reading highest `Max_Number_of_Bits` bits, +it's possible to compare extracted value to decoding table, +determining the symbol to decode and number of bits to discard. + +The process continues up to reading the required number of symbols per stream. +If a bitstream is not entirely and exactly consumed, +hence reaching exactly its beginning position with _all_ bits consumed, +the decoding process is considered faulty. + + +Dictionary Format +----------------- + +Zstandard is compatible with "raw content" dictionaries, +free of any format restriction, except that they must be at least 8 bytes. +These dictionaries function as if they were just the `Content` part +of a formatted dictionary. + +But dictionaries created by `zstd --train` follow a format, described here. + +__Pre-requisites__ : a dictionary has a size, + defined either by a buffer limit, or a file size. + +| `Magic_Number` | `Dictionary_ID` | `Entropy_Tables` | `Content` | +| -------------- | --------------- | ---------------- | --------- | + +__`Magic_Number`__ : 4 bytes ID, value 0xEC30A437, __little-endian__ format + +__`Dictionary_ID`__ : 4 bytes, stored in __little-endian__ format. + `Dictionary_ID` can be any value, except 0 (which means no `Dictionary_ID`). + It's used by decoders to check if they use the correct dictionary. + +_Reserved ranges :_ +If the dictionary is going to be distributed in a public environment, +the following ranges of `Dictionary_ID` are reserved for some future registrar +and shall not be used : + + - low range : <= 32767 + - high range : >= (2^31) + +Outside of these ranges, any value of `Dictionary_ID` +which is both `>= 32768` and `< (1<<31)` can be used freely, +even in public environment. + + +__`Entropy_Tables`__ : follow the same format as tables in [compressed blocks]. + See the relevant [FSE](#fse-table-description) + and [Huffman](#huffman-tree-description) sections for how to decode these tables. + They are stored in following order : + Huffman tables for literals, FSE table for offsets, + FSE table for match lengths, and FSE table for literals lengths. + These tables populate the Repeat Stats literals mode and + Repeat distribution mode for sequence decoding. + It's finally followed by 3 offset values, populating recent offsets (instead of using `{1,4,8}`), + stored in order, 4-bytes __little-endian__ each, for a total of 12 bytes. + Each recent offset must have a value <= dictionary content size, and cannot equal 0. + +__`Content`__ : The rest of the dictionary is its content. + The content act as a "past" in front of data to compress or decompress, + so it can be referenced in sequence commands. + As long as the amount of data decoded from this frame is less than or + equal to `Window_Size`, sequence commands may specify offsets longer + than the total length of decoded output so far to reference back to the + dictionary, even parts of the dictionary with offsets larger than `Window_Size`. + After the total output has surpassed `Window_Size` however, + this is no longer allowed and the dictionary is no longer accessible. + +[compressed blocks]: #the-format-of-compressed_block + +If a dictionary is provided by an external source, +it should be loaded with great care, its content considered untrusted. + + + +Appendix A - Decoding tables for predefined codes +------------------------------------------------- + +This appendix contains FSE decoding tables +for the predefined literal length, match length, and offset codes. +The tables have been constructed using the algorithm as given above in chapter +"from normalized distribution to decoding tables". +The tables here can be used as examples +to crosscheck that an implementation build its decoding tables correctly. + +#### Literal Length Code: + +| State | Symbol | Number_Of_Bits | Base | +| ----- | ------ | -------------- | ---- | +| 0 | 0 | 4 | 0 | +| 1 | 0 | 4 | 16 | +| 2 | 1 | 5 | 32 | +| 3 | 3 | 5 | 0 | +| 4 | 4 | 5 | 0 | +| 5 | 6 | 5 | 0 | +| 6 | 7 | 5 | 0 | +| 7 | 9 | 5 | 0 | +| 8 | 10 | 5 | 0 | +| 9 | 12 | 5 | 0 | +| 10 | 14 | 6 | 0 | +| 11 | 16 | 5 | 0 | +| 12 | 18 | 5 | 0 | +| 13 | 19 | 5 | 0 | +| 14 | 21 | 5 | 0 | +| 15 | 22 | 5 | 0 | +| 16 | 24 | 5 | 0 | +| 17 | 25 | 5 | 32 | +| 18 | 26 | 5 | 0 | +| 19 | 27 | 6 | 0 | +| 20 | 29 | 6 | 0 | +| 21 | 31 | 6 | 0 | +| 22 | 0 | 4 | 32 | +| 23 | 1 | 4 | 0 | +| 24 | 2 | 5 | 0 | +| 25 | 4 | 5 | 32 | +| 26 | 5 | 5 | 0 | +| 27 | 7 | 5 | 32 | +| 28 | 8 | 5 | 0 | +| 29 | 10 | 5 | 32 | +| 30 | 11 | 5 | 0 | +| 31 | 13 | 6 | 0 | +| 32 | 16 | 5 | 32 | +| 33 | 17 | 5 | 0 | +| 34 | 19 | 5 | 32 | +| 35 | 20 | 5 | 0 | +| 36 | 22 | 5 | 32 | +| 37 | 23 | 5 | 0 | +| 38 | 25 | 4 | 0 | +| 39 | 25 | 4 | 16 | +| 40 | 26 | 5 | 32 | +| 41 | 28 | 6 | 0 | +| 42 | 30 | 6 | 0 | +| 43 | 0 | 4 | 48 | +| 44 | 1 | 4 | 16 | +| 45 | 2 | 5 | 32 | +| 46 | 3 | 5 | 32 | +| 47 | 5 | 5 | 32 | +| 48 | 6 | 5 | 32 | +| 49 | 8 | 5 | 32 | +| 50 | 9 | 5 | 32 | +| 51 | 11 | 5 | 32 | +| 52 | 12 | 5 | 32 | +| 53 | 15 | 6 | 0 | +| 54 | 17 | 5 | 32 | +| 55 | 18 | 5 | 32 | +| 56 | 20 | 5 | 32 | +| 57 | 21 | 5 | 32 | +| 58 | 23 | 5 | 32 | +| 59 | 24 | 5 | 32 | +| 60 | 35 | 6 | 0 | +| 61 | 34 | 6 | 0 | +| 62 | 33 | 6 | 0 | +| 63 | 32 | 6 | 0 | + +#### Match Length Code: + +| State | Symbol | Number_Of_Bits | Base | +| ----- | ------ | -------------- | ---- | +| 0 | 0 | 6 | 0 | +| 1 | 1 | 4 | 0 | +| 2 | 2 | 5 | 32 | +| 3 | 3 | 5 | 0 | +| 4 | 5 | 5 | 0 | +| 5 | 6 | 5 | 0 | +| 6 | 8 | 5 | 0 | +| 7 | 10 | 6 | 0 | +| 8 | 13 | 6 | 0 | +| 9 | 16 | 6 | 0 | +| 10 | 19 | 6 | 0 | +| 11 | 22 | 6 | 0 | +| 12 | 25 | 6 | 0 | +| 13 | 28 | 6 | 0 | +| 14 | 31 | 6 | 0 | +| 15 | 33 | 6 | 0 | +| 16 | 35 | 6 | 0 | +| 17 | 37 | 6 | 0 | +| 18 | 39 | 6 | 0 | +| 19 | 41 | 6 | 0 | +| 20 | 43 | 6 | 0 | +| 21 | 45 | 6 | 0 | +| 22 | 1 | 4 | 16 | +| 23 | 2 | 4 | 0 | +| 24 | 3 | 5 | 32 | +| 25 | 4 | 5 | 0 | +| 26 | 6 | 5 | 32 | +| 27 | 7 | 5 | 0 | +| 28 | 9 | 6 | 0 | +| 29 | 12 | 6 | 0 | +| 30 | 15 | 6 | 0 | +| 31 | 18 | 6 | 0 | +| 32 | 21 | 6 | 0 | +| 33 | 24 | 6 | 0 | +| 34 | 27 | 6 | 0 | +| 35 | 30 | 6 | 0 | +| 36 | 32 | 6 | 0 | +| 37 | 34 | 6 | 0 | +| 38 | 36 | 6 | 0 | +| 39 | 38 | 6 | 0 | +| 40 | 40 | 6 | 0 | +| 41 | 42 | 6 | 0 | +| 42 | 44 | 6 | 0 | +| 43 | 1 | 4 | 32 | +| 44 | 1 | 4 | 48 | +| 45 | 2 | 4 | 16 | +| 46 | 4 | 5 | 32 | +| 47 | 5 | 5 | 32 | +| 48 | 7 | 5 | 32 | +| 49 | 8 | 5 | 32 | +| 50 | 11 | 6 | 0 | +| 51 | 14 | 6 | 0 | +| 52 | 17 | 6 | 0 | +| 53 | 20 | 6 | 0 | +| 54 | 23 | 6 | 0 | +| 55 | 26 | 6 | 0 | +| 56 | 29 | 6 | 0 | +| 57 | 52 | 6 | 0 | +| 58 | 51 | 6 | 0 | +| 59 | 50 | 6 | 0 | +| 60 | 49 | 6 | 0 | +| 61 | 48 | 6 | 0 | +| 62 | 47 | 6 | 0 | +| 63 | 46 | 6 | 0 | + +#### Offset Code: + +| State | Symbol | Number_Of_Bits | Base | +| ----- | ------ | -------------- | ---- | +| 0 | 0 | 5 | 0 | +| 1 | 6 | 4 | 0 | +| 2 | 9 | 5 | 0 | +| 3 | 15 | 5 | 0 | +| 4 | 21 | 5 | 0 | +| 5 | 3 | 5 | 0 | +| 6 | 7 | 4 | 0 | +| 7 | 12 | 5 | 0 | +| 8 | 18 | 5 | 0 | +| 9 | 23 | 5 | 0 | +| 10 | 5 | 5 | 0 | +| 11 | 8 | 4 | 0 | +| 12 | 14 | 5 | 0 | +| 13 | 20 | 5 | 0 | +| 14 | 2 | 5 | 0 | +| 15 | 7 | 4 | 16 | +| 16 | 11 | 5 | 0 | +| 17 | 17 | 5 | 0 | +| 18 | 22 | 5 | 0 | +| 19 | 4 | 5 | 0 | +| 20 | 8 | 4 | 16 | +| 21 | 13 | 5 | 0 | +| 22 | 19 | 5 | 0 | +| 23 | 1 | 5 | 0 | +| 24 | 6 | 4 | 16 | +| 25 | 10 | 5 | 0 | +| 26 | 16 | 5 | 0 | +| 27 | 28 | 5 | 0 | +| 28 | 27 | 5 | 0 | +| 29 | 26 | 5 | 0 | +| 30 | 25 | 5 | 0 | +| 31 | 24 | 5 | 0 | + + + +Appendix B - Resources for implementers +------------------------------------------------- + +An open source reference implementation is available on : +https://github.com/facebook/zstd + +The project contains a frame generator, called [decodeCorpus], +which can be used by any 3rd-party implementation +to verify that a tested decoder is compliant with the specification. + +[decodeCorpus]: https://github.com/facebook/zstd/tree/v1.3.4/tests#decodecorpus---tool-to-generate-zstandard-frames-for-decoder-testing + +`decodeCorpus` generates random valid frames. +A compliant decoder should be able to decode them all, +or at least provide a meaningful error code explaining for which reason it cannot +(memory limit restrictions for example). + + +Version changes +--------------- +- 0.4.3 : clarifications for Huffman prefix code assignment example +- 0.4.2 : refactor FSE table construction process, inspired by Donald Pian +- 0.4.1 : clarifications on a few error scenarios, by Eric Lasota +- 0.4.0 : fixed imprecise behavior for nbSeq==0, detected by Igor Pavlov +- 0.3.9 : clarifications for Huffman-compressed literal sizes. +- 0.3.8 : clarifications for Huffman Blocks and Huffman Tree descriptions. +- 0.3.7 : clarifications for Repeat_Offsets, matching RFC8878 +- 0.3.6 : clarifications for Dictionary_ID +- 0.3.5 : clarifications for Block_Maximum_Size +- 0.3.4 : clarifications for FSE decoding table +- 0.3.3 : clarifications for field Block_Size +- 0.3.2 : remove additional block size restriction on compressed blocks +- 0.3.1 : minor clarification regarding offset history update rules +- 0.3.0 : minor edits to match RFC8478 +- 0.2.9 : clarifications for huffman weights direct representation, by Ulrich Kunitz +- 0.2.8 : clarifications for IETF RFC discuss +- 0.2.7 : clarifications from IETF RFC review, by Vijay Gurbani and Nick Terrell +- 0.2.6 : fixed an error in huffman example, by Ulrich Kunitz +- 0.2.5 : minor typos and clarifications +- 0.2.4 : section restructuring, by Sean Purcell +- 0.2.3 : clarified several details, by Sean Purcell +- 0.2.2 : added predefined codes, by Johannes Rudolph +- 0.2.1 : clarify field names, by Przemyslaw Skibinski +- 0.2.0 : numerous format adjustments for zstd v0.8+ +- 0.1.2 : limit Huffman tree depth to 11 bits +- 0.1.1 : reserved dictID ranges +- 0.1.0 : initial release diff --git a/cpp/third_party/zstd-1.5.7/doc/zstd_manual.html b/cpp/third_party/zstd-1.5.7/doc/zstd_manual.html new file mode 100644 index 0000000000..485d5eafbe --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/doc/zstd_manual.html @@ -0,0 +1,2237 @@ + + + +zstd 1.5.7 Manual + + +

zstd 1.5.7 Manual

+Note: the content of this file has been automatically generated by parsing "zstd.h" +
+

Contents

+
    +
  1. Introduction
  2. +
  3. Version
  4. +
  5. Simple Core API
  6. +
  7. Explicit context
  8. +
  9. Advanced compression API (Requires v1.4.0+)
  10. +
  11. Advanced decompression API (Requires v1.4.0+)
  12. +
  13. Streaming
  14. +
  15. Streaming compression - HowTo
  16. +
  17. Streaming decompression - HowTo
  18. +
  19. Simple dictionary API
  20. +
  21. Bulk processing dictionary API
  22. +
  23. Dictionary helper functions
  24. +
  25. Advanced dictionary and prefix API (Requires v1.4.0+)
  26. +
  27. experimental API (static linking only)
  28. +
  29. Frame header and size functions
  30. +
  31. Memory management
  32. +
  33. Advanced compression functions
  34. +
  35. Advanced decompression functions
  36. +
  37. Advanced streaming functions
  38. +
  39. Buffer-less and synchronous inner streaming functions (DEPRECATED)
  40. +
  41. Buffer-less streaming compression (synchronous mode)
  42. +
  43. Buffer-less streaming decompression (synchronous mode)
  44. +
  45. Block level API (DEPRECATED)
  46. +
+
+

Introduction

+  zstd, short for Zstandard, is a fast lossless compression algorithm, targeting
+  real-time compression scenarios at zlib-level and better compression ratios.
+  The zstd compression library provides in-memory compression and decompression
+  functions.
+
+  The library supports regular compression levels from 1 up to ZSTD_maxCLevel(),
+  which is currently 22. Levels >= 20, labeled `--ultra`, should be used with
+  caution, as they require more memory. The library also offers negative
+  compression levels, which extend the range of speed vs. ratio preferences.
+  The lower the level, the faster the speed (at the cost of compression).
+
+  Compression can be done in:
+    - a single step (described as Simple API)
+    - a single step, reusing a context (described as Explicit context)
+    - unbounded multiple steps (described as Streaming compression)
+
+  The compression ratio achievable on small data can be highly improved using
+  a dictionary. Dictionary compression can be performed in:
+    - a single step (described as Simple dictionary API)
+    - a single step, reusing a dictionary (described as Bulk-processing
+      dictionary API)
+
+  Advanced experimental functions can be accessed using
+  `#define ZSTD_STATIC_LINKING_ONLY` before including zstd.h.
+
+  Advanced experimental APIs should never be used with a dynamically-linked
+  library. They are not "stable"; their definitions or signatures may change in
+  the future. Only static linking is allowed.
+
+ +

Version


+
+
unsigned ZSTD_versionNumber(void);
+

Return runtime library version, the value is (MAJOR*100*100 + MINOR*100 + RELEASE). +


+ +
const char* ZSTD_versionString(void);
+

Return runtime library version, like "1.4.5". Requires v1.3.0+. +


+ +

Simple Core API


+
+
size_t ZSTD_compress( void* dst, size_t dstCapacity,
+                const void* src, size_t srcSize,
+                      int compressionLevel);
+

Compresses `src` content as a single zstd compressed frame into already allocated `dst`. + NOTE: Providing `dstCapacity >= ZSTD_compressBound(srcSize)` guarantees that zstd will have + enough space to successfully compress the data. + @return : compressed size written into `dst` (<= `dstCapacity), + or an error code if it fails (which can be tested using ZSTD_isError()). +


+ +
size_t ZSTD_decompress( void* dst, size_t dstCapacity,
+                  const void* src, size_t compressedSize);
+

`compressedSize` : must be the _exact_ size of some number of compressed and/or skippable frames. + Multiple compressed frames can be decompressed at once with this method. + The result will be the concatenation of all decompressed frames, back to back. + `dstCapacity` is an upper bound of originalSize to regenerate. + First frame's decompressed size can be extracted using ZSTD_getFrameContentSize(). + If maximum upper bound isn't known, prefer using streaming mode to decompress data. + @return : the number of bytes decompressed into `dst` (<= `dstCapacity`), + or an errorCode if it fails (which can be tested using ZSTD_isError()). +


+ +

Decompression helper functions


+
#define ZSTD_CONTENTSIZE_UNKNOWN (0ULL - 1)
+#define ZSTD_CONTENTSIZE_ERROR   (0ULL - 2)
+unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize);
+

`src` should point to the start of a ZSTD encoded frame. + `srcSize` must be at least as large as the frame header. + hint : any size >= `ZSTD_frameHeaderSize_max` is large enough. + @return : - decompressed size of `src` frame content, if known + - ZSTD_CONTENTSIZE_UNKNOWN if the size cannot be determined + - ZSTD_CONTENTSIZE_ERROR if an error occurred (e.g. invalid magic number, srcSize too small) + note 1 : a 0 return value means the frame is valid but "empty". + note 2 : decompressed size is an optional field, it may not be present (typically in streaming mode). + When `return==ZSTD_CONTENTSIZE_UNKNOWN`, data to decompress could be any size. + In which case, it's necessary to use streaming mode to decompress data. + Optionally, application can rely on some implicit limit, + as ZSTD_decompress() only needs an upper bound of decompressed size. + (For example, data could be necessarily cut into blocks <= 16 KB). + note 3 : decompressed size is always present when compression is completed using single-pass functions, + such as ZSTD_compress(), ZSTD_compressCCtx() ZSTD_compress_usingDict() or ZSTD_compress_usingCDict(). + note 4 : decompressed size can be very large (64-bits value), + potentially larger than what local system can handle as a single memory segment. + In which case, it's necessary to use streaming mode to decompress data. + note 5 : If source is untrusted, decompressed size could be wrong or intentionally modified. + Always ensure return value fits within application's authorized limits. + Each application can set its own limits. + note 6 : This function replaces ZSTD_getDecompressedSize() +


+ +
ZSTD_DEPRECATED("Replaced by ZSTD_getFrameContentSize")
+ZSTDLIB_API
+unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize);
+

NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize(). + Both functions work the same way, but ZSTD_getDecompressedSize() blends + "empty", "unknown" and "error" results to the same return value (0), + while ZSTD_getFrameContentSize() gives them separate return values. + @return : decompressed size of `src` frame content _if known and not empty_, 0 otherwise. +


+ +
size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize);
+

`src` should point to the start of a ZSTD frame or skippable frame. + `srcSize` must be >= first frame size + @return : the compressed size of the first frame starting at `src`, + suitable to pass as `srcSize` to `ZSTD_decompress` or similar, + or an error code if input is invalid +


+ +

Compression helper functions


+
#define ZSTD_MAX_INPUT_SIZE ((sizeof(size_t)==8) ? 0xFF00FF00FF00FF00ULL : 0xFF00FF00U)
+#define ZSTD_COMPRESSBOUND(srcSize)   (((size_t)(srcSize) >= ZSTD_MAX_INPUT_SIZE) ? 0 : (srcSize) + ((srcSize)>>8) + (((srcSize) < (128<<10)) ? (((128<<10) - (srcSize)) >> 11) /* margin, from 64 to 0 */ : 0))  /* this formula ensures that bound(A) + bound(B) <= bound(A+B) as long as A and B >= 128 KB */
+size_t ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst case single-pass scenario */
+

maximum compressed size in worst case single-pass scenario. + When invoking `ZSTD_compress()`, or any other one-pass compression function, + it's recommended to provide @dstCapacity >= ZSTD_compressBound(srcSize) + as it eliminates one potential failure scenario, + aka not enough room in dst buffer to write the compressed frame. + Note : ZSTD_compressBound() itself can fail, if @srcSize >= ZSTD_MAX_INPUT_SIZE . + In which case, ZSTD_compressBound() will return an error code + which can be tested using ZSTD_isError(). + + ZSTD_COMPRESSBOUND() : + same as ZSTD_compressBound(), but as a macro. + It can be used to produce constants, which can be useful for static allocation, + for example to size a static array on stack. + Will produce constant value 0 if srcSize is too large. + +


+ +

Error helper functions

#include "zstd_errors.h" /* list of errors */
+/* ZSTD_isError() :
+ * Most ZSTD_* functions returning a size_t value can be tested for error,
+ * using ZSTD_isError().
+ * @return 1 if error, 0 otherwise
+ */
+unsigned     ZSTD_isError(size_t result);      /*!< tells if a `size_t` function result is an error code */
+ZSTD_ErrorCode ZSTD_getErrorCode(size_t functionResult); /* convert a result into an error code, which can be compared to error enum list */
+const char*  ZSTD_getErrorName(size_t result); /*!< provides readable string from a function result */
+int          ZSTD_minCLevel(void);             /*!< minimum negative compression level allowed, requires v1.4.0+ */
+int          ZSTD_maxCLevel(void);             /*!< maximum compression level available */
+int          ZSTD_defaultCLevel(void);         /*!< default compression level, specified by ZSTD_CLEVEL_DEFAULT, requires v1.5.0+ */
+

+

Explicit context


+
+

Compression context

  When compressing many times,
+  it is recommended to allocate a compression context just once,
+  and reuse it for each successive compression operation.
+  This will make the workload easier for system's memory.
+  Note : re-using context is just a speed / resource optimization.
+         It doesn't change the compression ratio, which remains identical.
+  Note 2: For parallel execution in multi-threaded environments,
+         use one different context per thread .
+ 
+
typedef struct ZSTD_CCtx_s ZSTD_CCtx;
+ZSTD_CCtx* ZSTD_createCCtx(void);
+size_t     ZSTD_freeCCtx(ZSTD_CCtx* cctx);  /* compatible with NULL pointer */
+

+
size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx,
+                         void* dst, size_t dstCapacity,
+                   const void* src, size_t srcSize,
+                         int compressionLevel);
+

Same as ZSTD_compress(), using an explicit ZSTD_CCtx. + Important : in order to mirror `ZSTD_compress()` behavior, + this function compresses at the requested compression level, + __ignoring any other advanced parameter__ . + If any advanced parameter was set using the advanced API, + they will all be reset. Only @compressionLevel remains. + +


+ +

Decompression context

  When decompressing many times,
+  it is recommended to allocate a context only once,
+  and reuse it for each successive compression operation.
+  This will make workload friendlier for system's memory.
+  Use one context per thread for parallel execution. 
+
typedef struct ZSTD_DCtx_s ZSTD_DCtx;
+ZSTD_DCtx* ZSTD_createDCtx(void);
+size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);  /* accept NULL pointer */
+

+
size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx,
+                           void* dst, size_t dstCapacity,
+                     const void* src, size_t srcSize);
+

Same as ZSTD_decompress(), + requires an allocated ZSTD_DCtx. + Compatible with sticky parameters (see below). + +


+ +

Advanced compression API (Requires v1.4.0+)


+
+
typedef enum { ZSTD_fast=1,
+               ZSTD_dfast=2,
+               ZSTD_greedy=3,
+               ZSTD_lazy=4,
+               ZSTD_lazy2=5,
+               ZSTD_btlazy2=6,
+               ZSTD_btopt=7,
+               ZSTD_btultra=8,
+               ZSTD_btultra2=9
+               /* note : new strategies _might_ be added in the future.
+                         Only the order (from fast to strong) is guaranteed */
+} ZSTD_strategy;
+

+
typedef enum {
+
+    /* compression parameters
+     * Note: When compressing with a ZSTD_CDict these parameters are superseded
+     * by the parameters used to construct the ZSTD_CDict.
+     * See ZSTD_CCtx_refCDict() for more info (superseded-by-cdict). */
+    ZSTD_c_compressionLevel=100, /* Set compression parameters according to pre-defined cLevel table.
+                              * Note that exact compression parameters are dynamically determined,
+                              * depending on both compression level and srcSize (when known).
+                              * Default level is ZSTD_CLEVEL_DEFAULT==3.
+                              * Special: value 0 means default, which is controlled by ZSTD_CLEVEL_DEFAULT.
+                              * Note 1 : it's possible to pass a negative compression level.
+                              * Note 2 : setting a level does not automatically set all other compression parameters
+                              *   to default. Setting this will however eventually dynamically impact the compression
+                              *   parameters which have not been manually set. The manually set
+                              *   ones will 'stick'. */
+    /* Advanced compression parameters :
+     * It's possible to pin down compression parameters to some specific values.
+     * In which case, these values are no longer dynamically selected by the compressor */
+    ZSTD_c_windowLog=101,    /* Maximum allowed back-reference distance, expressed as power of 2.
+                              * This will set a memory budget for streaming decompression,
+                              * with larger values requiring more memory
+                              * and typically compressing more.
+                              * Must be clamped between ZSTD_WINDOWLOG_MIN and ZSTD_WINDOWLOG_MAX.
+                              * Special: value 0 means "use default windowLog".
+                              * Note: Using a windowLog greater than ZSTD_WINDOWLOG_LIMIT_DEFAULT
+                              *       requires explicitly allowing such size at streaming decompression stage. */
+    ZSTD_c_hashLog=102,      /* Size of the initial probe table, as a power of 2.
+                              * Resulting memory usage is (1 << (hashLog+2)).
+                              * Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX.
+                              * Larger tables improve compression ratio of strategies <= dFast,
+                              * and improve speed of strategies > dFast.
+                              * Special: value 0 means "use default hashLog". */
+    ZSTD_c_chainLog=103,     /* Size of the multi-probe search table, as a power of 2.
+                              * Resulting memory usage is (1 << (chainLog+2)).
+                              * Must be clamped between ZSTD_CHAINLOG_MIN and ZSTD_CHAINLOG_MAX.
+                              * Larger tables result in better and slower compression.
+                              * This parameter is useless for "fast" strategy.
+                              * It's still useful when using "dfast" strategy,
+                              * in which case it defines a secondary probe table.
+                              * Special: value 0 means "use default chainLog". */
+    ZSTD_c_searchLog=104,    /* Number of search attempts, as a power of 2.
+                              * More attempts result in better and slower compression.
+                              * This parameter is useless for "fast" and "dFast" strategies.
+                              * Special: value 0 means "use default searchLog". */
+    ZSTD_c_minMatch=105,     /* Minimum size of searched matches.
+                              * Note that Zstandard can still find matches of smaller size,
+                              * it just tweaks its search algorithm to look for this size and larger.
+                              * Larger values increase compression and decompression speed, but decrease ratio.
+                              * Must be clamped between ZSTD_MINMATCH_MIN and ZSTD_MINMATCH_MAX.
+                              * Note that currently, for all strategies < btopt, effective minimum is 4.
+                              *                    , for all strategies > fast, effective maximum is 6.
+                              * Special: value 0 means "use default minMatchLength". */
+    ZSTD_c_targetLength=106, /* Impact of this field depends on strategy.
+                              * For strategies btopt, btultra & btultra2:
+                              *     Length of Match considered "good enough" to stop search.
+                              *     Larger values make compression stronger, and slower.
+                              * For strategy fast:
+                              *     Distance between match sampling.
+                              *     Larger values make compression faster, and weaker.
+                              * Special: value 0 means "use default targetLength". */
+    ZSTD_c_strategy=107,     /* See ZSTD_strategy enum definition.
+                              * The higher the value of selected strategy, the more complex it is,
+                              * resulting in stronger and slower compression.
+                              * Special: value 0 means "use default strategy". */
+
+    ZSTD_c_targetCBlockSize=130, /* v1.5.6+
+                                  * Attempts to fit compressed block size into approximately targetCBlockSize.
+                                  * Bound by ZSTD_TARGETCBLOCKSIZE_MIN and ZSTD_TARGETCBLOCKSIZE_MAX.
+                                  * Note that it's not a guarantee, just a convergence target (default:0).
+                                  * No target when targetCBlockSize == 0.
+                                  * This is helpful in low bandwidth streaming environments to improve end-to-end latency,
+                                  * when a client can make use of partial documents (a prominent example being Chrome).
+                                  * Note: this parameter is stable since v1.5.6.
+                                  * It was present as an experimental parameter in earlier versions,
+                                  * but it's not recommended using it with earlier library versions
+                                  * due to massive performance regressions.
+                                  */
+    /* LDM mode parameters */
+    ZSTD_c_enableLongDistanceMatching=160, /* Enable long distance matching.
+                                     * This parameter is designed to improve compression ratio
+                                     * for large inputs, by finding large matches at long distance.
+                                     * It increases memory usage and window size.
+                                     * Note: enabling this parameter increases default ZSTD_c_windowLog to 128 MB
+                                     * except when expressly set to a different value.
+                                     * Note: will be enabled by default if ZSTD_c_windowLog >= 128 MB and
+                                     * compression strategy >= ZSTD_btopt (== compression level 16+) */
+    ZSTD_c_ldmHashLog=161,   /* Size of the table for long distance matching, as a power of 2.
+                              * Larger values increase memory usage and compression ratio,
+                              * but decrease compression speed.
+                              * Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX
+                              * default: windowlog - 7.
+                              * Special: value 0 means "automatically determine hashlog". */
+    ZSTD_c_ldmMinMatch=162,  /* Minimum match size for long distance matcher.
+                              * Larger/too small values usually decrease compression ratio.
+                              * Must be clamped between ZSTD_LDM_MINMATCH_MIN and ZSTD_LDM_MINMATCH_MAX.
+                              * Special: value 0 means "use default value" (default: 64). */
+    ZSTD_c_ldmBucketSizeLog=163, /* Log size of each bucket in the LDM hash table for collision resolution.
+                              * Larger values improve collision resolution but decrease compression speed.
+                              * The maximum value is ZSTD_LDM_BUCKETSIZELOG_MAX.
+                              * Special: value 0 means "use default value" (default: 3). */
+    ZSTD_c_ldmHashRateLog=164, /* Frequency of inserting/looking up entries into the LDM hash table.
+                              * Must be clamped between 0 and (ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN).
+                              * Default is MAX(0, (windowLog - ldmHashLog)), optimizing hash table usage.
+                              * Larger values improve compression speed.
+                              * Deviating far from default value will likely result in a compression ratio decrease.
+                              * Special: value 0 means "automatically determine hashRateLog". */
+
+    /* frame parameters */
+    ZSTD_c_contentSizeFlag=200, /* Content size will be written into frame header _whenever known_ (default:1)
+                              * Content size must be known at the beginning of compression.
+                              * This is automatically the case when using ZSTD_compress2(),
+                              * For streaming scenarios, content size must be provided with ZSTD_CCtx_setPledgedSrcSize() */
+    ZSTD_c_checksumFlag=201, /* A 32-bits checksum of content is written at end of frame (default:0) */
+    ZSTD_c_dictIDFlag=202,   /* When applicable, dictionary's ID is written into frame header (default:1) */
+
+    /* multi-threading parameters */
+    /* These parameters are only active if multi-threading is enabled (compiled with build macro ZSTD_MULTITHREAD).
+     * Otherwise, trying to set any other value than default (0) will be a no-op and return an error.
+     * In a situation where it's unknown if the linked library supports multi-threading or not,
+     * setting ZSTD_c_nbWorkers to any value >= 1 and consulting the return value provides a quick way to check this property.
+     */
+    ZSTD_c_nbWorkers=400,    /* Select how many threads will be spawned to compress in parallel.
+                              * When nbWorkers >= 1, triggers asynchronous mode when invoking ZSTD_compressStream*() :
+                              * ZSTD_compressStream*() consumes input and flush output if possible, but immediately gives back control to caller,
+                              * while compression is performed in parallel, within worker thread(s).
+                              * (note : a strong exception to this rule is when first invocation of ZSTD_compressStream2() sets ZSTD_e_end :
+                              *  in which case, ZSTD_compressStream2() delegates to ZSTD_compress2(), which is always a blocking call).
+                              * More workers improve speed, but also increase memory usage.
+                              * Default value is `0`, aka "single-threaded mode" : no worker is spawned,
+                              * compression is performed inside Caller's thread, and all invocations are blocking */
+    ZSTD_c_jobSize=401,      /* Size of a compression job. This value is enforced only when nbWorkers >= 1.
+                              * Each compression job is completed in parallel, so this value can indirectly impact the nb of active threads.
+                              * 0 means default, which is dynamically determined based on compression parameters.
+                              * Job size must be a minimum of overlap size, or ZSTDMT_JOBSIZE_MIN (= 512 KB), whichever is largest.
+                              * The minimum size is automatically and transparently enforced. */
+    ZSTD_c_overlapLog=402,   /* Control the overlap size, as a fraction of window size.
+                              * The overlap size is an amount of data reloaded from previous job at the beginning of a new job.
+                              * It helps preserve compression ratio, while each job is compressed in parallel.
+                              * This value is enforced only when nbWorkers >= 1.
+                              * Larger values increase compression ratio, but decrease speed.
+                              * Possible values range from 0 to 9 :
+                              * - 0 means "default" : value will be determined by the library, depending on strategy
+                              * - 1 means "no overlap"
+                              * - 9 means "full overlap", using a full window size.
+                              * Each intermediate rank increases/decreases load size by a factor 2 :
+                              * 9: full window;  8: w/2;  7: w/4;  6: w/8;  5:w/16;  4: w/32;  3:w/64;  2:w/128;  1:no overlap;  0:default
+                              * default value varies between 6 and 9, depending on strategy */
+
+    /* note : additional experimental parameters are also available
+     * within the experimental section of the API.
+     * At the time of this writing, they include :
+     * ZSTD_c_rsyncable
+     * ZSTD_c_format
+     * ZSTD_c_forceMaxWindow
+     * ZSTD_c_forceAttachDict
+     * ZSTD_c_literalCompressionMode
+     * ZSTD_c_srcSizeHint
+     * ZSTD_c_enableDedicatedDictSearch
+     * ZSTD_c_stableInBuffer
+     * ZSTD_c_stableOutBuffer
+     * ZSTD_c_blockDelimiters
+     * ZSTD_c_validateSequences
+     * ZSTD_c_blockSplitterLevel
+     * ZSTD_c_splitAfterSequences
+     * ZSTD_c_useRowMatchFinder
+     * ZSTD_c_prefetchCDictTables
+     * ZSTD_c_enableSeqProducerFallback
+     * ZSTD_c_maxBlockSize
+     * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
+     * note : never ever use experimentalParam? names directly;
+     *        also, the enums values themselves are unstable and can still change.
+     */
+     ZSTD_c_experimentalParam1=500,
+     ZSTD_c_experimentalParam2=10,
+     ZSTD_c_experimentalParam3=1000,
+     ZSTD_c_experimentalParam4=1001,
+     ZSTD_c_experimentalParam5=1002,
+     /* was ZSTD_c_experimentalParam6=1003; is now ZSTD_c_targetCBlockSize */
+     ZSTD_c_experimentalParam7=1004,
+     ZSTD_c_experimentalParam8=1005,
+     ZSTD_c_experimentalParam9=1006,
+     ZSTD_c_experimentalParam10=1007,
+     ZSTD_c_experimentalParam11=1008,
+     ZSTD_c_experimentalParam12=1009,
+     ZSTD_c_experimentalParam13=1010,
+     ZSTD_c_experimentalParam14=1011,
+     ZSTD_c_experimentalParam15=1012,
+     ZSTD_c_experimentalParam16=1013,
+     ZSTD_c_experimentalParam17=1014,
+     ZSTD_c_experimentalParam18=1015,
+     ZSTD_c_experimentalParam19=1016,
+     ZSTD_c_experimentalParam20=1017
+} ZSTD_cParameter;
+

+
typedef struct {
+    size_t error;
+    int lowerBound;
+    int upperBound;
+} ZSTD_bounds;
+

+
ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter cParam);
+

All parameters must belong to an interval with lower and upper bounds, + otherwise they will either trigger an error or be automatically clamped. + @return : a structure, ZSTD_bounds, which contains + - an error status field, which must be tested using ZSTD_isError() + - lower and upper bounds, both inclusive + +


+ +
size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value);
+

Set one compression parameter, selected by enum ZSTD_cParameter. + All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds(). + Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). + Setting a parameter is generally only possible during frame initialization (before starting compression). + Exception : when using multi-threading mode (nbWorkers >= 1), + the following parameters can be updated _during_ compression (within same frame): + => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy. + new parameters will be active for next job only (after a flush()). + @return : an error code (which can be tested using ZSTD_isError()). + +


+ +
size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize);
+

Total input data size to be compressed as a single frame. + Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag. + This value will also be controlled at end of frame, and trigger an error if not respected. + @result : 0, or an error code (which can be tested with ZSTD_isError()). + Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame. + In order to mean "unknown content size", pass constant ZSTD_CONTENTSIZE_UNKNOWN. + ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame. + Note 2 : pledgedSrcSize is only valid once, for the next frame. + It's discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN. + Note 3 : Whenever all input data is provided and consumed in a single round, + for example with ZSTD_compress2(), + or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end), + this value is automatically overridden by srcSize instead. + +


+ +
typedef enum {
+    ZSTD_reset_session_only = 1,
+    ZSTD_reset_parameters = 2,
+    ZSTD_reset_session_and_parameters = 3
+} ZSTD_ResetDirective;
+

+
size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset);
+

There are 2 different things that can be reset, independently or jointly : + - The session : will stop compressing current frame, and make CCtx ready to start a new one. + Useful after an error, or to interrupt any ongoing compression. + Any internal data not yet flushed is cancelled. + Compression parameters and dictionary remain unchanged. + They will be used to compress next frame. + Resetting session never fails. + - The parameters : changes all parameters back to "default". + This also removes any reference to any dictionary or external sequence producer. + Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing) + otherwise the reset fails, and function returns an error value (which can be tested using ZSTD_isError()) + - Both : similar to resetting the session, followed by resetting parameters. + +


+ +
size_t ZSTD_compress2( ZSTD_CCtx* cctx,
+                       void* dst, size_t dstCapacity,
+                 const void* src, size_t srcSize);
+

Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API. + (note that this entry point doesn't even expose a compression level parameter). + ZSTD_compress2() always starts a new frame. + Should cctx hold data from a previously unfinished frame, everything about it is forgotten. + - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() + - The function is always blocking, returns when compression is completed. + NOTE: Providing `dstCapacity >= ZSTD_compressBound(srcSize)` guarantees that zstd will have + enough space to successfully compress the data, though it is possible it fails for other reasons. + @return : compressed size written into `dst` (<= `dstCapacity), + or an error code if it fails (which can be tested using ZSTD_isError()). + +


+ +

Advanced decompression API (Requires v1.4.0+)


+
+
typedef enum {
+
+    ZSTD_d_windowLogMax=100, /* Select a size limit (in power of 2) beyond which
+                              * the streaming API will refuse to allocate memory buffer
+                              * in order to protect the host from unreasonable memory requirements.
+                              * This parameter is only useful in streaming mode, since no internal buffer is allocated in single-pass mode.
+                              * By default, a decompression context accepts window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT).
+                              * Special: value 0 means "use default maximum windowLog". */
+
+    /* note : additional experimental parameters are also available
+     * within the experimental section of the API.
+     * At the time of this writing, they include :
+     * ZSTD_d_format
+     * ZSTD_d_stableOutBuffer
+     * ZSTD_d_forceIgnoreChecksum
+     * ZSTD_d_refMultipleDDicts
+     * ZSTD_d_disableHuffmanAssembly
+     * ZSTD_d_maxBlockSize
+     * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
+     * note : never ever use experimentalParam? names directly
+     */
+     ZSTD_d_experimentalParam1=1000,
+     ZSTD_d_experimentalParam2=1001,
+     ZSTD_d_experimentalParam3=1002,
+     ZSTD_d_experimentalParam4=1003,
+     ZSTD_d_experimentalParam5=1004,
+     ZSTD_d_experimentalParam6=1005
+
+} ZSTD_dParameter;
+

+
ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam);
+

All parameters must belong to an interval with lower and upper bounds, + otherwise they will either trigger an error or be automatically clamped. + @return : a structure, ZSTD_bounds, which contains + - an error status field, which must be tested using ZSTD_isError() + - both lower and upper bounds, inclusive + +


+ +
size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int value);
+

Set one compression parameter, selected by enum ZSTD_dParameter. + All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds(). + Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). + Setting a parameter is only possible during frame initialization (before starting decompression). + @return : 0, or an error code (which can be tested using ZSTD_isError()). + +


+ +
size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset);
+

Return a DCtx to clean state. + Session and parameters can be reset jointly or separately. + Parameters can only be reset when no active frame is being decompressed. + @return : 0, or an error code, which can be tested with ZSTD_isError() + +


+ +

Streaming


+
+
typedef struct ZSTD_inBuffer_s {
+  const void* src;    /**< start of input buffer */
+  size_t size;        /**< size of input buffer */
+  size_t pos;         /**< position where reading stopped. Will be updated. Necessarily 0 <= pos <= size */
+} ZSTD_inBuffer;
+

+
typedef struct ZSTD_outBuffer_s {
+  void*  dst;         /**< start of output buffer */
+  size_t size;        /**< size of output buffer */
+  size_t pos;         /**< position where writing stopped. Will be updated. Necessarily 0 <= pos <= size */
+} ZSTD_outBuffer;
+

+

Streaming compression - HowTo

+  A ZSTD_CStream object is required to track streaming operation.
+  Use ZSTD_createCStream() and ZSTD_freeCStream() to create/release resources.
+  ZSTD_CStream objects can be reused multiple times on consecutive compression operations.
+  It is recommended to reuse ZSTD_CStream since it will play nicer with system's memory, by re-using already allocated memory.
+
+  For parallel execution, use one separate ZSTD_CStream per thread.
+
+  note : since v1.3.0, ZSTD_CStream and ZSTD_CCtx are the same thing.
+
+  Parameters are sticky : when starting a new compression on the same context,
+  it will reuse the same sticky parameters as previous compression session.
+  When in doubt, it's recommended to fully initialize the context before usage.
+  Use ZSTD_CCtx_reset() to reset the context and ZSTD_CCtx_setParameter(),
+  ZSTD_CCtx_setPledgedSrcSize(), or ZSTD_CCtx_loadDictionary() and friends to
+  set more specific parameters, the pledged source size, or load a dictionary.
+
+  Use ZSTD_compressStream2() with ZSTD_e_continue as many times as necessary to
+  consume input stream. The function will automatically update both `pos`
+  fields within `input` and `output`.
+  Note that the function may not consume the entire input, for example, because
+  the output buffer is already full, in which case `input.pos < input.size`.
+  The caller must check if input has been entirely consumed.
+  If not, the caller must make some room to receive more compressed data,
+  and then present again remaining input data.
+  note: ZSTD_e_continue is guaranteed to make some forward progress when called,
+        but doesn't guarantee maximal forward progress. This is especially relevant
+        when compressing with multiple threads. The call won't block if it can
+        consume some input, but if it can't it will wait for some, but not all,
+        output to be flushed.
+ @return : provides a minimum amount of data remaining to be flushed from internal buffers
+           or an error code, which can be tested using ZSTD_isError().
+
+  At any moment, it's possible to flush whatever data might remain stuck within internal buffer,
+  using ZSTD_compressStream2() with ZSTD_e_flush. `output->pos` will be updated.
+  Note that, if `output->size` is too small, a single invocation with ZSTD_e_flush might not be enough (return code > 0).
+  In which case, make some room to receive more compressed data, and call again ZSTD_compressStream2() with ZSTD_e_flush.
+  You must continue calling ZSTD_compressStream2() with ZSTD_e_flush until it returns 0, at which point you can change the
+  operation.
+  note: ZSTD_e_flush will flush as much output as possible, meaning when compressing with multiple threads, it will
+        block until the flush is complete or the output buffer is full.
+  @return : 0 if internal buffers are entirely flushed,
+            >0 if some data still present within internal buffer (the value is minimal estimation of remaining size),
+            or an error code, which can be tested using ZSTD_isError().
+
+  Calling ZSTD_compressStream2() with ZSTD_e_end instructs to finish a frame.
+  It will perform a flush and write frame epilogue.
+  The epilogue is required for decoders to consider a frame completed.
+  flush operation is the same, and follows same rules as calling ZSTD_compressStream2() with ZSTD_e_flush.
+  You must continue calling ZSTD_compressStream2() with ZSTD_e_end until it returns 0, at which point you are free to
+  start a new frame.
+  note: ZSTD_e_end will flush as much output as possible, meaning when compressing with multiple threads, it will
+        block until the flush is complete or the output buffer is full.
+  @return : 0 if frame fully completed and fully flushed,
+            >0 if some data still present within internal buffer (the value is minimal estimation of remaining size),
+            or an error code, which can be tested using ZSTD_isError().
+
+ 
+
+ +
typedef ZSTD_CCtx ZSTD_CStream;  /**< CCtx and CStream are now effectively same object (>= v1.3.0) */
+

+

ZSTD_CStream management functions

ZSTD_CStream* ZSTD_createCStream(void);
+size_t ZSTD_freeCStream(ZSTD_CStream* zcs);  /* accept NULL pointer */
+

+

Streaming compression functions

typedef enum {
+    ZSTD_e_continue=0, /* collect more data, encoder decides when to output compressed result, for optimal compression ratio */
+    ZSTD_e_flush=1,    /* flush any data provided so far,
+                        * it creates (at least) one new block, that can be decoded immediately on reception;
+                        * frame will continue: any future data can still reference previously compressed data, improving compression.
+                        * note : multithreaded compression will block to flush as much output as possible. */
+    ZSTD_e_end=2       /* flush any remaining data _and_ close current frame.
+                        * note that frame is only closed after compressed data is fully flushed (return value == 0).
+                        * After that point, any additional data starts a new frame.
+                        * note : each frame is independent (does not reference any content from previous frame).
+                        : note : multithreaded compression will block to flush as much output as possible. */
+} ZSTD_EndDirective;
+

+
size_t ZSTD_compressStream2( ZSTD_CCtx* cctx,
+                             ZSTD_outBuffer* output,
+                             ZSTD_inBuffer* input,
+                             ZSTD_EndDirective endOp);
+

Behaves about the same as ZSTD_compressStream, with additional control on end directive. + - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() + - Compression parameters cannot be changed once compression is started (save a list of exceptions in multi-threading mode) + - output->pos must be <= dstCapacity, input->pos must be <= srcSize + - output->pos and input->pos will be updated. They are guaranteed to remain below their respective limit. + - endOp must be a valid directive + - When nbWorkers==0 (default), function is blocking : it completes its job before returning to caller. + - When nbWorkers>=1, function is non-blocking : it copies a portion of input, distributes jobs to internal worker threads, flush to output whatever is available, + and then immediately returns, just indicating that there is some data remaining to be flushed. + The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte. + - Exception : if the first call requests a ZSTD_e_end directive and provides enough dstCapacity, the function delegates to ZSTD_compress2() which is always blocking. + - @return provides a minimum amount of data remaining to be flushed from internal buffers + or an error code, which can be tested using ZSTD_isError(). + if @return != 0, flush is not fully completed, there is still some data left within internal buffers. + This is useful for ZSTD_e_flush, since in this case more flushes are necessary to empty all buffers. + For ZSTD_e_end, @return == 0 when internal buffers are fully flushed and frame is completed. + - after a ZSTD_e_end directive, if internal buffer is not fully flushed (@return != 0), + only ZSTD_e_end or ZSTD_e_flush operations are allowed. + Before starting a new compression job, or changing compression parameters, + it is required to fully flush internal buffers. + - note: if an operation ends with an error, it may leave @cctx in an undefined state. + Therefore, it's UB to invoke ZSTD_compressStream2() of ZSTD_compressStream() on such a state. + In order to be re-employed after an error, a state must be reset, + which can be done explicitly (ZSTD_CCtx_reset()), + or is sometimes implied by methods starting a new compression job (ZSTD_initCStream(), ZSTD_compressCCtx()) + +


+ +
size_t ZSTD_CStreamInSize(void);    /**< recommended size for input buffer */
+

+
size_t ZSTD_CStreamOutSize(void);   /**< recommended size for output buffer. Guarantee to successfully flush at least one complete compressed block. */
+

+
size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel);
+/*!
+ * Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue).
+ * NOTE: The return value is different. ZSTD_compressStream() returns a hint for
+ * the next read size (if non-zero and not an error). ZSTD_compressStream2()
+ * returns the minimum nb of bytes left to flush (if non-zero and not an error).
+ */
+size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
+/*! Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush). */
+size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
+/*! Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end). */
+size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
+

+ ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) + ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); + + Note that ZSTD_initCStream() clears any previously set dictionary. Use the new API + to compress with a dictionary. + +


+ +

Streaming decompression - HowTo

+  A ZSTD_DStream object is required to track streaming operations.
+  Use ZSTD_createDStream() and ZSTD_freeDStream() to create/release resources.
+  ZSTD_DStream objects can be re-employed multiple times.
+
+  Use ZSTD_initDStream() to start a new decompression operation.
+ @return : recommended first input size
+  Alternatively, use advanced API to set specific properties.
+
+  Use ZSTD_decompressStream() repetitively to consume your input.
+  The function will update both `pos` fields.
+  If `input.pos < input.size`, some input has not been consumed.
+  It's up to the caller to present again remaining data.
+
+  The function tries to flush all data decoded immediately, respecting output buffer size.
+  If `output.pos < output.size`, decoder has flushed everything it could.
+
+  However, when `output.pos == output.size`, it's more difficult to know.
+  If @return > 0, the frame is not complete, meaning
+  either there is still some data left to flush within internal buffers,
+  or there is more input to read to complete the frame (or both).
+  In which case, call ZSTD_decompressStream() again to flush whatever remains in the buffer.
+  Note : with no additional input provided, amount of data flushed is necessarily <= ZSTD_BLOCKSIZE_MAX.
+ @return : 0 when a frame is completely decoded and fully flushed,
+        or an error code, which can be tested using ZSTD_isError(),
+        or any other value > 0, which means there is still some decoding or flushing to do to complete current frame :
+                                the return value is a suggested next input size (just a hint for better latency)
+                                that will never request more than the remaining content of the compressed frame.
+ 
+
+ +
typedef ZSTD_DCtx ZSTD_DStream;  /**< DCtx and DStream are now effectively same object (>= v1.3.0) */
+

+

ZSTD_DStream management functions

ZSTD_DStream* ZSTD_createDStream(void);
+size_t ZSTD_freeDStream(ZSTD_DStream* zds);  /* accept NULL pointer */
+

+

Streaming decompression functions


+
size_t ZSTD_initDStream(ZSTD_DStream* zds);
+

Initialize/reset DStream state for new decompression operation. + Call before new decompression operation using same DStream. + + Note : This function is redundant with the advanced API and equivalent to: + ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); + ZSTD_DCtx_refDDict(zds, NULL); + +


+ +
size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input);
+

Streaming decompression function. + Call repetitively to consume full input updating it as necessary. + Function will update both input and output `pos` fields exposing current state via these fields: + - `input.pos < input.size`, some input remaining and caller should provide remaining input + on the next call. + - `output.pos < output.size`, decoder flushed internal output buffer. + - `output.pos == output.size`, unflushed data potentially present in the internal buffers, + check ZSTD_decompressStream() @return value, + if > 0, invoke it again to flush remaining data to output. + Note : with no additional input, amount of data flushed <= ZSTD_BLOCKSIZE_MAX. + + @return : 0 when a frame is completely decoded and fully flushed, + or an error code, which can be tested using ZSTD_isError(), + or any other value > 0, which means there is some decoding or flushing to do to complete current frame. + + Note: when an operation returns with an error code, the @zds state may be left in undefined state. + It's UB to invoke `ZSTD_decompressStream()` on such a state. + In order to re-use such a state, it must be first reset, + which can be done explicitly (`ZSTD_DCtx_reset()`), + or is implied for operations starting some new decompression job (`ZSTD_initDStream`, `ZSTD_decompressDCtx()`, `ZSTD_decompress_usingDict()`) + +


+ +
size_t ZSTD_DStreamInSize(void);    /*!< recommended size for input buffer */
+

+
size_t ZSTD_DStreamOutSize(void);   /*!< recommended size for output buffer. Guarantee to successfully flush at least one complete block in all circumstances. */
+

+

Simple dictionary API


+
+
size_t ZSTD_compress_usingDict(ZSTD_CCtx* ctx,
+                               void* dst, size_t dstCapacity,
+                         const void* src, size_t srcSize,
+                         const void* dict,size_t dictSize,
+                               int compressionLevel);
+

Compression at an explicit compression level using a Dictionary. + A dictionary can be any arbitrary data segment (also called a prefix), + or a buffer with specified information (see zdict.h). + Note : This function loads the dictionary, resulting in significant startup delay. + It's intended for a dictionary used only once. + Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used. +


+ +
size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx,
+                                 void* dst, size_t dstCapacity,
+                           const void* src, size_t srcSize,
+                           const void* dict,size_t dictSize);
+

Decompression using a known Dictionary. + Dictionary must be identical to the one used during compression. + Note : This function loads the dictionary, resulting in significant startup delay. + It's intended for a dictionary used only once. + Note : When `dict == NULL || dictSize < 8` no dictionary is used. +


+ +

Bulk processing dictionary API


+
+
ZSTD_CDict* ZSTD_createCDict(const void* dictBuffer, size_t dictSize,
+                             int compressionLevel);
+

When compressing multiple messages or blocks using the same dictionary, + it's recommended to digest the dictionary only once, since it's a costly operation. + ZSTD_createCDict() will create a state from digesting a dictionary. + The resulting state can be used for future compression operations with very limited startup cost. + ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. + @dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict. + Note 1 : Consider experimental function `ZSTD_createCDict_byReference()` if you prefer to not duplicate @dictBuffer content. + Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer, + in which case the only thing that it transports is the @compressionLevel. + This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively, + expecting a ZSTD_CDict parameter with any data, including those without a known dictionary. +


+ +
size_t      ZSTD_freeCDict(ZSTD_CDict* CDict);
+

Function frees memory allocated by ZSTD_createCDict(). + If a NULL pointer is passed, no operation is performed. +


+ +
size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx,
+                                void* dst, size_t dstCapacity,
+                          const void* src, size_t srcSize,
+                          const ZSTD_CDict* cdict);
+

Compression using a digested Dictionary. + Recommended when same dictionary is used multiple times. + Note : compression level is _decided at dictionary creation time_, + and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no) +


+ +
ZSTD_DDict* ZSTD_createDDict(const void* dictBuffer, size_t dictSize);
+

Create a digested dictionary, ready to start decompression operation without startup delay. + dictBuffer can be released after DDict creation, as its content is copied inside DDict. +


+ +
size_t      ZSTD_freeDDict(ZSTD_DDict* ddict);
+

Function frees memory allocated with ZSTD_createDDict() + If a NULL pointer is passed, no operation is performed. +


+ +
size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx,
+                                  void* dst, size_t dstCapacity,
+                            const void* src, size_t srcSize,
+                            const ZSTD_DDict* ddict);
+

Decompression using a digested Dictionary. + Recommended when same dictionary is used multiple times. +


+ +

Dictionary helper functions


+
+
unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize);
+

Provides the dictID stored within dictionary. + if @return == 0, the dictionary is not conformant with Zstandard specification. + It can still be loaded, but as a content-only dictionary. +


+ +
unsigned ZSTD_getDictID_fromCDict(const ZSTD_CDict* cdict);
+

Provides the dictID of the dictionary loaded into `cdict`. + If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. + Non-conformant dictionaries can still be loaded, but as content-only dictionaries. +


+ +
unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict);
+

Provides the dictID of the dictionary loaded into `ddict`. + If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. + Non-conformant dictionaries can still be loaded, but as content-only dictionaries. +


+ +
unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize);
+

Provides the dictID required to decompressed the frame stored within `src`. + If @return == 0, the dictID could not be decoded. + This could for one of the following reasons : + - The frame does not require a dictionary to be decoded (most common case). + - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden piece of information. + Note : this use case also happens when using a non-conformant dictionary. + - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`). + - This is not a Zstandard frame. + When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code. +


+ +

Advanced dictionary and prefix API (Requires v1.4.0+)

+ This API allows dictionaries to be used with ZSTD_compress2(),
+ ZSTD_compressStream2(), and ZSTD_decompressDCtx().
+ Dictionaries are sticky, they remain valid when same context is reused,
+ they only reset when the context is reset
+ with ZSTD_reset_parameters or ZSTD_reset_session_and_parameters.
+ In contrast, Prefixes are single-use.
+
+ +
size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
+

Create an internal CDict from `dict` buffer. + Decompression will have to use same dictionary. + @result : 0, or an error code (which can be tested with ZSTD_isError()). + Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary, + meaning "return to no-dictionary mode". + Note 1 : Dictionary is sticky, it will be used for all future compressed frames, + until parameters are reset, a new dictionary is loaded, or the dictionary + is explicitly invalidated by loading a NULL dictionary. + Note 2 : Loading a dictionary involves building tables. + It's also a CPU consuming operation, with non-negligible impact on latency. + Tables are dependent on compression parameters, and for this reason, + compression parameters can no longer be changed after loading a dictionary. + Note 3 :`dict` content will be copied internally. + Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead. + In such a case, dictionary buffer must outlive its users. + Note 4 : Use ZSTD_CCtx_loadDictionary_advanced() + to precisely select how dictionary content must be interpreted. + Note 5 : This method does not benefit from LDM (long distance mode). + If you want to employ LDM on some large dictionary content, + prefer employing ZSTD_CCtx_refPrefix() described below. + +


+ +
size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict);
+

Reference a prepared dictionary, to be used for all future compressed frames. + Note that compression parameters are enforced from within CDict, + and supersede any compression parameter previously set within CCtx. + The parameters ignored are labelled as "superseded-by-cdict" in the ZSTD_cParameter enum docs. + The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. + The dictionary will remain valid for future compressed frames using same CCtx. + @result : 0, or an error code (which can be tested with ZSTD_isError()). + Special : Referencing a NULL CDict means "return to no-dictionary mode". + Note 1 : Currently, only one dictionary can be managed. + Referencing a new dictionary effectively "discards" any previous one. + Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx. +


+ +
size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx,
+                     const void* prefix, size_t prefixSize);
+

Reference a prefix (single-usage dictionary) for next compressed frame. + A prefix is **only used once**. Tables are discarded at end of frame (ZSTD_e_end). + Decompression will need same prefix to properly regenerate data. + Compressing with a prefix is similar in outcome as performing a diff and compressing it, + but performs much faster, especially during decompression (compression speed is tunable with compression level). + This method is compatible with LDM (long distance mode). + @result : 0, or an error code (which can be tested with ZSTD_isError()). + Special: Adding any prefix (including NULL) invalidates any previous prefix or dictionary + Note 1 : Prefix buffer is referenced. It **must** outlive compression. + Its content must remain unmodified during compression. + Note 2 : If the intention is to diff some large src data blob with some prior version of itself, + ensure that the window size is large enough to contain the entire source. + See ZSTD_c_windowLog. + Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters. + It's a CPU consuming operation, with non-negligible impact on latency. + If there is a need to use the same prefix multiple times, consider loadDictionary instead. + Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dct_rawContent). + Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation. +


+ +
size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
+

Create an internal DDict from dict buffer, to be used to decompress all future frames. + The dictionary remains valid for all future frames, until explicitly invalidated, or + a new dictionary is loaded. + @result : 0, or an error code (which can be tested with ZSTD_isError()). + Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary, + meaning "return to no-dictionary mode". + Note 1 : Loading a dictionary involves building tables, + which has a non-negligible impact on CPU usage and latency. + It's recommended to "load once, use many times", to amortize the cost + Note 2 :`dict` content will be copied internally, so `dict` can be released after loading. + Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead. + Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of + how dictionary content is loaded and interpreted. + +


+ +
size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict);
+

Reference a prepared dictionary, to be used to decompress next frames. + The dictionary remains active for decompression of future frames using same DCtx. + + If called with ZSTD_d_refMultipleDDicts enabled, repeated calls of this function + will store the DDict references in a table, and the DDict used for decompression + will be determined at decompression time, as per the dict ID in the frame. + The memory for the table is allocated on the first call to refDDict, and can be + freed with ZSTD_freeDCtx(). + + If called with ZSTD_d_refMultipleDDicts disabled (the default), only one dictionary + will be managed, and referencing a dictionary effectively "discards" any previous one. + + @result : 0, or an error code (which can be tested with ZSTD_isError()). + Special: referencing a NULL DDict means "return to no-dictionary mode". + Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx. + +


+ +
size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx,
+                     const void* prefix, size_t prefixSize);
+

Reference a prefix (single-usage dictionary) to decompress next frame. + This is the reverse operation of ZSTD_CCtx_refPrefix(), + and must use the same prefix as the one used during compression. + Prefix is **only used once**. Reference is discarded at end of frame. + End of frame is reached when ZSTD_decompressStream() returns 0. + @result : 0, or an error code (which can be tested with ZSTD_isError()). + Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary + Note 2 : Prefix buffer is referenced. It **must** outlive decompression. + Prefix buffer must remain unmodified up to the end of frame, + reached when ZSTD_decompressStream() returns 0. + Note 3 : By default, the prefix is treated as raw content (ZSTD_dct_rawContent). + Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section) + Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost. + A full dictionary is more costly, as it requires building tables. + +


+ +
size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx);
+size_t ZSTD_sizeof_DCtx(const ZSTD_DCtx* dctx);
+size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs);
+size_t ZSTD_sizeof_DStream(const ZSTD_DStream* zds);
+size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict);
+size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
+

These functions give the _current_ memory usage of selected object. + Note that object memory usage can evolve (increase or decrease) over time. +


+ +

experimental API (static linking only)

+ The following symbols and constants
+ are not planned to join "stable API" status in the near future.
+ They can still change in future versions.
+ Some of them are planned to remain in the static_only section indefinitely.
+ Some of them might be removed in the future (especially when redundant with existing stable functions)
+ 
+
+ +
typedef struct {
+    unsigned int offset;      /* The offset of the match. (NOT the same as the offset code)
+                               * If offset == 0 and matchLength == 0, this sequence represents the last
+                               * literals in the block of litLength size.
+                               */
+
+    unsigned int litLength;   /* Literal length of the sequence. */
+    unsigned int matchLength; /* Match length of the sequence. */
+
+                              /* Note: Users of this API may provide a sequence with matchLength == litLength == offset == 0.
+                               * In this case, we will treat the sequence as a marker for a block boundary.
+                               */
+
+    unsigned int rep;         /* Represents which repeat offset is represented by the field 'offset'.
+                               * Ranges from [0, 3].
+                               *
+                               * Repeat offsets are essentially previous offsets from previous sequences sorted in
+                               * recency order. For more detail, see doc/zstd_compression_format.md
+                               *
+                               * If rep == 0, then 'offset' does not contain a repeat offset.
+                               * If rep > 0:
+                               *  If litLength != 0:
+                               *      rep == 1 --> offset == repeat_offset_1
+                               *      rep == 2 --> offset == repeat_offset_2
+                               *      rep == 3 --> offset == repeat_offset_3
+                               *  If litLength == 0:
+                               *      rep == 1 --> offset == repeat_offset_2
+                               *      rep == 2 --> offset == repeat_offset_3
+                               *      rep == 3 --> offset == repeat_offset_1 - 1
+                               *
+                               * Note: This field is optional. ZSTD_generateSequences() will calculate the value of
+                               * 'rep', but repeat offsets do not necessarily need to be calculated from an external
+                               * sequence provider perspective. For example, ZSTD_compressSequences() does not
+                               * use this 'rep' field at all (as of now).
+                               */
+} ZSTD_Sequence;
+

+
typedef struct {
+    unsigned windowLog;       /**< largest match distance : larger == more compression, more memory needed during decompression */
+    unsigned chainLog;        /**< fully searched segment : larger == more compression, slower, more memory (useless for fast) */
+    unsigned hashLog;         /**< dispatch table : larger == faster, more memory */
+    unsigned searchLog;       /**< nb of searches : larger == more compression, slower */
+    unsigned minMatch;        /**< match length searched : larger == faster decompression, sometimes less compression */
+    unsigned targetLength;    /**< acceptable match size for optimal parser (only) : larger == more compression, slower */
+    ZSTD_strategy strategy;   /**< see ZSTD_strategy definition above */
+} ZSTD_compressionParameters;
+

+
typedef struct {
+    int contentSizeFlag; /**< 1: content size will be in frame header (when known) */
+    int checksumFlag;    /**< 1: generate a 32-bits checksum using XXH64 algorithm at end of frame, for error detection */
+    int noDictIDFlag;    /**< 1: no dictID will be saved into frame header (dictID is only useful for dictionary compression) */
+} ZSTD_frameParameters;
+

+
typedef struct {
+    ZSTD_compressionParameters cParams;
+    ZSTD_frameParameters fParams;
+} ZSTD_parameters;
+

+
typedef enum {
+    ZSTD_dct_auto = 0,       /* dictionary is "full" when starting with ZSTD_MAGIC_DICTIONARY, otherwise it is "rawContent" */
+    ZSTD_dct_rawContent = 1, /* ensures dictionary is always loaded as rawContent, even if it starts with ZSTD_MAGIC_DICTIONARY */
+    ZSTD_dct_fullDict = 2    /* refuses to load a dictionary if it does not respect Zstandard's specification, starting with ZSTD_MAGIC_DICTIONARY */
+} ZSTD_dictContentType_e;
+

+
typedef enum {
+    ZSTD_dlm_byCopy = 0,  /**< Copy dictionary content internally */
+    ZSTD_dlm_byRef = 1    /**< Reference dictionary content -- the dictionary buffer must outlive its users. */
+} ZSTD_dictLoadMethod_e;
+

+
typedef enum {
+    ZSTD_f_zstd1 = 0,           /* zstd frame format, specified in zstd_compression_format.md (default) */
+    ZSTD_f_zstd1_magicless = 1  /* Variant of zstd frame format, without initial 4-bytes magic number.
+                                 * Useful to save 4 bytes per generated frame.
+                                 * Decoder cannot recognise automatically this format, requiring this instruction. */
+} ZSTD_format_e;
+

+
typedef enum {
+    /* Note: this enum controls ZSTD_d_forceIgnoreChecksum */
+    ZSTD_d_validateChecksum = 0,
+    ZSTD_d_ignoreChecksum = 1
+} ZSTD_forceIgnoreChecksum_e;
+

+
typedef enum {
+    /* Note: this enum controls ZSTD_d_refMultipleDDicts */
+    ZSTD_rmd_refSingleDDict = 0,
+    ZSTD_rmd_refMultipleDDicts = 1
+} ZSTD_refMultipleDDicts_e;
+

+
typedef enum {
+    /* Note: this enum and the behavior it controls are effectively internal
+     * implementation details of the compressor. They are expected to continue
+     * to evolve and should be considered only in the context of extremely
+     * advanced performance tuning.
+     *
+     * Zstd currently supports the use of a CDict in three ways:
+     *
+     * - The contents of the CDict can be copied into the working context. This
+     *   means that the compression can search both the dictionary and input
+     *   while operating on a single set of internal tables. This makes
+     *   the compression faster per-byte of input. However, the initial copy of
+     *   the CDict's tables incurs a fixed cost at the beginning of the
+     *   compression. For small compressions (< 8 KB), that copy can dominate
+     *   the cost of the compression.
+     *
+     * - The CDict's tables can be used in-place. In this model, compression is
+     *   slower per input byte, because the compressor has to search two sets of
+     *   tables. However, this model incurs no start-up cost (as long as the
+     *   working context's tables can be reused). For small inputs, this can be
+     *   faster than copying the CDict's tables.
+     *
+     * - The CDict's tables are not used at all, and instead we use the working
+     *   context alone to reload the dictionary and use params based on the source
+     *   size. See ZSTD_compress_insertDictionary() and ZSTD_compress_usingDict().
+     *   This method is effective when the dictionary sizes are very small relative
+     *   to the input size, and the input size is fairly large to begin with.
+     *
+     * Zstd has a simple internal heuristic that selects which strategy to use
+     * at the beginning of a compression. However, if experimentation shows that
+     * Zstd is making poor choices, it is possible to override that choice with
+     * this enum.
+     */
+    ZSTD_dictDefaultAttach = 0, /* Use the default heuristic. */
+    ZSTD_dictForceAttach   = 1, /* Never copy the dictionary. */
+    ZSTD_dictForceCopy     = 2, /* Always copy the dictionary. */
+    ZSTD_dictForceLoad     = 3  /* Always reload the dictionary */
+} ZSTD_dictAttachPref_e;
+

+
typedef enum {
+  ZSTD_lcm_auto = 0,          /**< Automatically determine the compression mode based on the compression level.
+                               *   Negative compression levels will be uncompressed, and positive compression
+                               *   levels will be compressed. */
+  ZSTD_lcm_huffman = 1,       /**< Always attempt Huffman compression. Uncompressed literals will still be
+                               *   emitted if Huffman compression is not profitable. */
+  ZSTD_lcm_uncompressed = 2   /**< Always emit uncompressed literals. */
+} ZSTD_literalCompressionMode_e;
+

+
typedef enum {
+  /* Note: This enum controls features which are conditionally beneficial.
+   * Zstd can take a decision on whether or not to enable the feature (ZSTD_ps_auto),
+   * but setting the switch to ZSTD_ps_enable or ZSTD_ps_disable force enable/disable the feature.
+   */
+  ZSTD_ps_auto = 0,         /* Let the library automatically determine whether the feature shall be enabled */
+  ZSTD_ps_enable = 1,       /* Force-enable the feature */
+  ZSTD_ps_disable = 2       /* Do not use the feature */
+} ZSTD_ParamSwitch_e;
+

+

Frame header and size functions


+
+
ZSTDLIB_STATIC_API unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize);
+

`src` should point to the start of a series of ZSTD encoded and/or skippable frames + `srcSize` must be the _exact_ size of this series + (i.e. there should be a frame boundary at `src + srcSize`) + @return : - decompressed size of all data in all successive frames + - if the decompressed size cannot be determined: ZSTD_CONTENTSIZE_UNKNOWN + - if an error occurred: ZSTD_CONTENTSIZE_ERROR + + note 1 : decompressed size is an optional field, that may not be present, especially in streaming mode. + When `return==ZSTD_CONTENTSIZE_UNKNOWN`, data to decompress could be any size. + In which case, it's necessary to use streaming mode to decompress data. + note 2 : decompressed size is always present when compression is done with ZSTD_compress() + note 3 : decompressed size can be very large (64-bits value), + potentially larger than what local system can handle as a single memory segment. + In which case, it's necessary to use streaming mode to decompress data. + note 4 : If source is untrusted, decompressed size could be wrong or intentionally modified. + Always ensure result fits within application's authorized limits. + Each application can set its own limits. + note 5 : ZSTD_findDecompressedSize handles multiple frames, and so it must traverse the input to + read each contained frame header. This is fast as most of the data is skipped, + however it does mean that all frame data must be present and valid. +


+ +
ZSTDLIB_STATIC_API unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize);
+

`src` should point to the start of a series of ZSTD encoded and/or skippable frames + `srcSize` must be the _exact_ size of this series + (i.e. there should be a frame boundary at `src + srcSize`) + @return : - upper-bound for the decompressed size of all data in all successive frames + - if an error occurred: ZSTD_CONTENTSIZE_ERROR + + note 1 : an error can occur if `src` contains an invalid or incorrectly formatted frame. + note 2 : the upper-bound is exact when the decompressed size field is available in every ZSTD encoded frame of `src`. + in this case, `ZSTD_findDecompressedSize` and `ZSTD_decompressBound` return the same value. + note 3 : when the decompressed size field isn't available, the upper-bound for that frame is calculated by: + upper-bound = # blocks * min(128 KB, Window_Size) + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize);
+

srcSize must be >= ZSTD_FRAMEHEADERSIZE_PREFIX. + @return : size of the Frame Header, + or an error code (if srcSize is too small) +


+ +
typedef enum { ZSTD_frame, ZSTD_skippableFrame } ZSTD_FrameType_e;
+

+
typedef struct {
+    unsigned long long frameContentSize; /* if == ZSTD_CONTENTSIZE_UNKNOWN, it means this field is not available. 0 means "empty" */
+    unsigned long long windowSize;       /* can be very large, up to <= frameContentSize */
+    unsigned blockSizeMax;
+    ZSTD_FrameType_e frameType;          /* if == ZSTD_skippableFrame, frameContentSize is the size of skippable content */
+    unsigned headerSize;
+    unsigned dictID;
+    unsigned checksumFlag;
+    unsigned _reserved1;
+    unsigned _reserved2;
+} ZSTD_frameHeader;
+

+
ZSTDLIB_STATIC_API size_t ZSTD_getFrameHeader(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize);   /**< doesn't consume input */
+/*! ZSTD_getFrameHeader_advanced() :
+ *  same as ZSTD_getFrameHeader(),
+ *  with added capability to select a format (like ZSTD_f_zstd1_magicless) */
+ZSTDLIB_STATIC_API size_t ZSTD_getFrameHeader_advanced(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD_format_e format);
+

decode Frame Header, or requires larger `srcSize`. + @return : 0, `zfhPtr` is correctly filled, + >0, `srcSize` is too small, value is wanted `srcSize` amount, + or an error code, which can be tested using ZSTD_isError() +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_decompressionMargin(const void* src, size_t srcSize);
+

Zstd supports in-place decompression, where the input and output buffers overlap. + In this case, the output buffer must be at least (Margin + Output_Size) bytes large, + and the input buffer must be at the end of the output buffer. + + _______________________ Output Buffer ________________________ + | | + | ____ Input Buffer ____| + | | | + v v v + |---------------------------------------|-----------|----------| + ^ ^ ^ + |___________________ Output_Size ___________________|_ Margin _| + + NOTE: See also ZSTD_DECOMPRESSION_MARGIN(). + NOTE: This applies only to single-pass decompression through ZSTD_decompress() or + ZSTD_decompressDCtx(). + NOTE: This function supports multi-frame input. + + @param src The compressed frame(s) + @param srcSize The size of the compressed frame(s) + @returns The decompression margin or an error that can be checked with ZSTD_isError(). + +


+ +
#define ZSTD_DECOMPRESSION_MARGIN(originalSize, blockSize) ((size_t)(                                              \
+        ZSTD_FRAMEHEADERSIZE_MAX                                                              /* Frame header */ + \
+        4                                                                                         /* checksum */ + \
+        ((originalSize) == 0 ? 0 : 3 * (((originalSize) + (blockSize) - 1) / blockSize)) /* 3 bytes per block */ + \
+        (blockSize)                                                                    /* One block of margin */   \
+    ))
+

Similar to ZSTD_decompressionMargin(), but instead of computing the margin from + the compressed frame, compute it from the original size and the blockSizeLog. + See ZSTD_decompressionMargin() for details. + + WARNING: This macro does not support multi-frame input, the input must be a single + zstd frame. If you need that support use the function, or implement it yourself. + + @param originalSize The original uncompressed size of the data. + @param blockSize The block size == MIN(windowSize, ZSTD_BLOCKSIZE_MAX). + Unless you explicitly set the windowLog smaller than + ZSTD_BLOCKSIZELOG_MAX you can just use ZSTD_BLOCKSIZE_MAX. + +


+ +
typedef enum {
+  ZSTD_sf_noBlockDelimiters = 0,         /* ZSTD_Sequence[] has no block delimiters, just sequences */
+  ZSTD_sf_explicitBlockDelimiters = 1    /* ZSTD_Sequence[] contains explicit block delimiters */
+} ZSTD_SequenceFormat_e;
+

+
ZSTDLIB_STATIC_API size_t ZSTD_sequenceBound(size_t srcSize);
+

`srcSize` : size of the input buffer + @return : upper-bound for the number of sequences that can be generated + from a buffer of srcSize bytes + + note : returns number of sequences - to get bytes, multiply by sizeof(ZSTD_Sequence). + +


+ +
ZSTD_DEPRECATED("For debugging only, will be replaced by ZSTD_extractSequences()")
+ZSTDLIB_STATIC_API size_t
+ZSTD_generateSequences(ZSTD_CCtx* zc,
+           ZSTD_Sequence* outSeqs, size_t outSeqsCapacity,
+           const void* src, size_t srcSize);
+

WARNING: This function is meant for debugging and informational purposes ONLY! + Its implementation is flawed, and it will be deleted in a future version. + It is not guaranteed to succeed, as there are several cases where it will give + up and fail. You should NOT use this function in production code. + + This function is deprecated, and will be removed in a future version. + + Generate sequences using ZSTD_compress2(), given a source buffer. + + @param zc The compression context to be used for ZSTD_compress2(). Set any + compression parameters you need on this context. + @param outSeqs The output sequences buffer of size @p outSeqsSize + @param outSeqsCapacity The size of the output sequences buffer. + ZSTD_sequenceBound(srcSize) is an upper bound on the number + of sequences that can be generated. + @param src The source buffer to generate sequences from of size @p srcSize. + @param srcSize The size of the source buffer. + + Each block will end with a dummy sequence + with offset == 0, matchLength == 0, and litLength == length of last literals. + litLength may be == 0, and if so, then the sequence of (of: 0 ml: 0 ll: 0) + simply acts as a block delimiter. + + @returns The number of sequences generated, necessarily less than + ZSTD_sequenceBound(srcSize), or an error code that can be checked + with ZSTD_isError(). + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSize);
+

Given an array of ZSTD_Sequence, remove all sequences that represent block delimiters/last literals + by merging them into the literals of the next sequence. + + As such, the final generated result has no explicit representation of block boundaries, + and the final last literals segment is not represented in the sequences. + + The output of this function can be fed into ZSTD_compressSequences() with CCtx + setting of ZSTD_c_blockDelimiters as ZSTD_sf_noBlockDelimiters + @return : number of sequences left after merging + +


+ +
ZSTDLIB_STATIC_API size_t
+ZSTD_compressSequences(ZSTD_CCtx* cctx,
+           void* dst, size_t dstCapacity,
+     const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
+     const void* src, size_t srcSize);
+

Compress an array of ZSTD_Sequence, associated with @src buffer, into dst. + @src contains the entire input (not just the literals). + If @srcSize > sum(sequence.length), the remaining bytes are considered all literals + If a dictionary is included, then the cctx should reference the dict (see: ZSTD_CCtx_refCDict(), ZSTD_CCtx_loadDictionary(), etc.). + The entire source is compressed into a single frame. + + The compression behavior changes based on cctx params. In particular: + If ZSTD_c_blockDelimiters == ZSTD_sf_noBlockDelimiters, the array of ZSTD_Sequence is expected to contain + no block delimiters (defined in ZSTD_Sequence). Block boundaries are roughly determined based on + the block size derived from the cctx, and sequences may be split. This is the default setting. + + If ZSTD_c_blockDelimiters == ZSTD_sf_explicitBlockDelimiters, the array of ZSTD_Sequence is expected to contain + valid block delimiters (defined in ZSTD_Sequence). Behavior is undefined if no block delimiters are provided. + + When ZSTD_c_blockDelimiters == ZSTD_sf_explicitBlockDelimiters, it's possible to decide generating repcodes + using the advanced parameter ZSTD_c_repcodeResolution. Repcodes will improve compression ratio, though the benefit + can vary greatly depending on Sequences. On the other hand, repcode resolution is an expensive operation. + By default, it's disabled at low (<10) compression levels, and enabled above the threshold (>=10). + ZSTD_c_repcodeResolution makes it possible to directly manage this processing in either direction. + + If ZSTD_c_validateSequences == 0, this function blindly accepts the Sequences provided. Invalid Sequences cause undefined + behavior. If ZSTD_c_validateSequences == 1, then the function will detect invalid Sequences (see doc/zstd_compression_format.md for + specifics regarding offset/matchlength requirements) and then bail out and return an error. + + In addition to the two adjustable experimental params, there are other important cctx params. + - ZSTD_c_minMatch MUST be set as less than or equal to the smallest match generated by the match finder. It has a minimum value of ZSTD_MINMATCH_MIN. + - ZSTD_c_compressionLevel accordingly adjusts the strength of the entropy coder, as it would in typical compression. + - ZSTD_c_windowLog affects offset validation: this function will return an error at higher debug levels if a provided offset + is larger than what the spec allows for a given window log and dictionary (if present). See: doc/zstd_compression_format.md + + Note: Repcodes are, as of now, always re-calculated within this function, ZSTD_Sequence.rep is effectively unused. + Dev Note: Once ability to ingest repcodes become available, the explicit block delims mode must respect those repcodes exactly, + and cannot emit an RLE block that disagrees with the repcode history. + @return : final compressed size, or a ZSTD error code. + +


+ +
ZSTDLIB_STATIC_API size_t
+ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx,
+                      void* dst, size_t dstCapacity,
+                const ZSTD_Sequence* inSeqs, size_t nbSequences,
+                const void* literals, size_t litSize, size_t litCapacity,
+                size_t decompressedSize);
+

This is a variant of ZSTD_compressSequences() which, + instead of receiving (src,srcSize) as input parameter, receives (literals,litSize), + aka all the literals, already extracted and laid out into a single continuous buffer. + This can be useful if the process generating the sequences also happens to generate the buffer of literals, + thus skipping an extraction + caching stage. + It's a speed optimization, useful when the right conditions are met, + but it also features the following limitations: + - Only supports explicit delimiter mode + - Currently does not support Sequences validation (so input Sequences are trusted) + - Not compatible with frame checksum, which must be disabled + - If any block is incompressible, will fail and return an error + - @litSize must be == sum of all @.litLength fields in @inSeqs. Any discrepancy will generate an error. + - the buffer @literals must have a size @litCapacity which is larger than @litSize by at least 8 bytes. + - @decompressedSize must be correct, and correspond to the sum of all Sequences. Any discrepancy will generate an error. + @return : final compressed size, or a ZSTD error code. + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_writeSkippableFrame(void* dst, size_t dstCapacity,
+                                const void* src, size_t srcSize, unsigned magicVariant);
+

Generates a zstd skippable frame containing data given by src, and writes it to dst buffer. + + Skippable frames begin with a 4-byte magic number. There are 16 possible choices of magic number, + ranging from ZSTD_MAGIC_SKIPPABLE_START to ZSTD_MAGIC_SKIPPABLE_START+15. + As such, the parameter magicVariant controls the exact skippable frame magic number variant used, so + the magic number used will be ZSTD_MAGIC_SKIPPABLE_START + magicVariant. + + Returns an error if destination buffer is not large enough, if the source size is not representable + with a 4-byte unsigned int, or if the parameter magicVariant is greater than 15 (and therefore invalid). + + @return : number of bytes written or a ZSTD error. + +


+ +
size_t ZSTD_readSkippableFrame(void* dst, size_t dstCapacity, unsigned* magicVariant,
+                                const void* src, size_t srcSize);
+

Retrieves a zstd skippable frame containing data given by src, and writes it to dst buffer. + + The parameter magicVariant will receive the magicVariant that was supplied when the frame was written, + i.e. magicNumber - ZSTD_MAGIC_SKIPPABLE_START. This can be NULL if the caller is not interested + in the magicVariant. + + Returns an error if destination buffer is not large enough, or if the frame is not skippable. + + @return : number of bytes written or a ZSTD error. + +


+ +
unsigned ZSTD_isSkippableFrame(const void* buffer, size_t size);
+

Tells if the content of `buffer` starts with a valid Frame Identifier for a skippable frame. + +


+ +

Memory management


+
+
ZSTDLIB_STATIC_API size_t ZSTD_estimateCCtxSize(int maxCompressionLevel);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateDCtxSize(void);
+

These functions make it possible to estimate memory usage + of a future {D,C}Ctx, before its creation. + This is useful in combination with ZSTD_initStatic(), + which makes it possible to employ a static buffer for ZSTD_CCtx* state. + + ZSTD_estimateCCtxSize() will provide a memory budget large enough + to compress data of any size using one-shot compression ZSTD_compressCCtx() or ZSTD_compress2() + associated with any compression level up to max specified one. + The estimate will assume the input may be arbitrarily large, + which is the worst case. + + Note that the size estimation is specific for one-shot compression, + it is not valid for streaming (see ZSTD_estimateCStreamSize*()) + nor other potential ways of using a ZSTD_CCtx* state. + + When srcSize can be bound by a known and rather "small" value, + this knowledge can be used to provide a tighter budget estimation + because the ZSTD_CCtx* state will need less memory for small inputs. + This tighter estimation can be provided by employing more advanced functions + ZSTD_estimateCCtxSize_usingCParams(), which can be used in tandem with ZSTD_getCParams(), + and ZSTD_estimateCCtxSize_usingCCtxParams(), which can be used in tandem with ZSTD_CCtxParams_setParameter(). + Both can be used to estimate memory using custom compression parameters and arbitrary srcSize limits. + + Note : only single-threaded compression is supported. + ZSTD_estimateCCtxSize_usingCCtxParams() will return an error code if ZSTD_c_nbWorkers is >= 1. + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_estimateCStreamSize(int maxCompressionLevel);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* params);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateDStreamSize(size_t maxWindowSize);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize);
+

ZSTD_estimateCStreamSize() will provide a memory budget large enough for streaming compression + using any compression level up to the max specified one. + It will also consider src size to be arbitrarily "large", which is a worst case scenario. + If srcSize is known to always be small, ZSTD_estimateCStreamSize_usingCParams() can provide a tighter estimation. + ZSTD_estimateCStreamSize_usingCParams() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel. + ZSTD_estimateCStreamSize_usingCCtxParams() can be used in tandem with ZSTD_CCtxParams_setParameter(). Only single-threaded compression is supported. This function will return an error code if ZSTD_c_nbWorkers is >= 1. + Note : CStream size estimation is only correct for single-threaded compression. + ZSTD_estimateCStreamSize_usingCCtxParams() will return an error code if ZSTD_c_nbWorkers is >= 1. + Note 2 : ZSTD_estimateCStreamSize* functions are not compatible with the Block-Level Sequence Producer API at this time. + Size estimates assume that no external sequence producer is registered. + + ZSTD_DStream memory budget depends on frame's window Size. + This information can be passed manually, using ZSTD_estimateDStreamSize, + or deducted from a valid frame Header, using ZSTD_estimateDStreamSize_fromFrame(); + Any frame requesting a window size larger than max specified one will be rejected. + Note : if streaming is init with function ZSTD_init?Stream_usingDict(), + an internal ?Dict will be created, which additional size is not estimated here. + In this case, get total size by adding ZSTD_estimate?DictSize + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateCDictSize_advanced(size_t dictSize, ZSTD_compressionParameters cParams, ZSTD_dictLoadMethod_e dictLoadMethod);
+ZSTDLIB_STATIC_API size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod);
+

ZSTD_estimateCDictSize() will bet that src size is relatively "small", and content is copied, like ZSTD_createCDict(). + ZSTD_estimateCDictSize_advanced() makes it possible to control compression parameters precisely, like ZSTD_createCDict_advanced(). + Note : dictionaries created by reference (`ZSTD_dlm_byRef`) are logically smaller. + +


+ +
ZSTDLIB_STATIC_API ZSTD_CCtx*    ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize);
+ZSTDLIB_STATIC_API ZSTD_CStream* ZSTD_initStaticCStream(void* workspace, size_t workspaceSize);    /**< same as ZSTD_initStaticCCtx() */
+

Initialize an object using a pre-allocated fixed-size buffer. + workspace: The memory area to emplace the object into. + Provided pointer *must be 8-bytes aligned*. + Buffer must outlive object. + workspaceSize: Use ZSTD_estimate*Size() to determine + how large workspace must be to support target scenario. + @return : pointer to object (same address as workspace, just different type), + or NULL if error (size too small, incorrect alignment, etc.) + Note : zstd will never resize nor malloc() when using a static buffer. + If the object requires more memory than available, + zstd will just error out (typically ZSTD_error_memory_allocation). + Note 2 : there is no corresponding "free" function. + Since workspace is allocated externally, it must be freed externally too. + Note 3 : cParams : use ZSTD_getCParams() to convert a compression level + into its associated cParams. + Limitation 1 : currently not compatible with internal dictionary creation, triggered by + ZSTD_CCtx_loadDictionary(), ZSTD_initCStream_usingDict() or ZSTD_initDStream_usingDict(). + Limitation 2 : static cctx currently not compatible with multi-threading. + Limitation 3 : static dctx is incompatible with legacy support. + +


+ +
ZSTDLIB_STATIC_API ZSTD_DStream* ZSTD_initStaticDStream(void* workspace, size_t workspaceSize);    /**< same as ZSTD_initStaticDCtx() */
+

+
typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
+typedef void  (*ZSTD_freeFunction) (void* opaque, void* address);
+typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree; void* opaque; } ZSTD_customMem;
+static
+#ifdef __GNUC__
+__attribute__((__unused__))
+#endif
+

These prototypes make it possible to pass your own allocation/free functions. + ZSTD_customMem is provided at creation time, using ZSTD_create*_advanced() variants listed below. + All allocation/free operations will be completed using these custom variants instead of regular ones. + +


+ +
ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL };  /**< this constant defers to stdlib's functions */
+

+
typedef struct POOL_ctx_s ZSTD_threadPool;
+ZSTDLIB_STATIC_API ZSTD_threadPool* ZSTD_createThreadPool(size_t numThreads);
+ZSTDLIB_STATIC_API void ZSTD_freeThreadPool (ZSTD_threadPool* pool);  /* accept NULL pointer */
+ZSTDLIB_STATIC_API size_t ZSTD_CCtx_refThreadPool(ZSTD_CCtx* cctx, ZSTD_threadPool* pool);
+

These prototypes make it possible to share a thread pool among multiple compression contexts. + This can limit resources for applications with multiple threads where each one uses + a threaded compression mode (via ZSTD_c_nbWorkers parameter). + ZSTD_createThreadPool creates a new thread pool with a given number of threads. + Note that the lifetime of such pool must exist while being used. + ZSTD_CCtx_refThreadPool assigns a thread pool to a context (use NULL argument value + to use an internal thread pool). + ZSTD_freeThreadPool frees a thread pool, accepts NULL pointer. + +


+ +

Advanced compression functions


+
+
ZSTDLIB_STATIC_API ZSTD_CDict* ZSTD_createCDict_byReference(const void* dictBuffer, size_t dictSize, int compressionLevel);
+

Create a digested dictionary for compression + Dictionary content is just referenced, not duplicated. + As a consequence, `dictBuffer` **must** outlive CDict, + and its content must remain unmodified throughout the lifetime of CDict. + note: equivalent to ZSTD_createCDict_advanced(), with dictLoadMethod==ZSTD_dlm_byRef +


+ +
ZSTDLIB_STATIC_API ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long estimatedSrcSize, size_t dictSize);
+

@return ZSTD_compressionParameters structure for a selected compression level and estimated srcSize. + `estimatedSrcSize` value is optional, select 0 if not known +


+ +
ZSTDLIB_STATIC_API ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long estimatedSrcSize, size_t dictSize);
+

same as ZSTD_getCParams(), but @return a full `ZSTD_parameters` object instead of sub-component `ZSTD_compressionParameters`. + All fields of `ZSTD_frameParameters` are set to default : contentSize=1, checksum=0, noDictID=0 +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_checkCParams(ZSTD_compressionParameters params);
+

Ensure param values remain within authorized range. + @return 0 on success, or an error code (can be checked with ZSTD_isError()) +


+ +
ZSTDLIB_STATIC_API ZSTD_compressionParameters ZSTD_adjustCParams(ZSTD_compressionParameters cPar, unsigned long long srcSize, size_t dictSize);
+

optimize params for a given `srcSize` and `dictSize`. + `srcSize` can be unknown, in which case use ZSTD_CONTENTSIZE_UNKNOWN. + `dictSize` must be `0` when there is no dictionary. + cPar can be invalid : all parameters will be clamped within valid range in the @return struct. + This function never fails (wide contract) +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setCParams(ZSTD_CCtx* cctx, ZSTD_compressionParameters cparams);
+

Set all parameters provided within @p cparams into the working @p cctx. + Note : if modifying parameters during compression (MT mode only), + note that changes to the .windowLog parameter will be ignored. + @return 0 on success, or an error code (can be checked with ZSTD_isError()). + On failure, no parameters are updated. + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setFParams(ZSTD_CCtx* cctx, ZSTD_frameParameters fparams);
+

Set all parameters provided within @p fparams into the working @p cctx. + @return 0 on success, or an error code (can be checked with ZSTD_isError()). + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setParams(ZSTD_CCtx* cctx, ZSTD_parameters params);
+

Set all parameters provided within @p params into the working @p cctx. + @return 0 on success, or an error code (can be checked with ZSTD_isError()). + +


+ +
ZSTD_DEPRECATED("use ZSTD_compress2")
+ZSTDLIB_STATIC_API
+size_t ZSTD_compress_advanced(ZSTD_CCtx* cctx,
+                  void* dst, size_t dstCapacity,
+            const void* src, size_t srcSize,
+            const void* dict,size_t dictSize,
+                  ZSTD_parameters params);
+

Note : this function is now DEPRECATED. + It can be replaced by ZSTD_compress2(), in combination with ZSTD_CCtx_setParameter() and other parameter setters. + This prototype will generate compilation warnings. +


+ +
ZSTD_DEPRECATED("use ZSTD_compress2 with ZSTD_CCtx_loadDictionary")
+ZSTDLIB_STATIC_API
+size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx,
+                                  void* dst, size_t dstCapacity,
+                            const void* src, size_t srcSize,
+                            const ZSTD_CDict* cdict,
+                                  ZSTD_frameParameters fParams);
+

Note : this function is now DEPRECATED. + It can be replaced by ZSTD_compress2(), in combination with ZSTD_CCtx_loadDictionary() and other parameter setters. + This prototype will generate compilation warnings. +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_loadDictionary_byReference(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
+

Same as ZSTD_CCtx_loadDictionary(), but dictionary content is referenced, instead of being copied into CCtx. + It saves some memory, but also requires that `dict` outlives its usage within `cctx` +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_loadDictionary_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType);
+

Same as ZSTD_CCtx_loadDictionary(), but gives finer control over + how to load the dictionary (by copy ? by reference ?) + and how to interpret it (automatic ? force raw mode ? full mode only ?) +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType);
+

Same as ZSTD_CCtx_refPrefix(), but gives finer control over + how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?) +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_getParameter(const ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value);
+

Get the requested compression parameter value, selected by enum ZSTD_cParameter, + and store it into int* value. + @return : 0, or an error code (which can be tested with ZSTD_isError()). + +


+ +
ZSTDLIB_STATIC_API ZSTD_CCtx_params* ZSTD_createCCtxParams(void);
+ZSTDLIB_STATIC_API size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params);  /* accept NULL pointer */
+

Quick howto : + - ZSTD_createCCtxParams() : Create a ZSTD_CCtx_params structure + - ZSTD_CCtxParams_setParameter() : Push parameters one by one into + an existing ZSTD_CCtx_params structure. + This is similar to + ZSTD_CCtx_setParameter(). + - ZSTD_CCtx_setParametersUsingCCtxParams() : Apply parameters to + an existing CCtx. + These parameters will be applied to + all subsequent frames. + - ZSTD_compressStream2() : Do compression using the CCtx. + - ZSTD_freeCCtxParams() : Free the memory, accept NULL pointer. + + This can be used with ZSTD_estimateCCtxSize_advanced_usingCCtxParams() + for static allocation of CCtx for single-threaded compression. + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params* params);
+

Reset params to default values. + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressionLevel);
+

Initializes the compression parameters of cctxParams according to + compression level. All other parameters are reset to their default values. + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params);
+

Initializes the compression and frame parameters of cctxParams according to + params. All other parameters are reset to their default values. + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* params, ZSTD_cParameter param, int value);
+

Similar to ZSTD_CCtx_setParameter. + Set one compression parameter, selected by enum ZSTD_cParameter. + Parameters must be applied to a ZSTD_CCtx using + ZSTD_CCtx_setParametersUsingCCtxParams(). + @result : a code representing success or failure (which can be tested with + ZSTD_isError()). + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtxParams_getParameter(const ZSTD_CCtx_params* params, ZSTD_cParameter param, int* value);
+

Similar to ZSTD_CCtx_getParameter. + Get the requested value of one compression parameter, selected by enum ZSTD_cParameter. + @result : 0, or an error code (which can be tested with ZSTD_isError()). + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_CCtx_setParametersUsingCCtxParams(
+        ZSTD_CCtx* cctx, const ZSTD_CCtx_params* params);
+

Apply a set of ZSTD_CCtx_params to the compression context. + This can be done even after compression is started, + if nbWorkers==0, this will have no impact until a new compression is started. + if nbWorkers>=1, new parameters will be picked up at next job, + with a few restrictions (windowLog, pledgedSrcSize, nbWorkers, jobSize, and overlapLog are not updated). + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_compressStream2_simpleArgs (
+                ZSTD_CCtx* cctx,
+                void* dst, size_t dstCapacity, size_t* dstPos,
+          const void* src, size_t srcSize, size_t* srcPos,
+                ZSTD_EndDirective endOp);
+

Same as ZSTD_compressStream2(), + but using only integral types as arguments. + This variant might be helpful for binders from dynamic languages + which have troubles handling structures containing memory pointers. + +


+ +

Advanced decompression functions


+
+
ZSTDLIB_STATIC_API unsigned ZSTD_isFrame(const void* buffer, size_t size);
+

Tells if the content of `buffer` starts with a valid Frame Identifier. + Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. + Note 2 : Legacy Frame Identifiers are considered valid only if Legacy Support is enabled. + Note 3 : Skippable Frame Identifiers are considered valid. +


+ +
ZSTDLIB_STATIC_API ZSTD_DDict* ZSTD_createDDict_byReference(const void* dictBuffer, size_t dictSize);
+

Create a digested dictionary, ready to start decompression operation without startup delay. + Dictionary content is referenced, and therefore stays in dictBuffer. + It is important that dictBuffer outlives DDict, + it must remain read accessible throughout the lifetime of DDict +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
+

Same as ZSTD_DCtx_loadDictionary(), + but references `dict` content instead of copying it into `dctx`. + This saves memory if `dict` remains around., + However, it's imperative that `dict` remains accessible (and unmodified) while being used, so it must outlive decompression. +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType);
+

Same as ZSTD_DCtx_loadDictionary(), + but gives direct control over + how to load the dictionary (by copy ? by reference ?) + and how to interpret it (automatic ? force raw mode ? full mode only ?). +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType);
+

Same as ZSTD_DCtx_refPrefix(), but gives finer control over + how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?) +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize);
+

Refuses allocating internal buffers for frames requiring a window size larger than provided limit. + This protects a decoder context from reserving too much memory for itself (potential attack scenario). + This parameter is only useful in streaming mode, since no internal buffer is allocated in single-pass mode. + By default, a decompression context accepts all window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT) + @return : 0, or an error code (which can be tested using ZSTD_isError()). + +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_DCtx_getParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int* value);
+

Get the requested decompression parameter value, selected by enum ZSTD_dParameter, + and store it into int* value. + @return : 0, or an error code (which can be tested with ZSTD_isError()). + +


+ +
ZSTD_DEPRECATED("use ZSTD_DCtx_setParameter() instead")
+ZSTDLIB_STATIC_API
+size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format);
+

This function is REDUNDANT. Prefer ZSTD_DCtx_setParameter(). + Instruct the decoder context about what kind of data to decode next. + This instruction is mandatory to decode data without a fully-formed header, + such ZSTD_f_zstd1_magicless for example. + @return : 0, or an error code (which can be tested using ZSTD_isError()). +


+ +
ZSTDLIB_STATIC_API size_t ZSTD_decompressStream_simpleArgs (
+                ZSTD_DCtx* dctx,
+                void* dst, size_t dstCapacity, size_t* dstPos,
+          const void* src, size_t srcSize, size_t* srcPos);
+

Same as ZSTD_decompressStream(), + but using only integral types as arguments. + This can be helpful for binders from dynamic languages + which have troubles handling structures containing memory pointers. + +


+ +

Advanced streaming functions

  Warning : most of these functions are now redundant with the Advanced API.
+  Once Advanced API reaches "stable" status,
+  redundant functions will be deprecated, and then at some point removed.
+
+ +

Advanced Streaming compression functions


+
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API
+size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs,
+             int compressionLevel,
+             unsigned long long pledgedSrcSize);
+

This function is DEPRECATED, and equivalent to: + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) + ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); + ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); + + pledgedSrcSize must be correct. If it is not known at init time, use + ZSTD_CONTENTSIZE_UNKNOWN. Note that, for compatibility with older programs, + "0" also disables frame content size field. It may be enabled in the future. + This prototype will generate compilation warnings. + +


+ +
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API
+size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs,
+         const void* dict, size_t dictSize,
+               int compressionLevel);
+

This function is DEPRECATED, and is equivalent to: + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); + ZSTD_CCtx_loadDictionary(zcs, dict, dictSize); + + Creates of an internal CDict (incompatible with static CCtx), except if + dict == NULL or dictSize < 8, in which case no dict is used. + Note: dict is loaded with ZSTD_dct_auto (treated as a full zstd dictionary if + it begins with ZSTD_MAGIC_DICTIONARY, else as raw content) and ZSTD_dlm_byCopy. + This prototype will generate compilation warnings. + +


+ +
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API
+size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs,
+        const void* dict, size_t dictSize,
+              ZSTD_parameters params,
+              unsigned long long pledgedSrcSize);
+

This function is DEPRECATED, and is equivalent to: + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + ZSTD_CCtx_setParams(zcs, params); + ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); + ZSTD_CCtx_loadDictionary(zcs, dict, dictSize); + + dict is loaded with ZSTD_dct_auto and ZSTD_dlm_byCopy. + pledgedSrcSize must be correct. + If srcSize is not known at init time, use value ZSTD_CONTENTSIZE_UNKNOWN. + This prototype will generate compilation warnings. + +


+ +
ZSTD_DEPRECATED("use ZSTD_CCtx_reset and ZSTD_CCtx_refCDict, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API
+size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict);
+

This function is DEPRECATED, and equivalent to: + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + ZSTD_CCtx_refCDict(zcs, cdict); + + note : cdict will just be referenced, and must outlive compression session + This prototype will generate compilation warnings. + +


+ +
ZSTD_DEPRECATED("use ZSTD_CCtx_reset and ZSTD_CCtx_refCDict, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API
+size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
+                   const ZSTD_CDict* cdict,
+                         ZSTD_frameParameters fParams,
+                         unsigned long long pledgedSrcSize);
+

This function is DEPRECATED, and is equivalent to: + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + ZSTD_CCtx_setFParams(zcs, fParams); + ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); + ZSTD_CCtx_refCDict(zcs, cdict); + + same as ZSTD_initCStream_usingCDict(), with control over frame parameters. + pledgedSrcSize must be correct. If srcSize is not known at init time, use + value ZSTD_CONTENTSIZE_UNKNOWN. + This prototype will generate compilation warnings. + +


+ +
ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API
+size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize);
+

This function is DEPRECATED, and is equivalent to: + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); + Note: ZSTD_resetCStream() interprets pledgedSrcSize == 0 as ZSTD_CONTENTSIZE_UNKNOWN, but + ZSTD_CCtx_setPledgedSrcSize() does not do the same, so ZSTD_CONTENTSIZE_UNKNOWN must be + explicitly specified. + + start a new frame, using same parameters from previous frame. + This is typically useful to skip dictionary loading stage, since it will reuse it in-place. + Note that zcs must be init at least once before using ZSTD_resetCStream(). + If pledgedSrcSize is not known at reset time, use macro ZSTD_CONTENTSIZE_UNKNOWN. + If pledgedSrcSize > 0, its value must be correct, as it will be written in header, and controlled at the end. + For the time being, pledgedSrcSize==0 is interpreted as "srcSize unknown" for compatibility with older programs, + but it will change to mean "empty" in future version, so use macro ZSTD_CONTENTSIZE_UNKNOWN instead. + @return : 0, or an error code (which can be tested using ZSTD_isError()) + This prototype will generate compilation warnings. + +


+ +
typedef struct {
+    unsigned long long ingested;   /* nb input bytes read and buffered */
+    unsigned long long consumed;   /* nb input bytes actually compressed */
+    unsigned long long produced;   /* nb of compressed bytes generated and buffered */
+    unsigned long long flushed;    /* nb of compressed bytes flushed : not provided; can be tracked from caller side */
+    unsigned currentJobID;         /* MT only : latest started job nb */
+    unsigned nbActiveWorkers;      /* MT only : nb of workers actively compressing at probe time */
+} ZSTD_frameProgression;
+

+
ZSTDLIB_STATIC_API size_t ZSTD_toFlushNow(ZSTD_CCtx* cctx);
+

Tell how many bytes are ready to be flushed immediately. + Useful for multithreading scenarios (nbWorkers >= 1). + Probe the oldest active job, defined as oldest job not yet entirely flushed, + and check its output buffer. + @return : amount of data stored in oldest job and ready to be flushed immediately. + if @return == 0, it means either : + + there is no active job (could be checked with ZSTD_frameProgression()), or + + oldest job is still actively compressing data, + but everything it has produced has also been flushed so far, + therefore flush speed is limited by production speed of oldest job + irrespective of the speed of concurrent (and newer) jobs. + +


+ +

Advanced Streaming decompression functions


+
ZSTD_DEPRECATED("use ZSTD_DCtx_reset + ZSTD_DCtx_loadDictionary, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize);
+

+ ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); + ZSTD_DCtx_loadDictionary(zds, dict, dictSize); + + note: no dictionary will be used if dict == NULL or dictSize < 8 + +


+ +
ZSTD_DEPRECATED("use ZSTD_DCtx_reset + ZSTD_DCtx_refDDict, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const ZSTD_DDict* ddict);
+

+ ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); + ZSTD_DCtx_refDDict(zds, ddict); + + note : ddict is referenced, it must outlive decompression session + +


+ +
ZSTD_DEPRECATED("use ZSTD_DCtx_reset, see zstd.h for detailed instructions")
+ZSTDLIB_STATIC_API size_t ZSTD_resetDStream(ZSTD_DStream* zds);
+

+ ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); + + reuse decompression parameters from previous init; saves dictionary loading + +


+ +
ZSTDLIB_STATIC_API void
+ZSTD_registerSequenceProducer(
+  ZSTD_CCtx* cctx,
+  void* sequenceProducerState,
+  ZSTD_sequenceProducer_F sequenceProducer
+);
+

Instruct zstd to use a block-level external sequence producer function. + + The sequenceProducerState must be initialized by the caller, and the caller is + responsible for managing its lifetime. This parameter is sticky across + compressions. It will remain set until the user explicitly resets compression + parameters. + + Sequence producer registration is considered to be an "advanced parameter", + part of the "advanced API". This means it will only have an effect on compression + APIs which respect advanced parameters, such as compress2() and compressStream2(). + Older compression APIs such as compressCCtx(), which predate the introduction of + "advanced parameters", will ignore any external sequence producer setting. + + The sequence producer can be "cleared" by registering a NULL function pointer. This + removes all limitations described above in the "LIMITATIONS" section of the API docs. + + The user is strongly encouraged to read the full API documentation (above) before + calling this function. +


+ +
ZSTDLIB_STATIC_API void
+ZSTD_CCtxParams_registerSequenceProducer(
+  ZSTD_CCtx_params* params,
+  void* sequenceProducerState,
+  ZSTD_sequenceProducer_F sequenceProducer
+);
+

Same as ZSTD_registerSequenceProducer(), but operates on ZSTD_CCtx_params. + This is used for accurate size estimation with ZSTD_estimateCCtxSize_usingCCtxParams(), + which is needed when creating a ZSTD_CCtx with ZSTD_initStaticCCtx(). + + If you are using the external sequence producer API in a scenario where ZSTD_initStaticCCtx() + is required, then this function is for you. Otherwise, you probably don't need it. + + See tests/zstreamtest.c for example usage. +


+ +

Buffer-less and synchronous inner streaming functions (DEPRECATED)

+  This API is deprecated, and will be removed in a future version.
+  It allows streaming (de)compression with user allocated buffers.
+  However, it is hard to use, and not as well tested as the rest of
+  our API.
+
+  Please use the normal streaming API instead: ZSTD_compressStream2,
+  and ZSTD_decompressStream.
+  If there is functionality that you need, but it doesn't provide,
+  please open an issue on our GitHub.
+ 
+
+ +

Buffer-less streaming compression (synchronous mode)

+  A ZSTD_CCtx object is required to track streaming operations.
+  Use ZSTD_createCCtx() / ZSTD_freeCCtx() to manage resource.
+  ZSTD_CCtx object can be reused multiple times within successive compression operations.
+
+  Start by initializing a context.
+  Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression.
+
+  Then, consume your input using ZSTD_compressContinue().
+  There are some important considerations to keep in mind when using this advanced function :
+  - ZSTD_compressContinue() has no internal buffer. It uses externally provided buffers only.
+  - Interface is synchronous : input is consumed entirely and produces 1+ compressed blocks.
+  - Caller must ensure there is enough space in `dst` to store compressed data under worst case scenario.
+    Worst case evaluation is provided by ZSTD_compressBound().
+    ZSTD_compressContinue() doesn't guarantee recover after a failed compression.
+  - ZSTD_compressContinue() presumes prior input ***is still accessible and unmodified*** (up to maximum distance size, see WindowLog).
+    It remembers all previous contiguous blocks, plus one separated memory segment (which can itself consists of multiple contiguous blocks)
+  - ZSTD_compressContinue() detects that prior input has been overwritten when `src` buffer overlaps.
+    In which case, it will "discard" the relevant memory section from its history.
+
+  Finish a frame with ZSTD_compressEnd(), which will write the last block(s) and optional checksum.
+  It's possible to use srcSize==0, in which case, it will write a final empty block to end the frame.
+  Without last block mark, frames are considered unfinished (hence corrupted) by compliant decoders.
+
+  `ZSTD_CCtx` object can be reused (ZSTD_compressBegin()) to compress again.
+
+ +

Buffer-less streaming compression functions

ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
+ZSTDLIB_STATIC_API size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel);
+ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
+ZSTDLIB_STATIC_API size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel);
+ZSTD_DEPRECATED("The buffer-less API is deprecated in favor of the normal streaming API. See docs.")
+ZSTDLIB_STATIC_API size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); /**< note: fails if cdict==NULL */
+

+
size_t ZSTD_copyCCtx(ZSTD_CCtx* cctx, const ZSTD_CCtx* preparedCCtx, unsigned long long pledgedSrcSize); /**<  note: if pledgedSrcSize is not known, use ZSTD_CONTENTSIZE_UNKNOWN */
+

+
size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize : If srcSize is not known at init time, use ZSTD_CONTENTSIZE_UNKNOWN */
+

+

Buffer-less streaming decompression (synchronous mode)

+  A ZSTD_DCtx object is required to track streaming operations.
+  Use ZSTD_createDCtx() / ZSTD_freeDCtx() to manage it.
+  A ZSTD_DCtx object can be reused multiple times.
+
+  First typical operation is to retrieve frame parameters, using ZSTD_getFrameHeader().
+  Frame header is extracted from the beginning of compressed frame, so providing only the frame's beginning is enough.
+  Data fragment must be large enough to ensure successful decoding.
+ `ZSTD_frameHeaderSize_max` bytes is guaranteed to always be large enough.
+  result  : 0 : successful decoding, the `ZSTD_frameHeader` structure is correctly filled.
+           >0 : `srcSize` is too small, please provide at least result bytes on next attempt.
+           errorCode, which can be tested using ZSTD_isError().
+
+  It fills a ZSTD_FrameHeader structure with important information to correctly decode the frame,
+  such as the dictionary ID, content size, or maximum back-reference distance (`windowSize`).
+  Note that these values could be wrong, either because of data corruption, or because a 3rd party deliberately spoofs false information.
+  As a consequence, check that values remain within valid application range.
+  For example, do not allocate memory blindly, check that `windowSize` is within expectation.
+  Each application can set its own limits, depending on local restrictions.
+  For extended interoperability, it is recommended to support `windowSize` of at least 8 MB.
+
+  ZSTD_decompressContinue() needs previous data blocks during decompression, up to `windowSize` bytes.
+  ZSTD_decompressContinue() is very sensitive to contiguity,
+  if 2 blocks don't follow each other, make sure that either the compressor breaks contiguity at the same place,
+  or that previous contiguous segment is large enough to properly handle maximum back-reference distance.
+  There are multiple ways to guarantee this condition.
+
+  The most memory efficient way is to use a round buffer of sufficient size.
+  Sufficient size is determined by invoking ZSTD_decodingBufferSize_min(),
+  which can return an error code if required value is too large for current system (in 32-bits mode).
+  In a round buffer methodology, ZSTD_decompressContinue() decompresses each block next to previous one,
+  up to the moment there is not enough room left in the buffer to guarantee decoding another full block,
+  which maximum size is provided in `ZSTD_frameHeader` structure, field `blockSizeMax`.
+  At which point, decoding can resume from the beginning of the buffer.
+  Note that already decoded data stored in the buffer should be flushed before being overwritten.
+
+  There are alternatives possible, for example using two or more buffers of size `windowSize` each, though they consume more memory.
+
+  Finally, if you control the compression process, you can also ignore all buffer size rules,
+  as long as the encoder and decoder progress in "lock-step",
+  aka use exactly the same buffer sizes, break contiguity at the same place, etc.
+
+  Once buffers are setup, start decompression, with ZSTD_decompressBegin().
+  If decompression requires a dictionary, use ZSTD_decompressBegin_usingDict() or ZSTD_decompressBegin_usingDDict().
+
+  Then use ZSTD_nextSrcSizeToDecompress() and ZSTD_decompressContinue() alternatively.
+  ZSTD_nextSrcSizeToDecompress() tells how many bytes to provide as 'srcSize' to ZSTD_decompressContinue().
+  ZSTD_decompressContinue() requires this _exact_ amount of bytes, or it will fail.
+
+  result of ZSTD_decompressContinue() is the number of bytes regenerated within 'dst' (necessarily <= dstCapacity).
+  It can be zero : it just means ZSTD_decompressContinue() has decoded some metadata item.
+  It can also be an error code, which can be tested with ZSTD_isError().
+
+  A frame is fully decoded when ZSTD_nextSrcSizeToDecompress() returns zero.
+  Context can then be reset to start a new decompression.
+
+  Note : it's possible to know if next input to present is a header or a block, using ZSTD_nextInputType().
+  This information is not required to properly decode a frame.
+
+  == Special case : skippable frames 
+
+  Skippable frames allow integration of user-defined data into a flow of concatenated frames.
+  Skippable frames will be ignored (skipped) by decompressor.
+  The format of skippable frames is as follows :
+  a) Skippable frame ID - 4 Bytes, Little endian format, any value from 0x184D2A50 to 0x184D2A5F
+  b) Frame Size - 4 Bytes, Little endian format, unsigned 32-bits
+  c) Frame Content - any content (User Data) of length equal to Frame Size
+  For skippable frames ZSTD_getFrameHeader() returns zfhPtr->frameType==ZSTD_skippableFrame.
+  For skippable frames ZSTD_decompressContinue() always returns 0 : it only skips the content.
+
+ +

Buffer-less streaming decompression functions


+
ZSTDLIB_STATIC_API size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSize);  /**< when frame content size is not known, pass in frameContentSize == ZSTD_CONTENTSIZE_UNKNOWN */
+

+
typedef enum { ZSTDnit_frameHeader, ZSTDnit_blockHeader, ZSTDnit_block, ZSTDnit_lastBlock, ZSTDnit_checksum, ZSTDnit_skippableFrame } ZSTD_nextInputType_e;
+

+

Block level API (DEPRECATED)


+
+

You can get the frame header down to 2 bytes by setting: + - ZSTD_c_format = ZSTD_f_zstd1_magicless + - ZSTD_c_contentSizeFlag = 0 + - ZSTD_c_checksumFlag = 0 + - ZSTD_c_dictIDFlag = 0 + + This API is not as well tested as our normal API, so we recommend not using it. + We will be removing it in a future version. If the normal API doesn't provide + the functionality you need, please open a GitHub issue. + + Block functions produce and decode raw zstd blocks, without frame metadata. + Frame metadata cost is typically ~12 bytes, which can be non-negligible for very small blocks (< 100 bytes). + But users will have to take in charge needed metadata to regenerate data, such as compressed and content sizes. + + A few rules to respect : + - Compressing and decompressing require a context structure + + Use ZSTD_createCCtx() and ZSTD_createDCtx() + - It is necessary to init context before starting + + compression : any ZSTD_compressBegin*() variant, including with dictionary + + decompression : any ZSTD_decompressBegin*() variant, including with dictionary + - Block size is limited, it must be <= ZSTD_getBlockSize() <= ZSTD_BLOCKSIZE_MAX == 128 KB + + If input is larger than a block size, it's necessary to split input data into multiple blocks + + For inputs larger than a single block, consider using regular ZSTD_compress() instead. + Frame metadata is not that costly, and quickly becomes negligible as source size grows larger than a block. + - When a block is considered not compressible enough, ZSTD_compressBlock() result will be 0 (zero) ! + ===> In which case, nothing is produced into `dst` ! + + User __must__ test for such outcome and deal directly with uncompressed data + + A block cannot be declared incompressible if ZSTD_compressBlock() return value was != 0. + Doing so would mess up with statistics history, leading to potential data corruption. + + ZSTD_decompressBlock() _doesn't accept uncompressed data as input_ !! + + In case of multiple successive blocks, should some of them be uncompressed, + decoder must be informed of their existence in order to follow proper history. + Use ZSTD_insertBlock() for such a case. +


+ +

Raw zstd block functions

ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
+ZSTDLIB_STATIC_API size_t ZSTD_getBlockSize   (const ZSTD_CCtx* cctx);
+ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
+ZSTDLIB_STATIC_API size_t ZSTD_compressBlock  (ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
+ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
+ZSTDLIB_STATIC_API size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
+ZSTD_DEPRECATED("The block API is deprecated in favor of the normal compression API. See docs.")
+ZSTDLIB_STATIC_API size_t ZSTD_insertBlock    (ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize);  /**< insert uncompressed block into `dctx` history. Useful for multi-blocks decompression. */
+

+ + diff --git a/cpp/third_party/zstd-1.5.7/examples/.gitignore b/cpp/third_party/zstd-1.5.7/examples/.gitignore new file mode 100644 index 0000000000..d682cae38a --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/.gitignore @@ -0,0 +1,15 @@ +#build +simple_compression +simple_decompression +multiple_simple_compression +dictionary_compression +dictionary_decompression +streaming_compression +streaming_decompression +multiple_streaming_compression +streaming_memory_usage + +#test artefact +tmp* +test* +*.zst diff --git a/cpp/third_party/zstd-1.5.7/examples/Makefile b/cpp/third_party/zstd-1.5.7/examples/Makefile new file mode 100644 index 0000000000..31f52d3576 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/Makefile @@ -0,0 +1,93 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ + +LIBDIR =../lib +CPPFLAGS += -I$(LIBDIR) +LIB = $(LIBDIR)/libzstd.a + + +.PHONY: default +default: all + +.PHONY: all +all: simple_compression simple_decompression \ + multiple_simple_compression\ + dictionary_compression dictionary_decompression \ + streaming_compression streaming_decompression \ + multiple_streaming_compression streaming_memory_usage + +$(LIB) : + $(MAKE) -C $(LIBDIR) libzstd.a + +simple_compression.o: common.h +simple_compression : $(LIB) + +simple_decompression.o: common.h +simple_decompression : $(LIB) + +multiple_simple_compression.o: common.h +multiple_simple_compression : $(LIB) + +dictionary_compression.o: common.h +dictionary_compression : $(LIB) + +dictionary_decompression.o: common.h +dictionary_decompression : $(LIB) + +streaming_compression.o: common.h +streaming_compression : $(LIB) + +multiple_streaming_compression.o: common.h +multiple_streaming_compression : $(LIB) + +streaming_decompression.o: common.h +streaming_decompression : $(LIB) + +streaming_memory_usage.o: common.h +streaming_memory_usage : $(LIB) + + +.PHONY:clean +clean: + @$(RM) core *.o tmp* result* *.zst \ + simple_compression simple_decompression \ + multiple_simple_compression \ + dictionary_compression dictionary_decompression \ + streaming_compression streaming_decompression \ + multiple_streaming_compression streaming_memory_usage + @echo Cleaning completed + +.PHONY:test +test: all + cp README.md tmp + cp Makefile tmp2 + @echo -- Simple compression tests + ./simple_compression tmp + ./simple_decompression tmp.zst + ./multiple_simple_compression *.c + ./streaming_decompression tmp.zst > /dev/null + @echo -- Streaming memory usage + ./streaming_memory_usage + @echo -- Streaming compression tests + ./streaming_compression tmp + ./streaming_decompression tmp.zst > /dev/null + @echo -- Edge cases detection + ! ./streaming_decompression tmp # invalid input, must fail + ! ./simple_decompression tmp # invalid input, must fail + touch tmpNull # create 0-size file + ./simple_compression tmpNull + ./simple_decompression tmpNull.zst # 0-size frame : must work + @echo -- Multiple streaming tests + ./multiple_streaming_compression *.c + @echo -- Dictionary compression tests + ./dictionary_compression tmp2 tmp README.md + ./dictionary_decompression tmp2.zst tmp.zst README.md + $(RM) tmp* *.zst + @echo tests completed diff --git a/cpp/third_party/zstd-1.5.7/examples/README.md b/cpp/third_party/zstd-1.5.7/examples/README.md new file mode 100644 index 0000000000..0bff7ac19a --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/README.md @@ -0,0 +1,46 @@ +Zstandard library : usage examples +================================== + +- [Simple compression](simple_compression.c) : + Compress a single file. + Introduces usage of : `ZSTD_compress()` + +- [Simple decompression](simple_decompression.c) : + Decompress a single file. + Only compatible with simple compression. + Result remains in memory. + Introduces usage of : `ZSTD_decompress()` + +- [Multiple simple compression](multiple_simple_compression.c) : + Compress multiple files (in simple mode) in a single command line. + Demonstrates memory preservation technique that + minimizes malloc()/free() calls by re-using existing resources. + Introduces usage of : `ZSTD_compressCCtx()` + +- [Streaming memory usage](streaming_memory_usage.c) : + Provides amount of memory used by streaming context. + Introduces usage of : `ZSTD_sizeof_CStream()` + +- [Streaming compression](streaming_compression.c) : + Compress a single file. + Introduces usage of : `ZSTD_compressStream()` + +- [Multiple Streaming compression](multiple_streaming_compression.c) : + Compress multiple files (in streaming mode) in a single command line. + Introduces memory usage preservation technique, + reducing impact of malloc()/free() and memset() by re-using existing resources. + +- [Streaming decompression](streaming_decompression.c) : + Decompress a single file compressed by zstd. + Compatible with both simple and streaming compression. + Result is sent to stdout. + Introduces usage of : `ZSTD_decompressStream()` + +- [Dictionary compression](dictionary_compression.c) : + Compress multiple files using the same dictionary. + Introduces usage of : `ZSTD_createCDict()` and `ZSTD_compress_usingCDict()` + +- [Dictionary decompression](dictionary_decompression.c) : + Decompress multiple files using the same dictionary. + Result remains in memory. + Introduces usage of : `ZSTD_createDDict()` and `ZSTD_decompress_usingDDict()` diff --git a/cpp/third_party/zstd-1.5.7/examples/common.h b/cpp/third_party/zstd-1.5.7/examples/common.h new file mode 100644 index 0000000000..4873e877a7 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/common.h @@ -0,0 +1,246 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* + * This header file has common utility functions used in examples. + */ +#ifndef COMMON_H +#define COMMON_H + +#include // malloc, free, exit +#include // fprintf, perror, fopen, etc. +#include // strerror +#include // errno +#include // stat +#include + + +/* UNUSED_ATTR tells the compiler it is okay if the function is unused. */ +#if defined(__GNUC__) +# define UNUSED_ATTR __attribute__((unused)) +#else +# define UNUSED_ATTR +#endif + +#define HEADER_FUNCTION static UNUSED_ATTR + + +/* + * Define the returned error code from utility functions. + */ +typedef enum { + ERROR_fsize = 1, + ERROR_fopen = 2, + ERROR_fclose = 3, + ERROR_fread = 4, + ERROR_fwrite = 5, + ERROR_loadFile = 6, + ERROR_saveFile = 7, + ERROR_malloc = 8, + ERROR_largeFile = 9, +} COMMON_ErrorCode; + +/*! CHECK + * Check that the condition holds. If it doesn't print a message and die. + */ +#define CHECK(cond, ...) \ + do { \ + if (!(cond)) { \ + fprintf(stderr, \ + "%s:%d CHECK(%s) failed: ", \ + __FILE__, \ + __LINE__, \ + #cond); \ + fprintf(stderr, "" __VA_ARGS__); \ + fprintf(stderr, "\n"); \ + exit(1); \ + } \ + } while (0) + +/*! CHECK_ZSTD + * Check the zstd error code and die if an error occurred after printing a + * message. + */ +#define CHECK_ZSTD(fn) \ + do { \ + size_t const err = (fn); \ + CHECK(!ZSTD_isError(err), "%s", ZSTD_getErrorName(err)); \ + } while (0) + +/*! fsize_orDie() : + * Get the size of a given file path. + * + * @return The size of a given file path. + */ +HEADER_FUNCTION size_t fsize_orDie(const char *filename) +{ + struct stat st; + if (stat(filename, &st) != 0) { + /* error */ + perror(filename); + exit(ERROR_fsize); + } + + off_t const fileSize = st.st_size; + size_t const size = (size_t)fileSize; + /* 1. fileSize should be non-negative, + * 2. if off_t -> size_t type conversion results in discrepancy, + * the file size is too large for type size_t. + */ + if ((fileSize < 0) || (fileSize != (off_t)size)) { + fprintf(stderr, "%s : filesize too large \n", filename); + exit(ERROR_largeFile); + } + return size; +} + +/*! fopen_orDie() : + * Open a file using given file path and open option. + * + * @return If successful this function will return a FILE pointer to an + * opened file otherwise it sends an error to stderr and exits. + */ +HEADER_FUNCTION FILE* fopen_orDie(const char *filename, const char *instruction) +{ + FILE* const inFile = fopen(filename, instruction); + if (inFile) return inFile; + /* error */ + perror(filename); + exit(ERROR_fopen); +} + +/*! fclose_orDie() : + * Close an opened file using given FILE pointer. + */ +HEADER_FUNCTION void fclose_orDie(FILE* file) +{ + if (!fclose(file)) { return; }; + /* error */ + perror("fclose"); + exit(ERROR_fclose); +} + +/*! fread_orDie() : + * + * Read sizeToRead bytes from a given file, storing them at the + * location given by buffer. + * + * @return The number of bytes read. + */ +HEADER_FUNCTION size_t fread_orDie(void* buffer, size_t sizeToRead, FILE* file) +{ + size_t const readSize = fread(buffer, 1, sizeToRead, file); + if (readSize == sizeToRead) return readSize; /* good */ + if (feof(file)) return readSize; /* good, reached end of file */ + /* error */ + perror("fread"); + exit(ERROR_fread); +} + +/*! fwrite_orDie() : + * + * Write sizeToWrite bytes to a file pointed to by file, obtaining + * them from a location given by buffer. + * + * Note: This function will send an error to stderr and exit if it + * cannot write data to the given file pointer. + * + * @return The number of bytes written. + */ +HEADER_FUNCTION size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file) +{ + size_t const writtenSize = fwrite(buffer, 1, sizeToWrite, file); + if (writtenSize == sizeToWrite) return sizeToWrite; /* good */ + /* error */ + perror("fwrite"); + exit(ERROR_fwrite); +} + +/*! malloc_orDie() : + * Allocate memory. + * + * @return If successful this function returns a pointer to allo- + * cated memory. If there is an error, this function will send that + * error to stderr and exit. + */ +HEADER_FUNCTION void* malloc_orDie(size_t size) +{ + void* const buff = malloc(size); + if (buff) return buff; + /* error */ + perror("malloc"); + exit(ERROR_malloc); +} + +/*! loadFile_orDie() : + * load file into buffer (memory). + * + * Note: This function will send an error to stderr and exit if it + * cannot read data from the given file path. + * + * @return If successful this function will load file into buffer and + * return file size, otherwise it will printout an error to stderr and exit. + */ +HEADER_FUNCTION size_t loadFile_orDie(const char* fileName, void* buffer, size_t bufferSize) +{ + size_t const fileSize = fsize_orDie(fileName); + CHECK(fileSize <= bufferSize, "File too large!"); + + FILE* const inFile = fopen_orDie(fileName, "rb"); + size_t const readSize = fread(buffer, 1, fileSize, inFile); + if (readSize != (size_t)fileSize) { + fprintf(stderr, "fread: %s : %s \n", fileName, strerror(errno)); + exit(ERROR_fread); + } + fclose(inFile); /* can't fail, read only */ + return fileSize; +} + +/*! mallocAndLoadFile_orDie() : + * allocate memory buffer and then load file into it. + * + * Note: This function will send an error to stderr and exit if memory allocation + * fails or it cannot read data from the given file path. + * + * @return If successful this function will return buffer and bufferSize(=fileSize), + * otherwise it will printout an error to stderr and exit. + */ +HEADER_FUNCTION void* mallocAndLoadFile_orDie(const char* fileName, size_t* bufferSize) +{ + size_t const fileSize = fsize_orDie(fileName); + *bufferSize = fileSize; + void* const buffer = malloc_orDie(*bufferSize); + loadFile_orDie(fileName, buffer, *bufferSize); + return buffer; +} + +/*! saveFile_orDie() : + * + * Save buffSize bytes to a given file path, obtaining them from a location pointed + * to by buff. + * + * Note: This function will send an error to stderr and exit if it + * cannot write to a given file. + */ +HEADER_FUNCTION void saveFile_orDie(const char* fileName, const void* buff, size_t buffSize) +{ + FILE* const oFile = fopen_orDie(fileName, "wb"); + size_t const wSize = fwrite(buff, 1, buffSize, oFile); + if (wSize != (size_t)buffSize) { + fprintf(stderr, "fwrite: %s : %s \n", fileName, strerror(errno)); + exit(ERROR_fwrite); + } + if (fclose(oFile)) { + perror(fileName); + exit(ERROR_fclose); + } +} + +#endif diff --git a/cpp/third_party/zstd-1.5.7/examples/dictionary_compression.c b/cpp/third_party/zstd-1.5.7/examples/dictionary_compression.c new file mode 100644 index 0000000000..83edc1cad9 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/dictionary_compression.c @@ -0,0 +1,107 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +**/ + +/* This example deals with Dictionary compression, + * its counterpart is `examples/dictionary_decompression.c` . + * These examples presume that a dictionary already exists. + * The main method to create a dictionary is `zstd --train`, + * look at the CLI documentation for details. + * Another possible method is to employ dictionary training API, + * published in `lib/zdict.h` . +**/ + +#include // printf +#include // free +#include // memset, strcat +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +/* createDict() : +** `dictFileName` is supposed already created using `zstd --train` */ +static ZSTD_CDict* createCDict_orDie(const char* dictFileName, int cLevel) +{ + size_t dictSize; + printf("loading dictionary %s \n", dictFileName); + void* const dictBuffer = mallocAndLoadFile_orDie(dictFileName, &dictSize); + ZSTD_CDict* const cdict = ZSTD_createCDict(dictBuffer, dictSize, cLevel); + CHECK(cdict != NULL, "ZSTD_createCDict() failed!"); + free(dictBuffer); + return cdict; +} + + +static void compress(const char* fname, const char* oname, const ZSTD_CDict* cdict) +{ + size_t fSize; + void* const fBuff = mallocAndLoadFile_orDie(fname, &fSize); + size_t const cBuffSize = ZSTD_compressBound(fSize); + void* const cBuff = malloc_orDie(cBuffSize); + + /* Compress using the dictionary. + * This function writes the dictionary id, and content size into the header. + * But, it doesn't use a checksum. You can control these options using the + * advanced API: ZSTD_CCtx_setParameter(), ZSTD_CCtx_refCDict(), + * and ZSTD_compress2(). + */ + ZSTD_CCtx* const cctx = ZSTD_createCCtx(); + CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); + size_t const cSize = ZSTD_compress_usingCDict(cctx, cBuff, cBuffSize, fBuff, fSize, cdict); + CHECK_ZSTD(cSize); + + saveFile_orDie(oname, cBuff, cSize); + + /* success */ + printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); + + ZSTD_freeCCtx(cctx); /* never fails */ + free(fBuff); + free(cBuff); +} + + +static char* createOutFilename_orDie(const char* filename) +{ + size_t const inL = strlen(filename); + size_t const outL = inL + 5; + void* outSpace = malloc_orDie(outL); + memset(outSpace, 0, outL); + strcat(outSpace, filename); + strcat(outSpace, ".zst"); + return (char*)outSpace; +} + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + int const cLevel = 3; + + if (argc<3) { + fprintf(stderr, "wrong arguments\n"); + fprintf(stderr, "usage:\n"); + fprintf(stderr, "%s [FILES] dictionary\n", exeName); + return 1; + } + + /* load dictionary only once */ + const char* const dictName = argv[argc-1]; + ZSTD_CDict* const dictPtr = createCDict_orDie(dictName, cLevel); + + int u; + for (u=1; u // printf +#include // free +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +/* createDict() : + `dictFileName` is supposed to have been created using `zstd --train` */ +static ZSTD_DDict* createDict_orDie(const char* dictFileName) +{ + size_t dictSize; + printf("loading dictionary %s \n", dictFileName); + void* const dictBuffer = mallocAndLoadFile_orDie(dictFileName, &dictSize); + ZSTD_DDict* const ddict = ZSTD_createDDict(dictBuffer, dictSize); + CHECK(ddict != NULL, "ZSTD_createDDict() failed!"); + free(dictBuffer); + return ddict; +} + +static void decompress(const char* fname, const ZSTD_DDict* ddict) +{ + size_t cSize; + void* const cBuff = mallocAndLoadFile_orDie(fname, &cSize); + /* Read the content size from the frame header. For simplicity we require + * that it is always present. By default, zstd will write the content size + * in the header when it is known. If you can't guarantee that the frame + * content size is always written into the header, either use streaming + * decompression, or ZSTD_decompressBound(). + */ + unsigned long long const rSize = ZSTD_getFrameContentSize(cBuff, cSize); + CHECK(rSize != ZSTD_CONTENTSIZE_ERROR, "%s: not compressed by zstd!", fname); + CHECK(rSize != ZSTD_CONTENTSIZE_UNKNOWN, "%s: original size unknown!", fname); + void* const rBuff = malloc_orDie((size_t)rSize); + + /* Check that the dictionary ID matches. + * If a non-zstd dictionary is used, then both will be zero. + * By default zstd always writes the dictionary ID into the frame. + * Zstd will check if there is a dictionary ID mismatch as well. + */ + unsigned const expectedDictID = ZSTD_getDictID_fromDDict(ddict); + unsigned const actualDictID = ZSTD_getDictID_fromFrame(cBuff, cSize); + CHECK(actualDictID == expectedDictID, + "DictID mismatch: expected %u got %u", + expectedDictID, + actualDictID); + + /* Decompress using the dictionary. + * If you need to control the decompression parameters, then use the + * advanced API: ZSTD_DCtx_setParameter(), ZSTD_DCtx_refDDict(), and + * ZSTD_decompressDCtx(). + */ + ZSTD_DCtx* const dctx = ZSTD_createDCtx(); + CHECK(dctx != NULL, "ZSTD_createDCtx() failed!"); + size_t const dSize = ZSTD_decompress_usingDDict(dctx, rBuff, rSize, cBuff, cSize, ddict); + CHECK_ZSTD(dSize); + /* When zstd knows the content size, it will error if it doesn't match. */ + CHECK(dSize == rSize, "Impossible because zstd will check this condition!"); + + /* success */ + printf("%25s : %6u -> %7u \n", fname, (unsigned)cSize, (unsigned)rSize); + + ZSTD_freeDCtx(dctx); + free(rBuff); + free(cBuff); +} + + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc<3) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s [FILES] dictionary\n", exeName); + return 1; + } + + /* load dictionary only once */ + const char* const dictName = argv[argc-1]; + ZSTD_DDict* const dictPtr = createDict_orDie(dictName); + + int u; + for (u=1; u // printf +#include // free +#include // memcpy, strlen +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +typedef struct { + void* fBuffer; + void* cBuffer; + size_t fBufferSize; + size_t cBufferSize; + ZSTD_CCtx* cctx; +} resources; + +/* + * allocate memory for buffers big enough to compress all files + * as well as memory for output file name (ofn) + */ +static resources createResources_orDie(int argc, const char** argv, char **ofn, size_t* ofnBufferLen) +{ + size_t maxFilenameLength=0; + size_t maxFileSize = 0; + + int argNb; + for (argNb = 1; argNb < argc; argNb++) { + const char* const filename = argv[argNb]; + size_t const filenameLength = strlen(filename); + size_t const fileSize = fsize_orDie(filename); + + if (filenameLength > maxFilenameLength) maxFilenameLength = filenameLength; + if (fileSize > maxFileSize) maxFileSize = fileSize; + } + + resources ress; + ress.fBufferSize = maxFileSize; + ress.cBufferSize = ZSTD_compressBound(maxFileSize); + + *ofnBufferLen = maxFilenameLength + 5; + *ofn = (char*)malloc_orDie(*ofnBufferLen); + ress.fBuffer = malloc_orDie(ress.fBufferSize); + ress.cBuffer = malloc_orDie(ress.cBufferSize); + ress.cctx = ZSTD_createCCtx(); + CHECK(ress.cctx != NULL, "ZSTD_createCCtx() failed!"); + return ress; +} + +static void freeResources(resources ress, char *outFilename) +{ + free(ress.fBuffer); + free(ress.cBuffer); + ZSTD_freeCCtx(ress.cctx); /* never fails */ + free(outFilename); +} + +/* compress with pre-allocated context (ZSTD_CCtx) and input/output buffers*/ +static void compressFile_orDie(resources ress, const char* fname, const char* oname) +{ + size_t fSize = loadFile_orDie(fname, ress.fBuffer, ress.fBufferSize); + + /* Compress using the context. + * If you need more control over parameters, use the advanced API: + * ZSTD_CCtx_setParameter(), and ZSTD_compress2(). + */ + size_t const cSize = ZSTD_compressCCtx(ress.cctx, ress.cBuffer, ress.cBufferSize, ress.fBuffer, fSize, 1); + CHECK_ZSTD(cSize); + + saveFile_orDie(oname, ress.cBuffer, cSize); + + /* success */ + printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); +} + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc<2) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s FILE(s)\n", exeName); + return 1; + } + + /* memory allocation for outFilename and resources */ + char* outFilename; + size_t outFilenameBufferLen; + resources const ress = createResources_orDie(argc, argv, &outFilename, &outFilenameBufferLen); + + /* compress files with shared context, input and output buffers */ + int argNb; + for (argNb = 1; argNb < argc; argNb++) { + const char* const inFilename = argv[argNb]; + size_t const inFilenameLen = strlen(inFilename); + CHECK(inFilenameLen + 5 <= outFilenameBufferLen, "File name too long!"); + memcpy(outFilename, inFilename, inFilenameLen); + memcpy(outFilename+inFilenameLen, ".zst", 5); + compressFile_orDie(ress, inFilename, outFilename); + } + + /* free memory */ + freeResources(ress,outFilename); + + printf("compressed %i files \n", argc-1); + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/examples/multiple_streaming_compression.c b/cpp/third_party/zstd-1.5.7/examples/multiple_streaming_compression.c new file mode 100644 index 0000000000..b12ad03dce --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/multiple_streaming_compression.c @@ -0,0 +1,133 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/* The objective of this example is to show of to compress multiple successive files +* while preserving memory management. +* All structures and buffers will be created only once, +* and shared across all compression operations */ + +#include // printf +#include // free +#include // memset, strcat +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +typedef struct { + void* buffIn; + void* buffOut; + size_t buffInSize; + size_t buffOutSize; + ZSTD_CCtx* cctx; +} resources; + +static resources createResources_orDie(int cLevel) +{ + resources ress; + ress.buffInSize = ZSTD_CStreamInSize(); /* can always read one full block */ + ress.buffOutSize= ZSTD_CStreamOutSize(); /* can always flush a full block */ + ress.buffIn = malloc_orDie(ress.buffInSize); + ress.buffOut= malloc_orDie(ress.buffOutSize); + ress.cctx = ZSTD_createCCtx(); + CHECK(ress.cctx != NULL, "ZSTD_createCCtx() failed!"); + + /* Set any compression parameters you want here. + * They will persist for every compression operation. + * Here we set the compression level, and enable the checksum. + */ + CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_compressionLevel, cLevel) ); + CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_checksumFlag, 1) ); + return ress; +} + +static void freeResources(resources ress) +{ + ZSTD_freeCCtx(ress.cctx); + free(ress.buffIn); + free(ress.buffOut); +} + +static void compressFile_orDie(resources ress, const char* fname, const char* outName) +{ + // Open the input and output files. + FILE* const fin = fopen_orDie(fname, "rb"); + FILE* const fout = fopen_orDie(outName, "wb"); + + /* Reset the context to a clean state to start a new compression operation. + * The parameters are sticky, so we keep the compression level and extra + * parameters that we set in createResources_orDie(). + */ + CHECK_ZSTD( ZSTD_CCtx_reset(ress.cctx, ZSTD_reset_session_only) ); + + size_t const toRead = ress.buffInSize; + size_t read; + while ( (read = fread_orDie(ress.buffIn, toRead, fin)) ) { + /* This loop is the same as streaming_compression.c. + * See that file for detailed comments. + */ + int const lastChunk = (read < toRead); + ZSTD_EndDirective const mode = lastChunk ? ZSTD_e_end : ZSTD_e_continue; + + ZSTD_inBuffer input = { ress.buffIn, read, 0 }; + int finished; + do { + ZSTD_outBuffer output = { ress.buffOut, ress.buffOutSize, 0 }; + size_t const remaining = ZSTD_compressStream2(ress.cctx, &output, &input, mode); + CHECK_ZSTD(remaining); + fwrite_orDie(ress.buffOut, output.pos, fout); + finished = lastChunk ? (remaining == 0) : (input.pos == input.size); + } while (!finished); + CHECK(input.pos == input.size, + "Impossible: zstd only returns 0 when the input is completely consumed!"); + } + + fclose_orDie(fout); + fclose_orDie(fin); +} + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc<2) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s FILE(s)\n", exeName); + return 1; + } + + int const cLevel = 7; + resources const ress = createResources_orDie(cLevel); + void* ofnBuffer = NULL; + size_t ofnbSize = 0; + + int argNb; + for (argNb = 1; argNb < argc; argNb++) { + const char* const ifn = argv[argNb]; + size_t const ifnSize = strlen(ifn); + size_t const ofnSize = ifnSize + 5; + if (ofnbSize <= ofnSize) { + ofnbSize = ofnSize + 16; + free(ofnBuffer); + ofnBuffer = malloc_orDie(ofnbSize); + } + memset(ofnBuffer, 0, ofnSize); + strcat(ofnBuffer, ifn); + strcat(ofnBuffer, ".zst"); + compressFile_orDie(ress, ifn, ofnBuffer); + } + + freeResources(ress); + free(ofnBuffer); + + printf("compressed %i files \n", argc-1); + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/examples/simple_compression.c b/cpp/third_party/zstd-1.5.7/examples/simple_compression.c new file mode 100644 index 0000000000..7c880725fc --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/simple_compression.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include // printf +#include // free +#include // strlen, strcat, memset +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +static void compress_orDie(const char* fname, const char* oname) +{ + size_t fSize; + void* const fBuff = mallocAndLoadFile_orDie(fname, &fSize); + size_t const cBuffSize = ZSTD_compressBound(fSize); + void* const cBuff = malloc_orDie(cBuffSize); + + /* Compress. + * If you are doing many compressions, you may want to reuse the context. + * See the multiple_simple_compression.c example. + */ + size_t const cSize = ZSTD_compress(cBuff, cBuffSize, fBuff, fSize, 1); + CHECK_ZSTD(cSize); + + saveFile_orDie(oname, cBuff, cSize); + + /* success */ + printf("%25s : %6u -> %7u - %s \n", fname, (unsigned)fSize, (unsigned)cSize, oname); + + free(fBuff); + free(cBuff); +} + +static char* createOutFilename_orDie(const char* filename) +{ + size_t const inL = strlen(filename); + size_t const outL = inL + 5; + void* const outSpace = malloc_orDie(outL); + memset(outSpace, 0, outL); + strcat(outSpace, filename); + strcat(outSpace, ".zst"); + return (char*)outSpace; +} + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc!=2) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s FILE\n", exeName); + return 1; + } + + const char* const inFilename = argv[1]; + + char* const outFilename = createOutFilename_orDie(inFilename); + compress_orDie(inFilename, outFilename); + free(outFilename); + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/examples/simple_decompression.c b/cpp/third_party/zstd-1.5.7/examples/simple_decompression.c new file mode 100644 index 0000000000..f499156f64 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/simple_decompression.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include // printf +#include // free +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +static void decompress(const char* fname) +{ + size_t cSize; + void* const cBuff = mallocAndLoadFile_orDie(fname, &cSize); + /* Read the content size from the frame header. For simplicity we require + * that it is always present. By default, zstd will write the content size + * in the header when it is known. If you can't guarantee that the frame + * content size is always written into the header, either use streaming + * decompression, or ZSTD_decompressBound(). + */ + unsigned long long const rSize = ZSTD_getFrameContentSize(cBuff, cSize); + CHECK(rSize != ZSTD_CONTENTSIZE_ERROR, "%s: not compressed by zstd!", fname); + CHECK(rSize != ZSTD_CONTENTSIZE_UNKNOWN, "%s: original size unknown!", fname); + + void* const rBuff = malloc_orDie((size_t)rSize); + + /* Decompress. + * If you are doing many decompressions, you may want to reuse the context + * and use ZSTD_decompressDCtx(). If you want to set advanced parameters, + * use ZSTD_DCtx_setParameter(). + */ + size_t const dSize = ZSTD_decompress(rBuff, rSize, cBuff, cSize); + CHECK_ZSTD(dSize); + /* When zstd knows the content size, it will error if it doesn't match. */ + CHECK(dSize == rSize, "Impossible because zstd will check this condition!"); + + /* success */ + printf("%25s : %6u -> %7u \n", fname, (unsigned)cSize, (unsigned)rSize); + + free(rBuff); + free(cBuff); +} + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc!=2) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s FILE\n", exeName); + return 1; + } + + decompress(argv[1]); + + printf("%s correctly decoded (in memory). \n", argv[1]); + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/examples/streaming_compression.c b/cpp/third_party/zstd-1.5.7/examples/streaming_compression.c new file mode 100644 index 0000000000..063aa82a29 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/streaming_compression.c @@ -0,0 +1,146 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +#include // printf +#include // free +#include // memset, strcat, strlen +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +static void compressFile_orDie(const char* fname, const char* outName, int cLevel, + int nbThreads) +{ + fprintf (stderr, "Starting compression of %s with level %d, using %d threads\n", + fname, cLevel, nbThreads); + + /* Open the input and output files. */ + FILE* const fin = fopen_orDie(fname, "rb"); + FILE* const fout = fopen_orDie(outName, "wb"); + /* Create the input and output buffers. + * They may be any size, but we recommend using these functions to size them. + * Performance will only suffer significantly for very tiny buffers. + */ + size_t const buffInSize = ZSTD_CStreamInSize(); + void* const buffIn = malloc_orDie(buffInSize); + size_t const buffOutSize = ZSTD_CStreamOutSize(); + void* const buffOut = malloc_orDie(buffOutSize); + + /* Create the context. */ + ZSTD_CCtx* const cctx = ZSTD_createCCtx(); + CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); + + /* Set any parameters you want. + * Here we set the compression level, and enable the checksum. + */ + CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, cLevel) ); + CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); + if (nbThreads > 1) { + size_t const r = ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, nbThreads); + if (ZSTD_isError(r)) { + fprintf (stderr, "Note: the linked libzstd library doesn't support multithreading. " + "Reverting to single-thread mode. \n"); + } + } + + /* This loop read from the input file, compresses that entire chunk, + * and writes all output produced to the output file. + */ + size_t const toRead = buffInSize; + for (;;) { + size_t read = fread_orDie(buffIn, toRead, fin); + /* Select the flush mode. + * If the read may not be finished (read == toRead) we use + * ZSTD_e_continue. If this is the last chunk, we use ZSTD_e_end. + * Zstd optimizes the case where the first flush mode is ZSTD_e_end, + * since it knows it is compressing the entire source in one pass. + */ + int const lastChunk = (read < toRead); + ZSTD_EndDirective const mode = lastChunk ? ZSTD_e_end : ZSTD_e_continue; + /* Set the input buffer to what we just read. + * We compress until the input buffer is empty, each time flushing the + * output. + */ + ZSTD_inBuffer input = { buffIn, read, 0 }; + int finished; + do { + /* Compress into the output buffer and write all of the output to + * the file so we can reuse the buffer next iteration. + */ + ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; + size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); + CHECK_ZSTD(remaining); + fwrite_orDie(buffOut, output.pos, fout); + /* If we're on the last chunk we're finished when zstd returns 0, + * which means its consumed all the input AND finished the frame. + * Otherwise, we're finished when we've consumed all the input. + */ + finished = lastChunk ? (remaining == 0) : (input.pos == input.size); + } while (!finished); + CHECK(input.pos == input.size, + "Impossible: zstd only returns 0 when the input is completely consumed!"); + + if (lastChunk) { + break; + } + } + + ZSTD_freeCCtx(cctx); + fclose_orDie(fout); + fclose_orDie(fin); + free(buffIn); + free(buffOut); +} + + +static char* createOutFilename_orDie(const char* filename) +{ + size_t const inL = strlen(filename); + size_t const outL = inL + 5; + void* const outSpace = malloc_orDie(outL); + memset(outSpace, 0, outL); + strcat(outSpace, filename); + strcat(outSpace, ".zst"); + return (char*)outSpace; +} + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc < 2) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s FILE [LEVEL] [THREADS]\n", exeName); + return 1; + } + + int cLevel = 1; + int nbThreads = 1; + + if (argc >= 3) { + cLevel = atoi (argv[2]); + CHECK(cLevel != 0, "can't parse LEVEL!"); + } + + if (argc >= 4) { + nbThreads = atoi (argv[3]); + CHECK(nbThreads != 0, "can't parse THREADS!"); + } + + const char* const inFilename = argv[1]; + + char* const outFilename = createOutFilename_orDie(inFilename); + compressFile_orDie(inFilename, outFilename, cLevel, nbThreads); + + free(outFilename); /* not strictly required, since program execution stops there, + * but some static analyzer may complain otherwise */ + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/examples/streaming_compression_thread_pool.c b/cpp/third_party/zstd-1.5.7/examples/streaming_compression_thread_pool.c new file mode 100644 index 0000000000..a1a024129f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/streaming_compression_thread_pool.c @@ -0,0 +1,180 @@ +/* + * Copyright (c) Martin Liska, SUSE, Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +#include // printf +#include // free +#include // memset, strcat, strlen +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() +#include + +typedef struct compress_args +{ + const char *fname; + char *outName; + int cLevel; +#if defined(ZSTD_STATIC_LINKING_ONLY) + ZSTD_threadPool *pool; +#endif +} compress_args_t; + +static void *compressFile_orDie(void *data) +{ + const int nbThreads = 16; + + compress_args_t *args = (compress_args_t *)data; + fprintf (stderr, "Starting compression of %s with level %d, using %d threads\n", args->fname, args->cLevel, nbThreads); + /* Open the input and output files. */ + FILE* const fin = fopen_orDie(args->fname, "rb"); + FILE* const fout = fopen_orDie(args->outName, "wb"); + /* Create the input and output buffers. + * They may be any size, but we recommend using these functions to size them. + * Performance will only suffer significantly for very tiny buffers. + */ + size_t const buffInSize = ZSTD_CStreamInSize(); + void* const buffIn = malloc_orDie(buffInSize); + size_t const buffOutSize = ZSTD_CStreamOutSize(); + void* const buffOut = malloc_orDie(buffOutSize); + + /* Create the context. */ + ZSTD_CCtx* const cctx = ZSTD_createCCtx(); + CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); + +#if defined(ZSTD_STATIC_LINKING_ONLY) + size_t r = ZSTD_CCtx_refThreadPool(cctx, args->pool); + CHECK(r == 0, "ZSTD_CCtx_refThreadPool failed!"); +#endif + + /* Set any parameters you want. + * Here we set the compression level, and enable the checksum. + */ + CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, args->cLevel) ); + CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); + ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, nbThreads); + + /* This loop reads from the input file, compresses that entire chunk, + * and writes all output produced to the output file. + */ + size_t const toRead = buffInSize; + for (;;) { + size_t read = fread_orDie(buffIn, toRead, fin); + /* Select the flush mode. + * If the read may not be finished (read == toRead) we use + * ZSTD_e_continue. If this is the last chunk, we use ZSTD_e_end. + * Zstd optimizes the case where the first flush mode is ZSTD_e_end, + * since it knows it is compressing the entire source in one pass. + */ + int const lastChunk = (read < toRead); + ZSTD_EndDirective const mode = lastChunk ? ZSTD_e_end : ZSTD_e_continue; + /* Set the input buffer to what we just read. + * We compress until the input buffer is empty, each time flushing the + * output. + */ + ZSTD_inBuffer input = { buffIn, read, 0 }; + int finished; + do { + /* Compress into the output buffer and write all of the output to + * the file so we can reuse the buffer next iteration. + */ + ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; + size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); + CHECK_ZSTD(remaining); + fwrite_orDie(buffOut, output.pos, fout); + /* If we're on the last chunk we're finished when zstd returns 0, + * which means its consumed all the input AND finished the frame. + * Otherwise, we're finished when we've consumed all the input. + */ + finished = lastChunk ? (remaining == 0) : (input.pos == input.size); + } while (!finished); + CHECK(input.pos == input.size, + "Impossible: zstd only returns 0 when the input is completely consumed!"); + + if (lastChunk) { + break; + } + } + + fprintf (stderr, "Finishing compression of %s\n", args->outName); + + ZSTD_freeCCtx(cctx); + fclose_orDie(fout); + fclose_orDie(fin); + free(buffIn); + free(buffOut); + free(args->outName); + + return NULL; +} + + +static char* createOutFilename_orDie(const char* filename) +{ + size_t const inL = strlen(filename); + size_t const outL = inL + 5; + void* const outSpace = malloc_orDie(outL); + memset(outSpace, 0, outL); + strcat(outSpace, filename); + strcat(outSpace, ".zst"); + return (char*)outSpace; +} + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc<=3) { + printf("wrong arguments\n"); + printf("usage:\n"); + printf("%s POOL_SIZE LEVEL FILES\n", exeName); + return 1; + } + + int pool_size = atoi (argv[1]); + CHECK(pool_size != 0, "can't parse POOL_SIZE!"); + + int level = atoi (argv[2]); + CHECK(level != 0, "can't parse LEVEL!"); + + argc -= 3; + argv += 3; + +#if defined(ZSTD_STATIC_LINKING_ONLY) + ZSTD_threadPool *pool = ZSTD_createThreadPool (pool_size); + CHECK(pool != NULL, "ZSTD_createThreadPool() failed!"); + fprintf (stderr, "Using shared thread pool of size %d\n", pool_size); +#else + fprintf (stderr, "All threads use its own thread pool\n"); +#endif + + pthread_t *threads = malloc_orDie(argc * sizeof(pthread_t)); + compress_args_t *args = malloc_orDie(argc * sizeof(compress_args_t)); + + for (unsigned i = 0; i < argc; i++) + { + args[i].fname = argv[i]; + args[i].outName = createOutFilename_orDie(args[i].fname); + args[i].cLevel = level; +#if defined(ZSTD_STATIC_LINKING_ONLY) + args[i].pool = pool; +#endif + + pthread_create (&threads[i], NULL, compressFile_orDie, &args[i]); + } + + for (unsigned i = 0; i < argc; i++) + pthread_join (threads[i], NULL); + +#if defined(ZSTD_STATIC_LINKING_ONLY) + ZSTD_freeThreadPool (pool); +#endif + + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/examples/streaming_decompression.c b/cpp/third_party/zstd-1.5.7/examples/streaming_decompression.c new file mode 100644 index 0000000000..95fa112277 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/streaming_decompression.c @@ -0,0 +1,100 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +#include // fprintf +#include // free +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + +static void decompressFile_orDie(const char* fname) +{ + FILE* const fin = fopen_orDie(fname, "rb"); + size_t const buffInSize = ZSTD_DStreamInSize(); + void* const buffIn = malloc_orDie(buffInSize); + FILE* const fout = stdout; + size_t const buffOutSize = ZSTD_DStreamOutSize(); /* Guarantee to successfully flush at least one complete compressed block in all circumstances. */ + void* const buffOut = malloc_orDie(buffOutSize); + + ZSTD_DCtx* const dctx = ZSTD_createDCtx(); + CHECK(dctx != NULL, "ZSTD_createDCtx() failed!"); + + /* This loop assumes that the input file is one or more concatenated zstd + * streams. This example won't work if there is trailing non-zstd data at + * the end, but streaming decompression in general handles this case. + * ZSTD_decompressStream() returns 0 exactly when the frame is completed, + * and doesn't consume input after the frame. + */ + size_t const toRead = buffInSize; + size_t read; + size_t lastRet = 0; + int isEmpty = 1; + while ( (read = fread_orDie(buffIn, toRead, fin)) ) { + isEmpty = 0; + ZSTD_inBuffer input = { buffIn, read, 0 }; + /* Given a valid frame, zstd won't consume the last byte of the frame + * until it has flushed all of the decompressed data of the frame. + * Therefore, instead of checking if the return code is 0, we can + * decompress just check if input.pos < input.size. + */ + while (input.pos < input.size) { + ZSTD_outBuffer output = { buffOut, buffOutSize, 0 }; + /* The return code is zero if the frame is complete, but there may + * be multiple frames concatenated together. Zstd will automatically + * reset the context when a frame is complete. Still, calling + * ZSTD_DCtx_reset() can be useful to reset the context to a clean + * state, for instance if the last decompression call returned an + * error. + */ + size_t const ret = ZSTD_decompressStream(dctx, &output , &input); + CHECK_ZSTD(ret); + fwrite_orDie(buffOut, output.pos, fout); + lastRet = ret; + } + } + + if (isEmpty) { + fprintf(stderr, "input is empty\n"); + exit(1); + } + + if (lastRet != 0) { + /* The last return value from ZSTD_decompressStream did not end on a + * frame, but we reached the end of the file! We assume this is an + * error, and the input was truncated. + */ + fprintf(stderr, "EOF before end of stream: %zu\n", lastRet); + exit(1); + } + + ZSTD_freeDCtx(dctx); + fclose_orDie(fin); + fclose_orDie(fout); + free(buffIn); + free(buffOut); +} + + +int main(int argc, const char** argv) +{ + const char* const exeName = argv[0]; + + if (argc!=2) { + fprintf(stderr, "wrong arguments\n"); + fprintf(stderr, "usage:\n"); + fprintf(stderr, "%s FILE\n", exeName); + return 1; + } + + const char* const inFilename = argv[1]; + + decompressFile_orDie(inFilename); + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/examples/streaming_memory_usage.c b/cpp/third_party/zstd-1.5.7/examples/streaming_memory_usage.c new file mode 100644 index 0000000000..957acb61a3 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/examples/streaming_memory_usage.c @@ -0,0 +1,137 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/*=== Tuning parameter ===*/ +#ifndef MAX_TESTED_LEVEL +#define MAX_TESTED_LEVEL 12 +#endif + + +/*=== Dependencies ===*/ +#include // printf +#define ZSTD_STATIC_LINKING_ONLY +#include // presumes zstd library is installed +#include "common.h" // Helper functions, CHECK(), and CHECK_ZSTD() + + +/*=== functions ===*/ + +/*! readU32FromChar() : + @return : unsigned integer value read from input in `char` format + allows and interprets K, KB, KiB, M, MB and MiB suffix. + Will also modify `*stringPtr`, advancing it to position where it stopped reading. + Note : function result can overflow if digit string > MAX_UINT */ +static unsigned readU32FromChar(const char** stringPtr) +{ + unsigned result = 0; + while ((**stringPtr >='0') && (**stringPtr <='9')) + result *= 10, result += **stringPtr - '0', (*stringPtr)++ ; + if ((**stringPtr=='K') || (**stringPtr=='M')) { + result <<= 10; + if (**stringPtr=='M') result <<= 10; + (*stringPtr)++ ; + if (**stringPtr=='i') (*stringPtr)++; + if (**stringPtr=='B') (*stringPtr)++; + } + return result; +} + + +int main(int argc, char const *argv[]) { + + printf("\n Zstandard (v%s) memory usage for streaming : \n\n", ZSTD_versionString()); + + unsigned wLog = 0; + if (argc > 1) { + const char* valStr = argv[1]; + wLog = readU32FromChar(&valStr); + } + + int compressionLevel; + for (compressionLevel = 1; compressionLevel <= MAX_TESTED_LEVEL; compressionLevel++) { +#define INPUT_SIZE 5 +#define COMPRESSED_SIZE 128 + char const dataToCompress[INPUT_SIZE] = "abcde"; + char compressedData[COMPRESSED_SIZE]; + char decompressedData[INPUT_SIZE]; + /* the ZSTD_CCtx_params structure is a way to save parameters and use + * them across multiple contexts. We use them here so we can call the + * function ZSTD_estimateCStreamSize_usingCCtxParams(). + */ + ZSTD_CCtx_params* const cctxParams = ZSTD_createCCtxParams(); + CHECK(cctxParams != NULL, "ZSTD_createCCtxParams() failed!"); + + /* Set the compression level. */ + CHECK_ZSTD( ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_compressionLevel, compressionLevel) ); + /* Set the window log. + * The value 0 means use the default window log, which is equivalent to + * not setting it. + */ + CHECK_ZSTD( ZSTD_CCtxParams_setParameter(cctxParams, ZSTD_c_windowLog, wLog) ); + + /* Force the compressor to allocate the maximum memory size for a given + * level by not providing the pledged source size, or calling + * ZSTD_compressStream2() with ZSTD_e_end. + */ + ZSTD_CCtx* const cctx = ZSTD_createCCtx(); + CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); + CHECK_ZSTD( ZSTD_CCtx_setParametersUsingCCtxParams(cctx, cctxParams) ); + size_t compressedSize; + { + ZSTD_inBuffer inBuff = { dataToCompress, sizeof(dataToCompress), 0 }; + ZSTD_outBuffer outBuff = { compressedData, sizeof(compressedData), 0 }; + CHECK_ZSTD( ZSTD_compressStream(cctx, &outBuff, &inBuff) ); + size_t const remaining = ZSTD_endStream(cctx, &outBuff); + CHECK_ZSTD(remaining); + CHECK(remaining == 0, "Frame not flushed!"); + compressedSize = outBuff.pos; + } + + ZSTD_DCtx* const dctx = ZSTD_createDCtx(); + CHECK(dctx != NULL, "ZSTD_createDCtx() failed!"); + /* Set the maximum allowed window log. + * The value 0 means use the default window log, which is equivalent to + * not setting it. + */ + CHECK_ZSTD( ZSTD_DCtx_setParameter(dctx, ZSTD_d_windowLogMax, wLog) ); + /* forces decompressor to use maximum memory size, since the + * decompressed size is not stored in the frame header. + */ + { ZSTD_inBuffer inBuff = { compressedData, compressedSize, 0 }; + ZSTD_outBuffer outBuff = { decompressedData, sizeof(decompressedData), 0 }; + size_t const remaining = ZSTD_decompressStream(dctx, &outBuff, &inBuff); + CHECK_ZSTD(remaining); + CHECK(remaining == 0, "Frame not complete!"); + CHECK(outBuff.pos == sizeof(dataToCompress), "Bad decompression!"); + } + + size_t const cstreamSize = ZSTD_sizeof_CStream(cctx); + size_t const cstreamEstimatedSize = ZSTD_estimateCStreamSize_usingCCtxParams(cctxParams); + size_t const dstreamSize = ZSTD_sizeof_DStream(dctx); + size_t const dstreamEstimatedSize = ZSTD_estimateDStreamSize_fromFrame(compressedData, compressedSize); + + CHECK(cstreamSize <= cstreamEstimatedSize, "Compression mem (%u) > estimated (%u)", + (unsigned)cstreamSize, (unsigned)cstreamEstimatedSize); + CHECK(dstreamSize <= dstreamEstimatedSize, "Decompression mem (%u) > estimated (%u)", + (unsigned)dstreamSize, (unsigned)dstreamEstimatedSize); + + printf("Level %2i : Compression Mem = %5u KB (estimated : %5u KB) ; Decompression Mem = %4u KB (estimated : %5u KB)\n", + compressionLevel, + (unsigned)(cstreamSize>>10), (unsigned)(cstreamEstimatedSize>>10), + (unsigned)(dstreamSize>>10), (unsigned)(dstreamEstimatedSize>>10)); + + ZSTD_freeDCtx(dctx); + ZSTD_freeCCtx(cctx); + ZSTD_freeCCtxParams(cctxParams); + if (wLog) break; /* single test */ + } + return 0; +} diff --git a/cpp/third_party/zstd-1.5.7/lib/.gitignore b/cpp/third_party/zstd-1.5.7/lib/.gitignore new file mode 100644 index 0000000000..4cd50ac61e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/.gitignore @@ -0,0 +1,3 @@ +# make install artefact +libzstd.pc +libzstd-nomt diff --git a/cpp/third_party/zstd-1.5.7/lib/BUCK b/cpp/third_party/zstd-1.5.7/lib/BUCK new file mode 100644 index 0000000000..60c6bbb54d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/BUCK @@ -0,0 +1,232 @@ +cxx_library( + name='zstd', + header_namespace='', + exported_headers=['zstd.h'], + visibility=['PUBLIC'], + deps=[ + ':common', + ':compress', + ':decompress', + ':deprecated', + ], +) + +cxx_library( + name='compress', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('compress', 'zstd*.h'), + ]), + srcs=glob(['compress/zstd*.c', 'compress/hist.c']), + deps=[':common'], +) + +cxx_library( + name='decompress', + header_namespace='', + visibility=['PUBLIC'], + headers=subdir_glob([ + ('decompress', '*_impl.h'), + ]), + srcs=glob(['decompress/zstd*.c']), + deps=[ + ':common', + ':legacy', + ], +) + +cxx_library( + name='deprecated', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('deprecated', '*.h'), + ]), + srcs=glob(['deprecated/*.c']), + deps=[':common'], +) + +cxx_library( + name='legacy', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('legacy', '*.h'), + ]), + srcs=glob(['legacy/*.c']), + deps=[':common'], + exported_preprocessor_flags=[ + '-DZSTD_LEGACY_SUPPORT=4', + ], +) + +cxx_library( + name='zdict', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=['zdict.h'], + headers=subdir_glob([ + ('dictBuilder', 'divsufsort.h'), + ('dictBuilder', 'cover.h'), + ]), + srcs=glob(['dictBuilder/*.c']), + deps=[':common'], +) + +cxx_library( + name='compiler', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'compiler.h'), + ]), +) + +cxx_library( + name='cpu', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'cpu.h'), + ]), +) + +cxx_library( + name='bitstream', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'bitstream.h'), + ]), +) + +cxx_library( + name='entropy', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'fse.h'), + ('common', 'huf.h'), + ]), + srcs=[ + 'common/entropy_common.c', + 'common/fse_decompress.c', + 'compress/fse_compress.c', + 'compress/huf_compress.c', + 'decompress/huf_decompress.c', + ], + deps=[ + ':debug', + ':bitstream', + ':compiler', + ':errors', + ':mem', + ], +) + +cxx_library( + name='errors', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=[ + 'zstd_errors.h', + 'common/error_private.h', + ] + srcs=['common/error_private.c'], +) + +cxx_library( + name='mem', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'mem.h'), + ]), +) + +cxx_library( + name='pool', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'pool.h'), + ]), + srcs=['common/pool.c'], + deps=[ + ':threading', + ':zstd_common', + ], +) + +cxx_library( + name='threading', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'threading.h'), + ]), + srcs=['common/threading.c'], + exported_preprocessor_flags=[ + '-DZSTD_MULTITHREAD', + ], + exported_linker_flags=[ + '-pthread', + ], +) + +cxx_library( + name='xxhash', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'xxhash.h'), + ]), + srcs=['common/xxhash.c'], + exported_preprocessor_flags=[ + '-DXXH_NAMESPACE=ZSTD_', + ], +) + +cxx_library( + name='zstd_common', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('', 'zstd.h'), + ('common', 'zstd_internal.h'), + ]), + srcs=['common/zstd_common.c'], + deps=[ + ':compiler', + ':errors', + ':mem', + ], +) + +cxx_library( + name='debug', + header_namespace='', + visibility=['PUBLIC'], + exported_headers=subdir_glob([ + ('common', 'debug.h'), + ]), + srcs=['common/debug.c'], +) + +cxx_library( + name='common', + deps=[ + ':debug', + ':bitstream', + ':compiler', + ':cpu', + ':entropy', + ':errors', + ':mem', + ':pool', + ':threading', + ':xxhash', + ':zstd_common', + ] +) diff --git a/cpp/third_party/zstd-1.5.7/lib/Makefile b/cpp/third_party/zstd-1.5.7/lib/Makefile new file mode 100644 index 0000000000..a6a0eb09d8 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/Makefile @@ -0,0 +1,389 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ + +# default target (when running `make` with no argument) +lib-release: + +# Modules +ZSTD_LIB_COMPRESSION ?= 1 +ZSTD_LIB_DECOMPRESSION ?= 1 +ZSTD_LIB_DICTBUILDER ?= 1 +ZSTD_LIB_DEPRECATED ?= 0 + +# Input variables for libzstd.mk +ifeq ($(ZSTD_LIB_COMPRESSION), 0) + ZSTD_LIB_DICTBUILDER = 0 + ZSTD_LIB_DEPRECATED = 0 +endif + +ifeq ($(ZSTD_LIB_DECOMPRESSION), 0) + ZSTD_LEGACY_SUPPORT = 0 + ZSTD_LIB_DEPRECATED = 0 +endif + +include libzstd.mk + +ZSTD_FILES := $(ZSTD_COMMON_FILES) $(ZSTD_LEGACY_FILES) + +ifneq ($(ZSTD_LIB_COMPRESSION), 0) + ZSTD_FILES += $(ZSTD_COMPRESS_FILES) +endif + +ifneq ($(ZSTD_LIB_DECOMPRESSION), 0) + ZSTD_FILES += $(ZSTD_DECOMPRESS_FILES) +endif + +ifneq ($(ZSTD_LIB_DEPRECATED), 0) + ZSTD_FILES += $(ZSTD_DEPRECATED_FILES) +endif + +ifneq ($(ZSTD_LIB_DICTBUILDER), 0) + ZSTD_FILES += $(ZSTD_DICTBUILDER_FILES) +endif + +ZSTD_LOCAL_SRC := $(notdir $(ZSTD_FILES)) +ZSTD_LOCAL_OBJ0 := $(ZSTD_LOCAL_SRC:.c=.o) +ZSTD_LOCAL_OBJ := $(ZSTD_LOCAL_OBJ0:.S=.o) + +VERSION := $(ZSTD_VERSION) + +# Note: by default, the static library is built single-threaded and dynamic library is built +# multi-threaded. It is possible to force multi or single threaded builds by appending +# -mt or -nomt to the build target (like lib-mt for multi-threaded, lib-nomt for single-threaded). + + +CPPFLAGS_DYNLIB += -DZSTD_MULTITHREAD # dynamic library build defaults to multi-threaded +LDFLAGS_DYNLIB += -pthread +CPPFLAGS_STATICLIB += # static library build defaults to single-threaded + +# pkg-config Libs.private points to LDFLAGS_DYNLIB +PCLIB := $(LDFLAGS_DYNLIB) + +ifeq ($(findstring GCC,$(CCVER)),GCC) +decompress/zstd_decompress_block.o : CFLAGS+=-fno-tree-vectorize +endif + + +# macOS linker doesn't support -soname, and use different extension +# see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html +UNAME_TARGET_SYSTEM ?= $(UNAME) + +ifeq ($(UNAME_TARGET_SYSTEM), Darwin) + SHARED_EXT = dylib + SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT) + SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT) + SONAME_FLAGS = -install_name $(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER) +else + ifeq ($(UNAME_TARGET_SYSTEM), AIX) + SONAME_FLAGS = + else + SONAME_FLAGS = -Wl,-soname=libzstd.$(SHARED_EXT).$(LIBVER_MAJOR) + endif + SHARED_EXT = so + SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR) + SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) +endif + + +.PHONY: all +all: lib + + +.PHONY: libzstd.a # must be run every time +libzstd.a: CPPFLAGS += $(CPPFLAGS_STATICLIB) + +SET_CACHE_DIRECTORY = \ + +$(MAKE) --no-print-directory $@ \ + BUILD_DIR=obj/$(HASH_DIR) \ + CPPFLAGS="$(CPPFLAGS)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" + +ifndef BUILD_DIR +# determine BUILD_DIR from compilation flags + +libzstd.a: + $(SET_CACHE_DIRECTORY) + +else +# BUILD_DIR is defined + +ZSTD_STATICLIB_DIR := $(BUILD_DIR)/static +ZSTD_STATICLIB := $(ZSTD_STATICLIB_DIR)/libzstd.a +ZSTD_STATICLIB_OBJ := $(addprefix $(ZSTD_STATICLIB_DIR)/,$(ZSTD_LOCAL_OBJ)) +$(ZSTD_STATICLIB): ARFLAGS = rcs +$(ZSTD_STATICLIB): | $(ZSTD_STATICLIB_DIR) +$(ZSTD_STATICLIB): $(ZSTD_STATICLIB_OBJ) + # Check for multithread flag at target execution time + $(if $(filter -DZSTD_MULTITHREAD,$(CPPFLAGS)),\ + @echo compiling multi-threaded static library $(LIBVER),\ + @echo compiling single-threaded static library $(LIBVER)) + $(AR) $(ARFLAGS) $@ $^ + +libzstd.a: $(ZSTD_STATICLIB) + cp -f $< $@ + +endif + +ifneq (,$(filter Windows%,$(TARGET_SYSTEM))) + +LIBZSTD = dll/libzstd.dll +$(LIBZSTD): $(ZSTD_FILES) + @echo compiling dynamic library $(LIBVER) + $(CC) $(FLAGS) -DZSTD_DLL_EXPORT=1 -Wl,--out-implib,dll/libzstd.dll.a -shared $^ -o $@ + +else # not Windows + +LIBZSTD = libzstd.$(SHARED_EXT_VER) +.PHONY: $(LIBZSTD) # must be run every time +$(LIBZSTD): CPPFLAGS += $(CPPFLAGS_DYNLIB) +$(LIBZSTD): CFLAGS += -fPIC -fvisibility=hidden +$(LIBZSTD): LDFLAGS += -shared $(LDFLAGS_DYNLIB) + +ifndef BUILD_DIR +# determine BUILD_DIR from compilation flags + +$(LIBZSTD): + $(SET_CACHE_DIRECTORY) + +else +# BUILD_DIR is defined + +ZSTD_DYNLIB_DIR := $(BUILD_DIR)/dynamic +ZSTD_DYNLIB := $(ZSTD_DYNLIB_DIR)/$(LIBZSTD) +ZSTD_DYNLIB_OBJ := $(addprefix $(ZSTD_DYNLIB_DIR)/,$(ZSTD_LOCAL_OBJ)) + +$(ZSTD_DYNLIB): | $(ZSTD_DYNLIB_DIR) +$(ZSTD_DYNLIB): $(ZSTD_DYNLIB_OBJ) +# Check for multithread flag at target execution time + $(if $(filter -DZSTD_MULTITHREAD,$(CPPFLAGS)),\ + @echo compiling multi-threaded dynamic library $(LIBVER),\ + @echo compiling single-threaded dynamic library $(LIBVER)) + $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ + @echo creating versioned links + ln -sf $@ libzstd.$(SHARED_EXT_MAJOR) + ln -sf $@ libzstd.$(SHARED_EXT) + +$(LIBZSTD): $(ZSTD_DYNLIB) + cp -f $< $@ + +endif # ifndef BUILD_DIR +endif # if windows + +.PHONY: libzstd +libzstd : $(LIBZSTD) + +.PHONY: lib +lib : libzstd.a libzstd + + +# note : do not define lib-mt or lib-release as .PHONY +# make does not consider implicit pattern rule for .PHONY target + +%-mt : CPPFLAGS_DYNLIB := -DZSTD_MULTITHREAD +%-mt : CPPFLAGS_STATICLIB := -DZSTD_MULTITHREAD +%-mt : LDFLAGS_DYNLIB := -pthread +%-mt : PCLIB := +%-mt : PCMTLIB := $(LDFLAGS_DYNLIB) +%-mt : % + @echo multi-threaded build completed + +%-nomt : CPPFLAGS_DYNLIB := +%-nomt : LDFLAGS_DYNLIB := +%-nomt : CPPFLAGS_STATICLIB := +%-nomt : PCLIB := +%-nomt : % + @echo single-threaded build completed + +%-release : DEBUGFLAGS := +%-release : % + @echo release build completed + + +# Generate .h dependencies automatically + +# -MMD: compiler generates dependency information as a side-effect of compilation, without system headers +# -MP: adds phony target for each dependency other than main file. +DEPFLAGS = -MMD -MP + +# ensure that ZSTD_DYNLIB_DIR exists prior to generating %.o +$(ZSTD_DYNLIB_DIR)/%.o : %.c | $(ZSTD_DYNLIB_DIR) + @echo CC $@ + $(COMPILE.c) $(DEPFLAGS) $(OUTPUT_OPTION) $< + +$(ZSTD_STATICLIB_DIR)/%.o : %.c | $(ZSTD_STATICLIB_DIR) + @echo CC $@ + $(COMPILE.c) $(DEPFLAGS) $(OUTPUT_OPTION) $< + +$(ZSTD_DYNLIB_DIR)/%.o : %.S | $(ZSTD_DYNLIB_DIR) + @echo AS $@ + $(COMPILE.S) $(OUTPUT_OPTION) $< + +$(ZSTD_STATICLIB_DIR)/%.o : %.S | $(ZSTD_STATICLIB_DIR) + @echo AS $@ + $(COMPILE.S) $(OUTPUT_OPTION) $< + +MKDIR ?= mkdir -p +$(BUILD_DIR) $(ZSTD_DYNLIB_DIR) $(ZSTD_STATICLIB_DIR): + $(MKDIR) $@ + +DEPFILES := $(ZSTD_DYNLIB_OBJ:.o=.d) $(ZSTD_STATICLIB_OBJ:.o=.d) +$(DEPFILES): + +# The leading '-' means: do not fail is include fails (ex: directory does not exist yet) +-include $(wildcard $(DEPFILES)) + + +# Special case : build library in single-thread mode _and_ without zstdmt_compress.c +# Note : we still need threading.c and pool.c for the dictionary builder, +# but they will correctly behave single-threaded. +ZSTDMT_FILES = zstdmt_compress.c +ZSTD_NOMT_FILES = $(filter-out $(ZSTDMT_FILES),$(notdir $(ZSTD_FILES))) +libzstd-nomt: CFLAGS += -fPIC -fvisibility=hidden +libzstd-nomt: LDFLAGS += -shared +libzstd-nomt: $(ZSTD_NOMT_FILES) + @echo compiling single-thread dynamic library $(LIBVER) + @echo files : $(ZSTD_NOMT_FILES) + @if echo "$(ZSTD_NOMT_FILES)" | tr ' ' '\n' | $(GREP) -q zstdmt; then \ + echo "Error: Found zstdmt in list."; \ + exit 1; \ + fi + $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ + +.PHONY: clean +clean: + $(RM) -r *.dSYM # macOS-specific + $(RM) core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc + $(RM) dll/libzstd.dll dll/libzstd.lib libzstd-nomt* + $(RM) -r obj/* + @echo Cleaning library completed + +#----------------------------------------------------------------------------- +# make install is validated only for below listed environments +#----------------------------------------------------------------------------- +ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX MSYS_NT% CYGWIN_NT%,$(UNAME))) + +lib: libzstd.pc + +HAS_EXPLICIT_EXEC_PREFIX := $(if $(or $(EXEC_PREFIX),$(exec_prefix)),1,) + +DESTDIR ?= +# directory variables : GNU conventions prefer lowercase +# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html +# support both lower and uppercase (BSD), use uppercase in script +prefix ?= /usr/local +PREFIX ?= $(prefix) +exec_prefix ?= $(PREFIX) +EXEC_PREFIX ?= $(exec_prefix) +libdir ?= $(EXEC_PREFIX)/lib +LIBDIR ?= $(libdir) +includedir ?= $(PREFIX)/include +INCLUDEDIR ?= $(includedir) + +PCINCDIR := $(patsubst $(PREFIX)%,%,$(INCLUDEDIR)) +PCLIBDIR := $(patsubst $(EXEC_PREFIX)%,%,$(LIBDIR)) + +# If we successfully stripped off a prefix, we'll add a reference to the +# relevant pc variable. +PCINCPREFIX := $(if $(findstring $(INCLUDEDIR),$(PCINCDIR)),,$${prefix}) +PCLIBPREFIX := $(if $(findstring $(LIBDIR),$(PCLIBDIR)),,$${exec_prefix}) + +# If no explicit EXEC_PREFIX was set by the caller, write it out as a reference +# to PREFIX, rather than as a resolved value. +PCEXEC_PREFIX := $(if $(HAS_EXPLICIT_EXEC_PREFIX),$(EXEC_PREFIX),$${prefix}) + + +ifneq ($(MT),) + PCLIB := + PCMTLIB := $(LDFLAGS_DYNLIB) +else + PCLIB := $(LDFLAGS_DYNLIB) +endif + +ifneq (,$(filter FreeBSD NetBSD DragonFly,$(UNAME))) + PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig +else + PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig +endif + +ifneq (,$(filter SunOS,$(UNAME))) + INSTALL ?= ginstall +else + INSTALL ?= install +endif + +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= $(INSTALL) -m 644 + + +# pkg-config library define. +# For static single-threaded library declare -pthread in Libs.private +# For static multi-threaded library declare -pthread in Libs and Cflags +.PHONY: libzstd.pc +libzstd.pc: libzstd.pc.in + @echo creating pkgconfig + @sed \ + -e 's|@PREFIX@|$(PREFIX)|' \ + -e 's|@EXEC_PREFIX@|$(PCEXEC_PREFIX)|' \ + -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \ + -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \ + -e 's|@VERSION@|$(VERSION)|' \ + -e 's|@LIBS_MT@|$(PCMTLIB)|' \ + -e 's|@LIBS_PRIVATE@|$(PCLIB)|' \ + $< >$@ + +.PHONY: install +install: install-pc install-static install-shared install-includes + @echo zstd static and shared library installed + +.PHONY: install-pc +install-pc: libzstd.pc + [ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ + $(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/ + +.PHONY: install-static +install-static: + # only generate libzstd.a if it's not already present + [ -e libzstd.a ] || $(MAKE) libzstd.a-release + [ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ + @echo Installing static library + $(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR) + +.PHONY: install-shared +install-shared: + # only generate libzstd.so if it's not already present + [ -e $(LIBZSTD) ] || $(MAKE) libzstd-release + [ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ + @echo Installing shared library + $(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR) + ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) + ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) + +.PHONY: install-includes +install-includes: + [ -e $(DESTDIR)$(INCLUDEDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/ + @echo Installing includes + $(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) zstd_errors.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) zdict.h $(DESTDIR)$(INCLUDEDIR) + +.PHONY: uninstall +uninstall: + $(RM) $(DESTDIR)$(LIBDIR)/libzstd.a + $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) + $(RM) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) + $(RM) $(DESTDIR)$(LIBDIR)/$(LIBZSTD) + $(RM) $(DESTDIR)$(PKGCONFIGDIR)/libzstd.pc + $(RM) $(DESTDIR)$(INCLUDEDIR)/zstd.h + $(RM) $(DESTDIR)$(INCLUDEDIR)/zstd_errors.h + $(RM) $(DESTDIR)$(INCLUDEDIR)/zdict.h + @echo zstd libraries successfully uninstalled + +endif diff --git a/cpp/third_party/zstd-1.5.7/lib/README.md b/cpp/third_party/zstd-1.5.7/lib/README.md new file mode 100644 index 0000000000..b37f5fc4f3 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/README.md @@ -0,0 +1,248 @@ +Zstandard library files +================================ + +The __lib__ directory is split into several sub-directories, +in order to make it easier to select or exclude features. + + +#### Building + +`Makefile` script is provided, supporting [Makefile conventions](https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html#Makefile-Conventions), +including commands variables, staged install, directory variables and standard targets. +- `make` : generates both static and dynamic libraries +- `make install` : install libraries and headers in target system directories + +`libzstd` default scope is pretty large, including compression, decompression, dictionary builder, +and support for decoding legacy formats >= v0.5.0. +The scope can be reduced on demand (see paragraph _modular build_). + + +#### Multithreading support + +When building with `make`, by default the dynamic library is multithreaded and static library is single-threaded (for compatibility reasons). + +Enabling multithreading requires 2 conditions : +- set build macro `ZSTD_MULTITHREAD` (`-DZSTD_MULTITHREAD` for `gcc`) +- for POSIX systems : compile with pthread (`-pthread` compilation flag for `gcc`) + +For convenience, we provide a build target to generate multi and single threaded libraries: +- Force enable multithreading on both dynamic and static libraries by appending `-mt` to the target, e.g. `make lib-mt`. + Note that the `.pc` generated on calling `make lib-mt` will already include the require Libs and Cflags. +- Force disable multithreading on both dynamic and static libraries by appending `-nomt` to the target, e.g. `make lib-nomt`. +- By default, as mentioned before, dynamic library is multithreaded, and static library is single-threaded, e.g. `make lib`. + +When linking a POSIX program with a multithreaded version of `libzstd`, +note that it's necessary to invoke the `-pthread` flag during link stage. + +The `.pc` generated from `make install` or `make install-pc` always assume a single-threaded static library +is compiled. To correctly generate a `.pc` for the multi-threaded static library, set `MT=1` as ENV variable. + +Multithreading capabilities are exposed +via the [advanced API defined in `lib/zstd.h`](https://github.com/facebook/zstd/blob/v1.4.3/lib/zstd.h#L351). + + +#### API + +Zstandard's stable API is exposed within [lib/zstd.h](zstd.h). + + +#### Advanced API + +Optional advanced features are exposed via : + +- `lib/zstd_errors.h` : translates `size_t` function results + into a `ZSTD_ErrorCode`, for accurate error handling. + +- `ZSTD_STATIC_LINKING_ONLY` : if this macro is defined _before_ including `zstd.h`, + it unlocks access to the experimental API, + exposed in the second part of `zstd.h`. + All definitions in the experimental APIs are unstable, + they may still change in the future, or even be removed. + As a consequence, experimental definitions shall ___never be used with dynamic library___ ! + Only static linking is allowed. + + +#### Modular build + +It's possible to compile only a limited set of features within `libzstd`. +The file structure is designed to make this selection manually achievable for any build system : + +- Directory `lib/common` is always required, for all variants. + +- Compression source code lies in `lib/compress` + +- Decompression source code lies in `lib/decompress` + +- It's possible to include only `compress` or only `decompress`, they don't depend on each other. + +- `lib/dictBuilder` : makes it possible to generate dictionaries from a set of samples. + The API is exposed in `lib/dictBuilder/zdict.h`. + This module depends on both `lib/common` and `lib/compress` . + +- `lib/legacy` : makes it possible to decompress legacy zstd formats, starting from `v0.1.0`. + This module depends on `lib/common` and `lib/decompress`. + To enable this feature, define `ZSTD_LEGACY_SUPPORT` during compilation. + Specifying a number limits versions supported to that version onward. + For example, `ZSTD_LEGACY_SUPPORT=2` means : "support legacy formats >= v0.2.0". + Conversely, `ZSTD_LEGACY_SUPPORT=0` means "do __not__ support legacy formats". + By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=5`. + Decoding supported legacy format is a transparent capability triggered within decompression functions. + It's also allowed to invoke legacy API directly, exposed in `lib/legacy/zstd_legacy.h`. + Each version does also provide its own set of advanced API. + For example, advanced API for version `v0.4` is exposed in `lib/legacy/zstd_v04.h` . + +- While invoking `make libzstd`, it's possible to define build macros + `ZSTD_LIB_COMPRESSION`, `ZSTD_LIB_DECOMPRESSION`, `ZSTD_LIB_DICTBUILDER`, + and `ZSTD_LIB_DEPRECATED` as `0` to forgo compilation of the + corresponding features. This will also disable compilation of all + dependencies (e.g. `ZSTD_LIB_COMPRESSION=0` will also disable + dictBuilder). + +- There are a number of options that can help minimize the binary size of + `libzstd`. + + The first step is to select the components needed (using the above-described + `ZSTD_LIB_COMPRESSION` etc.). + + The next step is to set `ZSTD_LIB_MINIFY` to `1` when invoking `make`. This + disables various optional components and changes the compilation flags to + prioritize space-saving. + + Detailed options: Zstandard's code and build environment is set up by default + to optimize above all else for performance. In pursuit of this goal, Zstandard + makes significant trade-offs in code size. For example, Zstandard often has + more than one implementation of a particular component, with each + implementation optimized for different scenarios. For example, the Huffman + decoder has complementary implementations that decode the stream one symbol at + a time or two symbols at a time. Zstd normally includes both (and dispatches + between them at runtime), but by defining `HUF_FORCE_DECOMPRESS_X1` or + `HUF_FORCE_DECOMPRESS_X2`, you can force the use of one or the other, avoiding + compilation of the other. Similarly, `ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT` + and `ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG` force the compilation and use of + only one or the other of two decompression implementations. The smallest + binary is achieved by using `HUF_FORCE_DECOMPRESS_X1` and + `ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT` (implied by `ZSTD_LIB_MINIFY`). + + On the compressor side, Zstd's compression levels map to several internal + strategies. In environments where the higher compression levels aren't used, + it is possible to exclude all but the fastest strategy with + `ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP=1`. (Note that this will change + the behavior of the default compression level.) Or if you want to retain the + default compressor as well, you can set + `ZSTD_LIB_EXCLUDE_COMPRESSORS_GREEDY_AND_UP=1`, at the cost of an additional + ~20KB or so. + + For squeezing the last ounce of size out, you can also define + `ZSTD_NO_INLINE`, which disables inlining, and `ZSTD_STRIP_ERROR_STRINGS`, + which removes the error messages that are otherwise returned by + `ZSTD_getErrorName` (implied by `ZSTD_LIB_MINIFY`). + + Finally, when integrating into your application, make sure you're doing link- + time optimization and unused symbol garbage collection (via some combination of, + e.g., `-flto`, `-ffat-lto-objects`, `-fuse-linker-plugin`, + `-ffunction-sections`, `-fdata-sections`, `-fmerge-all-constants`, + `-Wl,--gc-sections`, `-Wl,-z,norelro`, and an archiver that understands + the compiler's intermediate representation, e.g., `AR=gcc-ar`). Consult your + compiler's documentation. + +- While invoking `make libzstd`, the build macro `ZSTD_LEGACY_MULTITHREADED_API=1` + will expose the deprecated `ZSTDMT` API exposed by `zstdmt_compress.h` in + the shared library, which is now hidden by default. + +- The build macro `STATIC_BMI2` can be set to 1 to force usage of `bmi2` instructions. + It is generally not necessary to set this build macro, + because `STATIC_BMI2` will be automatically set to 1 + on detecting the presence of the corresponding instruction set in the compilation target. + It's nonetheless available as an optional manual toggle for better control, + and can also be used to forcefully disable `bmi2` instructions by setting it to 0. + +- The build macro `DYNAMIC_BMI2` can be set to 1 or 0 in order to generate binaries + which can detect at runtime the presence of BMI2 instructions, and use them only if present. + These instructions contribute to better performance, notably on the decoder side. + By default, this feature is automatically enabled on detecting + the right instruction set (x64) and compiler (clang or gcc >= 5). + It's obviously disabled for different cpus, + or when BMI2 instruction set is _required_ by the compiler command line + (in this case, only the BMI2 code path is generated). + Setting this macro will either force to generate the BMI2 dispatcher (1) + or prevent it (0). It overrides automatic detection. + +- The build macro `ZSTD_NO_UNUSED_FUNCTIONS` can be defined to hide the definitions of functions + that zstd does not use. Not all unused functions are hidden, but they can be if needed. + Currently, this macro will hide function definitions in FSE and HUF that use an excessive + amount of stack space. + +- The build macro `ZSTD_NO_INTRINSICS` can be defined to disable all explicit intrinsics. + Compiler builtins are still used. + +- The build macro `ZSTD_DECODER_INTERNAL_BUFFER` can be set to control + the amount of extra memory used during decompression to store literals. + This defaults to 64kB. Reducing this value reduces the memory footprint of + `ZSTD_DCtx` decompression contexts, + but might also result in a small decompression speed cost. + +- The C compiler macros `ZSTDLIB_VISIBLE`, `ZSTDERRORLIB_VISIBLE` and `ZDICTLIB_VISIBLE` + can be overridden to control the visibility of zstd's API. Additionally, + `ZSTDLIB_STATIC_API` and `ZDICTLIB_STATIC_API` can be overridden to control the visibility + of zstd's static API. Specifically, it can be set to `ZSTDLIB_HIDDEN` to hide the symbols + from the shared library. These macros default to `ZSTDLIB_VISIBILITY`, + `ZSTDERRORLIB_VSIBILITY`, and `ZDICTLIB_VISIBILITY` if unset, for backwards compatibility + with the old macro names. + +- The C compiler macro `HUF_DISABLE_FAST_DECODE` disables the newer Huffman fast C + and assembly decoding loops. You may want to use this macro if these loops are + slower on your platform. + +#### Windows : using MinGW+MSYS to create DLL + +DLL can be created using MinGW+MSYS with the `make libzstd` command. +This command creates `dll\libzstd.dll` and the import library `dll\libzstd.lib`. +The import library is only required with Visual C++. +The header file `zstd.h` and the dynamic library `dll\libzstd.dll` are required to +compile a project using gcc/MinGW. +The dynamic library has to be added to linking options. +It means that if a project that uses ZSTD consists of a single `test-dll.c` +file it should be linked with `dll\libzstd.dll`. For example: +``` + gcc $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\libzstd.dll +``` +The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`. + + +#### Advanced Build options + +The build system requires a hash function in order to +separate object files created with different compilation flags. +By default, it tries to use `md5sum` or equivalent. +The hash function can be manually switched by setting the `HASH` variable. +For example : `make HASH=xxhsum` +The hash function needs to generate at least 64-bit using hexadecimal format. +When no hash function is found, +the Makefile just generates all object files into the same default directory, +irrespective of compilation flags. +This functionality only matters if `libzstd` is compiled multiple times +with different build flags. + +The build directory, where object files are stored +can also be manually controlled using variable `BUILD_DIR`, +for example `make BUILD_DIR=objectDir/v1`. +In which case, the hash function doesn't matter. + + +#### Deprecated API + +Obsolete API on their way out are stored in directory `lib/deprecated`. +At this stage, it contains older streaming prototypes, in `lib/deprecated/zbuff.h`. +These prototypes will be removed in some future version. +Consider migrating code towards supported streaming API exposed in `zstd.h`. + + +#### Miscellaneous + +The other files are not source code. There are : + + - `BUCK` : support for `buck` build system (https://buckbuild.com/) + - `Makefile` : `make` script to build and install zstd library (static and dynamic) + - `README.md` : this file + - `dll/` : resources directory for Windows compilation + - `libzstd.pc.in` : script for `pkg-config` (used in `make install`) diff --git a/cpp/third_party/zstd-1.5.7/lib/common/allocations.h b/cpp/third_party/zstd-1.5.7/lib/common/allocations.h new file mode 100644 index 0000000000..5e89955010 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/allocations.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* This file provides custom allocation primitives + */ + +#define ZSTD_DEPS_NEED_MALLOC +#include "zstd_deps.h" /* ZSTD_malloc, ZSTD_calloc, ZSTD_free, ZSTD_memset */ + +#include "compiler.h" /* MEM_STATIC */ +#define ZSTD_STATIC_LINKING_ONLY +#include "../zstd.h" /* ZSTD_customMem */ + +#ifndef ZSTD_ALLOCATIONS_H +#define ZSTD_ALLOCATIONS_H + +/* custom memory allocation functions */ + +MEM_STATIC void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem) +{ + if (customMem.customAlloc) + return customMem.customAlloc(customMem.opaque, size); + return ZSTD_malloc(size); +} + +MEM_STATIC void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem) +{ + if (customMem.customAlloc) { + /* calloc implemented as malloc+memset; + * not as efficient as calloc, but next best guess for custom malloc */ + void* const ptr = customMem.customAlloc(customMem.opaque, size); + ZSTD_memset(ptr, 0, size); + return ptr; + } + return ZSTD_calloc(1, size); +} + +MEM_STATIC void ZSTD_customFree(void* ptr, ZSTD_customMem customMem) +{ + if (ptr!=NULL) { + if (customMem.customFree) + customMem.customFree(customMem.opaque, ptr); + else + ZSTD_free(ptr); + } +} + +#endif /* ZSTD_ALLOCATIONS_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/bits.h b/cpp/third_party/zstd-1.5.7/lib/common/bits.h new file mode 100644 index 0000000000..f452f08891 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/bits.h @@ -0,0 +1,205 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_BITS_H +#define ZSTD_BITS_H + +#include "mem.h" + +MEM_STATIC unsigned ZSTD_countTrailingZeros32_fallback(U32 val) +{ + assert(val != 0); + { + static const U32 DeBruijnBytePos[32] = {0, 1, 28, 2, 29, 14, 24, 3, + 30, 22, 20, 15, 25, 17, 4, 8, + 31, 27, 13, 23, 21, 19, 16, 7, + 26, 12, 18, 6, 11, 5, 10, 9}; + return DeBruijnBytePos[((U32) ((val & -(S32) val) * 0x077CB531U)) >> 27]; + } +} + +MEM_STATIC unsigned ZSTD_countTrailingZeros32(U32 val) +{ + assert(val != 0); +#if defined(_MSC_VER) +# if STATIC_BMI2 + return (unsigned)_tzcnt_u32(val); +# else + if (val != 0) { + unsigned long r; + _BitScanForward(&r, val); + return (unsigned)r; + } else { + __assume(0); /* Should not reach this code path */ + } +# endif +#elif defined(__GNUC__) && (__GNUC__ >= 4) + return (unsigned)__builtin_ctz(val); +#elif defined(__ICCARM__) + return (unsigned)__builtin_ctz(val); +#else + return ZSTD_countTrailingZeros32_fallback(val); +#endif +} + +MEM_STATIC unsigned ZSTD_countLeadingZeros32_fallback(U32 val) +{ + assert(val != 0); + { + static const U32 DeBruijnClz[32] = {0, 9, 1, 10, 13, 21, 2, 29, + 11, 14, 16, 18, 22, 25, 3, 30, + 8, 12, 20, 28, 15, 17, 24, 7, + 19, 27, 23, 6, 26, 5, 4, 31}; + val |= val >> 1; + val |= val >> 2; + val |= val >> 4; + val |= val >> 8; + val |= val >> 16; + return 31 - DeBruijnClz[(val * 0x07C4ACDDU) >> 27]; + } +} + +MEM_STATIC unsigned ZSTD_countLeadingZeros32(U32 val) +{ + assert(val != 0); +#if defined(_MSC_VER) +# if STATIC_BMI2 + return (unsigned)_lzcnt_u32(val); +# else + if (val != 0) { + unsigned long r; + _BitScanReverse(&r, val); + return (unsigned)(31 - r); + } else { + __assume(0); /* Should not reach this code path */ + } +# endif +#elif defined(__GNUC__) && (__GNUC__ >= 4) + return (unsigned)__builtin_clz(val); +#elif defined(__ICCARM__) + return (unsigned)__builtin_clz(val); +#else + return ZSTD_countLeadingZeros32_fallback(val); +#endif +} + +MEM_STATIC unsigned ZSTD_countTrailingZeros64(U64 val) +{ + assert(val != 0); +#if defined(_MSC_VER) && defined(_WIN64) +# if STATIC_BMI2 + return (unsigned)_tzcnt_u64(val); +# else + if (val != 0) { + unsigned long r; + _BitScanForward64(&r, val); + return (unsigned)r; + } else { + __assume(0); /* Should not reach this code path */ + } +# endif +#elif defined(__GNUC__) && (__GNUC__ >= 4) && defined(__LP64__) + return (unsigned)__builtin_ctzll(val); +#elif defined(__ICCARM__) + return (unsigned)__builtin_ctzll(val); +#else + { + U32 mostSignificantWord = (U32)(val >> 32); + U32 leastSignificantWord = (U32)val; + if (leastSignificantWord == 0) { + return 32 + ZSTD_countTrailingZeros32(mostSignificantWord); + } else { + return ZSTD_countTrailingZeros32(leastSignificantWord); + } + } +#endif +} + +MEM_STATIC unsigned ZSTD_countLeadingZeros64(U64 val) +{ + assert(val != 0); +#if defined(_MSC_VER) && defined(_WIN64) +# if STATIC_BMI2 + return (unsigned)_lzcnt_u64(val); +# else + if (val != 0) { + unsigned long r; + _BitScanReverse64(&r, val); + return (unsigned)(63 - r); + } else { + __assume(0); /* Should not reach this code path */ + } +# endif +#elif defined(__GNUC__) && (__GNUC__ >= 4) + return (unsigned)(__builtin_clzll(val)); +#elif defined(__ICCARM__) + return (unsigned)(__builtin_clzll(val)); +#else + { + U32 mostSignificantWord = (U32)(val >> 32); + U32 leastSignificantWord = (U32)val; + if (mostSignificantWord == 0) { + return 32 + ZSTD_countLeadingZeros32(leastSignificantWord); + } else { + return ZSTD_countLeadingZeros32(mostSignificantWord); + } + } +#endif +} + +MEM_STATIC unsigned ZSTD_NbCommonBytes(size_t val) +{ + if (MEM_isLittleEndian()) { + if (MEM_64bits()) { + return ZSTD_countTrailingZeros64((U64)val) >> 3; + } else { + return ZSTD_countTrailingZeros32((U32)val) >> 3; + } + } else { /* Big Endian CPU */ + if (MEM_64bits()) { + return ZSTD_countLeadingZeros64((U64)val) >> 3; + } else { + return ZSTD_countLeadingZeros32((U32)val) >> 3; + } + } +} + +MEM_STATIC unsigned ZSTD_highbit32(U32 val) /* compress, dictBuilder, decodeCorpus */ +{ + assert(val != 0); + return 31 - ZSTD_countLeadingZeros32(val); +} + +/* ZSTD_rotateRight_*(): + * Rotates a bitfield to the right by "count" bits. + * https://en.wikipedia.org/w/index.php?title=Circular_shift&oldid=991635599#Implementing_circular_shifts + */ +MEM_STATIC +U64 ZSTD_rotateRight_U64(U64 const value, U32 count) { + assert(count < 64); + count &= 0x3F; /* for fickle pattern recognition */ + return (value >> count) | (U64)(value << ((0U - count) & 0x3F)); +} + +MEM_STATIC +U32 ZSTD_rotateRight_U32(U32 const value, U32 count) { + assert(count < 32); + count &= 0x1F; /* for fickle pattern recognition */ + return (value >> count) | (U32)(value << ((0U - count) & 0x1F)); +} + +MEM_STATIC +U16 ZSTD_rotateRight_U16(U16 const value, U32 count) { + assert(count < 16); + count &= 0x0F; /* for fickle pattern recognition */ + return (value >> count) | (U16)(value << ((0U - count) & 0x0F)); +} + +#endif /* ZSTD_BITS_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/bitstream.h b/cpp/third_party/zstd-1.5.7/lib/common/bitstream.h new file mode 100644 index 0000000000..3b7ad483d9 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/bitstream.h @@ -0,0 +1,454 @@ +/* ****************************************************************** + * bitstream + * Part of FSE library + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ +#ifndef BITSTREAM_H_MODULE +#define BITSTREAM_H_MODULE + +/* +* This API consists of small unitary functions, which must be inlined for best performance. +* Since link-time-optimization is not available for all compilers, +* these functions are defined into a .h to be included. +*/ + +/*-**************************************** +* Dependencies +******************************************/ +#include "mem.h" /* unaligned access routines */ +#include "compiler.h" /* UNLIKELY() */ +#include "debug.h" /* assert(), DEBUGLOG(), RAWLOG() */ +#include "error_private.h" /* error codes and messages */ +#include "bits.h" /* ZSTD_highbit32 */ + +/*========================================= +* Target specific +=========================================*/ +#ifndef ZSTD_NO_INTRINSICS +# if (defined(__BMI__) || defined(__BMI2__)) && defined(__GNUC__) +# include /* support for bextr (experimental)/bzhi */ +# elif defined(__ICCARM__) +# include +# endif +#endif + +#define STREAM_ACCUMULATOR_MIN_32 25 +#define STREAM_ACCUMULATOR_MIN_64 57 +#define STREAM_ACCUMULATOR_MIN ((U32)(MEM_32bits() ? STREAM_ACCUMULATOR_MIN_32 : STREAM_ACCUMULATOR_MIN_64)) + + +/*-****************************************** +* bitStream encoding API (write forward) +********************************************/ +typedef size_t BitContainerType; +/* bitStream can mix input from multiple sources. + * A critical property of these streams is that they encode and decode in **reverse** direction. + * So the first bit sequence you add will be the last to be read, like a LIFO stack. + */ +typedef struct { + BitContainerType bitContainer; + unsigned bitPos; + char* startPtr; + char* ptr; + char* endPtr; +} BIT_CStream_t; + +MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC, void* dstBuffer, size_t dstCapacity); +MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC, BitContainerType value, unsigned nbBits); +MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC); +MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC); + +/* Start with initCStream, providing the size of buffer to write into. +* bitStream will never write outside of this buffer. +* `dstCapacity` must be >= sizeof(bitD->bitContainer), otherwise @return will be an error code. +* +* bits are first added to a local register. +* Local register is BitContainerType, 64-bits on 64-bits systems, or 32-bits on 32-bits systems. +* Writing data into memory is an explicit operation, performed by the flushBits function. +* Hence keep track how many bits are potentially stored into local register to avoid register overflow. +* After a flushBits, a maximum of 7 bits might still be stored into local register. +* +* Avoid storing elements of more than 24 bits if you want compatibility with 32-bits bitstream readers. +* +* Last operation is to close the bitStream. +* The function returns the final size of CStream in bytes. +* If data couldn't fit into `dstBuffer`, it will return a 0 ( == not storable) +*/ + + +/*-******************************************** +* bitStream decoding API (read backward) +**********************************************/ +typedef struct { + BitContainerType bitContainer; + unsigned bitsConsumed; + const char* ptr; + const char* start; + const char* limitPtr; +} BIT_DStream_t; + +typedef enum { BIT_DStream_unfinished = 0, /* fully refilled */ + BIT_DStream_endOfBuffer = 1, /* still some bits left in bitstream */ + BIT_DStream_completed = 2, /* bitstream entirely consumed, bit-exact */ + BIT_DStream_overflow = 3 /* user requested more bits than present in bitstream */ + } BIT_DStream_status; /* result of BIT_reloadDStream() */ + +MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize); +MEM_STATIC BitContainerType BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits); +MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD); +MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* bitD); + + +/* Start by invoking BIT_initDStream(). +* A chunk of the bitStream is then stored into a local register. +* Local register size is 64-bits on 64-bits systems, 32-bits on 32-bits systems (BitContainerType). +* You can then retrieve bitFields stored into the local register, **in reverse order**. +* Local register is explicitly reloaded from memory by the BIT_reloadDStream() method. +* A reload guarantee a minimum of ((8*sizeof(bitD->bitContainer))-7) bits when its result is BIT_DStream_unfinished. +* Otherwise, it can be less than that, so proceed accordingly. +* Checking if DStream has reached its end can be performed with BIT_endOfDStream(). +*/ + + +/*-**************************************** +* unsafe API +******************************************/ +MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC, BitContainerType value, unsigned nbBits); +/* faster, but works only if value is "clean", meaning all high bits above nbBits are 0 */ + +MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC); +/* unsafe version; does not check buffer overflow */ + +MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits); +/* faster, but works only if nbBits >= 1 */ + +/*===== Local Constants =====*/ +static const unsigned BIT_mask[] = { + 0, 1, 3, 7, 0xF, 0x1F, + 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, + 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, 0x1FFFF, + 0x3FFFF, 0x7FFFF, 0xFFFFF, 0x1FFFFF, 0x3FFFFF, 0x7FFFFF, + 0xFFFFFF, 0x1FFFFFF, 0x3FFFFFF, 0x7FFFFFF, 0xFFFFFFF, 0x1FFFFFFF, + 0x3FFFFFFF, 0x7FFFFFFF}; /* up to 31 bits */ +#define BIT_MASK_SIZE (sizeof(BIT_mask) / sizeof(BIT_mask[0])) + +/*-************************************************************** +* bitStream encoding +****************************************************************/ +/*! BIT_initCStream() : + * `dstCapacity` must be > sizeof(size_t) + * @return : 0 if success, + * otherwise an error code (can be tested using ERR_isError()) */ +MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC, + void* startPtr, size_t dstCapacity) +{ + bitC->bitContainer = 0; + bitC->bitPos = 0; + bitC->startPtr = (char*)startPtr; + bitC->ptr = bitC->startPtr; + bitC->endPtr = bitC->startPtr + dstCapacity - sizeof(bitC->bitContainer); + if (dstCapacity <= sizeof(bitC->bitContainer)) return ERROR(dstSize_tooSmall); + return 0; +} + +FORCE_INLINE_TEMPLATE BitContainerType BIT_getLowerBits(BitContainerType bitContainer, U32 const nbBits) +{ +#if STATIC_BMI2 && !defined(ZSTD_NO_INTRINSICS) +# if (defined(__x86_64__) || defined(_M_X64)) && !defined(__ILP32__) + return _bzhi_u64(bitContainer, nbBits); +# else + DEBUG_STATIC_ASSERT(sizeof(bitContainer) == sizeof(U32)); + return _bzhi_u32(bitContainer, nbBits); +# endif +#else + assert(nbBits < BIT_MASK_SIZE); + return bitContainer & BIT_mask[nbBits]; +#endif +} + +/*! BIT_addBits() : + * can add up to 31 bits into `bitC`. + * Note : does not check for register overflow ! */ +MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC, + BitContainerType value, unsigned nbBits) +{ + DEBUG_STATIC_ASSERT(BIT_MASK_SIZE == 32); + assert(nbBits < BIT_MASK_SIZE); + assert(nbBits + bitC->bitPos < sizeof(bitC->bitContainer) * 8); + bitC->bitContainer |= BIT_getLowerBits(value, nbBits) << bitC->bitPos; + bitC->bitPos += nbBits; +} + +/*! BIT_addBitsFast() : + * works only if `value` is _clean_, + * meaning all high bits above nbBits are 0 */ +MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC, + BitContainerType value, unsigned nbBits) +{ + assert((value>>nbBits) == 0); + assert(nbBits + bitC->bitPos < sizeof(bitC->bitContainer) * 8); + bitC->bitContainer |= value << bitC->bitPos; + bitC->bitPos += nbBits; +} + +/*! BIT_flushBitsFast() : + * assumption : bitContainer has not overflowed + * unsafe version; does not check buffer overflow */ +MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC) +{ + size_t const nbBytes = bitC->bitPos >> 3; + assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8); + assert(bitC->ptr <= bitC->endPtr); + MEM_writeLEST(bitC->ptr, bitC->bitContainer); + bitC->ptr += nbBytes; + bitC->bitPos &= 7; + bitC->bitContainer >>= nbBytes*8; +} + +/*! BIT_flushBits() : + * assumption : bitContainer has not overflowed + * safe version; check for buffer overflow, and prevents it. + * note : does not signal buffer overflow. + * overflow will be revealed later on using BIT_closeCStream() */ +MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC) +{ + size_t const nbBytes = bitC->bitPos >> 3; + assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8); + assert(bitC->ptr <= bitC->endPtr); + MEM_writeLEST(bitC->ptr, bitC->bitContainer); + bitC->ptr += nbBytes; + if (bitC->ptr > bitC->endPtr) bitC->ptr = bitC->endPtr; + bitC->bitPos &= 7; + bitC->bitContainer >>= nbBytes*8; +} + +/*! BIT_closeCStream() : + * @return : size of CStream, in bytes, + * or 0 if it could not fit into dstBuffer */ +MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC) +{ + BIT_addBitsFast(bitC, 1, 1); /* endMark */ + BIT_flushBits(bitC); + if (bitC->ptr >= bitC->endPtr) return 0; /* overflow detected */ + return (size_t)(bitC->ptr - bitC->startPtr) + (bitC->bitPos > 0); +} + + +/*-******************************************************** +* bitStream decoding +**********************************************************/ +/*! BIT_initDStream() : + * Initialize a BIT_DStream_t. + * `bitD` : a pointer to an already allocated BIT_DStream_t structure. + * `srcSize` must be the *exact* size of the bitStream, in bytes. + * @return : size of stream (== srcSize), or an errorCode if a problem is detected + */ +MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize) +{ + if (srcSize < 1) { ZSTD_memset(bitD, 0, sizeof(*bitD)); return ERROR(srcSize_wrong); } + + bitD->start = (const char*)srcBuffer; + bitD->limitPtr = bitD->start + sizeof(bitD->bitContainer); + + if (srcSize >= sizeof(bitD->bitContainer)) { /* normal case */ + bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(bitD->bitContainer); + bitD->bitContainer = MEM_readLEST(bitD->ptr); + { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1]; + bitD->bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0; /* ensures bitsConsumed is always set */ + if (lastByte == 0) return ERROR(GENERIC); /* endMark not present */ } + } else { + bitD->ptr = bitD->start; + bitD->bitContainer = *(const BYTE*)(bitD->start); + switch(srcSize) + { + case 7: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[6]) << (sizeof(bitD->bitContainer)*8 - 16); + ZSTD_FALLTHROUGH; + + case 6: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[5]) << (sizeof(bitD->bitContainer)*8 - 24); + ZSTD_FALLTHROUGH; + + case 5: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[4]) << (sizeof(bitD->bitContainer)*8 - 32); + ZSTD_FALLTHROUGH; + + case 4: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[3]) << 24; + ZSTD_FALLTHROUGH; + + case 3: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[2]) << 16; + ZSTD_FALLTHROUGH; + + case 2: bitD->bitContainer += (BitContainerType)(((const BYTE*)(srcBuffer))[1]) << 8; + ZSTD_FALLTHROUGH; + + default: break; + } + { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1]; + bitD->bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0; + if (lastByte == 0) return ERROR(corruption_detected); /* endMark not present */ + } + bitD->bitsConsumed += (U32)(sizeof(bitD->bitContainer) - srcSize)*8; + } + + return srcSize; +} + +FORCE_INLINE_TEMPLATE BitContainerType BIT_getUpperBits(BitContainerType bitContainer, U32 const start) +{ + return bitContainer >> start; +} + +FORCE_INLINE_TEMPLATE BitContainerType BIT_getMiddleBits(BitContainerType bitContainer, U32 const start, U32 const nbBits) +{ + U32 const regMask = sizeof(bitContainer)*8 - 1; + /* if start > regMask, bitstream is corrupted, and result is undefined */ + assert(nbBits < BIT_MASK_SIZE); + /* x86 transform & ((1 << nbBits) - 1) to bzhi instruction, it is better + * than accessing memory. When bmi2 instruction is not present, we consider + * such cpus old (pre-Haswell, 2013) and their performance is not of that + * importance. + */ +#if defined(__x86_64__) || defined(_M_X64) + return (bitContainer >> (start & regMask)) & ((((U64)1) << nbBits) - 1); +#else + return (bitContainer >> (start & regMask)) & BIT_mask[nbBits]; +#endif +} + +/*! BIT_lookBits() : + * Provides next n bits from local register. + * local register is not modified. + * On 32-bits, maxNbBits==24. + * On 64-bits, maxNbBits==56. + * @return : value extracted */ +FORCE_INLINE_TEMPLATE BitContainerType BIT_lookBits(const BIT_DStream_t* bitD, U32 nbBits) +{ + /* arbitrate between double-shift and shift+mask */ +#if 1 + /* if bitD->bitsConsumed + nbBits > sizeof(bitD->bitContainer)*8, + * bitstream is likely corrupted, and result is undefined */ + return BIT_getMiddleBits(bitD->bitContainer, (sizeof(bitD->bitContainer)*8) - bitD->bitsConsumed - nbBits, nbBits); +#else + /* this code path is slower on my os-x laptop */ + U32 const regMask = sizeof(bitD->bitContainer)*8 - 1; + return ((bitD->bitContainer << (bitD->bitsConsumed & regMask)) >> 1) >> ((regMask-nbBits) & regMask); +#endif +} + +/*! BIT_lookBitsFast() : + * unsafe version; only works if nbBits >= 1 */ +MEM_STATIC BitContainerType BIT_lookBitsFast(const BIT_DStream_t* bitD, U32 nbBits) +{ + U32 const regMask = sizeof(bitD->bitContainer)*8 - 1; + assert(nbBits >= 1); + return (bitD->bitContainer << (bitD->bitsConsumed & regMask)) >> (((regMask+1)-nbBits) & regMask); +} + +FORCE_INLINE_TEMPLATE void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits) +{ + bitD->bitsConsumed += nbBits; +} + +/*! BIT_readBits() : + * Read (consume) next n bits from local register and update. + * Pay attention to not read more than nbBits contained into local register. + * @return : extracted value. */ +FORCE_INLINE_TEMPLATE BitContainerType BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits) +{ + BitContainerType const value = BIT_lookBits(bitD, nbBits); + BIT_skipBits(bitD, nbBits); + return value; +} + +/*! BIT_readBitsFast() : + * unsafe version; only works if nbBits >= 1 */ +MEM_STATIC BitContainerType BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits) +{ + BitContainerType const value = BIT_lookBitsFast(bitD, nbBits); + assert(nbBits >= 1); + BIT_skipBits(bitD, nbBits); + return value; +} + +/*! BIT_reloadDStream_internal() : + * Simple variant of BIT_reloadDStream(), with two conditions: + * 1. bitstream is valid : bitsConsumed <= sizeof(bitD->bitContainer)*8 + * 2. look window is valid after shifted down : bitD->ptr >= bitD->start + */ +MEM_STATIC BIT_DStream_status BIT_reloadDStream_internal(BIT_DStream_t* bitD) +{ + assert(bitD->bitsConsumed <= sizeof(bitD->bitContainer)*8); + bitD->ptr -= bitD->bitsConsumed >> 3; + assert(bitD->ptr >= bitD->start); + bitD->bitsConsumed &= 7; + bitD->bitContainer = MEM_readLEST(bitD->ptr); + return BIT_DStream_unfinished; +} + +/*! BIT_reloadDStreamFast() : + * Similar to BIT_reloadDStream(), but with two differences: + * 1. bitsConsumed <= sizeof(bitD->bitContainer)*8 must hold! + * 2. Returns BIT_DStream_overflow when bitD->ptr < bitD->limitPtr, at this + * point you must use BIT_reloadDStream() to reload. + */ +MEM_STATIC BIT_DStream_status BIT_reloadDStreamFast(BIT_DStream_t* bitD) +{ + if (UNLIKELY(bitD->ptr < bitD->limitPtr)) + return BIT_DStream_overflow; + return BIT_reloadDStream_internal(bitD); +} + +/*! BIT_reloadDStream() : + * Refill `bitD` from buffer previously set in BIT_initDStream() . + * This function is safe, it guarantees it will not never beyond src buffer. + * @return : status of `BIT_DStream_t` internal register. + * when status == BIT_DStream_unfinished, internal register is filled with at least 25 or 57 bits */ +FORCE_INLINE_TEMPLATE BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD) +{ + /* note : once in overflow mode, a bitstream remains in this mode until it's reset */ + if (UNLIKELY(bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8))) { + static const BitContainerType zeroFilled = 0; + bitD->ptr = (const char*)&zeroFilled; /* aliasing is allowed for char */ + /* overflow detected, erroneous scenario or end of stream: no update */ + return BIT_DStream_overflow; + } + + assert(bitD->ptr >= bitD->start); + + if (bitD->ptr >= bitD->limitPtr) { + return BIT_reloadDStream_internal(bitD); + } + if (bitD->ptr == bitD->start) { + /* reached end of bitStream => no update */ + if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return BIT_DStream_endOfBuffer; + return BIT_DStream_completed; + } + /* start < ptr < limitPtr => cautious update */ + { U32 nbBytes = bitD->bitsConsumed >> 3; + BIT_DStream_status result = BIT_DStream_unfinished; + if (bitD->ptr - nbBytes < bitD->start) { + nbBytes = (U32)(bitD->ptr - bitD->start); /* ptr > start */ + result = BIT_DStream_endOfBuffer; + } + bitD->ptr -= nbBytes; + bitD->bitsConsumed -= nbBytes*8; + bitD->bitContainer = MEM_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD->bitContainer), otherwise bitD->ptr == bitD->start */ + return result; + } +} + +/*! BIT_endOfDStream() : + * @return : 1 if DStream has _exactly_ reached its end (all bits consumed). + */ +MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* DStream) +{ + return ((DStream->ptr == DStream->start) && (DStream->bitsConsumed == sizeof(DStream->bitContainer)*8)); +} + +#endif /* BITSTREAM_H_MODULE */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/compiler.h b/cpp/third_party/zstd-1.5.7/lib/common/compiler.h new file mode 100644 index 0000000000..1f7da50e6d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/compiler.h @@ -0,0 +1,464 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_COMPILER_H +#define ZSTD_COMPILER_H + +#include + +#include "portability_macros.h" + +/*-******************************************************* +* Compiler specifics +*********************************************************/ +/* force inlining */ + +#if !defined(ZSTD_NO_INLINE) +#if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# define INLINE_KEYWORD inline +#else +# define INLINE_KEYWORD +#endif + +#if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) +# define FORCE_INLINE_ATTR __attribute__((always_inline)) +#elif defined(_MSC_VER) +# define FORCE_INLINE_ATTR __forceinline +#else +# define FORCE_INLINE_ATTR +#endif + +#else + +#define INLINE_KEYWORD +#define FORCE_INLINE_ATTR + +#endif + +/** + On MSVC qsort requires that functions passed into it use the __cdecl calling conversion(CC). + This explicitly marks such functions as __cdecl so that the code will still compile + if a CC other than __cdecl has been made the default. +*/ +#if defined(_MSC_VER) +# define WIN_CDECL __cdecl +#else +# define WIN_CDECL +#endif + +/* UNUSED_ATTR tells the compiler it is okay if the function is unused. */ +#if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) +# define UNUSED_ATTR __attribute__((unused)) +#else +# define UNUSED_ATTR +#endif + +/** + * FORCE_INLINE_TEMPLATE is used to define C "templates", which take constant + * parameters. They must be inlined for the compiler to eliminate the constant + * branches. + */ +#define FORCE_INLINE_TEMPLATE static INLINE_KEYWORD FORCE_INLINE_ATTR UNUSED_ATTR +/** + * HINT_INLINE is used to help the compiler generate better code. It is *not* + * used for "templates", so it can be tweaked based on the compilers + * performance. + * + * gcc-4.8 and gcc-4.9 have been shown to benefit from leaving off the + * always_inline attribute. + * + * clang up to 5.0.0 (trunk) benefit tremendously from the always_inline + * attribute. + */ +#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8 && __GNUC__ < 5 +# define HINT_INLINE static INLINE_KEYWORD +#else +# define HINT_INLINE FORCE_INLINE_TEMPLATE +#endif + +/* "soft" inline : + * The compiler is free to select if it's a good idea to inline or not. + * The main objective is to silence compiler warnings + * when a defined function in included but not used. + * + * Note : this macro is prefixed `MEM_` because it used to be provided by `mem.h` unit. + * Updating the prefix is probably preferable, but requires a fairly large codemod, + * since this name is used everywhere. + */ +#ifndef MEM_STATIC /* already defined in Linux Kernel mem.h */ +#if defined(__GNUC__) +# define MEM_STATIC static __inline UNUSED_ATTR +#elif defined(__IAR_SYSTEMS_ICC__) +# define MEM_STATIC static inline UNUSED_ATTR +#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# define MEM_STATIC static inline +#elif defined(_MSC_VER) +# define MEM_STATIC static __inline +#else +# define MEM_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */ +#endif +#endif + +/* force no inlining */ +#ifdef _MSC_VER +# define FORCE_NOINLINE static __declspec(noinline) +#else +# if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) +# define FORCE_NOINLINE static __attribute__((__noinline__)) +# else +# define FORCE_NOINLINE static +# endif +#endif + + +/* target attribute */ +#if defined(__GNUC__) || defined(__IAR_SYSTEMS_ICC__) +# define TARGET_ATTRIBUTE(target) __attribute__((__target__(target))) +#else +# define TARGET_ATTRIBUTE(target) +#endif + +/* Target attribute for BMI2 dynamic dispatch. + * Enable lzcnt, bmi, and bmi2. + * We test for bmi1 & bmi2. lzcnt is included in bmi1. + */ +#define BMI2_TARGET_ATTRIBUTE TARGET_ATTRIBUTE("lzcnt,bmi,bmi2") + +/* prefetch + * can be disabled, by declaring NO_PREFETCH build macro */ +#if defined(NO_PREFETCH) +# define PREFETCH_L1(ptr) do { (void)(ptr); } while (0) /* disabled */ +# define PREFETCH_L2(ptr) do { (void)(ptr); } while (0) /* disabled */ +#else +# if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) && !defined(_M_ARM64EC) /* _mm_prefetch() is not defined outside of x86/x64 */ +# include /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ +# define PREFETCH_L1(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) +# define PREFETCH_L2(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T1) +# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) +# define PREFETCH_L1(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) +# define PREFETCH_L2(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 2 /* locality */) +# elif defined(__aarch64__) +# define PREFETCH_L1(ptr) do { __asm__ __volatile__("prfm pldl1keep, %0" ::"Q"(*(ptr))); } while (0) +# define PREFETCH_L2(ptr) do { __asm__ __volatile__("prfm pldl2keep, %0" ::"Q"(*(ptr))); } while (0) +# else +# define PREFETCH_L1(ptr) do { (void)(ptr); } while (0) /* disabled */ +# define PREFETCH_L2(ptr) do { (void)(ptr); } while (0) /* disabled */ +# endif +#endif /* NO_PREFETCH */ + +#define CACHELINE_SIZE 64 + +#define PREFETCH_AREA(p, s) \ + do { \ + const char* const _ptr = (const char*)(p); \ + size_t const _size = (size_t)(s); \ + size_t _pos; \ + for (_pos=0; _pos<_size; _pos+=CACHELINE_SIZE) { \ + PREFETCH_L2(_ptr + _pos); \ + } \ + } while (0) + +/* vectorization + * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax, + * and some compilers, like Intel ICC and MCST LCC, do not support it at all. */ +#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && !defined(__LCC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5) +# define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize"))) +# else +# define DONT_VECTORIZE _Pragma("GCC optimize(\"no-tree-vectorize\")") +# endif +#else +# define DONT_VECTORIZE +#endif + +/* Tell the compiler that a branch is likely or unlikely. + * Only use these macros if it causes the compiler to generate better code. + * If you can remove a LIKELY/UNLIKELY annotation without speed changes in gcc + * and clang, please do. + */ +#if defined(__GNUC__) +#define LIKELY(x) (__builtin_expect((x), 1)) +#define UNLIKELY(x) (__builtin_expect((x), 0)) +#else +#define LIKELY(x) (x) +#define UNLIKELY(x) (x) +#endif + +#if __has_builtin(__builtin_unreachable) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))) +# define ZSTD_UNREACHABLE do { assert(0), __builtin_unreachable(); } while (0) +#else +# define ZSTD_UNREACHABLE do { assert(0); } while (0) +#endif + +/* disable warnings */ +#ifdef _MSC_VER /* Visual Studio */ +# include /* For Visual 2005 */ +# pragma warning(disable : 4100) /* disable: C4100: unreferenced formal parameter */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */ +# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */ +# pragma warning(disable : 4324) /* disable: C4324: padded structure */ +#endif + +/* compile time determination of SIMD support */ +#if !defined(ZSTD_NO_INTRINSICS) +# if defined(__AVX2__) +# define ZSTD_ARCH_X86_AVX2 +# endif +# if defined(__SSE2__) || defined(_M_X64) || (defined (_M_IX86) && defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) +# define ZSTD_ARCH_X86_SSE2 +# endif +# if defined(__ARM_NEON) || defined(_M_ARM64) +# define ZSTD_ARCH_ARM_NEON +# endif +# +# if defined(ZSTD_ARCH_X86_AVX2) +# include +# endif +# if defined(ZSTD_ARCH_X86_SSE2) +# include +# elif defined(ZSTD_ARCH_ARM_NEON) +# include +# endif +#endif + +/* C-language Attributes are added in C23. */ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201710L) && defined(__has_c_attribute) +# define ZSTD_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) +#else +# define ZSTD_HAS_C_ATTRIBUTE(x) 0 +#endif + +/* Only use C++ attributes in C++. Some compilers report support for C++ + * attributes when compiling with C. + */ +#if defined(__cplusplus) && defined(__has_cpp_attribute) +# define ZSTD_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +# define ZSTD_HAS_CPP_ATTRIBUTE(x) 0 +#endif + +/* Define ZSTD_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute. + * - C23: https://en.cppreference.com/w/c/language/attributes/fallthrough + * - CPP17: https://en.cppreference.com/w/cpp/language/attributes/fallthrough + * - Else: __attribute__((__fallthrough__)) + */ +#ifndef ZSTD_FALLTHROUGH +# if ZSTD_HAS_C_ATTRIBUTE(fallthrough) +# define ZSTD_FALLTHROUGH [[fallthrough]] +# elif ZSTD_HAS_CPP_ATTRIBUTE(fallthrough) +# define ZSTD_FALLTHROUGH [[fallthrough]] +# elif __has_attribute(__fallthrough__) +/* Leading semicolon is to satisfy gcc-11 with -pedantic. Without the semicolon + * gcc complains about: a label can only be part of a statement and a declaration is not a statement. + */ +# define ZSTD_FALLTHROUGH ; __attribute__((__fallthrough__)) +# else +# define ZSTD_FALLTHROUGH +# endif +#endif + +/*-************************************************************** +* Alignment +*****************************************************************/ + +/* @return 1 if @u is a 2^n value, 0 otherwise + * useful to check a value is valid for alignment restrictions */ +MEM_STATIC int ZSTD_isPower2(size_t u) { + return (u & (u-1)) == 0; +} + +/* this test was initially positioned in mem.h, + * but this file is removed (or replaced) for linux kernel + * so it's now hosted in compiler.h, + * which remains valid for both user & kernel spaces. + */ + +#ifndef ZSTD_ALIGNOF +# if defined(__GNUC__) || defined(_MSC_VER) +/* covers gcc, clang & MSVC */ +/* note : this section must come first, before C11, + * due to a limitation in the kernel source generator */ +# define ZSTD_ALIGNOF(T) __alignof(T) + +# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) +/* C11 support */ +# include +# define ZSTD_ALIGNOF(T) alignof(T) + +# else +/* No known support for alignof() - imperfect backup */ +# define ZSTD_ALIGNOF(T) (sizeof(void*) < sizeof(T) ? sizeof(void*) : sizeof(T)) + +# endif +#endif /* ZSTD_ALIGNOF */ + +#ifndef ZSTD_ALIGNED +/* C90-compatible alignment macro (GCC/Clang). Adjust for other compilers if needed. */ +# if defined(__GNUC__) || defined(__clang__) +# define ZSTD_ALIGNED(a) __attribute__((aligned(a))) +# elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ +# define ZSTD_ALIGNED(a) _Alignas(a) +#elif defined(_MSC_VER) +# define ZSTD_ALIGNED(n) __declspec(align(n)) +# else + /* this compiler will require its own alignment instruction */ +# define ZSTD_ALIGNED(...) +# endif +#endif /* ZSTD_ALIGNED */ + + +/*-************************************************************** +* Sanitizer +*****************************************************************/ + +/** + * Zstd relies on pointer overflow in its decompressor. + * We add this attribute to functions that rely on pointer overflow. + */ +#ifndef ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +# if __has_attribute(no_sanitize) +# if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 8 + /* gcc < 8 only has signed-integer-overlow which triggers on pointer overflow */ +# define ZSTD_ALLOW_POINTER_OVERFLOW_ATTR __attribute__((no_sanitize("signed-integer-overflow"))) +# else + /* older versions of clang [3.7, 5.0) will warn that pointer-overflow is ignored. */ +# define ZSTD_ALLOW_POINTER_OVERFLOW_ATTR __attribute__((no_sanitize("pointer-overflow"))) +# endif +# else +# define ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +# endif +#endif + +/** + * Helper function to perform a wrapped pointer difference without triggering + * UBSAN. + * + * @returns lhs - rhs with wrapping + */ +MEM_STATIC +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +ptrdiff_t ZSTD_wrappedPtrDiff(unsigned char const* lhs, unsigned char const* rhs) +{ + return lhs - rhs; +} + +/** + * Helper function to perform a wrapped pointer add without triggering UBSAN. + * + * @return ptr + add with wrapping + */ +MEM_STATIC +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +unsigned char const* ZSTD_wrappedPtrAdd(unsigned char const* ptr, ptrdiff_t add) +{ + return ptr + add; +} + +/** + * Helper function to perform a wrapped pointer subtraction without triggering + * UBSAN. + * + * @return ptr - sub with wrapping + */ +MEM_STATIC +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +unsigned char const* ZSTD_wrappedPtrSub(unsigned char const* ptr, ptrdiff_t sub) +{ + return ptr - sub; +} + +/** + * Helper function to add to a pointer that works around C's undefined behavior + * of adding 0 to NULL. + * + * @returns `ptr + add` except it defines `NULL + 0 == NULL`. + */ +MEM_STATIC +unsigned char* ZSTD_maybeNullPtrAdd(unsigned char* ptr, ptrdiff_t add) +{ + return add > 0 ? ptr + add : ptr; +} + +/* Issue #3240 reports an ASAN failure on an llvm-mingw build. Out of an + * abundance of caution, disable our custom poisoning on mingw. */ +#ifdef __MINGW32__ +#ifndef ZSTD_ASAN_DONT_POISON_WORKSPACE +#define ZSTD_ASAN_DONT_POISON_WORKSPACE 1 +#endif +#ifndef ZSTD_MSAN_DONT_POISON_WORKSPACE +#define ZSTD_MSAN_DONT_POISON_WORKSPACE 1 +#endif +#endif + +#if ZSTD_MEMORY_SANITIZER && !defined(ZSTD_MSAN_DONT_POISON_WORKSPACE) +/* Not all platforms that support msan provide sanitizers/msan_interface.h. + * We therefore declare the functions we need ourselves, rather than trying to + * include the header file... */ +#include /* size_t */ +#define ZSTD_DEPS_NEED_STDINT +#include "zstd_deps.h" /* intptr_t */ + +/* Make memory region fully initialized (without changing its contents). */ +void __msan_unpoison(const volatile void *a, size_t size); + +/* Make memory region fully uninitialized (without changing its contents). + This is a legacy interface that does not update origin information. Use + __msan_allocated_memory() instead. */ +void __msan_poison(const volatile void *a, size_t size); + +/* Returns the offset of the first (at least partially) poisoned byte in the + memory range, or -1 if the whole range is good. */ +intptr_t __msan_test_shadow(const volatile void *x, size_t size); + +/* Print shadow and origin for the memory range to stderr in a human-readable + format. */ +void __msan_print_shadow(const volatile void *x, size_t size); +#endif + +#if ZSTD_ADDRESS_SANITIZER && !defined(ZSTD_ASAN_DONT_POISON_WORKSPACE) +/* Not all platforms that support asan provide sanitizers/asan_interface.h. + * We therefore declare the functions we need ourselves, rather than trying to + * include the header file... */ +#include /* size_t */ + +/** + * Marks a memory region ([addr, addr+size)) as unaddressable. + * + * This memory must be previously allocated by your program. Instrumented + * code is forbidden from accessing addresses in this region until it is + * unpoisoned. This function is not guaranteed to poison the entire region - + * it could poison only a subregion of [addr, addr+size) due to ASan + * alignment restrictions. + * + * \note This function is not thread-safe because no two threads can poison or + * unpoison memory in the same memory region simultaneously. + * + * \param addr Start of memory region. + * \param size Size of memory region. */ +void __asan_poison_memory_region(void const volatile *addr, size_t size); + +/** + * Marks a memory region ([addr, addr+size)) as addressable. + * + * This memory must be previously allocated by your program. Accessing + * addresses in this region is allowed until this region is poisoned again. + * This function could unpoison a super-region of [addr, addr+size) due + * to ASan alignment restrictions. + * + * \note This function is not thread-safe because no two threads can + * poison or unpoison memory in the same memory region simultaneously. + * + * \param addr Start of memory region. + * \param size Size of memory region. */ +void __asan_unpoison_memory_region(void const volatile *addr, size_t size); +#endif + +#endif /* ZSTD_COMPILER_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/cpu.h b/cpp/third_party/zstd-1.5.7/lib/common/cpu.h new file mode 100644 index 0000000000..3f15d560f0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/cpu.h @@ -0,0 +1,249 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_COMMON_CPU_H +#define ZSTD_COMMON_CPU_H + +/** + * Implementation taken from folly/CpuId.h + * https://github.com/facebook/folly/blob/master/folly/CpuId.h + */ + +#include "mem.h" + +#ifdef _MSC_VER +#include +#endif + +typedef struct { + U32 f1c; + U32 f1d; + U32 f7b; + U32 f7c; +} ZSTD_cpuid_t; + +MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) { + U32 f1c = 0; + U32 f1d = 0; + U32 f7b = 0; + U32 f7c = 0; +#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) +#if !defined(_M_X64) || !defined(__clang__) || __clang_major__ >= 16 + int reg[4]; + __cpuid((int*)reg, 0); + { + int const n = reg[0]; + if (n >= 1) { + __cpuid((int*)reg, 1); + f1c = (U32)reg[2]; + f1d = (U32)reg[3]; + } + if (n >= 7) { + __cpuidex((int*)reg, 7, 0); + f7b = (U32)reg[1]; + f7c = (U32)reg[2]; + } + } +#else + /* Clang compiler has a bug (fixed in https://reviews.llvm.org/D101338) in + * which the `__cpuid` intrinsic does not save and restore `rbx` as it needs + * to due to being a reserved register. So in that case, do the `cpuid` + * ourselves. Clang supports inline assembly anyway. + */ + U32 n; + __asm__( + "pushq %%rbx\n\t" + "cpuid\n\t" + "popq %%rbx\n\t" + : "=a"(n) + : "a"(0) + : "rcx", "rdx"); + if (n >= 1) { + U32 f1a; + __asm__( + "pushq %%rbx\n\t" + "cpuid\n\t" + "popq %%rbx\n\t" + : "=a"(f1a), "=c"(f1c), "=d"(f1d) + : "a"(1) + :); + } + if (n >= 7) { + __asm__( + "pushq %%rbx\n\t" + "cpuid\n\t" + "movq %%rbx, %%rax\n\t" + "popq %%rbx" + : "=a"(f7b), "=c"(f7c) + : "a"(7), "c"(0) + : "rdx"); + } +#endif +#elif defined(__i386__) && defined(__PIC__) && !defined(__clang__) && defined(__GNUC__) + /* The following block like the normal cpuid branch below, but gcc + * reserves ebx for use of its pic register so we must specially + * handle the save and restore to avoid clobbering the register + */ + U32 n; + __asm__( + "pushl %%ebx\n\t" + "cpuid\n\t" + "popl %%ebx\n\t" + : "=a"(n) + : "a"(0) + : "ecx", "edx"); + if (n >= 1) { + U32 f1a; + __asm__( + "pushl %%ebx\n\t" + "cpuid\n\t" + "popl %%ebx\n\t" + : "=a"(f1a), "=c"(f1c), "=d"(f1d) + : "a"(1)); + } + if (n >= 7) { + __asm__( + "pushl %%ebx\n\t" + "cpuid\n\t" + "movl %%ebx, %%eax\n\t" + "popl %%ebx" + : "=a"(f7b), "=c"(f7c) + : "a"(7), "c"(0) + : "edx"); + } +#elif defined(__x86_64__) || defined(_M_X64) || defined(__i386__) + U32 n; + __asm__("cpuid" : "=a"(n) : "a"(0) : "ebx", "ecx", "edx"); + if (n >= 1) { + U32 f1a; + __asm__("cpuid" : "=a"(f1a), "=c"(f1c), "=d"(f1d) : "a"(1) : "ebx"); + } + if (n >= 7) { + U32 f7a; + __asm__("cpuid" + : "=a"(f7a), "=b"(f7b), "=c"(f7c) + : "a"(7), "c"(0) + : "edx"); + } +#endif + { + ZSTD_cpuid_t cpuid; + cpuid.f1c = f1c; + cpuid.f1d = f1d; + cpuid.f7b = f7b; + cpuid.f7c = f7c; + return cpuid; + } +} + +#define X(name, r, bit) \ + MEM_STATIC int ZSTD_cpuid_##name(ZSTD_cpuid_t const cpuid) { \ + return ((cpuid.r) & (1U << bit)) != 0; \ + } + +/* cpuid(1): Processor Info and Feature Bits. */ +#define C(name, bit) X(name, f1c, bit) + C(sse3, 0) + C(pclmuldq, 1) + C(dtes64, 2) + C(monitor, 3) + C(dscpl, 4) + C(vmx, 5) + C(smx, 6) + C(eist, 7) + C(tm2, 8) + C(ssse3, 9) + C(cnxtid, 10) + C(fma, 12) + C(cx16, 13) + C(xtpr, 14) + C(pdcm, 15) + C(pcid, 17) + C(dca, 18) + C(sse41, 19) + C(sse42, 20) + C(x2apic, 21) + C(movbe, 22) + C(popcnt, 23) + C(tscdeadline, 24) + C(aes, 25) + C(xsave, 26) + C(osxsave, 27) + C(avx, 28) + C(f16c, 29) + C(rdrand, 30) +#undef C +#define D(name, bit) X(name, f1d, bit) + D(fpu, 0) + D(vme, 1) + D(de, 2) + D(pse, 3) + D(tsc, 4) + D(msr, 5) + D(pae, 6) + D(mce, 7) + D(cx8, 8) + D(apic, 9) + D(sep, 11) + D(mtrr, 12) + D(pge, 13) + D(mca, 14) + D(cmov, 15) + D(pat, 16) + D(pse36, 17) + D(psn, 18) + D(clfsh, 19) + D(ds, 21) + D(acpi, 22) + D(mmx, 23) + D(fxsr, 24) + D(sse, 25) + D(sse2, 26) + D(ss, 27) + D(htt, 28) + D(tm, 29) + D(pbe, 31) +#undef D + +/* cpuid(7): Extended Features. */ +#define B(name, bit) X(name, f7b, bit) + B(bmi1, 3) + B(hle, 4) + B(avx2, 5) + B(smep, 7) + B(bmi2, 8) + B(erms, 9) + B(invpcid, 10) + B(rtm, 11) + B(mpx, 14) + B(avx512f, 16) + B(avx512dq, 17) + B(rdseed, 18) + B(adx, 19) + B(smap, 20) + B(avx512ifma, 21) + B(pcommit, 22) + B(clflushopt, 23) + B(clwb, 24) + B(avx512pf, 26) + B(avx512er, 27) + B(avx512cd, 28) + B(sha, 29) + B(avx512bw, 30) + B(avx512vl, 31) +#undef B +#define C(name, bit) X(name, f7c, bit) + C(prefetchwt1, 0) + C(avx512vbmi, 1) +#undef C + +#undef X + +#endif /* ZSTD_COMMON_CPU_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/debug.c b/cpp/third_party/zstd-1.5.7/lib/common/debug.c new file mode 100644 index 0000000000..9d0b7d229c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/debug.c @@ -0,0 +1,30 @@ +/* ****************************************************************** + * debug + * Part of FSE library + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + + +/* + * This module only hosts one global variable + * which can be used to dynamically influence the verbosity of traces, + * such as DEBUGLOG and RAWLOG + */ + +#include "debug.h" + +#if !defined(ZSTD_LINUX_KERNEL) || (DEBUGLEVEL>=2) +/* We only use this when DEBUGLEVEL>=2, but we get -Werror=pedantic errors if a + * translation unit is empty. So remove this from Linux kernel builds, but + * otherwise just leave it in. + */ +int g_debuglevel = DEBUGLEVEL; +#endif diff --git a/cpp/third_party/zstd-1.5.7/lib/common/debug.h b/cpp/third_party/zstd-1.5.7/lib/common/debug.h new file mode 100644 index 0000000000..4b60ddf7f5 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/debug.h @@ -0,0 +1,107 @@ +/* ****************************************************************** + * debug + * Part of FSE library + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + + +/* + * The purpose of this header is to enable debug functions. + * They regroup assert(), DEBUGLOG() and RAWLOG() for run-time, + * and DEBUG_STATIC_ASSERT() for compile-time. + * + * By default, DEBUGLEVEL==0, which means run-time debug is disabled. + * + * Level 1 enables assert() only. + * Starting level 2, traces can be generated and pushed to stderr. + * The higher the level, the more verbose the traces. + * + * It's possible to dynamically adjust level using variable g_debug_level, + * which is only declared if DEBUGLEVEL>=2, + * and is a global variable, not multi-thread protected (use with care) + */ + +#ifndef DEBUG_H_12987983217 +#define DEBUG_H_12987983217 + + +/* static assert is triggered at compile time, leaving no runtime artefact. + * static assert only works with compile-time constants. + * Also, this variant can only be used inside a function. */ +#define DEBUG_STATIC_ASSERT(c) (void)sizeof(char[(c) ? 1 : -1]) + + +/* DEBUGLEVEL is expected to be defined externally, + * typically through compiler command line. + * Value must be a number. */ +#ifndef DEBUGLEVEL +# define DEBUGLEVEL 0 +#endif + + +/* recommended values for DEBUGLEVEL : + * 0 : release mode, no debug, all run-time checks disabled + * 1 : enables assert() only, no display + * 2 : reserved, for currently active debug path + * 3 : events once per object lifetime (CCtx, CDict, etc.) + * 4 : events once per frame + * 5 : events once per block + * 6 : events once per sequence (verbose) + * 7+: events at every position (*very* verbose) + * + * It's generally inconvenient to output traces > 5. + * In which case, it's possible to selectively trigger high verbosity levels + * by modifying g_debug_level. + */ + +#if (DEBUGLEVEL>=1) +# define ZSTD_DEPS_NEED_ASSERT +# include "zstd_deps.h" +#else +# ifndef assert /* assert may be already defined, due to prior #include */ +# define assert(condition) ((void)0) /* disable assert (default) */ +# endif +#endif + +#if (DEBUGLEVEL>=2) +# define ZSTD_DEPS_NEED_IO +# include "zstd_deps.h" +extern int g_debuglevel; /* the variable is only declared, + it actually lives in debug.c, + and is shared by the whole process. + It's not thread-safe. + It's useful when enabling very verbose levels + on selective conditions (such as position in src) */ + +# define RAWLOG(l, ...) \ + do { \ + if (l<=g_debuglevel) { \ + ZSTD_DEBUG_PRINT(__VA_ARGS__); \ + } \ + } while (0) + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) +#define LINE_AS_STRING TOSTRING(__LINE__) + +# define DEBUGLOG(l, ...) \ + do { \ + if (l<=g_debuglevel) { \ + ZSTD_DEBUG_PRINT(__FILE__ ":" LINE_AS_STRING ": " __VA_ARGS__); \ + ZSTD_DEBUG_PRINT(" \n"); \ + } \ + } while (0) +#else +# define RAWLOG(l, ...) do { } while (0) /* disabled */ +# define DEBUGLOG(l, ...) do { } while (0) /* disabled */ +#endif + +#endif /* DEBUG_H_12987983217 */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/entropy_common.c b/cpp/third_party/zstd-1.5.7/lib/common/entropy_common.c new file mode 100644 index 0000000000..e2173afb0a --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/entropy_common.c @@ -0,0 +1,340 @@ +/* ****************************************************************** + * Common functions of New Generation Entropy library + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + +/* ************************************* +* Dependencies +***************************************/ +#include "mem.h" +#include "error_private.h" /* ERR_*, ERROR */ +#define FSE_STATIC_LINKING_ONLY /* FSE_MIN_TABLELOG */ +#include "fse.h" +#include "huf.h" +#include "bits.h" /* ZSDT_highbit32, ZSTD_countTrailingZeros32 */ + + +/*=== Version ===*/ +unsigned FSE_versionNumber(void) { return FSE_VERSION_NUMBER; } + + +/*=== Error Management ===*/ +unsigned FSE_isError(size_t code) { return ERR_isError(code); } +const char* FSE_getErrorName(size_t code) { return ERR_getErrorName(code); } + +unsigned HUF_isError(size_t code) { return ERR_isError(code); } +const char* HUF_getErrorName(size_t code) { return ERR_getErrorName(code); } + + +/*-************************************************************** +* FSE NCount encoding-decoding +****************************************************************/ +FORCE_INLINE_TEMPLATE +size_t FSE_readNCount_body(short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, + const void* headerBuffer, size_t hbSize) +{ + const BYTE* const istart = (const BYTE*) headerBuffer; + const BYTE* const iend = istart + hbSize; + const BYTE* ip = istart; + int nbBits; + int remaining; + int threshold; + U32 bitStream; + int bitCount; + unsigned charnum = 0; + unsigned const maxSV1 = *maxSVPtr + 1; + int previous0 = 0; + + if (hbSize < 8) { + /* This function only works when hbSize >= 8 */ + char buffer[8] = {0}; + ZSTD_memcpy(buffer, headerBuffer, hbSize); + { size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr, + buffer, sizeof(buffer)); + if (FSE_isError(countSize)) return countSize; + if (countSize > hbSize) return ERROR(corruption_detected); + return countSize; + } } + assert(hbSize >= 8); + + /* init */ + ZSTD_memset(normalizedCounter, 0, (*maxSVPtr+1) * sizeof(normalizedCounter[0])); /* all symbols not present in NCount have a frequency of 0 */ + bitStream = MEM_readLE32(ip); + nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ + if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge); + bitStream >>= 4; + bitCount = 4; + *tableLogPtr = nbBits; + remaining = (1<> 1; + while (repeats >= 12) { + charnum += 3 * 12; + if (LIKELY(ip <= iend-7)) { + ip += 3; + } else { + bitCount -= (int)(8 * (iend - 7 - ip)); + bitCount &= 31; + ip = iend - 4; + } + bitStream = MEM_readLE32(ip) >> bitCount; + repeats = ZSTD_countTrailingZeros32(~bitStream | 0x80000000) >> 1; + } + charnum += 3 * repeats; + bitStream >>= 2 * repeats; + bitCount += 2 * repeats; + + /* Add the final repeat which isn't 0b11. */ + assert((bitStream & 3) < 3); + charnum += bitStream & 3; + bitCount += 2; + + /* This is an error, but break and return an error + * at the end, because returning out of a loop makes + * it harder for the compiler to optimize. + */ + if (charnum >= maxSV1) break; + + /* We don't need to set the normalized count to 0 + * because we already memset the whole buffer to 0. + */ + + if (LIKELY(ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) { + assert((bitCount >> 3) <= 3); /* For first condition to work */ + ip += bitCount>>3; + bitCount &= 7; + } else { + bitCount -= (int)(8 * (iend - 4 - ip)); + bitCount &= 31; + ip = iend - 4; + } + bitStream = MEM_readLE32(ip) >> bitCount; + } + { + int const max = (2*threshold-1) - remaining; + int count; + + if ((bitStream & (threshold-1)) < (U32)max) { + count = bitStream & (threshold-1); + bitCount += nbBits-1; + } else { + count = bitStream & (2*threshold-1); + if (count >= threshold) count -= max; + bitCount += nbBits; + } + + count--; /* extra accuracy */ + /* When it matters (small blocks), this is a + * predictable branch, because we don't use -1. + */ + if (count >= 0) { + remaining -= count; + } else { + assert(count == -1); + remaining += count; + } + normalizedCounter[charnum++] = (short)count; + previous0 = !count; + + assert(threshold > 1); + if (remaining < threshold) { + /* This branch can be folded into the + * threshold update condition because we + * know that threshold > 1. + */ + if (remaining <= 1) break; + nbBits = ZSTD_highbit32(remaining) + 1; + threshold = 1 << (nbBits - 1); + } + if (charnum >= maxSV1) break; + + if (LIKELY(ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) { + ip += bitCount>>3; + bitCount &= 7; + } else { + bitCount -= (int)(8 * (iend - 4 - ip)); + bitCount &= 31; + ip = iend - 4; + } + bitStream = MEM_readLE32(ip) >> bitCount; + } } + if (remaining != 1) return ERROR(corruption_detected); + /* Only possible when there are too many zeros. */ + if (charnum > maxSV1) return ERROR(maxSymbolValue_tooSmall); + if (bitCount > 32) return ERROR(corruption_detected); + *maxSVPtr = charnum-1; + + ip += (bitCount+7)>>3; + return ip-istart; +} + +/* Avoids the FORCE_INLINE of the _body() function. */ +static size_t FSE_readNCount_body_default( + short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, + const void* headerBuffer, size_t hbSize) +{ + return FSE_readNCount_body(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); +} + +#if DYNAMIC_BMI2 +BMI2_TARGET_ATTRIBUTE static size_t FSE_readNCount_body_bmi2( + short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, + const void* headerBuffer, size_t hbSize) +{ + return FSE_readNCount_body(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); +} +#endif + +size_t FSE_readNCount_bmi2( + short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, + const void* headerBuffer, size_t hbSize, int bmi2) +{ +#if DYNAMIC_BMI2 + if (bmi2) { + return FSE_readNCount_body_bmi2(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); + } +#endif + (void)bmi2; + return FSE_readNCount_body_default(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize); +} + +size_t FSE_readNCount( + short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, + const void* headerBuffer, size_t hbSize) +{ + return FSE_readNCount_bmi2(normalizedCounter, maxSVPtr, tableLogPtr, headerBuffer, hbSize, /* bmi2 */ 0); +} + + +/*! HUF_readStats() : + Read compact Huffman tree, saved by HUF_writeCTable(). + `huffWeight` is destination buffer. + `rankStats` is assumed to be a table of at least HUF_TABLELOG_MAX U32. + @return : size read from `src` , or an error Code . + Note : Needed by HUF_readCTable() and HUF_readDTableX?() . +*/ +size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats, + U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize) +{ + U32 wksp[HUF_READ_STATS_WORKSPACE_SIZE_U32]; + return HUF_readStats_wksp(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, wksp, sizeof(wksp), /* flags */ 0); +} + +FORCE_INLINE_TEMPLATE size_t +HUF_readStats_body(BYTE* huffWeight, size_t hwSize, U32* rankStats, + U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize, + void* workSpace, size_t wkspSize, + int bmi2) +{ + U32 weightTotal; + const BYTE* ip = (const BYTE*) src; + size_t iSize; + size_t oSize; + + if (!srcSize) return ERROR(srcSize_wrong); + iSize = ip[0]; + /* ZSTD_memset(huffWeight, 0, hwSize); *//* is not necessary, even though some analyzer complain ... */ + + if (iSize >= 128) { /* special header */ + oSize = iSize - 127; + iSize = ((oSize+1)/2); + if (iSize+1 > srcSize) return ERROR(srcSize_wrong); + if (oSize >= hwSize) return ERROR(corruption_detected); + ip += 1; + { U32 n; + for (n=0; n> 4; + huffWeight[n+1] = ip[n/2] & 15; + } } } + else { /* header compressed with FSE (normal case) */ + if (iSize+1 > srcSize) return ERROR(srcSize_wrong); + /* max (hwSize-1) values decoded, as last one is implied */ + oSize = FSE_decompress_wksp_bmi2(huffWeight, hwSize-1, ip+1, iSize, 6, workSpace, wkspSize, bmi2); + if (FSE_isError(oSize)) return oSize; + } + + /* collect weight stats */ + ZSTD_memset(rankStats, 0, (HUF_TABLELOG_MAX + 1) * sizeof(U32)); + weightTotal = 0; + { U32 n; for (n=0; n HUF_TABLELOG_MAX) return ERROR(corruption_detected); + rankStats[huffWeight[n]]++; + weightTotal += (1 << huffWeight[n]) >> 1; + } } + if (weightTotal == 0) return ERROR(corruption_detected); + + /* get last non-null symbol weight (implied, total must be 2^n) */ + { U32 const tableLog = ZSTD_highbit32(weightTotal) + 1; + if (tableLog > HUF_TABLELOG_MAX) return ERROR(corruption_detected); + *tableLogPtr = tableLog; + /* determine last weight */ + { U32 const total = 1 << tableLog; + U32 const rest = total - weightTotal; + U32 const verif = 1 << ZSTD_highbit32(rest); + U32 const lastWeight = ZSTD_highbit32(rest) + 1; + if (verif != rest) return ERROR(corruption_detected); /* last value must be a clean power of 2 */ + huffWeight[oSize] = (BYTE)lastWeight; + rankStats[lastWeight]++; + } } + + /* check tree construction validity */ + if ((rankStats[1] < 2) || (rankStats[1] & 1)) return ERROR(corruption_detected); /* by construction : at least 2 elts of rank 1, must be even */ + + /* results */ + *nbSymbolsPtr = (U32)(oSize+1); + return iSize+1; +} + +/* Avoids the FORCE_INLINE of the _body() function. */ +static size_t HUF_readStats_body_default(BYTE* huffWeight, size_t hwSize, U32* rankStats, + U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize, + void* workSpace, size_t wkspSize) +{ + return HUF_readStats_body(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize, 0); +} + +#if DYNAMIC_BMI2 +static BMI2_TARGET_ATTRIBUTE size_t HUF_readStats_body_bmi2(BYTE* huffWeight, size_t hwSize, U32* rankStats, + U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize, + void* workSpace, size_t wkspSize) +{ + return HUF_readStats_body(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize, 1); +} +#endif + +size_t HUF_readStats_wksp(BYTE* huffWeight, size_t hwSize, U32* rankStats, + U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize, + void* workSpace, size_t wkspSize, + int flags) +{ +#if DYNAMIC_BMI2 + if (flags & HUF_flags_bmi2) { + return HUF_readStats_body_bmi2(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize); + } +#endif + (void)flags; + return HUF_readStats_body_default(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspSize); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/common/error_private.c b/cpp/third_party/zstd-1.5.7/lib/common/error_private.c new file mode 100644 index 0000000000..7e7f24f675 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/error_private.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* The purpose of this file is to have a single list of error strings embedded in binary */ + +#include "error_private.h" + +const char* ERR_getErrorString(ERR_enum code) +{ +#ifdef ZSTD_STRIP_ERROR_STRINGS + (void)code; + return "Error strings stripped"; +#else + static const char* const notErrorCode = "Unspecified error code"; + switch( code ) + { + case PREFIX(no_error): return "No error detected"; + case PREFIX(GENERIC): return "Error (generic)"; + case PREFIX(prefix_unknown): return "Unknown frame descriptor"; + case PREFIX(version_unsupported): return "Version not supported"; + case PREFIX(frameParameter_unsupported): return "Unsupported frame parameter"; + case PREFIX(frameParameter_windowTooLarge): return "Frame requires too much memory for decoding"; + case PREFIX(corruption_detected): return "Data corruption detected"; + case PREFIX(checksum_wrong): return "Restored data doesn't match checksum"; + case PREFIX(literals_headerWrong): return "Header of Literals' block doesn't respect format specification"; + case PREFIX(parameter_unsupported): return "Unsupported parameter"; + case PREFIX(parameter_combination_unsupported): return "Unsupported combination of parameters"; + case PREFIX(parameter_outOfBound): return "Parameter is out of bound"; + case PREFIX(init_missing): return "Context should be init first"; + case PREFIX(memory_allocation): return "Allocation error : not enough memory"; + case PREFIX(workSpace_tooSmall): return "workSpace buffer is not large enough"; + case PREFIX(stage_wrong): return "Operation not authorized at current processing stage"; + case PREFIX(tableLog_tooLarge): return "tableLog requires too much memory : unsupported"; + case PREFIX(maxSymbolValue_tooLarge): return "Unsupported max Symbol Value : too large"; + case PREFIX(maxSymbolValue_tooSmall): return "Specified maxSymbolValue is too small"; + case PREFIX(cannotProduce_uncompressedBlock): return "This mode cannot generate an uncompressed block"; + case PREFIX(stabilityCondition_notRespected): return "pledged buffer stability condition is not respected"; + case PREFIX(dictionary_corrupted): return "Dictionary is corrupted"; + case PREFIX(dictionary_wrong): return "Dictionary mismatch"; + case PREFIX(dictionaryCreation_failed): return "Cannot create Dictionary from provided samples"; + case PREFIX(dstSize_tooSmall): return "Destination buffer is too small"; + case PREFIX(srcSize_wrong): return "Src size is incorrect"; + case PREFIX(dstBuffer_null): return "Operation on NULL destination buffer"; + case PREFIX(noForwardProgress_destFull): return "Operation made no progress over multiple calls, due to output buffer being full"; + case PREFIX(noForwardProgress_inputEmpty): return "Operation made no progress over multiple calls, due to input being empty"; + /* following error codes are not stable and may be removed or changed in a future version */ + case PREFIX(frameIndex_tooLarge): return "Frame index is too large"; + case PREFIX(seekableIO): return "An I/O error occurred when reading/seeking"; + case PREFIX(dstBuffer_wrong): return "Destination buffer is wrong"; + case PREFIX(srcBuffer_wrong): return "Source buffer is wrong"; + case PREFIX(sequenceProducer_failed): return "Block-level external sequence producer returned an error code"; + case PREFIX(externalSequences_invalid): return "External sequences are not valid"; + case PREFIX(maxCode): + default: return notErrorCode; + } +#endif +} diff --git a/cpp/third_party/zstd-1.5.7/lib/common/error_private.h b/cpp/third_party/zstd-1.5.7/lib/common/error_private.h new file mode 100644 index 0000000000..9dcc859512 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/error_private.h @@ -0,0 +1,158 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* Note : this module is expected to remain private, do not expose it */ + +#ifndef ERROR_H_MODULE +#define ERROR_H_MODULE + +/* **************************************** +* Dependencies +******************************************/ +#include "../zstd_errors.h" /* enum list */ +#include "compiler.h" +#include "debug.h" +#include "zstd_deps.h" /* size_t */ + +/* **************************************** +* Compiler-specific +******************************************/ +#if defined(__GNUC__) +# define ERR_STATIC static __attribute__((unused)) +#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# define ERR_STATIC static inline +#elif defined(_MSC_VER) +# define ERR_STATIC static __inline +#else +# define ERR_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */ +#endif + + +/*-**************************************** +* Customization (error_public.h) +******************************************/ +typedef ZSTD_ErrorCode ERR_enum; +#define PREFIX(name) ZSTD_error_##name + + +/*-**************************************** +* Error codes handling +******************************************/ +#undef ERROR /* already defined on Visual Studio */ +#define ERROR(name) ZSTD_ERROR(name) +#define ZSTD_ERROR(name) ((size_t)-PREFIX(name)) + +ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); } + +ERR_STATIC ERR_enum ERR_getErrorCode(size_t code) { if (!ERR_isError(code)) return (ERR_enum)0; return (ERR_enum) (0-code); } + +/* check and forward error code */ +#define CHECK_V_F(e, f) \ + size_t const e = f; \ + do { \ + if (ERR_isError(e)) \ + return e; \ + } while (0) +#define CHECK_F(f) do { CHECK_V_F(_var_err__, f); } while (0) + + +/*-**************************************** +* Error Strings +******************************************/ + +const char* ERR_getErrorString(ERR_enum code); /* error_private.c */ + +ERR_STATIC const char* ERR_getErrorName(size_t code) +{ + return ERR_getErrorString(ERR_getErrorCode(code)); +} + +/** + * Ignore: this is an internal helper. + * + * This is a helper function to help force C99-correctness during compilation. + * Under strict compilation modes, variadic macro arguments can't be empty. + * However, variadic function arguments can be. Using a function therefore lets + * us statically check that at least one (string) argument was passed, + * independent of the compilation flags. + */ +static INLINE_KEYWORD UNUSED_ATTR +void _force_has_format_string(const char *format, ...) { + (void)format; +} + +/** + * Ignore: this is an internal helper. + * + * We want to force this function invocation to be syntactically correct, but + * we don't want to force runtime evaluation of its arguments. + */ +#define _FORCE_HAS_FORMAT_STRING(...) \ + do { \ + if (0) { \ + _force_has_format_string(__VA_ARGS__); \ + } \ + } while (0) + +#define ERR_QUOTE(str) #str + +/** + * Return the specified error if the condition evaluates to true. + * + * In debug modes, prints additional information. + * In order to do that (particularly, printing the conditional that failed), + * this can't just wrap RETURN_ERROR(). + */ +#define RETURN_ERROR_IF(cond, err, ...) \ + do { \ + if (cond) { \ + RAWLOG(3, "%s:%d: ERROR!: check %s failed, returning %s", \ + __FILE__, __LINE__, ERR_QUOTE(cond), ERR_QUOTE(ERROR(err))); \ + _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ + RAWLOG(3, ": " __VA_ARGS__); \ + RAWLOG(3, "\n"); \ + return ERROR(err); \ + } \ + } while (0) + +/** + * Unconditionally return the specified error. + * + * In debug modes, prints additional information. + */ +#define RETURN_ERROR(err, ...) \ + do { \ + RAWLOG(3, "%s:%d: ERROR!: unconditional check failed, returning %s", \ + __FILE__, __LINE__, ERR_QUOTE(ERROR(err))); \ + _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ + RAWLOG(3, ": " __VA_ARGS__); \ + RAWLOG(3, "\n"); \ + return ERROR(err); \ + } while(0) + +/** + * If the provided expression evaluates to an error code, returns that error code. + * + * In debug modes, prints additional information. + */ +#define FORWARD_IF_ERROR(err, ...) \ + do { \ + size_t const err_code = (err); \ + if (ERR_isError(err_code)) { \ + RAWLOG(3, "%s:%d: ERROR!: forwarding error in %s: %s", \ + __FILE__, __LINE__, ERR_QUOTE(err), ERR_getErrorName(err_code)); \ + _FORCE_HAS_FORMAT_STRING(__VA_ARGS__); \ + RAWLOG(3, ": " __VA_ARGS__); \ + RAWLOG(3, "\n"); \ + return err_code; \ + } \ + } while(0) + +#endif /* ERROR_H_MODULE */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/fse.h b/cpp/third_party/zstd-1.5.7/lib/common/fse.h new file mode 100644 index 0000000000..b6c2a3e9cc --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/fse.h @@ -0,0 +1,625 @@ +/* ****************************************************************** + * FSE : Finite State Entropy codec + * Public Prototypes declaration + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ +#ifndef FSE_H +#define FSE_H + + +/*-***************************************** +* Dependencies +******************************************/ +#include "zstd_deps.h" /* size_t, ptrdiff_t */ + +/*-***************************************** +* FSE_PUBLIC_API : control library symbols visibility +******************************************/ +#if defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) && defined(__GNUC__) && (__GNUC__ >= 4) +# define FSE_PUBLIC_API __attribute__ ((visibility ("default"))) +#elif defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) /* Visual expected */ +# define FSE_PUBLIC_API __declspec(dllexport) +#elif defined(FSE_DLL_IMPORT) && (FSE_DLL_IMPORT==1) +# define FSE_PUBLIC_API __declspec(dllimport) /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/ +#else +# define FSE_PUBLIC_API +#endif + +/*------ Version ------*/ +#define FSE_VERSION_MAJOR 0 +#define FSE_VERSION_MINOR 9 +#define FSE_VERSION_RELEASE 0 + +#define FSE_LIB_VERSION FSE_VERSION_MAJOR.FSE_VERSION_MINOR.FSE_VERSION_RELEASE +#define FSE_QUOTE(str) #str +#define FSE_EXPAND_AND_QUOTE(str) FSE_QUOTE(str) +#define FSE_VERSION_STRING FSE_EXPAND_AND_QUOTE(FSE_LIB_VERSION) + +#define FSE_VERSION_NUMBER (FSE_VERSION_MAJOR *100*100 + FSE_VERSION_MINOR *100 + FSE_VERSION_RELEASE) +FSE_PUBLIC_API unsigned FSE_versionNumber(void); /**< library version number; to be used when checking dll version */ + + +/*-***************************************** +* Tool functions +******************************************/ +FSE_PUBLIC_API size_t FSE_compressBound(size_t size); /* maximum compressed size */ + +/* Error Management */ +FSE_PUBLIC_API unsigned FSE_isError(size_t code); /* tells if a return value is an error code */ +FSE_PUBLIC_API const char* FSE_getErrorName(size_t code); /* provides error code string (useful for debugging) */ + + +/*-***************************************** +* FSE detailed API +******************************************/ +/*! +FSE_compress() does the following: +1. count symbol occurrence from source[] into table count[] (see hist.h) +2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog) +3. save normalized counters to memory buffer using writeNCount() +4. build encoding table 'CTable' from normalized counters +5. encode the data stream using encoding table 'CTable' + +FSE_decompress() does the following: +1. read normalized counters with readNCount() +2. build decoding table 'DTable' from normalized counters +3. decode the data stream using decoding table 'DTable' + +The following API allows targeting specific sub-functions for advanced tasks. +For example, it's possible to compress several blocks using the same 'CTable', +or to save and provide normalized distribution using external method. +*/ + +/* *** COMPRESSION *** */ + +/*! FSE_optimalTableLog(): + dynamically downsize 'tableLog' when conditions are met. + It saves CPU time, by using smaller tables, while preserving or even improving compression ratio. + @return : recommended tableLog (necessarily <= 'maxTableLog') */ +FSE_PUBLIC_API unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue); + +/*! FSE_normalizeCount(): + normalize counts so that sum(count[]) == Power_of_2 (2^tableLog) + 'normalizedCounter' is a table of short, of minimum size (maxSymbolValue+1). + useLowProbCount is a boolean parameter which trades off compressed size for + faster header decoding. When it is set to 1, the compressed data will be slightly + smaller. And when it is set to 0, FSE_readNCount() and FSE_buildDTable() will be + faster. If you are compressing a small amount of data (< 2 KB) then useLowProbCount=0 + is a good default, since header deserialization makes a big speed difference. + Otherwise, useLowProbCount=1 is a good default, since the speed difference is small. + @return : tableLog, + or an errorCode, which can be tested using FSE_isError() */ +FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, + const unsigned* count, size_t srcSize, unsigned maxSymbolValue, unsigned useLowProbCount); + +/*! FSE_NCountWriteBound(): + Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'. + Typically useful for allocation purpose. */ +FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog); + +/*! FSE_writeNCount(): + Compactly save 'normalizedCounter' into 'buffer'. + @return : size of the compressed table, + or an errorCode, which can be tested using FSE_isError(). */ +FSE_PUBLIC_API size_t FSE_writeNCount (void* buffer, size_t bufferSize, + const short* normalizedCounter, + unsigned maxSymbolValue, unsigned tableLog); + +/*! Constructor and Destructor of FSE_CTable. + Note that FSE_CTable size depends on 'tableLog' and 'maxSymbolValue' */ +typedef unsigned FSE_CTable; /* don't allocate that. It's only meant to be more restrictive than void* */ + +/*! FSE_buildCTable(): + Builds `ct`, which must be already allocated, using FSE_createCTable(). + @return : 0, or an errorCode, which can be tested using FSE_isError() */ +FSE_PUBLIC_API size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); + +/*! FSE_compress_usingCTable(): + Compress `src` using `ct` into `dst` which must be already allocated. + @return : size of compressed data (<= `dstCapacity`), + or 0 if compressed data could not fit into `dst`, + or an errorCode, which can be tested using FSE_isError() */ +FSE_PUBLIC_API size_t FSE_compress_usingCTable (void* dst, size_t dstCapacity, const void* src, size_t srcSize, const FSE_CTable* ct); + +/*! +Tutorial : +---------- +The first step is to count all symbols. FSE_count() does this job very fast. +Result will be saved into 'count', a table of unsigned int, which must be already allocated, and have 'maxSymbolValuePtr[0]+1' cells. +'src' is a table of bytes of size 'srcSize'. All values within 'src' MUST be <= maxSymbolValuePtr[0] +maxSymbolValuePtr[0] will be updated, with its real value (necessarily <= original value) +FSE_count() will return the number of occurrence of the most frequent symbol. +This can be used to know if there is a single symbol within 'src', and to quickly evaluate its compressibility. +If there is an error, the function will return an ErrorCode (which can be tested using FSE_isError()). + +The next step is to normalize the frequencies. +FSE_normalizeCount() will ensure that sum of frequencies is == 2 ^'tableLog'. +It also guarantees a minimum of 1 to any Symbol with frequency >= 1. +You can use 'tableLog'==0 to mean "use default tableLog value". +If you are unsure of which tableLog value to use, you can ask FSE_optimalTableLog(), +which will provide the optimal valid tableLog given sourceSize, maxSymbolValue, and a user-defined maximum (0 means "default"). + +The result of FSE_normalizeCount() will be saved into a table, +called 'normalizedCounter', which is a table of signed short. +'normalizedCounter' must be already allocated, and have at least 'maxSymbolValue+1' cells. +The return value is tableLog if everything proceeded as expected. +It is 0 if there is a single symbol within distribution. +If there is an error (ex: invalid tableLog value), the function will return an ErrorCode (which can be tested using FSE_isError()). + +'normalizedCounter' can be saved in a compact manner to a memory area using FSE_writeNCount(). +'buffer' must be already allocated. +For guaranteed success, buffer size must be at least FSE_headerBound(). +The result of the function is the number of bytes written into 'buffer'. +If there is an error, the function will return an ErrorCode (which can be tested using FSE_isError(); ex : buffer size too small). + +'normalizedCounter' can then be used to create the compression table 'CTable'. +The space required by 'CTable' must be already allocated, using FSE_createCTable(). +You can then use FSE_buildCTable() to fill 'CTable'. +If there is an error, both functions will return an ErrorCode (which can be tested using FSE_isError()). + +'CTable' can then be used to compress 'src', with FSE_compress_usingCTable(). +Similar to FSE_count(), the convention is that 'src' is assumed to be a table of char of size 'srcSize' +The function returns the size of compressed data (without header), necessarily <= `dstCapacity`. +If it returns '0', compressed data could not fit into 'dst'. +If there is an error, the function will return an ErrorCode (which can be tested using FSE_isError()). +*/ + + +/* *** DECOMPRESSION *** */ + +/*! FSE_readNCount(): + Read compactly saved 'normalizedCounter' from 'rBuffer'. + @return : size read from 'rBuffer', + or an errorCode, which can be tested using FSE_isError(). + maxSymbolValuePtr[0] and tableLogPtr[0] will also be updated with their respective values */ +FSE_PUBLIC_API size_t FSE_readNCount (short* normalizedCounter, + unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, + const void* rBuffer, size_t rBuffSize); + +/*! FSE_readNCount_bmi2(): + * Same as FSE_readNCount() but pass bmi2=1 when your CPU supports BMI2 and 0 otherwise. + */ +FSE_PUBLIC_API size_t FSE_readNCount_bmi2(short* normalizedCounter, + unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, + const void* rBuffer, size_t rBuffSize, int bmi2); + +typedef unsigned FSE_DTable; /* don't allocate that. It's just a way to be more restrictive than void* */ + +/*! +Tutorial : +---------- +(Note : these functions only decompress FSE-compressed blocks. + If block is uncompressed, use memcpy() instead + If block is a single repeated byte, use memset() instead ) + +The first step is to obtain the normalized frequencies of symbols. +This can be performed by FSE_readNCount() if it was saved using FSE_writeNCount(). +'normalizedCounter' must be already allocated, and have at least 'maxSymbolValuePtr[0]+1' cells of signed short. +In practice, that means it's necessary to know 'maxSymbolValue' beforehand, +or size the table to handle worst case situations (typically 256). +FSE_readNCount() will provide 'tableLog' and 'maxSymbolValue'. +The result of FSE_readNCount() is the number of bytes read from 'rBuffer'. +Note that 'rBufferSize' must be at least 4 bytes, even if useful information is less than that. +If there is an error, the function will return an error code, which can be tested using FSE_isError(). + +The next step is to build the decompression tables 'FSE_DTable' from 'normalizedCounter'. +This is performed by the function FSE_buildDTable(). +The space required by 'FSE_DTable' must be already allocated using FSE_createDTable(). +If there is an error, the function will return an error code, which can be tested using FSE_isError(). + +`FSE_DTable` can then be used to decompress `cSrc`, with FSE_decompress_usingDTable(). +`cSrcSize` must be strictly correct, otherwise decompression will fail. +FSE_decompress_usingDTable() result will tell how many bytes were regenerated (<=`dstCapacity`). +If there is an error, the function will return an error code, which can be tested using FSE_isError(). (ex: dst buffer too small) +*/ + +#endif /* FSE_H */ + + +#if defined(FSE_STATIC_LINKING_ONLY) && !defined(FSE_H_FSE_STATIC_LINKING_ONLY) +#define FSE_H_FSE_STATIC_LINKING_ONLY +#include "bitstream.h" + +/* ***************************************** +* Static allocation +*******************************************/ +/* FSE buffer bounds */ +#define FSE_NCOUNTBOUND 512 +#define FSE_BLOCKBOUND(size) ((size) + ((size)>>7) + 4 /* fse states */ + sizeof(size_t) /* bitContainer */) +#define FSE_COMPRESSBOUND(size) (FSE_NCOUNTBOUND + FSE_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ + +/* It is possible to statically allocate FSE CTable/DTable as a table of FSE_CTable/FSE_DTable using below macros */ +#define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<((maxTableLog)-1)) + (((maxSymbolValue)+1)*2)) +#define FSE_DTABLE_SIZE_U32(maxTableLog) (1 + (1<<(maxTableLog))) + +/* or use the size to malloc() space directly. Pay attention to alignment restrictions though */ +#define FSE_CTABLE_SIZE(maxTableLog, maxSymbolValue) (FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) * sizeof(FSE_CTable)) +#define FSE_DTABLE_SIZE(maxTableLog) (FSE_DTABLE_SIZE_U32(maxTableLog) * sizeof(FSE_DTable)) + + +/* ***************************************** + * FSE advanced API + ***************************************** */ + +unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, unsigned minus); +/**< same as FSE_optimalTableLog(), which used `minus==2` */ + +size_t FSE_buildCTable_rle (FSE_CTable* ct, unsigned char symbolValue); +/**< build a fake FSE_CTable, designed to compress always the same symbolValue */ + +/* FSE_buildCTable_wksp() : + * Same as FSE_buildCTable(), but using an externally allocated scratch buffer (`workSpace`). + * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)` of `unsigned`. + * See FSE_buildCTable_wksp() for breakdown of workspace usage. + */ +#define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (((maxSymbolValue + 2) + (1ull << (tableLog)))/2 + sizeof(U64)/sizeof(U32) /* additional 8 bytes for potential table overwrite */) +#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)) +size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize); + +#define FSE_BUILD_DTABLE_WKSP_SIZE(maxTableLog, maxSymbolValue) (sizeof(short) * (maxSymbolValue + 1) + (1ULL << maxTableLog) + 8) +#define FSE_BUILD_DTABLE_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) ((FSE_BUILD_DTABLE_WKSP_SIZE(maxTableLog, maxSymbolValue) + sizeof(unsigned) - 1) / sizeof(unsigned)) +FSE_PUBLIC_API size_t FSE_buildDTable_wksp(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize); +/**< Same as FSE_buildDTable(), using an externally allocated `workspace` produced with `FSE_BUILD_DTABLE_WKSP_SIZE_U32(maxSymbolValue)` */ + +#define FSE_DECOMPRESS_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) (FSE_DTABLE_SIZE_U32(maxTableLog) + 1 + FSE_BUILD_DTABLE_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) + (FSE_MAX_SYMBOL_VALUE + 1) / 2 + 1) +#define FSE_DECOMPRESS_WKSP_SIZE(maxTableLog, maxSymbolValue) (FSE_DECOMPRESS_WKSP_SIZE_U32(maxTableLog, maxSymbolValue) * sizeof(unsigned)) +size_t FSE_decompress_wksp_bmi2(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize, int bmi2); +/**< same as FSE_decompress(), using an externally allocated `workSpace` produced with `FSE_DECOMPRESS_WKSP_SIZE_U32(maxLog, maxSymbolValue)`. + * Set bmi2 to 1 if your CPU supports BMI2 or 0 if it doesn't */ + +typedef enum { + FSE_repeat_none, /**< Cannot use the previous table */ + FSE_repeat_check, /**< Can use the previous table but it must be checked */ + FSE_repeat_valid /**< Can use the previous table and it is assumed to be valid */ + } FSE_repeat; + +/* ***************************************** +* FSE symbol compression API +*******************************************/ +/*! + This API consists of small unitary functions, which highly benefit from being inlined. + Hence their body are included in next section. +*/ +typedef struct { + ptrdiff_t value; + const void* stateTable; + const void* symbolTT; + unsigned stateLog; +} FSE_CState_t; + +static void FSE_initCState(FSE_CState_t* CStatePtr, const FSE_CTable* ct); + +static void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* CStatePtr, unsigned symbol); + +static void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t* CStatePtr); + +/**< +These functions are inner components of FSE_compress_usingCTable(). +They allow the creation of custom streams, mixing multiple tables and bit sources. + +A key property to keep in mind is that encoding and decoding are done **in reverse direction**. +So the first symbol you will encode is the last you will decode, like a LIFO stack. + +You will need a few variables to track your CStream. They are : + +FSE_CTable ct; // Provided by FSE_buildCTable() +BIT_CStream_t bitStream; // bitStream tracking structure +FSE_CState_t state; // State tracking structure (can have several) + + +The first thing to do is to init bitStream and state. + size_t errorCode = BIT_initCStream(&bitStream, dstBuffer, maxDstSize); + FSE_initCState(&state, ct); + +Note that BIT_initCStream() can produce an error code, so its result should be tested, using FSE_isError(); +You can then encode your input data, byte after byte. +FSE_encodeSymbol() outputs a maximum of 'tableLog' bits at a time. +Remember decoding will be done in reverse direction. + FSE_encodeByte(&bitStream, &state, symbol); + +At any time, you can also add any bit sequence. +Note : maximum allowed nbBits is 25, for compatibility with 32-bits decoders + BIT_addBits(&bitStream, bitField, nbBits); + +The above methods don't commit data to memory, they just store it into local register, for speed. +Local register size is 64-bits on 64-bits systems, 32-bits on 32-bits systems (size_t). +Writing data to memory is a manual operation, performed by the flushBits function. + BIT_flushBits(&bitStream); + +Your last FSE encoding operation shall be to flush your last state value(s). + FSE_flushState(&bitStream, &state); + +Finally, you must close the bitStream. +The function returns the size of CStream in bytes. +If data couldn't fit into dstBuffer, it will return a 0 ( == not compressible) +If there is an error, it returns an errorCode (which can be tested using FSE_isError()). + size_t size = BIT_closeCStream(&bitStream); +*/ + + +/* ***************************************** +* FSE symbol decompression API +*******************************************/ +typedef struct { + size_t state; + const void* table; /* precise table may vary, depending on U16 */ +} FSE_DState_t; + + +static void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt); + +static unsigned char FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD); + +static unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr); + +/**< +Let's now decompose FSE_decompress_usingDTable() into its unitary components. +You will decode FSE-encoded symbols from the bitStream, +and also any other bitFields you put in, **in reverse order**. + +You will need a few variables to track your bitStream. They are : + +BIT_DStream_t DStream; // Stream context +FSE_DState_t DState; // State context. Multiple ones are possible +FSE_DTable* DTablePtr; // Decoding table, provided by FSE_buildDTable() + +The first thing to do is to init the bitStream. + errorCode = BIT_initDStream(&DStream, srcBuffer, srcSize); + +You should then retrieve your initial state(s) +(in reverse flushing order if you have several ones) : + errorCode = FSE_initDState(&DState, &DStream, DTablePtr); + +You can then decode your data, symbol after symbol. +For information the maximum number of bits read by FSE_decodeSymbol() is 'tableLog'. +Keep in mind that symbols are decoded in reverse order, like a LIFO stack (last in, first out). + unsigned char symbol = FSE_decodeSymbol(&DState, &DStream); + +You can retrieve any bitfield you eventually stored into the bitStream (in reverse order) +Note : maximum allowed nbBits is 25, for 32-bits compatibility + size_t bitField = BIT_readBits(&DStream, nbBits); + +All above operations only read from local register (which size depends on size_t). +Refueling the register from memory is manually performed by the reload method. + endSignal = FSE_reloadDStream(&DStream); + +BIT_reloadDStream() result tells if there is still some more data to read from DStream. +BIT_DStream_unfinished : there is still some data left into the DStream. +BIT_DStream_endOfBuffer : Dstream reached end of buffer. Its container may no longer be completely filled. +BIT_DStream_completed : Dstream reached its exact end, corresponding in general to decompression completed. +BIT_DStream_tooFar : Dstream went too far. Decompression result is corrupted. + +When reaching end of buffer (BIT_DStream_endOfBuffer), progress slowly, notably if you decode multiple symbols per loop, +to properly detect the exact end of stream. +After each decoded symbol, check if DStream is fully consumed using this simple test : + BIT_reloadDStream(&DStream) >= BIT_DStream_completed + +When it's done, verify decompression is fully completed, by checking both DStream and the relevant states. +Checking if DStream has reached its end is performed by : + BIT_endOfDStream(&DStream); +Check also the states. There might be some symbols left there, if some high probability ones (>50%) are possible. + FSE_endOfDState(&DState); +*/ + + +/* ***************************************** +* FSE unsafe API +*******************************************/ +static unsigned char FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD); +/* faster, but works only if nbBits is always >= 1 (otherwise, result will be corrupted) */ + + +/* ***************************************** +* Implementation of inlined functions +*******************************************/ +typedef struct { + int deltaFindState; + U32 deltaNbBits; +} FSE_symbolCompressionTransform; /* total 8 bytes */ + +MEM_STATIC void FSE_initCState(FSE_CState_t* statePtr, const FSE_CTable* ct) +{ + const void* ptr = ct; + const U16* u16ptr = (const U16*) ptr; + const U32 tableLog = MEM_read16(ptr); + statePtr->value = (ptrdiff_t)1<stateTable = u16ptr+2; + statePtr->symbolTT = ct + 1 + (tableLog ? (1<<(tableLog-1)) : 1); + statePtr->stateLog = tableLog; +} + + +/*! FSE_initCState2() : +* Same as FSE_initCState(), but the first symbol to include (which will be the last to be read) +* uses the smallest state value possible, saving the cost of this symbol */ +MEM_STATIC void FSE_initCState2(FSE_CState_t* statePtr, const FSE_CTable* ct, U32 symbol) +{ + FSE_initCState(statePtr, ct); + { const FSE_symbolCompressionTransform symbolTT = ((const FSE_symbolCompressionTransform*)(statePtr->symbolTT))[symbol]; + const U16* stateTable = (const U16*)(statePtr->stateTable); + U32 nbBitsOut = (U32)((symbolTT.deltaNbBits + (1<<15)) >> 16); + statePtr->value = (nbBitsOut << 16) - symbolTT.deltaNbBits; + statePtr->value = stateTable[(statePtr->value >> nbBitsOut) + symbolTT.deltaFindState]; + } +} + +MEM_STATIC void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* statePtr, unsigned symbol) +{ + FSE_symbolCompressionTransform const symbolTT = ((const FSE_symbolCompressionTransform*)(statePtr->symbolTT))[symbol]; + const U16* const stateTable = (const U16*)(statePtr->stateTable); + U32 const nbBitsOut = (U32)((statePtr->value + symbolTT.deltaNbBits) >> 16); + BIT_addBits(bitC, (BitContainerType)statePtr->value, nbBitsOut); + statePtr->value = stateTable[ (statePtr->value >> nbBitsOut) + symbolTT.deltaFindState]; +} + +MEM_STATIC void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t* statePtr) +{ + BIT_addBits(bitC, (BitContainerType)statePtr->value, statePtr->stateLog); + BIT_flushBits(bitC); +} + + +/* FSE_getMaxNbBits() : + * Approximate maximum cost of a symbol, in bits. + * Fractional get rounded up (i.e. a symbol with a normalized frequency of 3 gives the same result as a frequency of 2) + * note 1 : assume symbolValue is valid (<= maxSymbolValue) + * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */ +MEM_STATIC U32 FSE_getMaxNbBits(const void* symbolTTPtr, U32 symbolValue) +{ + const FSE_symbolCompressionTransform* symbolTT = (const FSE_symbolCompressionTransform*) symbolTTPtr; + return (symbolTT[symbolValue].deltaNbBits + ((1<<16)-1)) >> 16; +} + +/* FSE_bitCost() : + * Approximate symbol cost, as fractional value, using fixed-point format (accuracyLog fractional bits) + * note 1 : assume symbolValue is valid (<= maxSymbolValue) + * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */ +MEM_STATIC U32 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 symbolValue, U32 accuracyLog) +{ + const FSE_symbolCompressionTransform* symbolTT = (const FSE_symbolCompressionTransform*) symbolTTPtr; + U32 const minNbBits = symbolTT[symbolValue].deltaNbBits >> 16; + U32 const threshold = (minNbBits+1) << 16; + assert(tableLog < 16); + assert(accuracyLog < 31-tableLog); /* ensure enough room for renormalization double shift */ + { U32 const tableSize = 1 << tableLog; + U32 const deltaFromThreshold = threshold - (symbolTT[symbolValue].deltaNbBits + tableSize); + U32 const normalizedDeltaFromThreshold = (deltaFromThreshold << accuracyLog) >> tableLog; /* linear interpolation (very approximate) */ + U32 const bitMultiplier = 1 << accuracyLog; + assert(symbolTT[symbolValue].deltaNbBits + tableSize <= threshold); + assert(normalizedDeltaFromThreshold <= bitMultiplier); + return (minNbBits+1)*bitMultiplier - normalizedDeltaFromThreshold; + } +} + + +/* ====== Decompression ====== */ + +typedef struct { + U16 tableLog; + U16 fastMode; +} FSE_DTableHeader; /* sizeof U32 */ + +typedef struct +{ + unsigned short newState; + unsigned char symbol; + unsigned char nbBits; +} FSE_decode_t; /* size == U32 */ + +MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt) +{ + const void* ptr = dt; + const FSE_DTableHeader* const DTableH = (const FSE_DTableHeader*)ptr; + DStatePtr->state = BIT_readBits(bitD, DTableH->tableLog); + BIT_reloadDStream(bitD); + DStatePtr->table = dt + 1; +} + +MEM_STATIC BYTE FSE_peekSymbol(const FSE_DState_t* DStatePtr) +{ + FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + return DInfo.symbol; +} + +MEM_STATIC void FSE_updateState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) +{ + FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + U32 const nbBits = DInfo.nbBits; + size_t const lowBits = BIT_readBits(bitD, nbBits); + DStatePtr->state = DInfo.newState + lowBits; +} + +MEM_STATIC BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) +{ + FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + U32 const nbBits = DInfo.nbBits; + BYTE const symbol = DInfo.symbol; + size_t const lowBits = BIT_readBits(bitD, nbBits); + + DStatePtr->state = DInfo.newState + lowBits; + return symbol; +} + +/*! FSE_decodeSymbolFast() : + unsafe, only works if no symbol has a probability > 50% */ +MEM_STATIC BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) +{ + FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + U32 const nbBits = DInfo.nbBits; + BYTE const symbol = DInfo.symbol; + size_t const lowBits = BIT_readBitsFast(bitD, nbBits); + + DStatePtr->state = DInfo.newState + lowBits; + return symbol; +} + +MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr) +{ + return DStatePtr->state == 0; +} + + + +#ifndef FSE_COMMONDEFS_ONLY + +/* ************************************************************** +* Tuning parameters +****************************************************************/ +/*!MEMORY_USAGE : +* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) +* Increasing memory usage improves compression ratio +* Reduced memory usage can improve speed, due to cache effect +* Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ +#ifndef FSE_MAX_MEMORY_USAGE +# define FSE_MAX_MEMORY_USAGE 14 +#endif +#ifndef FSE_DEFAULT_MEMORY_USAGE +# define FSE_DEFAULT_MEMORY_USAGE 13 +#endif +#if (FSE_DEFAULT_MEMORY_USAGE > FSE_MAX_MEMORY_USAGE) +# error "FSE_DEFAULT_MEMORY_USAGE must be <= FSE_MAX_MEMORY_USAGE" +#endif + +/*!FSE_MAX_SYMBOL_VALUE : +* Maximum symbol value authorized. +* Required for proper stack allocation */ +#ifndef FSE_MAX_SYMBOL_VALUE +# define FSE_MAX_SYMBOL_VALUE 255 +#endif + +/* ************************************************************** +* template functions type & suffix +****************************************************************/ +#define FSE_FUNCTION_TYPE BYTE +#define FSE_FUNCTION_EXTENSION +#define FSE_DECODE_TYPE FSE_decode_t + + +#endif /* !FSE_COMMONDEFS_ONLY */ + + +/* *************************************************************** +* Constants +*****************************************************************/ +#define FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) +#define FSE_MAX_TABLESIZE (1U< FSE_TABLELOG_ABSOLUTE_MAX +# error "FSE_MAX_TABLELOG > FSE_TABLELOG_ABSOLUTE_MAX is not supported" +#endif + +#define FSE_TABLESTEP(tableSize) (((tableSize)>>1) + ((tableSize)>>3) + 3) + +#endif /* FSE_STATIC_LINKING_ONLY */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/fse_decompress.c b/cpp/third_party/zstd-1.5.7/lib/common/fse_decompress.c new file mode 100644 index 0000000000..c8f1bb0cf2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/fse_decompress.c @@ -0,0 +1,315 @@ +/* ****************************************************************** + * FSE : Finite State Entropy decoder + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + + +/* ************************************************************** +* Includes +****************************************************************/ +#include "debug.h" /* assert */ +#include "bitstream.h" +#include "compiler.h" +#define FSE_STATIC_LINKING_ONLY +#include "fse.h" +#include "error_private.h" +#include "zstd_deps.h" /* ZSTD_memcpy */ +#include "bits.h" /* ZSTD_highbit32 */ + + +/* ************************************************************** +* Error Management +****************************************************************/ +#define FSE_isError ERR_isError +#define FSE_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) /* use only *after* variable declarations */ + + +/* ************************************************************** +* Templates +****************************************************************/ +/* + designed to be included + for type-specific functions (template emulation in C) + Objective is to write these functions only once, for improved maintenance +*/ + +/* safety checks */ +#ifndef FSE_FUNCTION_EXTENSION +# error "FSE_FUNCTION_EXTENSION must be defined" +#endif +#ifndef FSE_FUNCTION_TYPE +# error "FSE_FUNCTION_TYPE must be defined" +#endif + +/* Function names */ +#define FSE_CAT(X,Y) X##Y +#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) +#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) + +static size_t FSE_buildDTable_internal(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) +{ + void* const tdPtr = dt+1; /* because *dt is unsigned, 32-bits aligned on 32-bits */ + FSE_DECODE_TYPE* const tableDecode = (FSE_DECODE_TYPE*) (tdPtr); + U16* symbolNext = (U16*)workSpace; + BYTE* spread = (BYTE*)(symbolNext + maxSymbolValue + 1); + + U32 const maxSV1 = maxSymbolValue + 1; + U32 const tableSize = 1 << tableLog; + U32 highThreshold = tableSize-1; + + /* Sanity Checks */ + if (FSE_BUILD_DTABLE_WKSP_SIZE(tableLog, maxSymbolValue) > wkspSize) return ERROR(maxSymbolValue_tooLarge); + if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); + if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); + + /* Init, lay down lowprob symbols */ + { FSE_DTableHeader DTableH; + DTableH.tableLog = (U16)tableLog; + DTableH.fastMode = 1; + { S16 const largeLimit= (S16)(1 << (tableLog-1)); + U32 s; + for (s=0; s= largeLimit) DTableH.fastMode=0; + symbolNext[s] = (U16)normalizedCounter[s]; + } } } + ZSTD_memcpy(dt, &DTableH, sizeof(DTableH)); + } + + /* Spread symbols */ + if (highThreshold == tableSize - 1) { + size_t const tableMask = tableSize-1; + size_t const step = FSE_TABLESTEP(tableSize); + /* First lay down the symbols in order. + * We use a uint64_t to lay down 8 bytes at a time. This reduces branch + * misses since small blocks generally have small table logs, so nearly + * all symbols have counts <= 8. We ensure we have 8 bytes at the end of + * our buffer to handle the over-write. + */ + { U64 const add = 0x0101010101010101ull; + size_t pos = 0; + U64 sv = 0; + U32 s; + for (s=0; s highThreshold) position = (position + step) & tableMask; /* lowprob area */ + } } + if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ + } + + /* Build Decoding table */ + { U32 u; + for (u=0; u sizeof(bitD.bitContainer)*8) /* This test must be static */ + BIT_reloadDStream(&bitD); + + op[1] = FSE_GETSYMBOL(&state2); + + if (FSE_MAX_TABLELOG*4+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ + { if (BIT_reloadDStream(&bitD) > BIT_DStream_unfinished) { op+=2; break; } } + + op[2] = FSE_GETSYMBOL(&state1); + + if (FSE_MAX_TABLELOG*2+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ + BIT_reloadDStream(&bitD); + + op[3] = FSE_GETSYMBOL(&state2); + } + + /* tail */ + /* note : BIT_reloadDStream(&bitD) >= FSE_DStream_partiallyFilled; Ends at exactly BIT_DStream_completed */ + while (1) { + if (op>(omax-2)) return ERROR(dstSize_tooSmall); + *op++ = FSE_GETSYMBOL(&state1); + if (BIT_reloadDStream(&bitD)==BIT_DStream_overflow) { + *op++ = FSE_GETSYMBOL(&state2); + break; + } + + if (op>(omax-2)) return ERROR(dstSize_tooSmall); + *op++ = FSE_GETSYMBOL(&state2); + if (BIT_reloadDStream(&bitD)==BIT_DStream_overflow) { + *op++ = FSE_GETSYMBOL(&state1); + break; + } } + + assert(op >= ostart); + return (size_t)(op-ostart); +} + +typedef struct { + short ncount[FSE_MAX_SYMBOL_VALUE + 1]; +} FSE_DecompressWksp; + + +FORCE_INLINE_TEMPLATE size_t FSE_decompress_wksp_body( + void* dst, size_t dstCapacity, + const void* cSrc, size_t cSrcSize, + unsigned maxLog, void* workSpace, size_t wkspSize, + int bmi2) +{ + const BYTE* const istart = (const BYTE*)cSrc; + const BYTE* ip = istart; + unsigned tableLog; + unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; + FSE_DecompressWksp* const wksp = (FSE_DecompressWksp*)workSpace; + size_t const dtablePos = sizeof(FSE_DecompressWksp) / sizeof(FSE_DTable); + FSE_DTable* const dtable = (FSE_DTable*)workSpace + dtablePos; + + FSE_STATIC_ASSERT((FSE_MAX_SYMBOL_VALUE + 1) % 2 == 0); + if (wkspSize < sizeof(*wksp)) return ERROR(GENERIC); + + /* correct offset to dtable depends on this property */ + FSE_STATIC_ASSERT(sizeof(FSE_DecompressWksp) % sizeof(FSE_DTable) == 0); + + /* normal FSE decoding mode */ + { size_t const NCountLength = + FSE_readNCount_bmi2(wksp->ncount, &maxSymbolValue, &tableLog, istart, cSrcSize, bmi2); + if (FSE_isError(NCountLength)) return NCountLength; + if (tableLog > maxLog) return ERROR(tableLog_tooLarge); + assert(NCountLength <= cSrcSize); + ip += NCountLength; + cSrcSize -= NCountLength; + } + + if (FSE_DECOMPRESS_WKSP_SIZE(tableLog, maxSymbolValue) > wkspSize) return ERROR(tableLog_tooLarge); + assert(sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog) <= wkspSize); + workSpace = (BYTE*)workSpace + sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog); + wkspSize -= sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog); + + CHECK_F( FSE_buildDTable_internal(dtable, wksp->ncount, maxSymbolValue, tableLog, workSpace, wkspSize) ); + + { + const void* ptr = dtable; + const FSE_DTableHeader* DTableH = (const FSE_DTableHeader*)ptr; + const U32 fastMode = DTableH->fastMode; + + /* select fast mode (static) */ + if (fastMode) return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, dtable, 1); + return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, dtable, 0); + } +} + +/* Avoids the FORCE_INLINE of the _body() function. */ +static size_t FSE_decompress_wksp_body_default(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize) +{ + return FSE_decompress_wksp_body(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize, 0); +} + +#if DYNAMIC_BMI2 +BMI2_TARGET_ATTRIBUTE static size_t FSE_decompress_wksp_body_bmi2(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize) +{ + return FSE_decompress_wksp_body(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize, 1); +} +#endif + +size_t FSE_decompress_wksp_bmi2(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, unsigned maxLog, void* workSpace, size_t wkspSize, int bmi2) +{ +#if DYNAMIC_BMI2 + if (bmi2) { + return FSE_decompress_wksp_body_bmi2(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize); + } +#endif + (void)bmi2; + return FSE_decompress_wksp_body_default(dst, dstCapacity, cSrc, cSrcSize, maxLog, workSpace, wkspSize); +} + +#endif /* FSE_COMMONDEFS_ONLY */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/huf.h b/cpp/third_party/zstd-1.5.7/lib/common/huf.h new file mode 100644 index 0000000000..4b142c4f99 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/huf.h @@ -0,0 +1,277 @@ +/* ****************************************************************** + * huff0 huffman codec, + * part of Finite State Entropy library + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + +#ifndef HUF_H_298734234 +#define HUF_H_298734234 + +/* *** Dependencies *** */ +#include "zstd_deps.h" /* size_t */ +#include "mem.h" /* U32 */ +#define FSE_STATIC_LINKING_ONLY +#include "fse.h" + +/* *** Tool functions *** */ +#define HUF_BLOCKSIZE_MAX (128 * 1024) /**< maximum input size for a single block compressed with HUF_compress */ +size_t HUF_compressBound(size_t size); /**< maximum compressed size (worst case) */ + +/* Error Management */ +unsigned HUF_isError(size_t code); /**< tells if a return value is an error code */ +const char* HUF_getErrorName(size_t code); /**< provides error code string (useful for debugging) */ + + +#define HUF_WORKSPACE_SIZE ((8 << 10) + 512 /* sorting scratch space */) +#define HUF_WORKSPACE_SIZE_U64 (HUF_WORKSPACE_SIZE / sizeof(U64)) + +/* *** Constants *** */ +#define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_TABLELOG_ABSOLUTEMAX */ +#define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */ +#define HUF_SYMBOLVALUE_MAX 255 + +#define HUF_TABLELOG_ABSOLUTEMAX 12 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ +#if (HUF_TABLELOG_MAX > HUF_TABLELOG_ABSOLUTEMAX) +# error "HUF_TABLELOG_MAX is too large !" +#endif + + +/* **************************************** +* Static allocation +******************************************/ +/* HUF buffer bounds */ +#define HUF_CTABLEBOUND 129 +#define HUF_BLOCKBOUND(size) (size + (size>>8) + 8) /* only true when incompressible is pre-filtered with fast heuristic */ +#define HUF_COMPRESSBOUND(size) (HUF_CTABLEBOUND + HUF_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ + +/* static allocation of HUF's Compression Table */ +/* this is a private definition, just exposed for allocation and strict aliasing purpose. never EVER access its members directly */ +typedef size_t HUF_CElt; /* consider it an incomplete type */ +#define HUF_CTABLE_SIZE_ST(maxSymbolValue) ((maxSymbolValue)+2) /* Use tables of size_t, for proper alignment */ +#define HUF_CTABLE_SIZE(maxSymbolValue) (HUF_CTABLE_SIZE_ST(maxSymbolValue) * sizeof(size_t)) +#define HUF_CREATE_STATIC_CTABLE(name, maxSymbolValue) \ + HUF_CElt name[HUF_CTABLE_SIZE_ST(maxSymbolValue)] /* no final ; */ + +/* static allocation of HUF's DTable */ +typedef U32 HUF_DTable; +#define HUF_DTABLE_SIZE(maxTableLog) (1 + (1<<(maxTableLog))) +#define HUF_CREATE_STATIC_DTABLEX1(DTable, maxTableLog) \ + HUF_DTable DTable[HUF_DTABLE_SIZE((maxTableLog)-1)] = { ((U32)((maxTableLog)-1) * 0x01000001) } +#define HUF_CREATE_STATIC_DTABLEX2(DTable, maxTableLog) \ + HUF_DTable DTable[HUF_DTABLE_SIZE(maxTableLog)] = { ((U32)(maxTableLog) * 0x01000001) } + + +/* **************************************** +* Advanced decompression functions +******************************************/ + +/** + * Huffman flags bitset. + * For all flags, 0 is the default value. + */ +typedef enum { + /** + * If compiled with DYNAMIC_BMI2: Set flag only if the CPU supports BMI2 at runtime. + * Otherwise: Ignored. + */ + HUF_flags_bmi2 = (1 << 0), + /** + * If set: Test possible table depths to find the one that produces the smallest header + encoded size. + * If unset: Use heuristic to find the table depth. + */ + HUF_flags_optimalDepth = (1 << 1), + /** + * If set: If the previous table can encode the input, always reuse the previous table. + * If unset: If the previous table can encode the input, reuse the previous table if it results in a smaller output. + */ + HUF_flags_preferRepeat = (1 << 2), + /** + * If set: Sample the input and check if the sample is uncompressible, if it is then don't attempt to compress. + * If unset: Always histogram the entire input. + */ + HUF_flags_suspectUncompressible = (1 << 3), + /** + * If set: Don't use assembly implementations + * If unset: Allow using assembly implementations + */ + HUF_flags_disableAsm = (1 << 4), + /** + * If set: Don't use the fast decoding loop, always use the fallback decoding loop. + * If unset: Use the fast decoding loop when possible. + */ + HUF_flags_disableFast = (1 << 5) +} HUF_flags_e; + + +/* **************************************** + * HUF detailed API + * ****************************************/ +#define HUF_OPTIMAL_DEPTH_THRESHOLD ZSTD_btultra + +/*! HUF_compress() does the following: + * 1. count symbol occurrence from source[] into table count[] using FSE_count() (exposed within "fse.h") + * 2. (optional) refine tableLog using HUF_optimalTableLog() + * 3. build Huffman table from count using HUF_buildCTable() + * 4. save Huffman table to memory buffer using HUF_writeCTable() + * 5. encode the data stream using HUF_compress4X_usingCTable() + * + * The following API allows targeting specific sub-functions for advanced tasks. + * For example, it's possible to compress several blocks using the same 'CTable', + * or to save and regenerate 'CTable' using external methods. + */ +unsigned HUF_minTableLog(unsigned symbolCardinality); +unsigned HUF_cardinality(const unsigned* count, unsigned maxSymbolValue); +unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, void* workSpace, + size_t wkspSize, HUF_CElt* table, const unsigned* count, int flags); /* table is used as scratch space for building and testing tables, not a return value */ +size_t HUF_writeCTable_wksp(void* dst, size_t maxDstSize, const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog, void* workspace, size_t workspaceSize); +size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags); +size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue); +int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue); + +typedef enum { + HUF_repeat_none, /**< Cannot use the previous table */ + HUF_repeat_check, /**< Can use the previous table but it must be checked. Note : The previous table must have been constructed by HUF_compress{1, 4}X_repeat */ + HUF_repeat_valid /**< Can use the previous table and it is assumed to be valid */ + } HUF_repeat; + +/** HUF_compress4X_repeat() : + * Same as HUF_compress4X_wksp(), but considers using hufTable if *repeat != HUF_repeat_none. + * If it uses hufTable it does not modify hufTable or repeat. + * If it doesn't, it sets *repeat = HUF_repeat_none, and it sets hufTable to the table used. + * If preferRepeat then the old table will always be used if valid. + * If suspectUncompressible then some sampling checks will be run to potentially skip huffman coding */ +size_t HUF_compress4X_repeat(void* dst, size_t dstSize, + const void* src, size_t srcSize, + unsigned maxSymbolValue, unsigned tableLog, + void* workSpace, size_t wkspSize, /**< `workSpace` must be aligned on 4-bytes boundaries, `wkspSize` must be >= HUF_WORKSPACE_SIZE */ + HUF_CElt* hufTable, HUF_repeat* repeat, int flags); + +/** HUF_buildCTable_wksp() : + * Same as HUF_buildCTable(), but using externally allocated scratch buffer. + * `workSpace` must be aligned on 4-bytes boundaries, and its size must be >= HUF_CTABLE_WORKSPACE_SIZE. + */ +#define HUF_CTABLE_WORKSPACE_SIZE_U32 ((4 * (HUF_SYMBOLVALUE_MAX + 1)) + 192) +#define HUF_CTABLE_WORKSPACE_SIZE (HUF_CTABLE_WORKSPACE_SIZE_U32 * sizeof(unsigned)) +size_t HUF_buildCTable_wksp (HUF_CElt* tree, + const unsigned* count, U32 maxSymbolValue, U32 maxNbBits, + void* workSpace, size_t wkspSize); + +/*! HUF_readStats() : + * Read compact Huffman tree, saved by HUF_writeCTable(). + * `huffWeight` is destination buffer. + * @return : size read from `src` , or an error Code . + * Note : Needed by HUF_readCTable() and HUF_readDTableXn() . */ +size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, + U32* rankStats, U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize); + +/*! HUF_readStats_wksp() : + * Same as HUF_readStats() but takes an external workspace which must be + * 4-byte aligned and its size must be >= HUF_READ_STATS_WORKSPACE_SIZE. + * If the CPU has BMI2 support, pass bmi2=1, otherwise pass bmi2=0. + */ +#define HUF_READ_STATS_WORKSPACE_SIZE_U32 FSE_DECOMPRESS_WKSP_SIZE_U32(6, HUF_TABLELOG_MAX-1) +#define HUF_READ_STATS_WORKSPACE_SIZE (HUF_READ_STATS_WORKSPACE_SIZE_U32 * sizeof(unsigned)) +size_t HUF_readStats_wksp(BYTE* huffWeight, size_t hwSize, + U32* rankStats, U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize, + void* workspace, size_t wkspSize, + int flags); + +/** HUF_readCTable() : + * Loading a CTable saved with HUF_writeCTable() */ +size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned *hasZeroWeights); + +/** HUF_getNbBitsFromCTable() : + * Read nbBits from CTable symbolTable, for symbol `symbolValue` presumed <= HUF_SYMBOLVALUE_MAX + * Note 1 : If symbolValue > HUF_readCTableHeader(symbolTable).maxSymbolValue, returns 0 + * Note 2 : is not inlined, as HUF_CElt definition is private + */ +U32 HUF_getNbBitsFromCTable(const HUF_CElt* symbolTable, U32 symbolValue); + +typedef struct { + BYTE tableLog; + BYTE maxSymbolValue; + BYTE unused[sizeof(size_t) - 2]; +} HUF_CTableHeader; + +/** HUF_readCTableHeader() : + * @returns The header from the CTable specifying the tableLog and the maxSymbolValue. + */ +HUF_CTableHeader HUF_readCTableHeader(HUF_CElt const* ctable); + +/* + * HUF_decompress() does the following: + * 1. select the decompression algorithm (X1, X2) based on pre-computed heuristics + * 2. build Huffman table from save, using HUF_readDTableX?() + * 3. decode 1 or 4 segments in parallel using HUF_decompress?X?_usingDTable() + */ + +/** HUF_selectDecoder() : + * Tells which decoder is likely to decode faster, + * based on a set of pre-computed metrics. + * @return : 0==HUF_decompress4X1, 1==HUF_decompress4X2 . + * Assumption : 0 < dstSize <= 128 KB */ +U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize); + +/** + * The minimum workspace size for the `workSpace` used in + * HUF_readDTableX1_wksp() and HUF_readDTableX2_wksp(). + * + * The space used depends on HUF_TABLELOG_MAX, ranging from ~1500 bytes when + * HUF_TABLE_LOG_MAX=12 to ~1850 bytes when HUF_TABLE_LOG_MAX=15. + * Buffer overflow errors may potentially occur if code modifications result in + * a required workspace size greater than that specified in the following + * macro. + */ +#define HUF_DECOMPRESS_WORKSPACE_SIZE ((2 << 10) + (1 << 9)) +#define HUF_DECOMPRESS_WORKSPACE_SIZE_U32 (HUF_DECOMPRESS_WORKSPACE_SIZE / sizeof(U32)) + + +/* ====================== */ +/* single stream variants */ +/* ====================== */ + +size_t HUF_compress1X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags); +/** HUF_compress1X_repeat() : + * Same as HUF_compress1X_wksp(), but considers using hufTable if *repeat != HUF_repeat_none. + * If it uses hufTable it does not modify hufTable or repeat. + * If it doesn't, it sets *repeat = HUF_repeat_none, and it sets hufTable to the table used. + * If preferRepeat then the old table will always be used if valid. + * If suspectUncompressible then some sampling checks will be run to potentially skip huffman coding */ +size_t HUF_compress1X_repeat(void* dst, size_t dstSize, + const void* src, size_t srcSize, + unsigned maxSymbolValue, unsigned tableLog, + void* workSpace, size_t wkspSize, /**< `workSpace` must be aligned on 4-bytes boundaries, `wkspSize` must be >= HUF_WORKSPACE_SIZE */ + HUF_CElt* hufTable, HUF_repeat* repeat, int flags); + +size_t HUF_decompress1X_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); +#ifndef HUF_FORCE_DECOMPRESS_X1 +size_t HUF_decompress1X2_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); /**< double-symbols decoder */ +#endif + +/* BMI2 variants. + * If the CPU has BMI2 support, pass bmi2=1, otherwise pass bmi2=0. + */ +size_t HUF_decompress1X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags); +#ifndef HUF_FORCE_DECOMPRESS_X2 +size_t HUF_decompress1X1_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); +#endif +size_t HUF_decompress4X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags); +size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags); +#ifndef HUF_FORCE_DECOMPRESS_X2 +size_t HUF_readDTableX1_wksp(HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize, int flags); +#endif +#ifndef HUF_FORCE_DECOMPRESS_X1 +size_t HUF_readDTableX2_wksp(HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize, int flags); +#endif + +#endif /* HUF_H_298734234 */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/mem.h b/cpp/third_party/zstd-1.5.7/lib/common/mem.h new file mode 100644 index 0000000000..e66a2eaeb2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/mem.h @@ -0,0 +1,422 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef MEM_H_MODULE +#define MEM_H_MODULE + +/*-**************************************** +* Dependencies +******************************************/ +#include /* size_t, ptrdiff_t */ +#include "compiler.h" /* __has_builtin */ +#include "debug.h" /* DEBUG_STATIC_ASSERT */ +#include "zstd_deps.h" /* ZSTD_memcpy */ + + +/*-**************************************** +* Compiler specifics +******************************************/ +#if defined(_MSC_VER) /* Visual Studio */ +# include /* _byteswap_ulong */ +# include /* _byteswap_* */ +#elif defined(__ICCARM__) +# include +#endif + +/*-************************************************************** +* Basic Types +*****************************************************************/ +#if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif + typedef uint8_t BYTE; + typedef uint8_t U8; + typedef int8_t S8; + typedef uint16_t U16; + typedef int16_t S16; + typedef uint32_t U32; + typedef int32_t S32; + typedef uint64_t U64; + typedef int64_t S64; +#else +# include +#if CHAR_BIT != 8 +# error "this implementation requires char to be exactly 8-bit type" +#endif + typedef unsigned char BYTE; + typedef unsigned char U8; + typedef signed char S8; +#if USHRT_MAX != 65535 +# error "this implementation requires short to be exactly 16-bit type" +#endif + typedef unsigned short U16; + typedef signed short S16; +#if UINT_MAX != 4294967295 +# error "this implementation requires int to be exactly 32-bit type" +#endif + typedef unsigned int U32; + typedef signed int S32; +/* note : there are no limits defined for long long type in C90. + * limits exist in C99, however, in such case, is preferred */ + typedef unsigned long long U64; + typedef signed long long S64; +#endif + +/*-************************************************************** +* Memory I/O API +*****************************************************************/ +/*=== Static platform detection ===*/ +MEM_STATIC unsigned MEM_32bits(void); +MEM_STATIC unsigned MEM_64bits(void); +MEM_STATIC unsigned MEM_isLittleEndian(void); + +/*=== Native unaligned read/write ===*/ +MEM_STATIC U16 MEM_read16(const void* memPtr); +MEM_STATIC U32 MEM_read32(const void* memPtr); +MEM_STATIC U64 MEM_read64(const void* memPtr); +MEM_STATIC size_t MEM_readST(const void* memPtr); + +MEM_STATIC void MEM_write16(void* memPtr, U16 value); +MEM_STATIC void MEM_write32(void* memPtr, U32 value); +MEM_STATIC void MEM_write64(void* memPtr, U64 value); + +/*=== Little endian unaligned read/write ===*/ +MEM_STATIC U16 MEM_readLE16(const void* memPtr); +MEM_STATIC U32 MEM_readLE24(const void* memPtr); +MEM_STATIC U32 MEM_readLE32(const void* memPtr); +MEM_STATIC U64 MEM_readLE64(const void* memPtr); +MEM_STATIC size_t MEM_readLEST(const void* memPtr); + +MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val); +MEM_STATIC void MEM_writeLE24(void* memPtr, U32 val); +MEM_STATIC void MEM_writeLE32(void* memPtr, U32 val32); +MEM_STATIC void MEM_writeLE64(void* memPtr, U64 val64); +MEM_STATIC void MEM_writeLEST(void* memPtr, size_t val); + +/*=== Big endian unaligned read/write ===*/ +MEM_STATIC U32 MEM_readBE32(const void* memPtr); +MEM_STATIC U64 MEM_readBE64(const void* memPtr); +MEM_STATIC size_t MEM_readBEST(const void* memPtr); + +MEM_STATIC void MEM_writeBE32(void* memPtr, U32 val32); +MEM_STATIC void MEM_writeBE64(void* memPtr, U64 val64); +MEM_STATIC void MEM_writeBEST(void* memPtr, size_t val); + +/*=== Byteswap ===*/ +MEM_STATIC U32 MEM_swap32(U32 in); +MEM_STATIC U64 MEM_swap64(U64 in); +MEM_STATIC size_t MEM_swapST(size_t in); + + +/*-************************************************************** +* Memory I/O Implementation +*****************************************************************/ +/* MEM_FORCE_MEMORY_ACCESS : For accessing unaligned memory: + * Method 0 : always use `memcpy()`. Safe and portable. + * Method 1 : Use compiler extension to set unaligned access. + * Method 2 : direct access. This method is portable but violate C standard. + * It can generate buggy code on targets depending on alignment. + * Default : method 1 if supported, else method 0 + */ +#ifndef MEM_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ +# ifdef __GNUC__ +# define MEM_FORCE_MEMORY_ACCESS 1 +# endif +#endif + +MEM_STATIC unsigned MEM_32bits(void) { return sizeof(size_t)==4; } +MEM_STATIC unsigned MEM_64bits(void) { return sizeof(size_t)==8; } + +MEM_STATIC unsigned MEM_isLittleEndian(void) +{ +#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) + return 1; +#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) + return 0; +#elif defined(__clang__) && __LITTLE_ENDIAN__ + return 1; +#elif defined(__clang__) && __BIG_ENDIAN__ + return 0; +#elif defined(_MSC_VER) && (_M_X64 || _M_IX86) + return 1; +#elif defined(__DMC__) && defined(_M_IX86) + return 1; +#elif defined(__IAR_SYSTEMS_ICC__) && __LITTLE_ENDIAN__ + return 1; +#else + const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ + return one.c[0]; +#endif +} + +#if defined(MEM_FORCE_MEMORY_ACCESS) && (MEM_FORCE_MEMORY_ACCESS==2) + +/* violates C standard, by lying on structure alignment. +Only use if no other choice to achieve best performance on target platform */ +MEM_STATIC U16 MEM_read16(const void* memPtr) { return *(const U16*) memPtr; } +MEM_STATIC U32 MEM_read32(const void* memPtr) { return *(const U32*) memPtr; } +MEM_STATIC U64 MEM_read64(const void* memPtr) { return *(const U64*) memPtr; } +MEM_STATIC size_t MEM_readST(const void* memPtr) { return *(const size_t*) memPtr; } + +MEM_STATIC void MEM_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; } +MEM_STATIC void MEM_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } +MEM_STATIC void MEM_write64(void* memPtr, U64 value) { *(U64*)memPtr = value; } + +#elif defined(MEM_FORCE_MEMORY_ACCESS) && (MEM_FORCE_MEMORY_ACCESS==1) + +typedef __attribute__((aligned(1))) U16 unalign16; +typedef __attribute__((aligned(1))) U32 unalign32; +typedef __attribute__((aligned(1))) U64 unalign64; +typedef __attribute__((aligned(1))) size_t unalignArch; + +MEM_STATIC U16 MEM_read16(const void* ptr) { return *(const unalign16*)ptr; } +MEM_STATIC U32 MEM_read32(const void* ptr) { return *(const unalign32*)ptr; } +MEM_STATIC U64 MEM_read64(const void* ptr) { return *(const unalign64*)ptr; } +MEM_STATIC size_t MEM_readST(const void* ptr) { return *(const unalignArch*)ptr; } + +MEM_STATIC void MEM_write16(void* memPtr, U16 value) { *(unalign16*)memPtr = value; } +MEM_STATIC void MEM_write32(void* memPtr, U32 value) { *(unalign32*)memPtr = value; } +MEM_STATIC void MEM_write64(void* memPtr, U64 value) { *(unalign64*)memPtr = value; } + +#else + +/* default method, safe and standard. + can sometimes prove slower */ + +MEM_STATIC U16 MEM_read16(const void* memPtr) +{ + U16 val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; +} + +MEM_STATIC U32 MEM_read32(const void* memPtr) +{ + U32 val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; +} + +MEM_STATIC U64 MEM_read64(const void* memPtr) +{ + U64 val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; +} + +MEM_STATIC size_t MEM_readST(const void* memPtr) +{ + size_t val; ZSTD_memcpy(&val, memPtr, sizeof(val)); return val; +} + +MEM_STATIC void MEM_write16(void* memPtr, U16 value) +{ + ZSTD_memcpy(memPtr, &value, sizeof(value)); +} + +MEM_STATIC void MEM_write32(void* memPtr, U32 value) +{ + ZSTD_memcpy(memPtr, &value, sizeof(value)); +} + +MEM_STATIC void MEM_write64(void* memPtr, U64 value) +{ + ZSTD_memcpy(memPtr, &value, sizeof(value)); +} + +#endif /* MEM_FORCE_MEMORY_ACCESS */ + +MEM_STATIC U32 MEM_swap32_fallback(U32 in) +{ + return ((in << 24) & 0xff000000 ) | + ((in << 8) & 0x00ff0000 ) | + ((in >> 8) & 0x0000ff00 ) | + ((in >> 24) & 0x000000ff ); +} + +MEM_STATIC U32 MEM_swap32(U32 in) +{ +#if defined(_MSC_VER) /* Visual Studio */ + return _byteswap_ulong(in); +#elif (defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)) \ + || (defined(__clang__) && __has_builtin(__builtin_bswap32)) + return __builtin_bswap32(in); +#elif defined(__ICCARM__) + return __REV(in); +#else + return MEM_swap32_fallback(in); +#endif +} + +MEM_STATIC U64 MEM_swap64_fallback(U64 in) +{ + return ((in << 56) & 0xff00000000000000ULL) | + ((in << 40) & 0x00ff000000000000ULL) | + ((in << 24) & 0x0000ff0000000000ULL) | + ((in << 8) & 0x000000ff00000000ULL) | + ((in >> 8) & 0x00000000ff000000ULL) | + ((in >> 24) & 0x0000000000ff0000ULL) | + ((in >> 40) & 0x000000000000ff00ULL) | + ((in >> 56) & 0x00000000000000ffULL); +} + +MEM_STATIC U64 MEM_swap64(U64 in) +{ +#if defined(_MSC_VER) /* Visual Studio */ + return _byteswap_uint64(in); +#elif (defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)) \ + || (defined(__clang__) && __has_builtin(__builtin_bswap64)) + return __builtin_bswap64(in); +#else + return MEM_swap64_fallback(in); +#endif +} + +MEM_STATIC size_t MEM_swapST(size_t in) +{ + if (MEM_32bits()) + return (size_t)MEM_swap32((U32)in); + else + return (size_t)MEM_swap64((U64)in); +} + +/*=== Little endian r/w ===*/ + +MEM_STATIC U16 MEM_readLE16(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_read16(memPtr); + else { + const BYTE* p = (const BYTE*)memPtr; + return (U16)(p[0] + (p[1]<<8)); + } +} + +MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val) +{ + if (MEM_isLittleEndian()) { + MEM_write16(memPtr, val); + } else { + BYTE* p = (BYTE*)memPtr; + p[0] = (BYTE)val; + p[1] = (BYTE)(val>>8); + } +} + +MEM_STATIC U32 MEM_readLE24(const void* memPtr) +{ + return (U32)MEM_readLE16(memPtr) + ((U32)(((const BYTE*)memPtr)[2]) << 16); +} + +MEM_STATIC void MEM_writeLE24(void* memPtr, U32 val) +{ + MEM_writeLE16(memPtr, (U16)val); + ((BYTE*)memPtr)[2] = (BYTE)(val>>16); +} + +MEM_STATIC U32 MEM_readLE32(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_read32(memPtr); + else + return MEM_swap32(MEM_read32(memPtr)); +} + +MEM_STATIC void MEM_writeLE32(void* memPtr, U32 val32) +{ + if (MEM_isLittleEndian()) + MEM_write32(memPtr, val32); + else + MEM_write32(memPtr, MEM_swap32(val32)); +} + +MEM_STATIC U64 MEM_readLE64(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_read64(memPtr); + else + return MEM_swap64(MEM_read64(memPtr)); +} + +MEM_STATIC void MEM_writeLE64(void* memPtr, U64 val64) +{ + if (MEM_isLittleEndian()) + MEM_write64(memPtr, val64); + else + MEM_write64(memPtr, MEM_swap64(val64)); +} + +MEM_STATIC size_t MEM_readLEST(const void* memPtr) +{ + if (MEM_32bits()) + return (size_t)MEM_readLE32(memPtr); + else + return (size_t)MEM_readLE64(memPtr); +} + +MEM_STATIC void MEM_writeLEST(void* memPtr, size_t val) +{ + if (MEM_32bits()) + MEM_writeLE32(memPtr, (U32)val); + else + MEM_writeLE64(memPtr, (U64)val); +} + +/*=== Big endian r/w ===*/ + +MEM_STATIC U32 MEM_readBE32(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_swap32(MEM_read32(memPtr)); + else + return MEM_read32(memPtr); +} + +MEM_STATIC void MEM_writeBE32(void* memPtr, U32 val32) +{ + if (MEM_isLittleEndian()) + MEM_write32(memPtr, MEM_swap32(val32)); + else + MEM_write32(memPtr, val32); +} + +MEM_STATIC U64 MEM_readBE64(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_swap64(MEM_read64(memPtr)); + else + return MEM_read64(memPtr); +} + +MEM_STATIC void MEM_writeBE64(void* memPtr, U64 val64) +{ + if (MEM_isLittleEndian()) + MEM_write64(memPtr, MEM_swap64(val64)); + else + MEM_write64(memPtr, val64); +} + +MEM_STATIC size_t MEM_readBEST(const void* memPtr) +{ + if (MEM_32bits()) + return (size_t)MEM_readBE32(memPtr); + else + return (size_t)MEM_readBE64(memPtr); +} + +MEM_STATIC void MEM_writeBEST(void* memPtr, size_t val) +{ + if (MEM_32bits()) + MEM_writeBE32(memPtr, (U32)val); + else + MEM_writeBE64(memPtr, (U64)val); +} + +/* code only tested on 32 and 64 bits systems */ +MEM_STATIC void MEM_check(void) { DEBUG_STATIC_ASSERT((sizeof(size_t)==4) || (sizeof(size_t)==8)); } + +#endif /* MEM_H_MODULE */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/pool.c b/cpp/third_party/zstd-1.5.7/lib/common/pool.c new file mode 100644 index 0000000000..3adcefc9a5 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/pool.c @@ -0,0 +1,371 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/* ====== Dependencies ======= */ +#include "../common/allocations.h" /* ZSTD_customCalloc, ZSTD_customFree */ +#include "zstd_deps.h" /* size_t */ +#include "debug.h" /* assert */ +#include "pool.h" + +/* ====== Compiler specifics ====== */ +#if defined(_MSC_VER) +# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */ +#endif + + +#ifdef ZSTD_MULTITHREAD + +#include "threading.h" /* pthread adaptation */ + +/* A job is a function and an opaque argument */ +typedef struct POOL_job_s { + POOL_function function; + void *opaque; +} POOL_job; + +struct POOL_ctx_s { + ZSTD_customMem customMem; + /* Keep track of the threads */ + ZSTD_pthread_t* threads; + size_t threadCapacity; + size_t threadLimit; + + /* The queue is a circular buffer */ + POOL_job *queue; + size_t queueHead; + size_t queueTail; + size_t queueSize; + + /* The number of threads working on jobs */ + size_t numThreadsBusy; + /* Indicates if the queue is empty */ + int queueEmpty; + + /* The mutex protects the queue */ + ZSTD_pthread_mutex_t queueMutex; + /* Condition variable for pushers to wait on when the queue is full */ + ZSTD_pthread_cond_t queuePushCond; + /* Condition variables for poppers to wait on when the queue is empty */ + ZSTD_pthread_cond_t queuePopCond; + /* Indicates if the queue is shutting down */ + int shutdown; +}; + +/* POOL_thread() : + * Work thread for the thread pool. + * Waits for jobs and executes them. + * @returns : NULL on failure else non-null. + */ +static void* POOL_thread(void* opaque) { + POOL_ctx* const ctx = (POOL_ctx*)opaque; + if (!ctx) { return NULL; } + for (;;) { + /* Lock the mutex and wait for a non-empty queue or until shutdown */ + ZSTD_pthread_mutex_lock(&ctx->queueMutex); + + while ( ctx->queueEmpty + || (ctx->numThreadsBusy >= ctx->threadLimit) ) { + if (ctx->shutdown) { + /* even if !queueEmpty, (possible if numThreadsBusy >= threadLimit), + * a few threads will be shutdown while !queueEmpty, + * but enough threads will remain active to finish the queue */ + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); + return opaque; + } + ZSTD_pthread_cond_wait(&ctx->queuePopCond, &ctx->queueMutex); + } + /* Pop a job off the queue */ + { POOL_job const job = ctx->queue[ctx->queueHead]; + ctx->queueHead = (ctx->queueHead + 1) % ctx->queueSize; + ctx->numThreadsBusy++; + ctx->queueEmpty = (ctx->queueHead == ctx->queueTail); + /* Unlock the mutex, signal a pusher, and run the job */ + ZSTD_pthread_cond_signal(&ctx->queuePushCond); + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); + + job.function(job.opaque); + + /* If the intended queue size was 0, signal after finishing job */ + ZSTD_pthread_mutex_lock(&ctx->queueMutex); + ctx->numThreadsBusy--; + ZSTD_pthread_cond_signal(&ctx->queuePushCond); + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); + } + } /* for (;;) */ + assert(0); /* Unreachable */ +} + +/* ZSTD_createThreadPool() : public access point */ +POOL_ctx* ZSTD_createThreadPool(size_t numThreads) { + return POOL_create (numThreads, 0); +} + +POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) { + return POOL_create_advanced(numThreads, queueSize, ZSTD_defaultCMem); +} + +POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, + ZSTD_customMem customMem) +{ + POOL_ctx* ctx; + /* Check parameters */ + if (!numThreads) { return NULL; } + /* Allocate the context and zero initialize */ + ctx = (POOL_ctx*)ZSTD_customCalloc(sizeof(POOL_ctx), customMem); + if (!ctx) { return NULL; } + /* Initialize the job queue. + * It needs one extra space since one space is wasted to differentiate + * empty and full queues. + */ + ctx->queueSize = queueSize + 1; + ctx->queue = (POOL_job*)ZSTD_customCalloc(ctx->queueSize * sizeof(POOL_job), customMem); + ctx->queueHead = 0; + ctx->queueTail = 0; + ctx->numThreadsBusy = 0; + ctx->queueEmpty = 1; + { + int error = 0; + error |= ZSTD_pthread_mutex_init(&ctx->queueMutex, NULL); + error |= ZSTD_pthread_cond_init(&ctx->queuePushCond, NULL); + error |= ZSTD_pthread_cond_init(&ctx->queuePopCond, NULL); + if (error) { POOL_free(ctx); return NULL; } + } + ctx->shutdown = 0; + /* Allocate space for the thread handles */ + ctx->threads = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), customMem); + ctx->threadCapacity = 0; + ctx->customMem = customMem; + /* Check for errors */ + if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; } + /* Initialize the threads */ + { size_t i; + for (i = 0; i < numThreads; ++i) { + if (ZSTD_pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) { + ctx->threadCapacity = i; + POOL_free(ctx); + return NULL; + } } + ctx->threadCapacity = numThreads; + ctx->threadLimit = numThreads; + } + return ctx; +} + +/*! POOL_join() : + Shutdown the queue, wake any sleeping threads, and join all of the threads. +*/ +static void POOL_join(POOL_ctx* ctx) { + /* Shut down the queue */ + ZSTD_pthread_mutex_lock(&ctx->queueMutex); + ctx->shutdown = 1; + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); + /* Wake up sleeping threads */ + ZSTD_pthread_cond_broadcast(&ctx->queuePushCond); + ZSTD_pthread_cond_broadcast(&ctx->queuePopCond); + /* Join all of the threads */ + { size_t i; + for (i = 0; i < ctx->threadCapacity; ++i) { + ZSTD_pthread_join(ctx->threads[i]); /* note : could fail */ + } } +} + +void POOL_free(POOL_ctx *ctx) { + if (!ctx) { return; } + POOL_join(ctx); + ZSTD_pthread_mutex_destroy(&ctx->queueMutex); + ZSTD_pthread_cond_destroy(&ctx->queuePushCond); + ZSTD_pthread_cond_destroy(&ctx->queuePopCond); + ZSTD_customFree(ctx->queue, ctx->customMem); + ZSTD_customFree(ctx->threads, ctx->customMem); + ZSTD_customFree(ctx, ctx->customMem); +} + +/*! POOL_joinJobs() : + * Waits for all queued jobs to finish executing. + */ +void POOL_joinJobs(POOL_ctx* ctx) { + ZSTD_pthread_mutex_lock(&ctx->queueMutex); + while(!ctx->queueEmpty || ctx->numThreadsBusy > 0) { + ZSTD_pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex); + } + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); +} + +void ZSTD_freeThreadPool (ZSTD_threadPool* pool) { + POOL_free (pool); +} + +size_t POOL_sizeof(const POOL_ctx* ctx) { + if (ctx==NULL) return 0; /* supports sizeof NULL */ + return sizeof(*ctx) + + ctx->queueSize * sizeof(POOL_job) + + ctx->threadCapacity * sizeof(ZSTD_pthread_t); +} + + +/* @return : 0 on success, 1 on error */ +static int POOL_resize_internal(POOL_ctx* ctx, size_t numThreads) +{ + if (numThreads <= ctx->threadCapacity) { + if (!numThreads) return 1; + ctx->threadLimit = numThreads; + return 0; + } + /* numThreads > threadCapacity */ + { ZSTD_pthread_t* const threadPool = (ZSTD_pthread_t*)ZSTD_customCalloc(numThreads * sizeof(ZSTD_pthread_t), ctx->customMem); + if (!threadPool) return 1; + /* replace existing thread pool */ + ZSTD_memcpy(threadPool, ctx->threads, ctx->threadCapacity * sizeof(ZSTD_pthread_t)); + ZSTD_customFree(ctx->threads, ctx->customMem); + ctx->threads = threadPool; + /* Initialize additional threads */ + { size_t threadId; + for (threadId = ctx->threadCapacity; threadId < numThreads; ++threadId) { + if (ZSTD_pthread_create(&threadPool[threadId], NULL, &POOL_thread, ctx)) { + ctx->threadCapacity = threadId; + return 1; + } } + } } + /* successfully expanded */ + ctx->threadCapacity = numThreads; + ctx->threadLimit = numThreads; + return 0; +} + +/* @return : 0 on success, 1 on error */ +int POOL_resize(POOL_ctx* ctx, size_t numThreads) +{ + int result; + if (ctx==NULL) return 1; + ZSTD_pthread_mutex_lock(&ctx->queueMutex); + result = POOL_resize_internal(ctx, numThreads); + ZSTD_pthread_cond_broadcast(&ctx->queuePopCond); + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); + return result; +} + +/** + * Returns 1 if the queue is full and 0 otherwise. + * + * When queueSize is 1 (pool was created with an intended queueSize of 0), + * then a queue is empty if there is a thread free _and_ no job is waiting. + */ +static int isQueueFull(POOL_ctx const* ctx) { + if (ctx->queueSize > 1) { + return ctx->queueHead == ((ctx->queueTail + 1) % ctx->queueSize); + } else { + return (ctx->numThreadsBusy == ctx->threadLimit) || + !ctx->queueEmpty; + } +} + + +static void +POOL_add_internal(POOL_ctx* ctx, POOL_function function, void *opaque) +{ + POOL_job job; + job.function = function; + job.opaque = opaque; + assert(ctx != NULL); + if (ctx->shutdown) return; + + ctx->queueEmpty = 0; + ctx->queue[ctx->queueTail] = job; + ctx->queueTail = (ctx->queueTail + 1) % ctx->queueSize; + ZSTD_pthread_cond_signal(&ctx->queuePopCond); +} + +void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque) +{ + assert(ctx != NULL); + ZSTD_pthread_mutex_lock(&ctx->queueMutex); + /* Wait until there is space in the queue for the new job */ + while (isQueueFull(ctx) && (!ctx->shutdown)) { + ZSTD_pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex); + } + POOL_add_internal(ctx, function, opaque); + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); +} + + +int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque) +{ + assert(ctx != NULL); + ZSTD_pthread_mutex_lock(&ctx->queueMutex); + if (isQueueFull(ctx)) { + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); + return 0; + } + POOL_add_internal(ctx, function, opaque); + ZSTD_pthread_mutex_unlock(&ctx->queueMutex); + return 1; +} + + +#else /* ZSTD_MULTITHREAD not defined */ + +/* ========================== */ +/* No multi-threading support */ +/* ========================== */ + + +/* We don't need any data, but if it is empty, malloc() might return NULL. */ +struct POOL_ctx_s { + int dummy; +}; +static POOL_ctx g_poolCtx; + +POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) { + return POOL_create_advanced(numThreads, queueSize, ZSTD_defaultCMem); +} + +POOL_ctx* +POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) +{ + (void)numThreads; + (void)queueSize; + (void)customMem; + return &g_poolCtx; +} + +void POOL_free(POOL_ctx* ctx) { + assert(!ctx || ctx == &g_poolCtx); + (void)ctx; +} + +void POOL_joinJobs(POOL_ctx* ctx){ + assert(!ctx || ctx == &g_poolCtx); + (void)ctx; +} + +int POOL_resize(POOL_ctx* ctx, size_t numThreads) { + (void)ctx; (void)numThreads; + return 0; +} + +void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque) { + (void)ctx; + function(opaque); +} + +int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque) { + (void)ctx; + function(opaque); + return 1; +} + +size_t POOL_sizeof(const POOL_ctx* ctx) { + if (ctx==NULL) return 0; /* supports sizeof NULL */ + assert(ctx == &g_poolCtx); + return sizeof(*ctx); +} + +#endif /* ZSTD_MULTITHREAD */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/pool.h b/cpp/third_party/zstd-1.5.7/lib/common/pool.h new file mode 100644 index 0000000000..f39b7f1eb9 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/pool.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef POOL_H +#define POOL_H + + +#include "zstd_deps.h" +#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_customMem */ +#include "../zstd.h" + +typedef struct POOL_ctx_s POOL_ctx; + +/*! POOL_create() : + * Create a thread pool with at most `numThreads` threads. + * `numThreads` must be at least 1. + * The maximum number of queued jobs before blocking is `queueSize`. + * @return : POOL_ctx pointer on success, else NULL. +*/ +POOL_ctx* POOL_create(size_t numThreads, size_t queueSize); + +POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, + ZSTD_customMem customMem); + +/*! POOL_free() : + * Free a thread pool returned by POOL_create(). + */ +void POOL_free(POOL_ctx* ctx); + + +/*! POOL_joinJobs() : + * Waits for all queued jobs to finish executing. + */ +void POOL_joinJobs(POOL_ctx* ctx); + +/*! POOL_resize() : + * Expands or shrinks pool's number of threads. + * This is more efficient than releasing + creating a new context, + * since it tries to preserve and reuse existing threads. + * `numThreads` must be at least 1. + * @return : 0 when resize was successful, + * !0 (typically 1) if there is an error. + * note : only numThreads can be resized, queueSize remains unchanged. + */ +int POOL_resize(POOL_ctx* ctx, size_t numThreads); + +/*! POOL_sizeof() : + * @return threadpool memory usage + * note : compatible with NULL (returns 0 in this case) + */ +size_t POOL_sizeof(const POOL_ctx* ctx); + +/*! POOL_function : + * The function type that can be added to a thread pool. + */ +typedef void (*POOL_function)(void*); + +/*! POOL_add() : + * Add the job `function(opaque)` to the thread pool. `ctx` must be valid. + * Possibly blocks until there is room in the queue. + * Note : The function may be executed asynchronously, + * therefore, `opaque` must live until function has been completed. + */ +void POOL_add(POOL_ctx* ctx, POOL_function function, void* opaque); + + +/*! POOL_tryAdd() : + * Add the job `function(opaque)` to thread pool _if_ a queue slot is available. + * Returns immediately even if not (does not block). + * @return : 1 if successful, 0 if not. + */ +int POOL_tryAdd(POOL_ctx* ctx, POOL_function function, void* opaque); + +#endif diff --git a/cpp/third_party/zstd-1.5.7/lib/common/portability_macros.h b/cpp/third_party/zstd-1.5.7/lib/common/portability_macros.h new file mode 100644 index 0000000000..860734141d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/portability_macros.h @@ -0,0 +1,171 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_PORTABILITY_MACROS_H +#define ZSTD_PORTABILITY_MACROS_H + +/** + * This header file contains macro definitions to support portability. + * This header is shared between C and ASM code, so it MUST only + * contain macro definitions. It MUST not contain any C code. + * + * This header ONLY defines macros to detect platforms/feature support. + * + */ + + +/* compat. with non-clang compilers */ +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif + +/* compat. with non-clang compilers */ +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +/* compat. with non-clang compilers */ +#ifndef __has_feature +# define __has_feature(x) 0 +#endif + +/* detects whether we are being compiled under msan */ +#ifndef ZSTD_MEMORY_SANITIZER +# if __has_feature(memory_sanitizer) +# define ZSTD_MEMORY_SANITIZER 1 +# else +# define ZSTD_MEMORY_SANITIZER 0 +# endif +#endif + +/* detects whether we are being compiled under asan */ +#ifndef ZSTD_ADDRESS_SANITIZER +# if __has_feature(address_sanitizer) +# define ZSTD_ADDRESS_SANITIZER 1 +# elif defined(__SANITIZE_ADDRESS__) +# define ZSTD_ADDRESS_SANITIZER 1 +# else +# define ZSTD_ADDRESS_SANITIZER 0 +# endif +#endif + +/* detects whether we are being compiled under dfsan */ +#ifndef ZSTD_DATAFLOW_SANITIZER +# if __has_feature(dataflow_sanitizer) +# define ZSTD_DATAFLOW_SANITIZER 1 +# else +# define ZSTD_DATAFLOW_SANITIZER 0 +# endif +#endif + +/* Mark the internal assembly functions as hidden */ +#ifdef __ELF__ +# define ZSTD_HIDE_ASM_FUNCTION(func) .hidden func +#elif defined(__APPLE__) +# define ZSTD_HIDE_ASM_FUNCTION(func) .private_extern func +#else +# define ZSTD_HIDE_ASM_FUNCTION(func) +#endif + +/* Compile time determination of BMI2 support */ +#ifndef STATIC_BMI2 +# if defined(__BMI2__) +# define STATIC_BMI2 1 +# elif defined(_MSC_VER) && defined(__AVX2__) +# define STATIC_BMI2 1 /* MSVC does not have a BMI2 specific flag, but every CPU that supports AVX2 also supports BMI2 */ +# endif +#endif + +#ifndef STATIC_BMI2 +# define STATIC_BMI2 0 +#endif + +/* Enable runtime BMI2 dispatch based on the CPU. + * Enabled for clang & gcc >=4.8 on x86 when BMI2 isn't enabled by default. + */ +#ifndef DYNAMIC_BMI2 +# if ((defined(__clang__) && __has_attribute(__target__)) \ + || (defined(__GNUC__) \ + && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))) \ + && (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)) \ + && !defined(__BMI2__) +# define DYNAMIC_BMI2 1 +# else +# define DYNAMIC_BMI2 0 +# endif +#endif + +/** + * Only enable assembly for GNU C compatible compilers, + * because other platforms may not support GAS assembly syntax. + * + * Only enable assembly for Linux / MacOS / Win32, other platforms may + * work, but they haven't been tested. This could likely be + * extended to BSD systems. + * + * Disable assembly when MSAN is enabled, because MSAN requires + * 100% of code to be instrumented to work. + */ +#if defined(__GNUC__) +# if defined(__linux__) || defined(__linux) || defined(__APPLE__) || defined(_WIN32) +# if ZSTD_MEMORY_SANITIZER +# define ZSTD_ASM_SUPPORTED 0 +# elif ZSTD_DATAFLOW_SANITIZER +# define ZSTD_ASM_SUPPORTED 0 +# else +# define ZSTD_ASM_SUPPORTED 1 +# endif +# else +# define ZSTD_ASM_SUPPORTED 0 +# endif +#else +# define ZSTD_ASM_SUPPORTED 0 +#endif + +/** + * Determines whether we should enable assembly for x86-64 + * with BMI2. + * + * Enable if all of the following conditions hold: + * - ASM hasn't been explicitly disabled by defining ZSTD_DISABLE_ASM + * - Assembly is supported + * - We are compiling for x86-64 and either: + * - DYNAMIC_BMI2 is enabled + * - BMI2 is supported at compile time + */ +#if !defined(ZSTD_DISABLE_ASM) && \ + ZSTD_ASM_SUPPORTED && \ + defined(__x86_64__) && \ + (DYNAMIC_BMI2 || defined(__BMI2__)) +# define ZSTD_ENABLE_ASM_X86_64_BMI2 1 +#else +# define ZSTD_ENABLE_ASM_X86_64_BMI2 0 +#endif + +/* + * For x86 ELF targets, add .note.gnu.property section for Intel CET in + * assembly sources when CET is enabled. + * + * Additionally, any function that may be called indirectly must begin + * with ZSTD_CET_ENDBRANCH. + */ +#if defined(__ELF__) && (defined(__x86_64__) || defined(__i386__)) \ + && defined(__has_include) +# if __has_include() +# include +# define ZSTD_CET_ENDBRANCH _CET_ENDBR +# endif +#endif + +#ifndef ZSTD_CET_ENDBRANCH +# define ZSTD_CET_ENDBRANCH +#endif + +#endif /* ZSTD_PORTABILITY_MACROS_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/threading.c b/cpp/third_party/zstd-1.5.7/lib/common/threading.c new file mode 100644 index 0000000000..25bb8b9810 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/threading.c @@ -0,0 +1,182 @@ +/** + * Copyright (c) 2016 Tino Reichardt + * All rights reserved. + * + * You can contact the author at: + * - zstdmt source repository: https://github.com/mcmilk/zstdmt + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/** + * This file will hold wrapper for systems, which do not support pthreads + */ + +#include "threading.h" + +/* create fake symbol to avoid empty translation unit warning */ +int g_ZSTD_threading_useless_symbol; + +#if defined(ZSTD_MULTITHREAD) && defined(_WIN32) + +/** + * Windows minimalist Pthread Wrapper + */ + + +/* === Dependencies === */ +#include +#include + + +/* === Implementation === */ + +typedef struct { + void* (*start_routine)(void*); + void* arg; + int initialized; + ZSTD_pthread_cond_t initialized_cond; + ZSTD_pthread_mutex_t initialized_mutex; +} ZSTD_thread_params_t; + +static unsigned __stdcall worker(void *arg) +{ + void* (*start_routine)(void*); + void* thread_arg; + + /* Initialized thread_arg and start_routine and signal main thread that we don't need it + * to wait any longer. + */ + { + ZSTD_thread_params_t* thread_param = (ZSTD_thread_params_t*)arg; + thread_arg = thread_param->arg; + start_routine = thread_param->start_routine; + + /* Signal main thread that we are running and do not depend on its memory anymore */ + ZSTD_pthread_mutex_lock(&thread_param->initialized_mutex); + thread_param->initialized = 1; + ZSTD_pthread_cond_signal(&thread_param->initialized_cond); + ZSTD_pthread_mutex_unlock(&thread_param->initialized_mutex); + } + + start_routine(thread_arg); + + return 0; +} + +int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused, + void* (*start_routine) (void*), void* arg) +{ + ZSTD_thread_params_t thread_param; + (void)unused; + + if (thread==NULL) return -1; + *thread = NULL; + + thread_param.start_routine = start_routine; + thread_param.arg = arg; + thread_param.initialized = 0; + + /* Setup thread initialization synchronization */ + if(ZSTD_pthread_cond_init(&thread_param.initialized_cond, NULL)) { + /* Should never happen on Windows */ + return -1; + } + if(ZSTD_pthread_mutex_init(&thread_param.initialized_mutex, NULL)) { + /* Should never happen on Windows */ + ZSTD_pthread_cond_destroy(&thread_param.initialized_cond); + return -1; + } + + /* Spawn thread */ + *thread = (HANDLE)_beginthreadex(NULL, 0, worker, &thread_param, 0, NULL); + if (*thread==NULL) { + ZSTD_pthread_mutex_destroy(&thread_param.initialized_mutex); + ZSTD_pthread_cond_destroy(&thread_param.initialized_cond); + return errno; + } + + /* Wait for thread to be initialized */ + ZSTD_pthread_mutex_lock(&thread_param.initialized_mutex); + while(!thread_param.initialized) { + ZSTD_pthread_cond_wait(&thread_param.initialized_cond, &thread_param.initialized_mutex); + } + ZSTD_pthread_mutex_unlock(&thread_param.initialized_mutex); + ZSTD_pthread_mutex_destroy(&thread_param.initialized_mutex); + ZSTD_pthread_cond_destroy(&thread_param.initialized_cond); + + return 0; +} + +int ZSTD_pthread_join(ZSTD_pthread_t thread) +{ + DWORD result; + + if (!thread) return 0; + + result = WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); + + switch (result) { + case WAIT_OBJECT_0: + return 0; + case WAIT_ABANDONED: + return EINVAL; + default: + return GetLastError(); + } +} + +#endif /* ZSTD_MULTITHREAD */ + +#if defined(ZSTD_MULTITHREAD) && DEBUGLEVEL >= 1 && !defined(_WIN32) + +#define ZSTD_DEPS_NEED_MALLOC +#include "zstd_deps.h" + +int ZSTD_pthread_mutex_init(ZSTD_pthread_mutex_t* mutex, pthread_mutexattr_t const* attr) +{ + assert(mutex != NULL); + *mutex = (pthread_mutex_t*)ZSTD_malloc(sizeof(pthread_mutex_t)); + if (!*mutex) + return 1; + return pthread_mutex_init(*mutex, attr); +} + +int ZSTD_pthread_mutex_destroy(ZSTD_pthread_mutex_t* mutex) +{ + assert(mutex != NULL); + if (!*mutex) + return 0; + { + int const ret = pthread_mutex_destroy(*mutex); + ZSTD_free(*mutex); + return ret; + } +} + +int ZSTD_pthread_cond_init(ZSTD_pthread_cond_t* cond, pthread_condattr_t const* attr) +{ + assert(cond != NULL); + *cond = (pthread_cond_t*)ZSTD_malloc(sizeof(pthread_cond_t)); + if (!*cond) + return 1; + return pthread_cond_init(*cond, attr); +} + +int ZSTD_pthread_cond_destroy(ZSTD_pthread_cond_t* cond) +{ + assert(cond != NULL); + if (!*cond) + return 0; + { + int const ret = pthread_cond_destroy(*cond); + ZSTD_free(*cond); + return ret; + } +} + +#endif diff --git a/cpp/third_party/zstd-1.5.7/lib/common/threading.h b/cpp/third_party/zstd-1.5.7/lib/common/threading.h new file mode 100644 index 0000000000..e123cdf14a --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/threading.h @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2016 Tino Reichardt + * All rights reserved. + * + * You can contact the author at: + * - zstdmt source repository: https://github.com/mcmilk/zstdmt + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef THREADING_H_938743 +#define THREADING_H_938743 + +#include "debug.h" + +#if defined(ZSTD_MULTITHREAD) && defined(_WIN32) + +/** + * Windows minimalist Pthread Wrapper + */ +#ifdef WINVER +# undef WINVER +#endif +#define WINVER 0x0600 + +#ifdef _WIN32_WINNT +# undef _WIN32_WINNT +#endif +#define _WIN32_WINNT 0x0600 + +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif + +#undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */ +#include +#undef ERROR +#define ERROR(name) ZSTD_ERROR(name) + + +/* mutex */ +#define ZSTD_pthread_mutex_t CRITICAL_SECTION +#define ZSTD_pthread_mutex_init(a, b) ((void)(b), InitializeCriticalSection((a)), 0) +#define ZSTD_pthread_mutex_destroy(a) DeleteCriticalSection((a)) +#define ZSTD_pthread_mutex_lock(a) EnterCriticalSection((a)) +#define ZSTD_pthread_mutex_unlock(a) LeaveCriticalSection((a)) + +/* condition variable */ +#define ZSTD_pthread_cond_t CONDITION_VARIABLE +#define ZSTD_pthread_cond_init(a, b) ((void)(b), InitializeConditionVariable((a)), 0) +#define ZSTD_pthread_cond_destroy(a) ((void)(a)) +#define ZSTD_pthread_cond_wait(a, b) SleepConditionVariableCS((a), (b), INFINITE) +#define ZSTD_pthread_cond_signal(a) WakeConditionVariable((a)) +#define ZSTD_pthread_cond_broadcast(a) WakeAllConditionVariable((a)) + +/* ZSTD_pthread_create() and ZSTD_pthread_join() */ +typedef HANDLE ZSTD_pthread_t; + +int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused, + void* (*start_routine) (void*), void* arg); + +int ZSTD_pthread_join(ZSTD_pthread_t thread); + +/** + * add here more wrappers as required + */ + +#elif defined(ZSTD_MULTITHREAD) /* posix assumed ; need a better detection method */ +/* === POSIX Systems === */ +# include + +#if DEBUGLEVEL < 1 + +#define ZSTD_pthread_mutex_t pthread_mutex_t +#define ZSTD_pthread_mutex_init(a, b) pthread_mutex_init((a), (b)) +#define ZSTD_pthread_mutex_destroy(a) pthread_mutex_destroy((a)) +#define ZSTD_pthread_mutex_lock(a) pthread_mutex_lock((a)) +#define ZSTD_pthread_mutex_unlock(a) pthread_mutex_unlock((a)) + +#define ZSTD_pthread_cond_t pthread_cond_t +#define ZSTD_pthread_cond_init(a, b) pthread_cond_init((a), (b)) +#define ZSTD_pthread_cond_destroy(a) pthread_cond_destroy((a)) +#define ZSTD_pthread_cond_wait(a, b) pthread_cond_wait((a), (b)) +#define ZSTD_pthread_cond_signal(a) pthread_cond_signal((a)) +#define ZSTD_pthread_cond_broadcast(a) pthread_cond_broadcast((a)) + +#define ZSTD_pthread_t pthread_t +#define ZSTD_pthread_create(a, b, c, d) pthread_create((a), (b), (c), (d)) +#define ZSTD_pthread_join(a) pthread_join((a),NULL) + +#else /* DEBUGLEVEL >= 1 */ + +/* Debug implementation of threading. + * In this implementation we use pointers for mutexes and condition variables. + * This way, if we forget to init/destroy them the program will crash or ASAN + * will report leaks. + */ + +#define ZSTD_pthread_mutex_t pthread_mutex_t* +int ZSTD_pthread_mutex_init(ZSTD_pthread_mutex_t* mutex, pthread_mutexattr_t const* attr); +int ZSTD_pthread_mutex_destroy(ZSTD_pthread_mutex_t* mutex); +#define ZSTD_pthread_mutex_lock(a) pthread_mutex_lock(*(a)) +#define ZSTD_pthread_mutex_unlock(a) pthread_mutex_unlock(*(a)) + +#define ZSTD_pthread_cond_t pthread_cond_t* +int ZSTD_pthread_cond_init(ZSTD_pthread_cond_t* cond, pthread_condattr_t const* attr); +int ZSTD_pthread_cond_destroy(ZSTD_pthread_cond_t* cond); +#define ZSTD_pthread_cond_wait(a, b) pthread_cond_wait(*(a), *(b)) +#define ZSTD_pthread_cond_signal(a) pthread_cond_signal(*(a)) +#define ZSTD_pthread_cond_broadcast(a) pthread_cond_broadcast(*(a)) + +#define ZSTD_pthread_t pthread_t +#define ZSTD_pthread_create(a, b, c, d) pthread_create((a), (b), (c), (d)) +#define ZSTD_pthread_join(a) pthread_join((a),NULL) + +#endif + +#else /* ZSTD_MULTITHREAD not defined */ +/* No multithreading support */ + +typedef int ZSTD_pthread_mutex_t; +#define ZSTD_pthread_mutex_init(a, b) ((void)(a), (void)(b), 0) +#define ZSTD_pthread_mutex_destroy(a) ((void)(a)) +#define ZSTD_pthread_mutex_lock(a) ((void)(a)) +#define ZSTD_pthread_mutex_unlock(a) ((void)(a)) + +typedef int ZSTD_pthread_cond_t; +#define ZSTD_pthread_cond_init(a, b) ((void)(a), (void)(b), 0) +#define ZSTD_pthread_cond_destroy(a) ((void)(a)) +#define ZSTD_pthread_cond_wait(a, b) ((void)(a), (void)(b)) +#define ZSTD_pthread_cond_signal(a) ((void)(a)) +#define ZSTD_pthread_cond_broadcast(a) ((void)(a)) + +/* do not use ZSTD_pthread_t */ + +#endif /* ZSTD_MULTITHREAD */ + + +#endif /* THREADING_H_938743 */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/xxhash.c b/cpp/third_party/zstd-1.5.7/lib/common/xxhash.c new file mode 100644 index 0000000000..052cd52282 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/xxhash.c @@ -0,0 +1,18 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Copyright (c) Yann Collet - Meta Platforms, Inc + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* + * xxhash.c instantiates functions defined in xxhash.h + */ + +#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */ +#define XXH_IMPLEMENTATION /* access definitions */ + +#include "xxhash.h" diff --git a/cpp/third_party/zstd-1.5.7/lib/common/xxhash.h b/cpp/third_party/zstd-1.5.7/lib/common/xxhash.h new file mode 100644 index 0000000000..b6af402fdf --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/xxhash.h @@ -0,0 +1,7094 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Header File + * Copyright (c) Yann Collet - Meta Platforms, Inc + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* Local adaptations for Zstandard */ + +#ifndef XXH_NO_XXH3 +# define XXH_NO_XXH3 +#endif + +#ifndef XXH_NAMESPACE +# define XXH_NAMESPACE ZSTD_ +#endif + +/*! + * @mainpage xxHash + * + * xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM speed + * limits. + * + * It is proposed in four flavors, in three families: + * 1. @ref XXH32_family + * - Classic 32-bit hash function. Simple, compact, and runs on almost all + * 32-bit and 64-bit systems. + * 2. @ref XXH64_family + * - Classic 64-bit adaptation of XXH32. Just as simple, and runs well on most + * 64-bit systems (but _not_ 32-bit systems). + * 3. @ref XXH3_family + * - Modern 64-bit and 128-bit hash function family which features improved + * strength and performance across the board, especially on smaller data. + * It benefits greatly from SIMD and 64-bit without requiring it. + * + * Benchmarks + * --- + * The reference system uses an Intel i7-9700K CPU, and runs Ubuntu x64 20.04. + * The open source benchmark program is compiled with clang v10.0 using -O3 flag. + * + * | Hash Name | ISA ext | Width | Large Data Speed | Small Data Velocity | + * | -------------------- | ------- | ----: | ---------------: | ------------------: | + * | XXH3_64bits() | @b AVX2 | 64 | 59.4 GB/s | 133.1 | + * | MeowHash | AES-NI | 128 | 58.2 GB/s | 52.5 | + * | XXH3_128bits() | @b AVX2 | 128 | 57.9 GB/s | 118.1 | + * | CLHash | PCLMUL | 64 | 37.1 GB/s | 58.1 | + * | XXH3_64bits() | @b SSE2 | 64 | 31.5 GB/s | 133.1 | + * | XXH3_128bits() | @b SSE2 | 128 | 29.6 GB/s | 118.1 | + * | RAM sequential read | | N/A | 28.0 GB/s | N/A | + * | ahash | AES-NI | 64 | 22.5 GB/s | 107.2 | + * | City64 | | 64 | 22.0 GB/s | 76.6 | + * | T1ha2 | | 64 | 22.0 GB/s | 99.0 | + * | City128 | | 128 | 21.7 GB/s | 57.7 | + * | FarmHash | AES-NI | 64 | 21.3 GB/s | 71.9 | + * | XXH64() | | 64 | 19.4 GB/s | 71.0 | + * | SpookyHash | | 64 | 19.3 GB/s | 53.2 | + * | Mum | | 64 | 18.0 GB/s | 67.0 | + * | CRC32C | SSE4.2 | 32 | 13.0 GB/s | 57.9 | + * | XXH32() | | 32 | 9.7 GB/s | 71.9 | + * | City32 | | 32 | 9.1 GB/s | 66.0 | + * | Blake3* | @b AVX2 | 256 | 4.4 GB/s | 8.1 | + * | Murmur3 | | 32 | 3.9 GB/s | 56.1 | + * | SipHash* | | 64 | 3.0 GB/s | 43.2 | + * | Blake3* | @b SSE2 | 256 | 2.4 GB/s | 8.1 | + * | HighwayHash | | 64 | 1.4 GB/s | 6.0 | + * | FNV64 | | 64 | 1.2 GB/s | 62.7 | + * | Blake2* | | 256 | 1.1 GB/s | 5.1 | + * | SHA1* | | 160 | 0.8 GB/s | 5.6 | + * | MD5* | | 128 | 0.6 GB/s | 7.8 | + * @note + * - Hashes which require a specific ISA extension are noted. SSE2 is also noted, + * even though it is mandatory on x64. + * - Hashes with an asterisk are cryptographic. Note that MD5 is non-cryptographic + * by modern standards. + * - Small data velocity is a rough average of algorithm's efficiency for small + * data. For more accurate information, see the wiki. + * - More benchmarks and strength tests are found on the wiki: + * https://github.com/Cyan4973/xxHash/wiki + * + * Usage + * ------ + * All xxHash variants use a similar API. Changing the algorithm is a trivial + * substitution. + * + * @pre + * For functions which take an input and length parameter, the following + * requirements are assumed: + * - The range from [`input`, `input + length`) is valid, readable memory. + * - The only exception is if the `length` is `0`, `input` may be `NULL`. + * - For C++, the objects must have the *TriviallyCopyable* property, as the + * functions access bytes directly as if it was an array of `unsigned char`. + * + * @anchor single_shot_example + * **Single Shot** + * + * These functions are stateless functions which hash a contiguous block of memory, + * immediately returning the result. They are the easiest and usually the fastest + * option. + * + * XXH32(), XXH64(), XXH3_64bits(), XXH3_128bits() + * + * @code{.c} + * #include + * #include "xxhash.h" + * + * // Example for a function which hashes a null terminated string with XXH32(). + * XXH32_hash_t hash_string(const char* string, XXH32_hash_t seed) + * { + * // NULL pointers are only valid if the length is zero + * size_t length = (string == NULL) ? 0 : strlen(string); + * return XXH32(string, length, seed); + * } + * @endcode + * + * + * @anchor streaming_example + * **Streaming** + * + * These groups of functions allow incremental hashing of unknown size, even + * more than what would fit in a size_t. + * + * XXH32_reset(), XXH64_reset(), XXH3_64bits_reset(), XXH3_128bits_reset() + * + * @code{.c} + * #include + * #include + * #include "xxhash.h" + * // Example for a function which hashes a FILE incrementally with XXH3_64bits(). + * XXH64_hash_t hashFile(FILE* f) + * { + * // Allocate a state struct. Do not just use malloc() or new. + * XXH3_state_t* state = XXH3_createState(); + * assert(state != NULL && "Out of memory!"); + * // Reset the state to start a new hashing session. + * XXH3_64bits_reset(state); + * char buffer[4096]; + * size_t count; + * // Read the file in chunks + * while ((count = fread(buffer, 1, sizeof(buffer), f)) != 0) { + * // Run update() as many times as necessary to process the data + * XXH3_64bits_update(state, buffer, count); + * } + * // Retrieve the finalized hash. This will not change the state. + * XXH64_hash_t result = XXH3_64bits_digest(state); + * // Free the state. Do not use free(). + * XXH3_freeState(state); + * return result; + * } + * @endcode + * + * Streaming functions generate the xxHash value from an incremental input. + * This method is slower than single-call functions, due to state management. + * For small inputs, prefer `XXH32()` and `XXH64()`, which are better optimized. + * + * An XXH state must first be allocated using `XXH*_createState()`. + * + * Start a new hash by initializing the state with a seed using `XXH*_reset()`. + * + * Then, feed the hash state by calling `XXH*_update()` as many times as necessary. + * + * The function returns an error code, with 0 meaning OK, and any other value + * meaning there is an error. + * + * Finally, a hash value can be produced anytime, by using `XXH*_digest()`. + * This function returns the nn-bits hash as an int or long long. + * + * It's still possible to continue inserting input into the hash state after a + * digest, and generate new hash values later on by invoking `XXH*_digest()`. + * + * When done, release the state using `XXH*_freeState()`. + * + * + * @anchor canonical_representation_example + * **Canonical Representation** + * + * The default return values from XXH functions are unsigned 32, 64 and 128 bit + * integers. + * This the simplest and fastest format for further post-processing. + * + * However, this leaves open the question of what is the order on the byte level, + * since little and big endian conventions will store the same number differently. + * + * The canonical representation settles this issue by mandating big-endian + * convention, the same convention as human-readable numbers (large digits first). + * + * When writing hash values to storage, sending them over a network, or printing + * them, it's highly recommended to use the canonical representation to ensure + * portability across a wider range of systems, present and future. + * + * The following functions allow transformation of hash values to and from + * canonical format. + * + * XXH32_canonicalFromHash(), XXH32_hashFromCanonical(), + * XXH64_canonicalFromHash(), XXH64_hashFromCanonical(), + * XXH128_canonicalFromHash(), XXH128_hashFromCanonical(), + * + * @code{.c} + * #include + * #include "xxhash.h" + * + * // Example for a function which prints XXH32_hash_t in human readable format + * void printXxh32(XXH32_hash_t hash) + * { + * XXH32_canonical_t cano; + * XXH32_canonicalFromHash(&cano, hash); + * size_t i; + * for(i = 0; i < sizeof(cano.digest); ++i) { + * printf("%02x", cano.digest[i]); + * } + * printf("\n"); + * } + * + * // Example for a function which converts XXH32_canonical_t to XXH32_hash_t + * XXH32_hash_t convertCanonicalToXxh32(XXH32_canonical_t cano) + * { + * XXH32_hash_t hash = XXH32_hashFromCanonical(&cano); + * return hash; + * } + * @endcode + * + * + * @file xxhash.h + * xxHash prototypes and implementation + */ + +/* **************************** + * INLINE mode + ******************************/ +/*! + * @defgroup public Public API + * Contains details on the public xxHash functions. + * @{ + */ +#ifdef XXH_DOXYGEN +/*! + * @brief Gives access to internal state declaration, required for static allocation. + * + * Incompatible with dynamic linking, due to risks of ABI changes. + * + * Usage: + * @code{.c} + * #define XXH_STATIC_LINKING_ONLY + * #include "xxhash.h" + * @endcode + */ +# define XXH_STATIC_LINKING_ONLY +/* Do not undef XXH_STATIC_LINKING_ONLY for Doxygen */ + +/*! + * @brief Gives access to internal definitions. + * + * Usage: + * @code{.c} + * #define XXH_STATIC_LINKING_ONLY + * #define XXH_IMPLEMENTATION + * #include "xxhash.h" + * @endcode + */ +# define XXH_IMPLEMENTATION +/* Do not undef XXH_IMPLEMENTATION for Doxygen */ + +/*! + * @brief Exposes the implementation and marks all functions as `inline`. + * + * Use these build macros to inline xxhash into the target unit. + * Inlining improves performance on small inputs, especially when the length is + * expressed as a compile-time constant: + * + * https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html + * + * It also keeps xxHash symbols private to the unit, so they are not exported. + * + * Usage: + * @code{.c} + * #define XXH_INLINE_ALL + * #include "xxhash.h" + * @endcode + * Do not compile and link xxhash.o as a separate object, as it is not useful. + */ +# define XXH_INLINE_ALL +# undef XXH_INLINE_ALL +/*! + * @brief Exposes the implementation without marking functions as inline. + */ +# define XXH_PRIVATE_API +# undef XXH_PRIVATE_API +/*! + * @brief Emulate a namespace by transparently prefixing all symbols. + * + * If you want to include _and expose_ xxHash functions from within your own + * library, but also want to avoid symbol collisions with other libraries which + * may also include xxHash, you can use @ref XXH_NAMESPACE to automatically prefix + * any public symbol from xxhash library with the value of @ref XXH_NAMESPACE + * (therefore, avoid empty or numeric values). + * + * Note that no change is required within the calling program as long as it + * includes `xxhash.h`: Regular symbol names will be automatically translated + * by this header. + */ +# define XXH_NAMESPACE /* YOUR NAME HERE */ +# undef XXH_NAMESPACE +#endif + +#if (defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \ + && !defined(XXH_INLINE_ALL_31684351384) + /* this section should be traversed only once */ +# define XXH_INLINE_ALL_31684351384 + /* give access to the advanced API, required to compile implementations */ +# undef XXH_STATIC_LINKING_ONLY /* avoid macro redef */ +# define XXH_STATIC_LINKING_ONLY + /* make all functions private */ +# undef XXH_PUBLIC_API +# if defined(__GNUC__) +# define XXH_PUBLIC_API static __inline __attribute__((unused)) +# elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# define XXH_PUBLIC_API static inline +# elif defined(_MSC_VER) +# define XXH_PUBLIC_API static __inline +# else + /* note: this version may generate warnings for unused static functions */ +# define XXH_PUBLIC_API static +# endif + + /* + * This part deals with the special case where a unit wants to inline xxHash, + * but "xxhash.h" has previously been included without XXH_INLINE_ALL, + * such as part of some previously included *.h header file. + * Without further action, the new include would just be ignored, + * and functions would effectively _not_ be inlined (silent failure). + * The following macros solve this situation by prefixing all inlined names, + * avoiding naming collision with previous inclusions. + */ + /* Before that, we unconditionally #undef all symbols, + * in case they were already defined with XXH_NAMESPACE. + * They will then be redefined for XXH_INLINE_ALL + */ +# undef XXH_versionNumber + /* XXH32 */ +# undef XXH32 +# undef XXH32_createState +# undef XXH32_freeState +# undef XXH32_reset +# undef XXH32_update +# undef XXH32_digest +# undef XXH32_copyState +# undef XXH32_canonicalFromHash +# undef XXH32_hashFromCanonical + /* XXH64 */ +# undef XXH64 +# undef XXH64_createState +# undef XXH64_freeState +# undef XXH64_reset +# undef XXH64_update +# undef XXH64_digest +# undef XXH64_copyState +# undef XXH64_canonicalFromHash +# undef XXH64_hashFromCanonical + /* XXH3_64bits */ +# undef XXH3_64bits +# undef XXH3_64bits_withSecret +# undef XXH3_64bits_withSeed +# undef XXH3_64bits_withSecretandSeed +# undef XXH3_createState +# undef XXH3_freeState +# undef XXH3_copyState +# undef XXH3_64bits_reset +# undef XXH3_64bits_reset_withSeed +# undef XXH3_64bits_reset_withSecret +# undef XXH3_64bits_update +# undef XXH3_64bits_digest +# undef XXH3_generateSecret + /* XXH3_128bits */ +# undef XXH128 +# undef XXH3_128bits +# undef XXH3_128bits_withSeed +# undef XXH3_128bits_withSecret +# undef XXH3_128bits_reset +# undef XXH3_128bits_reset_withSeed +# undef XXH3_128bits_reset_withSecret +# undef XXH3_128bits_reset_withSecretandSeed +# undef XXH3_128bits_update +# undef XXH3_128bits_digest +# undef XXH128_isEqual +# undef XXH128_cmp +# undef XXH128_canonicalFromHash +# undef XXH128_hashFromCanonical + /* Finally, free the namespace itself */ +# undef XXH_NAMESPACE + + /* employ the namespace for XXH_INLINE_ALL */ +# define XXH_NAMESPACE XXH_INLINE_ + /* + * Some identifiers (enums, type names) are not symbols, + * but they must nonetheless be renamed to avoid redeclaration. + * Alternative solution: do not redeclare them. + * However, this requires some #ifdefs, and has a more dispersed impact. + * Meanwhile, renaming can be achieved in a single place. + */ +# define XXH_IPREF(Id) XXH_NAMESPACE ## Id +# define XXH_OK XXH_IPREF(XXH_OK) +# define XXH_ERROR XXH_IPREF(XXH_ERROR) +# define XXH_errorcode XXH_IPREF(XXH_errorcode) +# define XXH32_canonical_t XXH_IPREF(XXH32_canonical_t) +# define XXH64_canonical_t XXH_IPREF(XXH64_canonical_t) +# define XXH128_canonical_t XXH_IPREF(XXH128_canonical_t) +# define XXH32_state_s XXH_IPREF(XXH32_state_s) +# define XXH32_state_t XXH_IPREF(XXH32_state_t) +# define XXH64_state_s XXH_IPREF(XXH64_state_s) +# define XXH64_state_t XXH_IPREF(XXH64_state_t) +# define XXH3_state_s XXH_IPREF(XXH3_state_s) +# define XXH3_state_t XXH_IPREF(XXH3_state_t) +# define XXH128_hash_t XXH_IPREF(XXH128_hash_t) + /* Ensure the header is parsed again, even if it was previously included */ +# undef XXHASH_H_5627135585666179 +# undef XXHASH_H_STATIC_13879238742 +#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */ + +/* **************************************************************** + * Stable API + *****************************************************************/ +#ifndef XXHASH_H_5627135585666179 +#define XXHASH_H_5627135585666179 1 + +/*! @brief Marks a global symbol. */ +#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API) +# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT)) +# ifdef XXH_EXPORT +# define XXH_PUBLIC_API __declspec(dllexport) +# elif XXH_IMPORT +# define XXH_PUBLIC_API __declspec(dllimport) +# endif +# else +# define XXH_PUBLIC_API /* do nothing */ +# endif +#endif + +#ifdef XXH_NAMESPACE +# define XXH_CAT(A,B) A##B +# define XXH_NAME2(A,B) XXH_CAT(A,B) +# define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber) +/* XXH32 */ +# define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32) +# define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState) +# define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState) +# define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset) +# define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update) +# define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest) +# define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState) +# define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash) +# define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical) +/* XXH64 */ +# define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64) +# define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState) +# define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState) +# define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset) +# define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update) +# define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest) +# define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState) +# define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash) +# define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical) +/* XXH3_64bits */ +# define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits) +# define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret) +# define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed) +# define XXH3_64bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecretandSeed) +# define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState) +# define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState) +# define XXH3_copyState XXH_NAME2(XXH_NAMESPACE, XXH3_copyState) +# define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset) +# define XXH3_64bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSeed) +# define XXH3_64bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecret) +# define XXH3_64bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecretandSeed) +# define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update) +# define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest) +# define XXH3_generateSecret XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret) +# define XXH3_generateSecret_fromSeed XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret_fromSeed) +/* XXH3_128bits */ +# define XXH128 XXH_NAME2(XXH_NAMESPACE, XXH128) +# define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits) +# define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed) +# define XXH3_128bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecret) +# define XXH3_128bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecretandSeed) +# define XXH3_128bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset) +# define XXH3_128bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSeed) +# define XXH3_128bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecret) +# define XXH3_128bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecretandSeed) +# define XXH3_128bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_update) +# define XXH3_128bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_digest) +# define XXH128_isEqual XXH_NAME2(XXH_NAMESPACE, XXH128_isEqual) +# define XXH128_cmp XXH_NAME2(XXH_NAMESPACE, XXH128_cmp) +# define XXH128_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH128_canonicalFromHash) +# define XXH128_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH128_hashFromCanonical) +#endif + + +/* ************************************* +* Compiler specifics +***************************************/ + +/* specific declaration modes for Windows */ +#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API) +# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT)) +# ifdef XXH_EXPORT +# define XXH_PUBLIC_API __declspec(dllexport) +# elif XXH_IMPORT +# define XXH_PUBLIC_API __declspec(dllimport) +# endif +# else +# define XXH_PUBLIC_API /* do nothing */ +# endif +#endif + +#if defined (__GNUC__) +# define XXH_CONSTF __attribute__((const)) +# define XXH_PUREF __attribute__((pure)) +# define XXH_MALLOCF __attribute__((malloc)) +#else +# define XXH_CONSTF /* disable */ +# define XXH_PUREF +# define XXH_MALLOCF +#endif + +/* ************************************* +* Version +***************************************/ +#define XXH_VERSION_MAJOR 0 +#define XXH_VERSION_MINOR 8 +#define XXH_VERSION_RELEASE 2 +/*! @brief Version number, encoded as two digits each */ +#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) + +#if defined (__cplusplus) +extern "C" { +#endif +/*! + * @brief Obtains the xxHash version. + * + * This is mostly useful when xxHash is compiled as a shared library, + * since the returned value comes from the library, as opposed to header file. + * + * @return @ref XXH_VERSION_NUMBER of the invoked library. + */ +XXH_PUBLIC_API XXH_CONSTF unsigned XXH_versionNumber (void); + +#if defined (__cplusplus) +} +#endif + +/* **************************** +* Common basic types +******************************/ +#include /* size_t */ +/*! + * @brief Exit code for the streaming API. + */ +typedef enum { + XXH_OK = 0, /*!< OK */ + XXH_ERROR /*!< Error */ +} XXH_errorcode; + + +/*-********************************************************************** +* 32-bit hash +************************************************************************/ +#if defined(XXH_DOXYGEN) /* Don't show include */ +/*! + * @brief An unsigned 32-bit integer. + * + * Not necessarily defined to `uint32_t` but functionally equivalent. + */ +typedef uint32_t XXH32_hash_t; + +#elif !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# ifdef _AIX +# include +# else +# include +# endif + typedef uint32_t XXH32_hash_t; + +#else +# include +# if UINT_MAX == 0xFFFFFFFFUL + typedef unsigned int XXH32_hash_t; +# elif ULONG_MAX == 0xFFFFFFFFUL + typedef unsigned long XXH32_hash_t; +# else +# error "unsupported platform: need a 32-bit type" +# endif +#endif + +#if defined (__cplusplus) +extern "C" { +#endif + +/*! + * @} + * + * @defgroup XXH32_family XXH32 family + * @ingroup public + * Contains functions used in the classic 32-bit xxHash algorithm. + * + * @note + * XXH32 is useful for older platforms, with no or poor 64-bit performance. + * Note that the @ref XXH3_family provides competitive speed for both 32-bit + * and 64-bit systems, and offers true 64/128 bit hash results. + * + * @see @ref XXH64_family, @ref XXH3_family : Other xxHash families + * @see @ref XXH32_impl for implementation details + * @{ + */ + +/*! + * @brief Calculates the 32-bit hash of @p input using xxHash32. + * + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * @param seed The 32-bit seed to alter the hash's output predictably. + * + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return The calculated 32-bit xxHash32 value. + * + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed); + +#ifndef XXH_NO_STREAM +/*! + * @typedef struct XXH32_state_s XXH32_state_t + * @brief The opaque state struct for the XXH32 streaming API. + * + * @see XXH32_state_s for details. + */ +typedef struct XXH32_state_s XXH32_state_t; + +/*! + * @brief Allocates an @ref XXH32_state_t. + * + * @return An allocated pointer of @ref XXH32_state_t on success. + * @return `NULL` on failure. + * + * @note Must be freed with XXH32_freeState(). + */ +XXH_PUBLIC_API XXH_MALLOCF XXH32_state_t* XXH32_createState(void); +/*! + * @brief Frees an @ref XXH32_state_t. + * + * @param statePtr A pointer to an @ref XXH32_state_t allocated with @ref XXH32_createState(). + * + * @return @ref XXH_OK. + * + * @note @p statePtr must be allocated with XXH32_createState(). + * + */ +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr); +/*! + * @brief Copies one @ref XXH32_state_t to another. + * + * @param dst_state The state to copy to. + * @param src_state The state to copy from. + * @pre + * @p dst_state and @p src_state must not be `NULL` and must not overlap. + */ +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state); + +/*! + * @brief Resets an @ref XXH32_state_t to begin a new hash. + * + * @param statePtr The state struct to reset. + * @param seed The 32-bit seed to alter the hash result predictably. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note This function resets and seeds a state. Call it before @ref XXH32_update(). + */ +XXH_PUBLIC_API XXH_errorcode XXH32_reset (XXH32_state_t* statePtr, XXH32_hash_t seed); + +/*! + * @brief Consumes a block of @p input to an @ref XXH32_state_t. + * + * @param statePtr The state struct to update. + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * + * @pre + * @p statePtr must not be `NULL`. + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note Call this to incrementally consume blocks of data. + */ +XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length); + +/*! + * @brief Returns the calculated hash value from an @ref XXH32_state_t. + * + * @param statePtr The state struct to calculate the hash from. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return The calculated 32-bit xxHash32 value from that state. + * + * @note + * Calling XXH32_digest() will not affect @p statePtr, so you can update, + * digest, and update again. + */ +XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr); +#endif /* !XXH_NO_STREAM */ + +/******* Canonical representation *******/ + +/*! + * @brief Canonical (big endian) representation of @ref XXH32_hash_t. + */ +typedef struct { + unsigned char digest[4]; /*!< Hash bytes, big endian */ +} XXH32_canonical_t; + +/*! + * @brief Converts an @ref XXH32_hash_t to a big endian @ref XXH32_canonical_t. + * + * @param dst The @ref XXH32_canonical_t pointer to be stored to. + * @param hash The @ref XXH32_hash_t to be converted. + * + * @pre + * @p dst must not be `NULL`. + * + * @see @ref canonical_representation_example "Canonical Representation Example" + */ +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash); + +/*! + * @brief Converts an @ref XXH32_canonical_t to a native @ref XXH32_hash_t. + * + * @param src The @ref XXH32_canonical_t to convert. + * + * @pre + * @p src must not be `NULL`. + * + * @return The converted hash. + * + * @see @ref canonical_representation_example "Canonical Representation Example" + */ +XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src); + + +/*! @cond Doxygen ignores this part */ +#ifdef __has_attribute +# define XXH_HAS_ATTRIBUTE(x) __has_attribute(x) +#else +# define XXH_HAS_ATTRIBUTE(x) 0 +#endif +/*! @endcond */ + +/*! @cond Doxygen ignores this part */ +/* + * C23 __STDC_VERSION__ number hasn't been specified yet. For now + * leave as `201711L` (C17 + 1). + * TODO: Update to correct value when its been specified. + */ +#define XXH_C23_VN 201711L +/*! @endcond */ + +/*! @cond Doxygen ignores this part */ +/* C-language Attributes are added in C23. */ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) && defined(__has_c_attribute) +# define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) +#else +# define XXH_HAS_C_ATTRIBUTE(x) 0 +#endif +/*! @endcond */ + +/*! @cond Doxygen ignores this part */ +#if defined(__cplusplus) && defined(__has_cpp_attribute) +# define XXH_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +# define XXH_HAS_CPP_ATTRIBUTE(x) 0 +#endif +/*! @endcond */ + +/*! @cond Doxygen ignores this part */ +/* + * Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute + * introduced in CPP17 and C23. + * CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough + * C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough + */ +#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough) +# define XXH_FALLTHROUGH [[fallthrough]] +#elif XXH_HAS_ATTRIBUTE(__fallthrough__) +# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__)) +#else +# define XXH_FALLTHROUGH /* fallthrough */ +#endif +/*! @endcond */ + +/*! @cond Doxygen ignores this part */ +/* + * Define XXH_NOESCAPE for annotated pointers in public API. + * https://clang.llvm.org/docs/AttributeReference.html#noescape + * As of writing this, only supported by clang. + */ +#if XXH_HAS_ATTRIBUTE(noescape) +# define XXH_NOESCAPE __attribute__((noescape)) +#else +# define XXH_NOESCAPE +#endif +/*! @endcond */ + +#if defined (__cplusplus) +} /* end of extern "C" */ +#endif + +/*! + * @} + * @ingroup public + * @{ + */ + +#ifndef XXH_NO_LONG_LONG +/*-********************************************************************** +* 64-bit hash +************************************************************************/ +#if defined(XXH_DOXYGEN) /* don't include */ +/*! + * @brief An unsigned 64-bit integer. + * + * Not necessarily defined to `uint64_t` but functionally equivalent. + */ +typedef uint64_t XXH64_hash_t; +#elif !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# ifdef _AIX +# include +# else +# include +# endif + typedef uint64_t XXH64_hash_t; +#else +# include +# if defined(__LP64__) && ULONG_MAX == 0xFFFFFFFFFFFFFFFFULL + /* LP64 ABI says uint64_t is unsigned long */ + typedef unsigned long XXH64_hash_t; +# else + /* the following type must have a width of 64-bit */ + typedef unsigned long long XXH64_hash_t; +# endif +#endif + +#if defined (__cplusplus) +extern "C" { +#endif +/*! + * @} + * + * @defgroup XXH64_family XXH64 family + * @ingroup public + * @{ + * Contains functions used in the classic 64-bit xxHash algorithm. + * + * @note + * XXH3 provides competitive speed for both 32-bit and 64-bit systems, + * and offers true 64/128 bit hash results. + * It provides better speed for systems with vector processing capabilities. + */ + +/*! + * @brief Calculates the 64-bit hash of @p input using xxHash64. + * + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * @param seed The 64-bit seed to alter the hash's output predictably. + * + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return The calculated 64-bit xxHash64 value. + * + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed); + +/******* Streaming *******/ +#ifndef XXH_NO_STREAM +/*! + * @brief The opaque state struct for the XXH64 streaming API. + * + * @see XXH64_state_s for details. + */ +typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */ + +/*! + * @brief Allocates an @ref XXH64_state_t. + * + * @return An allocated pointer of @ref XXH64_state_t on success. + * @return `NULL` on failure. + * + * @note Must be freed with XXH64_freeState(). + */ +XXH_PUBLIC_API XXH_MALLOCF XXH64_state_t* XXH64_createState(void); + +/*! + * @brief Frees an @ref XXH64_state_t. + * + * @param statePtr A pointer to an @ref XXH64_state_t allocated with @ref XXH64_createState(). + * + * @return @ref XXH_OK. + * + * @note @p statePtr must be allocated with XXH64_createState(). + */ +XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr); + +/*! + * @brief Copies one @ref XXH64_state_t to another. + * + * @param dst_state The state to copy to. + * @param src_state The state to copy from. + * @pre + * @p dst_state and @p src_state must not be `NULL` and must not overlap. + */ +XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dst_state, const XXH64_state_t* src_state); + +/*! + * @brief Resets an @ref XXH64_state_t to begin a new hash. + * + * @param statePtr The state struct to reset. + * @param seed The 64-bit seed to alter the hash result predictably. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note This function resets and seeds a state. Call it before @ref XXH64_update(). + */ +XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed); + +/*! + * @brief Consumes a block of @p input to an @ref XXH64_state_t. + * + * @param statePtr The state struct to update. + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * + * @pre + * @p statePtr must not be `NULL`. + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note Call this to incrementally consume blocks of data. + */ +XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH_NOESCAPE XXH64_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length); + +/*! + * @brief Returns the calculated hash value from an @ref XXH64_state_t. + * + * @param statePtr The state struct to calculate the hash from. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return The calculated 64-bit xxHash64 value from that state. + * + * @note + * Calling XXH64_digest() will not affect @p statePtr, so you can update, + * digest, and update again. + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_digest (XXH_NOESCAPE const XXH64_state_t* statePtr); +#endif /* !XXH_NO_STREAM */ +/******* Canonical representation *******/ + +/*! + * @brief Canonical (big endian) representation of @ref XXH64_hash_t. + */ +typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_canonical_t; + +/*! + * @brief Converts an @ref XXH64_hash_t to a big endian @ref XXH64_canonical_t. + * + * @param dst The @ref XXH64_canonical_t pointer to be stored to. + * @param hash The @ref XXH64_hash_t to be converted. + * + * @pre + * @p dst must not be `NULL`. + * + * @see @ref canonical_representation_example "Canonical Representation Example" + */ +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash); + +/*! + * @brief Converts an @ref XXH64_canonical_t to a native @ref XXH64_hash_t. + * + * @param src The @ref XXH64_canonical_t to convert. + * + * @pre + * @p src must not be `NULL`. + * + * @return The converted hash. + * + * @see @ref canonical_representation_example "Canonical Representation Example" + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src); + +#ifndef XXH_NO_XXH3 + +/*! + * @} + * ************************************************************************ + * @defgroup XXH3_family XXH3 family + * @ingroup public + * @{ + * + * XXH3 is a more recent hash algorithm featuring: + * - Improved speed for both small and large inputs + * - True 64-bit and 128-bit outputs + * - SIMD acceleration + * - Improved 32-bit viability + * + * Speed analysis methodology is explained here: + * + * https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html + * + * Compared to XXH64, expect XXH3 to run approximately + * ~2x faster on large inputs and >3x faster on small ones, + * exact differences vary depending on platform. + * + * XXH3's speed benefits greatly from SIMD and 64-bit arithmetic, + * but does not require it. + * Most 32-bit and 64-bit targets that can run XXH32 smoothly can run XXH3 + * at competitive speeds, even without vector support. Further details are + * explained in the implementation. + * + * XXH3 has a fast scalar implementation, but it also includes accelerated SIMD + * implementations for many common platforms: + * - AVX512 + * - AVX2 + * - SSE2 + * - ARM NEON + * - WebAssembly SIMD128 + * - POWER8 VSX + * - s390x ZVector + * This can be controlled via the @ref XXH_VECTOR macro, but it automatically + * selects the best version according to predefined macros. For the x86 family, an + * automatic runtime dispatcher is included separately in @ref xxh_x86dispatch.c. + * + * XXH3 implementation is portable: + * it has a generic C90 formulation that can be compiled on any platform, + * all implementations generate exactly the same hash value on all platforms. + * Starting from v0.8.0, it's also labelled "stable", meaning that + * any future version will also generate the same hash value. + * + * XXH3 offers 2 variants, _64bits and _128bits. + * + * When only 64 bits are needed, prefer invoking the _64bits variant, as it + * reduces the amount of mixing, resulting in faster speed on small inputs. + * It's also generally simpler to manipulate a scalar return type than a struct. + * + * The API supports one-shot hashing, streaming mode, and custom secrets. + */ +/*-********************************************************************** +* XXH3 64-bit variant +************************************************************************/ + +/*! + * @brief Calculates 64-bit unseeded variant of XXH3 hash of @p input. + * + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return The calculated 64-bit XXH3 hash value. + * + * @note + * This is equivalent to @ref XXH3_64bits_withSeed() with a seed of `0`, however + * it may have slightly better performance due to constant propagation of the + * defaults. + * + * @see + * XXH3_64bits_withSeed(), XXH3_64bits_withSecret(): other seeding variants + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length); + +/*! + * @brief Calculates 64-bit seeded variant of XXH3 hash of @p input. + * + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * @param seed The 64-bit seed to alter the hash result predictably. + * + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return The calculated 64-bit XXH3 hash value. + * + * @note + * seed == 0 produces the same results as @ref XXH3_64bits(). + * + * This variant generates a custom secret on the fly based on default secret + * altered using the @p seed value. + * + * While this operation is decently fast, note that it's not completely free. + * + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed); + +/*! + * The bare minimum size for a custom secret. + * + * @see + * XXH3_64bits_withSecret(), XXH3_64bits_reset_withSecret(), + * XXH3_128bits_withSecret(), XXH3_128bits_reset_withSecret(). + */ +#define XXH3_SECRET_SIZE_MIN 136 + +/*! + * @brief Calculates 64-bit variant of XXH3 with a custom "secret". + * + * @param data The block of data to be hashed, at least @p len bytes in size. + * @param len The length of @p data, in bytes. + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * + * @return The calculated 64-bit XXH3 hash value. + * + * @pre + * The memory between @p data and @p data + @p len must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p data may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * It's possible to provide any blob of bytes as a "secret" to generate the hash. + * This makes it more difficult for an external actor to prepare an intentional collision. + * The main condition is that @p secretSize *must* be large enough (>= @ref XXH3_SECRET_SIZE_MIN). + * However, the quality of the secret impacts the dispersion of the hash algorithm. + * Therefore, the secret _must_ look like a bunch of random bytes. + * Avoid "trivial" or structured data such as repeated sequences or a text document. + * Whenever in doubt about the "randomness" of the blob of bytes, + * consider employing @ref XXH3_generateSecret() instead (see below). + * It will generate a proper high entropy secret derived from the blob of bytes. + * Another advantage of using XXH3_generateSecret() is that + * it guarantees that all bits within the initial blob of bytes + * will impact every bit of the output. + * This is not necessarily the case when using the blob of bytes directly + * because, when hashing _small_ inputs, only a portion of the secret is employed. + * + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize); + + +/******* Streaming *******/ +#ifndef XXH_NO_STREAM +/* + * Streaming requires state maintenance. + * This operation costs memory and CPU. + * As a consequence, streaming is slower than one-shot hashing. + * For better performance, prefer one-shot functions whenever applicable. + */ + +/*! + * @brief The opaque state struct for the XXH3 streaming API. + * + * @see XXH3_state_s for details. + */ +typedef struct XXH3_state_s XXH3_state_t; +XXH_PUBLIC_API XXH_MALLOCF XXH3_state_t* XXH3_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr); + +/*! + * @brief Copies one @ref XXH3_state_t to another. + * + * @param dst_state The state to copy to. + * @param src_state The state to copy from. + * @pre + * @p dst_state and @p src_state must not be `NULL` and must not overlap. + */ +XXH_PUBLIC_API void XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state); + +/*! + * @brief Resets an @ref XXH3_state_t to begin a new hash. + * + * @param statePtr The state struct to reset. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note + * - This function resets `statePtr` and generate a secret with default parameters. + * - Call this function before @ref XXH3_64bits_update(). + * - Digest will be equivalent to `XXH3_64bits()`. + * + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr); + +/*! + * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash. + * + * @param statePtr The state struct to reset. + * @param seed The 64-bit seed to alter the hash result predictably. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note + * - This function resets `statePtr` and generate a secret from `seed`. + * - Call this function before @ref XXH3_64bits_update(). + * - Digest will be equivalent to `XXH3_64bits_withSeed()`. + * + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed); + +/*! + * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. + * + * @param statePtr The state struct to reset. + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note + * `secret` is referenced, it _must outlive_ the hash streaming session. + * + * Similar to one-shot API, `secretSize` must be >= @ref XXH3_SECRET_SIZE_MIN, + * and the quality of produced hash values depends on secret's entropy + * (secret's content should look like a bunch of random bytes). + * When in doubt about the randomness of a candidate `secret`, + * consider employing `XXH3_generateSecret()` instead (see below). + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize); + +/*! + * @brief Consumes a block of @p input to an @ref XXH3_state_t. + * + * @param statePtr The state struct to update. + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * + * @pre + * @p statePtr must not be `NULL`. + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note Call this to incrementally consume blocks of data. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length); + +/*! + * @brief Returns the calculated XXH3 64-bit hash value from an @ref XXH3_state_t. + * + * @param statePtr The state struct to calculate the hash from. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return The calculated XXH3 64-bit hash value from that state. + * + * @note + * Calling XXH3_64bits_digest() will not affect @p statePtr, so you can update, + * digest, and update again. + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr); +#endif /* !XXH_NO_STREAM */ + +/* note : canonical representation of XXH3 is the same as XXH64 + * since they both produce XXH64_hash_t values */ + + +/*-********************************************************************** +* XXH3 128-bit variant +************************************************************************/ + +/*! + * @brief The return value from 128-bit hashes. + * + * Stored in little endian order, although the fields themselves are in native + * endianness. + */ +typedef struct { + XXH64_hash_t low64; /*!< `value & 0xFFFFFFFFFFFFFFFF` */ + XXH64_hash_t high64; /*!< `value >> 64` */ +} XXH128_hash_t; + +/*! + * @brief Calculates 128-bit unseeded variant of XXH3 of @p data. + * + * @param data The block of data to be hashed, at least @p length bytes in size. + * @param len The length of @p data, in bytes. + * + * @return The calculated 128-bit variant of XXH3 value. + * + * The 128-bit variant of XXH3 has more strength, but it has a bit of overhead + * for shorter inputs. + * + * This is equivalent to @ref XXH3_128bits_withSeed() with a seed of `0`, however + * it may have slightly better performance due to constant propagation of the + * defaults. + * + * @see XXH3_128bits_withSeed(), XXH3_128bits_withSecret(): other seeding variants + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* data, size_t len); +/*! @brief Calculates 128-bit seeded variant of XXH3 hash of @p data. + * + * @param data The block of data to be hashed, at least @p length bytes in size. + * @param len The length of @p data, in bytes. + * @param seed The 64-bit seed to alter the hash result predictably. + * + * @return The calculated 128-bit variant of XXH3 value. + * + * @note + * seed == 0 produces the same results as @ref XXH3_64bits(). + * + * This variant generates a custom secret on the fly based on default secret + * altered using the @p seed value. + * + * While this operation is decently fast, note that it's not completely free. + * + * @see XXH3_128bits(), XXH3_128bits_withSecret(): other seeding variants + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSeed(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed); +/*! + * @brief Calculates 128-bit variant of XXH3 with a custom "secret". + * + * @param data The block of data to be hashed, at least @p len bytes in size. + * @param len The length of @p data, in bytes. + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * + * @return The calculated 128-bit variant of XXH3 value. + * + * It's possible to provide any blob of bytes as a "secret" to generate the hash. + * This makes it more difficult for an external actor to prepare an intentional collision. + * The main condition is that @p secretSize *must* be large enough (>= @ref XXH3_SECRET_SIZE_MIN). + * However, the quality of the secret impacts the dispersion of the hash algorithm. + * Therefore, the secret _must_ look like a bunch of random bytes. + * Avoid "trivial" or structured data such as repeated sequences or a text document. + * Whenever in doubt about the "randomness" of the blob of bytes, + * consider employing @ref XXH3_generateSecret() instead (see below). + * It will generate a proper high entropy secret derived from the blob of bytes. + * Another advantage of using XXH3_generateSecret() is that + * it guarantees that all bits within the initial blob of bytes + * will impact every bit of the output. + * This is not necessarily the case when using the blob of bytes directly + * because, when hashing _small_ inputs, only a portion of the secret is employed. + * + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize); + +/******* Streaming *******/ +#ifndef XXH_NO_STREAM +/* + * Streaming requires state maintenance. + * This operation costs memory and CPU. + * As a consequence, streaming is slower than one-shot hashing. + * For better performance, prefer one-shot functions whenever applicable. + * + * XXH3_128bits uses the same XXH3_state_t as XXH3_64bits(). + * Use already declared XXH3_createState() and XXH3_freeState(). + * + * All reset and streaming functions have same meaning as their 64-bit counterpart. + */ + +/*! + * @brief Resets an @ref XXH3_state_t to begin a new hash. + * + * @param statePtr The state struct to reset. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note + * - This function resets `statePtr` and generate a secret with default parameters. + * - Call it before @ref XXH3_128bits_update(). + * - Digest will be equivalent to `XXH3_128bits()`. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr); + +/*! + * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash. + * + * @param statePtr The state struct to reset. + * @param seed The 64-bit seed to alter the hash result predictably. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note + * - This function resets `statePtr` and generate a secret from `seed`. + * - Call it before @ref XXH3_128bits_update(). + * - Digest will be equivalent to `XXH3_128bits_withSeed()`. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed); +/*! + * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. + * + * @param statePtr The state struct to reset. + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * `secret` is referenced, it _must outlive_ the hash streaming session. + * Similar to one-shot API, `secretSize` must be >= @ref XXH3_SECRET_SIZE_MIN, + * and the quality of produced hash values depends on secret's entropy + * (secret's content should look like a bunch of random bytes). + * When in doubt about the randomness of a candidate `secret`, + * consider employing `XXH3_generateSecret()` instead (see below). + */ +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize); + +/*! + * @brief Consumes a block of @p input to an @ref XXH3_state_t. + * + * Call this to incrementally consume blocks of data. + * + * @param statePtr The state struct to update. + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @note + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + */ +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length); + +/*! + * @brief Returns the calculated XXH3 128-bit hash value from an @ref XXH3_state_t. + * + * @param statePtr The state struct to calculate the hash from. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return The calculated XXH3 128-bit hash value from that state. + * + * @note + * Calling XXH3_128bits_digest() will not affect @p statePtr, so you can update, + * digest, and update again. + * + */ +XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr); +#endif /* !XXH_NO_STREAM */ + +/* Following helper functions make it possible to compare XXH128_hast_t values. + * Since XXH128_hash_t is a structure, this capability is not offered by the language. + * Note: For better performance, these functions can be inlined using XXH_INLINE_ALL */ + +/*! + * @brief Check equality of two XXH128_hash_t values + * + * @param h1 The 128-bit hash value. + * @param h2 Another 128-bit hash value. + * + * @return `1` if `h1` and `h2` are equal. + * @return `0` if they are not. + */ +XXH_PUBLIC_API XXH_PUREF int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2); + +/*! + * @brief Compares two @ref XXH128_hash_t + * + * This comparator is compatible with stdlib's `qsort()`/`bsearch()`. + * + * @param h128_1 Left-hand side value + * @param h128_2 Right-hand side value + * + * @return >0 if @p h128_1 > @p h128_2 + * @return =0 if @p h128_1 == @p h128_2 + * @return <0 if @p h128_1 < @p h128_2 + */ +XXH_PUBLIC_API XXH_PUREF int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2); + + +/******* Canonical representation *******/ +typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t; + + +/*! + * @brief Converts an @ref XXH128_hash_t to a big endian @ref XXH128_canonical_t. + * + * @param dst The @ref XXH128_canonical_t pointer to be stored to. + * @param hash The @ref XXH128_hash_t to be converted. + * + * @pre + * @p dst must not be `NULL`. + * @see @ref canonical_representation_example "Canonical Representation Example" + */ +XXH_PUBLIC_API void XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash); + +/*! + * @brief Converts an @ref XXH128_canonical_t to a native @ref XXH128_hash_t. + * + * @param src The @ref XXH128_canonical_t to convert. + * + * @pre + * @p src must not be `NULL`. + * + * @return The converted hash. + * @see @ref canonical_representation_example "Canonical Representation Example" + */ +XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src); + + +#endif /* !XXH_NO_XXH3 */ + +#if defined (__cplusplus) +} /* extern "C" */ +#endif + +#endif /* XXH_NO_LONG_LONG */ + +/*! + * @} + */ +#endif /* XXHASH_H_5627135585666179 */ + + + +#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) +#define XXHASH_H_STATIC_13879238742 +/* **************************************************************************** + * This section contains declarations which are not guaranteed to remain stable. + * They may change in future versions, becoming incompatible with a different + * version of the library. + * These declarations should only be used with static linking. + * Never use them in association with dynamic linking! + ***************************************************************************** */ + +/* + * These definitions are only present to allow static allocation + * of XXH states, on stack or in a struct, for example. + * Never **ever** access their members directly. + */ + +/*! + * @internal + * @brief Structure for XXH32 streaming API. + * + * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, + * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is + * an opaque type. This allows fields to safely be changed. + * + * Typedef'd to @ref XXH32_state_t. + * Do not access the members of this struct directly. + * @see XXH64_state_s, XXH3_state_s + */ +struct XXH32_state_s { + XXH32_hash_t total_len_32; /*!< Total length hashed, modulo 2^32 */ + XXH32_hash_t large_len; /*!< Whether the hash is >= 16 (handles @ref total_len_32 overflow) */ + XXH32_hash_t v[4]; /*!< Accumulator lanes */ + XXH32_hash_t mem32[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[16]. */ + XXH32_hash_t memsize; /*!< Amount of data in @ref mem32 */ + XXH32_hash_t reserved; /*!< Reserved field. Do not read nor write to it. */ +}; /* typedef'd to XXH32_state_t */ + + +#ifndef XXH_NO_LONG_LONG /* defined when there is no 64-bit support */ + +/*! + * @internal + * @brief Structure for XXH64 streaming API. + * + * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, + * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is + * an opaque type. This allows fields to safely be changed. + * + * Typedef'd to @ref XXH64_state_t. + * Do not access the members of this struct directly. + * @see XXH32_state_s, XXH3_state_s + */ +struct XXH64_state_s { + XXH64_hash_t total_len; /*!< Total length hashed. This is always 64-bit. */ + XXH64_hash_t v[4]; /*!< Accumulator lanes */ + XXH64_hash_t mem64[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[32]. */ + XXH32_hash_t memsize; /*!< Amount of data in @ref mem64 */ + XXH32_hash_t reserved32; /*!< Reserved field, needed for padding anyways*/ + XXH64_hash_t reserved64; /*!< Reserved field. Do not read or write to it. */ +}; /* typedef'd to XXH64_state_t */ + +#ifndef XXH_NO_XXH3 + +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */ +# include +# define XXH_ALIGN(n) alignas(n) +#elif defined(__cplusplus) && (__cplusplus >= 201103L) /* >= C++11 */ +/* In C++ alignas() is a keyword */ +# define XXH_ALIGN(n) alignas(n) +#elif defined(__GNUC__) +# define XXH_ALIGN(n) __attribute__ ((aligned(n))) +#elif defined(_MSC_VER) +# define XXH_ALIGN(n) __declspec(align(n)) +#else +# define XXH_ALIGN(n) /* disabled */ +#endif + +/* Old GCC versions only accept the attribute after the type in structures. */ +#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) /* C11+ */ \ + && ! (defined(__cplusplus) && (__cplusplus >= 201103L)) /* >= C++11 */ \ + && defined(__GNUC__) +# define XXH_ALIGN_MEMBER(align, type) type XXH_ALIGN(align) +#else +# define XXH_ALIGN_MEMBER(align, type) XXH_ALIGN(align) type +#endif + +/*! + * @brief The size of the internal XXH3 buffer. + * + * This is the optimal update size for incremental hashing. + * + * @see XXH3_64b_update(), XXH3_128b_update(). + */ +#define XXH3_INTERNALBUFFER_SIZE 256 + +/*! + * @internal + * @brief Default size of the secret buffer (and @ref XXH3_kSecret). + * + * This is the size used in @ref XXH3_kSecret and the seeded functions. + * + * Not to be confused with @ref XXH3_SECRET_SIZE_MIN. + */ +#define XXH3_SECRET_DEFAULT_SIZE 192 + +/*! + * @internal + * @brief Structure for XXH3 streaming API. + * + * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, + * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. + * Otherwise it is an opaque type. + * Never use this definition in combination with dynamic library. + * This allows fields to safely be changed in the future. + * + * @note ** This structure has a strict alignment requirement of 64 bytes!! ** + * Do not allocate this with `malloc()` or `new`, + * it will not be sufficiently aligned. + * Use @ref XXH3_createState() and @ref XXH3_freeState(), or stack allocation. + * + * Typedef'd to @ref XXH3_state_t. + * Do never access the members of this struct directly. + * + * @see XXH3_INITSTATE() for stack initialization. + * @see XXH3_createState(), XXH3_freeState(). + * @see XXH32_state_s, XXH64_state_s + */ +struct XXH3_state_s { + XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]); + /*!< The 8 accumulators. See @ref XXH32_state_s::v and @ref XXH64_state_s::v */ + XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]); + /*!< Used to store a custom secret generated from a seed. */ + XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]); + /*!< The internal buffer. @see XXH32_state_s::mem32 */ + XXH32_hash_t bufferedSize; + /*!< The amount of memory in @ref buffer, @see XXH32_state_s::memsize */ + XXH32_hash_t useSeed; + /*!< Reserved field. Needed for padding on 64-bit. */ + size_t nbStripesSoFar; + /*!< Number or stripes processed. */ + XXH64_hash_t totalLen; + /*!< Total length hashed. 64-bit even on 32-bit targets. */ + size_t nbStripesPerBlock; + /*!< Number of stripes per block. */ + size_t secretLimit; + /*!< Size of @ref customSecret or @ref extSecret */ + XXH64_hash_t seed; + /*!< Seed for _withSeed variants. Must be zero otherwise, @see XXH3_INITSTATE() */ + XXH64_hash_t reserved64; + /*!< Reserved field. */ + const unsigned char* extSecret; + /*!< Reference to an external secret for the _withSecret variants, NULL + * for other variants. */ + /* note: there may be some padding at the end due to alignment on 64 bytes */ +}; /* typedef'd to XXH3_state_t */ + +#undef XXH_ALIGN_MEMBER + +/*! + * @brief Initializes a stack-allocated `XXH3_state_s`. + * + * When the @ref XXH3_state_t structure is merely emplaced on stack, + * it should be initialized with XXH3_INITSTATE() or a memset() + * in case its first reset uses XXH3_NNbits_reset_withSeed(). + * This init can be omitted if the first reset uses default or _withSecret mode. + * This operation isn't necessary when the state is created with XXH3_createState(). + * Note that this doesn't prepare the state for a streaming operation, + * it's still necessary to use XXH3_NNbits_reset*() afterwards. + */ +#define XXH3_INITSTATE(XXH3_state_ptr) \ + do { \ + XXH3_state_t* tmp_xxh3_state_ptr = (XXH3_state_ptr); \ + tmp_xxh3_state_ptr->seed = 0; \ + tmp_xxh3_state_ptr->extSecret = NULL; \ + } while(0) + + +#if defined (__cplusplus) +extern "C" { +#endif + +/*! + * @brief Calculates the 128-bit hash of @p data using XXH3. + * + * @param data The block of data to be hashed, at least @p len bytes in size. + * @param len The length of @p data, in bytes. + * @param seed The 64-bit seed to alter the hash's output predictably. + * + * @pre + * The memory between @p data and @p data + @p len must be valid, + * readable, contiguous memory. However, if @p len is `0`, @p data may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return The calculated 128-bit XXH3 value. + * + * @see @ref single_shot_example "Single Shot Example" for an example. + */ +XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed); + + +/* === Experimental API === */ +/* Symbols defined below must be considered tied to a specific library version. */ + +/*! + * @brief Derive a high-entropy secret from any user-defined content, named customSeed. + * + * @param secretBuffer A writable buffer for derived high-entropy secret data. + * @param secretSize Size of secretBuffer, in bytes. Must be >= XXH3_SECRET_DEFAULT_SIZE. + * @param customSeed A user-defined content. + * @param customSeedSize Size of customSeed, in bytes. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * The generated secret can be used in combination with `*_withSecret()` functions. + * The `_withSecret()` variants are useful to provide a higher level of protection + * than 64-bit seed, as it becomes much more difficult for an external actor to + * guess how to impact the calculation logic. + * + * The function accepts as input a custom seed of any length and any content, + * and derives from it a high-entropy secret of length @p secretSize into an + * already allocated buffer @p secretBuffer. + * + * The generated secret can then be used with any `*_withSecret()` variant. + * The functions @ref XXH3_128bits_withSecret(), @ref XXH3_64bits_withSecret(), + * @ref XXH3_128bits_reset_withSecret() and @ref XXH3_64bits_reset_withSecret() + * are part of this list. They all accept a `secret` parameter + * which must be large enough for implementation reasons (>= @ref XXH3_SECRET_SIZE_MIN) + * _and_ feature very high entropy (consist of random-looking bytes). + * These conditions can be a high bar to meet, so @ref XXH3_generateSecret() can + * be employed to ensure proper quality. + * + * @p customSeed can be anything. It can have any size, even small ones, + * and its content can be anything, even "poor entropy" sources such as a bunch + * of zeroes. The resulting `secret` will nonetheless provide all required qualities. + * + * @pre + * - @p secretSize must be >= @ref XXH3_SECRET_SIZE_MIN + * - When @p customSeedSize > 0, supplying NULL as customSeed is undefined behavior. + * + * Example code: + * @code{.c} + * #include + * #include + * #include + * #define XXH_STATIC_LINKING_ONLY // expose unstable API + * #include "xxhash.h" + * // Hashes argv[2] using the entropy from argv[1]. + * int main(int argc, char* argv[]) + * { + * char secret[XXH3_SECRET_SIZE_MIN]; + * if (argv != 3) { return 1; } + * XXH3_generateSecret(secret, sizeof(secret), argv[1], strlen(argv[1])); + * XXH64_hash_t h = XXH3_64bits_withSecret( + * argv[2], strlen(argv[2]), + * secret, sizeof(secret) + * ); + * printf("%016llx\n", (unsigned long long) h); + * } + * @endcode + */ +XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize); + +/*! + * @brief Generate the same secret as the _withSeed() variants. + * + * @param secretBuffer A writable buffer of @ref XXH3_SECRET_SIZE_MIN bytes + * @param seed The 64-bit seed to alter the hash result predictably. + * + * The generated secret can be used in combination with + *`*_withSecret()` and `_withSecretandSeed()` variants. + * + * Example C++ `std::string` hash class: + * @code{.cpp} + * #include + * #define XXH_STATIC_LINKING_ONLY // expose unstable API + * #include "xxhash.h" + * // Slow, seeds each time + * class HashSlow { + * XXH64_hash_t seed; + * public: + * HashSlow(XXH64_hash_t s) : seed{s} {} + * size_t operator()(const std::string& x) const { + * return size_t{XXH3_64bits_withSeed(x.c_str(), x.length(), seed)}; + * } + * }; + * // Fast, caches the seeded secret for future uses. + * class HashFast { + * unsigned char secret[XXH3_SECRET_SIZE_MIN]; + * public: + * HashFast(XXH64_hash_t s) { + * XXH3_generateSecret_fromSeed(secret, seed); + * } + * size_t operator()(const std::string& x) const { + * return size_t{ + * XXH3_64bits_withSecret(x.c_str(), x.length(), secret, sizeof(secret)) + * }; + * } + * }; + * @endcode + */ +XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed); + +/*! + * @brief Calculates 64/128-bit seeded variant of XXH3 hash of @p data. + * + * @param data The block of data to be hashed, at least @p len bytes in size. + * @param len The length of @p data, in bytes. + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * @param seed The 64-bit seed to alter the hash result predictably. + * + * These variants generate hash values using either + * @p seed for "short" keys (< @ref XXH3_MIDSIZE_MAX = 240 bytes) + * or @p secret for "large" keys (>= @ref XXH3_MIDSIZE_MAX). + * + * This generally benefits speed, compared to `_withSeed()` or `_withSecret()`. + * `_withSeed()` has to generate the secret on the fly for "large" keys. + * It's fast, but can be perceptible for "not so large" keys (< 1 KB). + * `_withSecret()` has to generate the masks on the fly for "small" keys, + * which requires more instructions than _withSeed() variants. + * Therefore, _withSecretandSeed variant combines the best of both worlds. + * + * When @p secret has been generated by XXH3_generateSecret_fromSeed(), + * this variant produces *exactly* the same results as `_withSeed()` variant, + * hence offering only a pure speed benefit on "large" input, + * by skipping the need to regenerate the secret for every large input. + * + * Another usage scenario is to hash the secret to a 64-bit hash value, + * for example with XXH3_64bits(), which then becomes the seed, + * and then employ both the seed and the secret in _withSecretandSeed(). + * On top of speed, an added benefit is that each bit in the secret + * has a 50% chance to swap each bit in the output, via its impact to the seed. + * + * This is not guaranteed when using the secret directly in "small data" scenarios, + * because only portions of the secret are employed for small data. + */ +XXH_PUBLIC_API XXH_PUREF XXH64_hash_t +XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* data, size_t len, + XXH_NOESCAPE const void* secret, size_t secretSize, + XXH64_hash_t seed); +/*! + * @brief Calculates 128-bit seeded variant of XXH3 hash of @p data. + * + * @param input The block of data to be hashed, at least @p len bytes in size. + * @param length The length of @p data, in bytes. + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * @param seed64 The 64-bit seed to alter the hash result predictably. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @see XXH3_64bits_withSecretandSeed() + */ +XXH_PUBLIC_API XXH_PUREF XXH128_hash_t +XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, + XXH_NOESCAPE const void* secret, size_t secretSize, + XXH64_hash_t seed64); +#ifndef XXH_NO_STREAM +/*! + * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. + * + * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState(). + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * @param seed64 The 64-bit seed to alter the hash result predictably. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @see XXH3_64bits_withSecretandSeed() + */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, + XXH_NOESCAPE const void* secret, size_t secretSize, + XXH64_hash_t seed64); +/*! + * @brief Resets an @ref XXH3_state_t with secret data to begin a new hash. + * + * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState(). + * @param secret The secret data. + * @param secretSize The length of @p secret, in bytes. + * @param seed64 The 64-bit seed to alter the hash result predictably. + * + * @return @ref XXH_OK on success. + * @return @ref XXH_ERROR on failure. + * + * @see XXH3_64bits_withSecretandSeed() + */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, + XXH_NOESCAPE const void* secret, size_t secretSize, + XXH64_hash_t seed64); +#endif /* !XXH_NO_STREAM */ + +#if defined (__cplusplus) +} /* extern "C" */ +#endif + +#endif /* !XXH_NO_XXH3 */ +#endif /* XXH_NO_LONG_LONG */ + +#if defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) +# define XXH_IMPLEMENTATION +#endif + +#endif /* defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) */ + + +/* ======================================================================== */ +/* ======================================================================== */ +/* ======================================================================== */ + + +/*-********************************************************************** + * xxHash implementation + *-********************************************************************** + * xxHash's implementation used to be hosted inside xxhash.c. + * + * However, inlining requires implementation to be visible to the compiler, + * hence be included alongside the header. + * Previously, implementation was hosted inside xxhash.c, + * which was then #included when inlining was activated. + * This construction created issues with a few build and install systems, + * as it required xxhash.c to be stored in /include directory. + * + * xxHash implementation is now directly integrated within xxhash.h. + * As a consequence, xxhash.c is no longer needed in /include. + * + * xxhash.c is still available and is still useful. + * In a "normal" setup, when xxhash is not inlined, + * xxhash.h only exposes the prototypes and public symbols, + * while xxhash.c can be built into an object file xxhash.o + * which can then be linked into the final binary. + ************************************************************************/ + +#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) \ + || defined(XXH_IMPLEMENTATION) ) && !defined(XXH_IMPLEM_13a8737387) +# define XXH_IMPLEM_13a8737387 + +/* ************************************* +* Tuning parameters +***************************************/ + +/*! + * @defgroup tuning Tuning parameters + * @{ + * + * Various macros to control xxHash's behavior. + */ +#ifdef XXH_DOXYGEN +/*! + * @brief Define this to disable 64-bit code. + * + * Useful if only using the @ref XXH32_family and you have a strict C90 compiler. + */ +# define XXH_NO_LONG_LONG +# undef XXH_NO_LONG_LONG /* don't actually */ +/*! + * @brief Controls how unaligned memory is accessed. + * + * By default, access to unaligned memory is controlled by `memcpy()`, which is + * safe and portable. + * + * Unfortunately, on some target/compiler combinations, the generated assembly + * is sub-optimal. + * + * The below switch allow selection of a different access method + * in the search for improved performance. + * + * @par Possible options: + * + * - `XXH_FORCE_MEMORY_ACCESS=0` (default): `memcpy` + * @par + * Use `memcpy()`. Safe and portable. Note that most modern compilers will + * eliminate the function call and treat it as an unaligned access. + * + * - `XXH_FORCE_MEMORY_ACCESS=1`: `__attribute__((aligned(1)))` + * @par + * Depends on compiler extensions and is therefore not portable. + * This method is safe _if_ your compiler supports it, + * and *generally* as fast or faster than `memcpy`. + * + * - `XXH_FORCE_MEMORY_ACCESS=2`: Direct cast + * @par + * Casts directly and dereferences. This method doesn't depend on the + * compiler, but it violates the C standard as it directly dereferences an + * unaligned pointer. It can generate buggy code on targets which do not + * support unaligned memory accesses, but in some circumstances, it's the + * only known way to get the most performance. + * + * - `XXH_FORCE_MEMORY_ACCESS=3`: Byteshift + * @par + * Also portable. This can generate the best code on old compilers which don't + * inline small `memcpy()` calls, and it might also be faster on big-endian + * systems which lack a native byteswap instruction. However, some compilers + * will emit literal byteshifts even if the target supports unaligned access. + * + * + * @warning + * Methods 1 and 2 rely on implementation-defined behavior. Use these with + * care, as what works on one compiler/platform/optimization level may cause + * another to read garbage data or even crash. + * + * See https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details. + * + * Prefer these methods in priority order (0 > 3 > 1 > 2) + */ +# define XXH_FORCE_MEMORY_ACCESS 0 + +/*! + * @def XXH_SIZE_OPT + * @brief Controls how much xxHash optimizes for size. + * + * xxHash, when compiled, tends to result in a rather large binary size. This + * is mostly due to heavy usage to forced inlining and constant folding of the + * @ref XXH3_family to increase performance. + * + * However, some developers prefer size over speed. This option can + * significantly reduce the size of the generated code. When using the `-Os` + * or `-Oz` options on GCC or Clang, this is defined to 1 by default, + * otherwise it is defined to 0. + * + * Most of these size optimizations can be controlled manually. + * + * This is a number from 0-2. + * - `XXH_SIZE_OPT` == 0: Default. xxHash makes no size optimizations. Speed + * comes first. + * - `XXH_SIZE_OPT` == 1: Default for `-Os` and `-Oz`. xxHash is more + * conservative and disables hacks that increase code size. It implies the + * options @ref XXH_NO_INLINE_HINTS == 1, @ref XXH_FORCE_ALIGN_CHECK == 0, + * and @ref XXH3_NEON_LANES == 8 if they are not already defined. + * - `XXH_SIZE_OPT` == 2: xxHash tries to make itself as small as possible. + * Performance may cry. For example, the single shot functions just use the + * streaming API. + */ +# define XXH_SIZE_OPT 0 + +/*! + * @def XXH_FORCE_ALIGN_CHECK + * @brief If defined to non-zero, adds a special path for aligned inputs (XXH32() + * and XXH64() only). + * + * This is an important performance trick for architectures without decent + * unaligned memory access performance. + * + * It checks for input alignment, and when conditions are met, uses a "fast + * path" employing direct 32-bit/64-bit reads, resulting in _dramatically + * faster_ read speed. + * + * The check costs one initial branch per hash, which is generally negligible, + * but not zero. + * + * Moreover, it's not useful to generate an additional code path if memory + * access uses the same instruction for both aligned and unaligned + * addresses (e.g. x86 and aarch64). + * + * In these cases, the alignment check can be removed by setting this macro to 0. + * Then the code will always use unaligned memory access. + * Align check is automatically disabled on x86, x64, ARM64, and some ARM chips + * which are platforms known to offer good unaligned memory accesses performance. + * + * It is also disabled by default when @ref XXH_SIZE_OPT >= 1. + * + * This option does not affect XXH3 (only XXH32 and XXH64). + */ +# define XXH_FORCE_ALIGN_CHECK 0 + +/*! + * @def XXH_NO_INLINE_HINTS + * @brief When non-zero, sets all functions to `static`. + * + * By default, xxHash tries to force the compiler to inline almost all internal + * functions. + * + * This can usually improve performance due to reduced jumping and improved + * constant folding, but significantly increases the size of the binary which + * might not be favorable. + * + * Additionally, sometimes the forced inlining can be detrimental to performance, + * depending on the architecture. + * + * XXH_NO_INLINE_HINTS marks all internal functions as static, giving the + * compiler full control on whether to inline or not. + * + * When not optimizing (-O0), using `-fno-inline` with GCC or Clang, or if + * @ref XXH_SIZE_OPT >= 1, this will automatically be defined. + */ +# define XXH_NO_INLINE_HINTS 0 + +/*! + * @def XXH3_INLINE_SECRET + * @brief Determines whether to inline the XXH3 withSecret code. + * + * When the secret size is known, the compiler can improve the performance + * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret(). + * + * However, if the secret size is not known, it doesn't have any benefit. This + * happens when xxHash is compiled into a global symbol. Therefore, if + * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0. + * + * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers + * that are *sometimes* force inline on -Og, and it is impossible to automatically + * detect this optimization level. + */ +# define XXH3_INLINE_SECRET 0 + +/*! + * @def XXH32_ENDJMP + * @brief Whether to use a jump for `XXH32_finalize`. + * + * For performance, `XXH32_finalize` uses multiple branches in the finalizer. + * This is generally preferable for performance, + * but depending on exact architecture, a jmp may be preferable. + * + * This setting is only possibly making a difference for very small inputs. + */ +# define XXH32_ENDJMP 0 + +/*! + * @internal + * @brief Redefines old internal names. + * + * For compatibility with code that uses xxHash's internals before the names + * were changed to improve namespacing. There is no other reason to use this. + */ +# define XXH_OLD_NAMES +# undef XXH_OLD_NAMES /* don't actually use, it is ugly. */ + +/*! + * @def XXH_NO_STREAM + * @brief Disables the streaming API. + * + * When xxHash is not inlined and the streaming functions are not used, disabling + * the streaming functions can improve code size significantly, especially with + * the @ref XXH3_family which tends to make constant folded copies of itself. + */ +# define XXH_NO_STREAM +# undef XXH_NO_STREAM /* don't actually */ +#endif /* XXH_DOXYGEN */ +/*! + * @} + */ + +#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ + /* prefer __packed__ structures (method 1) for GCC + * < ARMv7 with unaligned access (e.g. Raspbian armhf) still uses byte shifting, so we use memcpy + * which for some reason does unaligned loads. */ +# if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && defined(__ARM_FEATURE_UNALIGNED)) +# define XXH_FORCE_MEMORY_ACCESS 1 +# endif +#endif + +#ifndef XXH_SIZE_OPT + /* default to 1 for -Os or -Oz */ +# if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE_SIZE__) +# define XXH_SIZE_OPT 1 +# else +# define XXH_SIZE_OPT 0 +# endif +#endif + +#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ + /* don't check on sizeopt, x86, aarch64, or arm when unaligned access is available */ +# if XXH_SIZE_OPT >= 1 || \ + defined(__i386) || defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_FEATURE_UNALIGNED) \ + || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM) /* visual */ +# define XXH_FORCE_ALIGN_CHECK 0 +# else +# define XXH_FORCE_ALIGN_CHECK 1 +# endif +#endif + +#ifndef XXH_NO_INLINE_HINTS +# if XXH_SIZE_OPT >= 1 || defined(__NO_INLINE__) /* -O0, -fno-inline */ +# define XXH_NO_INLINE_HINTS 1 +# else +# define XXH_NO_INLINE_HINTS 0 +# endif +#endif + +#ifndef XXH3_INLINE_SECRET +# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \ + || !defined(XXH_INLINE_ALL) +# define XXH3_INLINE_SECRET 0 +# else +# define XXH3_INLINE_SECRET 1 +# endif +#endif + +#ifndef XXH32_ENDJMP +/* generally preferable for performance */ +# define XXH32_ENDJMP 0 +#endif + +/*! + * @defgroup impl Implementation + * @{ + */ + +/* ************************************* +* Includes & Memory related functions +***************************************/ +#include /* memcmp, memcpy */ +#include /* ULLONG_MAX */ + +#if defined(XXH_NO_STREAM) +/* nothing */ +#elif defined(XXH_NO_STDLIB) + +/* When requesting to disable any mention of stdlib, + * the library loses the ability to invoked malloc / free. + * In practice, it means that functions like `XXH*_createState()` + * will always fail, and return NULL. + * This flag is useful in situations where + * xxhash.h is integrated into some kernel, embedded or limited environment + * without access to dynamic allocation. + */ + +#if defined (__cplusplus) +extern "C" { +#endif + +static XXH_CONSTF void* XXH_malloc(size_t s) { (void)s; return NULL; } +static void XXH_free(void* p) { (void)p; } + +#if defined (__cplusplus) +} /* extern "C" */ +#endif + +#else + +/* + * Modify the local functions below should you wish to use + * different memory routines for malloc() and free() + */ +#include + +#if defined (__cplusplus) +extern "C" { +#endif +/*! + * @internal + * @brief Modify this function to use a different routine than malloc(). + */ +static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); } + +/*! + * @internal + * @brief Modify this function to use a different routine than free(). + */ +static void XXH_free(void* p) { free(p); } + +#if defined (__cplusplus) +} /* extern "C" */ +#endif + +#endif /* XXH_NO_STDLIB */ + +#if defined (__cplusplus) +extern "C" { +#endif +/*! + * @internal + * @brief Modify this function to use a different routine than memcpy(). + */ +static void* XXH_memcpy(void* dest, const void* src, size_t size) +{ + return memcpy(dest,src,size); +} + +#if defined (__cplusplus) +} /* extern "C" */ +#endif + +/* ************************************* +* Compiler Specific Options +***************************************/ +#ifdef _MSC_VER /* Visual Studio warning fix */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +#endif + +#if XXH_NO_INLINE_HINTS /* disable inlining hints */ +# if defined(__GNUC__) || defined(__clang__) +# define XXH_FORCE_INLINE static __attribute__((unused)) +# else +# define XXH_FORCE_INLINE static +# endif +# define XXH_NO_INLINE static +/* enable inlining hints */ +#elif defined(__GNUC__) || defined(__clang__) +# define XXH_FORCE_INLINE static __inline__ __attribute__((always_inline, unused)) +# define XXH_NO_INLINE static __attribute__((noinline)) +#elif defined(_MSC_VER) /* Visual Studio */ +# define XXH_FORCE_INLINE static __forceinline +# define XXH_NO_INLINE static __declspec(noinline) +#elif defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) /* C99 */ +# define XXH_FORCE_INLINE static inline +# define XXH_NO_INLINE static +#else +# define XXH_FORCE_INLINE static +# define XXH_NO_INLINE static +#endif + +#if XXH3_INLINE_SECRET +# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE +#else +# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE +#endif + + +/* ************************************* +* Debug +***************************************/ +/*! + * @ingroup tuning + * @def XXH_DEBUGLEVEL + * @brief Sets the debugging level. + * + * XXH_DEBUGLEVEL is expected to be defined externally, typically via the + * compiler's command line options. The value must be a number. + */ +#ifndef XXH_DEBUGLEVEL +# ifdef DEBUGLEVEL /* backwards compat */ +# define XXH_DEBUGLEVEL DEBUGLEVEL +# else +# define XXH_DEBUGLEVEL 0 +# endif +#endif + +#if (XXH_DEBUGLEVEL>=1) +# include /* note: can still be disabled with NDEBUG */ +# define XXH_ASSERT(c) assert(c) +#else +# if defined(__INTEL_COMPILER) +# define XXH_ASSERT(c) XXH_ASSUME((unsigned char) (c)) +# else +# define XXH_ASSERT(c) XXH_ASSUME(c) +# endif +#endif + +/* note: use after variable declarations */ +#ifndef XXH_STATIC_ASSERT +# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ +# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0) +# elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */ +# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) +# else +# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { struct xxh_sa { char x[(c) ? 1 : -1]; }; } while(0) +# endif +# define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c) +#endif + +/*! + * @internal + * @def XXH_COMPILER_GUARD(var) + * @brief Used to prevent unwanted optimizations for @p var. + * + * It uses an empty GCC inline assembly statement with a register constraint + * which forces @p var into a general purpose register (eg eax, ebx, ecx + * on x86) and marks it as modified. + * + * This is used in a few places to avoid unwanted autovectorization (e.g. + * XXH32_round()). All vectorization we want is explicit via intrinsics, + * and _usually_ isn't wanted elsewhere. + * + * We also use it to prevent unwanted constant folding for AArch64 in + * XXH3_initCustomSecret_scalar(). + */ +#if defined(__GNUC__) || defined(__clang__) +# define XXH_COMPILER_GUARD(var) __asm__("" : "+r" (var)) +#else +# define XXH_COMPILER_GUARD(var) ((void)0) +#endif + +/* Specifically for NEON vectors which use the "w" constraint, on + * Clang. */ +#if defined(__clang__) && defined(__ARM_ARCH) && !defined(__wasm__) +# define XXH_COMPILER_GUARD_CLANG_NEON(var) __asm__("" : "+w" (var)) +#else +# define XXH_COMPILER_GUARD_CLANG_NEON(var) ((void)0) +#endif + +/* ************************************* +* Basic Types +***************************************/ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# ifdef _AIX +# include +# else +# include +# endif + typedef uint8_t xxh_u8; +#else + typedef unsigned char xxh_u8; +#endif +typedef XXH32_hash_t xxh_u32; + +#ifdef XXH_OLD_NAMES +# warning "XXH_OLD_NAMES is planned to be removed starting v0.9. If the program depends on it, consider moving away from it by employing newer type names directly" +# define BYTE xxh_u8 +# define U8 xxh_u8 +# define U32 xxh_u32 +#endif + +#if defined (__cplusplus) +extern "C" { +#endif + +/* *** Memory access *** */ + +/*! + * @internal + * @fn xxh_u32 XXH_read32(const void* ptr) + * @brief Reads an unaligned 32-bit integer from @p ptr in native endianness. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * + * @param ptr The pointer to read from. + * @return The 32-bit native endian integer from the bytes at @p ptr. + */ + +/*! + * @internal + * @fn xxh_u32 XXH_readLE32(const void* ptr) + * @brief Reads an unaligned 32-bit little endian integer from @p ptr. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * + * @param ptr The pointer to read from. + * @return The 32-bit little endian integer from the bytes at @p ptr. + */ + +/*! + * @internal + * @fn xxh_u32 XXH_readBE32(const void* ptr) + * @brief Reads an unaligned 32-bit big endian integer from @p ptr. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * + * @param ptr The pointer to read from. + * @return The 32-bit big endian integer from the bytes at @p ptr. + */ + +/*! + * @internal + * @fn xxh_u32 XXH_readLE32_align(const void* ptr, XXH_alignment align) + * @brief Like @ref XXH_readLE32(), but has an option for aligned reads. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * Note that when @ref XXH_FORCE_ALIGN_CHECK == 0, the @p align parameter is + * always @ref XXH_alignment::XXH_unaligned. + * + * @param ptr The pointer to read from. + * @param align Whether @p ptr is aligned. + * @pre + * If @p align == @ref XXH_alignment::XXH_aligned, @p ptr must be 4 byte + * aligned. + * @return The 32-bit little endian integer from the bytes at @p ptr. + */ + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) +/* + * Manual byteshift. Best for old compilers which don't inline memcpy. + * We actually directly use XXH_readLE32 and XXH_readBE32. + */ +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* + * Force direct memory access. Only works on CPU which support unaligned memory + * access in hardware. + */ +static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*) memPtr; } + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* + * __attribute__((aligned(1))) is supported by gcc and clang. Originally the + * documentation claimed that it only increased the alignment, but actually it + * can decrease it on gcc, clang, and icc: + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502, + * https://gcc.godbolt.org/z/xYez1j67Y. + */ +#ifdef XXH_OLD_NAMES +typedef union { xxh_u32 u32; } __attribute__((packed)) unalign; +#endif +static xxh_u32 XXH_read32(const void* ptr) +{ + typedef __attribute__((aligned(1))) xxh_u32 xxh_unalign32; + return *((const xxh_unalign32*)ptr); +} + +#else + +/* + * Portable and safe solution. Generally efficient. + * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html + */ +static xxh_u32 XXH_read32(const void* memPtr) +{ + xxh_u32 val; + XXH_memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + + +/* *** Endianness *** */ + +/*! + * @ingroup tuning + * @def XXH_CPU_LITTLE_ENDIAN + * @brief Whether the target is little endian. + * + * Defined to 1 if the target is little endian, or 0 if it is big endian. + * It can be defined externally, for example on the compiler command line. + * + * If it is not defined, + * a runtime check (which is usually constant folded) is used instead. + * + * @note + * This is not necessarily defined to an integer constant. + * + * @see XXH_isLittleEndian() for the runtime check. + */ +#ifndef XXH_CPU_LITTLE_ENDIAN +/* + * Try to detect endianness automatically, to avoid the nonstandard behavior + * in `XXH_isLittleEndian()` + */ +# if defined(_WIN32) /* Windows is always little endian */ \ + || defined(__LITTLE_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# define XXH_CPU_LITTLE_ENDIAN 1 +# elif defined(__BIG_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define XXH_CPU_LITTLE_ENDIAN 0 +# else +/*! + * @internal + * @brief Runtime check for @ref XXH_CPU_LITTLE_ENDIAN. + * + * Most compilers will constant fold this. + */ +static int XXH_isLittleEndian(void) +{ + /* + * Portable and well-defined behavior. + * Don't use static: it is detrimental to performance. + */ + const union { xxh_u32 u; xxh_u8 c[4]; } one = { 1 }; + return one.c[0]; +} +# define XXH_CPU_LITTLE_ENDIAN XXH_isLittleEndian() +# endif +#endif + + + + +/* **************************************** +* Compiler-specific Functions and Macros +******************************************/ +#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#ifdef __has_builtin +# define XXH_HAS_BUILTIN(x) __has_builtin(x) +#else +# define XXH_HAS_BUILTIN(x) 0 +#endif + + + +/* + * C23 and future versions have standard "unreachable()". + * Once it has been implemented reliably we can add it as an + * additional case: + * + * ``` + * #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) + * # include + * # ifdef unreachable + * # define XXH_UNREACHABLE() unreachable() + * # endif + * #endif + * ``` + * + * Note C++23 also has std::unreachable() which can be detected + * as follows: + * ``` + * #if defined(__cpp_lib_unreachable) && (__cpp_lib_unreachable >= 202202L) + * # include + * # define XXH_UNREACHABLE() std::unreachable() + * #endif + * ``` + * NB: `__cpp_lib_unreachable` is defined in the `` header. + * We don't use that as including `` in `extern "C"` blocks + * doesn't work on GCC12 + */ + +#if XXH_HAS_BUILTIN(__builtin_unreachable) +# define XXH_UNREACHABLE() __builtin_unreachable() + +#elif defined(_MSC_VER) +# define XXH_UNREACHABLE() __assume(0) + +#else +# define XXH_UNREACHABLE() +#endif + +#if XXH_HAS_BUILTIN(__builtin_assume) +# define XXH_ASSUME(c) __builtin_assume(c) +#else +# define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); } +#endif + +/*! + * @internal + * @def XXH_rotl32(x,r) + * @brief 32-bit rotate left. + * + * @param x The 32-bit integer to be rotated. + * @param r The number of bits to rotate. + * @pre + * @p r > 0 && @p r < 32 + * @note + * @p x and @p r may be evaluated multiple times. + * @return The rotated result. + */ +#if !defined(NO_CLANG_BUILTIN) && XXH_HAS_BUILTIN(__builtin_rotateleft32) \ + && XXH_HAS_BUILTIN(__builtin_rotateleft64) +# define XXH_rotl32 __builtin_rotateleft32 +# define XXH_rotl64 __builtin_rotateleft64 +/* Note: although _rotl exists for minGW (GCC under windows), performance seems poor */ +#elif defined(_MSC_VER) +# define XXH_rotl32(x,r) _rotl(x,r) +# define XXH_rotl64(x,r) _rotl64(x,r) +#else +# define XXH_rotl32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) +# define XXH_rotl64(x,r) (((x) << (r)) | ((x) >> (64 - (r)))) +#endif + +/*! + * @internal + * @fn xxh_u32 XXH_swap32(xxh_u32 x) + * @brief A 32-bit byteswap. + * + * @param x The 32-bit integer to byteswap. + * @return @p x, byteswapped. + */ +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap32 _byteswap_ulong +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap32 __builtin_bswap32 +#else +static xxh_u32 XXH_swap32 (xxh_u32 x) +{ + return ((x << 24) & 0xff000000 ) | + ((x << 8) & 0x00ff0000 ) | + ((x >> 8) & 0x0000ff00 ) | + ((x >> 24) & 0x000000ff ); +} +#endif + + +/* *************************** +* Memory reads +*****************************/ + +/*! + * @internal + * @brief Enum to indicate whether a pointer is aligned. + */ +typedef enum { + XXH_aligned, /*!< Aligned */ + XXH_unaligned /*!< Possibly unaligned */ +} XXH_alignment; + +/* + * XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. + * + * This is ideal for older compilers which don't inline memcpy. + */ +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) + +XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[0] + | ((xxh_u32)bytePtr[1] << 8) + | ((xxh_u32)bytePtr[2] << 16) + | ((xxh_u32)bytePtr[3] << 24); +} + +XXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[3] + | ((xxh_u32)bytePtr[2] << 8) + | ((xxh_u32)bytePtr[1] << 16) + | ((xxh_u32)bytePtr[0] << 24); +} + +#else +XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); +} + +static xxh_u32 XXH_readBE32(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr); +} +#endif + +XXH_FORCE_INLINE xxh_u32 +XXH_readLE32_align(const void* ptr, XXH_alignment align) +{ + if (align==XXH_unaligned) { + return XXH_readLE32(ptr); + } else { + return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u32*)ptr : XXH_swap32(*(const xxh_u32*)ptr); + } +} + + +/* ************************************* +* Misc +***************************************/ +/*! @ingroup public */ +XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; } + + +/* ******************************************************************* +* 32-bit hash functions +*********************************************************************/ +/*! + * @} + * @defgroup XXH32_impl XXH32 implementation + * @ingroup impl + * + * Details on the XXH32 implementation. + * @{ + */ + /* #define instead of static const, to be used as initializers */ +#define XXH_PRIME32_1 0x9E3779B1U /*!< 0b10011110001101110111100110110001 */ +#define XXH_PRIME32_2 0x85EBCA77U /*!< 0b10000101111010111100101001110111 */ +#define XXH_PRIME32_3 0xC2B2AE3DU /*!< 0b11000010101100101010111000111101 */ +#define XXH_PRIME32_4 0x27D4EB2FU /*!< 0b00100111110101001110101100101111 */ +#define XXH_PRIME32_5 0x165667B1U /*!< 0b00010110010101100110011110110001 */ + +#ifdef XXH_OLD_NAMES +# define PRIME32_1 XXH_PRIME32_1 +# define PRIME32_2 XXH_PRIME32_2 +# define PRIME32_3 XXH_PRIME32_3 +# define PRIME32_4 XXH_PRIME32_4 +# define PRIME32_5 XXH_PRIME32_5 +#endif + +/*! + * @internal + * @brief Normal stripe processing routine. + * + * This shuffles the bits so that any bit from @p input impacts several bits in + * @p acc. + * + * @param acc The accumulator lane. + * @param input The stripe of input to mix. + * @return The mixed accumulator lane. + */ +static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input) +{ + acc += input * XXH_PRIME32_2; + acc = XXH_rotl32(acc, 13); + acc *= XXH_PRIME32_1; +#if (defined(__SSE4_1__) || defined(__aarch64__) || defined(__wasm_simd128__)) && !defined(XXH_ENABLE_AUTOVECTORIZE) + /* + * UGLY HACK: + * A compiler fence is the only thing that prevents GCC and Clang from + * autovectorizing the XXH32 loop (pragmas and attributes don't work for some + * reason) without globally disabling SSE4.1. + * + * The reason we want to avoid vectorization is because despite working on + * 4 integers at a time, there are multiple factors slowing XXH32 down on + * SSE4: + * - There's a ridiculous amount of lag from pmulld (10 cycles of latency on + * newer chips!) making it slightly slower to multiply four integers at + * once compared to four integers independently. Even when pmulld was + * fastest, Sandy/Ivy Bridge, it is still not worth it to go into SSE + * just to multiply unless doing a long operation. + * + * - Four instructions are required to rotate, + * movqda tmp, v // not required with VEX encoding + * pslld tmp, 13 // tmp <<= 13 + * psrld v, 19 // x >>= 19 + * por v, tmp // x |= tmp + * compared to one for scalar: + * roll v, 13 // reliably fast across the board + * shldl v, v, 13 // Sandy Bridge and later prefer this for some reason + * + * - Instruction level parallelism is actually more beneficial here because + * the SIMD actually serializes this operation: While v1 is rotating, v2 + * can load data, while v3 can multiply. SSE forces them to operate + * together. + * + * This is also enabled on AArch64, as Clang is *very aggressive* in vectorizing + * the loop. NEON is only faster on the A53, and with the newer cores, it is less + * than half the speed. + * + * Additionally, this is used on WASM SIMD128 because it JITs to the same + * SIMD instructions and has the same issue. + */ + XXH_COMPILER_GUARD(acc); +#endif + return acc; +} + +/*! + * @internal + * @brief Mixes all bits to finalize the hash. + * + * The final mix ensures that all input bits have a chance to impact any bit in + * the output digest, resulting in an unbiased distribution. + * + * @param hash The hash to avalanche. + * @return The avalanched hash. + */ +static xxh_u32 XXH32_avalanche(xxh_u32 hash) +{ + hash ^= hash >> 15; + hash *= XXH_PRIME32_2; + hash ^= hash >> 13; + hash *= XXH_PRIME32_3; + hash ^= hash >> 16; + return hash; +} + +#define XXH_get32bits(p) XXH_readLE32_align(p, align) + +/*! + * @internal + * @brief Processes the last 0-15 bytes of @p ptr. + * + * There may be up to 15 bytes remaining to consume from the input. + * This final stage will digest them to ensure that all input bytes are present + * in the final mix. + * + * @param hash The hash to finalize. + * @param ptr The pointer to the remaining input. + * @param len The remaining length, modulo 16. + * @param align Whether @p ptr is aligned. + * @return The finalized hash. + * @see XXH64_finalize(). + */ +static XXH_PUREF xxh_u32 +XXH32_finalize(xxh_u32 hash, const xxh_u8* ptr, size_t len, XXH_alignment align) +{ +#define XXH_PROCESS1 do { \ + hash += (*ptr++) * XXH_PRIME32_5; \ + hash = XXH_rotl32(hash, 11) * XXH_PRIME32_1; \ +} while (0) + +#define XXH_PROCESS4 do { \ + hash += XXH_get32bits(ptr) * XXH_PRIME32_3; \ + ptr += 4; \ + hash = XXH_rotl32(hash, 17) * XXH_PRIME32_4; \ +} while (0) + + if (ptr==NULL) XXH_ASSERT(len == 0); + + /* Compact rerolled version; generally faster */ + if (!XXH32_ENDJMP) { + len &= 15; + while (len >= 4) { + XXH_PROCESS4; + len -= 4; + } + while (len > 0) { + XXH_PROCESS1; + --len; + } + return XXH32_avalanche(hash); + } else { + switch(len&15) /* or switch(bEnd - p) */ { + case 12: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 8: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 4: XXH_PROCESS4; + return XXH32_avalanche(hash); + + case 13: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 9: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 5: XXH_PROCESS4; + XXH_PROCESS1; + return XXH32_avalanche(hash); + + case 14: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 10: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 6: XXH_PROCESS4; + XXH_PROCESS1; + XXH_PROCESS1; + return XXH32_avalanche(hash); + + case 15: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 11: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 7: XXH_PROCESS4; + XXH_FALLTHROUGH; /* fallthrough */ + case 3: XXH_PROCESS1; + XXH_FALLTHROUGH; /* fallthrough */ + case 2: XXH_PROCESS1; + XXH_FALLTHROUGH; /* fallthrough */ + case 1: XXH_PROCESS1; + XXH_FALLTHROUGH; /* fallthrough */ + case 0: return XXH32_avalanche(hash); + } + XXH_ASSERT(0); + return hash; /* reaching this point is deemed impossible */ + } +} + +#ifdef XXH_OLD_NAMES +# define PROCESS1 XXH_PROCESS1 +# define PROCESS4 XXH_PROCESS4 +#else +# undef XXH_PROCESS1 +# undef XXH_PROCESS4 +#endif + +/*! + * @internal + * @brief The implementation for @ref XXH32(). + * + * @param input , len , seed Directly passed from @ref XXH32(). + * @param align Whether @p input is aligned. + * @return The calculated hash. + */ +XXH_FORCE_INLINE XXH_PUREF xxh_u32 +XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align) +{ + xxh_u32 h32; + + if (input==NULL) XXH_ASSERT(len == 0); + + if (len>=16) { + const xxh_u8* const bEnd = input + len; + const xxh_u8* const limit = bEnd - 15; + xxh_u32 v1 = seed + XXH_PRIME32_1 + XXH_PRIME32_2; + xxh_u32 v2 = seed + XXH_PRIME32_2; + xxh_u32 v3 = seed + 0; + xxh_u32 v4 = seed - XXH_PRIME32_1; + + do { + v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4; + v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4; + v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4; + v4 = XXH32_round(v4, XXH_get32bits(input)); input += 4; + } while (input < limit); + + h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) + + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18); + } else { + h32 = seed + XXH_PRIME32_5; + } + + h32 += (xxh_u32)len; + + return XXH32_finalize(h32, input, len&15, align); +} + +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed) +{ +#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2 + /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ + XXH32_state_t state; + XXH32_reset(&state, seed); + XXH32_update(&state, (const xxh_u8*)input, len); + return XXH32_digest(&state); +#else + if (XXH_FORCE_ALIGN_CHECK) { + if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */ + return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_aligned); + } } + + return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned); +#endif +} + + + +/******* Hash streaming *******/ +#ifndef XXH_NO_STREAM +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void) +{ + return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t)); +} +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) +{ + XXH_free(statePtr); + return XXH_OK; +} + +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState) +{ + XXH_memcpy(dstState, srcState, sizeof(*dstState)); +} + +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t seed) +{ + XXH_ASSERT(statePtr != NULL); + memset(statePtr, 0, sizeof(*statePtr)); + statePtr->v[0] = seed + XXH_PRIME32_1 + XXH_PRIME32_2; + statePtr->v[1] = seed + XXH_PRIME32_2; + statePtr->v[2] = seed + 0; + statePtr->v[3] = seed - XXH_PRIME32_1; + return XXH_OK; +} + + +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API XXH_errorcode +XXH32_update(XXH32_state_t* state, const void* input, size_t len) +{ + if (input==NULL) { + XXH_ASSERT(len == 0); + return XXH_OK; + } + + { const xxh_u8* p = (const xxh_u8*)input; + const xxh_u8* const bEnd = p + len; + + state->total_len_32 += (XXH32_hash_t)len; + state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16)); + + if (state->memsize + len < 16) { /* fill in tmp buffer */ + XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, len); + state->memsize += (XXH32_hash_t)len; + return XXH_OK; + } + + if (state->memsize) { /* some data left from previous update */ + XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, 16-state->memsize); + { const xxh_u32* p32 = state->mem32; + state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p32)); p32++; + state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p32)); p32++; + state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p32)); p32++; + state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p32)); + } + p += 16-state->memsize; + state->memsize = 0; + } + + if (p <= bEnd-16) { + const xxh_u8* const limit = bEnd - 16; + + do { + state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p)); p+=4; + state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p)); p+=4; + state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p)); p+=4; + state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p)); p+=4; + } while (p<=limit); + + } + + if (p < bEnd) { + XXH_memcpy(state->mem32, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + } + + return XXH_OK; +} + + +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state) +{ + xxh_u32 h32; + + if (state->large_len) { + h32 = XXH_rotl32(state->v[0], 1) + + XXH_rotl32(state->v[1], 7) + + XXH_rotl32(state->v[2], 12) + + XXH_rotl32(state->v[3], 18); + } else { + h32 = state->v[2] /* == seed */ + XXH_PRIME32_5; + } + + h32 += state->total_len_32; + + return XXH32_finalize(h32, (const xxh_u8*)state->mem32, state->memsize, XXH_aligned); +} +#endif /* !XXH_NO_STREAM */ + +/******* Canonical representation *******/ + +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash); + XXH_memcpy(dst, &hash, sizeof(*dst)); +} +/*! @ingroup XXH32_family */ +XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src) +{ + return XXH_readBE32(src); +} + + +#ifndef XXH_NO_LONG_LONG + +/* ******************************************************************* +* 64-bit hash functions +*********************************************************************/ +/*! + * @} + * @ingroup impl + * @{ + */ +/******* Memory access *******/ + +typedef XXH64_hash_t xxh_u64; + +#ifdef XXH_OLD_NAMES +# define U64 xxh_u64 +#endif + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) +/* + * Manual byteshift. Best for old compilers which don't inline memcpy. + * We actually directly use XXH_readLE64 and XXH_readBE64. + */ +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ +static xxh_u64 XXH_read64(const void* memPtr) +{ + return *(const xxh_u64*) memPtr; +} + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* + * __attribute__((aligned(1))) is supported by gcc and clang. Originally the + * documentation claimed that it only increased the alignment, but actually it + * can decrease it on gcc, clang, and icc: + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502, + * https://gcc.godbolt.org/z/xYez1j67Y. + */ +#ifdef XXH_OLD_NAMES +typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) unalign64; +#endif +static xxh_u64 XXH_read64(const void* ptr) +{ + typedef __attribute__((aligned(1))) xxh_u64 xxh_unalign64; + return *((const xxh_unalign64*)ptr); +} + +#else + +/* + * Portable and safe solution. Generally efficient. + * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html + */ +static xxh_u64 XXH_read64(const void* memPtr) +{ + xxh_u64 val; + XXH_memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap64 _byteswap_uint64 +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap64 __builtin_bswap64 +#else +static xxh_u64 XXH_swap64(xxh_u64 x) +{ + return ((x << 56) & 0xff00000000000000ULL) | + ((x << 40) & 0x00ff000000000000ULL) | + ((x << 24) & 0x0000ff0000000000ULL) | + ((x << 8) & 0x000000ff00000000ULL) | + ((x >> 8) & 0x00000000ff000000ULL) | + ((x >> 24) & 0x0000000000ff0000ULL) | + ((x >> 40) & 0x000000000000ff00ULL) | + ((x >> 56) & 0x00000000000000ffULL); +} +#endif + + +/* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. */ +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) + +XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[0] + | ((xxh_u64)bytePtr[1] << 8) + | ((xxh_u64)bytePtr[2] << 16) + | ((xxh_u64)bytePtr[3] << 24) + | ((xxh_u64)bytePtr[4] << 32) + | ((xxh_u64)bytePtr[5] << 40) + | ((xxh_u64)bytePtr[6] << 48) + | ((xxh_u64)bytePtr[7] << 56); +} + +XXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[7] + | ((xxh_u64)bytePtr[6] << 8) + | ((xxh_u64)bytePtr[5] << 16) + | ((xxh_u64)bytePtr[4] << 24) + | ((xxh_u64)bytePtr[3] << 32) + | ((xxh_u64)bytePtr[2] << 40) + | ((xxh_u64)bytePtr[1] << 48) + | ((xxh_u64)bytePtr[0] << 56); +} + +#else +XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); +} + +static xxh_u64 XXH_readBE64(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr); +} +#endif + +XXH_FORCE_INLINE xxh_u64 +XXH_readLE64_align(const void* ptr, XXH_alignment align) +{ + if (align==XXH_unaligned) + return XXH_readLE64(ptr); + else + return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr); +} + + +/******* xxh64 *******/ +/*! + * @} + * @defgroup XXH64_impl XXH64 implementation + * @ingroup impl + * + * Details on the XXH64 implementation. + * @{ + */ +/* #define rather that static const, to be used as initializers */ +#define XXH_PRIME64_1 0x9E3779B185EBCA87ULL /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */ +#define XXH_PRIME64_2 0xC2B2AE3D27D4EB4FULL /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */ +#define XXH_PRIME64_3 0x165667B19E3779F9ULL /*!< 0b0001011001010110011001111011000110011110001101110111100111111001 */ +#define XXH_PRIME64_4 0x85EBCA77C2B2AE63ULL /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */ +#define XXH_PRIME64_5 0x27D4EB2F165667C5ULL /*!< 0b0010011111010100111010110010111100010110010101100110011111000101 */ + +#ifdef XXH_OLD_NAMES +# define PRIME64_1 XXH_PRIME64_1 +# define PRIME64_2 XXH_PRIME64_2 +# define PRIME64_3 XXH_PRIME64_3 +# define PRIME64_4 XXH_PRIME64_4 +# define PRIME64_5 XXH_PRIME64_5 +#endif + +/*! @copydoc XXH32_round */ +static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input) +{ + acc += input * XXH_PRIME64_2; + acc = XXH_rotl64(acc, 31); + acc *= XXH_PRIME64_1; +#if (defined(__AVX512F__)) && !defined(XXH_ENABLE_AUTOVECTORIZE) + /* + * DISABLE AUTOVECTORIZATION: + * A compiler fence is used to prevent GCC and Clang from + * autovectorizing the XXH64 loop (pragmas and attributes don't work for some + * reason) without globally disabling AVX512. + * + * Autovectorization of XXH64 tends to be detrimental, + * though the exact outcome may change depending on exact cpu and compiler version. + * For information, it has been reported as detrimental for Skylake-X, + * but possibly beneficial for Zen4. + * + * The default is to disable auto-vectorization, + * but you can select to enable it instead using `XXH_ENABLE_AUTOVECTORIZE` build variable. + */ + XXH_COMPILER_GUARD(acc); +#endif + return acc; +} + +static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val) +{ + val = XXH64_round(0, val); + acc ^= val; + acc = acc * XXH_PRIME64_1 + XXH_PRIME64_4; + return acc; +} + +/*! @copydoc XXH32_avalanche */ +static xxh_u64 XXH64_avalanche(xxh_u64 hash) +{ + hash ^= hash >> 33; + hash *= XXH_PRIME64_2; + hash ^= hash >> 29; + hash *= XXH_PRIME64_3; + hash ^= hash >> 32; + return hash; +} + + +#define XXH_get64bits(p) XXH_readLE64_align(p, align) + +/*! + * @internal + * @brief Processes the last 0-31 bytes of @p ptr. + * + * There may be up to 31 bytes remaining to consume from the input. + * This final stage will digest them to ensure that all input bytes are present + * in the final mix. + * + * @param hash The hash to finalize. + * @param ptr The pointer to the remaining input. + * @param len The remaining length, modulo 32. + * @param align Whether @p ptr is aligned. + * @return The finalized hash + * @see XXH32_finalize(). + */ +static XXH_PUREF xxh_u64 +XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align) +{ + if (ptr==NULL) XXH_ASSERT(len == 0); + len &= 31; + while (len >= 8) { + xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); + ptr += 8; + hash ^= k1; + hash = XXH_rotl64(hash,27) * XXH_PRIME64_1 + XXH_PRIME64_4; + len -= 8; + } + if (len >= 4) { + hash ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1; + ptr += 4; + hash = XXH_rotl64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3; + len -= 4; + } + while (len > 0) { + hash ^= (*ptr++) * XXH_PRIME64_5; + hash = XXH_rotl64(hash, 11) * XXH_PRIME64_1; + --len; + } + return XXH64_avalanche(hash); +} + +#ifdef XXH_OLD_NAMES +# define PROCESS1_64 XXH_PROCESS1_64 +# define PROCESS4_64 XXH_PROCESS4_64 +# define PROCESS8_64 XXH_PROCESS8_64 +#else +# undef XXH_PROCESS1_64 +# undef XXH_PROCESS4_64 +# undef XXH_PROCESS8_64 +#endif + +/*! + * @internal + * @brief The implementation for @ref XXH64(). + * + * @param input , len , seed Directly passed from @ref XXH64(). + * @param align Whether @p input is aligned. + * @return The calculated hash. + */ +XXH_FORCE_INLINE XXH_PUREF xxh_u64 +XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align) +{ + xxh_u64 h64; + if (input==NULL) XXH_ASSERT(len == 0); + + if (len>=32) { + const xxh_u8* const bEnd = input + len; + const xxh_u8* const limit = bEnd - 31; + xxh_u64 v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2; + xxh_u64 v2 = seed + XXH_PRIME64_2; + xxh_u64 v3 = seed + 0; + xxh_u64 v4 = seed - XXH_PRIME64_1; + + do { + v1 = XXH64_round(v1, XXH_get64bits(input)); input+=8; + v2 = XXH64_round(v2, XXH_get64bits(input)); input+=8; + v3 = XXH64_round(v3, XXH_get64bits(input)); input+=8; + v4 = XXH64_round(v4, XXH_get64bits(input)); input+=8; + } while (input= 2 + /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ + XXH64_state_t state; + XXH64_reset(&state, seed); + XXH64_update(&state, (const xxh_u8*)input, len); + return XXH64_digest(&state); +#else + if (XXH_FORCE_ALIGN_CHECK) { + if ((((size_t)input) & 7)==0) { /* Input is aligned, let's leverage the speed advantage */ + return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned); + } } + + return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned); + +#endif +} + +/******* Hash Streaming *******/ +#ifndef XXH_NO_STREAM +/*! @ingroup XXH64_family*/ +XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void) +{ + return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t)); +} +/*! @ingroup XXH64_family */ +XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) +{ + XXH_free(statePtr); + return XXH_OK; +} + +/*! @ingroup XXH64_family */ +XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const XXH64_state_t* srcState) +{ + XXH_memcpy(dstState, srcState, sizeof(*dstState)); +} + +/*! @ingroup XXH64_family */ +XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed) +{ + XXH_ASSERT(statePtr != NULL); + memset(statePtr, 0, sizeof(*statePtr)); + statePtr->v[0] = seed + XXH_PRIME64_1 + XXH_PRIME64_2; + statePtr->v[1] = seed + XXH_PRIME64_2; + statePtr->v[2] = seed + 0; + statePtr->v[3] = seed - XXH_PRIME64_1; + return XXH_OK; +} + +/*! @ingroup XXH64_family */ +XXH_PUBLIC_API XXH_errorcode +XXH64_update (XXH_NOESCAPE XXH64_state_t* state, XXH_NOESCAPE const void* input, size_t len) +{ + if (input==NULL) { + XXH_ASSERT(len == 0); + return XXH_OK; + } + + { const xxh_u8* p = (const xxh_u8*)input; + const xxh_u8* const bEnd = p + len; + + state->total_len += len; + + if (state->memsize + len < 32) { /* fill in tmp buffer */ + XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, len); + state->memsize += (xxh_u32)len; + return XXH_OK; + } + + if (state->memsize) { /* tmp buffer is full */ + XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, 32-state->memsize); + state->v[0] = XXH64_round(state->v[0], XXH_readLE64(state->mem64+0)); + state->v[1] = XXH64_round(state->v[1], XXH_readLE64(state->mem64+1)); + state->v[2] = XXH64_round(state->v[2], XXH_readLE64(state->mem64+2)); + state->v[3] = XXH64_round(state->v[3], XXH_readLE64(state->mem64+3)); + p += 32 - state->memsize; + state->memsize = 0; + } + + if (p+32 <= bEnd) { + const xxh_u8* const limit = bEnd - 32; + + do { + state->v[0] = XXH64_round(state->v[0], XXH_readLE64(p)); p+=8; + state->v[1] = XXH64_round(state->v[1], XXH_readLE64(p)); p+=8; + state->v[2] = XXH64_round(state->v[2], XXH_readLE64(p)); p+=8; + state->v[3] = XXH64_round(state->v[3], XXH_readLE64(p)); p+=8; + } while (p<=limit); + + } + + if (p < bEnd) { + XXH_memcpy(state->mem64, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + } + + return XXH_OK; +} + + +/*! @ingroup XXH64_family */ +XXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_t* state) +{ + xxh_u64 h64; + + if (state->total_len >= 32) { + h64 = XXH_rotl64(state->v[0], 1) + XXH_rotl64(state->v[1], 7) + XXH_rotl64(state->v[2], 12) + XXH_rotl64(state->v[3], 18); + h64 = XXH64_mergeRound(h64, state->v[0]); + h64 = XXH64_mergeRound(h64, state->v[1]); + h64 = XXH64_mergeRound(h64, state->v[2]); + h64 = XXH64_mergeRound(h64, state->v[3]); + } else { + h64 = state->v[2] /*seed*/ + XXH_PRIME64_5; + } + + h64 += (xxh_u64) state->total_len; + + return XXH64_finalize(h64, (const xxh_u8*)state->mem64, (size_t)state->total_len, XXH_aligned); +} +#endif /* !XXH_NO_STREAM */ + +/******* Canonical representation *******/ + +/*! @ingroup XXH64_family */ +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash); + XXH_memcpy(dst, &hash, sizeof(*dst)); +} + +/*! @ingroup XXH64_family */ +XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src) +{ + return XXH_readBE64(src); +} + +#if defined (__cplusplus) +} +#endif + +#ifndef XXH_NO_XXH3 + +/* ********************************************************************* +* XXH3 +* New generation hash designed for speed on small keys and vectorization +************************************************************************ */ +/*! + * @} + * @defgroup XXH3_impl XXH3 implementation + * @ingroup impl + * @{ + */ + +/* === Compiler specifics === */ + +#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */ +# define XXH_RESTRICT /* disable */ +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */ +# define XXH_RESTRICT restrict +#elif (defined (__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) \ + || (defined (__clang__)) \ + || (defined (_MSC_VER) && (_MSC_VER >= 1400)) \ + || (defined (__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300)) +/* + * There are a LOT more compilers that recognize __restrict but this + * covers the major ones. + */ +# define XXH_RESTRICT __restrict +#else +# define XXH_RESTRICT /* disable */ +#endif + +#if (defined(__GNUC__) && (__GNUC__ >= 3)) \ + || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) \ + || defined(__clang__) +# define XXH_likely(x) __builtin_expect(x, 1) +# define XXH_unlikely(x) __builtin_expect(x, 0) +#else +# define XXH_likely(x) (x) +# define XXH_unlikely(x) (x) +#endif + +#ifndef XXH_HAS_INCLUDE +# ifdef __has_include +/* + * Not defined as XXH_HAS_INCLUDE(x) (function-like) because + * this causes segfaults in Apple Clang 4.2 (on Mac OS X 10.7 Lion) + */ +# define XXH_HAS_INCLUDE __has_include +# else +# define XXH_HAS_INCLUDE(x) 0 +# endif +#endif + +#if defined(__GNUC__) || defined(__clang__) +# if defined(__ARM_FEATURE_SVE) +# include +# endif +# if defined(__ARM_NEON__) || defined(__ARM_NEON) \ + || (defined(_M_ARM) && _M_ARM >= 7) \ + || defined(_M_ARM64) || defined(_M_ARM64EC) \ + || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE()) /* WASM SIMD128 via SIMDe */ +# define inline __inline__ /* circumvent a clang bug */ +# include +# undef inline +# elif defined(__AVX2__) +# include +# elif defined(__SSE2__) +# include +# endif +#endif + +#if defined(_MSC_VER) +# include +#endif + +/* + * One goal of XXH3 is to make it fast on both 32-bit and 64-bit, while + * remaining a true 64-bit/128-bit hash function. + * + * This is done by prioritizing a subset of 64-bit operations that can be + * emulated without too many steps on the average 32-bit machine. + * + * For example, these two lines seem similar, and run equally fast on 64-bit: + * + * xxh_u64 x; + * x ^= (x >> 47); // good + * x ^= (x >> 13); // bad + * + * However, to a 32-bit machine, there is a major difference. + * + * x ^= (x >> 47) looks like this: + * + * x.lo ^= (x.hi >> (47 - 32)); + * + * while x ^= (x >> 13) looks like this: + * + * // note: funnel shifts are not usually cheap. + * x.lo ^= (x.lo >> 13) | (x.hi << (32 - 13)); + * x.hi ^= (x.hi >> 13); + * + * The first one is significantly faster than the second, simply because the + * shift is larger than 32. This means: + * - All the bits we need are in the upper 32 bits, so we can ignore the lower + * 32 bits in the shift. + * - The shift result will always fit in the lower 32 bits, and therefore, + * we can ignore the upper 32 bits in the xor. + * + * Thanks to this optimization, XXH3 only requires these features to be efficient: + * + * - Usable unaligned access + * - A 32-bit or 64-bit ALU + * - If 32-bit, a decent ADC instruction + * - A 32 or 64-bit multiply with a 64-bit result + * - For the 128-bit variant, a decent byteswap helps short inputs. + * + * The first two are already required by XXH32, and almost all 32-bit and 64-bit + * platforms which can run XXH32 can run XXH3 efficiently. + * + * Thumb-1, the classic 16-bit only subset of ARM's instruction set, is one + * notable exception. + * + * First of all, Thumb-1 lacks support for the UMULL instruction which + * performs the important long multiply. This means numerous __aeabi_lmul + * calls. + * + * Second of all, the 8 functional registers are just not enough. + * Setup for __aeabi_lmul, byteshift loads, pointers, and all arithmetic need + * Lo registers, and this shuffling results in thousands more MOVs than A32. + * + * A32 and T32 don't have this limitation. They can access all 14 registers, + * do a 32->64 multiply with UMULL, and the flexible operand allowing free + * shifts is helpful, too. + * + * Therefore, we do a quick sanity check. + * + * If compiling Thumb-1 for a target which supports ARM instructions, we will + * emit a warning, as it is not a "sane" platform to compile for. + * + * Usually, if this happens, it is because of an accident and you probably need + * to specify -march, as you likely meant to compile for a newer architecture. + * + * Credit: large sections of the vectorial and asm source code paths + * have been contributed by @easyaspi314 + */ +#if defined(__thumb__) && !defined(__thumb2__) && defined(__ARM_ARCH_ISA_ARM) +# warning "XXH3 is highly inefficient without ARM or Thumb-2." +#endif + +/* ========================================== + * Vectorization detection + * ========================================== */ + +#ifdef XXH_DOXYGEN +/*! + * @ingroup tuning + * @brief Overrides the vectorization implementation chosen for XXH3. + * + * Can be defined to 0 to disable SIMD or any of the values mentioned in + * @ref XXH_VECTOR_TYPE. + * + * If this is not defined, it uses predefined macros to determine the best + * implementation. + */ +# define XXH_VECTOR XXH_SCALAR +/*! + * @ingroup tuning + * @brief Possible values for @ref XXH_VECTOR. + * + * Note that these are actually implemented as macros. + * + * If this is not defined, it is detected automatically. + * internal macro XXH_X86DISPATCH overrides this. + */ +enum XXH_VECTOR_TYPE /* fake enum */ { + XXH_SCALAR = 0, /*!< Portable scalar version */ + XXH_SSE2 = 1, /*!< + * SSE2 for Pentium 4, Opteron, all x86_64. + * + * @note SSE2 is also guaranteed on Windows 10, macOS, and + * Android x86. + */ + XXH_AVX2 = 2, /*!< AVX2 for Haswell and Bulldozer */ + XXH_AVX512 = 3, /*!< AVX512 for Skylake and Icelake */ + XXH_NEON = 4, /*!< + * NEON for most ARMv7-A, all AArch64, and WASM SIMD128 + * via the SIMDeverywhere polyfill provided with the + * Emscripten SDK. + */ + XXH_VSX = 5, /*!< VSX and ZVector for POWER8/z13 (64-bit) */ + XXH_SVE = 6, /*!< SVE for some ARMv8-A and ARMv9-A */ +}; +/*! + * @ingroup tuning + * @brief Selects the minimum alignment for XXH3's accumulators. + * + * When using SIMD, this should match the alignment required for said vector + * type, so, for example, 32 for AVX2. + * + * Default: Auto detected. + */ +# define XXH_ACC_ALIGN 8 +#endif + +/* Actual definition */ +#ifndef XXH_DOXYGEN +# define XXH_SCALAR 0 +# define XXH_SSE2 1 +# define XXH_AVX2 2 +# define XXH_AVX512 3 +# define XXH_NEON 4 +# define XXH_VSX 5 +# define XXH_SVE 6 +#endif + +#ifndef XXH_VECTOR /* can be defined on command line */ +# if defined(__ARM_FEATURE_SVE) +# define XXH_VECTOR XXH_SVE +# elif ( \ + defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \ + || defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) /* msvc */ \ + || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE()) /* wasm simd128 via SIMDe */ \ + ) && ( \ + defined(_WIN32) || defined(__LITTLE_ENDIAN__) /* little endian only */ \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \ + ) +# define XXH_VECTOR XXH_NEON +# elif defined(__AVX512F__) +# define XXH_VECTOR XXH_AVX512 +# elif defined(__AVX2__) +# define XXH_VECTOR XXH_AVX2 +# elif defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2)) +# define XXH_VECTOR XXH_SSE2 +# elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \ + || (defined(__s390x__) && defined(__VEC__)) \ + && defined(__GNUC__) /* TODO: IBM XL */ +# define XXH_VECTOR XXH_VSX +# else +# define XXH_VECTOR XXH_SCALAR +# endif +#endif + +/* __ARM_FEATURE_SVE is only supported by GCC & Clang. */ +#if (XXH_VECTOR == XXH_SVE) && !defined(__ARM_FEATURE_SVE) +# ifdef _MSC_VER +# pragma warning(once : 4606) +# else +# warning "__ARM_FEATURE_SVE isn't supported. Use SCALAR instead." +# endif +# undef XXH_VECTOR +# define XXH_VECTOR XXH_SCALAR +#endif + +/* + * Controls the alignment of the accumulator, + * for compatibility with aligned vector loads, which are usually faster. + */ +#ifndef XXH_ACC_ALIGN +# if defined(XXH_X86DISPATCH) +# define XXH_ACC_ALIGN 64 /* for compatibility with avx512 */ +# elif XXH_VECTOR == XXH_SCALAR /* scalar */ +# define XXH_ACC_ALIGN 8 +# elif XXH_VECTOR == XXH_SSE2 /* sse2 */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_AVX2 /* avx2 */ +# define XXH_ACC_ALIGN 32 +# elif XXH_VECTOR == XXH_NEON /* neon */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_VSX /* vsx */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_AVX512 /* avx512 */ +# define XXH_ACC_ALIGN 64 +# elif XXH_VECTOR == XXH_SVE /* sve */ +# define XXH_ACC_ALIGN 64 +# endif +#endif + +#if defined(XXH_X86DISPATCH) || XXH_VECTOR == XXH_SSE2 \ + || XXH_VECTOR == XXH_AVX2 || XXH_VECTOR == XXH_AVX512 +# define XXH_SEC_ALIGN XXH_ACC_ALIGN +#elif XXH_VECTOR == XXH_SVE +# define XXH_SEC_ALIGN XXH_ACC_ALIGN +#else +# define XXH_SEC_ALIGN 8 +#endif + +#if defined(__GNUC__) || defined(__clang__) +# define XXH_ALIASING __attribute__((may_alias)) +#else +# define XXH_ALIASING /* nothing */ +#endif + +/* + * UGLY HACK: + * GCC usually generates the best code with -O3 for xxHash. + * + * However, when targeting AVX2, it is overzealous in its unrolling resulting + * in code roughly 3/4 the speed of Clang. + * + * There are other issues, such as GCC splitting _mm256_loadu_si256 into + * _mm_loadu_si128 + _mm256_inserti128_si256. This is an optimization which + * only applies to Sandy and Ivy Bridge... which don't even support AVX2. + * + * That is why when compiling the AVX2 version, it is recommended to use either + * -O2 -mavx2 -march=haswell + * or + * -O2 -mavx2 -mno-avx256-split-unaligned-load + * for decent performance, or to use Clang instead. + * + * Fortunately, we can control the first one with a pragma that forces GCC into + * -O2, but the other one we can't control without "failed to inline always + * inline function due to target mismatch" warnings. + */ +#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \ + && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ + && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */ +# pragma GCC push_options +# pragma GCC optimize("-O2") +#endif + +#if defined (__cplusplus) +extern "C" { +#endif + +#if XXH_VECTOR == XXH_NEON + +/* + * UGLY HACK: While AArch64 GCC on Linux does not seem to care, on macOS, GCC -O3 + * optimizes out the entire hashLong loop because of the aliasing violation. + * + * However, GCC is also inefficient at load-store optimization with vld1q/vst1q, + * so the only option is to mark it as aliasing. + */ +typedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING; + +/*! + * @internal + * @brief `vld1q_u64` but faster and alignment-safe. + * + * On AArch64, unaligned access is always safe, but on ARMv7-a, it is only + * *conditionally* safe (`vld1` has an alignment bit like `movdq[ua]` in x86). + * + * GCC for AArch64 sees `vld1q_u8` as an intrinsic instead of a load, so it + * prohibits load-store optimizations. Therefore, a direct dereference is used. + * + * Otherwise, `vld1q_u8` is used with `vreinterpretq_u8_u64` to do a safe + * unaligned load. + */ +#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) +XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) /* silence -Wcast-align */ +{ + return *(xxh_aliasing_uint64x2_t const *)ptr; +} +#else +XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) +{ + return vreinterpretq_u64_u8(vld1q_u8((uint8_t const*)ptr)); +} +#endif + +/*! + * @internal + * @brief `vmlal_u32` on low and high halves of a vector. + * + * This is a workaround for AArch64 GCC < 11 which implemented arm_neon.h with + * inline assembly and were therefore incapable of merging the `vget_{low, high}_u32` + * with `vmlal_u32`. + */ +#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11 +XXH_FORCE_INLINE uint64x2_t +XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) +{ + /* Inline assembly is the only way */ + __asm__("umlal %0.2d, %1.2s, %2.2s" : "+w" (acc) : "w" (lhs), "w" (rhs)); + return acc; +} +XXH_FORCE_INLINE uint64x2_t +XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) +{ + /* This intrinsic works as expected */ + return vmlal_high_u32(acc, lhs, rhs); +} +#else +/* Portable intrinsic versions */ +XXH_FORCE_INLINE uint64x2_t +XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) +{ + return vmlal_u32(acc, vget_low_u32(lhs), vget_low_u32(rhs)); +} +/*! @copydoc XXH_vmlal_low_u32 + * Assume the compiler converts this to vmlal_high_u32 on aarch64 */ +XXH_FORCE_INLINE uint64x2_t +XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs) +{ + return vmlal_u32(acc, vget_high_u32(lhs), vget_high_u32(rhs)); +} +#endif + +/*! + * @ingroup tuning + * @brief Controls the NEON to scalar ratio for XXH3 + * + * This can be set to 2, 4, 6, or 8. + * + * ARM Cortex CPUs are _very_ sensitive to how their pipelines are used. + * + * For example, the Cortex-A73 can dispatch 3 micro-ops per cycle, but only 2 of those + * can be NEON. If you are only using NEON instructions, you are only using 2/3 of the CPU + * bandwidth. + * + * This is even more noticeable on the more advanced cores like the Cortex-A76 which + * can dispatch 8 micro-ops per cycle, but still only 2 NEON micro-ops at once. + * + * Therefore, to make the most out of the pipeline, it is beneficial to run 6 NEON lanes + * and 2 scalar lanes, which is chosen by default. + * + * This does not apply to Apple processors or 32-bit processors, which run better with + * full NEON. These will default to 8. Additionally, size-optimized builds run 8 lanes. + * + * This change benefits CPUs with large micro-op buffers without negatively affecting + * most other CPUs: + * + * | Chipset | Dispatch type | NEON only | 6:2 hybrid | Diff. | + * |:----------------------|:--------------------|----------:|-----------:|------:| + * | Snapdragon 730 (A76) | 2 NEON/8 micro-ops | 8.8 GB/s | 10.1 GB/s | ~16% | + * | Snapdragon 835 (A73) | 2 NEON/3 micro-ops | 5.1 GB/s | 5.3 GB/s | ~5% | + * | Marvell PXA1928 (A53) | In-order dual-issue | 1.9 GB/s | 1.9 GB/s | 0% | + * | Apple M1 | 4 NEON/8 micro-ops | 37.3 GB/s | 36.1 GB/s | ~-3% | + * + * It also seems to fix some bad codegen on GCC, making it almost as fast as clang. + * + * When using WASM SIMD128, if this is 2 or 6, SIMDe will scalarize 2 of the lanes meaning + * it effectively becomes worse 4. + * + * @see XXH3_accumulate_512_neon() + */ +# ifndef XXH3_NEON_LANES +# if (defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) || defined(_M_ARM64EC)) \ + && !defined(__APPLE__) && XXH_SIZE_OPT <= 0 +# define XXH3_NEON_LANES 6 +# else +# define XXH3_NEON_LANES XXH_ACC_NB +# endif +# endif +#endif /* XXH_VECTOR == XXH_NEON */ + +#if defined (__cplusplus) +} /* extern "C" */ +#endif + +/* + * VSX and Z Vector helpers. + * + * This is very messy, and any pull requests to clean this up are welcome. + * + * There are a lot of problems with supporting VSX and s390x, due to + * inconsistent intrinsics, spotty coverage, and multiple endiannesses. + */ +#if XXH_VECTOR == XXH_VSX +/* Annoyingly, these headers _may_ define three macros: `bool`, `vector`, + * and `pixel`. This is a problem for obvious reasons. + * + * These keywords are unnecessary; the spec literally says they are + * equivalent to `__bool`, `__vector`, and `__pixel` and may be undef'd + * after including the header. + * + * We use pragma push_macro/pop_macro to keep the namespace clean. */ +# pragma push_macro("bool") +# pragma push_macro("vector") +# pragma push_macro("pixel") +/* silence potential macro redefined warnings */ +# undef bool +# undef vector +# undef pixel + +# if defined(__s390x__) +# include +# else +# include +# endif + +/* Restore the original macro values, if applicable. */ +# pragma pop_macro("pixel") +# pragma pop_macro("vector") +# pragma pop_macro("bool") + +typedef __vector unsigned long long xxh_u64x2; +typedef __vector unsigned char xxh_u8x16; +typedef __vector unsigned xxh_u32x4; + +/* + * UGLY HACK: Similar to aarch64 macOS GCC, s390x GCC has the same aliasing issue. + */ +typedef xxh_u64x2 xxh_aliasing_u64x2 XXH_ALIASING; + +# ifndef XXH_VSX_BE +# if defined(__BIG_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define XXH_VSX_BE 1 +# elif defined(__VEC_ELEMENT_REG_ORDER__) && __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__ +# warning "-maltivec=be is not recommended. Please use native endianness." +# define XXH_VSX_BE 1 +# else +# define XXH_VSX_BE 0 +# endif +# endif /* !defined(XXH_VSX_BE) */ + +# if XXH_VSX_BE +# if defined(__POWER9_VECTOR__) || (defined(__clang__) && defined(__s390x__)) +# define XXH_vec_revb vec_revb +# else +#if defined (__cplusplus) +extern "C" { +#endif +/*! + * A polyfill for POWER9's vec_revb(). + */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val) +{ + xxh_u8x16 const vByteSwap = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08 }; + return vec_perm(val, val, vByteSwap); +} +#if defined (__cplusplus) +} /* extern "C" */ +#endif +# endif +# endif /* XXH_VSX_BE */ + +#if defined (__cplusplus) +extern "C" { +#endif +/*! + * Performs an unaligned vector load and byte swaps it on big endian. + */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr) +{ + xxh_u64x2 ret; + XXH_memcpy(&ret, ptr, sizeof(xxh_u64x2)); +# if XXH_VSX_BE + ret = XXH_vec_revb(ret); +# endif + return ret; +} + +/* + * vec_mulo and vec_mule are very problematic intrinsics on PowerPC + * + * These intrinsics weren't added until GCC 8, despite existing for a while, + * and they are endian dependent. Also, their meaning swap depending on version. + * */ +# if defined(__s390x__) + /* s390x is always big endian, no issue on this platform */ +# define XXH_vec_mulo vec_mulo +# define XXH_vec_mule vec_mule +# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw) && !defined(__ibmxl__) +/* Clang has a better way to control this, we can just use the builtin which doesn't swap. */ + /* The IBM XL Compiler (which defined __clang__) only implements the vec_* operations */ +# define XXH_vec_mulo __builtin_altivec_vmulouw +# define XXH_vec_mule __builtin_altivec_vmuleuw +# else +/* gcc needs inline assembly */ +/* Adapted from https://github.com/google/highwayhash/blob/master/highwayhash/hh_vsx.h. */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b) +{ + xxh_u64x2 result; + __asm__("vmulouw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); + return result; +} +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b) +{ + xxh_u64x2 result; + __asm__("vmuleuw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); + return result; +} +# endif /* XXH_vec_mulo, XXH_vec_mule */ + +#if defined (__cplusplus) +} /* extern "C" */ +#endif + +#endif /* XXH_VECTOR == XXH_VSX */ + +#if XXH_VECTOR == XXH_SVE +#define ACCRND(acc, offset) \ +do { \ + svuint64_t input_vec = svld1_u64(mask, xinput + offset); \ + svuint64_t secret_vec = svld1_u64(mask, xsecret + offset); \ + svuint64_t mixed = sveor_u64_x(mask, secret_vec, input_vec); \ + svuint64_t swapped = svtbl_u64(input_vec, kSwap); \ + svuint64_t mixed_lo = svextw_u64_x(mask, mixed); \ + svuint64_t mixed_hi = svlsr_n_u64_x(mask, mixed, 32); \ + svuint64_t mul = svmad_u64_x(mask, mixed_lo, mixed_hi, swapped); \ + acc = svadd_u64_x(mask, acc, mul); \ +} while (0) +#endif /* XXH_VECTOR == XXH_SVE */ + +/* prefetch + * can be disabled, by declaring XXH_NO_PREFETCH build macro */ +#if defined(XXH_NO_PREFETCH) +# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ +#else +# if XXH_SIZE_OPT >= 1 +# define XXH_PREFETCH(ptr) (void)(ptr) +# elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) /* _mm_prefetch() not defined outside of x86/x64 */ +# include /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ +# define XXH_PREFETCH(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) +# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) +# define XXH_PREFETCH(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) +# else +# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ +# endif +#endif /* XXH_NO_PREFETCH */ + +#if defined (__cplusplus) +extern "C" { +#endif +/* ========================================== + * XXH3 default settings + * ========================================== */ + +#define XXH_SECRET_DEFAULT_SIZE 192 /* minimum XXH3_SECRET_SIZE_MIN */ + +#if (XXH_SECRET_DEFAULT_SIZE < XXH3_SECRET_SIZE_MIN) +# error "default keyset is not large enough" +#endif + +/*! Pseudorandom secret taken directly from FARSH. */ +XXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = { + 0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c, + 0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f, + 0xcb, 0x79, 0xe6, 0x4e, 0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21, + 0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6, 0x81, 0x3a, 0x26, 0x4c, + 0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb, 0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3, + 0x71, 0x64, 0x48, 0x97, 0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8, + 0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7, 0xc7, 0x0b, 0x4f, 0x1d, + 0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31, 0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64, + 0xea, 0xc5, 0xac, 0x83, 0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb, + 0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26, 0x29, 0xd4, 0x68, 0x9e, + 0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc, 0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce, + 0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e, +}; + +static const xxh_u64 PRIME_MX1 = 0x165667919E3779F9ULL; /*!< 0b0001011001010110011001111001000110011110001101110111100111111001 */ +static const xxh_u64 PRIME_MX2 = 0x9FB21C651E98DF25ULL; /*!< 0b1001111110110010000111000110010100011110100110001101111100100101 */ + +#ifdef XXH_OLD_NAMES +# define kSecret XXH3_kSecret +#endif + +#ifdef XXH_DOXYGEN +/*! + * @brief Calculates a 32-bit to 64-bit long multiply. + * + * Implemented as a macro. + * + * Wraps `__emulu` on MSVC x86 because it tends to call `__allmul` when it doesn't + * need to (but it shouldn't need to anyways, it is about 7 instructions to do + * a 64x64 multiply...). Since we know that this will _always_ emit `MULL`, we + * use that instead of the normal method. + * + * If you are compiling for platforms like Thumb-1 and don't have a better option, + * you may also want to write your own long multiply routine here. + * + * @param x, y Numbers to be multiplied + * @return 64-bit product of the low 32 bits of @p x and @p y. + */ +XXH_FORCE_INLINE xxh_u64 +XXH_mult32to64(xxh_u64 x, xxh_u64 y) +{ + return (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF); +} +#elif defined(_MSC_VER) && defined(_M_IX86) +# define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y)) +#else +/* + * Downcast + upcast is usually better than masking on older compilers like + * GCC 4.2 (especially 32-bit ones), all without affecting newer compilers. + * + * The other method, (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF), will AND both operands + * and perform a full 64x64 multiply -- entirely redundant on 32-bit. + */ +# define XXH_mult32to64(x, y) ((xxh_u64)(xxh_u32)(x) * (xxh_u64)(xxh_u32)(y)) +#endif + +/*! + * @brief Calculates a 64->128-bit long multiply. + * + * Uses `__uint128_t` and `_umul128` if available, otherwise uses a scalar + * version. + * + * @param lhs , rhs The 64-bit integers to be multiplied + * @return The 128-bit result represented in an @ref XXH128_hash_t. + */ +static XXH128_hash_t +XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs) +{ + /* + * GCC/Clang __uint128_t method. + * + * On most 64-bit targets, GCC and Clang define a __uint128_t type. + * This is usually the best way as it usually uses a native long 64-bit + * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64. + * + * Usually. + * + * Despite being a 32-bit platform, Clang (and emscripten) define this type + * despite not having the arithmetic for it. This results in a laggy + * compiler builtin call which calculates a full 128-bit multiply. + * In that case it is best to use the portable one. + * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677 + */ +#if (defined(__GNUC__) || defined(__clang__)) && !defined(__wasm__) \ + && defined(__SIZEOF_INT128__) \ + || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128) + + __uint128_t const product = (__uint128_t)lhs * (__uint128_t)rhs; + XXH128_hash_t r128; + r128.low64 = (xxh_u64)(product); + r128.high64 = (xxh_u64)(product >> 64); + return r128; + + /* + * MSVC for x64's _umul128 method. + * + * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct); + * + * This compiles to single operand MUL on x64. + */ +#elif (defined(_M_X64) || defined(_M_IA64)) && !defined(_M_ARM64EC) + +#ifndef _MSC_VER +# pragma intrinsic(_umul128) +#endif + xxh_u64 product_high; + xxh_u64 const product_low = _umul128(lhs, rhs, &product_high); + XXH128_hash_t r128; + r128.low64 = product_low; + r128.high64 = product_high; + return r128; + + /* + * MSVC for ARM64's __umulh method. + * + * This compiles to the same MUL + UMULH as GCC/Clang's __uint128_t method. + */ +#elif defined(_M_ARM64) || defined(_M_ARM64EC) + +#ifndef _MSC_VER +# pragma intrinsic(__umulh) +#endif + XXH128_hash_t r128; + r128.low64 = lhs * rhs; + r128.high64 = __umulh(lhs, rhs); + return r128; + +#else + /* + * Portable scalar method. Optimized for 32-bit and 64-bit ALUs. + * + * This is a fast and simple grade school multiply, which is shown below + * with base 10 arithmetic instead of base 0x100000000. + * + * 9 3 // D2 lhs = 93 + * x 7 5 // D2 rhs = 75 + * ---------- + * 1 5 // D2 lo_lo = (93 % 10) * (75 % 10) = 15 + * 4 5 | // D2 hi_lo = (93 / 10) * (75 % 10) = 45 + * 2 1 | // D2 lo_hi = (93 % 10) * (75 / 10) = 21 + * + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10) = 63 + * --------- + * 2 7 | // D2 cross = (15 / 10) + (45 % 10) + 21 = 27 + * + 6 7 | | // D2 upper = (27 / 10) + (45 / 10) + 63 = 67 + * --------- + * 6 9 7 5 // D4 res = (27 * 10) + (15 % 10) + (67 * 100) = 6975 + * + * The reasons for adding the products like this are: + * 1. It avoids manual carry tracking. Just like how + * (9 * 9) + 9 + 9 = 99, the same applies with this for UINT64_MAX. + * This avoids a lot of complexity. + * + * 2. It hints for, and on Clang, compiles to, the powerful UMAAL + * instruction available in ARM's Digital Signal Processing extension + * in 32-bit ARMv6 and later, which is shown below: + * + * void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm) + * { + * xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm; + * *RdLo = (xxh_u32)(product & 0xFFFFFFFF); + * *RdHi = (xxh_u32)(product >> 32); + * } + * + * This instruction was designed for efficient long multiplication, and + * allows this to be calculated in only 4 instructions at speeds + * comparable to some 64-bit ALUs. + * + * 3. It isn't terrible on other platforms. Usually this will be a couple + * of 32-bit ADD/ADCs. + */ + + /* First calculate all of the cross products. */ + xxh_u64 const lo_lo = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF); + xxh_u64 const hi_lo = XXH_mult32to64(lhs >> 32, rhs & 0xFFFFFFFF); + xxh_u64 const lo_hi = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32); + xxh_u64 const hi_hi = XXH_mult32to64(lhs >> 32, rhs >> 32); + + /* Now add the products together. These will never overflow. */ + xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi; + xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32) + hi_hi; + xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF); + + XXH128_hash_t r128; + r128.low64 = lower; + r128.high64 = upper; + return r128; +#endif +} + +/*! + * @brief Calculates a 64-bit to 128-bit multiply, then XOR folds it. + * + * The reason for the separate function is to prevent passing too many structs + * around by value. This will hopefully inline the multiply, but we don't force it. + * + * @param lhs , rhs The 64-bit integers to multiply + * @return The low 64 bits of the product XOR'd by the high 64 bits. + * @see XXH_mult64to128() + */ +static xxh_u64 +XXH3_mul128_fold64(xxh_u64 lhs, xxh_u64 rhs) +{ + XXH128_hash_t product = XXH_mult64to128(lhs, rhs); + return product.low64 ^ product.high64; +} + +/*! Seems to produce slightly better code on GCC for some reason. */ +XXH_FORCE_INLINE XXH_CONSTF xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift) +{ + XXH_ASSERT(0 <= shift && shift < 64); + return v64 ^ (v64 >> shift); +} + +/* + * This is a fast avalanche stage, + * suitable when input bits are already partially mixed + */ +static XXH64_hash_t XXH3_avalanche(xxh_u64 h64) +{ + h64 = XXH_xorshift64(h64, 37); + h64 *= PRIME_MX1; + h64 = XXH_xorshift64(h64, 32); + return h64; +} + +/* + * This is a stronger avalanche, + * inspired by Pelle Evensen's rrmxmx + * preferable when input has not been previously mixed + */ +static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len) +{ + /* this mix is inspired by Pelle Evensen's rrmxmx */ + h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24); + h64 *= PRIME_MX2; + h64 ^= (h64 >> 35) + len ; + h64 *= PRIME_MX2; + return XXH_xorshift64(h64, 28); +} + + +/* ========================================== + * Short keys + * ========================================== + * One of the shortcomings of XXH32 and XXH64 was that their performance was + * sub-optimal on short lengths. It used an iterative algorithm which strongly + * favored lengths that were a multiple of 4 or 8. + * + * Instead of iterating over individual inputs, we use a set of single shot + * functions which piece together a range of lengths and operate in constant time. + * + * Additionally, the number of multiplies has been significantly reduced. This + * reduces latency, especially when emulating 64-bit multiplies on 32-bit. + * + * Depending on the platform, this may or may not be faster than XXH32, but it + * is almost guaranteed to be faster than XXH64. + */ + +/* + * At very short lengths, there isn't enough input to fully hide secrets, or use + * the entire secret. + * + * There is also only a limited amount of mixing we can do before significantly + * impacting performance. + * + * Therefore, we use different sections of the secret and always mix two secret + * samples with an XOR. This should have no effect on performance on the + * seedless or withSeed variants because everything _should_ be constant folded + * by modern compilers. + * + * The XOR mixing hides individual parts of the secret and increases entropy. + * + * This adds an extra layer of strength for custom secrets. + */ +XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t +XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(1 <= len && len <= 3); + XXH_ASSERT(secret != NULL); + /* + * len = 1: combined = { input[0], 0x01, input[0], input[0] } + * len = 2: combined = { input[1], 0x02, input[0], input[1] } + * len = 3: combined = { input[2], 0x03, input[0], input[1] } + */ + { xxh_u8 const c1 = input[0]; + xxh_u8 const c2 = input[len >> 1]; + xxh_u8 const c3 = input[len - 1]; + xxh_u32 const combined = ((xxh_u32)c1 << 16) | ((xxh_u32)c2 << 24) + | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); + xxh_u64 const bitflip = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; + xxh_u64 const keyed = (xxh_u64)combined ^ bitflip; + return XXH64_avalanche(keyed); + } +} + +XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t +XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(4 <= len && len <= 8); + seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; + { xxh_u32 const input1 = XXH_readLE32(input); + xxh_u32 const input2 = XXH_readLE32(input + len - 4); + xxh_u64 const bitflip = (XXH_readLE64(secret+8) ^ XXH_readLE64(secret+16)) - seed; + xxh_u64 const input64 = input2 + (((xxh_u64)input1) << 32); + xxh_u64 const keyed = input64 ^ bitflip; + return XXH3_rrmxmx(keyed, len); + } +} + +XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t +XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(9 <= len && len <= 16); + { xxh_u64 const bitflip1 = (XXH_readLE64(secret+24) ^ XXH_readLE64(secret+32)) + seed; + xxh_u64 const bitflip2 = (XXH_readLE64(secret+40) ^ XXH_readLE64(secret+48)) - seed; + xxh_u64 const input_lo = XXH_readLE64(input) ^ bitflip1; + xxh_u64 const input_hi = XXH_readLE64(input + len - 8) ^ bitflip2; + xxh_u64 const acc = len + + XXH_swap64(input_lo) + input_hi + + XXH3_mul128_fold64(input_lo, input_hi); + return XXH3_avalanche(acc); + } +} + +XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t +XXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(len <= 16); + { if (XXH_likely(len > 8)) return XXH3_len_9to16_64b(input, len, secret, seed); + if (XXH_likely(len >= 4)) return XXH3_len_4to8_64b(input, len, secret, seed); + if (len) return XXH3_len_1to3_64b(input, len, secret, seed); + return XXH64_avalanche(seed ^ (XXH_readLE64(secret+56) ^ XXH_readLE64(secret+64))); + } +} + +/* + * DISCLAIMER: There are known *seed-dependent* multicollisions here due to + * multiplication by zero, affecting hashes of lengths 17 to 240. + * + * However, they are very unlikely. + * + * Keep this in mind when using the unseeded XXH3_64bits() variant: As with all + * unseeded non-cryptographic hashes, it does not attempt to defend itself + * against specially crafted inputs, only random inputs. + * + * Compared to classic UMAC where a 1 in 2^31 chance of 4 consecutive bytes + * cancelling out the secret is taken an arbitrary number of times (addressed + * in XXH3_accumulate_512), this collision is very unlikely with random inputs + * and/or proper seeding: + * + * This only has a 1 in 2^63 chance of 8 consecutive bytes cancelling out, in a + * function that is only called up to 16 times per hash with up to 240 bytes of + * input. + * + * This is not too bad for a non-cryptographic hash function, especially with + * only 64 bit outputs. + * + * The 128-bit variant (which trades some speed for strength) is NOT affected + * by this, although it is always a good idea to use a proper seed if you care + * about strength. + */ +XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input, + const xxh_u8* XXH_RESTRICT secret, xxh_u64 seed64) +{ +#if defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ + && defined(__i386__) && defined(__SSE2__) /* x86 + SSE2 */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable like XXH32 hack */ + /* + * UGLY HACK: + * GCC for x86 tends to autovectorize the 128-bit multiply, resulting in + * slower code. + * + * By forcing seed64 into a register, we disrupt the cost model and + * cause it to scalarize. See `XXH32_round()` + * + * FIXME: Clang's output is still _much_ faster -- On an AMD Ryzen 3600, + * XXH3_64bits @ len=240 runs at 4.6 GB/s with Clang 9, but 3.3 GB/s on + * GCC 9.2, despite both emitting scalar code. + * + * GCC generates much better scalar code than Clang for the rest of XXH3, + * which is why finding a more optimal codepath is an interest. + */ + XXH_COMPILER_GUARD(seed64); +#endif + { xxh_u64 const input_lo = XXH_readLE64(input); + xxh_u64 const input_hi = XXH_readLE64(input+8); + return XXH3_mul128_fold64( + input_lo ^ (XXH_readLE64(secret) + seed64), + input_hi ^ (XXH_readLE64(secret+8) - seed64) + ); + } +} + +/* For mid range keys, XXH3 uses a Mum-hash variant. */ +XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t +XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(16 < len && len <= 128); + + { xxh_u64 acc = len * XXH_PRIME64_1; +#if XXH_SIZE_OPT >= 1 + /* Smaller and cleaner, but slightly slower. */ + unsigned int i = (unsigned int)(len - 1) / 32; + do { + acc += XXH3_mix16B(input+16 * i, secret+32*i, seed); + acc += XXH3_mix16B(input+len-16*(i+1), secret+32*i+16, seed); + } while (i-- != 0); +#else + if (len > 32) { + if (len > 64) { + if (len > 96) { + acc += XXH3_mix16B(input+48, secret+96, seed); + acc += XXH3_mix16B(input+len-64, secret+112, seed); + } + acc += XXH3_mix16B(input+32, secret+64, seed); + acc += XXH3_mix16B(input+len-48, secret+80, seed); + } + acc += XXH3_mix16B(input+16, secret+32, seed); + acc += XXH3_mix16B(input+len-32, secret+48, seed); + } + acc += XXH3_mix16B(input+0, secret+0, seed); + acc += XXH3_mix16B(input+len-16, secret+16, seed); +#endif + return XXH3_avalanche(acc); + } +} + +/*! + * @brief Maximum size of "short" key in bytes. + */ +#define XXH3_MIDSIZE_MAX 240 + +XXH_NO_INLINE XXH_PUREF XXH64_hash_t +XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); + + #define XXH3_MIDSIZE_STARTOFFSET 3 + #define XXH3_MIDSIZE_LASTOFFSET 17 + + { xxh_u64 acc = len * XXH_PRIME64_1; + xxh_u64 acc_end; + unsigned int const nbRounds = (unsigned int)len / 16; + unsigned int i; + XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); + for (i=0; i<8; i++) { + acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed); + } + /* last bytes */ + acc_end = XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed); + XXH_ASSERT(nbRounds >= 8); + acc = XXH3_avalanche(acc); +#if defined(__clang__) /* Clang */ \ + && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ + /* + * UGLY HACK: + * Clang for ARMv7-A tries to vectorize this loop, similar to GCC x86. + * In everywhere else, it uses scalar code. + * + * For 64->128-bit multiplies, even if the NEON was 100% optimal, it + * would still be slower than UMAAL (see XXH_mult64to128). + * + * Unfortunately, Clang doesn't handle the long multiplies properly and + * converts them to the nonexistent "vmulq_u64" intrinsic, which is then + * scalarized into an ugly mess of VMOV.32 instructions. + * + * This mess is difficult to avoid without turning autovectorization + * off completely, but they are usually relatively minor and/or not + * worth it to fix. + * + * This loop is the easiest to fix, as unlike XXH32, this pragma + * _actually works_ because it is a loop vectorization instead of an + * SLP vectorization. + */ + #pragma clang loop vectorize(disable) +#endif + for (i=8 ; i < nbRounds; i++) { + /* + * Prevents clang for unrolling the acc loop and interleaving with this one. + */ + XXH_COMPILER_GUARD(acc); + acc_end += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed); + } + return XXH3_avalanche(acc + acc_end); + } +} + + +/* ======= Long Keys ======= */ + +#define XXH_STRIPE_LEN 64 +#define XXH_SECRET_CONSUME_RATE 8 /* nb of secret bytes consumed at each accumulation */ +#define XXH_ACC_NB (XXH_STRIPE_LEN / sizeof(xxh_u64)) + +#ifdef XXH_OLD_NAMES +# define STRIPE_LEN XXH_STRIPE_LEN +# define ACC_NB XXH_ACC_NB +#endif + +#ifndef XXH_PREFETCH_DIST +# ifdef __clang__ +# define XXH_PREFETCH_DIST 320 +# else +# if (XXH_VECTOR == XXH_AVX512) +# define XXH_PREFETCH_DIST 512 +# else +# define XXH_PREFETCH_DIST 384 +# endif +# endif /* __clang__ */ +#endif /* XXH_PREFETCH_DIST */ + +/* + * These macros are to generate an XXH3_accumulate() function. + * The two arguments select the name suffix and target attribute. + * + * The name of this symbol is XXH3_accumulate_() and it calls + * XXH3_accumulate_512_(). + * + * It may be useful to hand implement this function if the compiler fails to + * optimize the inline function. + */ +#define XXH3_ACCUMULATE_TEMPLATE(name) \ +void \ +XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \ + const xxh_u8* XXH_RESTRICT input, \ + const xxh_u8* XXH_RESTRICT secret, \ + size_t nbStripes) \ +{ \ + size_t n; \ + for (n = 0; n < nbStripes; n++ ) { \ + const xxh_u8* const in = input + n*XXH_STRIPE_LEN; \ + XXH_PREFETCH(in + XXH_PREFETCH_DIST); \ + XXH3_accumulate_512_##name( \ + acc, \ + in, \ + secret + n*XXH_SECRET_CONSUME_RATE); \ + } \ +} + + +XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64) +{ + if (!XXH_CPU_LITTLE_ENDIAN) v64 = XXH_swap64(v64); + XXH_memcpy(dst, &v64, sizeof(v64)); +} + +/* Several intrinsic functions below are supposed to accept __int64 as argument, + * as documented in https://software.intel.com/sites/landingpage/IntrinsicsGuide/ . + * However, several environments do not define __int64 type, + * requiring a workaround. + */ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) + typedef int64_t xxh_i64; +#else + /* the following type must have a width of 64-bit */ + typedef long long xxh_i64; +#endif + + +/* + * XXH3_accumulate_512 is the tightest loop for long inputs, and it is the most optimized. + * + * It is a hardened version of UMAC, based off of FARSH's implementation. + * + * This was chosen because it adapts quite well to 32-bit, 64-bit, and SIMD + * implementations, and it is ridiculously fast. + * + * We harden it by mixing the original input to the accumulators as well as the product. + * + * This means that in the (relatively likely) case of a multiply by zero, the + * original input is preserved. + * + * On 128-bit inputs, we swap 64-bit pairs when we add the input to improve + * cross-pollination, as otherwise the upper and lower halves would be + * essentially independent. + * + * This doesn't matter on 64-bit hashes since they all get merged together in + * the end, so we skip the extra step. + * + * Both XXH3_64bits and XXH3_128bits use this subroutine. + */ + +#if (XXH_VECTOR == XXH_AVX512) \ + || (defined(XXH_DISPATCH_AVX512) && XXH_DISPATCH_AVX512 != 0) + +#ifndef XXH_TARGET_AVX512 +# define XXH_TARGET_AVX512 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + __m512i* const xacc = (__m512i *) acc; + XXH_ASSERT((((size_t)acc) & 63) == 0); + XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); + + { + /* data_vec = input[0]; */ + __m512i const data_vec = _mm512_loadu_si512 (input); + /* key_vec = secret[0]; */ + __m512i const key_vec = _mm512_loadu_si512 (secret); + /* data_key = data_vec ^ key_vec; */ + __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m512i const data_key_lo = _mm512_srli_epi64 (data_key, 32); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m512i const product = _mm512_mul_epu32 (data_key, data_key_lo); + /* xacc[0] += swap(data_vec); */ + __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2)); + __m512i const sum = _mm512_add_epi64(*xacc, data_swap); + /* xacc[0] += product; */ + *xacc = _mm512_add_epi64(product, sum); + } +} +XXH_FORCE_INLINE XXH_TARGET_AVX512 XXH3_ACCUMULATE_TEMPLATE(avx512) + +/* + * XXH3_scrambleAcc: Scrambles the accumulators to improve mixing. + * + * Multiplication isn't perfect, as explained by Google in HighwayHash: + * + * // Multiplication mixes/scrambles bytes 0-7 of the 64-bit result to + * // varying degrees. In descending order of goodness, bytes + * // 3 4 2 5 1 6 0 7 have quality 228 224 164 160 100 96 36 32. + * // As expected, the upper and lower bytes are much worse. + * + * Source: https://github.com/google/highwayhash/blob/0aaf66b/highwayhash/hh_avx2.h#L291 + * + * Since our algorithm uses a pseudorandom secret to add some variance into the + * mix, we don't need to (or want to) mix as often or as much as HighwayHash does. + * + * This isn't as tight as XXH3_accumulate, but still written in SIMD to avoid + * extraction. + * + * Both XXH3_64bits and XXH3_128bits use this subroutine. + */ + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 63) == 0); + XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); + { __m512i* const xacc = (__m512i*) acc; + const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1); + + /* xacc[0] ^= (xacc[0] >> 47) */ + __m512i const acc_vec = *xacc; + __m512i const shifted = _mm512_srli_epi64 (acc_vec, 47); + /* xacc[0] ^= secret; */ + __m512i const key_vec = _mm512_loadu_si512 (secret); + __m512i const data_key = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 /* key_vec ^ acc_vec ^ shifted */); + + /* xacc[0] *= XXH_PRIME32_1; */ + __m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32); + __m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32); + __m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32); + *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32)); + } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 63) == 0); + XXH_STATIC_ASSERT(XXH_SEC_ALIGN == 64); + XXH_ASSERT(((size_t)customSecret & 63) == 0); + (void)(&XXH_writeLE64); + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m512i); + __m512i const seed_pos = _mm512_set1_epi64((xxh_i64)seed64); + __m512i const seed = _mm512_mask_sub_epi64(seed_pos, 0xAA, _mm512_set1_epi8(0), seed_pos); + + const __m512i* const src = (const __m512i*) ((const void*) XXH3_kSecret); + __m512i* const dest = ( __m512i*) customSecret; + int i; + XXH_ASSERT(((size_t)src & 63) == 0); /* control alignment */ + XXH_ASSERT(((size_t)dest & 63) == 0); + for (i=0; i < nbRounds; ++i) { + dest[i] = _mm512_add_epi64(_mm512_load_si512(src + i), seed); + } } +} + +#endif + +#if (XXH_VECTOR == XXH_AVX2) \ + || (defined(XXH_DISPATCH_AVX2) && XXH_DISPATCH_AVX2 != 0) + +#ifndef XXH_TARGET_AVX2 +# define XXH_TARGET_AVX2 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void +XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 31) == 0); + { __m256i* const xacc = (__m256i *) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xinput = (const __m256i *) input; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xsecret = (const __m256i *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { + /* data_vec = xinput[i]; */ + __m256i const data_vec = _mm256_loadu_si256 (xinput+i); + /* key_vec = xsecret[i]; */ + __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); + /* data_key = data_vec ^ key_vec; */ + __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m256i const data_key_lo = _mm256_srli_epi64 (data_key, 32); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m256i const product = _mm256_mul_epu32 (data_key, data_key_lo); + /* xacc[i] += swap(data_vec); */ + __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1, 0, 3, 2)); + __m256i const sum = _mm256_add_epi64(xacc[i], data_swap); + /* xacc[i] += product; */ + xacc[i] = _mm256_add_epi64(product, sum); + } } +} +XXH_FORCE_INLINE XXH_TARGET_AVX2 XXH3_ACCUMULATE_TEMPLATE(avx2) + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void +XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 31) == 0); + { __m256i* const xacc = (__m256i*) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xsecret = (const __m256i *) secret; + const __m256i prime32 = _mm256_set1_epi32((int)XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { + /* xacc[i] ^= (xacc[i] >> 47) */ + __m256i const acc_vec = xacc[i]; + __m256i const shifted = _mm256_srli_epi64 (acc_vec, 47); + __m256i const data_vec = _mm256_xor_si256 (acc_vec, shifted); + /* xacc[i] ^= xsecret; */ + __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); + __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); + + /* xacc[i] *= XXH_PRIME32_1; */ + __m256i const data_key_hi = _mm256_srli_epi64 (data_key, 32); + __m256i const prod_lo = _mm256_mul_epu32 (data_key, prime32); + __m256i const prod_hi = _mm256_mul_epu32 (data_key_hi, prime32); + xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32)); + } + } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 31) == 0); + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE / sizeof(__m256i)) == 6); + XXH_STATIC_ASSERT(XXH_SEC_ALIGN <= 64); + (void)(&XXH_writeLE64); + XXH_PREFETCH(customSecret); + { __m256i const seed = _mm256_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64, (xxh_i64)(0U - seed64), (xxh_i64)seed64); + + const __m256i* const src = (const __m256i*) ((const void*) XXH3_kSecret); + __m256i* dest = ( __m256i*) customSecret; + +# if defined(__GNUC__) || defined(__clang__) + /* + * On GCC & Clang, marking 'dest' as modified will cause the compiler: + * - do not extract the secret from sse registers in the internal loop + * - use less common registers, and avoid pushing these reg into stack + */ + XXH_COMPILER_GUARD(dest); +# endif + XXH_ASSERT(((size_t)src & 31) == 0); /* control alignment */ + XXH_ASSERT(((size_t)dest & 31) == 0); + + /* GCC -O2 need unroll loop manually */ + dest[0] = _mm256_add_epi64(_mm256_load_si256(src+0), seed); + dest[1] = _mm256_add_epi64(_mm256_load_si256(src+1), seed); + dest[2] = _mm256_add_epi64(_mm256_load_si256(src+2), seed); + dest[3] = _mm256_add_epi64(_mm256_load_si256(src+3), seed); + dest[4] = _mm256_add_epi64(_mm256_load_si256(src+4), seed); + dest[5] = _mm256_add_epi64(_mm256_load_si256(src+5), seed); + } +} + +#endif + +/* x86dispatch always generates SSE2 */ +#if (XXH_VECTOR == XXH_SSE2) || defined(XXH_X86DISPATCH) + +#ifndef XXH_TARGET_SSE2 +# define XXH_TARGET_SSE2 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void +XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + /* SSE2 is just a half-scale version of the AVX2 version. */ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { __m128i* const xacc = (__m128i *) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xinput = (const __m128i *) input; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xsecret = (const __m128i *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { + /* data_vec = xinput[i]; */ + __m128i const data_vec = _mm_loadu_si128 (xinput+i); + /* key_vec = xsecret[i]; */ + __m128i const key_vec = _mm_loadu_si128 (xsecret+i); + /* data_key = data_vec ^ key_vec; */ + __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m128i const data_key_lo = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m128i const product = _mm_mul_epu32 (data_key, data_key_lo); + /* xacc[i] += swap(data_vec); */ + __m128i const data_swap = _mm_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2)); + __m128i const sum = _mm_add_epi64(xacc[i], data_swap); + /* xacc[i] += product; */ + xacc[i] = _mm_add_epi64(product, sum); + } } +} +XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2) + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void +XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { __m128i* const xacc = (__m128i*) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xsecret = (const __m128i *) secret; + const __m128i prime32 = _mm_set1_epi32((int)XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { + /* xacc[i] ^= (xacc[i] >> 47) */ + __m128i const acc_vec = xacc[i]; + __m128i const shifted = _mm_srli_epi64 (acc_vec, 47); + __m128i const data_vec = _mm_xor_si128 (acc_vec, shifted); + /* xacc[i] ^= xsecret[i]; */ + __m128i const key_vec = _mm_loadu_si128 (xsecret+i); + __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); + + /* xacc[i] *= XXH_PRIME32_1; */ + __m128i const data_key_hi = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + __m128i const prod_lo = _mm_mul_epu32 (data_key, prime32); + __m128i const prod_hi = _mm_mul_epu32 (data_key_hi, prime32); + xacc[i] = _mm_add_epi64(prod_lo, _mm_slli_epi64(prod_hi, 32)); + } + } +} + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); + (void)(&XXH_writeLE64); + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m128i); + +# if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1900 + /* MSVC 32bit mode does not support _mm_set_epi64x before 2015 */ + XXH_ALIGN(16) const xxh_i64 seed64x2[2] = { (xxh_i64)seed64, (xxh_i64)(0U - seed64) }; + __m128i const seed = _mm_load_si128((__m128i const*)seed64x2); +# else + __m128i const seed = _mm_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64); +# endif + int i; + + const void* const src16 = XXH3_kSecret; + __m128i* dst16 = (__m128i*) customSecret; +# if defined(__GNUC__) || defined(__clang__) + /* + * On GCC & Clang, marking 'dest' as modified will cause the compiler: + * - do not extract the secret from sse registers in the internal loop + * - use less common registers, and avoid pushing these reg into stack + */ + XXH_COMPILER_GUARD(dst16); +# endif + XXH_ASSERT(((size_t)src16 & 15) == 0); /* control alignment */ + XXH_ASSERT(((size_t)dst16 & 15) == 0); + + for (i=0; i < nbRounds; ++i) { + dst16[i] = _mm_add_epi64(_mm_load_si128((const __m128i *)src16+i), seed); + } } +} + +#endif + +#if (XXH_VECTOR == XXH_NEON) + +/* forward declarations for the scalar routines */ +XXH_FORCE_INLINE void +XXH3_scalarRound(void* XXH_RESTRICT acc, void const* XXH_RESTRICT input, + void const* XXH_RESTRICT secret, size_t lane); + +XXH_FORCE_INLINE void +XXH3_scalarScrambleRound(void* XXH_RESTRICT acc, + void const* XXH_RESTRICT secret, size_t lane); + +/*! + * @internal + * @brief The bulk processing loop for NEON and WASM SIMD128. + * + * The NEON code path is actually partially scalar when running on AArch64. This + * is to optimize the pipelining and can have up to 15% speedup depending on the + * CPU, and it also mitigates some GCC codegen issues. + * + * @see XXH3_NEON_LANES for configuring this and details about this optimization. + * + * NEON's 32-bit to 64-bit long multiply takes a half vector of 32-bit + * integers instead of the other platforms which mask full 64-bit vectors, + * so the setup is more complicated than just shifting right. + * + * Additionally, there is an optimization for 4 lanes at once noted below. + * + * Since, as stated, the most optimal amount of lanes for Cortexes is 6, + * there needs to be *three* versions of the accumulate operation used + * for the remaining 2 lanes. + * + * WASM's SIMD128 uses SIMDe's arm_neon.h polyfill because the intrinsics overlap + * nearly perfectly. + */ + +XXH_FORCE_INLINE void +XXH3_accumulate_512_neon( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + XXH_STATIC_ASSERT(XXH3_NEON_LANES > 0 && XXH3_NEON_LANES <= XXH_ACC_NB && XXH3_NEON_LANES % 2 == 0); + { /* GCC for darwin arm64 does not like aliasing here */ + xxh_aliasing_uint64x2_t* const xacc = (xxh_aliasing_uint64x2_t*) acc; + /* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */ + uint8_t const* xinput = (const uint8_t *) input; + uint8_t const* xsecret = (const uint8_t *) secret; + + size_t i; +#ifdef __wasm_simd128__ + /* + * On WASM SIMD128, Clang emits direct address loads when XXH3_kSecret + * is constant propagated, which results in it converting it to this + * inside the loop: + * + * a = v128.load(XXH3_kSecret + 0 + $secret_offset, offset = 0) + * b = v128.load(XXH3_kSecret + 16 + $secret_offset, offset = 0) + * ... + * + * This requires a full 32-bit address immediate (and therefore a 6 byte + * instruction) as well as an add for each offset. + * + * Putting an asm guard prevents it from folding (at the cost of losing + * the alignment hint), and uses the free offset in `v128.load` instead + * of adding secret_offset each time which overall reduces code size by + * about a kilobyte and improves performance. + */ + XXH_COMPILER_GUARD(xsecret); +#endif + /* Scalar lanes use the normal scalarRound routine */ + for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) { + XXH3_scalarRound(acc, input, secret, i); + } + i = 0; + /* 4 NEON lanes at a time. */ + for (; i+1 < XXH3_NEON_LANES / 2; i+=2) { + /* data_vec = xinput[i]; */ + uint64x2_t data_vec_1 = XXH_vld1q_u64(xinput + (i * 16)); + uint64x2_t data_vec_2 = XXH_vld1q_u64(xinput + ((i+1) * 16)); + /* key_vec = xsecret[i]; */ + uint64x2_t key_vec_1 = XXH_vld1q_u64(xsecret + (i * 16)); + uint64x2_t key_vec_2 = XXH_vld1q_u64(xsecret + ((i+1) * 16)); + /* data_swap = swap(data_vec) */ + uint64x2_t data_swap_1 = vextq_u64(data_vec_1, data_vec_1, 1); + uint64x2_t data_swap_2 = vextq_u64(data_vec_2, data_vec_2, 1); + /* data_key = data_vec ^ key_vec; */ + uint64x2_t data_key_1 = veorq_u64(data_vec_1, key_vec_1); + uint64x2_t data_key_2 = veorq_u64(data_vec_2, key_vec_2); + + /* + * If we reinterpret the 64x2 vectors as 32x4 vectors, we can use a + * de-interleave operation for 4 lanes in 1 step with `vuzpq_u32` to + * get one vector with the low 32 bits of each lane, and one vector + * with the high 32 bits of each lane. + * + * The intrinsic returns a double vector because the original ARMv7-a + * instruction modified both arguments in place. AArch64 and SIMD128 emit + * two instructions from this intrinsic. + * + * [ dk11L | dk11H | dk12L | dk12H ] -> [ dk11L | dk12L | dk21L | dk22L ] + * [ dk21L | dk21H | dk22L | dk22H ] -> [ dk11H | dk12H | dk21H | dk22H ] + */ + uint32x4x2_t unzipped = vuzpq_u32( + vreinterpretq_u32_u64(data_key_1), + vreinterpretq_u32_u64(data_key_2) + ); + /* data_key_lo = data_key & 0xFFFFFFFF */ + uint32x4_t data_key_lo = unzipped.val[0]; + /* data_key_hi = data_key >> 32 */ + uint32x4_t data_key_hi = unzipped.val[1]; + /* + * Then, we can split the vectors horizontally and multiply which, as for most + * widening intrinsics, have a variant that works on both high half vectors + * for free on AArch64. A similar instruction is available on SIMD128. + * + * sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi + */ + uint64x2_t sum_1 = XXH_vmlal_low_u32(data_swap_1, data_key_lo, data_key_hi); + uint64x2_t sum_2 = XXH_vmlal_high_u32(data_swap_2, data_key_lo, data_key_hi); + /* + * Clang reorders + * a += b * c; // umlal swap.2d, dkl.2s, dkh.2s + * c += a; // add acc.2d, acc.2d, swap.2d + * to + * c += a; // add acc.2d, acc.2d, swap.2d + * c += b * c; // umlal acc.2d, dkl.2s, dkh.2s + * + * While it would make sense in theory since the addition is faster, + * for reasons likely related to umlal being limited to certain NEON + * pipelines, this is worse. A compiler guard fixes this. + */ + XXH_COMPILER_GUARD_CLANG_NEON(sum_1); + XXH_COMPILER_GUARD_CLANG_NEON(sum_2); + /* xacc[i] = acc_vec + sum; */ + xacc[i] = vaddq_u64(xacc[i], sum_1); + xacc[i+1] = vaddq_u64(xacc[i+1], sum_2); + } + /* Operate on the remaining NEON lanes 2 at a time. */ + for (; i < XXH3_NEON_LANES / 2; i++) { + /* data_vec = xinput[i]; */ + uint64x2_t data_vec = XXH_vld1q_u64(xinput + (i * 16)); + /* key_vec = xsecret[i]; */ + uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16)); + /* acc_vec_2 = swap(data_vec) */ + uint64x2_t data_swap = vextq_u64(data_vec, data_vec, 1); + /* data_key = data_vec ^ key_vec; */ + uint64x2_t data_key = veorq_u64(data_vec, key_vec); + /* For two lanes, just use VMOVN and VSHRN. */ + /* data_key_lo = data_key & 0xFFFFFFFF; */ + uint32x2_t data_key_lo = vmovn_u64(data_key); + /* data_key_hi = data_key >> 32; */ + uint32x2_t data_key_hi = vshrn_n_u64(data_key, 32); + /* sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi; */ + uint64x2_t sum = vmlal_u32(data_swap, data_key_lo, data_key_hi); + /* Same Clang workaround as before */ + XXH_COMPILER_GUARD_CLANG_NEON(sum); + /* xacc[i] = acc_vec + sum; */ + xacc[i] = vaddq_u64 (xacc[i], sum); + } + } +} +XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(neon) + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + + { xxh_aliasing_uint64x2_t* xacc = (xxh_aliasing_uint64x2_t*) acc; + uint8_t const* xsecret = (uint8_t const*) secret; + + size_t i; + /* WASM uses operator overloads and doesn't need these. */ +#ifndef __wasm_simd128__ + /* { prime32_1, prime32_1 } */ + uint32x2_t const kPrimeLo = vdup_n_u32(XXH_PRIME32_1); + /* { 0, prime32_1, 0, prime32_1 } */ + uint32x4_t const kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32)); +#endif + + /* AArch64 uses both scalar and neon at the same time */ + for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) { + XXH3_scalarScrambleRound(acc, secret, i); + } + for (i=0; i < XXH3_NEON_LANES / 2; i++) { + /* xacc[i] ^= (xacc[i] >> 47); */ + uint64x2_t acc_vec = xacc[i]; + uint64x2_t shifted = vshrq_n_u64(acc_vec, 47); + uint64x2_t data_vec = veorq_u64(acc_vec, shifted); + + /* xacc[i] ^= xsecret[i]; */ + uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16)); + uint64x2_t data_key = veorq_u64(data_vec, key_vec); + /* xacc[i] *= XXH_PRIME32_1 */ +#ifdef __wasm_simd128__ + /* SIMD128 has multiply by u64x2, use it instead of expanding and scalarizing */ + xacc[i] = data_key * XXH_PRIME32_1; +#else + /* + * Expanded version with portable NEON intrinsics + * + * lo(x) * lo(y) + (hi(x) * lo(y) << 32) + * + * prod_hi = hi(data_key) * lo(prime) << 32 + * + * Since we only need 32 bits of this multiply a trick can be used, reinterpreting the vector + * as a uint32x4_t and multiplying by { 0, prime, 0, prime } to cancel out the unwanted bits + * and avoid the shift. + */ + uint32x4_t prod_hi = vmulq_u32 (vreinterpretq_u32_u64(data_key), kPrimeHi); + /* Extract low bits for vmlal_u32 */ + uint32x2_t data_key_lo = vmovn_u64(data_key); + /* xacc[i] = prod_hi + lo(data_key) * XXH_PRIME32_1; */ + xacc[i] = vmlal_u32(vreinterpretq_u64_u32(prod_hi), data_key_lo, kPrimeLo); +#endif + } + } +} +#endif + +#if (XXH_VECTOR == XXH_VSX) + +XXH_FORCE_INLINE void +XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + /* presumed aligned */ + xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc; + xxh_u8 const* const xinput = (xxh_u8 const*) input; /* no alignment restriction */ + xxh_u8 const* const xsecret = (xxh_u8 const*) secret; /* no alignment restriction */ + xxh_u64x2 const v32 = { 32, 32 }; + size_t i; + for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { + /* data_vec = xinput[i]; */ + xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + 16*i); + /* key_vec = xsecret[i]; */ + xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i); + xxh_u64x2 const data_key = data_vec ^ key_vec; + /* shuffled = (data_key << 32) | (data_key >> 32); */ + xxh_u32x4 const shuffled = (xxh_u32x4)vec_rl(data_key, v32); + /* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */ + xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled); + /* acc_vec = xacc[i]; */ + xxh_u64x2 acc_vec = xacc[i]; + acc_vec += product; + + /* swap high and low halves */ +#ifdef __s390x__ + acc_vec += vec_permi(data_vec, data_vec, 2); +#else + acc_vec += vec_xxpermdi(data_vec, data_vec, 2); +#endif + xacc[i] = acc_vec; + } +} +XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(vsx) + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + + { xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc; + const xxh_u8* const xsecret = (const xxh_u8*) secret; + /* constants */ + xxh_u64x2 const v32 = { 32, 32 }; + xxh_u64x2 const v47 = { 47, 47 }; + xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 }; + size_t i; + for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { + /* xacc[i] ^= (xacc[i] >> 47); */ + xxh_u64x2 const acc_vec = xacc[i]; + xxh_u64x2 const data_vec = acc_vec ^ (acc_vec >> v47); + + /* xacc[i] ^= xsecret[i]; */ + xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i); + xxh_u64x2 const data_key = data_vec ^ key_vec; + + /* xacc[i] *= XXH_PRIME32_1 */ + /* prod_lo = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)prime & 0xFFFFFFFF); */ + xxh_u64x2 const prod_even = XXH_vec_mule((xxh_u32x4)data_key, prime); + /* prod_hi = ((xxh_u64x2)data_key >> 32) * ((xxh_u64x2)prime >> 32); */ + xxh_u64x2 const prod_odd = XXH_vec_mulo((xxh_u32x4)data_key, prime); + xacc[i] = prod_odd + (prod_even << v32); + } } +} + +#endif + +#if (XXH_VECTOR == XXH_SVE) + +XXH_FORCE_INLINE void +XXH3_accumulate_512_sve( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + uint64_t *xacc = (uint64_t *)acc; + const uint64_t *xinput = (const uint64_t *)(const void *)input; + const uint64_t *xsecret = (const uint64_t *)(const void *)secret; + svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1); + uint64_t element_count = svcntd(); + if (element_count >= 8) { + svbool_t mask = svptrue_pat_b64(SV_VL8); + svuint64_t vacc = svld1_u64(mask, xacc); + ACCRND(vacc, 0); + svst1_u64(mask, xacc, vacc); + } else if (element_count == 2) { /* sve128 */ + svbool_t mask = svptrue_pat_b64(SV_VL2); + svuint64_t acc0 = svld1_u64(mask, xacc + 0); + svuint64_t acc1 = svld1_u64(mask, xacc + 2); + svuint64_t acc2 = svld1_u64(mask, xacc + 4); + svuint64_t acc3 = svld1_u64(mask, xacc + 6); + ACCRND(acc0, 0); + ACCRND(acc1, 2); + ACCRND(acc2, 4); + ACCRND(acc3, 6); + svst1_u64(mask, xacc + 0, acc0); + svst1_u64(mask, xacc + 2, acc1); + svst1_u64(mask, xacc + 4, acc2); + svst1_u64(mask, xacc + 6, acc3); + } else { + svbool_t mask = svptrue_pat_b64(SV_VL4); + svuint64_t acc0 = svld1_u64(mask, xacc + 0); + svuint64_t acc1 = svld1_u64(mask, xacc + 4); + ACCRND(acc0, 0); + ACCRND(acc1, 4); + svst1_u64(mask, xacc + 0, acc0); + svst1_u64(mask, xacc + 4, acc1); + } +} + +XXH_FORCE_INLINE void +XXH3_accumulate_sve(xxh_u64* XXH_RESTRICT acc, + const xxh_u8* XXH_RESTRICT input, + const xxh_u8* XXH_RESTRICT secret, + size_t nbStripes) +{ + if (nbStripes != 0) { + uint64_t *xacc = (uint64_t *)acc; + const uint64_t *xinput = (const uint64_t *)(const void *)input; + const uint64_t *xsecret = (const uint64_t *)(const void *)secret; + svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1); + uint64_t element_count = svcntd(); + if (element_count >= 8) { + svbool_t mask = svptrue_pat_b64(SV_VL8); + svuint64_t vacc = svld1_u64(mask, xacc + 0); + do { + /* svprfd(svbool_t, void *, enum svfprop); */ + svprfd(mask, xinput + 128, SV_PLDL1STRM); + ACCRND(vacc, 0); + xinput += 8; + xsecret += 1; + nbStripes--; + } while (nbStripes != 0); + + svst1_u64(mask, xacc + 0, vacc); + } else if (element_count == 2) { /* sve128 */ + svbool_t mask = svptrue_pat_b64(SV_VL2); + svuint64_t acc0 = svld1_u64(mask, xacc + 0); + svuint64_t acc1 = svld1_u64(mask, xacc + 2); + svuint64_t acc2 = svld1_u64(mask, xacc + 4); + svuint64_t acc3 = svld1_u64(mask, xacc + 6); + do { + svprfd(mask, xinput + 128, SV_PLDL1STRM); + ACCRND(acc0, 0); + ACCRND(acc1, 2); + ACCRND(acc2, 4); + ACCRND(acc3, 6); + xinput += 8; + xsecret += 1; + nbStripes--; + } while (nbStripes != 0); + + svst1_u64(mask, xacc + 0, acc0); + svst1_u64(mask, xacc + 2, acc1); + svst1_u64(mask, xacc + 4, acc2); + svst1_u64(mask, xacc + 6, acc3); + } else { + svbool_t mask = svptrue_pat_b64(SV_VL4); + svuint64_t acc0 = svld1_u64(mask, xacc + 0); + svuint64_t acc1 = svld1_u64(mask, xacc + 4); + do { + svprfd(mask, xinput + 128, SV_PLDL1STRM); + ACCRND(acc0, 0); + ACCRND(acc1, 4); + xinput += 8; + xsecret += 1; + nbStripes--; + } while (nbStripes != 0); + + svst1_u64(mask, xacc + 0, acc0); + svst1_u64(mask, xacc + 4, acc1); + } + } +} + +#endif + +/* scalar variants - universal */ + +#if defined(__aarch64__) && (defined(__GNUC__) || defined(__clang__)) +/* + * In XXH3_scalarRound(), GCC and Clang have a similar codegen issue, where they + * emit an excess mask and a full 64-bit multiply-add (MADD X-form). + * + * While this might not seem like much, as AArch64 is a 64-bit architecture, only + * big Cortex designs have a full 64-bit multiplier. + * + * On the little cores, the smaller 32-bit multiplier is used, and full 64-bit + * multiplies expand to 2-3 multiplies in microcode. This has a major penalty + * of up to 4 latency cycles and 2 stall cycles in the multiply pipeline. + * + * Thankfully, AArch64 still provides the 32-bit long multiply-add (UMADDL) which does + * not have this penalty and does the mask automatically. + */ +XXH_FORCE_INLINE xxh_u64 +XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc) +{ + xxh_u64 ret; + /* note: %x = 64-bit register, %w = 32-bit register */ + __asm__("umaddl %x0, %w1, %w2, %x3" : "=r" (ret) : "r" (lhs), "r" (rhs), "r" (acc)); + return ret; +} +#else +XXH_FORCE_INLINE xxh_u64 +XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc) +{ + return XXH_mult32to64((xxh_u32)lhs, (xxh_u32)rhs) + acc; +} +#endif + +/*! + * @internal + * @brief Scalar round for @ref XXH3_accumulate_512_scalar(). + * + * This is extracted to its own function because the NEON path uses a combination + * of NEON and scalar. + */ +XXH_FORCE_INLINE void +XXH3_scalarRound(void* XXH_RESTRICT acc, + void const* XXH_RESTRICT input, + void const* XXH_RESTRICT secret, + size_t lane) +{ + xxh_u64* xacc = (xxh_u64*) acc; + xxh_u8 const* xinput = (xxh_u8 const*) input; + xxh_u8 const* xsecret = (xxh_u8 const*) secret; + XXH_ASSERT(lane < XXH_ACC_NB); + XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0); + { + xxh_u64 const data_val = XXH_readLE64(xinput + lane * 8); + xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + lane * 8); + xacc[lane ^ 1] += data_val; /* swap adjacent lanes */ + xacc[lane] = XXH_mult32to64_add64(data_key /* & 0xFFFFFFFF */, data_key >> 32, xacc[lane]); + } +} + +/*! + * @internal + * @brief Processes a 64 byte block of data using the scalar path. + */ +XXH_FORCE_INLINE void +XXH3_accumulate_512_scalar(void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + size_t i; + /* ARM GCC refuses to unroll this loop, resulting in a 24% slowdown on ARMv6. */ +#if defined(__GNUC__) && !defined(__clang__) \ + && (defined(__arm__) || defined(__thumb2__)) \ + && defined(__ARM_FEATURE_UNALIGNED) /* no unaligned access just wastes bytes */ \ + && XXH_SIZE_OPT <= 0 +# pragma GCC unroll 8 +#endif + for (i=0; i < XXH_ACC_NB; i++) { + XXH3_scalarRound(acc, input, secret, i); + } +} +XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(scalar) + +/*! + * @internal + * @brief Scalar scramble step for @ref XXH3_scrambleAcc_scalar(). + * + * This is extracted to its own function because the NEON path uses a combination + * of NEON and scalar. + */ +XXH_FORCE_INLINE void +XXH3_scalarScrambleRound(void* XXH_RESTRICT acc, + void const* XXH_RESTRICT secret, + size_t lane) +{ + xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */ + const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */ + XXH_ASSERT((((size_t)acc) & (XXH_ACC_ALIGN-1)) == 0); + XXH_ASSERT(lane < XXH_ACC_NB); + { + xxh_u64 const key64 = XXH_readLE64(xsecret + lane * 8); + xxh_u64 acc64 = xacc[lane]; + acc64 = XXH_xorshift64(acc64, 47); + acc64 ^= key64; + acc64 *= XXH_PRIME32_1; + xacc[lane] = acc64; + } +} + +/*! + * @internal + * @brief Scrambles the accumulators after a large chunk has been read + */ +XXH_FORCE_INLINE void +XXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + size_t i; + for (i=0; i < XXH_ACC_NB; i++) { + XXH3_scalarScrambleRound(acc, secret, i); + } +} + +XXH_FORCE_INLINE void +XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + /* + * We need a separate pointer for the hack below, + * which requires a non-const pointer. + * Any decent compiler will optimize this out otherwise. + */ + const xxh_u8* kSecretPtr = XXH3_kSecret; + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); + +#if defined(__GNUC__) && defined(__aarch64__) + /* + * UGLY HACK: + * GCC and Clang generate a bunch of MOV/MOVK pairs for aarch64, and they are + * placed sequentially, in order, at the top of the unrolled loop. + * + * While MOVK is great for generating constants (2 cycles for a 64-bit + * constant compared to 4 cycles for LDR), it fights for bandwidth with + * the arithmetic instructions. + * + * I L S + * MOVK + * MOVK + * MOVK + * MOVK + * ADD + * SUB STR + * STR + * By forcing loads from memory (as the asm line causes the compiler to assume + * that XXH3_kSecretPtr has been changed), the pipelines are used more + * efficiently: + * I L S + * LDR + * ADD LDR + * SUB STR + * STR + * + * See XXH3_NEON_LANES for details on the pipsline. + * + * XXH3_64bits_withSeed, len == 256, Snapdragon 835 + * without hack: 2654.4 MB/s + * with hack: 3202.9 MB/s + */ + XXH_COMPILER_GUARD(kSecretPtr); +#endif + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / 16; + int i; + for (i=0; i < nbRounds; i++) { + /* + * The asm hack causes the compiler to assume that kSecretPtr aliases with + * customSecret, and on aarch64, this prevented LDP from merging two + * loads together for free. Putting the loads together before the stores + * properly generates LDP. + */ + xxh_u64 lo = XXH_readLE64(kSecretPtr + 16*i) + seed64; + xxh_u64 hi = XXH_readLE64(kSecretPtr + 16*i + 8) - seed64; + XXH_writeLE64((xxh_u8*)customSecret + 16*i, lo); + XXH_writeLE64((xxh_u8*)customSecret + 16*i + 8, hi); + } } +} + + +typedef void (*XXH3_f_accumulate)(xxh_u64* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, size_t); +typedef void (*XXH3_f_scrambleAcc)(void* XXH_RESTRICT, const void*); +typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64); + + +#if (XXH_VECTOR == XXH_AVX512) + +#define XXH3_accumulate_512 XXH3_accumulate_512_avx512 +#define XXH3_accumulate XXH3_accumulate_avx512 +#define XXH3_scrambleAcc XXH3_scrambleAcc_avx512 +#define XXH3_initCustomSecret XXH3_initCustomSecret_avx512 + +#elif (XXH_VECTOR == XXH_AVX2) + +#define XXH3_accumulate_512 XXH3_accumulate_512_avx2 +#define XXH3_accumulate XXH3_accumulate_avx2 +#define XXH3_scrambleAcc XXH3_scrambleAcc_avx2 +#define XXH3_initCustomSecret XXH3_initCustomSecret_avx2 + +#elif (XXH_VECTOR == XXH_SSE2) + +#define XXH3_accumulate_512 XXH3_accumulate_512_sse2 +#define XXH3_accumulate XXH3_accumulate_sse2 +#define XXH3_scrambleAcc XXH3_scrambleAcc_sse2 +#define XXH3_initCustomSecret XXH3_initCustomSecret_sse2 + +#elif (XXH_VECTOR == XXH_NEON) + +#define XXH3_accumulate_512 XXH3_accumulate_512_neon +#define XXH3_accumulate XXH3_accumulate_neon +#define XXH3_scrambleAcc XXH3_scrambleAcc_neon +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#elif (XXH_VECTOR == XXH_VSX) + +#define XXH3_accumulate_512 XXH3_accumulate_512_vsx +#define XXH3_accumulate XXH3_accumulate_vsx +#define XXH3_scrambleAcc XXH3_scrambleAcc_vsx +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#elif (XXH_VECTOR == XXH_SVE) +#define XXH3_accumulate_512 XXH3_accumulate_512_sve +#define XXH3_accumulate XXH3_accumulate_sve +#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#else /* scalar */ + +#define XXH3_accumulate_512 XXH3_accumulate_512_scalar +#define XXH3_accumulate XXH3_accumulate_scalar +#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#endif + +#if XXH_SIZE_OPT >= 1 /* don't do SIMD for initialization */ +# undef XXH3_initCustomSecret +# define XXH3_initCustomSecret XXH3_initCustomSecret_scalar +#endif + +XXH_FORCE_INLINE void +XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc, + const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate f_acc, + XXH3_f_scrambleAcc f_scramble) +{ + size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE; + size_t const block_len = XXH_STRIPE_LEN * nbStripesPerBlock; + size_t const nb_blocks = (len - 1) / block_len; + + size_t n; + + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); + + for (n = 0; n < nb_blocks; n++) { + f_acc(acc, input + n*block_len, secret, nbStripesPerBlock); + f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); + } + + /* last partial block */ + XXH_ASSERT(len > XXH_STRIPE_LEN); + { size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN; + XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE)); + f_acc(acc, input + nb_blocks*block_len, secret, nbStripes); + + /* last stripe */ + { const xxh_u8* const p = input + len - XXH_STRIPE_LEN; +#define XXH_SECRET_LASTACC_START 7 /* not aligned on 8, last secret is different from acc & scrambler */ + XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START); + } } +} + +XXH_FORCE_INLINE xxh_u64 +XXH3_mix2Accs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret) +{ + return XXH3_mul128_fold64( + acc[0] ^ XXH_readLE64(secret), + acc[1] ^ XXH_readLE64(secret+8) ); +} + +static XXH64_hash_t +XXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 start) +{ + xxh_u64 result64 = start; + size_t i = 0; + + for (i = 0; i < 4; i++) { + result64 += XXH3_mix2Accs(acc+2*i, secret + 16*i); +#if defined(__clang__) /* Clang */ \ + && (defined(__arm__) || defined(__thumb__)) /* ARMv7 */ \ + && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ + /* + * UGLY HACK: + * Prevent autovectorization on Clang ARMv7-a. Exact same problem as + * the one in XXH3_len_129to240_64b. Speeds up shorter keys > 240b. + * XXH3_64bits, len == 256, Snapdragon 835: + * without hack: 2063.7 MB/s + * with hack: 2560.7 MB/s + */ + XXH_COMPILER_GUARD(result64); +#endif + } + + return XXH3_avalanche(result64); +} + +#define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \ + XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 } + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len, + const void* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate f_acc, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; + + XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc, f_scramble); + + /* converge into final hash */ + XXH_STATIC_ASSERT(sizeof(acc) == 64); + /* do not align on 8, so that the secret is different from the accumulator */ +#define XXH_SECRET_MERGEACCS_START 11 + XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + return XXH3_mergeAccs(acc, (const xxh_u8*)secret + XXH_SECRET_MERGEACCS_START, (xxh_u64)len * XXH_PRIME64_1); +} + +/* + * It's important for performance to transmit secret's size (when it's static) + * so that the compiler can properly optimize the vectorized loop. + * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set. + * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE + * breaks -Og, this is XXH_NO_INLINE. + */ +XXH3_WITH_SECRET_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; + return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate, XXH3_scrambleAcc); +} + +/* + * It's preferable for performance that XXH3_hashLong is not inlined, + * as it results in a smaller function for small data, easier to the instruction cache. + * Note that inside this no_inline function, we do inline the internal loop, + * and provide a statically defined secret size to allow optimization of vector loop. + */ +XXH_NO_INLINE XXH_PUREF XXH64_hash_t +XXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc); +} + +/* + * XXH3_hashLong_64b_withSeed(): + * Generate a custom key based on alteration of default XXH3_kSecret with the seed, + * and then use this key for long mode hashing. + * + * This operation is decently fast but nonetheless costs a little bit of time. + * Try to avoid it whenever possible (typically when seed==0). + * + * It's important for performance that XXH3_hashLong is not inlined. Not sure + * why (uop cache maybe?), but the difference is large and easily measurable. + */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSeed_internal(const void* input, size_t len, + XXH64_hash_t seed, + XXH3_f_accumulate f_acc, + XXH3_f_scrambleAcc f_scramble, + XXH3_f_initCustomSecret f_initSec) +{ +#if XXH_SIZE_OPT <= 0 + if (seed == 0) + return XXH3_hashLong_64b_internal(input, len, + XXH3_kSecret, sizeof(XXH3_kSecret), + f_acc, f_scramble); +#endif + { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; + f_initSec(secret, seed); + return XXH3_hashLong_64b_internal(input, len, secret, sizeof(secret), + f_acc, f_scramble); + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSeed(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + return XXH3_hashLong_64b_withSeed_internal(input, len, seed, + XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret); +} + + +typedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t, + XXH64_hash_t, const xxh_u8* XXH_RESTRICT, size_t); + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_64bits_internal(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, + XXH3_hashLong64_f f_hashLong) +{ + XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); + /* + * If an action is to be taken if `secretLen` condition is not respected, + * it should be done here. + * For now, it's a contract pre-condition. + * Adding a check and a branch here would cost performance at every hash. + * Also, note that function signature doesn't offer room to return an error. + */ + if (len <= 16) + return XXH3_len_0to16_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); + if (len <= 128) + return XXH3_len_17to128_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_len_129to240_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + return f_hashLong(input, len, seed64, (const xxh_u8*)secret, secretLen); +} + + +/* === Public entry point === */ + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length) +{ + return XXH3_64bits_internal(input, length, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSecret(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize) +{ + return XXH3_64bits_internal(input, length, 0, secret, secretSize, XXH3_hashLong_64b_withSecret); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed) +{ + return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed); +} + +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed) +{ + if (length <= XXH3_MIDSIZE_MAX) + return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL); + return XXH3_hashLong_64b_withSecret(input, length, seed, (const xxh_u8*)secret, secretSize); +} + + +/* === XXH3 streaming === */ +#ifndef XXH_NO_STREAM +/* + * Malloc's a pointer that is always aligned to align. + * + * This must be freed with `XXH_alignedFree()`. + * + * malloc typically guarantees 16 byte alignment on 64-bit systems and 8 byte + * alignment on 32-bit. This isn't enough for the 32 byte aligned loads in AVX2 + * or on 32-bit, the 16 byte aligned loads in SSE2 and NEON. + * + * This underalignment previously caused a rather obvious crash which went + * completely unnoticed due to XXH3_createState() not actually being tested. + * Credit to RedSpah for noticing this bug. + * + * The alignment is done manually: Functions like posix_memalign or _mm_malloc + * are avoided: To maintain portability, we would have to write a fallback + * like this anyways, and besides, testing for the existence of library + * functions without relying on external build tools is impossible. + * + * The method is simple: Overallocate, manually align, and store the offset + * to the original behind the returned pointer. + * + * Align must be a power of 2 and 8 <= align <= 128. + */ +static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align) +{ + XXH_ASSERT(align <= 128 && align >= 8); /* range check */ + XXH_ASSERT((align & (align-1)) == 0); /* power of 2 */ + XXH_ASSERT(s != 0 && s < (s + align)); /* empty/overflow */ + { /* Overallocate to make room for manual realignment and an offset byte */ + xxh_u8* base = (xxh_u8*)XXH_malloc(s + align); + if (base != NULL) { + /* + * Get the offset needed to align this pointer. + * + * Even if the returned pointer is aligned, there will always be + * at least one byte to store the offset to the original pointer. + */ + size_t offset = align - ((size_t)base & (align - 1)); /* base % align */ + /* Add the offset for the now-aligned pointer */ + xxh_u8* ptr = base + offset; + + XXH_ASSERT((size_t)ptr % align == 0); + + /* Store the offset immediately before the returned pointer. */ + ptr[-1] = (xxh_u8)offset; + return ptr; + } + return NULL; + } +} +/* + * Frees an aligned pointer allocated by XXH_alignedMalloc(). Don't pass + * normal malloc'd pointers, XXH_alignedMalloc has a specific data layout. + */ +static void XXH_alignedFree(void* p) +{ + if (p != NULL) { + xxh_u8* ptr = (xxh_u8*)p; + /* Get the offset byte we added in XXH_malloc. */ + xxh_u8 offset = ptr[-1]; + /* Free the original malloc'd pointer */ + xxh_u8* base = ptr - offset; + XXH_free(base); + } +} +/*! @ingroup XXH3_family */ +/*! + * @brief Allocate an @ref XXH3_state_t. + * + * @return An allocated pointer of @ref XXH3_state_t on success. + * @return `NULL` on failure. + * + * @note Must be freed with XXH3_freeState(). + */ +XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void) +{ + XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64); + if (state==NULL) return NULL; + XXH3_INITSTATE(state); + return state; +} + +/*! @ingroup XXH3_family */ +/*! + * @brief Frees an @ref XXH3_state_t. + * + * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState(). + * + * @return @ref XXH_OK. + * + * @note Must be allocated with XXH3_createState(). + */ +XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr) +{ + XXH_alignedFree(statePtr); + return XXH_OK; +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API void +XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state) +{ + XXH_memcpy(dst_state, src_state, sizeof(*dst_state)); +} + +static void +XXH3_reset_internal(XXH3_state_t* statePtr, + XXH64_hash_t seed, + const void* secret, size_t secretSize) +{ + size_t const initStart = offsetof(XXH3_state_t, bufferedSize); + size_t const initLength = offsetof(XXH3_state_t, nbStripesPerBlock) - initStart; + XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart); + XXH_ASSERT(statePtr != NULL); + /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */ + memset((char*)statePtr + initStart, 0, initLength); + statePtr->acc[0] = XXH_PRIME32_3; + statePtr->acc[1] = XXH_PRIME64_1; + statePtr->acc[2] = XXH_PRIME64_2; + statePtr->acc[3] = XXH_PRIME64_3; + statePtr->acc[4] = XXH_PRIME64_4; + statePtr->acc[5] = XXH_PRIME32_2; + statePtr->acc[6] = XXH_PRIME64_5; + statePtr->acc[7] = XXH_PRIME32_1; + statePtr->seed = seed; + statePtr->useSeed = (seed != 0); + statePtr->extSecret = (const unsigned char*)secret; + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); + statePtr->secretLimit = secretSize - XXH_STRIPE_LEN; + statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE; +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_reset_internal(statePtr, 0, secret, secretSize); + if (secret == NULL) return XXH_ERROR; + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; + return XXH_OK; +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed) +{ + if (statePtr == NULL) return XXH_ERROR; + if (seed==0) return XXH3_64bits_reset(statePtr); + if ((seed != statePtr->seed) || (statePtr->extSecret != NULL)) + XXH3_initCustomSecret(statePtr->customSecret, seed); + XXH3_reset_internal(statePtr, seed, NULL, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed64) +{ + if (statePtr == NULL) return XXH_ERROR; + if (secret == NULL) return XXH_ERROR; + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; + XXH3_reset_internal(statePtr, seed64, secret, secretSize); + statePtr->useSeed = 1; /* always, even if seed64==0 */ + return XXH_OK; +} + +/*! + * @internal + * @brief Processes a large input for XXH3_update() and XXH3_digest_long(). + * + * Unlike XXH3_hashLong_internal_loop(), this can process data that overlaps a block. + * + * @param acc Pointer to the 8 accumulator lanes + * @param nbStripesSoFarPtr In/out pointer to the number of leftover stripes in the block* + * @param nbStripesPerBlock Number of stripes in a block + * @param input Input pointer + * @param nbStripes Number of stripes to process + * @param secret Secret pointer + * @param secretLimit Offset of the last block in @p secret + * @param f_acc Pointer to an XXH3_accumulate implementation + * @param f_scramble Pointer to an XXH3_scrambleAcc implementation + * @return Pointer past the end of @p input after processing + */ +XXH_FORCE_INLINE const xxh_u8 * +XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc, + size_t* XXH_RESTRICT nbStripesSoFarPtr, size_t nbStripesPerBlock, + const xxh_u8* XXH_RESTRICT input, size_t nbStripes, + const xxh_u8* XXH_RESTRICT secret, size_t secretLimit, + XXH3_f_accumulate f_acc, + XXH3_f_scrambleAcc f_scramble) +{ + const xxh_u8* initialSecret = secret + *nbStripesSoFarPtr * XXH_SECRET_CONSUME_RATE; + /* Process full blocks */ + if (nbStripes >= (nbStripesPerBlock - *nbStripesSoFarPtr)) { + /* Process the initial partial block... */ + size_t nbStripesThisIter = nbStripesPerBlock - *nbStripesSoFarPtr; + + do { + /* Accumulate and scramble */ + f_acc(acc, input, initialSecret, nbStripesThisIter); + f_scramble(acc, secret + secretLimit); + input += nbStripesThisIter * XXH_STRIPE_LEN; + nbStripes -= nbStripesThisIter; + /* Then continue the loop with the full block size */ + nbStripesThisIter = nbStripesPerBlock; + initialSecret = secret; + } while (nbStripes >= nbStripesPerBlock); + *nbStripesSoFarPtr = 0; + } + /* Process a partial block */ + if (nbStripes > 0) { + f_acc(acc, input, initialSecret, nbStripes); + input += nbStripes * XXH_STRIPE_LEN; + *nbStripesSoFarPtr += nbStripes; + } + /* Return end pointer */ + return input; +} + +#ifndef XXH3_STREAM_USE_STACK +# if XXH_SIZE_OPT <= 0 && !defined(__clang__) /* clang doesn't need additional stack space */ +# define XXH3_STREAM_USE_STACK 1 +# endif +#endif +/* + * Both XXH3_64bits_update and XXH3_128bits_update use this routine. + */ +XXH_FORCE_INLINE XXH_errorcode +XXH3_update(XXH3_state_t* XXH_RESTRICT const state, + const xxh_u8* XXH_RESTRICT input, size_t len, + XXH3_f_accumulate f_acc, + XXH3_f_scrambleAcc f_scramble) +{ + if (input==NULL) { + XXH_ASSERT(len == 0); + return XXH_OK; + } + + XXH_ASSERT(state != NULL); + { const xxh_u8* const bEnd = input + len; + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; +#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1 + /* For some reason, gcc and MSVC seem to suffer greatly + * when operating accumulators directly into state. + * Operating into stack space seems to enable proper optimization. + * clang, on the other hand, doesn't seem to need this trick */ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8]; + XXH_memcpy(acc, state->acc, sizeof(acc)); +#else + xxh_u64* XXH_RESTRICT const acc = state->acc; +#endif + state->totalLen += len; + XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE); + + /* small input : just fill in tmp buffer */ + if (len <= XXH3_INTERNALBUFFER_SIZE - state->bufferedSize) { + XXH_memcpy(state->buffer + state->bufferedSize, input, len); + state->bufferedSize += (XXH32_hash_t)len; + return XXH_OK; + } + + /* total input is now > XXH3_INTERNALBUFFER_SIZE */ + #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN) + XXH_STATIC_ASSERT(XXH3_INTERNALBUFFER_SIZE % XXH_STRIPE_LEN == 0); /* clean multiple */ + + /* + * Internal buffer is partially filled (always, except at beginning) + * Complete it, then consume it. + */ + if (state->bufferedSize) { + size_t const loadSize = XXH3_INTERNALBUFFER_SIZE - state->bufferedSize; + XXH_memcpy(state->buffer + state->bufferedSize, input, loadSize); + input += loadSize; + XXH3_consumeStripes(acc, + &state->nbStripesSoFar, state->nbStripesPerBlock, + state->buffer, XXH3_INTERNALBUFFER_STRIPES, + secret, state->secretLimit, + f_acc, f_scramble); + state->bufferedSize = 0; + } + XXH_ASSERT(input < bEnd); + if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) { + size_t nbStripes = (size_t)(bEnd - 1 - input) / XXH_STRIPE_LEN; + input = XXH3_consumeStripes(acc, + &state->nbStripesSoFar, state->nbStripesPerBlock, + input, nbStripes, + secret, state->secretLimit, + f_acc, f_scramble); + XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN); + + } + /* Some remaining input (always) : buffer it */ + XXH_ASSERT(input < bEnd); + XXH_ASSERT(bEnd - input <= XXH3_INTERNALBUFFER_SIZE); + XXH_ASSERT(state->bufferedSize == 0); + XXH_memcpy(state->buffer, input, (size_t)(bEnd-input)); + state->bufferedSize = (XXH32_hash_t)(bEnd-input); +#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1 + /* save stack accumulators into state */ + XXH_memcpy(state->acc, acc, sizeof(acc)); +#endif + } + + return XXH_OK; +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len) +{ + return XXH3_update(state, (const xxh_u8*)input, len, + XXH3_accumulate, XXH3_scrambleAcc); +} + + +XXH_FORCE_INLINE void +XXH3_digest_long (XXH64_hash_t* acc, + const XXH3_state_t* state, + const unsigned char* secret) +{ + xxh_u8 lastStripe[XXH_STRIPE_LEN]; + const xxh_u8* lastStripePtr; + + /* + * Digest on a local copy. This way, the state remains unaltered, and it can + * continue ingesting more input afterwards. + */ + XXH_memcpy(acc, state->acc, sizeof(state->acc)); + if (state->bufferedSize >= XXH_STRIPE_LEN) { + /* Consume remaining stripes then point to remaining data in buffer */ + size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN; + size_t nbStripesSoFar = state->nbStripesSoFar; + XXH3_consumeStripes(acc, + &nbStripesSoFar, state->nbStripesPerBlock, + state->buffer, nbStripes, + secret, state->secretLimit, + XXH3_accumulate, XXH3_scrambleAcc); + lastStripePtr = state->buffer + state->bufferedSize - XXH_STRIPE_LEN; + } else { /* bufferedSize < XXH_STRIPE_LEN */ + /* Copy to temp buffer */ + size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize; + XXH_ASSERT(state->bufferedSize > 0); /* there is always some input buffered */ + XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize); + XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize); + lastStripePtr = lastStripe; + } + /* Last stripe */ + XXH3_accumulate_512(acc, + lastStripePtr, + secret + state->secretLimit - XXH_SECRET_LASTACC_START); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* state) +{ + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + if (state->totalLen > XXH3_MIDSIZE_MAX) { + XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; + XXH3_digest_long(acc, state, secret); + return XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)state->totalLen * XXH_PRIME64_1); + } + /* totalLen <= XXH3_MIDSIZE_MAX: digesting a short input */ + if (state->useSeed) + return XXH3_64bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); + return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen), + secret, state->secretLimit + XXH_STRIPE_LEN); +} +#endif /* !XXH_NO_STREAM */ + + +/* ========================================== + * XXH3 128 bits (a.k.a XXH128) + * ========================================== + * XXH3's 128-bit variant has better mixing and strength than the 64-bit variant, + * even without counting the significantly larger output size. + * + * For example, extra steps are taken to avoid the seed-dependent collisions + * in 17-240 byte inputs (See XXH3_mix16B and XXH128_mix32B). + * + * This strength naturally comes at the cost of some speed, especially on short + * lengths. Note that longer hashes are about as fast as the 64-bit version + * due to it using only a slight modification of the 64-bit loop. + * + * XXH128 is also more oriented towards 64-bit machines. It is still extremely + * fast for a _128-bit_ hash on 32-bit (it usually clears XXH64). + */ + +XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t +XXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + /* A doubled version of 1to3_64b with different constants. */ + XXH_ASSERT(input != NULL); + XXH_ASSERT(1 <= len && len <= 3); + XXH_ASSERT(secret != NULL); + /* + * len = 1: combinedl = { input[0], 0x01, input[0], input[0] } + * len = 2: combinedl = { input[1], 0x02, input[0], input[1] } + * len = 3: combinedl = { input[2], 0x03, input[0], input[1] } + */ + { xxh_u8 const c1 = input[0]; + xxh_u8 const c2 = input[len >> 1]; + xxh_u8 const c3 = input[len - 1]; + xxh_u32 const combinedl = ((xxh_u32)c1 <<16) | ((xxh_u32)c2 << 24) + | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); + xxh_u32 const combinedh = XXH_rotl32(XXH_swap32(combinedl), 13); + xxh_u64 const bitflipl = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; + xxh_u64 const bitfliph = (XXH_readLE32(secret+8) ^ XXH_readLE32(secret+12)) - seed; + xxh_u64 const keyed_lo = (xxh_u64)combinedl ^ bitflipl; + xxh_u64 const keyed_hi = (xxh_u64)combinedh ^ bitfliph; + XXH128_hash_t h128; + h128.low64 = XXH64_avalanche(keyed_lo); + h128.high64 = XXH64_avalanche(keyed_hi); + return h128; + } +} + +XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t +XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(4 <= len && len <= 8); + seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; + { xxh_u32 const input_lo = XXH_readLE32(input); + xxh_u32 const input_hi = XXH_readLE32(input + len - 4); + xxh_u64 const input_64 = input_lo + ((xxh_u64)input_hi << 32); + xxh_u64 const bitflip = (XXH_readLE64(secret+16) ^ XXH_readLE64(secret+24)) + seed; + xxh_u64 const keyed = input_64 ^ bitflip; + + /* Shift len to the left to ensure it is even, this avoids even multiplies. */ + XXH128_hash_t m128 = XXH_mult64to128(keyed, XXH_PRIME64_1 + (len << 2)); + + m128.high64 += (m128.low64 << 1); + m128.low64 ^= (m128.high64 >> 3); + + m128.low64 = XXH_xorshift64(m128.low64, 35); + m128.low64 *= PRIME_MX2; + m128.low64 = XXH_xorshift64(m128.low64, 28); + m128.high64 = XXH3_avalanche(m128.high64); + return m128; + } +} + +XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t +XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(9 <= len && len <= 16); + { xxh_u64 const bitflipl = (XXH_readLE64(secret+32) ^ XXH_readLE64(secret+40)) - seed; + xxh_u64 const bitfliph = (XXH_readLE64(secret+48) ^ XXH_readLE64(secret+56)) + seed; + xxh_u64 const input_lo = XXH_readLE64(input); + xxh_u64 input_hi = XXH_readLE64(input + len - 8); + XXH128_hash_t m128 = XXH_mult64to128(input_lo ^ input_hi ^ bitflipl, XXH_PRIME64_1); + /* + * Put len in the middle of m128 to ensure that the length gets mixed to + * both the low and high bits in the 128x64 multiply below. + */ + m128.low64 += (xxh_u64)(len - 1) << 54; + input_hi ^= bitfliph; + /* + * Add the high 32 bits of input_hi to the high 32 bits of m128, then + * add the long product of the low 32 bits of input_hi and XXH_PRIME32_2 to + * the high 64 bits of m128. + * + * The best approach to this operation is different on 32-bit and 64-bit. + */ + if (sizeof(void *) < sizeof(xxh_u64)) { /* 32-bit */ + /* + * 32-bit optimized version, which is more readable. + * + * On 32-bit, it removes an ADC and delays a dependency between the two + * halves of m128.high64, but it generates an extra mask on 64-bit. + */ + m128.high64 += (input_hi & 0xFFFFFFFF00000000ULL) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2); + } else { + /* + * 64-bit optimized (albeit more confusing) version. + * + * Uses some properties of addition and multiplication to remove the mask: + * + * Let: + * a = input_hi.lo = (input_hi & 0x00000000FFFFFFFF) + * b = input_hi.hi = (input_hi & 0xFFFFFFFF00000000) + * c = XXH_PRIME32_2 + * + * a + (b * c) + * Inverse Property: x + y - x == y + * a + (b * (1 + c - 1)) + * Distributive Property: x * (y + z) == (x * y) + (x * z) + * a + (b * 1) + (b * (c - 1)) + * Identity Property: x * 1 == x + * a + b + (b * (c - 1)) + * + * Substitute a, b, and c: + * input_hi.hi + input_hi.lo + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) + * + * Since input_hi.hi + input_hi.lo == input_hi, we get this: + * input_hi + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) + */ + m128.high64 += input_hi + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2 - 1); + } + /* m128 ^= XXH_swap64(m128 >> 64); */ + m128.low64 ^= XXH_swap64(m128.high64); + + { /* 128x64 multiply: h128 = m128 * XXH_PRIME64_2; */ + XXH128_hash_t h128 = XXH_mult64to128(m128.low64, XXH_PRIME64_2); + h128.high64 += m128.high64 * XXH_PRIME64_2; + + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = XXH3_avalanche(h128.high64); + return h128; + } } +} + +/* + * Assumption: `secret` size is >= XXH3_SECRET_SIZE_MIN + */ +XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t +XXH3_len_0to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(len <= 16); + { if (len > 8) return XXH3_len_9to16_128b(input, len, secret, seed); + if (len >= 4) return XXH3_len_4to8_128b(input, len, secret, seed); + if (len) return XXH3_len_1to3_128b(input, len, secret, seed); + { XXH128_hash_t h128; + xxh_u64 const bitflipl = XXH_readLE64(secret+64) ^ XXH_readLE64(secret+72); + xxh_u64 const bitfliph = XXH_readLE64(secret+80) ^ XXH_readLE64(secret+88); + h128.low64 = XXH64_avalanche(seed ^ bitflipl); + h128.high64 = XXH64_avalanche( seed ^ bitfliph); + return h128; + } } +} + +/* + * A bit slower than XXH3_mix16B, but handles multiply by zero better. + */ +XXH_FORCE_INLINE XXH128_hash_t +XXH128_mix32B(XXH128_hash_t acc, const xxh_u8* input_1, const xxh_u8* input_2, + const xxh_u8* secret, XXH64_hash_t seed) +{ + acc.low64 += XXH3_mix16B (input_1, secret+0, seed); + acc.low64 ^= XXH_readLE64(input_2) + XXH_readLE64(input_2 + 8); + acc.high64 += XXH3_mix16B (input_2, secret+16, seed); + acc.high64 ^= XXH_readLE64(input_1) + XXH_readLE64(input_1 + 8); + return acc; +} + + +XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t +XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(16 < len && len <= 128); + + { XXH128_hash_t acc; + acc.low64 = len * XXH_PRIME64_1; + acc.high64 = 0; + +#if XXH_SIZE_OPT >= 1 + { + /* Smaller, but slightly slower. */ + unsigned int i = (unsigned int)(len - 1) / 32; + do { + acc = XXH128_mix32B(acc, input+16*i, input+len-16*(i+1), secret+32*i, seed); + } while (i-- != 0); + } +#else + if (len > 32) { + if (len > 64) { + if (len > 96) { + acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed); + } + acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed); + } + acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed); + } + acc = XXH128_mix32B(acc, input, input+len-16, secret, seed); +#endif + { XXH128_hash_t h128; + h128.low64 = acc.low64 + acc.high64; + h128.high64 = (acc.low64 * XXH_PRIME64_1) + + (acc.high64 * XXH_PRIME64_4) + + ((len - seed) * XXH_PRIME64_2); + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); + return h128; + } + } +} + +XXH_NO_INLINE XXH_PUREF XXH128_hash_t +XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); + + { XXH128_hash_t acc; + unsigned i; + acc.low64 = len * XXH_PRIME64_1; + acc.high64 = 0; + /* + * We set as `i` as offset + 32. We do this so that unchanged + * `len` can be used as upper bound. This reaches a sweet spot + * where both x86 and aarch64 get simple agen and good codegen + * for the loop. + */ + for (i = 32; i < 160; i += 32) { + acc = XXH128_mix32B(acc, + input + i - 32, + input + i - 16, + secret + i - 32, + seed); + } + acc.low64 = XXH3_avalanche(acc.low64); + acc.high64 = XXH3_avalanche(acc.high64); + /* + * NB: `i <= len` will duplicate the last 32-bytes if + * len % 32 was zero. This is an unfortunate necessity to keep + * the hash result stable. + */ + for (i=160; i <= len; i += 32) { + acc = XXH128_mix32B(acc, + input + i - 32, + input + i - 16, + secret + XXH3_MIDSIZE_STARTOFFSET + i - 160, + seed); + } + /* last bytes */ + acc = XXH128_mix32B(acc, + input + len - 16, + input + len - 32, + secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16, + (XXH64_hash_t)0 - seed); + + { XXH128_hash_t h128; + h128.low64 = acc.low64 + acc.high64; + h128.high64 = (acc.low64 * XXH_PRIME64_1) + + (acc.high64 * XXH_PRIME64_4) + + ((len - seed) * XXH_PRIME64_2); + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); + return h128; + } + } +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate f_acc, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; + + XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc, f_scramble); + + /* converge into final hash */ + XXH_STATIC_ASSERT(sizeof(acc) == 64); + XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + { XXH128_hash_t h128; + h128.low64 = XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)len * XXH_PRIME64_1); + h128.high64 = XXH3_mergeAccs(acc, + secret + secretSize + - sizeof(acc) - XXH_SECRET_MERGEACCS_START, + ~((xxh_u64)len * XXH_PRIME64_2)); + return h128; + } +} + +/* + * It's important for performance that XXH3_hashLong() is not inlined. + */ +XXH_NO_INLINE XXH_PUREF XXH128_hash_t +XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + return XXH3_hashLong_128b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_accumulate, XXH3_scrambleAcc); +} + +/* + * It's important for performance to pass @p secretLen (when it's static) + * to the compiler, so that it can properly optimize the vectorized loop. + * + * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE + * breaks -Og, this is XXH_NO_INLINE. + */ +XXH3_WITH_SECRET_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; + return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, secretLen, + XXH3_accumulate, XXH3_scrambleAcc); +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSeed_internal(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + XXH3_f_accumulate f_acc, + XXH3_f_scrambleAcc f_scramble, + XXH3_f_initCustomSecret f_initSec) +{ + if (seed64 == 0) + return XXH3_hashLong_128b_internal(input, len, + XXH3_kSecret, sizeof(XXH3_kSecret), + f_acc, f_scramble); + { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; + f_initSec(secret, seed64); + return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, sizeof(secret), + f_acc, f_scramble); + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSeed(const void* input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + return XXH3_hashLong_128b_withSeed_internal(input, len, seed64, + XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret); +} + +typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, size_t, + XXH64_hash_t, const void* XXH_RESTRICT, size_t); + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_128bits_internal(const void* input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, + XXH3_hashLong128_f f_hl128) +{ + XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); + /* + * If an action is to be taken if `secret` conditions are not respected, + * it should be done here. + * For now, it's a contract pre-condition. + * Adding a check and a branch here would cost performance at every hash. + */ + if (len <= 16) + return XXH3_len_0to16_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); + if (len <= 128) + return XXH3_len_17to128_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_len_129to240_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + return f_hl128(input, len, seed64, secret, secretLen); +} + + +/* === Public XXH128 API === */ + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* input, size_t len) +{ + return XXH3_128bits_internal(input, len, 0, + XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_hashLong_128b_default); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSecret(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize) +{ + return XXH3_128bits_internal(input, len, 0, + (const xxh_u8*)secret, secretSize, + XXH3_hashLong_128b_withSecret); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSeed(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_128bits_internal(input, len, seed, + XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_hashLong_128b_withSeed); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed) +{ + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL); + return XXH3_hashLong_128b_withSecret(input, len, seed, secret, secretSize); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH128(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_128bits_withSeed(input, len, seed); +} + + +/* === XXH3 128-bit streaming === */ +#ifndef XXH_NO_STREAM +/* + * All initialization and update functions are identical to 64-bit streaming variant. + * The only difference is the finalization routine. + */ + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr) +{ + return XXH3_64bits_reset(statePtr); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize) +{ + return XXH3_64bits_reset_withSecret(statePtr, secret, secretSize); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed) +{ + return XXH3_64bits_reset_withSeed(statePtr, seed); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed) +{ + return XXH3_64bits_reset_withSecretandSeed(statePtr, secret, secretSize, seed); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len) +{ + return XXH3_64bits_update(state, input, len); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* state) +{ + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + if (state->totalLen > XXH3_MIDSIZE_MAX) { + XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; + XXH3_digest_long(acc, state, secret); + XXH_ASSERT(state->secretLimit + XXH_STRIPE_LEN >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + { XXH128_hash_t h128; + h128.low64 = XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)state->totalLen * XXH_PRIME64_1); + h128.high64 = XXH3_mergeAccs(acc, + secret + state->secretLimit + XXH_STRIPE_LEN + - sizeof(acc) - XXH_SECRET_MERGEACCS_START, + ~((xxh_u64)state->totalLen * XXH_PRIME64_2)); + return h128; + } + } + /* len <= XXH3_MIDSIZE_MAX : short code */ + if (state->seed) + return XXH3_128bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); + return XXH3_128bits_withSecret(state->buffer, (size_t)(state->totalLen), + secret, state->secretLimit + XXH_STRIPE_LEN); +} +#endif /* !XXH_NO_STREAM */ +/* 128-bit utility functions */ + +/* return : 1 is equal, 0 if different */ +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2) +{ + /* note : XXH128_hash_t is compact, it has no padding byte */ + return !(memcmp(&h1, &h2, sizeof(h1))); +} + +/* This prototype is compatible with stdlib's qsort(). + * @return : >0 if *h128_1 > *h128_2 + * <0 if *h128_1 < *h128_2 + * =0 if *h128_1 == *h128_2 */ +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2) +{ + XXH128_hash_t const h1 = *(const XXH128_hash_t*)h128_1; + XXH128_hash_t const h2 = *(const XXH128_hash_t*)h128_2; + int const hcmp = (h1.high64 > h2.high64) - (h2.high64 > h1.high64); + /* note : bets that, in most cases, hash values are different */ + if (hcmp) return hcmp; + return (h1.low64 > h2.low64) - (h2.low64 > h1.low64); +} + + +/*====== Canonical representation ======*/ +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API void +XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH128_canonical_t) == sizeof(XXH128_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) { + hash.high64 = XXH_swap64(hash.high64); + hash.low64 = XXH_swap64(hash.low64); + } + XXH_memcpy(dst, &hash.high64, sizeof(hash.high64)); + XXH_memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64)); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src) +{ + XXH128_hash_t h; + h.high64 = XXH_readBE64(src); + h.low64 = XXH_readBE64(src->digest + 8); + return h; +} + + + +/* ========================================== + * Secret generators + * ========================================== + */ +#define XXH_MIN(x, y) (((x) > (y)) ? (y) : (x)) + +XXH_FORCE_INLINE void XXH3_combine16(void* dst, XXH128_hash_t h128) +{ + XXH_writeLE64( dst, XXH_readLE64(dst) ^ h128.low64 ); + XXH_writeLE64( (char*)dst+8, XXH_readLE64((char*)dst+8) ^ h128.high64 ); +} + +/*! @ingroup XXH3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize) +{ +#if (XXH_DEBUGLEVEL >= 1) + XXH_ASSERT(secretBuffer != NULL); + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); +#else + /* production mode, assert() are disabled */ + if (secretBuffer == NULL) return XXH_ERROR; + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; +#endif + + if (customSeedSize == 0) { + customSeed = XXH3_kSecret; + customSeedSize = XXH_SECRET_DEFAULT_SIZE; + } +#if (XXH_DEBUGLEVEL >= 1) + XXH_ASSERT(customSeed != NULL); +#else + if (customSeed == NULL) return XXH_ERROR; +#endif + + /* Fill secretBuffer with a copy of customSeed - repeat as needed */ + { size_t pos = 0; + while (pos < secretSize) { + size_t const toCopy = XXH_MIN((secretSize - pos), customSeedSize); + memcpy((char*)secretBuffer + pos, customSeed, toCopy); + pos += toCopy; + } } + + { size_t const nbSeg16 = secretSize / 16; + size_t n; + XXH128_canonical_t scrambler; + XXH128_canonicalFromHash(&scrambler, XXH128(customSeed, customSeedSize, 0)); + for (n=0; n +#include +#include + +#if defined(__GNUC__) && __GNUC__ >= 4 +# define ZSTD_memcpy(d,s,l) __builtin_memcpy((d),(s),(l)) +# define ZSTD_memmove(d,s,l) __builtin_memmove((d),(s),(l)) +# define ZSTD_memset(p,v,l) __builtin_memset((p),(v),(l)) +#else +# define ZSTD_memcpy(d,s,l) memcpy((d),(s),(l)) +# define ZSTD_memmove(d,s,l) memmove((d),(s),(l)) +# define ZSTD_memset(p,v,l) memset((p),(v),(l)) +#endif + +#endif /* ZSTD_DEPS_COMMON */ + +/* Need: + * ZSTD_malloc() + * ZSTD_free() + * ZSTD_calloc() + */ +#ifdef ZSTD_DEPS_NEED_MALLOC +#ifndef ZSTD_DEPS_MALLOC +#define ZSTD_DEPS_MALLOC + +#include + +#define ZSTD_malloc(s) malloc(s) +#define ZSTD_calloc(n,s) calloc((n), (s)) +#define ZSTD_free(p) free((p)) + +#endif /* ZSTD_DEPS_MALLOC */ +#endif /* ZSTD_DEPS_NEED_MALLOC */ + +/* + * Provides 64-bit math support. + * Need: + * U64 ZSTD_div64(U64 dividend, U32 divisor) + */ +#ifdef ZSTD_DEPS_NEED_MATH64 +#ifndef ZSTD_DEPS_MATH64 +#define ZSTD_DEPS_MATH64 + +#define ZSTD_div64(dividend, divisor) ((dividend) / (divisor)) + +#endif /* ZSTD_DEPS_MATH64 */ +#endif /* ZSTD_DEPS_NEED_MATH64 */ + +/* Need: + * assert() + */ +#ifdef ZSTD_DEPS_NEED_ASSERT +#ifndef ZSTD_DEPS_ASSERT +#define ZSTD_DEPS_ASSERT + +#include + +#endif /* ZSTD_DEPS_ASSERT */ +#endif /* ZSTD_DEPS_NEED_ASSERT */ + +/* Need: + * ZSTD_DEBUG_PRINT() + */ +#ifdef ZSTD_DEPS_NEED_IO +#ifndef ZSTD_DEPS_IO +#define ZSTD_DEPS_IO + +#include +#define ZSTD_DEBUG_PRINT(...) fprintf(stderr, __VA_ARGS__) + +#endif /* ZSTD_DEPS_IO */ +#endif /* ZSTD_DEPS_NEED_IO */ + +/* Only requested when is known to be present. + * Need: + * intptr_t + */ +#ifdef ZSTD_DEPS_NEED_STDINT +#ifndef ZSTD_DEPS_STDINT +#define ZSTD_DEPS_STDINT + +#include + +#endif /* ZSTD_DEPS_STDINT */ +#endif /* ZSTD_DEPS_NEED_STDINT */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/zstd_internal.h b/cpp/third_party/zstd-1.5.7/lib/common/zstd_internal.h new file mode 100644 index 0000000000..2789a35912 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/zstd_internal.h @@ -0,0 +1,324 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_CCOMMON_H_MODULE +#define ZSTD_CCOMMON_H_MODULE + +/* this module contains definitions which must be identical + * across compression, decompression and dictBuilder. + * It also contains a few functions useful to at least 2 of them + * and which benefit from being inlined */ + +/*-************************************* +* Dependencies +***************************************/ +#include "compiler.h" +#include "cpu.h" +#include "mem.h" +#include "debug.h" /* assert, DEBUGLOG, RAWLOG, g_debuglevel */ +#include "error_private.h" +#define ZSTD_STATIC_LINKING_ONLY +#include "../zstd.h" +#define FSE_STATIC_LINKING_ONLY +#include "fse.h" +#include "huf.h" +#ifndef XXH_STATIC_LINKING_ONLY +# define XXH_STATIC_LINKING_ONLY /* XXH64_state_t */ +#endif +#include "xxhash.h" /* XXH_reset, update, digest */ +#ifndef ZSTD_NO_TRACE +# include "zstd_trace.h" +#else +# define ZSTD_TRACE 0 +#endif + +/* ---- static assert (debug) --- */ +#define ZSTD_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) +#define ZSTD_isError ERR_isError /* for inlining */ +#define FSE_isError ERR_isError +#define HUF_isError ERR_isError + + +/*-************************************* +* shared macros +***************************************/ +#undef MIN +#undef MAX +#define MIN(a,b) ((a)<(b) ? (a) : (b)) +#define MAX(a,b) ((a)>(b) ? (a) : (b)) +#define BOUNDED(min,val,max) (MAX(min,MIN(val,max))) + + +/*-************************************* +* Common constants +***************************************/ +#define ZSTD_OPT_NUM (1<<12) + +#define ZSTD_REP_NUM 3 /* number of repcodes */ +static UNUSED_ATTR const U32 repStartValue[ZSTD_REP_NUM] = { 1, 4, 8 }; + +#define KB *(1 <<10) +#define MB *(1 <<20) +#define GB *(1U<<30) + +#define BIT7 128 +#define BIT6 64 +#define BIT5 32 +#define BIT4 16 +#define BIT1 2 +#define BIT0 1 + +#define ZSTD_WINDOWLOG_ABSOLUTEMIN 10 +static UNUSED_ATTR const size_t ZSTD_fcs_fieldSize[4] = { 0, 2, 4, 8 }; +static UNUSED_ATTR const size_t ZSTD_did_fieldSize[4] = { 0, 1, 2, 4 }; + +#define ZSTD_FRAMEIDSIZE 4 /* magic number size */ + +#define ZSTD_BLOCKHEADERSIZE 3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */ +static UNUSED_ATTR const size_t ZSTD_blockHeaderSize = ZSTD_BLOCKHEADERSIZE; +typedef enum { bt_raw, bt_rle, bt_compressed, bt_reserved } blockType_e; + +#define ZSTD_FRAMECHECKSUMSIZE 4 + +#define MIN_SEQUENCES_SIZE 1 /* nbSeq==0 */ +#define MIN_CBLOCK_SIZE (1 /*litCSize*/ + 1 /* RLE or RAW */) /* for a non-null block */ +#define MIN_LITERALS_FOR_4_STREAMS 6 + +typedef enum { set_basic, set_rle, set_compressed, set_repeat } SymbolEncodingType_e; + +#define LONGNBSEQ 0x7F00 + +#define MINMATCH 3 + +#define Litbits 8 +#define LitHufLog 11 +#define MaxLit ((1<= WILDCOPY_VECLEN || diff <= -WILDCOPY_VECLEN); + /* Separate out the first COPY16() call because the copy length is + * almost certain to be short, so the branches have different + * probabilities. Since it is almost certain to be short, only do + * one COPY16() in the first call. Then, do two calls per loop since + * at that point it is more likely to have a high trip count. + */ + ZSTD_copy16(op, ip); + if (16 >= length) return; + op += 16; + ip += 16; + do { + COPY16(op, ip); + COPY16(op, ip); + } + while (op < oend); + } +} + +MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity, const void* src, size_t srcSize) +{ + size_t const length = MIN(dstCapacity, srcSize); + if (length > 0) { + ZSTD_memcpy(dst, src, length); + } + return length; +} + +/* define "workspace is too large" as this number of times larger than needed */ +#define ZSTD_WORKSPACETOOLARGE_FACTOR 3 + +/* when workspace is continuously too large + * during at least this number of times, + * context's memory usage is considered wasteful, + * because it's sized to handle a worst case scenario which rarely happens. + * In which case, resize it down to free some memory */ +#define ZSTD_WORKSPACETOOLARGE_MAXDURATION 128 + +/* Controls whether the input/output buffer is buffered or stable. */ +typedef enum { + ZSTD_bm_buffered = 0, /* Buffer the input/output */ + ZSTD_bm_stable = 1 /* ZSTD_inBuffer/ZSTD_outBuffer is stable */ +} ZSTD_bufferMode_e; + + +/*-******************************************* +* Private declarations +*********************************************/ + +/** + * Contains the compressed frame size and an upper-bound for the decompressed frame size. + * Note: before using `compressedSize`, check for errors using ZSTD_isError(). + * similarly, before using `decompressedBound`, check for errors using: + * `decompressedBound != ZSTD_CONTENTSIZE_ERROR` + */ +typedef struct { + size_t nbBlocks; + size_t compressedSize; + unsigned long long decompressedBound; +} ZSTD_frameSizeInfo; /* decompress & legacy */ + +/* ZSTD_invalidateRepCodes() : + * ensures next compression will not use repcodes from previous block. + * Note : only works with regular variant; + * do not use with extDict variant ! */ +void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx); /* zstdmt, adaptive_compression (shouldn't get this definition from here) */ + + +typedef struct { + blockType_e blockType; + U32 lastBlock; + U32 origSize; +} blockProperties_t; /* declared here for decompress and fullbench */ + +/*! ZSTD_getcBlockSize() : + * Provides the size of compressed block from block header `src` */ +/* Used by: decompress, fullbench */ +size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, + blockProperties_t* bpPtr); + +/*! ZSTD_decodeSeqHeaders() : + * decode sequence header from src */ +/* Used by: zstd_decompress_block, fullbench */ +size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, + const void* src, size_t srcSize); + +/** + * @returns true iff the CPU supports dynamic BMI2 dispatch. + */ +MEM_STATIC int ZSTD_cpuSupportsBmi2(void) +{ + ZSTD_cpuid_t cpuid = ZSTD_cpuid(); + return ZSTD_cpuid_bmi1(cpuid) && ZSTD_cpuid_bmi2(cpuid); +} + +#endif /* ZSTD_CCOMMON_H_MODULE */ diff --git a/cpp/third_party/zstd-1.5.7/lib/common/zstd_trace.h b/cpp/third_party/zstd-1.5.7/lib/common/zstd_trace.h new file mode 100644 index 0000000000..d8eec10075 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/common/zstd_trace.h @@ -0,0 +1,156 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_TRACE_H +#define ZSTD_TRACE_H + +#include + +/* weak symbol support + * For now, enable conservatively: + * - Only GNUC + * - Only ELF + * - Only x86-64, i386, aarch64 and risc-v. + * Also, explicitly disable on platforms known not to work so they aren't + * forgotten in the future. + */ +#if !defined(ZSTD_HAVE_WEAK_SYMBOLS) && \ + defined(__GNUC__) && defined(__ELF__) && \ + (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ + defined(_M_IX86) || defined(__aarch64__) || defined(__riscv)) && \ + !defined(__APPLE__) && !defined(_WIN32) && !defined(__MINGW32__) && \ + !defined(__CYGWIN__) && !defined(_AIX) +# define ZSTD_HAVE_WEAK_SYMBOLS 1 +#else +# define ZSTD_HAVE_WEAK_SYMBOLS 0 +#endif +#if ZSTD_HAVE_WEAK_SYMBOLS +# define ZSTD_WEAK_ATTR __attribute__((__weak__)) +#else +# define ZSTD_WEAK_ATTR +#endif + +/* Only enable tracing when weak symbols are available. */ +#ifndef ZSTD_TRACE +# define ZSTD_TRACE ZSTD_HAVE_WEAK_SYMBOLS +#endif + +#if ZSTD_TRACE + +struct ZSTD_CCtx_s; +struct ZSTD_DCtx_s; +struct ZSTD_CCtx_params_s; + +typedef struct { + /** + * ZSTD_VERSION_NUMBER + * + * This is guaranteed to be the first member of ZSTD_trace. + * Otherwise, this struct is not stable between versions. If + * the version number does not match your expectation, you + * should not interpret the rest of the struct. + */ + unsigned version; + /** + * Non-zero if streaming (de)compression is used. + */ + int streaming; + /** + * The dictionary ID. + */ + unsigned dictionaryID; + /** + * Is the dictionary cold? + * Only set on decompression. + */ + int dictionaryIsCold; + /** + * The dictionary size or zero if no dictionary. + */ + size_t dictionarySize; + /** + * The uncompressed size of the data. + */ + size_t uncompressedSize; + /** + * The compressed size of the data. + */ + size_t compressedSize; + /** + * The fully resolved CCtx parameters (NULL on decompression). + */ + struct ZSTD_CCtx_params_s const* params; + /** + * The ZSTD_CCtx pointer (NULL on decompression). + */ + struct ZSTD_CCtx_s const* cctx; + /** + * The ZSTD_DCtx pointer (NULL on compression). + */ + struct ZSTD_DCtx_s const* dctx; +} ZSTD_Trace; + +/** + * A tracing context. It must be 0 when tracing is disabled. + * Otherwise, any non-zero value returned by a tracing begin() + * function is presented to any subsequent calls to end(). + * + * Any non-zero value is treated as tracing is enabled and not + * interpreted by the library. + * + * Two possible uses are: + * * A timestamp for when the begin() function was called. + * * A unique key identifying the (de)compression, like the + * address of the [dc]ctx pointer if you need to track + * more information than just a timestamp. + */ +typedef unsigned long long ZSTD_TraceCtx; + +/** + * Trace the beginning of a compression call. + * @param cctx The dctx pointer for the compression. + * It can be used as a key to map begin() to end(). + * @returns Non-zero if tracing is enabled. The return value is + * passed to ZSTD_trace_compress_end(). + */ +ZSTD_WEAK_ATTR ZSTD_TraceCtx ZSTD_trace_compress_begin( + struct ZSTD_CCtx_s const* cctx); + +/** + * Trace the end of a compression call. + * @param ctx The return value of ZSTD_trace_compress_begin(). + * @param trace The zstd tracing info. + */ +ZSTD_WEAK_ATTR void ZSTD_trace_compress_end( + ZSTD_TraceCtx ctx, + ZSTD_Trace const* trace); + +/** + * Trace the beginning of a decompression call. + * @param dctx The dctx pointer for the decompression. + * It can be used as a key to map begin() to end(). + * @returns Non-zero if tracing is enabled. The return value is + * passed to ZSTD_trace_compress_end(). + */ +ZSTD_WEAK_ATTR ZSTD_TraceCtx ZSTD_trace_decompress_begin( + struct ZSTD_DCtx_s const* dctx); + +/** + * Trace the end of a decompression call. + * @param ctx The return value of ZSTD_trace_decompress_begin(). + * @param trace The zstd tracing info. + */ +ZSTD_WEAK_ATTR void ZSTD_trace_decompress_end( + ZSTD_TraceCtx ctx, + ZSTD_Trace const* trace); + +#endif /* ZSTD_TRACE */ + +#endif /* ZSTD_TRACE_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/clevels.h b/cpp/third_party/zstd-1.5.7/lib/compress/clevels.h new file mode 100644 index 0000000000..c18da465f3 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/clevels.h @@ -0,0 +1,134 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_CLEVELS_H +#define ZSTD_CLEVELS_H + +#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_compressionParameters */ +#include "../zstd.h" + +/*-===== Pre-defined compression levels =====-*/ + +#define ZSTD_MAX_CLEVEL 22 + +#ifdef __GNUC__ +__attribute__((__unused__)) +#endif + +static const ZSTD_compressionParameters ZSTD_defaultCParameters[4][ZSTD_MAX_CLEVEL+1] = { +{ /* "default" - for any srcSize > 256 KB */ + /* W, C, H, S, L, TL, strat */ + { 19, 12, 13, 1, 6, 1, ZSTD_fast }, /* base for negative levels */ + { 19, 13, 14, 1, 7, 0, ZSTD_fast }, /* level 1 */ + { 20, 15, 16, 1, 6, 0, ZSTD_fast }, /* level 2 */ + { 21, 16, 17, 1, 5, 0, ZSTD_dfast }, /* level 3 */ + { 21, 18, 18, 1, 5, 0, ZSTD_dfast }, /* level 4 */ + { 21, 18, 19, 3, 5, 2, ZSTD_greedy }, /* level 5 */ + { 21, 18, 19, 3, 5, 4, ZSTD_lazy }, /* level 6 */ + { 21, 19, 20, 4, 5, 8, ZSTD_lazy }, /* level 7 */ + { 21, 19, 20, 4, 5, 16, ZSTD_lazy2 }, /* level 8 */ + { 22, 20, 21, 4, 5, 16, ZSTD_lazy2 }, /* level 9 */ + { 22, 21, 22, 5, 5, 16, ZSTD_lazy2 }, /* level 10 */ + { 22, 21, 22, 6, 5, 16, ZSTD_lazy2 }, /* level 11 */ + { 22, 22, 23, 6, 5, 32, ZSTD_lazy2 }, /* level 12 */ + { 22, 22, 22, 4, 5, 32, ZSTD_btlazy2 }, /* level 13 */ + { 22, 22, 23, 5, 5, 32, ZSTD_btlazy2 }, /* level 14 */ + { 22, 23, 23, 6, 5, 32, ZSTD_btlazy2 }, /* level 15 */ + { 22, 22, 22, 5, 5, 48, ZSTD_btopt }, /* level 16 */ + { 23, 23, 22, 5, 4, 64, ZSTD_btopt }, /* level 17 */ + { 23, 23, 22, 6, 3, 64, ZSTD_btultra }, /* level 18 */ + { 23, 24, 22, 7, 3,256, ZSTD_btultra2}, /* level 19 */ + { 25, 25, 23, 7, 3,256, ZSTD_btultra2}, /* level 20 */ + { 26, 26, 24, 7, 3,512, ZSTD_btultra2}, /* level 21 */ + { 27, 27, 25, 9, 3,999, ZSTD_btultra2}, /* level 22 */ +}, +{ /* for srcSize <= 256 KB */ + /* W, C, H, S, L, T, strat */ + { 18, 12, 13, 1, 5, 1, ZSTD_fast }, /* base for negative levels */ + { 18, 13, 14, 1, 6, 0, ZSTD_fast }, /* level 1 */ + { 18, 14, 14, 1, 5, 0, ZSTD_dfast }, /* level 2 */ + { 18, 16, 16, 1, 4, 0, ZSTD_dfast }, /* level 3 */ + { 18, 16, 17, 3, 5, 2, ZSTD_greedy }, /* level 4.*/ + { 18, 17, 18, 5, 5, 2, ZSTD_greedy }, /* level 5.*/ + { 18, 18, 19, 3, 5, 4, ZSTD_lazy }, /* level 6.*/ + { 18, 18, 19, 4, 4, 4, ZSTD_lazy }, /* level 7 */ + { 18, 18, 19, 4, 4, 8, ZSTD_lazy2 }, /* level 8 */ + { 18, 18, 19, 5, 4, 8, ZSTD_lazy2 }, /* level 9 */ + { 18, 18, 19, 6, 4, 8, ZSTD_lazy2 }, /* level 10 */ + { 18, 18, 19, 5, 4, 12, ZSTD_btlazy2 }, /* level 11.*/ + { 18, 19, 19, 7, 4, 12, ZSTD_btlazy2 }, /* level 12.*/ + { 18, 18, 19, 4, 4, 16, ZSTD_btopt }, /* level 13 */ + { 18, 18, 19, 4, 3, 32, ZSTD_btopt }, /* level 14.*/ + { 18, 18, 19, 6, 3,128, ZSTD_btopt }, /* level 15.*/ + { 18, 19, 19, 6, 3,128, ZSTD_btultra }, /* level 16.*/ + { 18, 19, 19, 8, 3,256, ZSTD_btultra }, /* level 17.*/ + { 18, 19, 19, 6, 3,128, ZSTD_btultra2}, /* level 18.*/ + { 18, 19, 19, 8, 3,256, ZSTD_btultra2}, /* level 19.*/ + { 18, 19, 19, 10, 3,512, ZSTD_btultra2}, /* level 20.*/ + { 18, 19, 19, 12, 3,512, ZSTD_btultra2}, /* level 21.*/ + { 18, 19, 19, 13, 3,999, ZSTD_btultra2}, /* level 22.*/ +}, +{ /* for srcSize <= 128 KB */ + /* W, C, H, S, L, T, strat */ + { 17, 12, 12, 1, 5, 1, ZSTD_fast }, /* base for negative levels */ + { 17, 12, 13, 1, 6, 0, ZSTD_fast }, /* level 1 */ + { 17, 13, 15, 1, 5, 0, ZSTD_fast }, /* level 2 */ + { 17, 15, 16, 2, 5, 0, ZSTD_dfast }, /* level 3 */ + { 17, 17, 17, 2, 4, 0, ZSTD_dfast }, /* level 4 */ + { 17, 16, 17, 3, 4, 2, ZSTD_greedy }, /* level 5 */ + { 17, 16, 17, 3, 4, 4, ZSTD_lazy }, /* level 6 */ + { 17, 16, 17, 3, 4, 8, ZSTD_lazy2 }, /* level 7 */ + { 17, 16, 17, 4, 4, 8, ZSTD_lazy2 }, /* level 8 */ + { 17, 16, 17, 5, 4, 8, ZSTD_lazy2 }, /* level 9 */ + { 17, 16, 17, 6, 4, 8, ZSTD_lazy2 }, /* level 10 */ + { 17, 17, 17, 5, 4, 8, ZSTD_btlazy2 }, /* level 11 */ + { 17, 18, 17, 7, 4, 12, ZSTD_btlazy2 }, /* level 12 */ + { 17, 18, 17, 3, 4, 12, ZSTD_btopt }, /* level 13.*/ + { 17, 18, 17, 4, 3, 32, ZSTD_btopt }, /* level 14.*/ + { 17, 18, 17, 6, 3,256, ZSTD_btopt }, /* level 15.*/ + { 17, 18, 17, 6, 3,128, ZSTD_btultra }, /* level 16.*/ + { 17, 18, 17, 8, 3,256, ZSTD_btultra }, /* level 17.*/ + { 17, 18, 17, 10, 3,512, ZSTD_btultra }, /* level 18.*/ + { 17, 18, 17, 5, 3,256, ZSTD_btultra2}, /* level 19.*/ + { 17, 18, 17, 7, 3,512, ZSTD_btultra2}, /* level 20.*/ + { 17, 18, 17, 9, 3,512, ZSTD_btultra2}, /* level 21.*/ + { 17, 18, 17, 11, 3,999, ZSTD_btultra2}, /* level 22.*/ +}, +{ /* for srcSize <= 16 KB */ + /* W, C, H, S, L, T, strat */ + { 14, 12, 13, 1, 5, 1, ZSTD_fast }, /* base for negative levels */ + { 14, 14, 15, 1, 5, 0, ZSTD_fast }, /* level 1 */ + { 14, 14, 15, 1, 4, 0, ZSTD_fast }, /* level 2 */ + { 14, 14, 15, 2, 4, 0, ZSTD_dfast }, /* level 3 */ + { 14, 14, 14, 4, 4, 2, ZSTD_greedy }, /* level 4 */ + { 14, 14, 14, 3, 4, 4, ZSTD_lazy }, /* level 5.*/ + { 14, 14, 14, 4, 4, 8, ZSTD_lazy2 }, /* level 6 */ + { 14, 14, 14, 6, 4, 8, ZSTD_lazy2 }, /* level 7 */ + { 14, 14, 14, 8, 4, 8, ZSTD_lazy2 }, /* level 8.*/ + { 14, 15, 14, 5, 4, 8, ZSTD_btlazy2 }, /* level 9.*/ + { 14, 15, 14, 9, 4, 8, ZSTD_btlazy2 }, /* level 10.*/ + { 14, 15, 14, 3, 4, 12, ZSTD_btopt }, /* level 11.*/ + { 14, 15, 14, 4, 3, 24, ZSTD_btopt }, /* level 12.*/ + { 14, 15, 14, 5, 3, 32, ZSTD_btultra }, /* level 13.*/ + { 14, 15, 15, 6, 3, 64, ZSTD_btultra }, /* level 14.*/ + { 14, 15, 15, 7, 3,256, ZSTD_btultra }, /* level 15.*/ + { 14, 15, 15, 5, 3, 48, ZSTD_btultra2}, /* level 16.*/ + { 14, 15, 15, 6, 3,128, ZSTD_btultra2}, /* level 17.*/ + { 14, 15, 15, 7, 3,256, ZSTD_btultra2}, /* level 18.*/ + { 14, 15, 15, 8, 3,256, ZSTD_btultra2}, /* level 19.*/ + { 14, 15, 15, 8, 3,512, ZSTD_btultra2}, /* level 20.*/ + { 14, 15, 15, 9, 3,512, ZSTD_btultra2}, /* level 21.*/ + { 14, 15, 15, 10, 3,999, ZSTD_btultra2}, /* level 22.*/ +}, +}; + + + +#endif /* ZSTD_CLEVELS_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/fse_compress.c b/cpp/third_party/zstd-1.5.7/lib/compress/fse_compress.c new file mode 100644 index 0000000000..1ce3cf16ac --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/fse_compress.c @@ -0,0 +1,625 @@ +/* ****************************************************************** + * FSE : Finite State Entropy encoder + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + +/* ************************************************************** +* Includes +****************************************************************/ +#include "../common/compiler.h" +#include "../common/mem.h" /* U32, U16, etc. */ +#include "../common/debug.h" /* assert, DEBUGLOG */ +#include "hist.h" /* HIST_count_wksp */ +#include "../common/bitstream.h" +#define FSE_STATIC_LINKING_ONLY +#include "../common/fse.h" +#include "../common/error_private.h" +#define ZSTD_DEPS_NEED_MALLOC +#define ZSTD_DEPS_NEED_MATH64 +#include "../common/zstd_deps.h" /* ZSTD_memset */ +#include "../common/bits.h" /* ZSTD_highbit32 */ + + +/* ************************************************************** +* Error Management +****************************************************************/ +#define FSE_isError ERR_isError + + +/* ************************************************************** +* Templates +****************************************************************/ +/* + designed to be included + for type-specific functions (template emulation in C) + Objective is to write these functions only once, for improved maintenance +*/ + +/* safety checks */ +#ifndef FSE_FUNCTION_EXTENSION +# error "FSE_FUNCTION_EXTENSION must be defined" +#endif +#ifndef FSE_FUNCTION_TYPE +# error "FSE_FUNCTION_TYPE must be defined" +#endif + +/* Function names */ +#define FSE_CAT(X,Y) X##Y +#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) +#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) + + +/* Function templates */ + +/* FSE_buildCTable_wksp() : + * Same as FSE_buildCTable(), but using an externally allocated scratch buffer (`workSpace`). + * wkspSize should be sized to handle worst case situation, which is `1<>1 : 1) ; + FSE_symbolCompressionTransform* const symbolTT = (FSE_symbolCompressionTransform*) (FSCT); + U32 const step = FSE_TABLESTEP(tableSize); + U32 const maxSV1 = maxSymbolValue+1; + + U16* cumul = (U16*)workSpace; /* size = maxSV1 */ + FSE_FUNCTION_TYPE* const tableSymbol = (FSE_FUNCTION_TYPE*)(cumul + (maxSV1+1)); /* size = tableSize */ + + U32 highThreshold = tableSize-1; + + assert(((size_t)workSpace & 1) == 0); /* Must be 2 bytes-aligned */ + if (FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) > wkspSize) return ERROR(tableLog_tooLarge); + /* CTable header */ + tableU16[-2] = (U16) tableLog; + tableU16[-1] = (U16) maxSymbolValue; + assert(tableLog < 16); /* required for threshold strategy to work */ + + /* For explanations on how to distribute symbol values over the table : + * https://fastcompression.blogspot.fr/2014/02/fse-distributing-symbol-values.html */ + + #ifdef __clang_analyzer__ + ZSTD_memset(tableSymbol, 0, sizeof(*tableSymbol) * tableSize); /* useless initialization, just to keep scan-build happy */ + #endif + + /* symbol start positions */ + { U32 u; + cumul[0] = 0; + for (u=1; u <= maxSV1; u++) { + if (normalizedCounter[u-1]==-1) { /* Low proba symbol */ + cumul[u] = cumul[u-1] + 1; + tableSymbol[highThreshold--] = (FSE_FUNCTION_TYPE)(u-1); + } else { + assert(normalizedCounter[u-1] >= 0); + cumul[u] = cumul[u-1] + (U16)normalizedCounter[u-1]; + assert(cumul[u] >= cumul[u-1]); /* no overflow */ + } } + cumul[maxSV1] = (U16)(tableSize+1); + } + + /* Spread symbols */ + if (highThreshold == tableSize - 1) { + /* Case for no low prob count symbols. Lay down 8 bytes at a time + * to reduce branch misses since we are operating on a small block + */ + BYTE* const spread = tableSymbol + tableSize; /* size = tableSize + 8 (may write beyond tableSize) */ + { U64 const add = 0x0101010101010101ull; + size_t pos = 0; + U64 sv = 0; + U32 s; + for (s=0; s=0); + pos += (size_t)n; + } + } + /* Spread symbols across the table. Lack of lowprob symbols means that + * we don't need variable sized inner loop, so we can unroll the loop and + * reduce branch misses. + */ + { size_t position = 0; + size_t s; + size_t const unroll = 2; /* Experimentally determined optimal unroll */ + assert(tableSize % unroll == 0); /* FSE_MIN_TABLELOG is 5 */ + for (s = 0; s < (size_t)tableSize; s += unroll) { + size_t u; + for (u = 0; u < unroll; ++u) { + size_t const uPosition = (position + (u * step)) & tableMask; + tableSymbol[uPosition] = spread[s + u]; + } + position = (position + (unroll * step)) & tableMask; + } + assert(position == 0); /* Must have initialized all positions */ + } + } else { + U32 position = 0; + U32 symbol; + for (symbol=0; symbol highThreshold) + position = (position + step) & tableMask; /* Low proba area */ + } } + assert(position==0); /* Must have initialized all positions */ + } + + /* Build table */ + { U32 u; for (u=0; u 1); + { U32 const maxBitsOut = tableLog - ZSTD_highbit32 ((U32)normalizedCounter[s]-1); + U32 const minStatePlus = (U32)normalizedCounter[s] << maxBitsOut; + symbolTT[s].deltaNbBits = (maxBitsOut << 16) - minStatePlus; + symbolTT[s].deltaFindState = (int)(total - (unsigned)normalizedCounter[s]); + total += (unsigned)normalizedCounter[s]; + } } } } + +#if 0 /* debug : symbol costs */ + DEBUGLOG(5, "\n --- table statistics : "); + { U32 symbol; + for (symbol=0; symbol<=maxSymbolValue; symbol++) { + DEBUGLOG(5, "%3u: w=%3i, maxBits=%u, fracBits=%.2f", + symbol, normalizedCounter[symbol], + FSE_getMaxNbBits(symbolTT, symbol), + (double)FSE_bitCost(symbolTT, tableLog, symbol, 8) / 256); + } } +#endif + + return 0; +} + + + +#ifndef FSE_COMMONDEFS_ONLY + +/*-************************************************************** +* FSE NCount encoding +****************************************************************/ +size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog) +{ + size_t const maxHeaderSize = (((maxSymbolValue+1) * tableLog + + 4 /* bitCount initialized at 4 */ + + 2 /* first two symbols may use one additional bit each */) / 8) + + 1 /* round up to whole nb bytes */ + + 2 /* additional two bytes for bitstream flush */; + return maxSymbolValue ? maxHeaderSize : FSE_NCOUNTBOUND; /* maxSymbolValue==0 ? use default */ +} + +static size_t +FSE_writeNCount_generic (void* header, size_t headerBufferSize, + const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, + unsigned writeIsSafe) +{ + BYTE* const ostart = (BYTE*) header; + BYTE* out = ostart; + BYTE* const oend = ostart + headerBufferSize; + int nbBits; + const int tableSize = 1 << tableLog; + int remaining; + int threshold; + U32 bitStream = 0; + int bitCount = 0; + unsigned symbol = 0; + unsigned const alphabetSize = maxSymbolValue + 1; + int previousIs0 = 0; + + /* Table Size */ + bitStream += (tableLog-FSE_MIN_TABLELOG) << bitCount; + bitCount += 4; + + /* Init */ + remaining = tableSize+1; /* +1 for extra accuracy */ + threshold = tableSize; + nbBits = (int)tableLog+1; + + while ((symbol < alphabetSize) && (remaining>1)) { /* stops at 1 */ + if (previousIs0) { + unsigned start = symbol; + while ((symbol < alphabetSize) && !normalizedCounter[symbol]) symbol++; + if (symbol == alphabetSize) break; /* incorrect distribution */ + while (symbol >= start+24) { + start+=24; + bitStream += 0xFFFFU << bitCount; + if ((!writeIsSafe) && (out > oend-2)) + return ERROR(dstSize_tooSmall); /* Buffer overflow */ + out[0] = (BYTE) bitStream; + out[1] = (BYTE)(bitStream>>8); + out+=2; + bitStream>>=16; + } + while (symbol >= start+3) { + start+=3; + bitStream += 3U << bitCount; + bitCount += 2; + } + bitStream += (symbol-start) << bitCount; + bitCount += 2; + if (bitCount>16) { + if ((!writeIsSafe) && (out > oend - 2)) + return ERROR(dstSize_tooSmall); /* Buffer overflow */ + out[0] = (BYTE)bitStream; + out[1] = (BYTE)(bitStream>>8); + out += 2; + bitStream >>= 16; + bitCount -= 16; + } } + { int count = normalizedCounter[symbol++]; + int const max = (2*threshold-1) - remaining; + remaining -= count < 0 ? -count : count; + count++; /* +1 for extra accuracy */ + if (count>=threshold) + count += max; /* [0..max[ [max..threshold[ (...) [threshold+max 2*threshold[ */ + bitStream += (U32)count << bitCount; + bitCount += nbBits; + bitCount -= (count>=1; } + } + if (bitCount>16) { + if ((!writeIsSafe) && (out > oend - 2)) + return ERROR(dstSize_tooSmall); /* Buffer overflow */ + out[0] = (BYTE)bitStream; + out[1] = (BYTE)(bitStream>>8); + out += 2; + bitStream >>= 16; + bitCount -= 16; + } } + + if (remaining != 1) + return ERROR(GENERIC); /* incorrect normalized distribution */ + assert(symbol <= alphabetSize); + + /* flush remaining bitStream */ + if ((!writeIsSafe) && (out > oend - 2)) + return ERROR(dstSize_tooSmall); /* Buffer overflow */ + out[0] = (BYTE)bitStream; + out[1] = (BYTE)(bitStream>>8); + out+= (bitCount+7) /8; + + assert(out >= ostart); + return (size_t)(out-ostart); +} + + +size_t FSE_writeNCount (void* buffer, size_t bufferSize, + const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) +{ + if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); /* Unsupported */ + if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC); /* Unsupported */ + + if (bufferSize < FSE_NCountWriteBound(maxSymbolValue, tableLog)) + return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 0); + + return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 1 /* write in buffer is safe */); +} + + +/*-************************************************************** +* FSE Compression Code +****************************************************************/ + +/* provides the minimum logSize to safely represent a distribution */ +static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue) +{ + U32 minBitsSrc = ZSTD_highbit32((U32)(srcSize)) + 1; + U32 minBitsSymbols = ZSTD_highbit32(maxSymbolValue) + 2; + U32 minBits = minBitsSrc < minBitsSymbols ? minBitsSrc : minBitsSymbols; + assert(srcSize > 1); /* Not supported, RLE should be used instead */ + return minBits; +} + +unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, unsigned minus) +{ + U32 maxBitsSrc = ZSTD_highbit32((U32)(srcSize - 1)) - minus; + U32 tableLog = maxTableLog; + U32 minBits = FSE_minTableLog(srcSize, maxSymbolValue); + assert(srcSize > 1); /* Not supported, RLE should be used instead */ + if (tableLog==0) tableLog = FSE_DEFAULT_TABLELOG; + if (maxBitsSrc < tableLog) tableLog = maxBitsSrc; /* Accuracy can be reduced */ + if (minBits > tableLog) tableLog = minBits; /* Need a minimum to safely represent all symbol values */ + if (tableLog < FSE_MIN_TABLELOG) tableLog = FSE_MIN_TABLELOG; + if (tableLog > FSE_MAX_TABLELOG) tableLog = FSE_MAX_TABLELOG; + return tableLog; +} + +unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) +{ + return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 2); +} + +/* Secondary normalization method. + To be used when primary method fails. */ + +static size_t FSE_normalizeM2(short* norm, U32 tableLog, const unsigned* count, size_t total, U32 maxSymbolValue, short lowProbCount) +{ + short const NOT_YET_ASSIGNED = -2; + U32 s; + U32 distributed = 0; + U32 ToDistribute; + + /* Init */ + U32 const lowThreshold = (U32)(total >> tableLog); + U32 lowOne = (U32)((total * 3) >> (tableLog + 1)); + + for (s=0; s<=maxSymbolValue; s++) { + if (count[s] == 0) { + norm[s]=0; + continue; + } + if (count[s] <= lowThreshold) { + norm[s] = lowProbCount; + distributed++; + total -= count[s]; + continue; + } + if (count[s] <= lowOne) { + norm[s] = 1; + distributed++; + total -= count[s]; + continue; + } + + norm[s]=NOT_YET_ASSIGNED; + } + ToDistribute = (1 << tableLog) - distributed; + + if (ToDistribute == 0) + return 0; + + if ((total / ToDistribute) > lowOne) { + /* risk of rounding to zero */ + lowOne = (U32)((total * 3) / (ToDistribute * 2)); + for (s=0; s<=maxSymbolValue; s++) { + if ((norm[s] == NOT_YET_ASSIGNED) && (count[s] <= lowOne)) { + norm[s] = 1; + distributed++; + total -= count[s]; + continue; + } } + ToDistribute = (1 << tableLog) - distributed; + } + + if (distributed == maxSymbolValue+1) { + /* all values are pretty poor; + probably incompressible data (should have already been detected); + find max, then give all remaining points to max */ + U32 maxV = 0, maxC = 0; + for (s=0; s<=maxSymbolValue; s++) + if (count[s] > maxC) { maxV=s; maxC=count[s]; } + norm[maxV] += (short)ToDistribute; + return 0; + } + + if (total == 0) { + /* all of the symbols were low enough for the lowOne or lowThreshold */ + for (s=0; ToDistribute > 0; s = (s+1)%(maxSymbolValue+1)) + if (norm[s] > 0) { ToDistribute--; norm[s]++; } + return 0; + } + + { U64 const vStepLog = 62 - tableLog; + U64 const mid = (1ULL << (vStepLog-1)) - 1; + U64 const rStep = ZSTD_div64((((U64)1<> vStepLog); + U32 const sEnd = (U32)(end >> vStepLog); + U32 const weight = sEnd - sStart; + if (weight < 1) + return ERROR(GENERIC); + norm[s] = (short)weight; + tmpTotal = end; + } } } + + return 0; +} + +size_t FSE_normalizeCount (short* normalizedCounter, unsigned tableLog, + const unsigned* count, size_t total, + unsigned maxSymbolValue, unsigned useLowProbCount) +{ + /* Sanity checks */ + if (tableLog==0) tableLog = FSE_DEFAULT_TABLELOG; + if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC); /* Unsupported size */ + if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); /* Unsupported size */ + if (tableLog < FSE_minTableLog(total, maxSymbolValue)) return ERROR(GENERIC); /* Too small tableLog, compression potentially impossible */ + + { static U32 const rtbTable[] = { 0, 473195, 504333, 520860, 550000, 700000, 750000, 830000 }; + short const lowProbCount = useLowProbCount ? -1 : 1; + U64 const scale = 62 - tableLog; + U64 const step = ZSTD_div64((U64)1<<62, (U32)total); /* <== here, one division ! */ + U64 const vStep = 1ULL<<(scale-20); + int stillToDistribute = 1<> tableLog); + + for (s=0; s<=maxSymbolValue; s++) { + if (count[s] == total) return 0; /* rle special case */ + if (count[s] == 0) { normalizedCounter[s]=0; continue; } + if (count[s] <= lowThreshold) { + normalizedCounter[s] = lowProbCount; + stillToDistribute--; + } else { + short proba = (short)((count[s]*step) >> scale); + if (proba<8) { + U64 restToBeat = vStep * rtbTable[proba]; + proba += (count[s]*step) - ((U64)proba< restToBeat; + } + if (proba > largestP) { largestP=proba; largest=s; } + normalizedCounter[s] = proba; + stillToDistribute -= proba; + } } + if (-stillToDistribute >= (normalizedCounter[largest] >> 1)) { + /* corner case, need another normalization method */ + size_t const errorCode = FSE_normalizeM2(normalizedCounter, tableLog, count, total, maxSymbolValue, lowProbCount); + if (FSE_isError(errorCode)) return errorCode; + } + else normalizedCounter[largest] += (short)stillToDistribute; + } + +#if 0 + { /* Print Table (debug) */ + U32 s; + U32 nTotal = 0; + for (s=0; s<=maxSymbolValue; s++) + RAWLOG(2, "%3i: %4i \n", s, normalizedCounter[s]); + for (s=0; s<=maxSymbolValue; s++) + nTotal += abs(normalizedCounter[s]); + if (nTotal != (1U< FSE_MAX_TABLELOG*4+7 ) && (srcSize & 2)) { /* test bit 2 */ + FSE_encodeSymbol(&bitC, &CState2, *--ip); + FSE_encodeSymbol(&bitC, &CState1, *--ip); + FSE_FLUSHBITS(&bitC); + } + + /* 2 or 4 encoding per loop */ + while ( ip>istart ) { + + FSE_encodeSymbol(&bitC, &CState2, *--ip); + + if (sizeof(bitC.bitContainer)*8 < FSE_MAX_TABLELOG*2+7 ) /* this test must be static */ + FSE_FLUSHBITS(&bitC); + + FSE_encodeSymbol(&bitC, &CState1, *--ip); + + if (sizeof(bitC.bitContainer)*8 > FSE_MAX_TABLELOG*4+7 ) { /* this test must be static */ + FSE_encodeSymbol(&bitC, &CState2, *--ip); + FSE_encodeSymbol(&bitC, &CState1, *--ip); + } + + FSE_FLUSHBITS(&bitC); + } + + FSE_flushCState(&bitC, &CState2); + FSE_flushCState(&bitC, &CState1); + return BIT_closeCStream(&bitC); +} + +size_t FSE_compress_usingCTable (void* dst, size_t dstSize, + const void* src, size_t srcSize, + const FSE_CTable* ct) +{ + unsigned const fast = (dstSize >= FSE_BLOCKBOUND(srcSize)); + + if (fast) + return FSE_compress_usingCTable_generic(dst, dstSize, src, srcSize, ct, 1); + else + return FSE_compress_usingCTable_generic(dst, dstSize, src, srcSize, ct, 0); +} + + +size_t FSE_compressBound(size_t size) { return FSE_COMPRESSBOUND(size); } + +#endif /* FSE_COMMONDEFS_ONLY */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/hist.c b/cpp/third_party/zstd-1.5.7/lib/compress/hist.c new file mode 100644 index 0000000000..4ccf9a90a9 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/hist.c @@ -0,0 +1,191 @@ +/* ****************************************************************** + * hist : Histogram functions + * part of Finite State Entropy project + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + +/* --- dependencies --- */ +#include "../common/mem.h" /* U32, BYTE, etc. */ +#include "../common/debug.h" /* assert, DEBUGLOG */ +#include "../common/error_private.h" /* ERROR */ +#include "hist.h" + + +/* --- Error management --- */ +unsigned HIST_isError(size_t code) { return ERR_isError(code); } + +/*-************************************************************** + * Histogram functions + ****************************************************************/ +void HIST_add(unsigned* count, const void* src, size_t srcSize) +{ + const BYTE* ip = (const BYTE*)src; + const BYTE* const end = ip + srcSize; + + while (ip largestCount) largestCount = count[s]; + } + + return largestCount; +} + +typedef enum { trustInput, checkMaxSymbolValue } HIST_checkInput_e; + +/* HIST_count_parallel_wksp() : + * store histogram into 4 intermediate tables, recombined at the end. + * this design makes better use of OoO cpus, + * and is noticeably faster when some values are heavily repeated. + * But it needs some additional workspace for intermediate tables. + * `workSpace` must be a U32 table of size >= HIST_WKSP_SIZE_U32. + * @return : largest histogram frequency, + * or an error code (notably when histogram's alphabet is larger than *maxSymbolValuePtr) */ +static size_t HIST_count_parallel_wksp( + unsigned* count, unsigned* maxSymbolValuePtr, + const void* source, size_t sourceSize, + HIST_checkInput_e check, + U32* const workSpace) +{ + const BYTE* ip = (const BYTE*)source; + const BYTE* const iend = ip+sourceSize; + size_t const countSize = (*maxSymbolValuePtr + 1) * sizeof(*count); + unsigned max=0; + U32* const Counting1 = workSpace; + U32* const Counting2 = Counting1 + 256; + U32* const Counting3 = Counting2 + 256; + U32* const Counting4 = Counting3 + 256; + + /* safety checks */ + assert(*maxSymbolValuePtr <= 255); + if (!sourceSize) { + ZSTD_memset(count, 0, countSize); + *maxSymbolValuePtr = 0; + return 0; + } + ZSTD_memset(workSpace, 0, 4*256*sizeof(unsigned)); + + /* by stripes of 16 bytes */ + { U32 cached = MEM_read32(ip); ip += 4; + while (ip < iend-15) { + U32 c = cached; cached = MEM_read32(ip); ip += 4; + Counting1[(BYTE) c ]++; + Counting2[(BYTE)(c>>8) ]++; + Counting3[(BYTE)(c>>16)]++; + Counting4[ c>>24 ]++; + c = cached; cached = MEM_read32(ip); ip += 4; + Counting1[(BYTE) c ]++; + Counting2[(BYTE)(c>>8) ]++; + Counting3[(BYTE)(c>>16)]++; + Counting4[ c>>24 ]++; + c = cached; cached = MEM_read32(ip); ip += 4; + Counting1[(BYTE) c ]++; + Counting2[(BYTE)(c>>8) ]++; + Counting3[(BYTE)(c>>16)]++; + Counting4[ c>>24 ]++; + c = cached; cached = MEM_read32(ip); ip += 4; + Counting1[(BYTE) c ]++; + Counting2[(BYTE)(c>>8) ]++; + Counting3[(BYTE)(c>>16)]++; + Counting4[ c>>24 ]++; + } + ip-=4; + } + + /* finish last symbols */ + while (ip max) max = Counting1[s]; + } } + + { unsigned maxSymbolValue = 255; + while (!Counting1[maxSymbolValue]) maxSymbolValue--; + if (check && maxSymbolValue > *maxSymbolValuePtr) return ERROR(maxSymbolValue_tooSmall); + *maxSymbolValuePtr = maxSymbolValue; + ZSTD_memmove(count, Counting1, countSize); /* in case count & Counting1 are overlapping */ + } + return (size_t)max; +} + +/* HIST_countFast_wksp() : + * Same as HIST_countFast(), but using an externally provided scratch buffer. + * `workSpace` is a writable buffer which must be 4-bytes aligned, + * `workSpaceSize` must be >= HIST_WKSP_SIZE + */ +size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr, + const void* source, size_t sourceSize, + void* workSpace, size_t workSpaceSize) +{ + if (sourceSize < 1500) /* heuristic threshold */ + return HIST_count_simple(count, maxSymbolValuePtr, source, sourceSize); + if ((size_t)workSpace & 3) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */ + if (workSpaceSize < HIST_WKSP_SIZE) return ERROR(workSpace_tooSmall); + return HIST_count_parallel_wksp(count, maxSymbolValuePtr, source, sourceSize, trustInput, (U32*)workSpace); +} + +/* HIST_count_wksp() : + * Same as HIST_count(), but using an externally provided scratch buffer. + * `workSpace` size must be table of >= HIST_WKSP_SIZE_U32 unsigned */ +size_t HIST_count_wksp(unsigned* count, unsigned* maxSymbolValuePtr, + const void* source, size_t sourceSize, + void* workSpace, size_t workSpaceSize) +{ + if ((size_t)workSpace & 3) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */ + if (workSpaceSize < HIST_WKSP_SIZE) return ERROR(workSpace_tooSmall); + if (*maxSymbolValuePtr < 255) + return HIST_count_parallel_wksp(count, maxSymbolValuePtr, source, sourceSize, checkMaxSymbolValue, (U32*)workSpace); + *maxSymbolValuePtr = 255; + return HIST_countFast_wksp(count, maxSymbolValuePtr, source, sourceSize, workSpace, workSpaceSize); +} + +#ifndef ZSTD_NO_UNUSED_FUNCTIONS +/* fast variant (unsafe : won't check if src contains values beyond count[] limit) */ +size_t HIST_countFast(unsigned* count, unsigned* maxSymbolValuePtr, + const void* source, size_t sourceSize) +{ + unsigned tmpCounters[HIST_WKSP_SIZE_U32]; + return HIST_countFast_wksp(count, maxSymbolValuePtr, source, sourceSize, tmpCounters, sizeof(tmpCounters)); +} + +size_t HIST_count(unsigned* count, unsigned* maxSymbolValuePtr, + const void* src, size_t srcSize) +{ + unsigned tmpCounters[HIST_WKSP_SIZE_U32]; + return HIST_count_wksp(count, maxSymbolValuePtr, src, srcSize, tmpCounters, sizeof(tmpCounters)); +} +#endif diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/hist.h b/cpp/third_party/zstd-1.5.7/lib/compress/hist.h new file mode 100644 index 0000000000..bea2a9ebff --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/hist.h @@ -0,0 +1,82 @@ +/* ****************************************************************** + * hist : Histogram functions + * part of Finite State Entropy project + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + +/* --- dependencies --- */ +#include "../common/zstd_deps.h" /* size_t */ + + +/* --- simple histogram functions --- */ + +/*! HIST_count(): + * Provides the precise count of each byte within a table 'count'. + * 'count' is a table of unsigned int, of minimum size (*maxSymbolValuePtr+1). + * Updates *maxSymbolValuePtr with actual largest symbol value detected. + * @return : count of the most frequent symbol (which isn't identified). + * or an error code, which can be tested using HIST_isError(). + * note : if return == srcSize, there is only one symbol. + */ +size_t HIST_count(unsigned* count, unsigned* maxSymbolValuePtr, + const void* src, size_t srcSize); + +unsigned HIST_isError(size_t code); /**< tells if a return value is an error code */ + + +/* --- advanced histogram functions --- */ + +#define HIST_WKSP_SIZE_U32 1024 +#define HIST_WKSP_SIZE (HIST_WKSP_SIZE_U32 * sizeof(unsigned)) +/** HIST_count_wksp() : + * Same as HIST_count(), but using an externally provided scratch buffer. + * Benefit is this function will use very little stack space. + * `workSpace` is a writable buffer which must be 4-bytes aligned, + * `workSpaceSize` must be >= HIST_WKSP_SIZE + */ +size_t HIST_count_wksp(unsigned* count, unsigned* maxSymbolValuePtr, + const void* src, size_t srcSize, + void* workSpace, size_t workSpaceSize); + +/** HIST_countFast() : + * same as HIST_count(), but blindly trusts that all byte values within src are <= *maxSymbolValuePtr. + * This function is unsafe, and will segfault if any value within `src` is `> *maxSymbolValuePtr` + */ +size_t HIST_countFast(unsigned* count, unsigned* maxSymbolValuePtr, + const void* src, size_t srcSize); + +/** HIST_countFast_wksp() : + * Same as HIST_countFast(), but using an externally provided scratch buffer. + * `workSpace` is a writable buffer which must be 4-bytes aligned, + * `workSpaceSize` must be >= HIST_WKSP_SIZE + */ +size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr, + const void* src, size_t srcSize, + void* workSpace, size_t workSpaceSize); + +/*! HIST_count_simple() : + * Same as HIST_countFast(), this function is unsafe, + * and will segfault if any value within `src` is `> *maxSymbolValuePtr`. + * It is also a bit slower for large inputs. + * However, it does not need any additional memory (not even on stack). + * @return : count of the most frequent symbol. + * Note this function doesn't produce any error (i.e. it must succeed). + */ +unsigned HIST_count_simple(unsigned* count, unsigned* maxSymbolValuePtr, + const void* src, size_t srcSize); + +/*! HIST_add() : + * Lowest level: just add nb of occurrences of characters from @src into @count. + * @count is not reset. @count array is presumed large enough (i.e. 1 KB). + @ This function does not need any additional stack memory. + */ +void HIST_add(unsigned* count, const void* src, size_t srcSize); diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/huf_compress.c b/cpp/third_party/zstd-1.5.7/lib/compress/huf_compress.c new file mode 100644 index 0000000000..ea00072320 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/huf_compress.c @@ -0,0 +1,1464 @@ +/* ****************************************************************** + * Huffman encoder, part of New Generation Entropy library + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy + * - Public forum : https://groups.google.com/forum/#!forum/lz4c + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + +/* ************************************************************** +* Compiler specifics +****************************************************************/ +#ifdef _MSC_VER /* Visual Studio */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +#endif + + +/* ************************************************************** +* Includes +****************************************************************/ +#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memset */ +#include "../common/compiler.h" +#include "../common/bitstream.h" +#include "hist.h" +#define FSE_STATIC_LINKING_ONLY /* FSE_optimalTableLog_internal */ +#include "../common/fse.h" /* header compression */ +#include "../common/huf.h" +#include "../common/error_private.h" +#include "../common/bits.h" /* ZSTD_highbit32 */ + + +/* ************************************************************** +* Error Management +****************************************************************/ +#define HUF_isError ERR_isError +#define HUF_STATIC_ASSERT(c) DEBUG_STATIC_ASSERT(c) /* use only *after* variable declarations */ + + +/* ************************************************************** +* Required declarations +****************************************************************/ +typedef struct nodeElt_s { + U32 count; + U16 parent; + BYTE byte; + BYTE nbBits; +} nodeElt; + + +/* ************************************************************** +* Debug Traces +****************************************************************/ + +#if DEBUGLEVEL >= 2 + +static size_t showU32(const U32* arr, size_t size) +{ + size_t u; + for (u=0; u= add) { + assert(add < align); + assert(((size_t)aligned & mask) == 0); + *workspaceSizePtr -= add; + return aligned; + } else { + *workspaceSizePtr = 0; + return NULL; + } +} + + +/* HUF_compressWeights() : + * Same as FSE_compress(), but dedicated to huff0's weights compression. + * The use case needs much less stack memory. + * Note : all elements within weightTable are supposed to be <= HUF_TABLELOG_MAX. + */ +#define MAX_FSE_TABLELOG_FOR_HUFF_HEADER 6 + +typedef struct { + FSE_CTable CTable[FSE_CTABLE_SIZE_U32(MAX_FSE_TABLELOG_FOR_HUFF_HEADER, HUF_TABLELOG_MAX)]; + U32 scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)]; + unsigned count[HUF_TABLELOG_MAX+1]; + S16 norm[HUF_TABLELOG_MAX+1]; +} HUF_CompressWeightsWksp; + +static size_t +HUF_compressWeights(void* dst, size_t dstSize, + const void* weightTable, size_t wtSize, + void* workspace, size_t workspaceSize) +{ + BYTE* const ostart = (BYTE*) dst; + BYTE* op = ostart; + BYTE* const oend = ostart + dstSize; + + unsigned maxSymbolValue = HUF_TABLELOG_MAX; + U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; + HUF_CompressWeightsWksp* wksp = (HUF_CompressWeightsWksp*)HUF_alignUpWorkspace(workspace, &workspaceSize, ZSTD_ALIGNOF(U32)); + + if (workspaceSize < sizeof(HUF_CompressWeightsWksp)) return ERROR(GENERIC); + + /* init conditions */ + if (wtSize <= 1) return 0; /* Not compressible */ + + /* Scan input and build symbol stats */ + { unsigned const maxCount = HIST_count_simple(wksp->count, &maxSymbolValue, weightTable, wtSize); /* never fails */ + if (maxCount == wtSize) return 1; /* only a single symbol in src : rle */ + if (maxCount == 1) return 0; /* each symbol present maximum once => not compressible */ + } + + tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue); + CHECK_F( FSE_normalizeCount(wksp->norm, tableLog, wksp->count, wtSize, maxSymbolValue, /* useLowProbCount */ 0) ); + + /* Write table description header */ + { CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), wksp->norm, maxSymbolValue, tableLog) ); + op += hSize; + } + + /* Compress */ + CHECK_F( FSE_buildCTable_wksp(wksp->CTable, wksp->norm, maxSymbolValue, tableLog, wksp->scratchBuffer, sizeof(wksp->scratchBuffer)) ); + { CHECK_V_F(cSize, FSE_compress_usingCTable(op, (size_t)(oend - op), weightTable, wtSize, wksp->CTable) ); + if (cSize == 0) return 0; /* not enough space for compressed data */ + op += cSize; + } + + return (size_t)(op-ostart); +} + +static size_t HUF_getNbBits(HUF_CElt elt) +{ + return elt & 0xFF; +} + +static size_t HUF_getNbBitsFast(HUF_CElt elt) +{ + return elt; +} + +static size_t HUF_getValue(HUF_CElt elt) +{ + return elt & ~(size_t)0xFF; +} + +static size_t HUF_getValueFast(HUF_CElt elt) +{ + return elt; +} + +static void HUF_setNbBits(HUF_CElt* elt, size_t nbBits) +{ + assert(nbBits <= HUF_TABLELOG_ABSOLUTEMAX); + *elt = nbBits; +} + +static void HUF_setValue(HUF_CElt* elt, size_t value) +{ + size_t const nbBits = HUF_getNbBits(*elt); + if (nbBits > 0) { + assert((value >> nbBits) == 0); + *elt |= value << (sizeof(HUF_CElt) * 8 - nbBits); + } +} + +HUF_CTableHeader HUF_readCTableHeader(HUF_CElt const* ctable) +{ + HUF_CTableHeader header; + ZSTD_memcpy(&header, ctable, sizeof(header)); + return header; +} + +static void HUF_writeCTableHeader(HUF_CElt* ctable, U32 tableLog, U32 maxSymbolValue) +{ + HUF_CTableHeader header; + HUF_STATIC_ASSERT(sizeof(ctable[0]) == sizeof(header)); + ZSTD_memset(&header, 0, sizeof(header)); + assert(tableLog < 256); + header.tableLog = (BYTE)tableLog; + assert(maxSymbolValue < 256); + header.maxSymbolValue = (BYTE)maxSymbolValue; + ZSTD_memcpy(ctable, &header, sizeof(header)); +} + +typedef struct { + HUF_CompressWeightsWksp wksp; + BYTE bitsToWeight[HUF_TABLELOG_MAX + 1]; /* precomputed conversion table */ + BYTE huffWeight[HUF_SYMBOLVALUE_MAX]; +} HUF_WriteCTableWksp; + +size_t HUF_writeCTable_wksp(void* dst, size_t maxDstSize, + const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog, + void* workspace, size_t workspaceSize) +{ + HUF_CElt const* const ct = CTable + 1; + BYTE* op = (BYTE*)dst; + U32 n; + HUF_WriteCTableWksp* wksp = (HUF_WriteCTableWksp*)HUF_alignUpWorkspace(workspace, &workspaceSize, ZSTD_ALIGNOF(U32)); + + HUF_STATIC_ASSERT(HUF_CTABLE_WORKSPACE_SIZE >= sizeof(HUF_WriteCTableWksp)); + + assert(HUF_readCTableHeader(CTable).maxSymbolValue == maxSymbolValue); + assert(HUF_readCTableHeader(CTable).tableLog == huffLog); + + /* check conditions */ + if (workspaceSize < sizeof(HUF_WriteCTableWksp)) return ERROR(GENERIC); + if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); + + /* convert to weight */ + wksp->bitsToWeight[0] = 0; + for (n=1; nbitsToWeight[n] = (BYTE)(huffLog + 1 - n); + for (n=0; nhuffWeight[n] = wksp->bitsToWeight[HUF_getNbBits(ct[n])]; + + /* attempt weights compression by FSE */ + if (maxDstSize < 1) return ERROR(dstSize_tooSmall); + { CHECK_V_F(hSize, HUF_compressWeights(op+1, maxDstSize-1, wksp->huffWeight, maxSymbolValue, &wksp->wksp, sizeof(wksp->wksp)) ); + if ((hSize>1) & (hSize < maxSymbolValue/2)) { /* FSE compressed */ + op[0] = (BYTE)hSize; + return hSize+1; + } } + + /* write raw values as 4-bits (max : 15) */ + if (maxSymbolValue > (256-128)) return ERROR(GENERIC); /* should not happen : likely means source cannot be compressed */ + if (((maxSymbolValue+1)/2) + 1 > maxDstSize) return ERROR(dstSize_tooSmall); /* not enough space within dst buffer */ + op[0] = (BYTE)(128 /*special case*/ + (maxSymbolValue-1)); + wksp->huffWeight[maxSymbolValue] = 0; /* to be sure it doesn't cause msan issue in final combination */ + for (n=0; nhuffWeight[n] << 4) + wksp->huffWeight[n+1]); + return ((maxSymbolValue+1)/2) + 1; +} + + +size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned* hasZeroWeights) +{ + BYTE huffWeight[HUF_SYMBOLVALUE_MAX + 1]; /* init not required, even though some static analyzer may complain */ + U32 rankVal[HUF_TABLELOG_ABSOLUTEMAX + 1]; /* large enough for values from 0 to 16 */ + U32 tableLog = 0; + U32 nbSymbols = 0; + HUF_CElt* const ct = CTable + 1; + + /* get symbol weights */ + CHECK_V_F(readSize, HUF_readStats(huffWeight, HUF_SYMBOLVALUE_MAX+1, rankVal, &nbSymbols, &tableLog, src, srcSize)); + *hasZeroWeights = (rankVal[0] > 0); + + /* check result */ + if (tableLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge); + if (nbSymbols > *maxSymbolValuePtr+1) return ERROR(maxSymbolValue_tooSmall); + + *maxSymbolValuePtr = nbSymbols - 1; + + HUF_writeCTableHeader(CTable, tableLog, *maxSymbolValuePtr); + + /* Prepare base value per rank */ + { U32 n, nextRankStart = 0; + for (n=1; n<=tableLog; n++) { + U32 curr = nextRankStart; + nextRankStart += (rankVal[n] << (n-1)); + rankVal[n] = curr; + } } + + /* fill nbBits */ + { U32 n; for (n=0; nn=tableLog+1 */ + U16 valPerRank[HUF_TABLELOG_MAX+2] = {0}; + { U32 n; for (n=0; n0; n--) { /* start at n=tablelog <-> w=1 */ + valPerRank[n] = min; /* get starting value within each rank */ + min += nbPerRank[n]; + min >>= 1; + } } + /* assign value within rank, symbol order */ + { U32 n; for (n=0; n HUF_readCTableHeader(CTable).maxSymbolValue) + return 0; + return (U32)HUF_getNbBits(ct[symbolValue]); +} + + +/** + * HUF_setMaxHeight(): + * Try to enforce @targetNbBits on the Huffman tree described in @huffNode. + * + * It attempts to convert all nodes with nbBits > @targetNbBits + * to employ @targetNbBits instead. Then it adjusts the tree + * so that it remains a valid canonical Huffman tree. + * + * @pre The sum of the ranks of each symbol == 2^largestBits, + * where largestBits == huffNode[lastNonNull].nbBits. + * @post The sum of the ranks of each symbol == 2^largestBits, + * where largestBits is the return value (expected <= targetNbBits). + * + * @param huffNode The Huffman tree modified in place to enforce targetNbBits. + * It's presumed sorted, from most frequent to rarest symbol. + * @param lastNonNull The symbol with the lowest count in the Huffman tree. + * @param targetNbBits The allowed number of bits, which the Huffman tree + * may not respect. After this function the Huffman tree will + * respect targetNbBits. + * @return The maximum number of bits of the Huffman tree after adjustment. + */ +static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 targetNbBits) +{ + const U32 largestBits = huffNode[lastNonNull].nbBits; + /* early exit : no elt > targetNbBits, so the tree is already valid. */ + if (largestBits <= targetNbBits) return largestBits; + + DEBUGLOG(5, "HUF_setMaxHeight (targetNbBits = %u)", targetNbBits); + + /* there are several too large elements (at least >= 2) */ + { int totalCost = 0; + const U32 baseCost = 1 << (largestBits - targetNbBits); + int n = (int)lastNonNull; + + /* Adjust any ranks > targetNbBits to targetNbBits. + * Compute totalCost, which is how far the sum of the ranks is + * we are over 2^largestBits after adjust the offending ranks. + */ + while (huffNode[n].nbBits > targetNbBits) { + totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); + huffNode[n].nbBits = (BYTE)targetNbBits; + n--; + } + /* n stops at huffNode[n].nbBits <= targetNbBits */ + assert(huffNode[n].nbBits <= targetNbBits); + /* n end at index of smallest symbol using < targetNbBits */ + while (huffNode[n].nbBits == targetNbBits) --n; + + /* renorm totalCost from 2^largestBits to 2^targetNbBits + * note : totalCost is necessarily a multiple of baseCost */ + assert(((U32)totalCost & (baseCost - 1)) == 0); + totalCost >>= (largestBits - targetNbBits); + assert(totalCost > 0); + + /* repay normalized cost */ + { U32 const noSymbol = 0xF0F0F0F0; + U32 rankLast[HUF_TABLELOG_MAX+2]; + + /* Get pos of last (smallest = lowest cum. count) symbol per rank */ + ZSTD_memset(rankLast, 0xF0, sizeof(rankLast)); + { U32 currentNbBits = targetNbBits; + int pos; + for (pos=n ; pos >= 0; pos--) { + if (huffNode[pos].nbBits >= currentNbBits) continue; + currentNbBits = huffNode[pos].nbBits; /* < targetNbBits */ + rankLast[targetNbBits-currentNbBits] = (U32)pos; + } } + + while (totalCost > 0) { + /* Try to reduce the next power of 2 above totalCost because we + * gain back half the rank. + */ + U32 nBitsToDecrease = ZSTD_highbit32((U32)totalCost) + 1; + for ( ; nBitsToDecrease > 1; nBitsToDecrease--) { + U32 const highPos = rankLast[nBitsToDecrease]; + U32 const lowPos = rankLast[nBitsToDecrease-1]; + if (highPos == noSymbol) continue; + /* Decrease highPos if no symbols of lowPos or if it is + * not cheaper to remove 2 lowPos than highPos. + */ + if (lowPos == noSymbol) break; + { U32 const highTotal = huffNode[highPos].count; + U32 const lowTotal = 2 * huffNode[lowPos].count; + if (highTotal <= lowTotal) break; + } } + /* only triggered when no more rank 1 symbol left => find closest one (note : there is necessarily at least one !) */ + assert(rankLast[nBitsToDecrease] != noSymbol || nBitsToDecrease == 1); + /* HUF_MAX_TABLELOG test just to please gcc 5+; but it should not be necessary */ + while ((nBitsToDecrease<=HUF_TABLELOG_MAX) && (rankLast[nBitsToDecrease] == noSymbol)) + nBitsToDecrease++; + assert(rankLast[nBitsToDecrease] != noSymbol); + /* Increase the number of bits to gain back half the rank cost. */ + totalCost -= 1 << (nBitsToDecrease-1); + huffNode[rankLast[nBitsToDecrease]].nbBits++; + + /* Fix up the new rank. + * If the new rank was empty, this symbol is now its smallest. + * Otherwise, this symbol will be the largest in the new rank so no adjustment. + */ + if (rankLast[nBitsToDecrease-1] == noSymbol) + rankLast[nBitsToDecrease-1] = rankLast[nBitsToDecrease]; + /* Fix up the old rank. + * If the symbol was at position 0, meaning it was the highest weight symbol in the tree, + * it must be the only symbol in its rank, so the old rank now has no symbols. + * Otherwise, since the Huffman nodes are sorted by count, the previous position is now + * the smallest node in the rank. If the previous position belongs to a different rank, + * then the rank is now empty. + */ + if (rankLast[nBitsToDecrease] == 0) /* special case, reached largest symbol */ + rankLast[nBitsToDecrease] = noSymbol; + else { + rankLast[nBitsToDecrease]--; + if (huffNode[rankLast[nBitsToDecrease]].nbBits != targetNbBits-nBitsToDecrease) + rankLast[nBitsToDecrease] = noSymbol; /* this rank is now empty */ + } + } /* while (totalCost > 0) */ + + /* If we've removed too much weight, then we have to add it back. + * To avoid overshooting again, we only adjust the smallest rank. + * We take the largest nodes from the lowest rank 0 and move them + * to rank 1. There's guaranteed to be enough rank 0 symbols because + * TODO. + */ + while (totalCost < 0) { /* Sometimes, cost correction overshoot */ + /* special case : no rank 1 symbol (using targetNbBits-1); + * let's create one from largest rank 0 (using targetNbBits). + */ + if (rankLast[1] == noSymbol) { + while (huffNode[n].nbBits == targetNbBits) n--; + huffNode[n+1].nbBits--; + assert(n >= 0); + rankLast[1] = (U32)(n+1); + totalCost++; + continue; + } + huffNode[ rankLast[1] + 1 ].nbBits--; + rankLast[1]++; + totalCost ++; + } + } /* repay normalized cost */ + } /* there are several too large elements (at least >= 2) */ + + return targetNbBits; +} + +typedef struct { + U16 base; + U16 curr; +} rankPos; + +typedef nodeElt huffNodeTable[2 * (HUF_SYMBOLVALUE_MAX + 1)]; + +/* Number of buckets available for HUF_sort() */ +#define RANK_POSITION_TABLE_SIZE 192 + +typedef struct { + huffNodeTable huffNodeTbl; + rankPos rankPosition[RANK_POSITION_TABLE_SIZE]; +} HUF_buildCTable_wksp_tables; + +/* RANK_POSITION_DISTINCT_COUNT_CUTOFF == Cutoff point in HUF_sort() buckets for which we use log2 bucketing. + * Strategy is to use as many buckets as possible for representing distinct + * counts while using the remainder to represent all "large" counts. + * + * To satisfy this requirement for 192 buckets, we can do the following: + * Let buckets 0-166 represent distinct counts of [0, 166] + * Let buckets 166 to 192 represent all remaining counts up to RANK_POSITION_MAX_COUNT_LOG using log2 bucketing. + */ +#define RANK_POSITION_MAX_COUNT_LOG 32 +#define RANK_POSITION_LOG_BUCKETS_BEGIN ((RANK_POSITION_TABLE_SIZE - 1) - RANK_POSITION_MAX_COUNT_LOG - 1 /* == 158 */) +#define RANK_POSITION_DISTINCT_COUNT_CUTOFF (RANK_POSITION_LOG_BUCKETS_BEGIN + ZSTD_highbit32(RANK_POSITION_LOG_BUCKETS_BEGIN) /* == 166 */) + +/* Return the appropriate bucket index for a given count. See definition of + * RANK_POSITION_DISTINCT_COUNT_CUTOFF for explanation of bucketing strategy. + */ +static U32 HUF_getIndex(U32 const count) { + return (count < RANK_POSITION_DISTINCT_COUNT_CUTOFF) + ? count + : ZSTD_highbit32(count) + RANK_POSITION_LOG_BUCKETS_BEGIN; +} + +/* Helper swap function for HUF_quickSortPartition() */ +static void HUF_swapNodes(nodeElt* a, nodeElt* b) { + nodeElt tmp = *a; + *a = *b; + *b = tmp; +} + +/* Returns 0 if the huffNode array is not sorted by descending count */ +MEM_STATIC int HUF_isSorted(nodeElt huffNode[], U32 const maxSymbolValue1) { + U32 i; + for (i = 1; i < maxSymbolValue1; ++i) { + if (huffNode[i].count > huffNode[i-1].count) { + return 0; + } + } + return 1; +} + +/* Insertion sort by descending order */ +HINT_INLINE void HUF_insertionSort(nodeElt huffNode[], int const low, int const high) { + int i; + int const size = high-low+1; + huffNode += low; + for (i = 1; i < size; ++i) { + nodeElt const key = huffNode[i]; + int j = i - 1; + while (j >= 0 && huffNode[j].count < key.count) { + huffNode[j + 1] = huffNode[j]; + j--; + } + huffNode[j + 1] = key; + } +} + +/* Pivot helper function for quicksort. */ +static int HUF_quickSortPartition(nodeElt arr[], int const low, int const high) { + /* Simply select rightmost element as pivot. "Better" selectors like + * median-of-three don't experimentally appear to have any benefit. + */ + U32 const pivot = arr[high].count; + int i = low - 1; + int j = low; + for ( ; j < high; j++) { + if (arr[j].count > pivot) { + i++; + HUF_swapNodes(&arr[i], &arr[j]); + } + } + HUF_swapNodes(&arr[i + 1], &arr[high]); + return i + 1; +} + +/* Classic quicksort by descending with partially iterative calls + * to reduce worst case callstack size. + */ +static void HUF_simpleQuickSort(nodeElt arr[], int low, int high) { + int const kInsertionSortThreshold = 8; + if (high - low < kInsertionSortThreshold) { + HUF_insertionSort(arr, low, high); + return; + } + while (low < high) { + int const idx = HUF_quickSortPartition(arr, low, high); + if (idx - low < high - idx) { + HUF_simpleQuickSort(arr, low, idx - 1); + low = idx + 1; + } else { + HUF_simpleQuickSort(arr, idx + 1, high); + high = idx - 1; + } + } +} + +/** + * HUF_sort(): + * Sorts the symbols [0, maxSymbolValue] by count[symbol] in decreasing order. + * This is a typical bucket sorting strategy that uses either quicksort or insertion sort to sort each bucket. + * + * @param[out] huffNode Sorted symbols by decreasing count. Only members `.count` and `.byte` are filled. + * Must have (maxSymbolValue + 1) entries. + * @param[in] count Histogram of the symbols. + * @param[in] maxSymbolValue Maximum symbol value. + * @param rankPosition This is a scratch workspace. Must have RANK_POSITION_TABLE_SIZE entries. + */ +static void HUF_sort(nodeElt huffNode[], const unsigned count[], U32 const maxSymbolValue, rankPos rankPosition[]) { + U32 n; + U32 const maxSymbolValue1 = maxSymbolValue+1; + + /* Compute base and set curr to base. + * For symbol s let lowerRank = HUF_getIndex(count[n]) and rank = lowerRank + 1. + * See HUF_getIndex to see bucketing strategy. + * We attribute each symbol to lowerRank's base value, because we want to know where + * each rank begins in the output, so for rank R we want to count ranks R+1 and above. + */ + ZSTD_memset(rankPosition, 0, sizeof(*rankPosition) * RANK_POSITION_TABLE_SIZE); + for (n = 0; n < maxSymbolValue1; ++n) { + U32 lowerRank = HUF_getIndex(count[n]); + assert(lowerRank < RANK_POSITION_TABLE_SIZE - 1); + rankPosition[lowerRank].base++; + } + + assert(rankPosition[RANK_POSITION_TABLE_SIZE - 1].base == 0); + /* Set up the rankPosition table */ + for (n = RANK_POSITION_TABLE_SIZE - 1; n > 0; --n) { + rankPosition[n-1].base += rankPosition[n].base; + rankPosition[n-1].curr = rankPosition[n-1].base; + } + + /* Insert each symbol into their appropriate bucket, setting up rankPosition table. */ + for (n = 0; n < maxSymbolValue1; ++n) { + U32 const c = count[n]; + U32 const r = HUF_getIndex(c) + 1; + U32 const pos = rankPosition[r].curr++; + assert(pos < maxSymbolValue1); + huffNode[pos].count = c; + huffNode[pos].byte = (BYTE)n; + } + + /* Sort each bucket. */ + for (n = RANK_POSITION_DISTINCT_COUNT_CUTOFF; n < RANK_POSITION_TABLE_SIZE - 1; ++n) { + int const bucketSize = rankPosition[n].curr - rankPosition[n].base; + U32 const bucketStartIdx = rankPosition[n].base; + if (bucketSize > 1) { + assert(bucketStartIdx < maxSymbolValue1); + HUF_simpleQuickSort(huffNode + bucketStartIdx, 0, bucketSize-1); + } + } + + assert(HUF_isSorted(huffNode, maxSymbolValue1)); +} + + +/** HUF_buildCTable_wksp() : + * Same as HUF_buildCTable(), but using externally allocated scratch buffer. + * `workSpace` must be aligned on 4-bytes boundaries, and be at least as large as sizeof(HUF_buildCTable_wksp_tables). + */ +#define STARTNODE (HUF_SYMBOLVALUE_MAX+1) + +/* HUF_buildTree(): + * Takes the huffNode array sorted by HUF_sort() and builds an unlimited-depth Huffman tree. + * + * @param huffNode The array sorted by HUF_sort(). Builds the Huffman tree in this array. + * @param maxSymbolValue The maximum symbol value. + * @return The smallest node in the Huffman tree (by count). + */ +static int HUF_buildTree(nodeElt* huffNode, U32 maxSymbolValue) +{ + nodeElt* const huffNode0 = huffNode - 1; + int nonNullRank; + int lowS, lowN; + int nodeNb = STARTNODE; + int n, nodeRoot; + DEBUGLOG(5, "HUF_buildTree (alphabet size = %u)", maxSymbolValue + 1); + /* init for parents */ + nonNullRank = (int)maxSymbolValue; + while(huffNode[nonNullRank].count == 0) nonNullRank--; + lowS = nonNullRank; nodeRoot = nodeNb + lowS - 1; lowN = nodeNb; + huffNode[nodeNb].count = huffNode[lowS].count + huffNode[lowS-1].count; + huffNode[lowS].parent = huffNode[lowS-1].parent = (U16)nodeNb; + nodeNb++; lowS-=2; + for (n=nodeNb; n<=nodeRoot; n++) huffNode[n].count = (U32)(1U<<30); + huffNode0[0].count = (U32)(1U<<31); /* fake entry, strong barrier */ + + /* create parents */ + while (nodeNb <= nodeRoot) { + int const n1 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; + int const n2 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; + huffNode[nodeNb].count = huffNode[n1].count + huffNode[n2].count; + huffNode[n1].parent = huffNode[n2].parent = (U16)nodeNb; + nodeNb++; + } + + /* distribute weights (unlimited tree height) */ + huffNode[nodeRoot].nbBits = 0; + for (n=nodeRoot-1; n>=STARTNODE; n--) + huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; + for (n=0; n<=nonNullRank; n++) + huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; + + DEBUGLOG(6, "Initial distribution of bits completed (%zu sorted symbols)", showHNodeBits(huffNode, maxSymbolValue+1)); + + return nonNullRank; +} + +/** + * HUF_buildCTableFromTree(): + * Build the CTable given the Huffman tree in huffNode. + * + * @param[out] CTable The output Huffman CTable. + * @param huffNode The Huffman tree. + * @param nonNullRank The last and smallest node in the Huffman tree. + * @param maxSymbolValue The maximum symbol value. + * @param maxNbBits The exact maximum number of bits used in the Huffman tree. + */ +static void HUF_buildCTableFromTree(HUF_CElt* CTable, nodeElt const* huffNode, int nonNullRank, U32 maxSymbolValue, U32 maxNbBits) +{ + HUF_CElt* const ct = CTable + 1; + /* fill result into ctable (val, nbBits) */ + int n; + U16 nbPerRank[HUF_TABLELOG_MAX+1] = {0}; + U16 valPerRank[HUF_TABLELOG_MAX+1] = {0}; + int const alphabetSize = (int)(maxSymbolValue + 1); + for (n=0; n<=nonNullRank; n++) + nbPerRank[huffNode[n].nbBits]++; + /* determine starting value per rank */ + { U16 min = 0; + for (n=(int)maxNbBits; n>0; n--) { + valPerRank[n] = min; /* get starting value within each rank */ + min += nbPerRank[n]; + min >>= 1; + } } + for (n=0; nhuffNodeTbl; + nodeElt* const huffNode = huffNode0+1; + int nonNullRank; + + HUF_STATIC_ASSERT(HUF_CTABLE_WORKSPACE_SIZE == sizeof(HUF_buildCTable_wksp_tables)); + + DEBUGLOG(5, "HUF_buildCTable_wksp (alphabet size = %u)", maxSymbolValue+1); + + /* safety checks */ + if (wkspSize < sizeof(HUF_buildCTable_wksp_tables)) + return ERROR(workSpace_tooSmall); + if (maxNbBits == 0) maxNbBits = HUF_TABLELOG_DEFAULT; + if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) + return ERROR(maxSymbolValue_tooLarge); + ZSTD_memset(huffNode0, 0, sizeof(huffNodeTable)); + + /* sort, decreasing order */ + HUF_sort(huffNode, count, maxSymbolValue, wksp_tables->rankPosition); + DEBUGLOG(6, "sorted symbols completed (%zu symbols)", showHNodeSymbols(huffNode, maxSymbolValue+1)); + + /* build tree */ + nonNullRank = HUF_buildTree(huffNode, maxSymbolValue); + + /* determine and enforce maxTableLog */ + maxNbBits = HUF_setMaxHeight(huffNode, (U32)nonNullRank, maxNbBits); + if (maxNbBits > HUF_TABLELOG_MAX) return ERROR(GENERIC); /* check fit into table */ + + HUF_buildCTableFromTree(CTable, huffNode, nonNullRank, maxSymbolValue, maxNbBits); + + return maxNbBits; +} + +size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) +{ + HUF_CElt const* ct = CTable + 1; + size_t nbBits = 0; + int s; + for (s = 0; s <= (int)maxSymbolValue; ++s) { + nbBits += HUF_getNbBits(ct[s]) * count[s]; + } + return nbBits >> 3; +} + +int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) { + HUF_CTableHeader header = HUF_readCTableHeader(CTable); + HUF_CElt const* ct = CTable + 1; + int bad = 0; + int s; + + assert(header.tableLog <= HUF_TABLELOG_ABSOLUTEMAX); + + if (header.maxSymbolValue < maxSymbolValue) + return 0; + + for (s = 0; s <= (int)maxSymbolValue; ++s) { + bad |= (count[s] != 0) & (HUF_getNbBits(ct[s]) == 0); + } + return !bad; +} + +size_t HUF_compressBound(size_t size) { return HUF_COMPRESSBOUND(size); } + +/** HUF_CStream_t: + * Huffman uses its own BIT_CStream_t implementation. + * There are three major differences from BIT_CStream_t: + * 1. HUF_addBits() takes a HUF_CElt (size_t) which is + * the pair (nbBits, value) in the format: + * format: + * - Bits [0, 4) = nbBits + * - Bits [4, 64 - nbBits) = 0 + * - Bits [64 - nbBits, 64) = value + * 2. The bitContainer is built from the upper bits and + * right shifted. E.g. to add a new value of N bits + * you right shift the bitContainer by N, then or in + * the new value into the N upper bits. + * 3. The bitstream has two bit containers. You can add + * bits to the second container and merge them into + * the first container. + */ + +#define HUF_BITS_IN_CONTAINER (sizeof(size_t) * 8) + +typedef struct { + size_t bitContainer[2]; + size_t bitPos[2]; + + BYTE* startPtr; + BYTE* ptr; + BYTE* endPtr; +} HUF_CStream_t; + +/**! HUF_initCStream(): + * Initializes the bitstream. + * @returns 0 or an error code. + */ +static size_t HUF_initCStream(HUF_CStream_t* bitC, + void* startPtr, size_t dstCapacity) +{ + ZSTD_memset(bitC, 0, sizeof(*bitC)); + bitC->startPtr = (BYTE*)startPtr; + bitC->ptr = bitC->startPtr; + bitC->endPtr = bitC->startPtr + dstCapacity - sizeof(bitC->bitContainer[0]); + if (dstCapacity <= sizeof(bitC->bitContainer[0])) return ERROR(dstSize_tooSmall); + return 0; +} + +/*! HUF_addBits(): + * Adds the symbol stored in HUF_CElt elt to the bitstream. + * + * @param elt The element we're adding. This is a (nbBits, value) pair. + * See the HUF_CStream_t docs for the format. + * @param idx Insert into the bitstream at this idx. + * @param kFast This is a template parameter. If the bitstream is guaranteed + * to have at least 4 unused bits after this call it may be 1, + * otherwise it must be 0. HUF_addBits() is faster when fast is set. + */ +FORCE_INLINE_TEMPLATE void HUF_addBits(HUF_CStream_t* bitC, HUF_CElt elt, int idx, int kFast) +{ + assert(idx <= 1); + assert(HUF_getNbBits(elt) <= HUF_TABLELOG_ABSOLUTEMAX); + /* This is efficient on x86-64 with BMI2 because shrx + * only reads the low 6 bits of the register. The compiler + * knows this and elides the mask. When fast is set, + * every operation can use the same value loaded from elt. + */ + bitC->bitContainer[idx] >>= HUF_getNbBits(elt); + bitC->bitContainer[idx] |= kFast ? HUF_getValueFast(elt) : HUF_getValue(elt); + /* We only read the low 8 bits of bitC->bitPos[idx] so it + * doesn't matter that the high bits have noise from the value. + */ + bitC->bitPos[idx] += HUF_getNbBitsFast(elt); + assert((bitC->bitPos[idx] & 0xFF) <= HUF_BITS_IN_CONTAINER); + /* The last 4-bits of elt are dirty if fast is set, + * so we must not be overwriting bits that have already been + * inserted into the bit container. + */ +#if DEBUGLEVEL >= 1 + { + size_t const nbBits = HUF_getNbBits(elt); + size_t const dirtyBits = nbBits == 0 ? 0 : ZSTD_highbit32((U32)nbBits) + 1; + (void)dirtyBits; + /* Middle bits are 0. */ + assert(((elt >> dirtyBits) << (dirtyBits + nbBits)) == 0); + /* We didn't overwrite any bits in the bit container. */ + assert(!kFast || (bitC->bitPos[idx] & 0xFF) <= HUF_BITS_IN_CONTAINER); + (void)dirtyBits; + } +#endif +} + +FORCE_INLINE_TEMPLATE void HUF_zeroIndex1(HUF_CStream_t* bitC) +{ + bitC->bitContainer[1] = 0; + bitC->bitPos[1] = 0; +} + +/*! HUF_mergeIndex1() : + * Merges the bit container @ index 1 into the bit container @ index 0 + * and zeros the bit container @ index 1. + */ +FORCE_INLINE_TEMPLATE void HUF_mergeIndex1(HUF_CStream_t* bitC) +{ + assert((bitC->bitPos[1] & 0xFF) < HUF_BITS_IN_CONTAINER); + bitC->bitContainer[0] >>= (bitC->bitPos[1] & 0xFF); + bitC->bitContainer[0] |= bitC->bitContainer[1]; + bitC->bitPos[0] += bitC->bitPos[1]; + assert((bitC->bitPos[0] & 0xFF) <= HUF_BITS_IN_CONTAINER); +} + +/*! HUF_flushBits() : +* Flushes the bits in the bit container @ index 0. +* +* @post bitPos will be < 8. +* @param kFast If kFast is set then we must know a-priori that +* the bit container will not overflow. +*/ +FORCE_INLINE_TEMPLATE void HUF_flushBits(HUF_CStream_t* bitC, int kFast) +{ + /* The upper bits of bitPos are noisy, so we must mask by 0xFF. */ + size_t const nbBits = bitC->bitPos[0] & 0xFF; + size_t const nbBytes = nbBits >> 3; + /* The top nbBits bits of bitContainer are the ones we need. */ + size_t const bitContainer = bitC->bitContainer[0] >> (HUF_BITS_IN_CONTAINER - nbBits); + /* Mask bitPos to account for the bytes we consumed. */ + bitC->bitPos[0] &= 7; + assert(nbBits > 0); + assert(nbBits <= sizeof(bitC->bitContainer[0]) * 8); + assert(bitC->ptr <= bitC->endPtr); + MEM_writeLEST(bitC->ptr, bitContainer); + bitC->ptr += nbBytes; + assert(!kFast || bitC->ptr <= bitC->endPtr); + if (!kFast && bitC->ptr > bitC->endPtr) bitC->ptr = bitC->endPtr; + /* bitContainer doesn't need to be modified because the leftover + * bits are already the top bitPos bits. And we don't care about + * noise in the lower values. + */ +} + +/*! HUF_endMark() + * @returns The Huffman stream end mark: A 1-bit value = 1. + */ +static HUF_CElt HUF_endMark(void) +{ + HUF_CElt endMark; + HUF_setNbBits(&endMark, 1); + HUF_setValue(&endMark, 1); + return endMark; +} + +/*! HUF_closeCStream() : + * @return Size of CStream, in bytes, + * or 0 if it could not fit into dstBuffer */ +static size_t HUF_closeCStream(HUF_CStream_t* bitC) +{ + HUF_addBits(bitC, HUF_endMark(), /* idx */ 0, /* kFast */ 0); + HUF_flushBits(bitC, /* kFast */ 0); + { + size_t const nbBits = bitC->bitPos[0] & 0xFF; + if (bitC->ptr >= bitC->endPtr) return 0; /* overflow detected */ + return (size_t)(bitC->ptr - bitC->startPtr) + (nbBits > 0); + } +} + +FORCE_INLINE_TEMPLATE void +HUF_encodeSymbol(HUF_CStream_t* bitCPtr, U32 symbol, const HUF_CElt* CTable, int idx, int fast) +{ + HUF_addBits(bitCPtr, CTable[symbol], idx, fast); +} + +FORCE_INLINE_TEMPLATE void +HUF_compress1X_usingCTable_internal_body_loop(HUF_CStream_t* bitC, + const BYTE* ip, size_t srcSize, + const HUF_CElt* ct, + int kUnroll, int kFastFlush, int kLastFast) +{ + /* Join to kUnroll */ + int n = (int)srcSize; + int rem = n % kUnroll; + if (rem > 0) { + for (; rem > 0; --rem) { + HUF_encodeSymbol(bitC, ip[--n], ct, 0, /* fast */ 0); + } + HUF_flushBits(bitC, kFastFlush); + } + assert(n % kUnroll == 0); + + /* Join to 2 * kUnroll */ + if (n % (2 * kUnroll)) { + int u; + for (u = 1; u < kUnroll; ++u) { + HUF_encodeSymbol(bitC, ip[n - u], ct, 0, 1); + } + HUF_encodeSymbol(bitC, ip[n - kUnroll], ct, 0, kLastFast); + HUF_flushBits(bitC, kFastFlush); + n -= kUnroll; + } + assert(n % (2 * kUnroll) == 0); + + for (; n>0; n-= 2 * kUnroll) { + /* Encode kUnroll symbols into the bitstream @ index 0. */ + int u; + for (u = 1; u < kUnroll; ++u) { + HUF_encodeSymbol(bitC, ip[n - u], ct, /* idx */ 0, /* fast */ 1); + } + HUF_encodeSymbol(bitC, ip[n - kUnroll], ct, /* idx */ 0, /* fast */ kLastFast); + HUF_flushBits(bitC, kFastFlush); + /* Encode kUnroll symbols into the bitstream @ index 1. + * This allows us to start filling the bit container + * without any data dependencies. + */ + HUF_zeroIndex1(bitC); + for (u = 1; u < kUnroll; ++u) { + HUF_encodeSymbol(bitC, ip[n - kUnroll - u], ct, /* idx */ 1, /* fast */ 1); + } + HUF_encodeSymbol(bitC, ip[n - kUnroll - kUnroll], ct, /* idx */ 1, /* fast */ kLastFast); + /* Merge bitstream @ index 1 into the bitstream @ index 0 */ + HUF_mergeIndex1(bitC); + HUF_flushBits(bitC, kFastFlush); + } + assert(n == 0); + +} + +/** + * Returns a tight upper bound on the output space needed by Huffman + * with 8 bytes buffer to handle over-writes. If the output is at least + * this large we don't need to do bounds checks during Huffman encoding. + */ +static size_t HUF_tightCompressBound(size_t srcSize, size_t tableLog) +{ + return ((srcSize * tableLog) >> 3) + 8; +} + + +FORCE_INLINE_TEMPLATE size_t +HUF_compress1X_usingCTable_internal_body(void* dst, size_t dstSize, + const void* src, size_t srcSize, + const HUF_CElt* CTable) +{ + U32 const tableLog = HUF_readCTableHeader(CTable).tableLog; + HUF_CElt const* ct = CTable + 1; + const BYTE* ip = (const BYTE*) src; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstSize; + HUF_CStream_t bitC; + + /* init */ + if (dstSize < 8) return 0; /* not enough space to compress */ + { BYTE* op = ostart; + size_t const initErr = HUF_initCStream(&bitC, op, (size_t)(oend-op)); + if (HUF_isError(initErr)) return 0; } + + if (dstSize < HUF_tightCompressBound(srcSize, (size_t)tableLog) || tableLog > 11) + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ MEM_32bits() ? 2 : 4, /* kFast */ 0, /* kLastFast */ 0); + else { + if (MEM_32bits()) { + switch (tableLog) { + case 11: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 2, /* kFastFlush */ 1, /* kLastFast */ 0); + break; + case 10: ZSTD_FALLTHROUGH; + case 9: ZSTD_FALLTHROUGH; + case 8: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 2, /* kFastFlush */ 1, /* kLastFast */ 1); + break; + case 7: ZSTD_FALLTHROUGH; + default: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 3, /* kFastFlush */ 1, /* kLastFast */ 1); + break; + } + } else { + switch (tableLog) { + case 11: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 5, /* kFastFlush */ 1, /* kLastFast */ 0); + break; + case 10: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 5, /* kFastFlush */ 1, /* kLastFast */ 1); + break; + case 9: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 6, /* kFastFlush */ 1, /* kLastFast */ 0); + break; + case 8: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 7, /* kFastFlush */ 1, /* kLastFast */ 0); + break; + case 7: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 8, /* kFastFlush */ 1, /* kLastFast */ 0); + break; + case 6: ZSTD_FALLTHROUGH; + default: + HUF_compress1X_usingCTable_internal_body_loop(&bitC, ip, srcSize, ct, /* kUnroll */ 9, /* kFastFlush */ 1, /* kLastFast */ 1); + break; + } + } + } + assert(bitC.ptr <= bitC.endPtr); + + return HUF_closeCStream(&bitC); +} + +#if DYNAMIC_BMI2 + +static BMI2_TARGET_ATTRIBUTE size_t +HUF_compress1X_usingCTable_internal_bmi2(void* dst, size_t dstSize, + const void* src, size_t srcSize, + const HUF_CElt* CTable) +{ + return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); +} + +static size_t +HUF_compress1X_usingCTable_internal_default(void* dst, size_t dstSize, + const void* src, size_t srcSize, + const HUF_CElt* CTable) +{ + return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); +} + +static size_t +HUF_compress1X_usingCTable_internal(void* dst, size_t dstSize, + const void* src, size_t srcSize, + const HUF_CElt* CTable, const int flags) +{ + if (flags & HUF_flags_bmi2) { + return HUF_compress1X_usingCTable_internal_bmi2(dst, dstSize, src, srcSize, CTable); + } + return HUF_compress1X_usingCTable_internal_default(dst, dstSize, src, srcSize, CTable); +} + +#else + +static size_t +HUF_compress1X_usingCTable_internal(void* dst, size_t dstSize, + const void* src, size_t srcSize, + const HUF_CElt* CTable, const int flags) +{ + (void)flags; + return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); +} + +#endif + +size_t HUF_compress1X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags) +{ + return HUF_compress1X_usingCTable_internal(dst, dstSize, src, srcSize, CTable, flags); +} + +static size_t +HUF_compress4X_usingCTable_internal(void* dst, size_t dstSize, + const void* src, size_t srcSize, + const HUF_CElt* CTable, int flags) +{ + size_t const segmentSize = (srcSize+3)/4; /* first 3 segments */ + const BYTE* ip = (const BYTE*) src; + const BYTE* const iend = ip + srcSize; + BYTE* const ostart = (BYTE*) dst; + BYTE* const oend = ostart + dstSize; + BYTE* op = ostart; + + if (dstSize < 6 + 1 + 1 + 1 + 8) return 0; /* minimum space to compress successfully */ + if (srcSize < 12) return 0; /* no saving possible : too small input */ + op += 6; /* jumpTable */ + + assert(op <= oend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, flags) ); + if (cSize == 0 || cSize > 65535) return 0; + MEM_writeLE16(ostart, (U16)cSize); + op += cSize; + } + + ip += segmentSize; + assert(op <= oend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, flags) ); + if (cSize == 0 || cSize > 65535) return 0; + MEM_writeLE16(ostart+2, (U16)cSize); + op += cSize; + } + + ip += segmentSize; + assert(op <= oend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, segmentSize, CTable, flags) ); + if (cSize == 0 || cSize > 65535) return 0; + MEM_writeLE16(ostart+4, (U16)cSize); + op += cSize; + } + + ip += segmentSize; + assert(op <= oend); + assert(ip <= iend); + { CHECK_V_F(cSize, HUF_compress1X_usingCTable_internal(op, (size_t)(oend-op), ip, (size_t)(iend-ip), CTable, flags) ); + if (cSize == 0 || cSize > 65535) return 0; + op += cSize; + } + + return (size_t)(op-ostart); +} + +size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable, int flags) +{ + return HUF_compress4X_usingCTable_internal(dst, dstSize, src, srcSize, CTable, flags); +} + +typedef enum { HUF_singleStream, HUF_fourStreams } HUF_nbStreams_e; + +static size_t HUF_compressCTable_internal( + BYTE* const ostart, BYTE* op, BYTE* const oend, + const void* src, size_t srcSize, + HUF_nbStreams_e nbStreams, const HUF_CElt* CTable, const int flags) +{ + size_t const cSize = (nbStreams==HUF_singleStream) ? + HUF_compress1X_usingCTable_internal(op, (size_t)(oend - op), src, srcSize, CTable, flags) : + HUF_compress4X_usingCTable_internal(op, (size_t)(oend - op), src, srcSize, CTable, flags); + if (HUF_isError(cSize)) { return cSize; } + if (cSize==0) { return 0; } /* uncompressible */ + op += cSize; + /* check compressibility */ + assert(op >= ostart); + if ((size_t)(op-ostart) >= srcSize-1) { return 0; } + return (size_t)(op-ostart); +} + +typedef struct { + unsigned count[HUF_SYMBOLVALUE_MAX + 1]; + HUF_CElt CTable[HUF_CTABLE_SIZE_ST(HUF_SYMBOLVALUE_MAX)]; + union { + HUF_buildCTable_wksp_tables buildCTable_wksp; + HUF_WriteCTableWksp writeCTable_wksp; + U32 hist_wksp[HIST_WKSP_SIZE_U32]; + } wksps; +} HUF_compress_tables_t; + +#define SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE 4096 +#define SUSPECT_INCOMPRESSIBLE_SAMPLE_RATIO 10 /* Must be >= 2 */ + +unsigned HUF_cardinality(const unsigned* count, unsigned maxSymbolValue) +{ + unsigned cardinality = 0; + unsigned i; + + for (i = 0; i < maxSymbolValue + 1; i++) { + if (count[i] != 0) cardinality += 1; + } + + return cardinality; +} + +unsigned HUF_minTableLog(unsigned symbolCardinality) +{ + U32 minBitsSymbols = ZSTD_highbit32(symbolCardinality) + 1; + return minBitsSymbols; +} + +unsigned HUF_optimalTableLog( + unsigned maxTableLog, + size_t srcSize, + unsigned maxSymbolValue, + void* workSpace, size_t wkspSize, + HUF_CElt* table, + const unsigned* count, + int flags) +{ + assert(srcSize > 1); /* Not supported, RLE should be used instead */ + assert(wkspSize >= sizeof(HUF_buildCTable_wksp_tables)); + + if (!(flags & HUF_flags_optimalDepth)) { + /* cheap evaluation, based on FSE */ + return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 1); + } + + { BYTE* dst = (BYTE*)workSpace + sizeof(HUF_WriteCTableWksp); + size_t dstSize = wkspSize - sizeof(HUF_WriteCTableWksp); + size_t hSize, newSize; + const unsigned symbolCardinality = HUF_cardinality(count, maxSymbolValue); + const unsigned minTableLog = HUF_minTableLog(symbolCardinality); + size_t optSize = ((size_t) ~0) - 1; + unsigned optLog = maxTableLog, optLogGuess; + + DEBUGLOG(6, "HUF_optimalTableLog: probing huf depth (srcSize=%zu)", srcSize); + + /* Search until size increases */ + for (optLogGuess = minTableLog; optLogGuess <= maxTableLog; optLogGuess++) { + DEBUGLOG(7, "checking for huffLog=%u", optLogGuess); + + { size_t maxBits = HUF_buildCTable_wksp(table, count, maxSymbolValue, optLogGuess, workSpace, wkspSize); + if (ERR_isError(maxBits)) continue; + + if (maxBits < optLogGuess && optLogGuess > minTableLog) break; + + hSize = HUF_writeCTable_wksp(dst, dstSize, table, maxSymbolValue, (U32)maxBits, workSpace, wkspSize); + } + + if (ERR_isError(hSize)) continue; + + newSize = HUF_estimateCompressedSize(table, count, maxSymbolValue) + hSize; + + if (newSize > optSize + 1) { + break; + } + + if (newSize < optSize) { + optSize = newSize; + optLog = optLogGuess; + } + } + assert(optLog <= HUF_TABLELOG_MAX); + return optLog; + } +} + +/* HUF_compress_internal() : + * `workSpace_align4` must be aligned on 4-bytes boundaries, + * and occupies the same space as a table of HUF_WORKSPACE_SIZE_U64 unsigned */ +static size_t +HUF_compress_internal (void* dst, size_t dstSize, + const void* src, size_t srcSize, + unsigned maxSymbolValue, unsigned huffLog, + HUF_nbStreams_e nbStreams, + void* workSpace, size_t wkspSize, + HUF_CElt* oldHufTable, HUF_repeat* repeat, int flags) +{ + HUF_compress_tables_t* const table = (HUF_compress_tables_t*)HUF_alignUpWorkspace(workSpace, &wkspSize, ZSTD_ALIGNOF(size_t)); + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstSize; + BYTE* op = ostart; + + DEBUGLOG(5, "HUF_compress_internal (srcSize=%zu)", srcSize); + HUF_STATIC_ASSERT(sizeof(*table) + HUF_WORKSPACE_MAX_ALIGNMENT <= HUF_WORKSPACE_SIZE); + + /* checks & inits */ + if (wkspSize < sizeof(*table)) return ERROR(workSpace_tooSmall); + if (!srcSize) return 0; /* Uncompressed */ + if (!dstSize) return 0; /* cannot fit anything within dst budget */ + if (srcSize > HUF_BLOCKSIZE_MAX) return ERROR(srcSize_wrong); /* current block size limit */ + if (huffLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge); + if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); + if (!maxSymbolValue) maxSymbolValue = HUF_SYMBOLVALUE_MAX; + if (!huffLog) huffLog = HUF_TABLELOG_DEFAULT; + + /* Heuristic : If old table is valid, use it for small inputs */ + if ((flags & HUF_flags_preferRepeat) && repeat && *repeat == HUF_repeat_valid) { + return HUF_compressCTable_internal(ostart, op, oend, + src, srcSize, + nbStreams, oldHufTable, flags); + } + + /* If uncompressible data is suspected, do a smaller sampling first */ + DEBUG_STATIC_ASSERT(SUSPECT_INCOMPRESSIBLE_SAMPLE_RATIO >= 2); + if ((flags & HUF_flags_suspectUncompressible) && srcSize >= (SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE * SUSPECT_INCOMPRESSIBLE_SAMPLE_RATIO)) { + size_t largestTotal = 0; + DEBUGLOG(5, "input suspected incompressible : sampling to check"); + { unsigned maxSymbolValueBegin = maxSymbolValue; + CHECK_V_F(largestBegin, HIST_count_simple (table->count, &maxSymbolValueBegin, (const BYTE*)src, SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) ); + largestTotal += largestBegin; + } + { unsigned maxSymbolValueEnd = maxSymbolValue; + CHECK_V_F(largestEnd, HIST_count_simple (table->count, &maxSymbolValueEnd, (const BYTE*)src + srcSize - SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE, SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) ); + largestTotal += largestEnd; + } + if (largestTotal <= ((2 * SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) >> 7)+4) return 0; /* heuristic : probably not compressible enough */ + } + + /* Scan input and build symbol stats */ + { CHECK_V_F(largest, HIST_count_wksp (table->count, &maxSymbolValue, (const BYTE*)src, srcSize, table->wksps.hist_wksp, sizeof(table->wksps.hist_wksp)) ); + if (largest == srcSize) { *ostart = ((const BYTE*)src)[0]; return 1; } /* single symbol, rle */ + if (largest <= (srcSize >> 7)+4) return 0; /* heuristic : probably not compressible enough */ + } + DEBUGLOG(6, "histogram detail completed (%zu symbols)", showU32(table->count, maxSymbolValue+1)); + + /* Check validity of previous table */ + if ( repeat + && *repeat == HUF_repeat_check + && !HUF_validateCTable(oldHufTable, table->count, maxSymbolValue)) { + *repeat = HUF_repeat_none; + } + /* Heuristic : use existing table for small inputs */ + if ((flags & HUF_flags_preferRepeat) && repeat && *repeat != HUF_repeat_none) { + return HUF_compressCTable_internal(ostart, op, oend, + src, srcSize, + nbStreams, oldHufTable, flags); + } + + /* Build Huffman Tree */ + huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue, &table->wksps, sizeof(table->wksps), table->CTable, table->count, flags); + { size_t const maxBits = HUF_buildCTable_wksp(table->CTable, table->count, + maxSymbolValue, huffLog, + &table->wksps.buildCTable_wksp, sizeof(table->wksps.buildCTable_wksp)); + CHECK_F(maxBits); + huffLog = (U32)maxBits; + DEBUGLOG(6, "bit distribution completed (%zu symbols)", showCTableBits(table->CTable + 1, maxSymbolValue+1)); + } + + /* Write table description header */ + { CHECK_V_F(hSize, HUF_writeCTable_wksp(op, dstSize, table->CTable, maxSymbolValue, huffLog, + &table->wksps.writeCTable_wksp, sizeof(table->wksps.writeCTable_wksp)) ); + /* Check if using previous huffman table is beneficial */ + if (repeat && *repeat != HUF_repeat_none) { + size_t const oldSize = HUF_estimateCompressedSize(oldHufTable, table->count, maxSymbolValue); + size_t const newSize = HUF_estimateCompressedSize(table->CTable, table->count, maxSymbolValue); + if (oldSize <= hSize + newSize || hSize + 12 >= srcSize) { + return HUF_compressCTable_internal(ostart, op, oend, + src, srcSize, + nbStreams, oldHufTable, flags); + } } + + /* Use the new huffman table */ + if (hSize + 12ul >= srcSize) { return 0; } + op += hSize; + if (repeat) { *repeat = HUF_repeat_none; } + if (oldHufTable) + ZSTD_memcpy(oldHufTable, table->CTable, sizeof(table->CTable)); /* Save new table */ + } + return HUF_compressCTable_internal(ostart, op, oend, + src, srcSize, + nbStreams, table->CTable, flags); +} + +size_t HUF_compress1X_repeat (void* dst, size_t dstSize, + const void* src, size_t srcSize, + unsigned maxSymbolValue, unsigned huffLog, + void* workSpace, size_t wkspSize, + HUF_CElt* hufTable, HUF_repeat* repeat, int flags) +{ + DEBUGLOG(5, "HUF_compress1X_repeat (srcSize = %zu)", srcSize); + return HUF_compress_internal(dst, dstSize, src, srcSize, + maxSymbolValue, huffLog, HUF_singleStream, + workSpace, wkspSize, hufTable, + repeat, flags); +} + +/* HUF_compress4X_repeat(): + * compress input using 4 streams. + * consider skipping quickly + * reuse an existing huffman compression table */ +size_t HUF_compress4X_repeat (void* dst, size_t dstSize, + const void* src, size_t srcSize, + unsigned maxSymbolValue, unsigned huffLog, + void* workSpace, size_t wkspSize, + HUF_CElt* hufTable, HUF_repeat* repeat, int flags) +{ + DEBUGLOG(5, "HUF_compress4X_repeat (srcSize = %zu)", srcSize); + return HUF_compress_internal(dst, dstSize, src, srcSize, + maxSymbolValue, huffLog, HUF_fourStreams, + workSpace, wkspSize, + hufTable, repeat, flags); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress.c new file mode 100644 index 0000000000..d928b1d3ee --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress.c @@ -0,0 +1,7843 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/*-************************************* +* Dependencies +***************************************/ +#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customCalloc, ZSTD_customFree */ +#include "../common/zstd_deps.h" /* INT_MAX, ZSTD_memset, ZSTD_memcpy */ +#include "../common/mem.h" +#include "../common/error_private.h" +#include "hist.h" /* HIST_countFast_wksp */ +#define FSE_STATIC_LINKING_ONLY /* FSE_encodeSymbol */ +#include "../common/fse.h" +#include "../common/huf.h" +#include "zstd_compress_internal.h" +#include "zstd_compress_sequences.h" +#include "zstd_compress_literals.h" +#include "zstd_fast.h" +#include "zstd_double_fast.h" +#include "zstd_lazy.h" +#include "zstd_opt.h" +#include "zstd_ldm.h" +#include "zstd_compress_superblock.h" +#include "../common/bits.h" /* ZSTD_highbit32, ZSTD_rotateRight_U64 */ + +/* *************************************************************** +* Tuning parameters +*****************************************************************/ +/*! + * COMPRESS_HEAPMODE : + * Select how default decompression function ZSTD_compress() allocates its context, + * on stack (0, default), or into heap (1). + * Note that functions with explicit context such as ZSTD_compressCCtx() are unaffected. + */ +#ifndef ZSTD_COMPRESS_HEAPMODE +# define ZSTD_COMPRESS_HEAPMODE 0 +#endif + +/*! + * ZSTD_HASHLOG3_MAX : + * Maximum size of the hash table dedicated to find 3-bytes matches, + * in log format, aka 17 => 1 << 17 == 128Ki positions. + * This structure is only used in zstd_opt. + * Since allocation is centralized for all strategies, it has to be known here. + * The actual (selected) size of the hash table is then stored in ZSTD_MatchState_t.hashLog3, + * so that zstd_opt.c doesn't need to know about this constant. + */ +#ifndef ZSTD_HASHLOG3_MAX +# define ZSTD_HASHLOG3_MAX 17 +#endif + +/*-************************************* +* Helper functions +***************************************/ +/* ZSTD_compressBound() + * Note that the result from this function is only valid for + * the one-pass compression functions. + * When employing the streaming mode, + * if flushes are frequently altering the size of blocks, + * the overhead from block headers can make the compressed data larger + * than the return value of ZSTD_compressBound(). + */ +size_t ZSTD_compressBound(size_t srcSize) { + size_t const r = ZSTD_COMPRESSBOUND(srcSize); + if (r==0) return ERROR(srcSize_wrong); + return r; +} + + +/*-************************************* +* Context memory management +***************************************/ +struct ZSTD_CDict_s { + const void* dictContent; + size_t dictContentSize; + ZSTD_dictContentType_e dictContentType; /* The dictContentType the CDict was created with */ + U32* entropyWorkspace; /* entropy workspace of HUF_WORKSPACE_SIZE bytes */ + ZSTD_cwksp workspace; + ZSTD_MatchState_t matchState; + ZSTD_compressedBlockState_t cBlockState; + ZSTD_customMem customMem; + U32 dictID; + int compressionLevel; /* 0 indicates that advanced API was used to select CDict params */ + ZSTD_ParamSwitch_e useRowMatchFinder; /* Indicates whether the CDict was created with params that would use + * row-based matchfinder. Unless the cdict is reloaded, we will use + * the same greedy/lazy matchfinder at compression time. + */ +}; /* typedef'd to ZSTD_CDict within "zstd.h" */ + +ZSTD_CCtx* ZSTD_createCCtx(void) +{ + return ZSTD_createCCtx_advanced(ZSTD_defaultCMem); +} + +static void ZSTD_initCCtx(ZSTD_CCtx* cctx, ZSTD_customMem memManager) +{ + assert(cctx != NULL); + ZSTD_memset(cctx, 0, sizeof(*cctx)); + cctx->customMem = memManager; + cctx->bmi2 = ZSTD_cpuSupportsBmi2(); + { size_t const err = ZSTD_CCtx_reset(cctx, ZSTD_reset_parameters); + assert(!ZSTD_isError(err)); + (void)err; + } +} + +ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem) +{ + ZSTD_STATIC_ASSERT(zcss_init==0); + ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN==(0ULL - 1)); + if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; + { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); + if (!cctx) return NULL; + ZSTD_initCCtx(cctx, customMem); + return cctx; + } +} + +ZSTD_CCtx* ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize) +{ + ZSTD_cwksp ws; + ZSTD_CCtx* cctx; + if (workspaceSize <= sizeof(ZSTD_CCtx)) return NULL; /* minimum size */ + if ((size_t)workspace & 7) return NULL; /* must be 8-aligned */ + ZSTD_cwksp_init(&ws, workspace, workspaceSize, ZSTD_cwksp_static_alloc); + + cctx = (ZSTD_CCtx*)ZSTD_cwksp_reserve_object(&ws, sizeof(ZSTD_CCtx)); + if (cctx == NULL) return NULL; + + ZSTD_memset(cctx, 0, sizeof(ZSTD_CCtx)); + ZSTD_cwksp_move(&cctx->workspace, &ws); + cctx->staticSize = workspaceSize; + + /* statically sized space. tmpWorkspace never moves (but prev/next block swap places) */ + if (!ZSTD_cwksp_check_available(&cctx->workspace, TMP_WORKSPACE_SIZE + 2 * sizeof(ZSTD_compressedBlockState_t))) return NULL; + cctx->blockState.prevCBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_compressedBlockState_t)); + cctx->blockState.nextCBlock = (ZSTD_compressedBlockState_t*)ZSTD_cwksp_reserve_object(&cctx->workspace, sizeof(ZSTD_compressedBlockState_t)); + cctx->tmpWorkspace = ZSTD_cwksp_reserve_object(&cctx->workspace, TMP_WORKSPACE_SIZE); + cctx->tmpWkspSize = TMP_WORKSPACE_SIZE; + cctx->bmi2 = ZSTD_cpuid_bmi2(ZSTD_cpuid()); + return cctx; +} + +/** + * Clears and frees all of the dictionaries in the CCtx. + */ +static void ZSTD_clearAllDicts(ZSTD_CCtx* cctx) +{ + ZSTD_customFree(cctx->localDict.dictBuffer, cctx->customMem); + ZSTD_freeCDict(cctx->localDict.cdict); + ZSTD_memset(&cctx->localDict, 0, sizeof(cctx->localDict)); + ZSTD_memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); + cctx->cdict = NULL; +} + +static size_t ZSTD_sizeof_localDict(ZSTD_localDict dict) +{ + size_t const bufferSize = dict.dictBuffer != NULL ? dict.dictSize : 0; + size_t const cdictSize = ZSTD_sizeof_CDict(dict.cdict); + return bufferSize + cdictSize; +} + +static void ZSTD_freeCCtxContent(ZSTD_CCtx* cctx) +{ + assert(cctx != NULL); + assert(cctx->staticSize == 0); + ZSTD_clearAllDicts(cctx); +#ifdef ZSTD_MULTITHREAD + ZSTDMT_freeCCtx(cctx->mtctx); cctx->mtctx = NULL; +#endif + ZSTD_cwksp_free(&cctx->workspace, cctx->customMem); +} + +size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx) +{ + DEBUGLOG(3, "ZSTD_freeCCtx (address: %p)", (void*)cctx); + if (cctx==NULL) return 0; /* support free on NULL */ + RETURN_ERROR_IF(cctx->staticSize, memory_allocation, + "not compatible with static CCtx"); + { int cctxInWorkspace = ZSTD_cwksp_owns_buffer(&cctx->workspace, cctx); + ZSTD_freeCCtxContent(cctx); + if (!cctxInWorkspace) ZSTD_customFree(cctx, cctx->customMem); + } + return 0; +} + + +static size_t ZSTD_sizeof_mtctx(const ZSTD_CCtx* cctx) +{ +#ifdef ZSTD_MULTITHREAD + return ZSTDMT_sizeof_CCtx(cctx->mtctx); +#else + (void)cctx; + return 0; +#endif +} + + +size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx) +{ + if (cctx==NULL) return 0; /* support sizeof on NULL */ + /* cctx may be in the workspace */ + return (cctx->workspace.workspace == cctx ? 0 : sizeof(*cctx)) + + ZSTD_cwksp_sizeof(&cctx->workspace) + + ZSTD_sizeof_localDict(cctx->localDict) + + ZSTD_sizeof_mtctx(cctx); +} + +size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs) +{ + return ZSTD_sizeof_CCtx(zcs); /* same object */ +} + +/* private API call, for dictBuilder only */ +const SeqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx) { return &(ctx->seqStore); } + +/* Returns true if the strategy supports using a row based matchfinder */ +static int ZSTD_rowMatchFinderSupported(const ZSTD_strategy strategy) { + return (strategy >= ZSTD_greedy && strategy <= ZSTD_lazy2); +} + +/* Returns true if the strategy and useRowMatchFinder mode indicate that we will use the row based matchfinder + * for this compression. + */ +static int ZSTD_rowMatchFinderUsed(const ZSTD_strategy strategy, const ZSTD_ParamSwitch_e mode) { + assert(mode != ZSTD_ps_auto); + return ZSTD_rowMatchFinderSupported(strategy) && (mode == ZSTD_ps_enable); +} + +/* Returns row matchfinder usage given an initial mode and cParams */ +static ZSTD_ParamSwitch_e ZSTD_resolveRowMatchFinderMode(ZSTD_ParamSwitch_e mode, + const ZSTD_compressionParameters* const cParams) { + if (mode != ZSTD_ps_auto) return mode; /* if requested enabled, but no SIMD, we still will use row matchfinder */ + mode = ZSTD_ps_disable; + if (!ZSTD_rowMatchFinderSupported(cParams->strategy)) return mode; + if (cParams->windowLog > 14) mode = ZSTD_ps_enable; + return mode; +} + +/* Returns block splitter usage (generally speaking, when using slower/stronger compression modes) */ +static ZSTD_ParamSwitch_e ZSTD_resolveBlockSplitterMode(ZSTD_ParamSwitch_e mode, + const ZSTD_compressionParameters* const cParams) { + if (mode != ZSTD_ps_auto) return mode; + return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 17) ? ZSTD_ps_enable : ZSTD_ps_disable; +} + +/* Returns 1 if the arguments indicate that we should allocate a chainTable, 0 otherwise */ +static int ZSTD_allocateChainTable(const ZSTD_strategy strategy, + const ZSTD_ParamSwitch_e useRowMatchFinder, + const U32 forDDSDict) { + assert(useRowMatchFinder != ZSTD_ps_auto); + /* We always should allocate a chaintable if we are allocating a matchstate for a DDS dictionary matchstate. + * We do not allocate a chaintable if we are using ZSTD_fast, or are using the row-based matchfinder. + */ + return forDDSDict || ((strategy != ZSTD_fast) && !ZSTD_rowMatchFinderUsed(strategy, useRowMatchFinder)); +} + +/* Returns ZSTD_ps_enable if compression parameters are such that we should + * enable long distance matching (wlog >= 27, strategy >= btopt). + * Returns ZSTD_ps_disable otherwise. + */ +static ZSTD_ParamSwitch_e ZSTD_resolveEnableLdm(ZSTD_ParamSwitch_e mode, + const ZSTD_compressionParameters* const cParams) { + if (mode != ZSTD_ps_auto) return mode; + return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 27) ? ZSTD_ps_enable : ZSTD_ps_disable; +} + +static int ZSTD_resolveExternalSequenceValidation(int mode) { + return mode; +} + +/* Resolves maxBlockSize to the default if no value is present. */ +static size_t ZSTD_resolveMaxBlockSize(size_t maxBlockSize) { + if (maxBlockSize == 0) { + return ZSTD_BLOCKSIZE_MAX; + } else { + return maxBlockSize; + } +} + +static ZSTD_ParamSwitch_e ZSTD_resolveExternalRepcodeSearch(ZSTD_ParamSwitch_e value, int cLevel) { + if (value != ZSTD_ps_auto) return value; + if (cLevel < 10) { + return ZSTD_ps_disable; + } else { + return ZSTD_ps_enable; + } +} + +/* Returns 1 if compression parameters are such that CDict hashtable and chaintable indices are tagged. + * If so, the tags need to be removed in ZSTD_resetCCtx_byCopyingCDict. */ +static int ZSTD_CDictIndicesAreTagged(const ZSTD_compressionParameters* const cParams) { + return cParams->strategy == ZSTD_fast || cParams->strategy == ZSTD_dfast; +} + +static ZSTD_CCtx_params ZSTD_makeCCtxParamsFromCParams( + ZSTD_compressionParameters cParams) +{ + ZSTD_CCtx_params cctxParams; + /* should not matter, as all cParams are presumed properly defined */ + ZSTD_CCtxParams_init(&cctxParams, ZSTD_CLEVEL_DEFAULT); + cctxParams.cParams = cParams; + + /* Adjust advanced params according to cParams */ + cctxParams.ldmParams.enableLdm = ZSTD_resolveEnableLdm(cctxParams.ldmParams.enableLdm, &cParams); + if (cctxParams.ldmParams.enableLdm == ZSTD_ps_enable) { + ZSTD_ldm_adjustParameters(&cctxParams.ldmParams, &cParams); + assert(cctxParams.ldmParams.hashLog >= cctxParams.ldmParams.bucketSizeLog); + assert(cctxParams.ldmParams.hashRateLog < 32); + } + cctxParams.postBlockSplitter = ZSTD_resolveBlockSplitterMode(cctxParams.postBlockSplitter, &cParams); + cctxParams.useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(cctxParams.useRowMatchFinder, &cParams); + cctxParams.validateSequences = ZSTD_resolveExternalSequenceValidation(cctxParams.validateSequences); + cctxParams.maxBlockSize = ZSTD_resolveMaxBlockSize(cctxParams.maxBlockSize); + cctxParams.searchForExternalRepcodes = ZSTD_resolveExternalRepcodeSearch(cctxParams.searchForExternalRepcodes, + cctxParams.compressionLevel); + assert(!ZSTD_checkCParams(cParams)); + return cctxParams; +} + +static ZSTD_CCtx_params* ZSTD_createCCtxParams_advanced( + ZSTD_customMem customMem) +{ + ZSTD_CCtx_params* params; + if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; + params = (ZSTD_CCtx_params*)ZSTD_customCalloc( + sizeof(ZSTD_CCtx_params), customMem); + if (!params) { return NULL; } + ZSTD_CCtxParams_init(params, ZSTD_CLEVEL_DEFAULT); + params->customMem = customMem; + return params; +} + +ZSTD_CCtx_params* ZSTD_createCCtxParams(void) +{ + return ZSTD_createCCtxParams_advanced(ZSTD_defaultCMem); +} + +size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params) +{ + if (params == NULL) { return 0; } + ZSTD_customFree(params, params->customMem); + return 0; +} + +size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params* params) +{ + return ZSTD_CCtxParams_init(params, ZSTD_CLEVEL_DEFAULT); +} + +size_t ZSTD_CCtxParams_init(ZSTD_CCtx_params* cctxParams, int compressionLevel) { + RETURN_ERROR_IF(!cctxParams, GENERIC, "NULL pointer!"); + ZSTD_memset(cctxParams, 0, sizeof(*cctxParams)); + cctxParams->compressionLevel = compressionLevel; + cctxParams->fParams.contentSizeFlag = 1; + return 0; +} + +#define ZSTD_NO_CLEVEL 0 + +/** + * Initializes `cctxParams` from `params` and `compressionLevel`. + * @param compressionLevel If params are derived from a compression level then that compression level, otherwise ZSTD_NO_CLEVEL. + */ +static void +ZSTD_CCtxParams_init_internal(ZSTD_CCtx_params* cctxParams, + const ZSTD_parameters* params, + int compressionLevel) +{ + assert(!ZSTD_checkCParams(params->cParams)); + ZSTD_memset(cctxParams, 0, sizeof(*cctxParams)); + cctxParams->cParams = params->cParams; + cctxParams->fParams = params->fParams; + /* Should not matter, as all cParams are presumed properly defined. + * But, set it for tracing anyway. + */ + cctxParams->compressionLevel = compressionLevel; + cctxParams->useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(cctxParams->useRowMatchFinder, ¶ms->cParams); + cctxParams->postBlockSplitter = ZSTD_resolveBlockSplitterMode(cctxParams->postBlockSplitter, ¶ms->cParams); + cctxParams->ldmParams.enableLdm = ZSTD_resolveEnableLdm(cctxParams->ldmParams.enableLdm, ¶ms->cParams); + cctxParams->validateSequences = ZSTD_resolveExternalSequenceValidation(cctxParams->validateSequences); + cctxParams->maxBlockSize = ZSTD_resolveMaxBlockSize(cctxParams->maxBlockSize); + cctxParams->searchForExternalRepcodes = ZSTD_resolveExternalRepcodeSearch(cctxParams->searchForExternalRepcodes, compressionLevel); + DEBUGLOG(4, "ZSTD_CCtxParams_init_internal: useRowMatchFinder=%d, useBlockSplitter=%d ldm=%d", + cctxParams->useRowMatchFinder, cctxParams->postBlockSplitter, cctxParams->ldmParams.enableLdm); +} + +size_t ZSTD_CCtxParams_init_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params) +{ + RETURN_ERROR_IF(!cctxParams, GENERIC, "NULL pointer!"); + FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) , ""); + ZSTD_CCtxParams_init_internal(cctxParams, ¶ms, ZSTD_NO_CLEVEL); + return 0; +} + +/** + * Sets cctxParams' cParams and fParams from params, but otherwise leaves them alone. + * @param params Validated zstd parameters. + */ +static void ZSTD_CCtxParams_setZstdParams( + ZSTD_CCtx_params* cctxParams, const ZSTD_parameters* params) +{ + assert(!ZSTD_checkCParams(params->cParams)); + cctxParams->cParams = params->cParams; + cctxParams->fParams = params->fParams; + /* Should not matter, as all cParams are presumed properly defined. + * But, set it for tracing anyway. + */ + cctxParams->compressionLevel = ZSTD_NO_CLEVEL; +} + +ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter param) +{ + ZSTD_bounds bounds = { 0, 0, 0 }; + + switch(param) + { + case ZSTD_c_compressionLevel: + bounds.lowerBound = ZSTD_minCLevel(); + bounds.upperBound = ZSTD_maxCLevel(); + return bounds; + + case ZSTD_c_windowLog: + bounds.lowerBound = ZSTD_WINDOWLOG_MIN; + bounds.upperBound = ZSTD_WINDOWLOG_MAX; + return bounds; + + case ZSTD_c_hashLog: + bounds.lowerBound = ZSTD_HASHLOG_MIN; + bounds.upperBound = ZSTD_HASHLOG_MAX; + return bounds; + + case ZSTD_c_chainLog: + bounds.lowerBound = ZSTD_CHAINLOG_MIN; + bounds.upperBound = ZSTD_CHAINLOG_MAX; + return bounds; + + case ZSTD_c_searchLog: + bounds.lowerBound = ZSTD_SEARCHLOG_MIN; + bounds.upperBound = ZSTD_SEARCHLOG_MAX; + return bounds; + + case ZSTD_c_minMatch: + bounds.lowerBound = ZSTD_MINMATCH_MIN; + bounds.upperBound = ZSTD_MINMATCH_MAX; + return bounds; + + case ZSTD_c_targetLength: + bounds.lowerBound = ZSTD_TARGETLENGTH_MIN; + bounds.upperBound = ZSTD_TARGETLENGTH_MAX; + return bounds; + + case ZSTD_c_strategy: + bounds.lowerBound = ZSTD_STRATEGY_MIN; + bounds.upperBound = ZSTD_STRATEGY_MAX; + return bounds; + + case ZSTD_c_contentSizeFlag: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_checksumFlag: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_dictIDFlag: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_nbWorkers: + bounds.lowerBound = 0; +#ifdef ZSTD_MULTITHREAD + bounds.upperBound = ZSTDMT_NBWORKERS_MAX; +#else + bounds.upperBound = 0; +#endif + return bounds; + + case ZSTD_c_jobSize: + bounds.lowerBound = 0; +#ifdef ZSTD_MULTITHREAD + bounds.upperBound = ZSTDMT_JOBSIZE_MAX; +#else + bounds.upperBound = 0; +#endif + return bounds; + + case ZSTD_c_overlapLog: +#ifdef ZSTD_MULTITHREAD + bounds.lowerBound = ZSTD_OVERLAPLOG_MIN; + bounds.upperBound = ZSTD_OVERLAPLOG_MAX; +#else + bounds.lowerBound = 0; + bounds.upperBound = 0; +#endif + return bounds; + + case ZSTD_c_enableDedicatedDictSearch: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_enableLongDistanceMatching: + bounds.lowerBound = (int)ZSTD_ps_auto; + bounds.upperBound = (int)ZSTD_ps_disable; + return bounds; + + case ZSTD_c_ldmHashLog: + bounds.lowerBound = ZSTD_LDM_HASHLOG_MIN; + bounds.upperBound = ZSTD_LDM_HASHLOG_MAX; + return bounds; + + case ZSTD_c_ldmMinMatch: + bounds.lowerBound = ZSTD_LDM_MINMATCH_MIN; + bounds.upperBound = ZSTD_LDM_MINMATCH_MAX; + return bounds; + + case ZSTD_c_ldmBucketSizeLog: + bounds.lowerBound = ZSTD_LDM_BUCKETSIZELOG_MIN; + bounds.upperBound = ZSTD_LDM_BUCKETSIZELOG_MAX; + return bounds; + + case ZSTD_c_ldmHashRateLog: + bounds.lowerBound = ZSTD_LDM_HASHRATELOG_MIN; + bounds.upperBound = ZSTD_LDM_HASHRATELOG_MAX; + return bounds; + + /* experimental parameters */ + case ZSTD_c_rsyncable: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_forceMaxWindow : + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_format: + ZSTD_STATIC_ASSERT(ZSTD_f_zstd1 < ZSTD_f_zstd1_magicless); + bounds.lowerBound = ZSTD_f_zstd1; + bounds.upperBound = ZSTD_f_zstd1_magicless; /* note : how to ensure at compile time that this is the highest value enum ? */ + return bounds; + + case ZSTD_c_forceAttachDict: + ZSTD_STATIC_ASSERT(ZSTD_dictDefaultAttach < ZSTD_dictForceLoad); + bounds.lowerBound = ZSTD_dictDefaultAttach; + bounds.upperBound = ZSTD_dictForceLoad; /* note : how to ensure at compile time that this is the highest value enum ? */ + return bounds; + + case ZSTD_c_literalCompressionMode: + ZSTD_STATIC_ASSERT(ZSTD_ps_auto < ZSTD_ps_enable && ZSTD_ps_enable < ZSTD_ps_disable); + bounds.lowerBound = (int)ZSTD_ps_auto; + bounds.upperBound = (int)ZSTD_ps_disable; + return bounds; + + case ZSTD_c_targetCBlockSize: + bounds.lowerBound = ZSTD_TARGETCBLOCKSIZE_MIN; + bounds.upperBound = ZSTD_TARGETCBLOCKSIZE_MAX; + return bounds; + + case ZSTD_c_srcSizeHint: + bounds.lowerBound = ZSTD_SRCSIZEHINT_MIN; + bounds.upperBound = ZSTD_SRCSIZEHINT_MAX; + return bounds; + + case ZSTD_c_stableInBuffer: + case ZSTD_c_stableOutBuffer: + bounds.lowerBound = (int)ZSTD_bm_buffered; + bounds.upperBound = (int)ZSTD_bm_stable; + return bounds; + + case ZSTD_c_blockDelimiters: + bounds.lowerBound = (int)ZSTD_sf_noBlockDelimiters; + bounds.upperBound = (int)ZSTD_sf_explicitBlockDelimiters; + return bounds; + + case ZSTD_c_validateSequences: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_splitAfterSequences: + bounds.lowerBound = (int)ZSTD_ps_auto; + bounds.upperBound = (int)ZSTD_ps_disable; + return bounds; + + case ZSTD_c_blockSplitterLevel: + bounds.lowerBound = 0; + bounds.upperBound = ZSTD_BLOCKSPLITTER_LEVEL_MAX; + return bounds; + + case ZSTD_c_useRowMatchFinder: + bounds.lowerBound = (int)ZSTD_ps_auto; + bounds.upperBound = (int)ZSTD_ps_disable; + return bounds; + + case ZSTD_c_deterministicRefPrefix: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_prefetchCDictTables: + bounds.lowerBound = (int)ZSTD_ps_auto; + bounds.upperBound = (int)ZSTD_ps_disable; + return bounds; + + case ZSTD_c_enableSeqProducerFallback: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + + case ZSTD_c_maxBlockSize: + bounds.lowerBound = ZSTD_BLOCKSIZE_MAX_MIN; + bounds.upperBound = ZSTD_BLOCKSIZE_MAX; + return bounds; + + case ZSTD_c_repcodeResolution: + bounds.lowerBound = (int)ZSTD_ps_auto; + bounds.upperBound = (int)ZSTD_ps_disable; + return bounds; + + default: + bounds.error = ERROR(parameter_unsupported); + return bounds; + } +} + +/* ZSTD_cParam_clampBounds: + * Clamps the value into the bounded range. + */ +static size_t ZSTD_cParam_clampBounds(ZSTD_cParameter cParam, int* value) +{ + ZSTD_bounds const bounds = ZSTD_cParam_getBounds(cParam); + if (ZSTD_isError(bounds.error)) return bounds.error; + if (*value < bounds.lowerBound) *value = bounds.lowerBound; + if (*value > bounds.upperBound) *value = bounds.upperBound; + return 0; +} + +#define BOUNDCHECK(cParam, val) \ + do { \ + RETURN_ERROR_IF(!ZSTD_cParam_withinBounds(cParam,val), \ + parameter_outOfBound, "Param out of bounds"); \ + } while (0) + + +static int ZSTD_isUpdateAuthorized(ZSTD_cParameter param) +{ + switch(param) + { + case ZSTD_c_compressionLevel: + case ZSTD_c_hashLog: + case ZSTD_c_chainLog: + case ZSTD_c_searchLog: + case ZSTD_c_minMatch: + case ZSTD_c_targetLength: + case ZSTD_c_strategy: + case ZSTD_c_blockSplitterLevel: + return 1; + + case ZSTD_c_format: + case ZSTD_c_windowLog: + case ZSTD_c_contentSizeFlag: + case ZSTD_c_checksumFlag: + case ZSTD_c_dictIDFlag: + case ZSTD_c_forceMaxWindow : + case ZSTD_c_nbWorkers: + case ZSTD_c_jobSize: + case ZSTD_c_overlapLog: + case ZSTD_c_rsyncable: + case ZSTD_c_enableDedicatedDictSearch: + case ZSTD_c_enableLongDistanceMatching: + case ZSTD_c_ldmHashLog: + case ZSTD_c_ldmMinMatch: + case ZSTD_c_ldmBucketSizeLog: + case ZSTD_c_ldmHashRateLog: + case ZSTD_c_forceAttachDict: + case ZSTD_c_literalCompressionMode: + case ZSTD_c_targetCBlockSize: + case ZSTD_c_srcSizeHint: + case ZSTD_c_stableInBuffer: + case ZSTD_c_stableOutBuffer: + case ZSTD_c_blockDelimiters: + case ZSTD_c_validateSequences: + case ZSTD_c_splitAfterSequences: + case ZSTD_c_useRowMatchFinder: + case ZSTD_c_deterministicRefPrefix: + case ZSTD_c_prefetchCDictTables: + case ZSTD_c_enableSeqProducerFallback: + case ZSTD_c_maxBlockSize: + case ZSTD_c_repcodeResolution: + default: + return 0; + } +} + +size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value) +{ + DEBUGLOG(4, "ZSTD_CCtx_setParameter (%i, %i)", (int)param, value); + if (cctx->streamStage != zcss_init) { + if (ZSTD_isUpdateAuthorized(param)) { + cctx->cParamsChanged = 1; + } else { + RETURN_ERROR(stage_wrong, "can only set params in cctx init stage"); + } } + + switch(param) + { + case ZSTD_c_nbWorkers: + RETURN_ERROR_IF((value!=0) && cctx->staticSize, parameter_unsupported, + "MT not compatible with static alloc"); + break; + + case ZSTD_c_compressionLevel: + case ZSTD_c_windowLog: + case ZSTD_c_hashLog: + case ZSTD_c_chainLog: + case ZSTD_c_searchLog: + case ZSTD_c_minMatch: + case ZSTD_c_targetLength: + case ZSTD_c_strategy: + case ZSTD_c_ldmHashRateLog: + case ZSTD_c_format: + case ZSTD_c_contentSizeFlag: + case ZSTD_c_checksumFlag: + case ZSTD_c_dictIDFlag: + case ZSTD_c_forceMaxWindow: + case ZSTD_c_forceAttachDict: + case ZSTD_c_literalCompressionMode: + case ZSTD_c_jobSize: + case ZSTD_c_overlapLog: + case ZSTD_c_rsyncable: + case ZSTD_c_enableDedicatedDictSearch: + case ZSTD_c_enableLongDistanceMatching: + case ZSTD_c_ldmHashLog: + case ZSTD_c_ldmMinMatch: + case ZSTD_c_ldmBucketSizeLog: + case ZSTD_c_targetCBlockSize: + case ZSTD_c_srcSizeHint: + case ZSTD_c_stableInBuffer: + case ZSTD_c_stableOutBuffer: + case ZSTD_c_blockDelimiters: + case ZSTD_c_validateSequences: + case ZSTD_c_splitAfterSequences: + case ZSTD_c_blockSplitterLevel: + case ZSTD_c_useRowMatchFinder: + case ZSTD_c_deterministicRefPrefix: + case ZSTD_c_prefetchCDictTables: + case ZSTD_c_enableSeqProducerFallback: + case ZSTD_c_maxBlockSize: + case ZSTD_c_repcodeResolution: + break; + + default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); + } + return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value); +} + +size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams, + ZSTD_cParameter param, int value) +{ + DEBUGLOG(4, "ZSTD_CCtxParams_setParameter (%i, %i)", (int)param, value); + switch(param) + { + case ZSTD_c_format : + BOUNDCHECK(ZSTD_c_format, value); + CCtxParams->format = (ZSTD_format_e)value; + return (size_t)CCtxParams->format; + + case ZSTD_c_compressionLevel : { + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); + if (value == 0) + CCtxParams->compressionLevel = ZSTD_CLEVEL_DEFAULT; /* 0 == default */ + else + CCtxParams->compressionLevel = value; + if (CCtxParams->compressionLevel >= 0) return (size_t)CCtxParams->compressionLevel; + return 0; /* return type (size_t) cannot represent negative values */ + } + + case ZSTD_c_windowLog : + if (value!=0) /* 0 => use default */ + BOUNDCHECK(ZSTD_c_windowLog, value); + CCtxParams->cParams.windowLog = (U32)value; + return CCtxParams->cParams.windowLog; + + case ZSTD_c_hashLog : + if (value!=0) /* 0 => use default */ + BOUNDCHECK(ZSTD_c_hashLog, value); + CCtxParams->cParams.hashLog = (U32)value; + return CCtxParams->cParams.hashLog; + + case ZSTD_c_chainLog : + if (value!=0) /* 0 => use default */ + BOUNDCHECK(ZSTD_c_chainLog, value); + CCtxParams->cParams.chainLog = (U32)value; + return CCtxParams->cParams.chainLog; + + case ZSTD_c_searchLog : + if (value!=0) /* 0 => use default */ + BOUNDCHECK(ZSTD_c_searchLog, value); + CCtxParams->cParams.searchLog = (U32)value; + return (size_t)value; + + case ZSTD_c_minMatch : + if (value!=0) /* 0 => use default */ + BOUNDCHECK(ZSTD_c_minMatch, value); + CCtxParams->cParams.minMatch = (U32)value; + return CCtxParams->cParams.minMatch; + + case ZSTD_c_targetLength : + BOUNDCHECK(ZSTD_c_targetLength, value); + CCtxParams->cParams.targetLength = (U32)value; + return CCtxParams->cParams.targetLength; + + case ZSTD_c_strategy : + if (value!=0) /* 0 => use default */ + BOUNDCHECK(ZSTD_c_strategy, value); + CCtxParams->cParams.strategy = (ZSTD_strategy)value; + return (size_t)CCtxParams->cParams.strategy; + + case ZSTD_c_contentSizeFlag : + /* Content size written in frame header _when known_ (default:1) */ + DEBUGLOG(4, "set content size flag = %u", (value!=0)); + CCtxParams->fParams.contentSizeFlag = value != 0; + return (size_t)CCtxParams->fParams.contentSizeFlag; + + case ZSTD_c_checksumFlag : + /* A 32-bits content checksum will be calculated and written at end of frame (default:0) */ + CCtxParams->fParams.checksumFlag = value != 0; + return (size_t)CCtxParams->fParams.checksumFlag; + + case ZSTD_c_dictIDFlag : /* When applicable, dictionary's dictID is provided in frame header (default:1) */ + DEBUGLOG(4, "set dictIDFlag = %u", (value!=0)); + CCtxParams->fParams.noDictIDFlag = !value; + return !CCtxParams->fParams.noDictIDFlag; + + case ZSTD_c_forceMaxWindow : + CCtxParams->forceWindow = (value != 0); + return (size_t)CCtxParams->forceWindow; + + case ZSTD_c_forceAttachDict : { + const ZSTD_dictAttachPref_e pref = (ZSTD_dictAttachPref_e)value; + BOUNDCHECK(ZSTD_c_forceAttachDict, (int)pref); + CCtxParams->attachDictPref = pref; + return CCtxParams->attachDictPref; + } + + case ZSTD_c_literalCompressionMode : { + const ZSTD_ParamSwitch_e lcm = (ZSTD_ParamSwitch_e)value; + BOUNDCHECK(ZSTD_c_literalCompressionMode, (int)lcm); + CCtxParams->literalCompressionMode = lcm; + return CCtxParams->literalCompressionMode; + } + + case ZSTD_c_nbWorkers : +#ifndef ZSTD_MULTITHREAD + RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); + return 0; +#else + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); + CCtxParams->nbWorkers = value; + return (size_t)(CCtxParams->nbWorkers); +#endif + + case ZSTD_c_jobSize : +#ifndef ZSTD_MULTITHREAD + RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); + return 0; +#else + /* Adjust to the minimum non-default value. */ + if (value != 0 && value < ZSTDMT_JOBSIZE_MIN) + value = ZSTDMT_JOBSIZE_MIN; + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(param, &value), ""); + assert(value >= 0); + CCtxParams->jobSize = (size_t)value; + return CCtxParams->jobSize; +#endif + + case ZSTD_c_overlapLog : +#ifndef ZSTD_MULTITHREAD + RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); + return 0; +#else + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value), ""); + CCtxParams->overlapLog = value; + return (size_t)CCtxParams->overlapLog; +#endif + + case ZSTD_c_rsyncable : +#ifndef ZSTD_MULTITHREAD + RETURN_ERROR_IF(value!=0, parameter_unsupported, "not compiled with multithreading"); + return 0; +#else + FORWARD_IF_ERROR(ZSTD_cParam_clampBounds(ZSTD_c_overlapLog, &value), ""); + CCtxParams->rsyncable = value; + return (size_t)CCtxParams->rsyncable; +#endif + + case ZSTD_c_enableDedicatedDictSearch : + CCtxParams->enableDedicatedDictSearch = (value!=0); + return (size_t)CCtxParams->enableDedicatedDictSearch; + + case ZSTD_c_enableLongDistanceMatching : + BOUNDCHECK(ZSTD_c_enableLongDistanceMatching, value); + CCtxParams->ldmParams.enableLdm = (ZSTD_ParamSwitch_e)value; + return CCtxParams->ldmParams.enableLdm; + + case ZSTD_c_ldmHashLog : + if (value!=0) /* 0 ==> auto */ + BOUNDCHECK(ZSTD_c_ldmHashLog, value); + CCtxParams->ldmParams.hashLog = (U32)value; + return CCtxParams->ldmParams.hashLog; + + case ZSTD_c_ldmMinMatch : + if (value!=0) /* 0 ==> default */ + BOUNDCHECK(ZSTD_c_ldmMinMatch, value); + CCtxParams->ldmParams.minMatchLength = (U32)value; + return CCtxParams->ldmParams.minMatchLength; + + case ZSTD_c_ldmBucketSizeLog : + if (value!=0) /* 0 ==> default */ + BOUNDCHECK(ZSTD_c_ldmBucketSizeLog, value); + CCtxParams->ldmParams.bucketSizeLog = (U32)value; + return CCtxParams->ldmParams.bucketSizeLog; + + case ZSTD_c_ldmHashRateLog : + if (value!=0) /* 0 ==> default */ + BOUNDCHECK(ZSTD_c_ldmHashRateLog, value); + CCtxParams->ldmParams.hashRateLog = (U32)value; + return CCtxParams->ldmParams.hashRateLog; + + case ZSTD_c_targetCBlockSize : + if (value!=0) { /* 0 ==> default */ + value = MAX(value, ZSTD_TARGETCBLOCKSIZE_MIN); + BOUNDCHECK(ZSTD_c_targetCBlockSize, value); + } + CCtxParams->targetCBlockSize = (U32)value; + return CCtxParams->targetCBlockSize; + + case ZSTD_c_srcSizeHint : + if (value!=0) /* 0 ==> default */ + BOUNDCHECK(ZSTD_c_srcSizeHint, value); + CCtxParams->srcSizeHint = value; + return (size_t)CCtxParams->srcSizeHint; + + case ZSTD_c_stableInBuffer: + BOUNDCHECK(ZSTD_c_stableInBuffer, value); + CCtxParams->inBufferMode = (ZSTD_bufferMode_e)value; + return CCtxParams->inBufferMode; + + case ZSTD_c_stableOutBuffer: + BOUNDCHECK(ZSTD_c_stableOutBuffer, value); + CCtxParams->outBufferMode = (ZSTD_bufferMode_e)value; + return CCtxParams->outBufferMode; + + case ZSTD_c_blockDelimiters: + BOUNDCHECK(ZSTD_c_blockDelimiters, value); + CCtxParams->blockDelimiters = (ZSTD_SequenceFormat_e)value; + return CCtxParams->blockDelimiters; + + case ZSTD_c_validateSequences: + BOUNDCHECK(ZSTD_c_validateSequences, value); + CCtxParams->validateSequences = value; + return (size_t)CCtxParams->validateSequences; + + case ZSTD_c_splitAfterSequences: + BOUNDCHECK(ZSTD_c_splitAfterSequences, value); + CCtxParams->postBlockSplitter = (ZSTD_ParamSwitch_e)value; + return CCtxParams->postBlockSplitter; + + case ZSTD_c_blockSplitterLevel: + BOUNDCHECK(ZSTD_c_blockSplitterLevel, value); + CCtxParams->preBlockSplitter_level = value; + return (size_t)CCtxParams->preBlockSplitter_level; + + case ZSTD_c_useRowMatchFinder: + BOUNDCHECK(ZSTD_c_useRowMatchFinder, value); + CCtxParams->useRowMatchFinder = (ZSTD_ParamSwitch_e)value; + return CCtxParams->useRowMatchFinder; + + case ZSTD_c_deterministicRefPrefix: + BOUNDCHECK(ZSTD_c_deterministicRefPrefix, value); + CCtxParams->deterministicRefPrefix = !!value; + return (size_t)CCtxParams->deterministicRefPrefix; + + case ZSTD_c_prefetchCDictTables: + BOUNDCHECK(ZSTD_c_prefetchCDictTables, value); + CCtxParams->prefetchCDictTables = (ZSTD_ParamSwitch_e)value; + return CCtxParams->prefetchCDictTables; + + case ZSTD_c_enableSeqProducerFallback: + BOUNDCHECK(ZSTD_c_enableSeqProducerFallback, value); + CCtxParams->enableMatchFinderFallback = value; + return (size_t)CCtxParams->enableMatchFinderFallback; + + case ZSTD_c_maxBlockSize: + if (value!=0) /* 0 ==> default */ + BOUNDCHECK(ZSTD_c_maxBlockSize, value); + assert(value>=0); + CCtxParams->maxBlockSize = (size_t)value; + return CCtxParams->maxBlockSize; + + case ZSTD_c_repcodeResolution: + BOUNDCHECK(ZSTD_c_repcodeResolution, value); + CCtxParams->searchForExternalRepcodes = (ZSTD_ParamSwitch_e)value; + return CCtxParams->searchForExternalRepcodes; + + default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); + } +} + +size_t ZSTD_CCtx_getParameter(ZSTD_CCtx const* cctx, ZSTD_cParameter param, int* value) +{ + return ZSTD_CCtxParams_getParameter(&cctx->requestedParams, param, value); +} + +size_t ZSTD_CCtxParams_getParameter( + ZSTD_CCtx_params const* CCtxParams, ZSTD_cParameter param, int* value) +{ + switch(param) + { + case ZSTD_c_format : + *value = (int)CCtxParams->format; + break; + case ZSTD_c_compressionLevel : + *value = CCtxParams->compressionLevel; + break; + case ZSTD_c_windowLog : + *value = (int)CCtxParams->cParams.windowLog; + break; + case ZSTD_c_hashLog : + *value = (int)CCtxParams->cParams.hashLog; + break; + case ZSTD_c_chainLog : + *value = (int)CCtxParams->cParams.chainLog; + break; + case ZSTD_c_searchLog : + *value = (int)CCtxParams->cParams.searchLog; + break; + case ZSTD_c_minMatch : + *value = (int)CCtxParams->cParams.minMatch; + break; + case ZSTD_c_targetLength : + *value = (int)CCtxParams->cParams.targetLength; + break; + case ZSTD_c_strategy : + *value = (int)CCtxParams->cParams.strategy; + break; + case ZSTD_c_contentSizeFlag : + *value = CCtxParams->fParams.contentSizeFlag; + break; + case ZSTD_c_checksumFlag : + *value = CCtxParams->fParams.checksumFlag; + break; + case ZSTD_c_dictIDFlag : + *value = !CCtxParams->fParams.noDictIDFlag; + break; + case ZSTD_c_forceMaxWindow : + *value = CCtxParams->forceWindow; + break; + case ZSTD_c_forceAttachDict : + *value = (int)CCtxParams->attachDictPref; + break; + case ZSTD_c_literalCompressionMode : + *value = (int)CCtxParams->literalCompressionMode; + break; + case ZSTD_c_nbWorkers : +#ifndef ZSTD_MULTITHREAD + assert(CCtxParams->nbWorkers == 0); +#endif + *value = CCtxParams->nbWorkers; + break; + case ZSTD_c_jobSize : +#ifndef ZSTD_MULTITHREAD + RETURN_ERROR(parameter_unsupported, "not compiled with multithreading"); +#else + assert(CCtxParams->jobSize <= INT_MAX); + *value = (int)CCtxParams->jobSize; + break; +#endif + case ZSTD_c_overlapLog : +#ifndef ZSTD_MULTITHREAD + RETURN_ERROR(parameter_unsupported, "not compiled with multithreading"); +#else + *value = CCtxParams->overlapLog; + break; +#endif + case ZSTD_c_rsyncable : +#ifndef ZSTD_MULTITHREAD + RETURN_ERROR(parameter_unsupported, "not compiled with multithreading"); +#else + *value = CCtxParams->rsyncable; + break; +#endif + case ZSTD_c_enableDedicatedDictSearch : + *value = CCtxParams->enableDedicatedDictSearch; + break; + case ZSTD_c_enableLongDistanceMatching : + *value = (int)CCtxParams->ldmParams.enableLdm; + break; + case ZSTD_c_ldmHashLog : + *value = (int)CCtxParams->ldmParams.hashLog; + break; + case ZSTD_c_ldmMinMatch : + *value = (int)CCtxParams->ldmParams.minMatchLength; + break; + case ZSTD_c_ldmBucketSizeLog : + *value = (int)CCtxParams->ldmParams.bucketSizeLog; + break; + case ZSTD_c_ldmHashRateLog : + *value = (int)CCtxParams->ldmParams.hashRateLog; + break; + case ZSTD_c_targetCBlockSize : + *value = (int)CCtxParams->targetCBlockSize; + break; + case ZSTD_c_srcSizeHint : + *value = (int)CCtxParams->srcSizeHint; + break; + case ZSTD_c_stableInBuffer : + *value = (int)CCtxParams->inBufferMode; + break; + case ZSTD_c_stableOutBuffer : + *value = (int)CCtxParams->outBufferMode; + break; + case ZSTD_c_blockDelimiters : + *value = (int)CCtxParams->blockDelimiters; + break; + case ZSTD_c_validateSequences : + *value = (int)CCtxParams->validateSequences; + break; + case ZSTD_c_splitAfterSequences : + *value = (int)CCtxParams->postBlockSplitter; + break; + case ZSTD_c_blockSplitterLevel : + *value = CCtxParams->preBlockSplitter_level; + break; + case ZSTD_c_useRowMatchFinder : + *value = (int)CCtxParams->useRowMatchFinder; + break; + case ZSTD_c_deterministicRefPrefix: + *value = (int)CCtxParams->deterministicRefPrefix; + break; + case ZSTD_c_prefetchCDictTables: + *value = (int)CCtxParams->prefetchCDictTables; + break; + case ZSTD_c_enableSeqProducerFallback: + *value = CCtxParams->enableMatchFinderFallback; + break; + case ZSTD_c_maxBlockSize: + *value = (int)CCtxParams->maxBlockSize; + break; + case ZSTD_c_repcodeResolution: + *value = (int)CCtxParams->searchForExternalRepcodes; + break; + default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); + } + return 0; +} + +/** ZSTD_CCtx_setParametersUsingCCtxParams() : + * just applies `params` into `cctx` + * no action is performed, parameters are merely stored. + * If ZSTDMT is enabled, parameters are pushed to cctx->mtctx. + * This is possible even if a compression is ongoing. + * In which case, new parameters will be applied on the fly, starting with next compression job. + */ +size_t ZSTD_CCtx_setParametersUsingCCtxParams( + ZSTD_CCtx* cctx, const ZSTD_CCtx_params* params) +{ + DEBUGLOG(4, "ZSTD_CCtx_setParametersUsingCCtxParams"); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "The context is in the wrong stage!"); + RETURN_ERROR_IF(cctx->cdict, stage_wrong, + "Can't override parameters with cdict attached (some must " + "be inherited from the cdict)."); + + cctx->requestedParams = *params; + return 0; +} + +size_t ZSTD_CCtx_setCParams(ZSTD_CCtx* cctx, ZSTD_compressionParameters cparams) +{ + ZSTD_STATIC_ASSERT(sizeof(cparams) == 7 * 4 /* all params are listed below */); + DEBUGLOG(4, "ZSTD_CCtx_setCParams"); + /* only update if all parameters are valid */ + FORWARD_IF_ERROR(ZSTD_checkCParams(cparams), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, (int)cparams.windowLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_chainLog, (int)cparams.chainLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_hashLog, (int)cparams.hashLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_searchLog, (int)cparams.searchLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_minMatch, (int)cparams.minMatch), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_targetLength, (int)cparams.targetLength), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_strategy, (int)cparams.strategy), ""); + return 0; +} + +size_t ZSTD_CCtx_setFParams(ZSTD_CCtx* cctx, ZSTD_frameParameters fparams) +{ + ZSTD_STATIC_ASSERT(sizeof(fparams) == 3 * 4 /* all params are listed below */); + DEBUGLOG(4, "ZSTD_CCtx_setFParams"); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_contentSizeFlag, fparams.contentSizeFlag != 0), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, fparams.checksumFlag != 0), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_dictIDFlag, fparams.noDictIDFlag == 0), ""); + return 0; +} + +size_t ZSTD_CCtx_setParams(ZSTD_CCtx* cctx, ZSTD_parameters params) +{ + DEBUGLOG(4, "ZSTD_CCtx_setParams"); + /* First check cParams, because we want to update all or none. */ + FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams), ""); + /* Next set fParams, because this could fail if the cctx isn't in init stage. */ + FORWARD_IF_ERROR(ZSTD_CCtx_setFParams(cctx, params.fParams), ""); + /* Finally set cParams, which should succeed. */ + FORWARD_IF_ERROR(ZSTD_CCtx_setCParams(cctx, params.cParams), ""); + return 0; +} + +size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize) +{ + DEBUGLOG(4, "ZSTD_CCtx_setPledgedSrcSize to %llu bytes", pledgedSrcSize); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't set pledgedSrcSize when not in init stage."); + cctx->pledgedSrcSizePlusOne = pledgedSrcSize+1; + return 0; +} + +static ZSTD_compressionParameters ZSTD_dedicatedDictSearch_getCParams( + int const compressionLevel, + size_t const dictSize); +static int ZSTD_dedicatedDictSearch_isSupported( + const ZSTD_compressionParameters* cParams); +static void ZSTD_dedicatedDictSearch_revertCParams( + ZSTD_compressionParameters* cParams); + +/** + * Initializes the local dictionary using requested parameters. + * NOTE: Initialization does not employ the pledged src size, + * because the dictionary may be used for multiple compressions. + */ +static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx) +{ + ZSTD_localDict* const dl = &cctx->localDict; + if (dl->dict == NULL) { + /* No local dictionary. */ + assert(dl->dictBuffer == NULL); + assert(dl->cdict == NULL); + assert(dl->dictSize == 0); + return 0; + } + if (dl->cdict != NULL) { + /* Local dictionary already initialized. */ + assert(cctx->cdict == dl->cdict); + return 0; + } + assert(dl->dictSize > 0); + assert(cctx->cdict == NULL); + assert(cctx->prefixDict.dict == NULL); + + dl->cdict = ZSTD_createCDict_advanced2( + dl->dict, + dl->dictSize, + ZSTD_dlm_byRef, + dl->dictContentType, + &cctx->requestedParams, + cctx->customMem); + RETURN_ERROR_IF(!dl->cdict, memory_allocation, "ZSTD_createCDict_advanced failed"); + cctx->cdict = dl->cdict; + return 0; +} + +size_t ZSTD_CCtx_loadDictionary_advanced( + ZSTD_CCtx* cctx, + const void* dict, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType) +{ + DEBUGLOG(4, "ZSTD_CCtx_loadDictionary_advanced (size: %u)", (U32)dictSize); + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't load a dictionary when cctx is not in init stage."); + ZSTD_clearAllDicts(cctx); /* erase any previously set dictionary */ + if (dict == NULL || dictSize == 0) /* no dictionary */ + return 0; + if (dictLoadMethod == ZSTD_dlm_byRef) { + cctx->localDict.dict = dict; + } else { + /* copy dictionary content inside CCtx to own its lifetime */ + void* dictBuffer; + RETURN_ERROR_IF(cctx->staticSize, memory_allocation, + "static CCtx can't allocate for an internal copy of dictionary"); + dictBuffer = ZSTD_customMalloc(dictSize, cctx->customMem); + RETURN_ERROR_IF(dictBuffer==NULL, memory_allocation, + "allocation failed for dictionary content"); + ZSTD_memcpy(dictBuffer, dict, dictSize); + cctx->localDict.dictBuffer = dictBuffer; /* owned ptr to free */ + cctx->localDict.dict = dictBuffer; /* read-only reference */ + } + cctx->localDict.dictSize = dictSize; + cctx->localDict.dictContentType = dictContentType; + return 0; +} + +size_t ZSTD_CCtx_loadDictionary_byReference( + ZSTD_CCtx* cctx, const void* dict, size_t dictSize) +{ + return ZSTD_CCtx_loadDictionary_advanced( + cctx, dict, dictSize, ZSTD_dlm_byRef, ZSTD_dct_auto); +} + +size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize) +{ + return ZSTD_CCtx_loadDictionary_advanced( + cctx, dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dct_auto); +} + + +size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict) +{ + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't ref a dict when ctx not in init stage."); + /* Free the existing local cdict (if any) to save memory. */ + ZSTD_clearAllDicts(cctx); + cctx->cdict = cdict; + return 0; +} + +size_t ZSTD_CCtx_refThreadPool(ZSTD_CCtx* cctx, ZSTD_threadPool* pool) +{ + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't ref a pool when ctx not in init stage."); + cctx->pool = pool; + return 0; +} + +size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize) +{ + return ZSTD_CCtx_refPrefix_advanced(cctx, prefix, prefixSize, ZSTD_dct_rawContent); +} + +size_t ZSTD_CCtx_refPrefix_advanced( + ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) +{ + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Can't ref a prefix when ctx not in init stage."); + ZSTD_clearAllDicts(cctx); + if (prefix != NULL && prefixSize > 0) { + cctx->prefixDict.dict = prefix; + cctx->prefixDict.dictSize = prefixSize; + cctx->prefixDict.dictContentType = dictContentType; + } + return 0; +} + +/*! ZSTD_CCtx_reset() : + * Also dumps dictionary */ +size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset) +{ + if ( (reset == ZSTD_reset_session_only) + || (reset == ZSTD_reset_session_and_parameters) ) { + cctx->streamStage = zcss_init; + cctx->pledgedSrcSizePlusOne = 0; + } + if ( (reset == ZSTD_reset_parameters) + || (reset == ZSTD_reset_session_and_parameters) ) { + RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong, + "Reset parameters is only possible during init stage."); + ZSTD_clearAllDicts(cctx); + return ZSTD_CCtxParams_reset(&cctx->requestedParams); + } + return 0; +} + + +/** ZSTD_checkCParams() : + control CParam values remain within authorized range. + @return : 0, or an error code if one value is beyond authorized range */ +size_t ZSTD_checkCParams(ZSTD_compressionParameters cParams) +{ + BOUNDCHECK(ZSTD_c_windowLog, (int)cParams.windowLog); + BOUNDCHECK(ZSTD_c_chainLog, (int)cParams.chainLog); + BOUNDCHECK(ZSTD_c_hashLog, (int)cParams.hashLog); + BOUNDCHECK(ZSTD_c_searchLog, (int)cParams.searchLog); + BOUNDCHECK(ZSTD_c_minMatch, (int)cParams.minMatch); + BOUNDCHECK(ZSTD_c_targetLength,(int)cParams.targetLength); + BOUNDCHECK(ZSTD_c_strategy, (int)cParams.strategy); + return 0; +} + +/** ZSTD_clampCParams() : + * make CParam values within valid range. + * @return : valid CParams */ +static ZSTD_compressionParameters +ZSTD_clampCParams(ZSTD_compressionParameters cParams) +{ +# define CLAMP_TYPE(cParam, val, type) \ + do { \ + ZSTD_bounds const bounds = ZSTD_cParam_getBounds(cParam); \ + if ((int)valbounds.upperBound) val=(type)bounds.upperBound; \ + } while (0) +# define CLAMP(cParam, val) CLAMP_TYPE(cParam, val, unsigned) + CLAMP(ZSTD_c_windowLog, cParams.windowLog); + CLAMP(ZSTD_c_chainLog, cParams.chainLog); + CLAMP(ZSTD_c_hashLog, cParams.hashLog); + CLAMP(ZSTD_c_searchLog, cParams.searchLog); + CLAMP(ZSTD_c_minMatch, cParams.minMatch); + CLAMP(ZSTD_c_targetLength,cParams.targetLength); + CLAMP_TYPE(ZSTD_c_strategy,cParams.strategy, ZSTD_strategy); + return cParams; +} + +/** ZSTD_cycleLog() : + * condition for correct operation : hashLog > 1 */ +U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat) +{ + U32 const btScale = ((U32)strat >= (U32)ZSTD_btlazy2); + return hashLog - btScale; +} + +/** ZSTD_dictAndWindowLog() : + * Returns an adjusted window log that is large enough to fit the source and the dictionary. + * The zstd format says that the entire dictionary is valid if one byte of the dictionary + * is within the window. So the hashLog and chainLog should be large enough to reference both + * the dictionary and the window. So we must use this adjusted dictAndWindowLog when downsizing + * the hashLog and windowLog. + * NOTE: srcSize must not be ZSTD_CONTENTSIZE_UNKNOWN. + */ +static U32 ZSTD_dictAndWindowLog(U32 windowLog, U64 srcSize, U64 dictSize) +{ + const U64 maxWindowSize = 1ULL << ZSTD_WINDOWLOG_MAX; + /* No dictionary ==> No change */ + if (dictSize == 0) { + return windowLog; + } + assert(windowLog <= ZSTD_WINDOWLOG_MAX); + assert(srcSize != ZSTD_CONTENTSIZE_UNKNOWN); /* Handled in ZSTD_adjustCParams_internal() */ + { + U64 const windowSize = 1ULL << windowLog; + U64 const dictAndWindowSize = dictSize + windowSize; + /* If the window size is already large enough to fit both the source and the dictionary + * then just use the window size. Otherwise adjust so that it fits the dictionary and + * the window. + */ + if (windowSize >= dictSize + srcSize) { + return windowLog; /* Window size large enough already */ + } else if (dictAndWindowSize >= maxWindowSize) { + return ZSTD_WINDOWLOG_MAX; /* Larger than max window log */ + } else { + return ZSTD_highbit32((U32)dictAndWindowSize - 1) + 1; + } + } +} + +/** ZSTD_adjustCParams_internal() : + * optimize `cPar` for a specified input (`srcSize` and `dictSize`). + * mostly downsize to reduce memory consumption and initialization latency. + * `srcSize` can be ZSTD_CONTENTSIZE_UNKNOWN when not known. + * `mode` is the mode for parameter adjustment. See docs for `ZSTD_CParamMode_e`. + * note : `srcSize==0` means 0! + * condition : cPar is presumed validated (can be checked using ZSTD_checkCParams()). */ +static ZSTD_compressionParameters +ZSTD_adjustCParams_internal(ZSTD_compressionParameters cPar, + unsigned long long srcSize, + size_t dictSize, + ZSTD_CParamMode_e mode, + ZSTD_ParamSwitch_e useRowMatchFinder) +{ + const U64 minSrcSize = 513; /* (1<<9) + 1 */ + const U64 maxWindowResize = 1ULL << (ZSTD_WINDOWLOG_MAX-1); + assert(ZSTD_checkCParams(cPar)==0); + + /* Cascade the selected strategy down to the next-highest one built into + * this binary. */ +#ifdef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR + if (cPar.strategy == ZSTD_btultra2) { + cPar.strategy = ZSTD_btultra; + } + if (cPar.strategy == ZSTD_btultra) { + cPar.strategy = ZSTD_btopt; + } +#endif +#ifdef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR + if (cPar.strategy == ZSTD_btopt) { + cPar.strategy = ZSTD_btlazy2; + } +#endif +#ifdef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR + if (cPar.strategy == ZSTD_btlazy2) { + cPar.strategy = ZSTD_lazy2; + } +#endif +#ifdef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR + if (cPar.strategy == ZSTD_lazy2) { + cPar.strategy = ZSTD_lazy; + } +#endif +#ifdef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR + if (cPar.strategy == ZSTD_lazy) { + cPar.strategy = ZSTD_greedy; + } +#endif +#ifdef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR + if (cPar.strategy == ZSTD_greedy) { + cPar.strategy = ZSTD_dfast; + } +#endif +#ifdef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR + if (cPar.strategy == ZSTD_dfast) { + cPar.strategy = ZSTD_fast; + cPar.targetLength = 0; + } +#endif + + switch (mode) { + case ZSTD_cpm_unknown: + case ZSTD_cpm_noAttachDict: + /* If we don't know the source size, don't make any + * assumptions about it. We will already have selected + * smaller parameters if a dictionary is in use. + */ + break; + case ZSTD_cpm_createCDict: + /* Assume a small source size when creating a dictionary + * with an unknown source size. + */ + if (dictSize && srcSize == ZSTD_CONTENTSIZE_UNKNOWN) + srcSize = minSrcSize; + break; + case ZSTD_cpm_attachDict: + /* Dictionary has its own dedicated parameters which have + * already been selected. We are selecting parameters + * for only the source. + */ + dictSize = 0; + break; + default: + assert(0); + break; + } + + /* resize windowLog if input is small enough, to use less memory */ + if ( (srcSize <= maxWindowResize) + && (dictSize <= maxWindowResize) ) { + U32 const tSize = (U32)(srcSize + dictSize); + static U32 const hashSizeMin = 1 << ZSTD_HASHLOG_MIN; + U32 const srcLog = (tSize < hashSizeMin) ? ZSTD_HASHLOG_MIN : + ZSTD_highbit32(tSize-1) + 1; + if (cPar.windowLog > srcLog) cPar.windowLog = srcLog; + } + if (srcSize != ZSTD_CONTENTSIZE_UNKNOWN) { + U32 const dictAndWindowLog = ZSTD_dictAndWindowLog(cPar.windowLog, (U64)srcSize, (U64)dictSize); + U32 const cycleLog = ZSTD_cycleLog(cPar.chainLog, cPar.strategy); + if (cPar.hashLog > dictAndWindowLog+1) cPar.hashLog = dictAndWindowLog+1; + if (cycleLog > dictAndWindowLog) + cPar.chainLog -= (cycleLog - dictAndWindowLog); + } + + if (cPar.windowLog < ZSTD_WINDOWLOG_ABSOLUTEMIN) + cPar.windowLog = ZSTD_WINDOWLOG_ABSOLUTEMIN; /* minimum wlog required for valid frame header */ + + /* We can't use more than 32 bits of hash in total, so that means that we require: + * (hashLog + 8) <= 32 && (chainLog + 8) <= 32 + */ + if (mode == ZSTD_cpm_createCDict && ZSTD_CDictIndicesAreTagged(&cPar)) { + U32 const maxShortCacheHashLog = 32 - ZSTD_SHORT_CACHE_TAG_BITS; + if (cPar.hashLog > maxShortCacheHashLog) { + cPar.hashLog = maxShortCacheHashLog; + } + if (cPar.chainLog > maxShortCacheHashLog) { + cPar.chainLog = maxShortCacheHashLog; + } + } + + + /* At this point, we aren't 100% sure if we are using the row match finder. + * Unless it is explicitly disabled, conservatively assume that it is enabled. + * In this case it will only be disabled for small sources, so shrinking the + * hash log a little bit shouldn't result in any ratio loss. + */ + if (useRowMatchFinder == ZSTD_ps_auto) + useRowMatchFinder = ZSTD_ps_enable; + + /* We can't hash more than 32-bits in total. So that means that we require: + * (hashLog - rowLog + 8) <= 32 + */ + if (ZSTD_rowMatchFinderUsed(cPar.strategy, useRowMatchFinder)) { + /* Switch to 32-entry rows if searchLog is 5 (or more) */ + U32 const rowLog = BOUNDED(4, cPar.searchLog, 6); + U32 const maxRowHashLog = 32 - ZSTD_ROW_HASH_TAG_BITS; + U32 const maxHashLog = maxRowHashLog + rowLog; + assert(cPar.hashLog >= rowLog); + if (cPar.hashLog > maxHashLog) { + cPar.hashLog = maxHashLog; + } + } + + return cPar; +} + +ZSTD_compressionParameters +ZSTD_adjustCParams(ZSTD_compressionParameters cPar, + unsigned long long srcSize, + size_t dictSize) +{ + cPar = ZSTD_clampCParams(cPar); /* resulting cPar is necessarily valid (all parameters within range) */ + if (srcSize == 0) srcSize = ZSTD_CONTENTSIZE_UNKNOWN; + return ZSTD_adjustCParams_internal(cPar, srcSize, dictSize, ZSTD_cpm_unknown, ZSTD_ps_auto); +} + +static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode); +static ZSTD_parameters ZSTD_getParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode); + +static void ZSTD_overrideCParams( + ZSTD_compressionParameters* cParams, + const ZSTD_compressionParameters* overrides) +{ + if (overrides->windowLog) cParams->windowLog = overrides->windowLog; + if (overrides->hashLog) cParams->hashLog = overrides->hashLog; + if (overrides->chainLog) cParams->chainLog = overrides->chainLog; + if (overrides->searchLog) cParams->searchLog = overrides->searchLog; + if (overrides->minMatch) cParams->minMatch = overrides->minMatch; + if (overrides->targetLength) cParams->targetLength = overrides->targetLength; + if (overrides->strategy) cParams->strategy = overrides->strategy; +} + +ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( + const ZSTD_CCtx_params* CCtxParams, U64 srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) +{ + ZSTD_compressionParameters cParams; + if (srcSizeHint == ZSTD_CONTENTSIZE_UNKNOWN && CCtxParams->srcSizeHint > 0) { + assert(CCtxParams->srcSizeHint>=0); + srcSizeHint = (U64)CCtxParams->srcSizeHint; + } + cParams = ZSTD_getCParams_internal(CCtxParams->compressionLevel, srcSizeHint, dictSize, mode); + if (CCtxParams->ldmParams.enableLdm == ZSTD_ps_enable) cParams.windowLog = ZSTD_LDM_DEFAULT_WINDOW_LOG; + ZSTD_overrideCParams(&cParams, &CCtxParams->cParams); + assert(!ZSTD_checkCParams(cParams)); + /* srcSizeHint == 0 means 0 */ + return ZSTD_adjustCParams_internal(cParams, srcSizeHint, dictSize, mode, CCtxParams->useRowMatchFinder); +} + +static size_t +ZSTD_sizeof_matchState(const ZSTD_compressionParameters* const cParams, + const ZSTD_ParamSwitch_e useRowMatchFinder, + const int enableDedicatedDictSearch, + const U32 forCCtx) +{ + /* chain table size should be 0 for fast or row-hash strategies */ + size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, enableDedicatedDictSearch && !forCCtx) + ? ((size_t)1 << cParams->chainLog) + : 0; + size_t const hSize = ((size_t)1) << cParams->hashLog; + U32 const hashLog3 = (forCCtx && cParams->minMatch==3) ? MIN(ZSTD_HASHLOG3_MAX, cParams->windowLog) : 0; + size_t const h3Size = hashLog3 ? ((size_t)1) << hashLog3 : 0; + /* We don't use ZSTD_cwksp_alloc_size() here because the tables aren't + * surrounded by redzones in ASAN. */ + size_t const tableSpace = chainSize * sizeof(U32) + + hSize * sizeof(U32) + + h3Size * sizeof(U32); + size_t const optPotentialSpace = + ZSTD_cwksp_aligned64_alloc_size((MaxML+1) * sizeof(U32)) + + ZSTD_cwksp_aligned64_alloc_size((MaxLL+1) * sizeof(U32)) + + ZSTD_cwksp_aligned64_alloc_size((MaxOff+1) * sizeof(U32)) + + ZSTD_cwksp_aligned64_alloc_size((1<strategy, useRowMatchFinder) + ? ZSTD_cwksp_aligned64_alloc_size(hSize) + : 0; + size_t const optSpace = (forCCtx && (cParams->strategy >= ZSTD_btopt)) + ? optPotentialSpace + : 0; + size_t const slackSpace = ZSTD_cwksp_slack_space_required(); + + /* tables are guaranteed to be sized in multiples of 64 bytes (or 16 uint32_t) */ + ZSTD_STATIC_ASSERT(ZSTD_HASHLOG_MIN >= 4 && ZSTD_WINDOWLOG_MIN >= 4 && ZSTD_CHAINLOG_MIN >= 4); + assert(useRowMatchFinder != ZSTD_ps_auto); + + DEBUGLOG(4, "chainSize: %u - hSize: %u - h3Size: %u", + (U32)chainSize, (U32)hSize, (U32)h3Size); + return tableSpace + optSpace + slackSpace + lazyAdditionalSpace; +} + +/* Helper function for calculating memory requirements. + * Gives a tighter bound than ZSTD_sequenceBound() by taking minMatch into account. */ +static size_t ZSTD_maxNbSeq(size_t blockSize, unsigned minMatch, int useSequenceProducer) { + U32 const divider = (minMatch==3 || useSequenceProducer) ? 3 : 4; + return blockSize / divider; +} + +static size_t ZSTD_estimateCCtxSize_usingCCtxParams_internal( + const ZSTD_compressionParameters* cParams, + const ldmParams_t* ldmParams, + const int isStatic, + const ZSTD_ParamSwitch_e useRowMatchFinder, + const size_t buffInSize, + const size_t buffOutSize, + const U64 pledgedSrcSize, + int useSequenceProducer, + size_t maxBlockSize) +{ + size_t const windowSize = (size_t) BOUNDED(1ULL, 1ULL << cParams->windowLog, pledgedSrcSize); + size_t const blockSize = MIN(ZSTD_resolveMaxBlockSize(maxBlockSize), windowSize); + size_t const maxNbSeq = ZSTD_maxNbSeq(blockSize, cParams->minMatch, useSequenceProducer); + size_t const tokenSpace = ZSTD_cwksp_alloc_size(WILDCOPY_OVERLENGTH + blockSize) + + ZSTD_cwksp_aligned64_alloc_size(maxNbSeq * sizeof(SeqDef)) + + 3 * ZSTD_cwksp_alloc_size(maxNbSeq * sizeof(BYTE)); + size_t const tmpWorkSpace = ZSTD_cwksp_alloc_size(TMP_WORKSPACE_SIZE); + size_t const blockStateSpace = 2 * ZSTD_cwksp_alloc_size(sizeof(ZSTD_compressedBlockState_t)); + size_t const matchStateSize = ZSTD_sizeof_matchState(cParams, useRowMatchFinder, /* enableDedicatedDictSearch */ 0, /* forCCtx */ 1); + + size_t const ldmSpace = ZSTD_ldm_getTableSize(*ldmParams); + size_t const maxNbLdmSeq = ZSTD_ldm_getMaxNbSeq(*ldmParams, blockSize); + size_t const ldmSeqSpace = ldmParams->enableLdm == ZSTD_ps_enable ? + ZSTD_cwksp_aligned64_alloc_size(maxNbLdmSeq * sizeof(rawSeq)) : 0; + + + size_t const bufferSpace = ZSTD_cwksp_alloc_size(buffInSize) + + ZSTD_cwksp_alloc_size(buffOutSize); + + size_t const cctxSpace = isStatic ? ZSTD_cwksp_alloc_size(sizeof(ZSTD_CCtx)) : 0; + + size_t const maxNbExternalSeq = ZSTD_sequenceBound(blockSize); + size_t const externalSeqSpace = useSequenceProducer + ? ZSTD_cwksp_aligned64_alloc_size(maxNbExternalSeq * sizeof(ZSTD_Sequence)) + : 0; + + size_t const neededSpace = + cctxSpace + + tmpWorkSpace + + blockStateSpace + + ldmSpace + + ldmSeqSpace + + matchStateSize + + tokenSpace + + bufferSpace + + externalSeqSpace; + + DEBUGLOG(5, "estimate workspace : %u", (U32)neededSpace); + return neededSpace; +} + +size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params) +{ + ZSTD_compressionParameters const cParams = + ZSTD_getCParamsFromCCtxParams(params, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); + ZSTD_ParamSwitch_e const useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(params->useRowMatchFinder, + &cParams); + + RETURN_ERROR_IF(params->nbWorkers > 0, GENERIC, "Estimate CCtx size is supported for single-threaded compression only."); + /* estimateCCtxSize is for one-shot compression. So no buffers should + * be needed. However, we still allocate two 0-sized buffers, which can + * take space under ASAN. */ + return ZSTD_estimateCCtxSize_usingCCtxParams_internal( + &cParams, ¶ms->ldmParams, 1, useRowMatchFinder, 0, 0, ZSTD_CONTENTSIZE_UNKNOWN, ZSTD_hasExtSeqProd(params), params->maxBlockSize); +} + +size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams) +{ + ZSTD_CCtx_params initialParams = ZSTD_makeCCtxParamsFromCParams(cParams); + if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { + /* Pick bigger of not using and using row-based matchfinder for greedy and lazy strategies */ + size_t noRowCCtxSize; + size_t rowCCtxSize; + initialParams.useRowMatchFinder = ZSTD_ps_disable; + noRowCCtxSize = ZSTD_estimateCCtxSize_usingCCtxParams(&initialParams); + initialParams.useRowMatchFinder = ZSTD_ps_enable; + rowCCtxSize = ZSTD_estimateCCtxSize_usingCCtxParams(&initialParams); + return MAX(noRowCCtxSize, rowCCtxSize); + } else { + return ZSTD_estimateCCtxSize_usingCCtxParams(&initialParams); + } +} + +static size_t ZSTD_estimateCCtxSize_internal(int compressionLevel) +{ + int tier = 0; + size_t largestSize = 0; + static const unsigned long long srcSizeTiers[4] = {16 KB, 128 KB, 256 KB, ZSTD_CONTENTSIZE_UNKNOWN}; + for (; tier < 4; ++tier) { + /* Choose the set of cParams for a given level across all srcSizes that give the largest cctxSize */ + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, srcSizeTiers[tier], 0, ZSTD_cpm_noAttachDict); + largestSize = MAX(ZSTD_estimateCCtxSize_usingCParams(cParams), largestSize); + } + return largestSize; +} + +size_t ZSTD_estimateCCtxSize(int compressionLevel) +{ + int level; + size_t memBudget = 0; + for (level=MIN(compressionLevel, 1); level<=compressionLevel; level++) { + /* Ensure monotonically increasing memory usage as compression level increases */ + size_t const newMB = ZSTD_estimateCCtxSize_internal(level); + if (newMB > memBudget) memBudget = newMB; + } + return memBudget; +} + +size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* params) +{ + RETURN_ERROR_IF(params->nbWorkers > 0, GENERIC, "Estimate CCtx size is supported for single-threaded compression only."); + { ZSTD_compressionParameters const cParams = + ZSTD_getCParamsFromCCtxParams(params, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); + size_t const blockSize = MIN(ZSTD_resolveMaxBlockSize(params->maxBlockSize), (size_t)1 << cParams.windowLog); + size_t const inBuffSize = (params->inBufferMode == ZSTD_bm_buffered) + ? ((size_t)1 << cParams.windowLog) + blockSize + : 0; + size_t const outBuffSize = (params->outBufferMode == ZSTD_bm_buffered) + ? ZSTD_compressBound(blockSize) + 1 + : 0; + ZSTD_ParamSwitch_e const useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(params->useRowMatchFinder, ¶ms->cParams); + + return ZSTD_estimateCCtxSize_usingCCtxParams_internal( + &cParams, ¶ms->ldmParams, 1, useRowMatchFinder, inBuffSize, outBuffSize, + ZSTD_CONTENTSIZE_UNKNOWN, ZSTD_hasExtSeqProd(params), params->maxBlockSize); + } +} + +size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams) +{ + ZSTD_CCtx_params initialParams = ZSTD_makeCCtxParamsFromCParams(cParams); + if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { + /* Pick bigger of not using and using row-based matchfinder for greedy and lazy strategies */ + size_t noRowCCtxSize; + size_t rowCCtxSize; + initialParams.useRowMatchFinder = ZSTD_ps_disable; + noRowCCtxSize = ZSTD_estimateCStreamSize_usingCCtxParams(&initialParams); + initialParams.useRowMatchFinder = ZSTD_ps_enable; + rowCCtxSize = ZSTD_estimateCStreamSize_usingCCtxParams(&initialParams); + return MAX(noRowCCtxSize, rowCCtxSize); + } else { + return ZSTD_estimateCStreamSize_usingCCtxParams(&initialParams); + } +} + +static size_t ZSTD_estimateCStreamSize_internal(int compressionLevel) +{ + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); + return ZSTD_estimateCStreamSize_usingCParams(cParams); +} + +size_t ZSTD_estimateCStreamSize(int compressionLevel) +{ + int level; + size_t memBudget = 0; + for (level=MIN(compressionLevel, 1); level<=compressionLevel; level++) { + size_t const newMB = ZSTD_estimateCStreamSize_internal(level); + if (newMB > memBudget) memBudget = newMB; + } + return memBudget; +} + +/* ZSTD_getFrameProgression(): + * tells how much data has been consumed (input) and produced (output) for current frame. + * able to count progression inside worker threads (non-blocking mode). + */ +ZSTD_frameProgression ZSTD_getFrameProgression(const ZSTD_CCtx* cctx) +{ +#ifdef ZSTD_MULTITHREAD + if (cctx->appliedParams.nbWorkers > 0) { + return ZSTDMT_getFrameProgression(cctx->mtctx); + } +#endif + { ZSTD_frameProgression fp; + size_t const buffered = (cctx->inBuff == NULL) ? 0 : + cctx->inBuffPos - cctx->inToCompress; + if (buffered) assert(cctx->inBuffPos >= cctx->inToCompress); + assert(buffered <= ZSTD_BLOCKSIZE_MAX); + fp.ingested = cctx->consumedSrcSize + buffered; + fp.consumed = cctx->consumedSrcSize; + fp.produced = cctx->producedCSize; + fp.flushed = cctx->producedCSize; /* simplified; some data might still be left within streaming output buffer */ + fp.currentJobID = 0; + fp.nbActiveWorkers = 0; + return fp; +} } + +/*! ZSTD_toFlushNow() + * Only useful for multithreading scenarios currently (nbWorkers >= 1). + */ +size_t ZSTD_toFlushNow(ZSTD_CCtx* cctx) +{ +#ifdef ZSTD_MULTITHREAD + if (cctx->appliedParams.nbWorkers > 0) { + return ZSTDMT_toFlushNow(cctx->mtctx); + } +#endif + (void)cctx; + return 0; /* over-simplification; could also check if context is currently running in streaming mode, and in which case, report how many bytes are left to be flushed within output buffer */ +} + +static void ZSTD_assertEqualCParams(ZSTD_compressionParameters cParams1, + ZSTD_compressionParameters cParams2) +{ + (void)cParams1; + (void)cParams2; + assert(cParams1.windowLog == cParams2.windowLog); + assert(cParams1.chainLog == cParams2.chainLog); + assert(cParams1.hashLog == cParams2.hashLog); + assert(cParams1.searchLog == cParams2.searchLog); + assert(cParams1.minMatch == cParams2.minMatch); + assert(cParams1.targetLength == cParams2.targetLength); + assert(cParams1.strategy == cParams2.strategy); +} + +void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs) +{ + int i; + for (i = 0; i < ZSTD_REP_NUM; ++i) + bs->rep[i] = repStartValue[i]; + bs->entropy.huf.repeatMode = HUF_repeat_none; + bs->entropy.fse.offcode_repeatMode = FSE_repeat_none; + bs->entropy.fse.matchlength_repeatMode = FSE_repeat_none; + bs->entropy.fse.litlength_repeatMode = FSE_repeat_none; +} + +/*! ZSTD_invalidateMatchState() + * Invalidate all the matches in the match finder tables. + * Requires nextSrc and base to be set (can be NULL). + */ +static void ZSTD_invalidateMatchState(ZSTD_MatchState_t* ms) +{ + ZSTD_window_clear(&ms->window); + + ms->nextToUpdate = ms->window.dictLimit; + ms->loadedDictEnd = 0; + ms->opt.litLengthSum = 0; /* force reset of btopt stats */ + ms->dictMatchState = NULL; +} + +/** + * Controls, for this matchState reset, whether the tables need to be cleared / + * prepared for the coming compression (ZSTDcrp_makeClean), or whether the + * tables can be left unclean (ZSTDcrp_leaveDirty), because we know that a + * subsequent operation will overwrite the table space anyways (e.g., copying + * the matchState contents in from a CDict). + */ +typedef enum { + ZSTDcrp_makeClean, + ZSTDcrp_leaveDirty +} ZSTD_compResetPolicy_e; + +/** + * Controls, for this matchState reset, whether indexing can continue where it + * left off (ZSTDirp_continue), or whether it needs to be restarted from zero + * (ZSTDirp_reset). + */ +typedef enum { + ZSTDirp_continue, + ZSTDirp_reset +} ZSTD_indexResetPolicy_e; + +typedef enum { + ZSTD_resetTarget_CDict, + ZSTD_resetTarget_CCtx +} ZSTD_resetTarget_e; + +/* Mixes bits in a 64 bits in a value, based on XXH3_rrmxmx */ +static U64 ZSTD_bitmix(U64 val, U64 len) { + val ^= ZSTD_rotateRight_U64(val, 49) ^ ZSTD_rotateRight_U64(val, 24); + val *= 0x9FB21C651E98DF25ULL; + val ^= (val >> 35) + len ; + val *= 0x9FB21C651E98DF25ULL; + return val ^ (val >> 28); +} + +/* Mixes in the hashSalt and hashSaltEntropy to create a new hashSalt */ +static void ZSTD_advanceHashSalt(ZSTD_MatchState_t* ms) { + ms->hashSalt = ZSTD_bitmix(ms->hashSalt, 8) ^ ZSTD_bitmix((U64) ms->hashSaltEntropy, 4); +} + +static size_t +ZSTD_reset_matchState(ZSTD_MatchState_t* ms, + ZSTD_cwksp* ws, + const ZSTD_compressionParameters* cParams, + const ZSTD_ParamSwitch_e useRowMatchFinder, + const ZSTD_compResetPolicy_e crp, + const ZSTD_indexResetPolicy_e forceResetIndex, + const ZSTD_resetTarget_e forWho) +{ + /* disable chain table allocation for fast or row-based strategies */ + size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, + ms->dedicatedDictSearch && (forWho == ZSTD_resetTarget_CDict)) + ? ((size_t)1 << cParams->chainLog) + : 0; + size_t const hSize = ((size_t)1) << cParams->hashLog; + U32 const hashLog3 = ((forWho == ZSTD_resetTarget_CCtx) && cParams->minMatch==3) ? MIN(ZSTD_HASHLOG3_MAX, cParams->windowLog) : 0; + size_t const h3Size = hashLog3 ? ((size_t)1) << hashLog3 : 0; + + DEBUGLOG(4, "reset indices : %u", forceResetIndex == ZSTDirp_reset); + assert(useRowMatchFinder != ZSTD_ps_auto); + if (forceResetIndex == ZSTDirp_reset) { + ZSTD_window_init(&ms->window); + ZSTD_cwksp_mark_tables_dirty(ws); + } + + ms->hashLog3 = hashLog3; + ms->lazySkipping = 0; + + ZSTD_invalidateMatchState(ms); + + assert(!ZSTD_cwksp_reserve_failed(ws)); /* check that allocation hasn't already failed */ + + ZSTD_cwksp_clear_tables(ws); + + DEBUGLOG(5, "reserving table space"); + /* table Space */ + ms->hashTable = (U32*)ZSTD_cwksp_reserve_table(ws, hSize * sizeof(U32)); + ms->chainTable = (U32*)ZSTD_cwksp_reserve_table(ws, chainSize * sizeof(U32)); + ms->hashTable3 = (U32*)ZSTD_cwksp_reserve_table(ws, h3Size * sizeof(U32)); + RETURN_ERROR_IF(ZSTD_cwksp_reserve_failed(ws), memory_allocation, + "failed a workspace allocation in ZSTD_reset_matchState"); + + DEBUGLOG(4, "reset table : %u", crp!=ZSTDcrp_leaveDirty); + if (crp!=ZSTDcrp_leaveDirty) { + /* reset tables only */ + ZSTD_cwksp_clean_tables(ws); + } + + if (ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder)) { + /* Row match finder needs an additional table of hashes ("tags") */ + size_t const tagTableSize = hSize; + /* We want to generate a new salt in case we reset a Cctx, but we always want to use + * 0 when we reset a Cdict */ + if(forWho == ZSTD_resetTarget_CCtx) { + ms->tagTable = (BYTE*) ZSTD_cwksp_reserve_aligned_init_once(ws, tagTableSize); + ZSTD_advanceHashSalt(ms); + } else { + /* When we are not salting we want to always memset the memory */ + ms->tagTable = (BYTE*) ZSTD_cwksp_reserve_aligned64(ws, tagTableSize); + ZSTD_memset(ms->tagTable, 0, tagTableSize); + ms->hashSalt = 0; + } + { /* Switch to 32-entry rows if searchLog is 5 (or more) */ + U32 const rowLog = BOUNDED(4, cParams->searchLog, 6); + assert(cParams->hashLog >= rowLog); + ms->rowHashLog = cParams->hashLog - rowLog; + } + } + + /* opt parser space */ + if ((forWho == ZSTD_resetTarget_CCtx) && (cParams->strategy >= ZSTD_btopt)) { + DEBUGLOG(4, "reserving optimal parser space"); + ms->opt.litFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (1<opt.litLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (MaxLL+1) * sizeof(unsigned)); + ms->opt.matchLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (MaxML+1) * sizeof(unsigned)); + ms->opt.offCodeFreq = (unsigned*)ZSTD_cwksp_reserve_aligned64(ws, (MaxOff+1) * sizeof(unsigned)); + ms->opt.matchTable = (ZSTD_match_t*)ZSTD_cwksp_reserve_aligned64(ws, ZSTD_OPT_SIZE * sizeof(ZSTD_match_t)); + ms->opt.priceTable = (ZSTD_optimal_t*)ZSTD_cwksp_reserve_aligned64(ws, ZSTD_OPT_SIZE * sizeof(ZSTD_optimal_t)); + } + + ms->cParams = *cParams; + + RETURN_ERROR_IF(ZSTD_cwksp_reserve_failed(ws), memory_allocation, + "failed a workspace allocation in ZSTD_reset_matchState"); + return 0; +} + +/* ZSTD_indexTooCloseToMax() : + * minor optimization : prefer memset() rather than reduceIndex() + * which is measurably slow in some circumstances (reported for Visual Studio). + * Works when re-using a context for a lot of smallish inputs : + * if all inputs are smaller than ZSTD_INDEXOVERFLOW_MARGIN, + * memset() will be triggered before reduceIndex(). + */ +#define ZSTD_INDEXOVERFLOW_MARGIN (16 MB) +static int ZSTD_indexTooCloseToMax(ZSTD_window_t w) +{ + return (size_t)(w.nextSrc - w.base) > (ZSTD_CURRENT_MAX - ZSTD_INDEXOVERFLOW_MARGIN); +} + +/** ZSTD_dictTooBig(): + * When dictionaries are larger than ZSTD_CHUNKSIZE_MAX they can't be loaded in + * one go generically. So we ensure that in that case we reset the tables to zero, + * so that we can load as much of the dictionary as possible. + */ +static int ZSTD_dictTooBig(size_t const loadedDictSize) +{ + return loadedDictSize > ZSTD_CHUNKSIZE_MAX; +} + +/*! ZSTD_resetCCtx_internal() : + * @param loadedDictSize The size of the dictionary to be loaded + * into the context, if any. If no dictionary is used, or the + * dictionary is being attached / copied, then pass 0. + * note : `params` are assumed fully validated at this stage. + */ +static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, + ZSTD_CCtx_params const* params, + U64 const pledgedSrcSize, + size_t const loadedDictSize, + ZSTD_compResetPolicy_e const crp, + ZSTD_buffered_policy_e const zbuff) +{ + ZSTD_cwksp* const ws = &zc->workspace; + DEBUGLOG(4, "ZSTD_resetCCtx_internal: pledgedSrcSize=%u, wlog=%u, useRowMatchFinder=%d useBlockSplitter=%d", + (U32)pledgedSrcSize, params->cParams.windowLog, (int)params->useRowMatchFinder, (int)params->postBlockSplitter); + assert(!ZSTD_isError(ZSTD_checkCParams(params->cParams))); + + zc->isFirstBlock = 1; + + /* Set applied params early so we can modify them for LDM, + * and point params at the applied params. + */ + zc->appliedParams = *params; + params = &zc->appliedParams; + + assert(params->useRowMatchFinder != ZSTD_ps_auto); + assert(params->postBlockSplitter != ZSTD_ps_auto); + assert(params->ldmParams.enableLdm != ZSTD_ps_auto); + assert(params->maxBlockSize != 0); + if (params->ldmParams.enableLdm == ZSTD_ps_enable) { + /* Adjust long distance matching parameters */ + ZSTD_ldm_adjustParameters(&zc->appliedParams.ldmParams, ¶ms->cParams); + assert(params->ldmParams.hashLog >= params->ldmParams.bucketSizeLog); + assert(params->ldmParams.hashRateLog < 32); + } + + { size_t const windowSize = MAX(1, (size_t)MIN(((U64)1 << params->cParams.windowLog), pledgedSrcSize)); + size_t const blockSize = MIN(params->maxBlockSize, windowSize); + size_t const maxNbSeq = ZSTD_maxNbSeq(blockSize, params->cParams.minMatch, ZSTD_hasExtSeqProd(params)); + size_t const buffOutSize = (zbuff == ZSTDb_buffered && params->outBufferMode == ZSTD_bm_buffered) + ? ZSTD_compressBound(blockSize) + 1 + : 0; + size_t const buffInSize = (zbuff == ZSTDb_buffered && params->inBufferMode == ZSTD_bm_buffered) + ? windowSize + blockSize + : 0; + size_t const maxNbLdmSeq = ZSTD_ldm_getMaxNbSeq(params->ldmParams, blockSize); + + int const indexTooClose = ZSTD_indexTooCloseToMax(zc->blockState.matchState.window); + int const dictTooBig = ZSTD_dictTooBig(loadedDictSize); + ZSTD_indexResetPolicy_e needsIndexReset = + (indexTooClose || dictTooBig || !zc->initialized) ? ZSTDirp_reset : ZSTDirp_continue; + + size_t const neededSpace = + ZSTD_estimateCCtxSize_usingCCtxParams_internal( + ¶ms->cParams, ¶ms->ldmParams, zc->staticSize != 0, params->useRowMatchFinder, + buffInSize, buffOutSize, pledgedSrcSize, ZSTD_hasExtSeqProd(params), params->maxBlockSize); + + FORWARD_IF_ERROR(neededSpace, "cctx size estimate failed!"); + + if (!zc->staticSize) ZSTD_cwksp_bump_oversized_duration(ws, 0); + + { /* Check if workspace is large enough, alloc a new one if needed */ + int const workspaceTooSmall = ZSTD_cwksp_sizeof(ws) < neededSpace; + int const workspaceWasteful = ZSTD_cwksp_check_wasteful(ws, neededSpace); + int resizeWorkspace = workspaceTooSmall || workspaceWasteful; + DEBUGLOG(4, "Need %zu B workspace", neededSpace); + DEBUGLOG(4, "windowSize: %zu - blockSize: %zu", windowSize, blockSize); + + if (resizeWorkspace) { + DEBUGLOG(4, "Resize workspaceSize from %zuKB to %zuKB", + ZSTD_cwksp_sizeof(ws) >> 10, + neededSpace >> 10); + + RETURN_ERROR_IF(zc->staticSize, memory_allocation, "static cctx : no resize"); + + needsIndexReset = ZSTDirp_reset; + + ZSTD_cwksp_free(ws, zc->customMem); + FORWARD_IF_ERROR(ZSTD_cwksp_create(ws, neededSpace, zc->customMem), ""); + + DEBUGLOG(5, "reserving object space"); + /* Statically sized space. + * tmpWorkspace never moves, + * though prev/next block swap places */ + assert(ZSTD_cwksp_check_available(ws, 2 * sizeof(ZSTD_compressedBlockState_t))); + zc->blockState.prevCBlock = (ZSTD_compressedBlockState_t*) ZSTD_cwksp_reserve_object(ws, sizeof(ZSTD_compressedBlockState_t)); + RETURN_ERROR_IF(zc->blockState.prevCBlock == NULL, memory_allocation, "couldn't allocate prevCBlock"); + zc->blockState.nextCBlock = (ZSTD_compressedBlockState_t*) ZSTD_cwksp_reserve_object(ws, sizeof(ZSTD_compressedBlockState_t)); + RETURN_ERROR_IF(zc->blockState.nextCBlock == NULL, memory_allocation, "couldn't allocate nextCBlock"); + zc->tmpWorkspace = ZSTD_cwksp_reserve_object(ws, TMP_WORKSPACE_SIZE); + RETURN_ERROR_IF(zc->tmpWorkspace == NULL, memory_allocation, "couldn't allocate tmpWorkspace"); + zc->tmpWkspSize = TMP_WORKSPACE_SIZE; + } } + + ZSTD_cwksp_clear(ws); + + /* init params */ + zc->blockState.matchState.cParams = params->cParams; + zc->blockState.matchState.prefetchCDictTables = params->prefetchCDictTables == ZSTD_ps_enable; + zc->pledgedSrcSizePlusOne = pledgedSrcSize+1; + zc->consumedSrcSize = 0; + zc->producedCSize = 0; + if (pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN) + zc->appliedParams.fParams.contentSizeFlag = 0; + DEBUGLOG(4, "pledged content size : %u ; flag : %u", + (unsigned)pledgedSrcSize, zc->appliedParams.fParams.contentSizeFlag); + zc->blockSizeMax = blockSize; + + XXH64_reset(&zc->xxhState, 0); + zc->stage = ZSTDcs_init; + zc->dictID = 0; + zc->dictContentSize = 0; + + ZSTD_reset_compressedBlockState(zc->blockState.prevCBlock); + + FORWARD_IF_ERROR(ZSTD_reset_matchState( + &zc->blockState.matchState, + ws, + ¶ms->cParams, + params->useRowMatchFinder, + crp, + needsIndexReset, + ZSTD_resetTarget_CCtx), ""); + + zc->seqStore.sequencesStart = (SeqDef*)ZSTD_cwksp_reserve_aligned64(ws, maxNbSeq * sizeof(SeqDef)); + + /* ldm hash table */ + if (params->ldmParams.enableLdm == ZSTD_ps_enable) { + /* TODO: avoid memset? */ + size_t const ldmHSize = ((size_t)1) << params->ldmParams.hashLog; + zc->ldmState.hashTable = (ldmEntry_t*)ZSTD_cwksp_reserve_aligned64(ws, ldmHSize * sizeof(ldmEntry_t)); + ZSTD_memset(zc->ldmState.hashTable, 0, ldmHSize * sizeof(ldmEntry_t)); + zc->ldmSequences = (rawSeq*)ZSTD_cwksp_reserve_aligned64(ws, maxNbLdmSeq * sizeof(rawSeq)); + zc->maxNbLdmSequences = maxNbLdmSeq; + + ZSTD_window_init(&zc->ldmState.window); + zc->ldmState.loadedDictEnd = 0; + } + + /* reserve space for block-level external sequences */ + if (ZSTD_hasExtSeqProd(params)) { + size_t const maxNbExternalSeq = ZSTD_sequenceBound(blockSize); + zc->extSeqBufCapacity = maxNbExternalSeq; + zc->extSeqBuf = + (ZSTD_Sequence*)ZSTD_cwksp_reserve_aligned64(ws, maxNbExternalSeq * sizeof(ZSTD_Sequence)); + } + + /* buffers */ + + /* ZSTD_wildcopy() is used to copy into the literals buffer, + * so we have to oversize the buffer by WILDCOPY_OVERLENGTH bytes. + */ + zc->seqStore.litStart = ZSTD_cwksp_reserve_buffer(ws, blockSize + WILDCOPY_OVERLENGTH); + zc->seqStore.maxNbLit = blockSize; + + zc->bufferedPolicy = zbuff; + zc->inBuffSize = buffInSize; + zc->inBuff = (char*)ZSTD_cwksp_reserve_buffer(ws, buffInSize); + zc->outBuffSize = buffOutSize; + zc->outBuff = (char*)ZSTD_cwksp_reserve_buffer(ws, buffOutSize); + + /* ldm bucketOffsets table */ + if (params->ldmParams.enableLdm == ZSTD_ps_enable) { + /* TODO: avoid memset? */ + size_t const numBuckets = + ((size_t)1) << (params->ldmParams.hashLog - + params->ldmParams.bucketSizeLog); + zc->ldmState.bucketOffsets = ZSTD_cwksp_reserve_buffer(ws, numBuckets); + ZSTD_memset(zc->ldmState.bucketOffsets, 0, numBuckets); + } + + /* sequences storage */ + ZSTD_referenceExternalSequences(zc, NULL, 0); + zc->seqStore.maxNbSeq = maxNbSeq; + zc->seqStore.llCode = ZSTD_cwksp_reserve_buffer(ws, maxNbSeq * sizeof(BYTE)); + zc->seqStore.mlCode = ZSTD_cwksp_reserve_buffer(ws, maxNbSeq * sizeof(BYTE)); + zc->seqStore.ofCode = ZSTD_cwksp_reserve_buffer(ws, maxNbSeq * sizeof(BYTE)); + + DEBUGLOG(3, "wksp: finished allocating, %zd bytes remain available", ZSTD_cwksp_available_space(ws)); + assert(ZSTD_cwksp_estimated_space_within_bounds(ws, neededSpace)); + + zc->initialized = 1; + + return 0; + } +} + +/* ZSTD_invalidateRepCodes() : + * ensures next compression will not use repcodes from previous block. + * Note : only works with regular variant; + * do not use with extDict variant ! */ +void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx) { + int i; + for (i=0; iblockState.prevCBlock->rep[i] = 0; + assert(!ZSTD_window_hasExtDict(cctx->blockState.matchState.window)); +} + +/* These are the approximate sizes for each strategy past which copying the + * dictionary tables into the working context is faster than using them + * in-place. + */ +static const size_t attachDictSizeCutoffs[ZSTD_STRATEGY_MAX+1] = { + 8 KB, /* unused */ + 8 KB, /* ZSTD_fast */ + 16 KB, /* ZSTD_dfast */ + 32 KB, /* ZSTD_greedy */ + 32 KB, /* ZSTD_lazy */ + 32 KB, /* ZSTD_lazy2 */ + 32 KB, /* ZSTD_btlazy2 */ + 32 KB, /* ZSTD_btopt */ + 8 KB, /* ZSTD_btultra */ + 8 KB /* ZSTD_btultra2 */ +}; + +static int ZSTD_shouldAttachDict(const ZSTD_CDict* cdict, + const ZSTD_CCtx_params* params, + U64 pledgedSrcSize) +{ + size_t cutoff = attachDictSizeCutoffs[cdict->matchState.cParams.strategy]; + int const dedicatedDictSearch = cdict->matchState.dedicatedDictSearch; + return dedicatedDictSearch + || ( ( pledgedSrcSize <= cutoff + || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN + || params->attachDictPref == ZSTD_dictForceAttach ) + && params->attachDictPref != ZSTD_dictForceCopy + && !params->forceWindow ); /* dictMatchState isn't correctly + * handled in _enforceMaxDist */ +} + +static size_t +ZSTD_resetCCtx_byAttachingCDict(ZSTD_CCtx* cctx, + const ZSTD_CDict* cdict, + ZSTD_CCtx_params params, + U64 pledgedSrcSize, + ZSTD_buffered_policy_e zbuff) +{ + DEBUGLOG(4, "ZSTD_resetCCtx_byAttachingCDict() pledgedSrcSize=%llu", + (unsigned long long)pledgedSrcSize); + { + ZSTD_compressionParameters adjusted_cdict_cParams = cdict->matchState.cParams; + unsigned const windowLog = params.cParams.windowLog; + assert(windowLog != 0); + /* Resize working context table params for input only, since the dict + * has its own tables. */ + /* pledgedSrcSize == 0 means 0! */ + + if (cdict->matchState.dedicatedDictSearch) { + ZSTD_dedicatedDictSearch_revertCParams(&adjusted_cdict_cParams); + } + + params.cParams = ZSTD_adjustCParams_internal(adjusted_cdict_cParams, pledgedSrcSize, + cdict->dictContentSize, ZSTD_cpm_attachDict, + params.useRowMatchFinder); + params.cParams.windowLog = windowLog; + params.useRowMatchFinder = cdict->useRowMatchFinder; /* cdict overrides */ + FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, ¶ms, pledgedSrcSize, + /* loadedDictSize */ 0, + ZSTDcrp_makeClean, zbuff), ""); + assert(cctx->appliedParams.cParams.strategy == adjusted_cdict_cParams.strategy); + } + + { const U32 cdictEnd = (U32)( cdict->matchState.window.nextSrc + - cdict->matchState.window.base); + const U32 cdictLen = cdictEnd - cdict->matchState.window.dictLimit; + if (cdictLen == 0) { + /* don't even attach dictionaries with no contents */ + DEBUGLOG(4, "skipping attaching empty dictionary"); + } else { + DEBUGLOG(4, "attaching dictionary into context"); + cctx->blockState.matchState.dictMatchState = &cdict->matchState; + + /* prep working match state so dict matches never have negative indices + * when they are translated to the working context's index space. */ + if (cctx->blockState.matchState.window.dictLimit < cdictEnd) { + cctx->blockState.matchState.window.nextSrc = + cctx->blockState.matchState.window.base + cdictEnd; + ZSTD_window_clear(&cctx->blockState.matchState.window); + } + /* loadedDictEnd is expressed within the referential of the active context */ + cctx->blockState.matchState.loadedDictEnd = cctx->blockState.matchState.window.dictLimit; + } } + + cctx->dictID = cdict->dictID; + cctx->dictContentSize = cdict->dictContentSize; + + /* copy block state */ + ZSTD_memcpy(cctx->blockState.prevCBlock, &cdict->cBlockState, sizeof(cdict->cBlockState)); + + return 0; +} + +static void ZSTD_copyCDictTableIntoCCtx(U32* dst, U32 const* src, size_t tableSize, + ZSTD_compressionParameters const* cParams) { + if (ZSTD_CDictIndicesAreTagged(cParams)){ + /* Remove tags from the CDict table if they are present. + * See docs on "short cache" in zstd_compress_internal.h for context. */ + size_t i; + for (i = 0; i < tableSize; i++) { + U32 const taggedIndex = src[i]; + U32 const index = taggedIndex >> ZSTD_SHORT_CACHE_TAG_BITS; + dst[i] = index; + } + } else { + ZSTD_memcpy(dst, src, tableSize * sizeof(U32)); + } +} + +static size_t ZSTD_resetCCtx_byCopyingCDict(ZSTD_CCtx* cctx, + const ZSTD_CDict* cdict, + ZSTD_CCtx_params params, + U64 pledgedSrcSize, + ZSTD_buffered_policy_e zbuff) +{ + const ZSTD_compressionParameters *cdict_cParams = &cdict->matchState.cParams; + + assert(!cdict->matchState.dedicatedDictSearch); + DEBUGLOG(4, "ZSTD_resetCCtx_byCopyingCDict() pledgedSrcSize=%llu", + (unsigned long long)pledgedSrcSize); + + { unsigned const windowLog = params.cParams.windowLog; + assert(windowLog != 0); + /* Copy only compression parameters related to tables. */ + params.cParams = *cdict_cParams; + params.cParams.windowLog = windowLog; + params.useRowMatchFinder = cdict->useRowMatchFinder; + FORWARD_IF_ERROR(ZSTD_resetCCtx_internal(cctx, ¶ms, pledgedSrcSize, + /* loadedDictSize */ 0, + ZSTDcrp_leaveDirty, zbuff), ""); + assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy); + assert(cctx->appliedParams.cParams.hashLog == cdict_cParams->hashLog); + assert(cctx->appliedParams.cParams.chainLog == cdict_cParams->chainLog); + } + + ZSTD_cwksp_mark_tables_dirty(&cctx->workspace); + assert(params.useRowMatchFinder != ZSTD_ps_auto); + + /* copy tables */ + { size_t const chainSize = ZSTD_allocateChainTable(cdict_cParams->strategy, cdict->useRowMatchFinder, 0 /* DDS guaranteed disabled */) + ? ((size_t)1 << cdict_cParams->chainLog) + : 0; + size_t const hSize = (size_t)1 << cdict_cParams->hashLog; + + ZSTD_copyCDictTableIntoCCtx(cctx->blockState.matchState.hashTable, + cdict->matchState.hashTable, + hSize, cdict_cParams); + + /* Do not copy cdict's chainTable if cctx has parameters such that it would not use chainTable */ + if (ZSTD_allocateChainTable(cctx->appliedParams.cParams.strategy, cctx->appliedParams.useRowMatchFinder, 0 /* forDDSDict */)) { + ZSTD_copyCDictTableIntoCCtx(cctx->blockState.matchState.chainTable, + cdict->matchState.chainTable, + chainSize, cdict_cParams); + } + /* copy tag table */ + if (ZSTD_rowMatchFinderUsed(cdict_cParams->strategy, cdict->useRowMatchFinder)) { + size_t const tagTableSize = hSize; + ZSTD_memcpy(cctx->blockState.matchState.tagTable, + cdict->matchState.tagTable, + tagTableSize); + cctx->blockState.matchState.hashSalt = cdict->matchState.hashSalt; + } + } + + /* Zero the hashTable3, since the cdict never fills it */ + assert(cctx->blockState.matchState.hashLog3 <= 31); + { U32 const h3log = cctx->blockState.matchState.hashLog3; + size_t const h3Size = h3log ? ((size_t)1 << h3log) : 0; + assert(cdict->matchState.hashLog3 == 0); + ZSTD_memset(cctx->blockState.matchState.hashTable3, 0, h3Size * sizeof(U32)); + } + + ZSTD_cwksp_mark_tables_clean(&cctx->workspace); + + /* copy dictionary offsets */ + { ZSTD_MatchState_t const* srcMatchState = &cdict->matchState; + ZSTD_MatchState_t* dstMatchState = &cctx->blockState.matchState; + dstMatchState->window = srcMatchState->window; + dstMatchState->nextToUpdate = srcMatchState->nextToUpdate; + dstMatchState->loadedDictEnd= srcMatchState->loadedDictEnd; + } + + cctx->dictID = cdict->dictID; + cctx->dictContentSize = cdict->dictContentSize; + + /* copy block state */ + ZSTD_memcpy(cctx->blockState.prevCBlock, &cdict->cBlockState, sizeof(cdict->cBlockState)); + + return 0; +} + +/* We have a choice between copying the dictionary context into the working + * context, or referencing the dictionary context from the working context + * in-place. We decide here which strategy to use. */ +static size_t ZSTD_resetCCtx_usingCDict(ZSTD_CCtx* cctx, + const ZSTD_CDict* cdict, + const ZSTD_CCtx_params* params, + U64 pledgedSrcSize, + ZSTD_buffered_policy_e zbuff) +{ + + DEBUGLOG(4, "ZSTD_resetCCtx_usingCDict (pledgedSrcSize=%u)", + (unsigned)pledgedSrcSize); + + if (ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) { + return ZSTD_resetCCtx_byAttachingCDict( + cctx, cdict, *params, pledgedSrcSize, zbuff); + } else { + return ZSTD_resetCCtx_byCopyingCDict( + cctx, cdict, *params, pledgedSrcSize, zbuff); + } +} + +/*! ZSTD_copyCCtx_internal() : + * Duplicate an existing context `srcCCtx` into another one `dstCCtx`. + * Only works during stage ZSTDcs_init (i.e. after creation, but before first call to ZSTD_compressContinue()). + * The "context", in this case, refers to the hash and chain tables, + * entropy tables, and dictionary references. + * `windowLog` value is enforced if != 0, otherwise value is copied from srcCCtx. + * @return : 0, or an error code */ +static size_t ZSTD_copyCCtx_internal(ZSTD_CCtx* dstCCtx, + const ZSTD_CCtx* srcCCtx, + ZSTD_frameParameters fParams, + U64 pledgedSrcSize, + ZSTD_buffered_policy_e zbuff) +{ + RETURN_ERROR_IF(srcCCtx->stage!=ZSTDcs_init, stage_wrong, + "Can't copy a ctx that's not in init stage."); + DEBUGLOG(5, "ZSTD_copyCCtx_internal"); + ZSTD_memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); + { ZSTD_CCtx_params params = dstCCtx->requestedParams; + /* Copy only compression parameters related to tables. */ + params.cParams = srcCCtx->appliedParams.cParams; + assert(srcCCtx->appliedParams.useRowMatchFinder != ZSTD_ps_auto); + assert(srcCCtx->appliedParams.postBlockSplitter != ZSTD_ps_auto); + assert(srcCCtx->appliedParams.ldmParams.enableLdm != ZSTD_ps_auto); + params.useRowMatchFinder = srcCCtx->appliedParams.useRowMatchFinder; + params.postBlockSplitter = srcCCtx->appliedParams.postBlockSplitter; + params.ldmParams = srcCCtx->appliedParams.ldmParams; + params.fParams = fParams; + params.maxBlockSize = srcCCtx->appliedParams.maxBlockSize; + ZSTD_resetCCtx_internal(dstCCtx, ¶ms, pledgedSrcSize, + /* loadedDictSize */ 0, + ZSTDcrp_leaveDirty, zbuff); + assert(dstCCtx->appliedParams.cParams.windowLog == srcCCtx->appliedParams.cParams.windowLog); + assert(dstCCtx->appliedParams.cParams.strategy == srcCCtx->appliedParams.cParams.strategy); + assert(dstCCtx->appliedParams.cParams.hashLog == srcCCtx->appliedParams.cParams.hashLog); + assert(dstCCtx->appliedParams.cParams.chainLog == srcCCtx->appliedParams.cParams.chainLog); + assert(dstCCtx->blockState.matchState.hashLog3 == srcCCtx->blockState.matchState.hashLog3); + } + + ZSTD_cwksp_mark_tables_dirty(&dstCCtx->workspace); + + /* copy tables */ + { size_t const chainSize = ZSTD_allocateChainTable(srcCCtx->appliedParams.cParams.strategy, + srcCCtx->appliedParams.useRowMatchFinder, + 0 /* forDDSDict */) + ? ((size_t)1 << srcCCtx->appliedParams.cParams.chainLog) + : 0; + size_t const hSize = (size_t)1 << srcCCtx->appliedParams.cParams.hashLog; + U32 const h3log = srcCCtx->blockState.matchState.hashLog3; + size_t const h3Size = h3log ? ((size_t)1 << h3log) : 0; + + ZSTD_memcpy(dstCCtx->blockState.matchState.hashTable, + srcCCtx->blockState.matchState.hashTable, + hSize * sizeof(U32)); + ZSTD_memcpy(dstCCtx->blockState.matchState.chainTable, + srcCCtx->blockState.matchState.chainTable, + chainSize * sizeof(U32)); + ZSTD_memcpy(dstCCtx->blockState.matchState.hashTable3, + srcCCtx->blockState.matchState.hashTable3, + h3Size * sizeof(U32)); + } + + ZSTD_cwksp_mark_tables_clean(&dstCCtx->workspace); + + /* copy dictionary offsets */ + { + const ZSTD_MatchState_t* srcMatchState = &srcCCtx->blockState.matchState; + ZSTD_MatchState_t* dstMatchState = &dstCCtx->blockState.matchState; + dstMatchState->window = srcMatchState->window; + dstMatchState->nextToUpdate = srcMatchState->nextToUpdate; + dstMatchState->loadedDictEnd= srcMatchState->loadedDictEnd; + } + dstCCtx->dictID = srcCCtx->dictID; + dstCCtx->dictContentSize = srcCCtx->dictContentSize; + + /* copy block state */ + ZSTD_memcpy(dstCCtx->blockState.prevCBlock, srcCCtx->blockState.prevCBlock, sizeof(*srcCCtx->blockState.prevCBlock)); + + return 0; +} + +/*! ZSTD_copyCCtx() : + * Duplicate an existing context `srcCCtx` into another one `dstCCtx`. + * Only works during stage ZSTDcs_init (i.e. after creation, but before first call to ZSTD_compressContinue()). + * pledgedSrcSize==0 means "unknown". +* @return : 0, or an error code */ +size_t ZSTD_copyCCtx(ZSTD_CCtx* dstCCtx, const ZSTD_CCtx* srcCCtx, unsigned long long pledgedSrcSize) +{ + ZSTD_frameParameters fParams = { 1 /*content*/, 0 /*checksum*/, 0 /*noDictID*/ }; + ZSTD_buffered_policy_e const zbuff = srcCCtx->bufferedPolicy; + ZSTD_STATIC_ASSERT((U32)ZSTDb_buffered==1); + if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN; + fParams.contentSizeFlag = (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN); + + return ZSTD_copyCCtx_internal(dstCCtx, srcCCtx, + fParams, pledgedSrcSize, + zbuff); +} + + +#define ZSTD_ROWSIZE 16 +/*! ZSTD_reduceTable() : + * reduce table indexes by `reducerValue`, or squash to zero. + * PreserveMark preserves "unsorted mark" for btlazy2 strategy. + * It must be set to a clear 0/1 value, to remove branch during inlining. + * Presume table size is a multiple of ZSTD_ROWSIZE + * to help auto-vectorization */ +FORCE_INLINE_TEMPLATE void +ZSTD_reduceTable_internal (U32* const table, U32 const size, U32 const reducerValue, int const preserveMark) +{ + int const nbRows = (int)size / ZSTD_ROWSIZE; + int cellNb = 0; + int rowNb; + /* Protect special index values < ZSTD_WINDOW_START_INDEX. */ + U32 const reducerThreshold = reducerValue + ZSTD_WINDOW_START_INDEX; + assert((size & (ZSTD_ROWSIZE-1)) == 0); /* multiple of ZSTD_ROWSIZE */ + assert(size < (1U<<31)); /* can be cast to int */ + +#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE) + /* To validate that the table reuse logic is sound, and that we don't + * access table space that we haven't cleaned, we re-"poison" the table + * space every time we mark it dirty. + * + * This function however is intended to operate on those dirty tables and + * re-clean them. So when this function is used correctly, we can unpoison + * the memory it operated on. This introduces a blind spot though, since + * if we now try to operate on __actually__ poisoned memory, we will not + * detect that. */ + __msan_unpoison(table, size * sizeof(U32)); +#endif + + for (rowNb=0 ; rowNb < nbRows ; rowNb++) { + int column; + for (column=0; columncParams.hashLog; + ZSTD_reduceTable(ms->hashTable, hSize, reducerValue); + } + + if (ZSTD_allocateChainTable(params->cParams.strategy, params->useRowMatchFinder, (U32)ms->dedicatedDictSearch)) { + U32 const chainSize = (U32)1 << params->cParams.chainLog; + if (params->cParams.strategy == ZSTD_btlazy2) + ZSTD_reduceTable_btlazy2(ms->chainTable, chainSize, reducerValue); + else + ZSTD_reduceTable(ms->chainTable, chainSize, reducerValue); + } + + if (ms->hashLog3) { + U32 const h3Size = (U32)1 << ms->hashLog3; + ZSTD_reduceTable(ms->hashTable3, h3Size, reducerValue); + } +} + + +/*-******************************************************* +* Block entropic compression +*********************************************************/ + +/* See doc/zstd_compression_format.md for detailed format description */ + +int ZSTD_seqToCodes(const SeqStore_t* seqStorePtr) +{ + const SeqDef* const sequences = seqStorePtr->sequencesStart; + BYTE* const llCodeTable = seqStorePtr->llCode; + BYTE* const ofCodeTable = seqStorePtr->ofCode; + BYTE* const mlCodeTable = seqStorePtr->mlCode; + U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); + U32 u; + int longOffsets = 0; + assert(nbSeq <= seqStorePtr->maxNbSeq); + for (u=0; u= STREAM_ACCUMULATOR_MIN)); + if (MEM_32bits() && ofCode >= STREAM_ACCUMULATOR_MIN) + longOffsets = 1; + } + if (seqStorePtr->longLengthType==ZSTD_llt_literalLength) + llCodeTable[seqStorePtr->longLengthPos] = MaxLL; + if (seqStorePtr->longLengthType==ZSTD_llt_matchLength) + mlCodeTable[seqStorePtr->longLengthPos] = MaxML; + return longOffsets; +} + +/* ZSTD_useTargetCBlockSize(): + * Returns if target compressed block size param is being used. + * If used, compression will do best effort to make a compressed block size to be around targetCBlockSize. + * Returns 1 if true, 0 otherwise. */ +static int ZSTD_useTargetCBlockSize(const ZSTD_CCtx_params* cctxParams) +{ + DEBUGLOG(5, "ZSTD_useTargetCBlockSize (targetCBlockSize=%zu)", cctxParams->targetCBlockSize); + return (cctxParams->targetCBlockSize != 0); +} + +/* ZSTD_blockSplitterEnabled(): + * Returns if block splitting param is being used + * If used, compression will do best effort to split a block in order to improve compression ratio. + * At the time this function is called, the parameter must be finalized. + * Returns 1 if true, 0 otherwise. */ +static int ZSTD_blockSplitterEnabled(ZSTD_CCtx_params* cctxParams) +{ + DEBUGLOG(5, "ZSTD_blockSplitterEnabled (postBlockSplitter=%d)", cctxParams->postBlockSplitter); + assert(cctxParams->postBlockSplitter != ZSTD_ps_auto); + return (cctxParams->postBlockSplitter == ZSTD_ps_enable); +} + +/* Type returned by ZSTD_buildSequencesStatistics containing finalized symbol encoding types + * and size of the sequences statistics + */ +typedef struct { + U32 LLtype; + U32 Offtype; + U32 MLtype; + size_t size; + size_t lastCountSize; /* Accounts for bug in 1.3.4. More detail in ZSTD_entropyCompressSeqStore_internal() */ + int longOffsets; +} ZSTD_symbolEncodingTypeStats_t; + +/* ZSTD_buildSequencesStatistics(): + * Returns a ZSTD_symbolEncodingTypeStats_t, or a zstd error code in the `size` field. + * Modifies `nextEntropy` to have the appropriate values as a side effect. + * nbSeq must be greater than 0. + * + * entropyWkspSize must be of size at least ENTROPY_WORKSPACE_SIZE - (MaxSeq + 1)*sizeof(U32) + */ +static ZSTD_symbolEncodingTypeStats_t +ZSTD_buildSequencesStatistics( + const SeqStore_t* seqStorePtr, size_t nbSeq, + const ZSTD_fseCTables_t* prevEntropy, ZSTD_fseCTables_t* nextEntropy, + BYTE* dst, const BYTE* const dstEnd, + ZSTD_strategy strategy, unsigned* countWorkspace, + void* entropyWorkspace, size_t entropyWkspSize) +{ + BYTE* const ostart = dst; + const BYTE* const oend = dstEnd; + BYTE* op = ostart; + FSE_CTable* CTable_LitLength = nextEntropy->litlengthCTable; + FSE_CTable* CTable_OffsetBits = nextEntropy->offcodeCTable; + FSE_CTable* CTable_MatchLength = nextEntropy->matchlengthCTable; + const BYTE* const ofCodeTable = seqStorePtr->ofCode; + const BYTE* const llCodeTable = seqStorePtr->llCode; + const BYTE* const mlCodeTable = seqStorePtr->mlCode; + ZSTD_symbolEncodingTypeStats_t stats; + + stats.lastCountSize = 0; + /* convert length/distances into codes */ + stats.longOffsets = ZSTD_seqToCodes(seqStorePtr); + assert(op <= oend); + assert(nbSeq != 0); /* ZSTD_selectEncodingType() divides by nbSeq */ + /* build CTable for Literal Lengths */ + { unsigned max = MaxLL; + size_t const mostFrequent = HIST_countFast_wksp(countWorkspace, &max, llCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ + DEBUGLOG(5, "Building LL table"); + nextEntropy->litlength_repeatMode = prevEntropy->litlength_repeatMode; + stats.LLtype = ZSTD_selectEncodingType(&nextEntropy->litlength_repeatMode, + countWorkspace, max, mostFrequent, nbSeq, + LLFSELog, prevEntropy->litlengthCTable, + LL_defaultNorm, LL_defaultNormLog, + ZSTD_defaultAllowed, strategy); + assert(set_basic < set_compressed && set_rle < set_compressed); + assert(!(stats.LLtype < set_compressed && nextEntropy->litlength_repeatMode != FSE_repeat_none)); /* We don't copy tables */ + { size_t const countSize = ZSTD_buildCTable( + op, (size_t)(oend - op), + CTable_LitLength, LLFSELog, (SymbolEncodingType_e)stats.LLtype, + countWorkspace, max, llCodeTable, nbSeq, + LL_defaultNorm, LL_defaultNormLog, MaxLL, + prevEntropy->litlengthCTable, + sizeof(prevEntropy->litlengthCTable), + entropyWorkspace, entropyWkspSize); + if (ZSTD_isError(countSize)) { + DEBUGLOG(3, "ZSTD_buildCTable for LitLens failed"); + stats.size = countSize; + return stats; + } + if (stats.LLtype == set_compressed) + stats.lastCountSize = countSize; + op += countSize; + assert(op <= oend); + } } + /* build CTable for Offsets */ + { unsigned max = MaxOff; + size_t const mostFrequent = HIST_countFast_wksp( + countWorkspace, &max, ofCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ + /* We can only use the basic table if max <= DefaultMaxOff, otherwise the offsets are too large */ + ZSTD_DefaultPolicy_e const defaultPolicy = (max <= DefaultMaxOff) ? ZSTD_defaultAllowed : ZSTD_defaultDisallowed; + DEBUGLOG(5, "Building OF table"); + nextEntropy->offcode_repeatMode = prevEntropy->offcode_repeatMode; + stats.Offtype = ZSTD_selectEncodingType(&nextEntropy->offcode_repeatMode, + countWorkspace, max, mostFrequent, nbSeq, + OffFSELog, prevEntropy->offcodeCTable, + OF_defaultNorm, OF_defaultNormLog, + defaultPolicy, strategy); + assert(!(stats.Offtype < set_compressed && nextEntropy->offcode_repeatMode != FSE_repeat_none)); /* We don't copy tables */ + { size_t const countSize = ZSTD_buildCTable( + op, (size_t)(oend - op), + CTable_OffsetBits, OffFSELog, (SymbolEncodingType_e)stats.Offtype, + countWorkspace, max, ofCodeTable, nbSeq, + OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, + prevEntropy->offcodeCTable, + sizeof(prevEntropy->offcodeCTable), + entropyWorkspace, entropyWkspSize); + if (ZSTD_isError(countSize)) { + DEBUGLOG(3, "ZSTD_buildCTable for Offsets failed"); + stats.size = countSize; + return stats; + } + if (stats.Offtype == set_compressed) + stats.lastCountSize = countSize; + op += countSize; + assert(op <= oend); + } } + /* build CTable for MatchLengths */ + { unsigned max = MaxML; + size_t const mostFrequent = HIST_countFast_wksp( + countWorkspace, &max, mlCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ + DEBUGLOG(5, "Building ML table (remaining space : %i)", (int)(oend-op)); + nextEntropy->matchlength_repeatMode = prevEntropy->matchlength_repeatMode; + stats.MLtype = ZSTD_selectEncodingType(&nextEntropy->matchlength_repeatMode, + countWorkspace, max, mostFrequent, nbSeq, + MLFSELog, prevEntropy->matchlengthCTable, + ML_defaultNorm, ML_defaultNormLog, + ZSTD_defaultAllowed, strategy); + assert(!(stats.MLtype < set_compressed && nextEntropy->matchlength_repeatMode != FSE_repeat_none)); /* We don't copy tables */ + { size_t const countSize = ZSTD_buildCTable( + op, (size_t)(oend - op), + CTable_MatchLength, MLFSELog, (SymbolEncodingType_e)stats.MLtype, + countWorkspace, max, mlCodeTable, nbSeq, + ML_defaultNorm, ML_defaultNormLog, MaxML, + prevEntropy->matchlengthCTable, + sizeof(prevEntropy->matchlengthCTable), + entropyWorkspace, entropyWkspSize); + if (ZSTD_isError(countSize)) { + DEBUGLOG(3, "ZSTD_buildCTable for MatchLengths failed"); + stats.size = countSize; + return stats; + } + if (stats.MLtype == set_compressed) + stats.lastCountSize = countSize; + op += countSize; + assert(op <= oend); + } } + stats.size = (size_t)(op-ostart); + return stats; +} + +/* ZSTD_entropyCompressSeqStore_internal(): + * compresses both literals and sequences + * Returns compressed size of block, or a zstd error. + */ +#define SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO 20 +MEM_STATIC size_t +ZSTD_entropyCompressSeqStore_internal( + void* dst, size_t dstCapacity, + const void* literals, size_t litSize, + const SeqStore_t* seqStorePtr, + const ZSTD_entropyCTables_t* prevEntropy, + ZSTD_entropyCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + void* entropyWorkspace, size_t entropyWkspSize, + const int bmi2) +{ + ZSTD_strategy const strategy = cctxParams->cParams.strategy; + unsigned* count = (unsigned*)entropyWorkspace; + FSE_CTable* CTable_LitLength = nextEntropy->fse.litlengthCTable; + FSE_CTable* CTable_OffsetBits = nextEntropy->fse.offcodeCTable; + FSE_CTable* CTable_MatchLength = nextEntropy->fse.matchlengthCTable; + const SeqDef* const sequences = seqStorePtr->sequencesStart; + const size_t nbSeq = (size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart); + const BYTE* const ofCodeTable = seqStorePtr->ofCode; + const BYTE* const llCodeTable = seqStorePtr->llCode; + const BYTE* const mlCodeTable = seqStorePtr->mlCode; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstCapacity; + BYTE* op = ostart; + size_t lastCountSize; + int longOffsets = 0; + + entropyWorkspace = count + (MaxSeq + 1); + entropyWkspSize -= (MaxSeq + 1) * sizeof(*count); + + DEBUGLOG(5, "ZSTD_entropyCompressSeqStore_internal (nbSeq=%zu, dstCapacity=%zu)", nbSeq, dstCapacity); + ZSTD_STATIC_ASSERT(HUF_WORKSPACE_SIZE >= (1<= HUF_WORKSPACE_SIZE); + + /* Compress literals */ + { size_t const numSequences = (size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart); + /* Base suspicion of uncompressibility on ratio of literals to sequences */ + int const suspectUncompressible = (numSequences == 0) || (litSize / numSequences >= SUSPECT_UNCOMPRESSIBLE_LITERAL_RATIO); + + size_t const cSize = ZSTD_compressLiterals( + op, dstCapacity, + literals, litSize, + entropyWorkspace, entropyWkspSize, + &prevEntropy->huf, &nextEntropy->huf, + cctxParams->cParams.strategy, + ZSTD_literalsCompressionIsDisabled(cctxParams), + suspectUncompressible, bmi2); + FORWARD_IF_ERROR(cSize, "ZSTD_compressLiterals failed"); + assert(cSize <= dstCapacity); + op += cSize; + } + + /* Sequences Header */ + RETURN_ERROR_IF((oend-op) < 3 /*max nbSeq Size*/ + 1 /*seqHead*/, + dstSize_tooSmall, "Can't fit seq hdr in output buf!"); + if (nbSeq < 128) { + *op++ = (BYTE)nbSeq; + } else if (nbSeq < LONGNBSEQ) { + op[0] = (BYTE)((nbSeq>>8) + 0x80); + op[1] = (BYTE)nbSeq; + op+=2; + } else { + op[0]=0xFF; + MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)); + op+=3; + } + assert(op <= oend); + if (nbSeq==0) { + /* Copy the old tables over as if we repeated them */ + ZSTD_memcpy(&nextEntropy->fse, &prevEntropy->fse, sizeof(prevEntropy->fse)); + return (size_t)(op - ostart); + } + { BYTE* const seqHead = op++; + /* build stats for sequences */ + const ZSTD_symbolEncodingTypeStats_t stats = + ZSTD_buildSequencesStatistics(seqStorePtr, nbSeq, + &prevEntropy->fse, &nextEntropy->fse, + op, oend, + strategy, count, + entropyWorkspace, entropyWkspSize); + FORWARD_IF_ERROR(stats.size, "ZSTD_buildSequencesStatistics failed!"); + *seqHead = (BYTE)((stats.LLtype<<6) + (stats.Offtype<<4) + (stats.MLtype<<2)); + lastCountSize = stats.lastCountSize; + op += stats.size; + longOffsets = stats.longOffsets; + } + + { size_t const bitstreamSize = ZSTD_encodeSequences( + op, (size_t)(oend - op), + CTable_MatchLength, mlCodeTable, + CTable_OffsetBits, ofCodeTable, + CTable_LitLength, llCodeTable, + sequences, nbSeq, + longOffsets, bmi2); + FORWARD_IF_ERROR(bitstreamSize, "ZSTD_encodeSequences failed"); + op += bitstreamSize; + assert(op <= oend); + /* zstd versions <= 1.3.4 mistakenly report corruption when + * FSE_readNCount() receives a buffer < 4 bytes. + * Fixed by https://github.com/facebook/zstd/pull/1146. + * This can happen when the last set_compressed table present is 2 + * bytes and the bitstream is only one byte. + * In this exceedingly rare case, we will simply emit an uncompressed + * block, since it isn't worth optimizing. + */ + if (lastCountSize && (lastCountSize + bitstreamSize) < 4) { + /* lastCountSize >= 2 && bitstreamSize > 0 ==> lastCountSize == 3 */ + assert(lastCountSize + bitstreamSize == 3); + DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.3.4 by " + "emitting an uncompressed block."); + return 0; + } + } + + DEBUGLOG(5, "compressed block size : %u", (unsigned)(op - ostart)); + return (size_t)(op - ostart); +} + +static size_t +ZSTD_entropyCompressSeqStore_wExtLitBuffer( + void* dst, size_t dstCapacity, + const void* literals, size_t litSize, + size_t blockSize, + const SeqStore_t* seqStorePtr, + const ZSTD_entropyCTables_t* prevEntropy, + ZSTD_entropyCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + void* entropyWorkspace, size_t entropyWkspSize, + int bmi2) +{ + size_t const cSize = ZSTD_entropyCompressSeqStore_internal( + dst, dstCapacity, + literals, litSize, + seqStorePtr, prevEntropy, nextEntropy, cctxParams, + entropyWorkspace, entropyWkspSize, bmi2); + if (cSize == 0) return 0; + /* When srcSize <= dstCapacity, there is enough space to write a raw uncompressed block. + * Since we ran out of space, block must be not compressible, so fall back to raw uncompressed block. + */ + if ((cSize == ERROR(dstSize_tooSmall)) & (blockSize <= dstCapacity)) { + DEBUGLOG(4, "not enough dstCapacity (%zu) for ZSTD_entropyCompressSeqStore_internal()=> do not compress block", dstCapacity); + return 0; /* block not compressed */ + } + FORWARD_IF_ERROR(cSize, "ZSTD_entropyCompressSeqStore_internal failed"); + + /* Check compressibility */ + { size_t const maxCSize = blockSize - ZSTD_minGain(blockSize, cctxParams->cParams.strategy); + if (cSize >= maxCSize) return 0; /* block not compressed */ + } + DEBUGLOG(5, "ZSTD_entropyCompressSeqStore() cSize: %zu", cSize); + /* libzstd decoder before > v1.5.4 is not compatible with compressed blocks of size ZSTD_BLOCKSIZE_MAX exactly. + * This restriction is indirectly already fulfilled by respecting ZSTD_minGain() condition above. + */ + assert(cSize < ZSTD_BLOCKSIZE_MAX); + return cSize; +} + +static size_t +ZSTD_entropyCompressSeqStore( + const SeqStore_t* seqStorePtr, + const ZSTD_entropyCTables_t* prevEntropy, + ZSTD_entropyCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + void* dst, size_t dstCapacity, + size_t srcSize, + void* entropyWorkspace, size_t entropyWkspSize, + int bmi2) +{ + return ZSTD_entropyCompressSeqStore_wExtLitBuffer( + dst, dstCapacity, + seqStorePtr->litStart, (size_t)(seqStorePtr->lit - seqStorePtr->litStart), + srcSize, + seqStorePtr, + prevEntropy, nextEntropy, + cctxParams, + entropyWorkspace, entropyWkspSize, + bmi2); +} + +/* ZSTD_selectBlockCompressor() : + * Not static, but internal use only (used by long distance matcher) + * assumption : strat is a valid strategy */ +ZSTD_BlockCompressor_f ZSTD_selectBlockCompressor(ZSTD_strategy strat, ZSTD_ParamSwitch_e useRowMatchFinder, ZSTD_dictMode_e dictMode) +{ + static const ZSTD_BlockCompressor_f blockCompressor[4][ZSTD_STRATEGY_MAX+1] = { + { ZSTD_compressBlock_fast /* default for 0 */, + ZSTD_compressBlock_fast, + ZSTD_COMPRESSBLOCK_DOUBLEFAST, + ZSTD_COMPRESSBLOCK_GREEDY, + ZSTD_COMPRESSBLOCK_LAZY, + ZSTD_COMPRESSBLOCK_LAZY2, + ZSTD_COMPRESSBLOCK_BTLAZY2, + ZSTD_COMPRESSBLOCK_BTOPT, + ZSTD_COMPRESSBLOCK_BTULTRA, + ZSTD_COMPRESSBLOCK_BTULTRA2 + }, + { ZSTD_compressBlock_fast_extDict /* default for 0 */, + ZSTD_compressBlock_fast_extDict, + ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT, + ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT, + ZSTD_COMPRESSBLOCK_LAZY_EXTDICT, + ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT, + ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT, + ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT, + ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT, + ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT + }, + { ZSTD_compressBlock_fast_dictMatchState /* default for 0 */, + ZSTD_compressBlock_fast_dictMatchState, + ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE, + ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE, + ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE, + ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE, + ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE, + ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE, + ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE, + ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE + }, + { NULL /* default for 0 */, + NULL, + NULL, + ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH, + ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH, + ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH, + NULL, + NULL, + NULL, + NULL } + }; + ZSTD_BlockCompressor_f selectedCompressor; + ZSTD_STATIC_ASSERT((unsigned)ZSTD_fast == 1); + + assert(ZSTD_cParam_withinBounds(ZSTD_c_strategy, (int)strat)); + DEBUGLOG(5, "Selected block compressor: dictMode=%d strat=%d rowMatchfinder=%d", (int)dictMode, (int)strat, (int)useRowMatchFinder); + if (ZSTD_rowMatchFinderUsed(strat, useRowMatchFinder)) { + static const ZSTD_BlockCompressor_f rowBasedBlockCompressors[4][3] = { + { + ZSTD_COMPRESSBLOCK_GREEDY_ROW, + ZSTD_COMPRESSBLOCK_LAZY_ROW, + ZSTD_COMPRESSBLOCK_LAZY2_ROW + }, + { + ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW, + ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW, + ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW + }, + { + ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW, + ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW, + ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW + }, + { + ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW, + ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW, + ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW + } + }; + DEBUGLOG(5, "Selecting a row-based matchfinder"); + assert(useRowMatchFinder != ZSTD_ps_auto); + selectedCompressor = rowBasedBlockCompressors[(int)dictMode][(int)strat - (int)ZSTD_greedy]; + } else { + selectedCompressor = blockCompressor[(int)dictMode][(int)strat]; + } + assert(selectedCompressor != NULL); + return selectedCompressor; +} + +static void ZSTD_storeLastLiterals(SeqStore_t* seqStorePtr, + const BYTE* anchor, size_t lastLLSize) +{ + ZSTD_memcpy(seqStorePtr->lit, anchor, lastLLSize); + seqStorePtr->lit += lastLLSize; +} + +void ZSTD_resetSeqStore(SeqStore_t* ssPtr) +{ + ssPtr->lit = ssPtr->litStart; + ssPtr->sequences = ssPtr->sequencesStart; + ssPtr->longLengthType = ZSTD_llt_none; +} + +/* ZSTD_postProcessSequenceProducerResult() : + * Validates and post-processes sequences obtained through the external matchfinder API: + * - Checks whether nbExternalSeqs represents an error condition. + * - Appends a block delimiter to outSeqs if one is not already present. + * See zstd.h for context regarding block delimiters. + * Returns the number of sequences after post-processing, or an error code. */ +static size_t ZSTD_postProcessSequenceProducerResult( + ZSTD_Sequence* outSeqs, size_t nbExternalSeqs, size_t outSeqsCapacity, size_t srcSize +) { + RETURN_ERROR_IF( + nbExternalSeqs > outSeqsCapacity, + sequenceProducer_failed, + "External sequence producer returned error code %lu", + (unsigned long)nbExternalSeqs + ); + + RETURN_ERROR_IF( + nbExternalSeqs == 0 && srcSize > 0, + sequenceProducer_failed, + "Got zero sequences from external sequence producer for a non-empty src buffer!" + ); + + if (srcSize == 0) { + ZSTD_memset(&outSeqs[0], 0, sizeof(ZSTD_Sequence)); + return 1; + } + + { + ZSTD_Sequence const lastSeq = outSeqs[nbExternalSeqs - 1]; + + /* We can return early if lastSeq is already a block delimiter. */ + if (lastSeq.offset == 0 && lastSeq.matchLength == 0) { + return nbExternalSeqs; + } + + /* This error condition is only possible if the external matchfinder + * produced an invalid parse, by definition of ZSTD_sequenceBound(). */ + RETURN_ERROR_IF( + nbExternalSeqs == outSeqsCapacity, + sequenceProducer_failed, + "nbExternalSeqs == outSeqsCapacity but lastSeq is not a block delimiter!" + ); + + /* lastSeq is not a block delimiter, so we need to append one. */ + ZSTD_memset(&outSeqs[nbExternalSeqs], 0, sizeof(ZSTD_Sequence)); + return nbExternalSeqs + 1; + } +} + +/* ZSTD_fastSequenceLengthSum() : + * Returns sum(litLen) + sum(matchLen) + lastLits for *seqBuf*. + * Similar to another function in zstd_compress.c (determine_blockSize), + * except it doesn't check for a block delimiter to end summation. + * Removing the early exit allows the compiler to auto-vectorize (https://godbolt.org/z/cY1cajz9P). + * This function can be deleted and replaced by determine_blockSize after we resolve issue #3456. */ +static size_t ZSTD_fastSequenceLengthSum(ZSTD_Sequence const* seqBuf, size_t seqBufSize) { + size_t matchLenSum, litLenSum, i; + matchLenSum = 0; + litLenSum = 0; + for (i = 0; i < seqBufSize; i++) { + litLenSum += seqBuf[i].litLength; + matchLenSum += seqBuf[i].matchLength; + } + return litLenSum + matchLenSum; +} + +/** + * Function to validate sequences produced by a block compressor. + */ +static void ZSTD_validateSeqStore(const SeqStore_t* seqStore, const ZSTD_compressionParameters* cParams) +{ +#if DEBUGLEVEL >= 1 + const SeqDef* seq = seqStore->sequencesStart; + const SeqDef* const seqEnd = seqStore->sequences; + size_t const matchLenLowerBound = cParams->minMatch == 3 ? 3 : 4; + for (; seq < seqEnd; ++seq) { + const ZSTD_SequenceLength seqLength = ZSTD_getSequenceLength(seqStore, seq); + assert(seqLength.matchLength >= matchLenLowerBound); + (void)seqLength; + (void)matchLenLowerBound; + } +#else + (void)seqStore; + (void)cParams; +#endif +} + +static size_t +ZSTD_transferSequences_wBlockDelim(ZSTD_CCtx* cctx, + ZSTD_SequencePosition* seqPos, + const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, + const void* src, size_t blockSize, + ZSTD_ParamSwitch_e externalRepSearch); + +typedef enum { ZSTDbss_compress, ZSTDbss_noCompress } ZSTD_BuildSeqStore_e; + +static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize) +{ + ZSTD_MatchState_t* const ms = &zc->blockState.matchState; + DEBUGLOG(5, "ZSTD_buildSeqStore (srcSize=%zu)", srcSize); + assert(srcSize <= ZSTD_BLOCKSIZE_MAX); + /* Assert that we have correctly flushed the ctx params into the ms's copy */ + ZSTD_assertEqualCParams(zc->appliedParams.cParams, ms->cParams); + /* TODO: See 3090. We reduced MIN_CBLOCK_SIZE from 3 to 2 so to compensate we are adding + * additional 1. We need to revisit and change this logic to be more consistent */ + if (srcSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1+1) { + if (zc->appliedParams.cParams.strategy >= ZSTD_btopt) { + ZSTD_ldm_skipRawSeqStoreBytes(&zc->externSeqStore, srcSize); + } else { + ZSTD_ldm_skipSequences(&zc->externSeqStore, srcSize, zc->appliedParams.cParams.minMatch); + } + return ZSTDbss_noCompress; /* don't even attempt compression below a certain srcSize */ + } + ZSTD_resetSeqStore(&(zc->seqStore)); + /* required for optimal parser to read stats from dictionary */ + ms->opt.symbolCosts = &zc->blockState.prevCBlock->entropy; + /* tell the optimal parser how we expect to compress literals */ + ms->opt.literalCompressionMode = zc->appliedParams.literalCompressionMode; + /* a gap between an attached dict and the current window is not safe, + * they must remain adjacent, + * and when that stops being the case, the dict must be unset */ + assert(ms->dictMatchState == NULL || ms->loadedDictEnd == ms->window.dictLimit); + + /* limited update after a very long match */ + { const BYTE* const base = ms->window.base; + const BYTE* const istart = (const BYTE*)src; + const U32 curr = (U32)(istart-base); + if (sizeof(ptrdiff_t)==8) assert(istart - base < (ptrdiff_t)(U32)(-1)); /* ensure no overflow */ + if (curr > ms->nextToUpdate + 384) + ms->nextToUpdate = curr - MIN(192, (U32)(curr - ms->nextToUpdate - 384)); + } + + /* select and store sequences */ + { ZSTD_dictMode_e const dictMode = ZSTD_matchState_dictMode(ms); + size_t lastLLSize; + { int i; + for (i = 0; i < ZSTD_REP_NUM; ++i) + zc->blockState.nextCBlock->rep[i] = zc->blockState.prevCBlock->rep[i]; + } + if (zc->externSeqStore.pos < zc->externSeqStore.size) { + assert(zc->appliedParams.ldmParams.enableLdm == ZSTD_ps_disable); + + /* External matchfinder + LDM is technically possible, just not implemented yet. + * We need to revisit soon and implement it. */ + RETURN_ERROR_IF( + ZSTD_hasExtSeqProd(&zc->appliedParams), + parameter_combination_unsupported, + "Long-distance matching with external sequence producer enabled is not currently supported." + ); + + /* Updates ldmSeqStore.pos */ + lastLLSize = + ZSTD_ldm_blockCompress(&zc->externSeqStore, + ms, &zc->seqStore, + zc->blockState.nextCBlock->rep, + zc->appliedParams.useRowMatchFinder, + src, srcSize); + assert(zc->externSeqStore.pos <= zc->externSeqStore.size); + } else if (zc->appliedParams.ldmParams.enableLdm == ZSTD_ps_enable) { + RawSeqStore_t ldmSeqStore = kNullRawSeqStore; + + /* External matchfinder + LDM is technically possible, just not implemented yet. + * We need to revisit soon and implement it. */ + RETURN_ERROR_IF( + ZSTD_hasExtSeqProd(&zc->appliedParams), + parameter_combination_unsupported, + "Long-distance matching with external sequence producer enabled is not currently supported." + ); + + ldmSeqStore.seq = zc->ldmSequences; + ldmSeqStore.capacity = zc->maxNbLdmSequences; + /* Updates ldmSeqStore.size */ + FORWARD_IF_ERROR(ZSTD_ldm_generateSequences(&zc->ldmState, &ldmSeqStore, + &zc->appliedParams.ldmParams, + src, srcSize), ""); + /* Updates ldmSeqStore.pos */ + lastLLSize = + ZSTD_ldm_blockCompress(&ldmSeqStore, + ms, &zc->seqStore, + zc->blockState.nextCBlock->rep, + zc->appliedParams.useRowMatchFinder, + src, srcSize); + assert(ldmSeqStore.pos == ldmSeqStore.size); + } else if (ZSTD_hasExtSeqProd(&zc->appliedParams)) { + assert( + zc->extSeqBufCapacity >= ZSTD_sequenceBound(srcSize) + ); + assert(zc->appliedParams.extSeqProdFunc != NULL); + + { U32 const windowSize = (U32)1 << zc->appliedParams.cParams.windowLog; + + size_t const nbExternalSeqs = (zc->appliedParams.extSeqProdFunc)( + zc->appliedParams.extSeqProdState, + zc->extSeqBuf, + zc->extSeqBufCapacity, + src, srcSize, + NULL, 0, /* dict and dictSize, currently not supported */ + zc->appliedParams.compressionLevel, + windowSize + ); + + size_t const nbPostProcessedSeqs = ZSTD_postProcessSequenceProducerResult( + zc->extSeqBuf, + nbExternalSeqs, + zc->extSeqBufCapacity, + srcSize + ); + + /* Return early if there is no error, since we don't need to worry about last literals */ + if (!ZSTD_isError(nbPostProcessedSeqs)) { + ZSTD_SequencePosition seqPos = {0,0,0}; + size_t const seqLenSum = ZSTD_fastSequenceLengthSum(zc->extSeqBuf, nbPostProcessedSeqs); + RETURN_ERROR_IF(seqLenSum > srcSize, externalSequences_invalid, "External sequences imply too large a block!"); + FORWARD_IF_ERROR( + ZSTD_transferSequences_wBlockDelim( + zc, &seqPos, + zc->extSeqBuf, nbPostProcessedSeqs, + src, srcSize, + zc->appliedParams.searchForExternalRepcodes + ), + "Failed to copy external sequences to seqStore!" + ); + ms->ldmSeqStore = NULL; + DEBUGLOG(5, "Copied %lu sequences from external sequence producer to internal seqStore.", (unsigned long)nbExternalSeqs); + return ZSTDbss_compress; + } + + /* Propagate the error if fallback is disabled */ + if (!zc->appliedParams.enableMatchFinderFallback) { + return nbPostProcessedSeqs; + } + + /* Fallback to software matchfinder */ + { ZSTD_BlockCompressor_f const blockCompressor = + ZSTD_selectBlockCompressor( + zc->appliedParams.cParams.strategy, + zc->appliedParams.useRowMatchFinder, + dictMode); + ms->ldmSeqStore = NULL; + DEBUGLOG( + 5, + "External sequence producer returned error code %lu. Falling back to internal parser.", + (unsigned long)nbExternalSeqs + ); + lastLLSize = blockCompressor(ms, &zc->seqStore, zc->blockState.nextCBlock->rep, src, srcSize); + } } + } else { /* not long range mode and no external matchfinder */ + ZSTD_BlockCompressor_f const blockCompressor = ZSTD_selectBlockCompressor( + zc->appliedParams.cParams.strategy, + zc->appliedParams.useRowMatchFinder, + dictMode); + ms->ldmSeqStore = NULL; + lastLLSize = blockCompressor(ms, &zc->seqStore, zc->blockState.nextCBlock->rep, src, srcSize); + } + { const BYTE* const lastLiterals = (const BYTE*)src + srcSize - lastLLSize; + ZSTD_storeLastLiterals(&zc->seqStore, lastLiterals, lastLLSize); + } } + ZSTD_validateSeqStore(&zc->seqStore, &zc->appliedParams.cParams); + return ZSTDbss_compress; +} + +static size_t ZSTD_copyBlockSequences(SeqCollector* seqCollector, const SeqStore_t* seqStore, const U32 prevRepcodes[ZSTD_REP_NUM]) +{ + const SeqDef* inSeqs = seqStore->sequencesStart; + const size_t nbInSequences = (size_t)(seqStore->sequences - inSeqs); + const size_t nbInLiterals = (size_t)(seqStore->lit - seqStore->litStart); + + ZSTD_Sequence* outSeqs = seqCollector->seqIndex == 0 ? seqCollector->seqStart : seqCollector->seqStart + seqCollector->seqIndex; + const size_t nbOutSequences = nbInSequences + 1; + size_t nbOutLiterals = 0; + Repcodes_t repcodes; + size_t i; + + /* Bounds check that we have enough space for every input sequence + * and the block delimiter + */ + assert(seqCollector->seqIndex <= seqCollector->maxSequences); + RETURN_ERROR_IF( + nbOutSequences > (size_t)(seqCollector->maxSequences - seqCollector->seqIndex), + dstSize_tooSmall, + "Not enough space to copy sequences"); + + ZSTD_memcpy(&repcodes, prevRepcodes, sizeof(repcodes)); + for (i = 0; i < nbInSequences; ++i) { + U32 rawOffset; + outSeqs[i].litLength = inSeqs[i].litLength; + outSeqs[i].matchLength = inSeqs[i].mlBase + MINMATCH; + outSeqs[i].rep = 0; + + /* Handle the possible single length >= 64K + * There can only be one because we add MINMATCH to every match length, + * and blocks are at most 128K. + */ + if (i == seqStore->longLengthPos) { + if (seqStore->longLengthType == ZSTD_llt_literalLength) { + outSeqs[i].litLength += 0x10000; + } else if (seqStore->longLengthType == ZSTD_llt_matchLength) { + outSeqs[i].matchLength += 0x10000; + } + } + + /* Determine the raw offset given the offBase, which may be a repcode. */ + if (OFFBASE_IS_REPCODE(inSeqs[i].offBase)) { + const U32 repcode = OFFBASE_TO_REPCODE(inSeqs[i].offBase); + assert(repcode > 0); + outSeqs[i].rep = repcode; + if (outSeqs[i].litLength != 0) { + rawOffset = repcodes.rep[repcode - 1]; + } else { + if (repcode == 3) { + assert(repcodes.rep[0] > 1); + rawOffset = repcodes.rep[0] - 1; + } else { + rawOffset = repcodes.rep[repcode]; + } + } + } else { + rawOffset = OFFBASE_TO_OFFSET(inSeqs[i].offBase); + } + outSeqs[i].offset = rawOffset; + + /* Update repcode history for the sequence */ + ZSTD_updateRep(repcodes.rep, + inSeqs[i].offBase, + inSeqs[i].litLength == 0); + + nbOutLiterals += outSeqs[i].litLength; + } + /* Insert last literals (if any exist) in the block as a sequence with ml == off == 0. + * If there are no last literals, then we'll emit (of: 0, ml: 0, ll: 0), which is a marker + * for the block boundary, according to the API. + */ + assert(nbInLiterals >= nbOutLiterals); + { + const size_t lastLLSize = nbInLiterals - nbOutLiterals; + outSeqs[nbInSequences].litLength = (U32)lastLLSize; + outSeqs[nbInSequences].matchLength = 0; + outSeqs[nbInSequences].offset = 0; + assert(nbOutSequences == nbInSequences + 1); + } + seqCollector->seqIndex += nbOutSequences; + assert(seqCollector->seqIndex <= seqCollector->maxSequences); + + return 0; +} + +size_t ZSTD_sequenceBound(size_t srcSize) { + const size_t maxNbSeq = (srcSize / ZSTD_MINMATCH_MIN) + 1; + const size_t maxNbDelims = (srcSize / ZSTD_BLOCKSIZE_MAX_MIN) + 1; + return maxNbSeq + maxNbDelims; +} + +size_t ZSTD_generateSequences(ZSTD_CCtx* zc, ZSTD_Sequence* outSeqs, + size_t outSeqsSize, const void* src, size_t srcSize) +{ + const size_t dstCapacity = ZSTD_compressBound(srcSize); + void* dst; /* Make C90 happy. */ + SeqCollector seqCollector; + { + int targetCBlockSize; + FORWARD_IF_ERROR(ZSTD_CCtx_getParameter(zc, ZSTD_c_targetCBlockSize, &targetCBlockSize), ""); + RETURN_ERROR_IF(targetCBlockSize != 0, parameter_unsupported, "targetCBlockSize != 0"); + } + { + int nbWorkers; + FORWARD_IF_ERROR(ZSTD_CCtx_getParameter(zc, ZSTD_c_nbWorkers, &nbWorkers), ""); + RETURN_ERROR_IF(nbWorkers != 0, parameter_unsupported, "nbWorkers != 0"); + } + + dst = ZSTD_customMalloc(dstCapacity, ZSTD_defaultCMem); + RETURN_ERROR_IF(dst == NULL, memory_allocation, "NULL pointer!"); + + seqCollector.collectSequences = 1; + seqCollector.seqStart = outSeqs; + seqCollector.seqIndex = 0; + seqCollector.maxSequences = outSeqsSize; + zc->seqCollector = seqCollector; + + { + const size_t ret = ZSTD_compress2(zc, dst, dstCapacity, src, srcSize); + ZSTD_customFree(dst, ZSTD_defaultCMem); + FORWARD_IF_ERROR(ret, "ZSTD_compress2 failed"); + } + assert(zc->seqCollector.seqIndex <= ZSTD_sequenceBound(srcSize)); + return zc->seqCollector.seqIndex; +} + +size_t ZSTD_mergeBlockDelimiters(ZSTD_Sequence* sequences, size_t seqsSize) { + size_t in = 0; + size_t out = 0; + for (; in < seqsSize; ++in) { + if (sequences[in].offset == 0 && sequences[in].matchLength == 0) { + if (in != seqsSize - 1) { + sequences[in+1].litLength += sequences[in].litLength; + } + } else { + sequences[out] = sequences[in]; + ++out; + } + } + return out; +} + +/* Unrolled loop to read four size_ts of input at a time. Returns 1 if is RLE, 0 if not. */ +static int ZSTD_isRLE(const BYTE* src, size_t length) { + const BYTE* ip = src; + const BYTE value = ip[0]; + const size_t valueST = (size_t)((U64)value * 0x0101010101010101ULL); + const size_t unrollSize = sizeof(size_t) * 4; + const size_t unrollMask = unrollSize - 1; + const size_t prefixLength = length & unrollMask; + size_t i; + if (length == 1) return 1; + /* Check if prefix is RLE first before using unrolled loop */ + if (prefixLength && ZSTD_count(ip+1, ip, ip+prefixLength) != prefixLength-1) { + return 0; + } + for (i = prefixLength; i != length; i += unrollSize) { + size_t u; + for (u = 0; u < unrollSize; u += sizeof(size_t)) { + if (MEM_readST(ip + i + u) != valueST) { + return 0; + } } } + return 1; +} + +/* Returns true if the given block may be RLE. + * This is just a heuristic based on the compressibility. + * It may return both false positives and false negatives. + */ +static int ZSTD_maybeRLE(SeqStore_t const* seqStore) +{ + size_t const nbSeqs = (size_t)(seqStore->sequences - seqStore->sequencesStart); + size_t const nbLits = (size_t)(seqStore->lit - seqStore->litStart); + + return nbSeqs < 4 && nbLits < 10; +} + +static void +ZSTD_blockState_confirmRepcodesAndEntropyTables(ZSTD_blockState_t* const bs) +{ + ZSTD_compressedBlockState_t* const tmp = bs->prevCBlock; + bs->prevCBlock = bs->nextCBlock; + bs->nextCBlock = tmp; +} + +/* Writes the block header */ +static void +writeBlockHeader(void* op, size_t cSize, size_t blockSize, U32 lastBlock) +{ + U32 const cBlockHeader = cSize == 1 ? + lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) : + lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); + MEM_writeLE24(op, cBlockHeader); + DEBUGLOG(5, "writeBlockHeader: cSize: %zu blockSize: %zu lastBlock: %u", cSize, blockSize, lastBlock); +} + +/** ZSTD_buildBlockEntropyStats_literals() : + * Builds entropy for the literals. + * Stores literals block type (raw, rle, compressed, repeat) and + * huffman description table to hufMetadata. + * Requires ENTROPY_WORKSPACE_SIZE workspace + * @return : size of huffman description table, or an error code + */ +static size_t +ZSTD_buildBlockEntropyStats_literals(void* const src, size_t srcSize, + const ZSTD_hufCTables_t* prevHuf, + ZSTD_hufCTables_t* nextHuf, + ZSTD_hufCTablesMetadata_t* hufMetadata, + const int literalsCompressionIsDisabled, + void* workspace, size_t wkspSize, + int hufFlags) +{ + BYTE* const wkspStart = (BYTE*)workspace; + BYTE* const wkspEnd = wkspStart + wkspSize; + BYTE* const countWkspStart = wkspStart; + unsigned* const countWksp = (unsigned*)workspace; + const size_t countWkspSize = (HUF_SYMBOLVALUE_MAX + 1) * sizeof(unsigned); + BYTE* const nodeWksp = countWkspStart + countWkspSize; + const size_t nodeWkspSize = (size_t)(wkspEnd - nodeWksp); + unsigned maxSymbolValue = HUF_SYMBOLVALUE_MAX; + unsigned huffLog = LitHufLog; + HUF_repeat repeat = prevHuf->repeatMode; + DEBUGLOG(5, "ZSTD_buildBlockEntropyStats_literals (srcSize=%zu)", srcSize); + + /* Prepare nextEntropy assuming reusing the existing table */ + ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + + if (literalsCompressionIsDisabled) { + DEBUGLOG(5, "set_basic - disabled"); + hufMetadata->hType = set_basic; + return 0; + } + + /* small ? don't even attempt compression (speed opt) */ +#ifndef COMPRESS_LITERALS_SIZE_MIN +# define COMPRESS_LITERALS_SIZE_MIN 63 /* heuristic */ +#endif + { size_t const minLitSize = (prevHuf->repeatMode == HUF_repeat_valid) ? 6 : COMPRESS_LITERALS_SIZE_MIN; + if (srcSize <= minLitSize) { + DEBUGLOG(5, "set_basic - too small"); + hufMetadata->hType = set_basic; + return 0; + } } + + /* Scan input and build symbol stats */ + { size_t const largest = + HIST_count_wksp (countWksp, &maxSymbolValue, + (const BYTE*)src, srcSize, + workspace, wkspSize); + FORWARD_IF_ERROR(largest, "HIST_count_wksp failed"); + if (largest == srcSize) { + /* only one literal symbol */ + DEBUGLOG(5, "set_rle"); + hufMetadata->hType = set_rle; + return 0; + } + if (largest <= (srcSize >> 7)+4) { + /* heuristic: likely not compressible */ + DEBUGLOG(5, "set_basic - no gain"); + hufMetadata->hType = set_basic; + return 0; + } } + + /* Validate the previous Huffman table */ + if (repeat == HUF_repeat_check + && !HUF_validateCTable((HUF_CElt const*)prevHuf->CTable, countWksp, maxSymbolValue)) { + repeat = HUF_repeat_none; + } + + /* Build Huffman Tree */ + ZSTD_memset(nextHuf->CTable, 0, sizeof(nextHuf->CTable)); + huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue, nodeWksp, nodeWkspSize, nextHuf->CTable, countWksp, hufFlags); + assert(huffLog <= LitHufLog); + { size_t const maxBits = HUF_buildCTable_wksp((HUF_CElt*)nextHuf->CTable, countWksp, + maxSymbolValue, huffLog, + nodeWksp, nodeWkspSize); + FORWARD_IF_ERROR(maxBits, "HUF_buildCTable_wksp"); + huffLog = (U32)maxBits; + } + { /* Build and write the CTable */ + size_t const newCSize = HUF_estimateCompressedSize( + (HUF_CElt*)nextHuf->CTable, countWksp, maxSymbolValue); + size_t const hSize = HUF_writeCTable_wksp( + hufMetadata->hufDesBuffer, sizeof(hufMetadata->hufDesBuffer), + (HUF_CElt*)nextHuf->CTable, maxSymbolValue, huffLog, + nodeWksp, nodeWkspSize); + /* Check against repeating the previous CTable */ + if (repeat != HUF_repeat_none) { + size_t const oldCSize = HUF_estimateCompressedSize( + (HUF_CElt const*)prevHuf->CTable, countWksp, maxSymbolValue); + if (oldCSize < srcSize && (oldCSize <= hSize + newCSize || hSize + 12 >= srcSize)) { + DEBUGLOG(5, "set_repeat - smaller"); + ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + hufMetadata->hType = set_repeat; + return 0; + } } + if (newCSize + hSize >= srcSize) { + DEBUGLOG(5, "set_basic - no gains"); + ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + hufMetadata->hType = set_basic; + return 0; + } + DEBUGLOG(5, "set_compressed (hSize=%u)", (U32)hSize); + hufMetadata->hType = set_compressed; + nextHuf->repeatMode = HUF_repeat_check; + return hSize; + } +} + + +/* ZSTD_buildDummySequencesStatistics(): + * Returns a ZSTD_symbolEncodingTypeStats_t with all encoding types as set_basic, + * and updates nextEntropy to the appropriate repeatMode. + */ +static ZSTD_symbolEncodingTypeStats_t +ZSTD_buildDummySequencesStatistics(ZSTD_fseCTables_t* nextEntropy) +{ + ZSTD_symbolEncodingTypeStats_t stats = {set_basic, set_basic, set_basic, 0, 0, 0}; + nextEntropy->litlength_repeatMode = FSE_repeat_none; + nextEntropy->offcode_repeatMode = FSE_repeat_none; + nextEntropy->matchlength_repeatMode = FSE_repeat_none; + return stats; +} + +/** ZSTD_buildBlockEntropyStats_sequences() : + * Builds entropy for the sequences. + * Stores symbol compression modes and fse table to fseMetadata. + * Requires ENTROPY_WORKSPACE_SIZE wksp. + * @return : size of fse tables or error code */ +static size_t +ZSTD_buildBlockEntropyStats_sequences( + const SeqStore_t* seqStorePtr, + const ZSTD_fseCTables_t* prevEntropy, + ZSTD_fseCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + ZSTD_fseCTablesMetadata_t* fseMetadata, + void* workspace, size_t wkspSize) +{ + ZSTD_strategy const strategy = cctxParams->cParams.strategy; + size_t const nbSeq = (size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart); + BYTE* const ostart = fseMetadata->fseTablesBuffer; + BYTE* const oend = ostart + sizeof(fseMetadata->fseTablesBuffer); + BYTE* op = ostart; + unsigned* countWorkspace = (unsigned*)workspace; + unsigned* entropyWorkspace = countWorkspace + (MaxSeq + 1); + size_t entropyWorkspaceSize = wkspSize - (MaxSeq + 1) * sizeof(*countWorkspace); + ZSTD_symbolEncodingTypeStats_t stats; + + DEBUGLOG(5, "ZSTD_buildBlockEntropyStats_sequences (nbSeq=%zu)", nbSeq); + stats = nbSeq != 0 ? ZSTD_buildSequencesStatistics(seqStorePtr, nbSeq, + prevEntropy, nextEntropy, op, oend, + strategy, countWorkspace, + entropyWorkspace, entropyWorkspaceSize) + : ZSTD_buildDummySequencesStatistics(nextEntropy); + FORWARD_IF_ERROR(stats.size, "ZSTD_buildSequencesStatistics failed!"); + fseMetadata->llType = (SymbolEncodingType_e) stats.LLtype; + fseMetadata->ofType = (SymbolEncodingType_e) stats.Offtype; + fseMetadata->mlType = (SymbolEncodingType_e) stats.MLtype; + fseMetadata->lastCountSize = stats.lastCountSize; + return stats.size; +} + + +/** ZSTD_buildBlockEntropyStats() : + * Builds entropy for the block. + * Requires workspace size ENTROPY_WORKSPACE_SIZE + * @return : 0 on success, or an error code + * Note : also employed in superblock + */ +size_t ZSTD_buildBlockEntropyStats( + const SeqStore_t* seqStorePtr, + const ZSTD_entropyCTables_t* prevEntropy, + ZSTD_entropyCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + ZSTD_entropyCTablesMetadata_t* entropyMetadata, + void* workspace, size_t wkspSize) +{ + size_t const litSize = (size_t)(seqStorePtr->lit - seqStorePtr->litStart); + int const huf_useOptDepth = (cctxParams->cParams.strategy >= HUF_OPTIMAL_DEPTH_THRESHOLD); + int const hufFlags = huf_useOptDepth ? HUF_flags_optimalDepth : 0; + + entropyMetadata->hufMetadata.hufDesSize = + ZSTD_buildBlockEntropyStats_literals(seqStorePtr->litStart, litSize, + &prevEntropy->huf, &nextEntropy->huf, + &entropyMetadata->hufMetadata, + ZSTD_literalsCompressionIsDisabled(cctxParams), + workspace, wkspSize, hufFlags); + + FORWARD_IF_ERROR(entropyMetadata->hufMetadata.hufDesSize, "ZSTD_buildBlockEntropyStats_literals failed"); + entropyMetadata->fseMetadata.fseTablesSize = + ZSTD_buildBlockEntropyStats_sequences(seqStorePtr, + &prevEntropy->fse, &nextEntropy->fse, + cctxParams, + &entropyMetadata->fseMetadata, + workspace, wkspSize); + FORWARD_IF_ERROR(entropyMetadata->fseMetadata.fseTablesSize, "ZSTD_buildBlockEntropyStats_sequences failed"); + return 0; +} + +/* Returns the size estimate for the literals section (header + content) of a block */ +static size_t +ZSTD_estimateBlockSize_literal(const BYTE* literals, size_t litSize, + const ZSTD_hufCTables_t* huf, + const ZSTD_hufCTablesMetadata_t* hufMetadata, + void* workspace, size_t wkspSize, + int writeEntropy) +{ + unsigned* const countWksp = (unsigned*)workspace; + unsigned maxSymbolValue = HUF_SYMBOLVALUE_MAX; + size_t literalSectionHeaderSize = 3 + (litSize >= 1 KB) + (litSize >= 16 KB); + U32 singleStream = litSize < 256; + + if (hufMetadata->hType == set_basic) return litSize; + else if (hufMetadata->hType == set_rle) return 1; + else if (hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat) { + size_t const largest = HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)literals, litSize, workspace, wkspSize); + if (ZSTD_isError(largest)) return litSize; + { size_t cLitSizeEstimate = HUF_estimateCompressedSize((const HUF_CElt*)huf->CTable, countWksp, maxSymbolValue); + if (writeEntropy) cLitSizeEstimate += hufMetadata->hufDesSize; + if (!singleStream) cLitSizeEstimate += 6; /* multi-stream huffman uses 6-byte jump table */ + return cLitSizeEstimate + literalSectionHeaderSize; + } } + assert(0); /* impossible */ + return 0; +} + +/* Returns the size estimate for the FSE-compressed symbols (of, ml, ll) of a block */ +static size_t +ZSTD_estimateBlockSize_symbolType(SymbolEncodingType_e type, + const BYTE* codeTable, size_t nbSeq, unsigned maxCode, + const FSE_CTable* fseCTable, + const U8* additionalBits, + short const* defaultNorm, U32 defaultNormLog, U32 defaultMax, + void* workspace, size_t wkspSize) +{ + unsigned* const countWksp = (unsigned*)workspace; + const BYTE* ctp = codeTable; + const BYTE* const ctStart = ctp; + const BYTE* const ctEnd = ctStart + nbSeq; + size_t cSymbolTypeSizeEstimateInBits = 0; + unsigned max = maxCode; + + HIST_countFast_wksp(countWksp, &max, codeTable, nbSeq, workspace, wkspSize); /* can't fail */ + if (type == set_basic) { + /* We selected this encoding type, so it must be valid. */ + assert(max <= defaultMax); + (void)defaultMax; + cSymbolTypeSizeEstimateInBits = ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, countWksp, max); + } else if (type == set_rle) { + cSymbolTypeSizeEstimateInBits = 0; + } else if (type == set_compressed || type == set_repeat) { + cSymbolTypeSizeEstimateInBits = ZSTD_fseBitCost(fseCTable, countWksp, max); + } + if (ZSTD_isError(cSymbolTypeSizeEstimateInBits)) { + return nbSeq * 10; + } + while (ctp < ctEnd) { + if (additionalBits) cSymbolTypeSizeEstimateInBits += additionalBits[*ctp]; + else cSymbolTypeSizeEstimateInBits += *ctp; /* for offset, offset code is also the number of additional bits */ + ctp++; + } + return cSymbolTypeSizeEstimateInBits >> 3; +} + +/* Returns the size estimate for the sequences section (header + content) of a block */ +static size_t +ZSTD_estimateBlockSize_sequences(const BYTE* ofCodeTable, + const BYTE* llCodeTable, + const BYTE* mlCodeTable, + size_t nbSeq, + const ZSTD_fseCTables_t* fseTables, + const ZSTD_fseCTablesMetadata_t* fseMetadata, + void* workspace, size_t wkspSize, + int writeEntropy) +{ + size_t sequencesSectionHeaderSize = 1 /* seqHead */ + 1 /* min seqSize size */ + (nbSeq >= 128) + (nbSeq >= LONGNBSEQ); + size_t cSeqSizeEstimate = 0; + cSeqSizeEstimate += ZSTD_estimateBlockSize_symbolType(fseMetadata->ofType, ofCodeTable, nbSeq, MaxOff, + fseTables->offcodeCTable, NULL, + OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, + workspace, wkspSize); + cSeqSizeEstimate += ZSTD_estimateBlockSize_symbolType(fseMetadata->llType, llCodeTable, nbSeq, MaxLL, + fseTables->litlengthCTable, LL_bits, + LL_defaultNorm, LL_defaultNormLog, MaxLL, + workspace, wkspSize); + cSeqSizeEstimate += ZSTD_estimateBlockSize_symbolType(fseMetadata->mlType, mlCodeTable, nbSeq, MaxML, + fseTables->matchlengthCTable, ML_bits, + ML_defaultNorm, ML_defaultNormLog, MaxML, + workspace, wkspSize); + if (writeEntropy) cSeqSizeEstimate += fseMetadata->fseTablesSize; + return cSeqSizeEstimate + sequencesSectionHeaderSize; +} + +/* Returns the size estimate for a given stream of literals, of, ll, ml */ +static size_t +ZSTD_estimateBlockSize(const BYTE* literals, size_t litSize, + const BYTE* ofCodeTable, + const BYTE* llCodeTable, + const BYTE* mlCodeTable, + size_t nbSeq, + const ZSTD_entropyCTables_t* entropy, + const ZSTD_entropyCTablesMetadata_t* entropyMetadata, + void* workspace, size_t wkspSize, + int writeLitEntropy, int writeSeqEntropy) +{ + size_t const literalsSize = ZSTD_estimateBlockSize_literal(literals, litSize, + &entropy->huf, &entropyMetadata->hufMetadata, + workspace, wkspSize, writeLitEntropy); + size_t const seqSize = ZSTD_estimateBlockSize_sequences(ofCodeTable, llCodeTable, mlCodeTable, + nbSeq, &entropy->fse, &entropyMetadata->fseMetadata, + workspace, wkspSize, writeSeqEntropy); + return seqSize + literalsSize + ZSTD_blockHeaderSize; +} + +/* Builds entropy statistics and uses them for blocksize estimation. + * + * @return: estimated compressed size of the seqStore, or a zstd error. + */ +static size_t +ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(SeqStore_t* seqStore, ZSTD_CCtx* zc) +{ + ZSTD_entropyCTablesMetadata_t* const entropyMetadata = &zc->blockSplitCtx.entropyMetadata; + DEBUGLOG(6, "ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize()"); + FORWARD_IF_ERROR(ZSTD_buildBlockEntropyStats(seqStore, + &zc->blockState.prevCBlock->entropy, + &zc->blockState.nextCBlock->entropy, + &zc->appliedParams, + entropyMetadata, + zc->tmpWorkspace, zc->tmpWkspSize), ""); + return ZSTD_estimateBlockSize( + seqStore->litStart, (size_t)(seqStore->lit - seqStore->litStart), + seqStore->ofCode, seqStore->llCode, seqStore->mlCode, + (size_t)(seqStore->sequences - seqStore->sequencesStart), + &zc->blockState.nextCBlock->entropy, + entropyMetadata, + zc->tmpWorkspace, zc->tmpWkspSize, + (int)(entropyMetadata->hufMetadata.hType == set_compressed), 1); +} + +/* Returns literals bytes represented in a seqStore */ +static size_t ZSTD_countSeqStoreLiteralsBytes(const SeqStore_t* const seqStore) +{ + size_t literalsBytes = 0; + size_t const nbSeqs = (size_t)(seqStore->sequences - seqStore->sequencesStart); + size_t i; + for (i = 0; i < nbSeqs; ++i) { + SeqDef const seq = seqStore->sequencesStart[i]; + literalsBytes += seq.litLength; + if (i == seqStore->longLengthPos && seqStore->longLengthType == ZSTD_llt_literalLength) { + literalsBytes += 0x10000; + } } + return literalsBytes; +} + +/* Returns match bytes represented in a seqStore */ +static size_t ZSTD_countSeqStoreMatchBytes(const SeqStore_t* const seqStore) +{ + size_t matchBytes = 0; + size_t const nbSeqs = (size_t)(seqStore->sequences - seqStore->sequencesStart); + size_t i; + for (i = 0; i < nbSeqs; ++i) { + SeqDef seq = seqStore->sequencesStart[i]; + matchBytes += seq.mlBase + MINMATCH; + if (i == seqStore->longLengthPos && seqStore->longLengthType == ZSTD_llt_matchLength) { + matchBytes += 0x10000; + } } + return matchBytes; +} + +/* Derives the seqStore that is a chunk of the originalSeqStore from [startIdx, endIdx). + * Stores the result in resultSeqStore. + */ +static void ZSTD_deriveSeqStoreChunk(SeqStore_t* resultSeqStore, + const SeqStore_t* originalSeqStore, + size_t startIdx, size_t endIdx) +{ + *resultSeqStore = *originalSeqStore; + if (startIdx > 0) { + resultSeqStore->sequences = originalSeqStore->sequencesStart + startIdx; + resultSeqStore->litStart += ZSTD_countSeqStoreLiteralsBytes(resultSeqStore); + } + + /* Move longLengthPos into the correct position if necessary */ + if (originalSeqStore->longLengthType != ZSTD_llt_none) { + if (originalSeqStore->longLengthPos < startIdx || originalSeqStore->longLengthPos > endIdx) { + resultSeqStore->longLengthType = ZSTD_llt_none; + } else { + resultSeqStore->longLengthPos -= (U32)startIdx; + } + } + resultSeqStore->sequencesStart = originalSeqStore->sequencesStart + startIdx; + resultSeqStore->sequences = originalSeqStore->sequencesStart + endIdx; + if (endIdx == (size_t)(originalSeqStore->sequences - originalSeqStore->sequencesStart)) { + /* This accounts for possible last literals if the derived chunk reaches the end of the block */ + assert(resultSeqStore->lit == originalSeqStore->lit); + } else { + size_t const literalsBytes = ZSTD_countSeqStoreLiteralsBytes(resultSeqStore); + resultSeqStore->lit = resultSeqStore->litStart + literalsBytes; + } + resultSeqStore->llCode += startIdx; + resultSeqStore->mlCode += startIdx; + resultSeqStore->ofCode += startIdx; +} + +/** + * Returns the raw offset represented by the combination of offBase, ll0, and repcode history. + * offBase must represent a repcode in the numeric representation of ZSTD_storeSeq(). + */ +static U32 +ZSTD_resolveRepcodeToRawOffset(const U32 rep[ZSTD_REP_NUM], const U32 offBase, const U32 ll0) +{ + U32 const adjustedRepCode = OFFBASE_TO_REPCODE(offBase) - 1 + ll0; /* [ 0 - 3 ] */ + assert(OFFBASE_IS_REPCODE(offBase)); + if (adjustedRepCode == ZSTD_REP_NUM) { + assert(ll0); + /* litlength == 0 and offCode == 2 implies selection of first repcode - 1 + * This is only valid if it results in a valid offset value, aka > 0. + * Note : it may happen that `rep[0]==1` in exceptional circumstances. + * In which case this function will return 0, which is an invalid offset. + * It's not an issue though, since this value will be + * compared and discarded within ZSTD_seqStore_resolveOffCodes(). + */ + return rep[0] - 1; + } + return rep[adjustedRepCode]; +} + +/** + * ZSTD_seqStore_resolveOffCodes() reconciles any possible divergences in offset history that may arise + * due to emission of RLE/raw blocks that disturb the offset history, + * and replaces any repcodes within the seqStore that may be invalid. + * + * dRepcodes are updated as would be on the decompression side. + * cRepcodes are updated exactly in accordance with the seqStore. + * + * Note : this function assumes seq->offBase respects the following numbering scheme : + * 0 : invalid + * 1-3 : repcode 1-3 + * 4+ : real_offset+3 + */ +static void +ZSTD_seqStore_resolveOffCodes(Repcodes_t* const dRepcodes, Repcodes_t* const cRepcodes, + const SeqStore_t* const seqStore, U32 const nbSeq) +{ + U32 idx = 0; + U32 const longLitLenIdx = seqStore->longLengthType == ZSTD_llt_literalLength ? seqStore->longLengthPos : nbSeq; + for (; idx < nbSeq; ++idx) { + SeqDef* const seq = seqStore->sequencesStart + idx; + U32 const ll0 = (seq->litLength == 0) && (idx != longLitLenIdx); + U32 const offBase = seq->offBase; + assert(offBase > 0); + if (OFFBASE_IS_REPCODE(offBase)) { + U32 const dRawOffset = ZSTD_resolveRepcodeToRawOffset(dRepcodes->rep, offBase, ll0); + U32 const cRawOffset = ZSTD_resolveRepcodeToRawOffset(cRepcodes->rep, offBase, ll0); + /* Adjust simulated decompression repcode history if we come across a mismatch. Replace + * the repcode with the offset it actually references, determined by the compression + * repcode history. + */ + if (dRawOffset != cRawOffset) { + seq->offBase = OFFSET_TO_OFFBASE(cRawOffset); + } + } + /* Compression repcode history is always updated with values directly from the unmodified seqStore. + * Decompression repcode history may use modified seq->offset value taken from compression repcode history. + */ + ZSTD_updateRep(dRepcodes->rep, seq->offBase, ll0); + ZSTD_updateRep(cRepcodes->rep, offBase, ll0); + } +} + +/* ZSTD_compressSeqStore_singleBlock(): + * Compresses a seqStore into a block with a block header, into the buffer dst. + * + * Returns the total size of that block (including header) or a ZSTD error code. + */ +static size_t +ZSTD_compressSeqStore_singleBlock(ZSTD_CCtx* zc, + const SeqStore_t* const seqStore, + Repcodes_t* const dRep, Repcodes_t* const cRep, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + U32 lastBlock, U32 isPartition) +{ + const U32 rleMaxLength = 25; + BYTE* op = (BYTE*)dst; + const BYTE* ip = (const BYTE*)src; + size_t cSize; + size_t cSeqsSize; + + /* In case of an RLE or raw block, the simulated decompression repcode history must be reset */ + Repcodes_t const dRepOriginal = *dRep; + DEBUGLOG(5, "ZSTD_compressSeqStore_singleBlock"); + if (isPartition) + ZSTD_seqStore_resolveOffCodes(dRep, cRep, seqStore, (U32)(seqStore->sequences - seqStore->sequencesStart)); + + RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall, "Block header doesn't fit"); + cSeqsSize = ZSTD_entropyCompressSeqStore(seqStore, + &zc->blockState.prevCBlock->entropy, &zc->blockState.nextCBlock->entropy, + &zc->appliedParams, + op + ZSTD_blockHeaderSize, dstCapacity - ZSTD_blockHeaderSize, + srcSize, + zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */, + zc->bmi2); + FORWARD_IF_ERROR(cSeqsSize, "ZSTD_entropyCompressSeqStore failed!"); + + if (!zc->isFirstBlock && + cSeqsSize < rleMaxLength && + ZSTD_isRLE((BYTE const*)src, srcSize)) { + /* We don't want to emit our first block as a RLE even if it qualifies because + * doing so will cause the decoder (cli only) to throw a "should consume all input error." + * This is only an issue for zstd <= v1.4.3 + */ + cSeqsSize = 1; + } + + /* Sequence collection not supported when block splitting */ + if (zc->seqCollector.collectSequences) { + FORWARD_IF_ERROR(ZSTD_copyBlockSequences(&zc->seqCollector, seqStore, dRepOriginal.rep), "copyBlockSequences failed"); + ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); + return 0; + } + + if (cSeqsSize == 0) { + cSize = ZSTD_noCompressBlock(op, dstCapacity, ip, srcSize, lastBlock); + FORWARD_IF_ERROR(cSize, "Nocompress block failed"); + DEBUGLOG(5, "Writing out nocompress block, size: %zu", cSize); + *dRep = dRepOriginal; /* reset simulated decompression repcode history */ + } else if (cSeqsSize == 1) { + cSize = ZSTD_rleCompressBlock(op, dstCapacity, *ip, srcSize, lastBlock); + FORWARD_IF_ERROR(cSize, "RLE compress block failed"); + DEBUGLOG(5, "Writing out RLE block, size: %zu", cSize); + *dRep = dRepOriginal; /* reset simulated decompression repcode history */ + } else { + ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); + writeBlockHeader(op, cSeqsSize, srcSize, lastBlock); + cSize = ZSTD_blockHeaderSize + cSeqsSize; + DEBUGLOG(5, "Writing out compressed block, size: %zu", cSize); + } + + if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) + zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; + + return cSize; +} + +/* Struct to keep track of where we are in our recursive calls. */ +typedef struct { + U32* splitLocations; /* Array of split indices */ + size_t idx; /* The current index within splitLocations being worked on */ +} seqStoreSplits; + +#define MIN_SEQUENCES_BLOCK_SPLITTING 300 + +/* Helper function to perform the recursive search for block splits. + * Estimates the cost of seqStore prior to split, and estimates the cost of splitting the sequences in half. + * If advantageous to split, then we recurse down the two sub-blocks. + * If not, or if an error occurred in estimation, then we do not recurse. + * + * Note: The recursion depth is capped by a heuristic minimum number of sequences, + * defined by MIN_SEQUENCES_BLOCK_SPLITTING. + * In theory, this means the absolute largest recursion depth is 10 == log2(maxNbSeqInBlock/MIN_SEQUENCES_BLOCK_SPLITTING). + * In practice, recursion depth usually doesn't go beyond 4. + * + * Furthermore, the number of splits is capped by ZSTD_MAX_NB_BLOCK_SPLITS. + * At ZSTD_MAX_NB_BLOCK_SPLITS == 196 with the current existing blockSize + * maximum of 128 KB, this value is actually impossible to reach. + */ +static void +ZSTD_deriveBlockSplitsHelper(seqStoreSplits* splits, size_t startIdx, size_t endIdx, + ZSTD_CCtx* zc, const SeqStore_t* origSeqStore) +{ + SeqStore_t* const fullSeqStoreChunk = &zc->blockSplitCtx.fullSeqStoreChunk; + SeqStore_t* const firstHalfSeqStore = &zc->blockSplitCtx.firstHalfSeqStore; + SeqStore_t* const secondHalfSeqStore = &zc->blockSplitCtx.secondHalfSeqStore; + size_t estimatedOriginalSize; + size_t estimatedFirstHalfSize; + size_t estimatedSecondHalfSize; + size_t midIdx = (startIdx + endIdx)/2; + + DEBUGLOG(5, "ZSTD_deriveBlockSplitsHelper: startIdx=%zu endIdx=%zu", startIdx, endIdx); + assert(endIdx >= startIdx); + if (endIdx - startIdx < MIN_SEQUENCES_BLOCK_SPLITTING || splits->idx >= ZSTD_MAX_NB_BLOCK_SPLITS) { + DEBUGLOG(6, "ZSTD_deriveBlockSplitsHelper: Too few sequences (%zu)", endIdx - startIdx); + return; + } + ZSTD_deriveSeqStoreChunk(fullSeqStoreChunk, origSeqStore, startIdx, endIdx); + ZSTD_deriveSeqStoreChunk(firstHalfSeqStore, origSeqStore, startIdx, midIdx); + ZSTD_deriveSeqStoreChunk(secondHalfSeqStore, origSeqStore, midIdx, endIdx); + estimatedOriginalSize = ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(fullSeqStoreChunk, zc); + estimatedFirstHalfSize = ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(firstHalfSeqStore, zc); + estimatedSecondHalfSize = ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(secondHalfSeqStore, zc); + DEBUGLOG(5, "Estimated original block size: %zu -- First half split: %zu -- Second half split: %zu", + estimatedOriginalSize, estimatedFirstHalfSize, estimatedSecondHalfSize); + if (ZSTD_isError(estimatedOriginalSize) || ZSTD_isError(estimatedFirstHalfSize) || ZSTD_isError(estimatedSecondHalfSize)) { + return; + } + if (estimatedFirstHalfSize + estimatedSecondHalfSize < estimatedOriginalSize) { + DEBUGLOG(5, "split decided at seqNb:%zu", midIdx); + ZSTD_deriveBlockSplitsHelper(splits, startIdx, midIdx, zc, origSeqStore); + splits->splitLocations[splits->idx] = (U32)midIdx; + splits->idx++; + ZSTD_deriveBlockSplitsHelper(splits, midIdx, endIdx, zc, origSeqStore); + } +} + +/* Base recursive function. + * Populates a table with intra-block partition indices that can improve compression ratio. + * + * @return: number of splits made (which equals the size of the partition table - 1). + */ +static size_t ZSTD_deriveBlockSplits(ZSTD_CCtx* zc, U32 partitions[], U32 nbSeq) +{ + seqStoreSplits splits; + splits.splitLocations = partitions; + splits.idx = 0; + if (nbSeq <= 4) { + DEBUGLOG(5, "ZSTD_deriveBlockSplits: Too few sequences to split (%u <= 4)", nbSeq); + /* Refuse to try and split anything with less than 4 sequences */ + return 0; + } + ZSTD_deriveBlockSplitsHelper(&splits, 0, nbSeq, zc, &zc->seqStore); + splits.splitLocations[splits.idx] = nbSeq; + DEBUGLOG(5, "ZSTD_deriveBlockSplits: final nb partitions: %zu", splits.idx+1); + return splits.idx; +} + +/* ZSTD_compressBlock_splitBlock(): + * Attempts to split a given block into multiple blocks to improve compression ratio. + * + * Returns combined size of all blocks (which includes headers), or a ZSTD error code. + */ +static size_t +ZSTD_compressBlock_splitBlock_internal(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t blockSize, + U32 lastBlock, U32 nbSeq) +{ + size_t cSize = 0; + const BYTE* ip = (const BYTE*)src; + BYTE* op = (BYTE*)dst; + size_t i = 0; + size_t srcBytesTotal = 0; + U32* const partitions = zc->blockSplitCtx.partitions; /* size == ZSTD_MAX_NB_BLOCK_SPLITS */ + SeqStore_t* const nextSeqStore = &zc->blockSplitCtx.nextSeqStore; + SeqStore_t* const currSeqStore = &zc->blockSplitCtx.currSeqStore; + size_t const numSplits = ZSTD_deriveBlockSplits(zc, partitions, nbSeq); + + /* If a block is split and some partitions are emitted as RLE/uncompressed, then repcode history + * may become invalid. In order to reconcile potentially invalid repcodes, we keep track of two + * separate repcode histories that simulate repcode history on compression and decompression side, + * and use the histories to determine whether we must replace a particular repcode with its raw offset. + * + * 1) cRep gets updated for each partition, regardless of whether the block was emitted as uncompressed + * or RLE. This allows us to retrieve the offset value that an invalid repcode references within + * a nocompress/RLE block. + * 2) dRep gets updated only for compressed partitions, and when a repcode gets replaced, will use + * the replacement offset value rather than the original repcode to update the repcode history. + * dRep also will be the final repcode history sent to the next block. + * + * See ZSTD_seqStore_resolveOffCodes() for more details. + */ + Repcodes_t dRep; + Repcodes_t cRep; + ZSTD_memcpy(dRep.rep, zc->blockState.prevCBlock->rep, sizeof(Repcodes_t)); + ZSTD_memcpy(cRep.rep, zc->blockState.prevCBlock->rep, sizeof(Repcodes_t)); + ZSTD_memset(nextSeqStore, 0, sizeof(SeqStore_t)); + + DEBUGLOG(5, "ZSTD_compressBlock_splitBlock_internal (dstCapacity=%u, dictLimit=%u, nextToUpdate=%u)", + (unsigned)dstCapacity, (unsigned)zc->blockState.matchState.window.dictLimit, + (unsigned)zc->blockState.matchState.nextToUpdate); + + if (numSplits == 0) { + size_t cSizeSingleBlock = + ZSTD_compressSeqStore_singleBlock(zc, &zc->seqStore, + &dRep, &cRep, + op, dstCapacity, + ip, blockSize, + lastBlock, 0 /* isPartition */); + FORWARD_IF_ERROR(cSizeSingleBlock, "Compressing single block from splitBlock_internal() failed!"); + DEBUGLOG(5, "ZSTD_compressBlock_splitBlock_internal: No splits"); + assert(zc->blockSizeMax <= ZSTD_BLOCKSIZE_MAX); + assert(cSizeSingleBlock <= zc->blockSizeMax + ZSTD_blockHeaderSize); + return cSizeSingleBlock; + } + + ZSTD_deriveSeqStoreChunk(currSeqStore, &zc->seqStore, 0, partitions[0]); + for (i = 0; i <= numSplits; ++i) { + size_t cSizeChunk; + U32 const lastPartition = (i == numSplits); + U32 lastBlockEntireSrc = 0; + + size_t srcBytes = ZSTD_countSeqStoreLiteralsBytes(currSeqStore) + ZSTD_countSeqStoreMatchBytes(currSeqStore); + srcBytesTotal += srcBytes; + if (lastPartition) { + /* This is the final partition, need to account for possible last literals */ + srcBytes += blockSize - srcBytesTotal; + lastBlockEntireSrc = lastBlock; + } else { + ZSTD_deriveSeqStoreChunk(nextSeqStore, &zc->seqStore, partitions[i], partitions[i+1]); + } + + cSizeChunk = ZSTD_compressSeqStore_singleBlock(zc, currSeqStore, + &dRep, &cRep, + op, dstCapacity, + ip, srcBytes, + lastBlockEntireSrc, 1 /* isPartition */); + DEBUGLOG(5, "Estimated size: %zu vs %zu : actual size", + ZSTD_buildEntropyStatisticsAndEstimateSubBlockSize(currSeqStore, zc), cSizeChunk); + FORWARD_IF_ERROR(cSizeChunk, "Compressing chunk failed!"); + + ip += srcBytes; + op += cSizeChunk; + dstCapacity -= cSizeChunk; + cSize += cSizeChunk; + *currSeqStore = *nextSeqStore; + assert(cSizeChunk <= zc->blockSizeMax + ZSTD_blockHeaderSize); + } + /* cRep and dRep may have diverged during the compression. + * If so, we use the dRep repcodes for the next block. + */ + ZSTD_memcpy(zc->blockState.prevCBlock->rep, dRep.rep, sizeof(Repcodes_t)); + return cSize; +} + +static size_t +ZSTD_compressBlock_splitBlock(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, U32 lastBlock) +{ + U32 nbSeq; + size_t cSize; + DEBUGLOG(5, "ZSTD_compressBlock_splitBlock"); + assert(zc->appliedParams.postBlockSplitter == ZSTD_ps_enable); + + { const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); + FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); + if (bss == ZSTDbss_noCompress) { + if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) + zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; + RETURN_ERROR_IF(zc->seqCollector.collectSequences, sequenceProducer_failed, "Uncompressible block"); + cSize = ZSTD_noCompressBlock(dst, dstCapacity, src, srcSize, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); + DEBUGLOG(5, "ZSTD_compressBlock_splitBlock: Nocompress block"); + return cSize; + } + nbSeq = (U32)(zc->seqStore.sequences - zc->seqStore.sequencesStart); + } + + cSize = ZSTD_compressBlock_splitBlock_internal(zc, dst, dstCapacity, src, srcSize, lastBlock, nbSeq); + FORWARD_IF_ERROR(cSize, "Splitting blocks failed!"); + return cSize; +} + +static size_t +ZSTD_compressBlock_internal(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, U32 frame) +{ + /* This is an estimated upper bound for the length of an rle block. + * This isn't the actual upper bound. + * Finding the real threshold needs further investigation. + */ + const U32 rleMaxLength = 25; + size_t cSize; + const BYTE* ip = (const BYTE*)src; + BYTE* op = (BYTE*)dst; + DEBUGLOG(5, "ZSTD_compressBlock_internal (dstCapacity=%u, dictLimit=%u, nextToUpdate=%u)", + (unsigned)dstCapacity, (unsigned)zc->blockState.matchState.window.dictLimit, + (unsigned)zc->blockState.matchState.nextToUpdate); + + { const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); + FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); + if (bss == ZSTDbss_noCompress) { + RETURN_ERROR_IF(zc->seqCollector.collectSequences, sequenceProducer_failed, "Uncompressible block"); + cSize = 0; + goto out; + } + } + + if (zc->seqCollector.collectSequences) { + FORWARD_IF_ERROR(ZSTD_copyBlockSequences(&zc->seqCollector, ZSTD_getSeqStore(zc), zc->blockState.prevCBlock->rep), "copyBlockSequences failed"); + ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); + return 0; + } + + /* encode sequences and literals */ + cSize = ZSTD_entropyCompressSeqStore(&zc->seqStore, + &zc->blockState.prevCBlock->entropy, &zc->blockState.nextCBlock->entropy, + &zc->appliedParams, + dst, dstCapacity, + srcSize, + zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */, + zc->bmi2); + + if (frame && + /* We don't want to emit our first block as a RLE even if it qualifies because + * doing so will cause the decoder (cli only) to throw a "should consume all input error." + * This is only an issue for zstd <= v1.4.3 + */ + !zc->isFirstBlock && + cSize < rleMaxLength && + ZSTD_isRLE(ip, srcSize)) + { + cSize = 1; + op[0] = ip[0]; + } + +out: + if (!ZSTD_isError(cSize) && cSize > 1) { + ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); + } + /* We check that dictionaries have offset codes available for the first + * block. After the first block, the offcode table might not have large + * enough codes to represent the offsets in the data. + */ + if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) + zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; + + return cSize; +} + +static size_t ZSTD_compressBlock_targetCBlockSize_body(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const size_t bss, U32 lastBlock) +{ + DEBUGLOG(6, "Attempting ZSTD_compressSuperBlock()"); + if (bss == ZSTDbss_compress) { + if (/* We don't want to emit our first block as a RLE even if it qualifies because + * doing so will cause the decoder (cli only) to throw a "should consume all input error." + * This is only an issue for zstd <= v1.4.3 + */ + !zc->isFirstBlock && + ZSTD_maybeRLE(&zc->seqStore) && + ZSTD_isRLE((BYTE const*)src, srcSize)) + { + return ZSTD_rleCompressBlock(dst, dstCapacity, *(BYTE const*)src, srcSize, lastBlock); + } + /* Attempt superblock compression. + * + * Note that compressed size of ZSTD_compressSuperBlock() is not bound by the + * standard ZSTD_compressBound(). This is a problem, because even if we have + * space now, taking an extra byte now could cause us to run out of space later + * and violate ZSTD_compressBound(). + * + * Define blockBound(blockSize) = blockSize + ZSTD_blockHeaderSize. + * + * In order to respect ZSTD_compressBound() we must attempt to emit a raw + * uncompressed block in these cases: + * * cSize == 0: Return code for an uncompressed block. + * * cSize == dstSize_tooSmall: We may have expanded beyond blockBound(srcSize). + * ZSTD_noCompressBlock() will return dstSize_tooSmall if we are really out of + * output space. + * * cSize >= blockBound(srcSize): We have expanded the block too much so + * emit an uncompressed block. + */ + { size_t const cSize = + ZSTD_compressSuperBlock(zc, dst, dstCapacity, src, srcSize, lastBlock); + if (cSize != ERROR(dstSize_tooSmall)) { + size_t const maxCSize = + srcSize - ZSTD_minGain(srcSize, zc->appliedParams.cParams.strategy); + FORWARD_IF_ERROR(cSize, "ZSTD_compressSuperBlock failed"); + if (cSize != 0 && cSize < maxCSize + ZSTD_blockHeaderSize) { + ZSTD_blockState_confirmRepcodesAndEntropyTables(&zc->blockState); + return cSize; + } + } + } + } /* if (bss == ZSTDbss_compress)*/ + + DEBUGLOG(6, "Resorting to ZSTD_noCompressBlock()"); + /* Superblock compression failed, attempt to emit a single no compress block. + * The decoder will be able to stream this block since it is uncompressed. + */ + return ZSTD_noCompressBlock(dst, dstCapacity, src, srcSize, lastBlock); +} + +static size_t ZSTD_compressBlock_targetCBlockSize(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + U32 lastBlock) +{ + size_t cSize = 0; + const size_t bss = ZSTD_buildSeqStore(zc, src, srcSize); + DEBUGLOG(5, "ZSTD_compressBlock_targetCBlockSize (dstCapacity=%u, dictLimit=%u, nextToUpdate=%u, srcSize=%zu)", + (unsigned)dstCapacity, (unsigned)zc->blockState.matchState.window.dictLimit, (unsigned)zc->blockState.matchState.nextToUpdate, srcSize); + FORWARD_IF_ERROR(bss, "ZSTD_buildSeqStore failed"); + + cSize = ZSTD_compressBlock_targetCBlockSize_body(zc, dst, dstCapacity, src, srcSize, bss, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_targetCBlockSize_body failed"); + + if (zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) + zc->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; + + return cSize; +} + +static void ZSTD_overflowCorrectIfNeeded(ZSTD_MatchState_t* ms, + ZSTD_cwksp* ws, + ZSTD_CCtx_params const* params, + void const* ip, + void const* iend) +{ + U32 const cycleLog = ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy); + U32 const maxDist = (U32)1 << params->cParams.windowLog; + if (ZSTD_window_needOverflowCorrection(ms->window, cycleLog, maxDist, ms->loadedDictEnd, ip, iend)) { + U32 const correction = ZSTD_window_correctOverflow(&ms->window, cycleLog, maxDist, ip); + ZSTD_STATIC_ASSERT(ZSTD_CHAINLOG_MAX <= 30); + ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX_32 <= 30); + ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX <= 31); + ZSTD_cwksp_mark_tables_dirty(ws); + ZSTD_reduceIndex(ms, params, correction); + ZSTD_cwksp_mark_tables_clean(ws); + if (ms->nextToUpdate < correction) ms->nextToUpdate = 0; + else ms->nextToUpdate -= correction; + /* invalidate dictionaries on overflow correction */ + ms->loadedDictEnd = 0; + ms->dictMatchState = NULL; + } +} + +#include "zstd_preSplit.h" + +static size_t ZSTD_optimalBlockSize(ZSTD_CCtx* cctx, const void* src, size_t srcSize, size_t blockSizeMax, int splitLevel, ZSTD_strategy strat, S64 savings) +{ + /* split level based on compression strategy, from `fast` to `btultra2` */ + static const int splitLevels[] = { 0, 0, 1, 2, 2, 3, 3, 4, 4, 4 }; + /* note: conservatively only split full blocks (128 KB) currently. + * While it's possible to go lower, let's keep it simple for a first implementation. + * Besides, benefits of splitting are reduced when blocks are already small. + */ + if (srcSize < 128 KB || blockSizeMax < 128 KB) + return MIN(srcSize, blockSizeMax); + /* do not split incompressible data though: + * require verified savings to allow pre-splitting. + * Note: as a consequence, the first full block is not split. + */ + if (savings < 3) { + DEBUGLOG(6, "don't attempt splitting: savings (%i) too low", (int)savings); + return 128 KB; + } + /* apply @splitLevel, or use default value (which depends on @strat). + * note that splitting heuristic is still conditioned by @savings >= 3, + * so the first block will not reach this code path */ + if (splitLevel == 1) return 128 KB; + if (splitLevel == 0) { + assert(ZSTD_fast <= strat && strat <= ZSTD_btultra2); + splitLevel = splitLevels[strat]; + } else { + assert(2 <= splitLevel && splitLevel <= 6); + splitLevel -= 2; + } + return ZSTD_splitBlock(src, blockSizeMax, splitLevel, cctx->tmpWorkspace, cctx->tmpWkspSize); +} + +/*! ZSTD_compress_frameChunk() : +* Compress a chunk of data into one or multiple blocks. +* All blocks will be terminated, all input will be consumed. +* Function will issue an error if there is not enough `dstCapacity` to hold the compressed content. +* Frame is supposed already started (header already produced) +* @return : compressed size, or an error code +*/ +static size_t ZSTD_compress_frameChunk(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + U32 lastFrameChunk) +{ + size_t blockSizeMax = cctx->blockSizeMax; + size_t remaining = srcSize; + const BYTE* ip = (const BYTE*)src; + BYTE* const ostart = (BYTE*)dst; + BYTE* op = ostart; + U32 const maxDist = (U32)1 << cctx->appliedParams.cParams.windowLog; + S64 savings = (S64)cctx->consumedSrcSize - (S64)cctx->producedCSize; + + assert(cctx->appliedParams.cParams.windowLog <= ZSTD_WINDOWLOG_MAX); + + DEBUGLOG(5, "ZSTD_compress_frameChunk (srcSize=%u, blockSizeMax=%u)", (unsigned)srcSize, (unsigned)blockSizeMax); + if (cctx->appliedParams.fParams.checksumFlag && srcSize) + XXH64_update(&cctx->xxhState, src, srcSize); + + while (remaining) { + ZSTD_MatchState_t* const ms = &cctx->blockState.matchState; + size_t const blockSize = ZSTD_optimalBlockSize(cctx, + ip, remaining, + blockSizeMax, + cctx->appliedParams.preBlockSplitter_level, + cctx->appliedParams.cParams.strategy, + savings); + U32 const lastBlock = lastFrameChunk & (blockSize == remaining); + assert(blockSize <= remaining); + + /* TODO: See 3090. We reduced MIN_CBLOCK_SIZE from 3 to 2 so to compensate we are adding + * additional 1. We need to revisit and change this logic to be more consistent */ + RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize + MIN_CBLOCK_SIZE + 1, + dstSize_tooSmall, + "not enough space to store compressed block"); + + ZSTD_overflowCorrectIfNeeded( + ms, &cctx->workspace, &cctx->appliedParams, ip, ip + blockSize); + ZSTD_checkDictValidity(&ms->window, ip + blockSize, maxDist, &ms->loadedDictEnd, &ms->dictMatchState); + ZSTD_window_enforceMaxDist(&ms->window, ip, maxDist, &ms->loadedDictEnd, &ms->dictMatchState); + + /* Ensure hash/chain table insertion resumes no sooner than lowlimit */ + if (ms->nextToUpdate < ms->window.lowLimit) ms->nextToUpdate = ms->window.lowLimit; + + { size_t cSize; + if (ZSTD_useTargetCBlockSize(&cctx->appliedParams)) { + cSize = ZSTD_compressBlock_targetCBlockSize(cctx, op, dstCapacity, ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_targetCBlockSize failed"); + assert(cSize > 0); + assert(cSize <= blockSize + ZSTD_blockHeaderSize); + } else if (ZSTD_blockSplitterEnabled(&cctx->appliedParams)) { + cSize = ZSTD_compressBlock_splitBlock(cctx, op, dstCapacity, ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_splitBlock failed"); + assert(cSize > 0 || cctx->seqCollector.collectSequences == 1); + } else { + cSize = ZSTD_compressBlock_internal(cctx, + op+ZSTD_blockHeaderSize, dstCapacity-ZSTD_blockHeaderSize, + ip, blockSize, 1 /* frame */); + FORWARD_IF_ERROR(cSize, "ZSTD_compressBlock_internal failed"); + + if (cSize == 0) { /* block is not compressible */ + cSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); + } else { + U32 const cBlockHeader = cSize == 1 ? + lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) : + lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); + MEM_writeLE24(op, cBlockHeader); + cSize += ZSTD_blockHeaderSize; + } + } /* if (ZSTD_useTargetCBlockSize(&cctx->appliedParams))*/ + + /* @savings is employed to ensure that splitting doesn't worsen expansion of incompressible data. + * Without splitting, the maximum expansion is 3 bytes per full block. + * An adversarial input could attempt to fudge the split detector, + * and make it split incompressible data, resulting in more block headers. + * Note that, since ZSTD_COMPRESSBOUND() assumes a worst case scenario of 1KB per block, + * and the splitter never creates blocks that small (current lower limit is 8 KB), + * there is already no risk to expand beyond ZSTD_COMPRESSBOUND() limit. + * But if the goal is to not expand by more than 3-bytes per 128 KB full block, + * then yes, it becomes possible to make the block splitter oversplit incompressible data. + * Using @savings, we enforce an even more conservative condition, + * requiring the presence of enough savings (at least 3 bytes) to authorize splitting, + * otherwise only full blocks are used. + * But being conservative is fine, + * since splitting barely compressible blocks is not fruitful anyway */ + savings += (S64)blockSize - (S64)cSize; + + ip += blockSize; + assert(remaining >= blockSize); + remaining -= blockSize; + op += cSize; + assert(dstCapacity >= cSize); + dstCapacity -= cSize; + cctx->isFirstBlock = 0; + DEBUGLOG(5, "ZSTD_compress_frameChunk: adding a block of size %u", + (unsigned)cSize); + } } + + if (lastFrameChunk && (op>ostart)) cctx->stage = ZSTDcs_ending; + return (size_t)(op-ostart); +} + + +static size_t ZSTD_writeFrameHeader(void* dst, size_t dstCapacity, + const ZSTD_CCtx_params* params, + U64 pledgedSrcSize, U32 dictID) +{ + BYTE* const op = (BYTE*)dst; + U32 const dictIDSizeCodeLength = (dictID>0) + (dictID>=256) + (dictID>=65536); /* 0-3 */ + U32 const dictIDSizeCode = params->fParams.noDictIDFlag ? 0 : dictIDSizeCodeLength; /* 0-3 */ + U32 const checksumFlag = params->fParams.checksumFlag>0; + U32 const windowSize = (U32)1 << params->cParams.windowLog; + U32 const singleSegment = params->fParams.contentSizeFlag && (windowSize >= pledgedSrcSize); + BYTE const windowLogByte = (BYTE)((params->cParams.windowLog - ZSTD_WINDOWLOG_ABSOLUTEMIN) << 3); + U32 const fcsCode = params->fParams.contentSizeFlag ? + (pledgedSrcSize>=256) + (pledgedSrcSize>=65536+256) + (pledgedSrcSize>=0xFFFFFFFFU) : 0; /* 0-3 */ + BYTE const frameHeaderDescriptionByte = (BYTE)(dictIDSizeCode + (checksumFlag<<2) + (singleSegment<<5) + (fcsCode<<6) ); + size_t pos=0; + + assert(!(params->fParams.contentSizeFlag && pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN)); + RETURN_ERROR_IF(dstCapacity < ZSTD_FRAMEHEADERSIZE_MAX, dstSize_tooSmall, + "dst buf is too small to fit worst-case frame header size."); + DEBUGLOG(4, "ZSTD_writeFrameHeader : dictIDFlag : %u ; dictID : %u ; dictIDSizeCode : %u", + !params->fParams.noDictIDFlag, (unsigned)dictID, (unsigned)dictIDSizeCode); + if (params->format == ZSTD_f_zstd1) { + MEM_writeLE32(dst, ZSTD_MAGICNUMBER); + pos = 4; + } + op[pos++] = frameHeaderDescriptionByte; + if (!singleSegment) op[pos++] = windowLogByte; + switch(dictIDSizeCode) + { + default: + assert(0); /* impossible */ + ZSTD_FALLTHROUGH; + case 0 : break; + case 1 : op[pos] = (BYTE)(dictID); pos++; break; + case 2 : MEM_writeLE16(op+pos, (U16)dictID); pos+=2; break; + case 3 : MEM_writeLE32(op+pos, dictID); pos+=4; break; + } + switch(fcsCode) + { + default: + assert(0); /* impossible */ + ZSTD_FALLTHROUGH; + case 0 : if (singleSegment) op[pos++] = (BYTE)(pledgedSrcSize); break; + case 1 : MEM_writeLE16(op+pos, (U16)(pledgedSrcSize-256)); pos+=2; break; + case 2 : MEM_writeLE32(op+pos, (U32)(pledgedSrcSize)); pos+=4; break; + case 3 : MEM_writeLE64(op+pos, (U64)(pledgedSrcSize)); pos+=8; break; + } + return pos; +} + +/* ZSTD_writeSkippableFrame_advanced() : + * Writes out a skippable frame with the specified magic number variant (16 are supported), + * from ZSTD_MAGIC_SKIPPABLE_START to ZSTD_MAGIC_SKIPPABLE_START+15, and the desired source data. + * + * Returns the total number of bytes written, or a ZSTD error code. + */ +size_t ZSTD_writeSkippableFrame(void* dst, size_t dstCapacity, + const void* src, size_t srcSize, unsigned magicVariant) { + BYTE* op = (BYTE*)dst; + RETURN_ERROR_IF(dstCapacity < srcSize + ZSTD_SKIPPABLEHEADERSIZE /* Skippable frame overhead */, + dstSize_tooSmall, "Not enough room for skippable frame"); + RETURN_ERROR_IF(srcSize > (unsigned)0xFFFFFFFF, srcSize_wrong, "Src size too large for skippable frame"); + RETURN_ERROR_IF(magicVariant > 15, parameter_outOfBound, "Skippable frame magic number variant not supported"); + + MEM_writeLE32(op, (U32)(ZSTD_MAGIC_SKIPPABLE_START + magicVariant)); + MEM_writeLE32(op+4, (U32)srcSize); + ZSTD_memcpy(op+8, src, srcSize); + return srcSize + ZSTD_SKIPPABLEHEADERSIZE; +} + +/* ZSTD_writeLastEmptyBlock() : + * output an empty Block with end-of-frame mark to complete a frame + * @return : size of data written into `dst` (== ZSTD_blockHeaderSize (defined in zstd_internal.h)) + * or an error code if `dstCapacity` is too small (stage == ZSTDcs_init); + assert(nbSeq == 0 || cctx->appliedParams.ldmParams.enableLdm != ZSTD_ps_enable); + cctx->externSeqStore.seq = seq; + cctx->externSeqStore.size = nbSeq; + cctx->externSeqStore.capacity = nbSeq; + cctx->externSeqStore.pos = 0; + cctx->externSeqStore.posInSequence = 0; +} + + +static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + U32 frame, U32 lastFrameChunk) +{ + ZSTD_MatchState_t* const ms = &cctx->blockState.matchState; + size_t fhSize = 0; + + DEBUGLOG(5, "ZSTD_compressContinue_internal, stage: %u, srcSize: %u", + cctx->stage, (unsigned)srcSize); + RETURN_ERROR_IF(cctx->stage==ZSTDcs_created, stage_wrong, + "missing init (ZSTD_compressBegin)"); + + if (frame && (cctx->stage==ZSTDcs_init)) { + fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, &cctx->appliedParams, + cctx->pledgedSrcSizePlusOne-1, cctx->dictID); + FORWARD_IF_ERROR(fhSize, "ZSTD_writeFrameHeader failed"); + assert(fhSize <= dstCapacity); + dstCapacity -= fhSize; + dst = (char*)dst + fhSize; + cctx->stage = ZSTDcs_ongoing; + } + + if (!srcSize) return fhSize; /* do not generate an empty block if no input */ + + if (!ZSTD_window_update(&ms->window, src, srcSize, ms->forceNonContiguous)) { + ms->forceNonContiguous = 0; + ms->nextToUpdate = ms->window.dictLimit; + } + if (cctx->appliedParams.ldmParams.enableLdm == ZSTD_ps_enable) { + ZSTD_window_update(&cctx->ldmState.window, src, srcSize, /* forceNonContiguous */ 0); + } + + if (!frame) { + /* overflow check and correction for block mode */ + ZSTD_overflowCorrectIfNeeded( + ms, &cctx->workspace, &cctx->appliedParams, + src, (BYTE const*)src + srcSize); + } + + DEBUGLOG(5, "ZSTD_compressContinue_internal (blockSize=%u)", (unsigned)cctx->blockSizeMax); + { size_t const cSize = frame ? + ZSTD_compress_frameChunk (cctx, dst, dstCapacity, src, srcSize, lastFrameChunk) : + ZSTD_compressBlock_internal (cctx, dst, dstCapacity, src, srcSize, 0 /* frame */); + FORWARD_IF_ERROR(cSize, "%s", frame ? "ZSTD_compress_frameChunk failed" : "ZSTD_compressBlock_internal failed"); + cctx->consumedSrcSize += srcSize; + cctx->producedCSize += (cSize + fhSize); + assert(!(cctx->appliedParams.fParams.contentSizeFlag && cctx->pledgedSrcSizePlusOne == 0)); + if (cctx->pledgedSrcSizePlusOne != 0) { /* control src size */ + ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN == (unsigned long long)-1); + RETURN_ERROR_IF( + cctx->consumedSrcSize+1 > cctx->pledgedSrcSizePlusOne, + srcSize_wrong, + "error : pledgedSrcSize = %u, while realSrcSize >= %u", + (unsigned)cctx->pledgedSrcSizePlusOne-1, + (unsigned)cctx->consumedSrcSize); + } + return cSize + fhSize; + } +} + +size_t ZSTD_compressContinue_public(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + DEBUGLOG(5, "ZSTD_compressContinue (srcSize=%u)", (unsigned)srcSize); + return ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 1 /* frame mode */, 0 /* last chunk */); +} + +/* NOTE: Must just wrap ZSTD_compressContinue_public() */ +size_t ZSTD_compressContinue(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + return ZSTD_compressContinue_public(cctx, dst, dstCapacity, src, srcSize); +} + +static size_t ZSTD_getBlockSize_deprecated(const ZSTD_CCtx* cctx) +{ + ZSTD_compressionParameters const cParams = cctx->appliedParams.cParams; + assert(!ZSTD_checkCParams(cParams)); + return MIN(cctx->appliedParams.maxBlockSize, (size_t)1 << cParams.windowLog); +} + +/* NOTE: Must just wrap ZSTD_getBlockSize_deprecated() */ +size_t ZSTD_getBlockSize(const ZSTD_CCtx* cctx) +{ + return ZSTD_getBlockSize_deprecated(cctx); +} + +/* NOTE: Must just wrap ZSTD_compressBlock_deprecated() */ +size_t ZSTD_compressBlock_deprecated(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) +{ + DEBUGLOG(5, "ZSTD_compressBlock: srcSize = %u", (unsigned)srcSize); + { size_t const blockSizeMax = ZSTD_getBlockSize_deprecated(cctx); + RETURN_ERROR_IF(srcSize > blockSizeMax, srcSize_wrong, "input is larger than a block"); } + + return ZSTD_compressContinue_internal(cctx, dst, dstCapacity, src, srcSize, 0 /* frame mode */, 0 /* last chunk */); +} + +/* NOTE: Must just wrap ZSTD_compressBlock_deprecated() */ +size_t ZSTD_compressBlock(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) +{ + return ZSTD_compressBlock_deprecated(cctx, dst, dstCapacity, src, srcSize); +} + +/*! ZSTD_loadDictionaryContent() : + * @return : 0, or an error code + */ +static size_t +ZSTD_loadDictionaryContent(ZSTD_MatchState_t* ms, + ldmState_t* ls, + ZSTD_cwksp* ws, + ZSTD_CCtx_params const* params, + const void* src, size_t srcSize, + ZSTD_dictTableLoadMethod_e dtlm, + ZSTD_tableFillPurpose_e tfp) +{ + const BYTE* ip = (const BYTE*) src; + const BYTE* const iend = ip + srcSize; + int const loadLdmDict = params->ldmParams.enableLdm == ZSTD_ps_enable && ls != NULL; + + /* Assert that the ms params match the params we're being given */ + ZSTD_assertEqualCParams(params->cParams, ms->cParams); + + { /* Ensure large dictionaries can't cause index overflow */ + + /* Allow the dictionary to set indices up to exactly ZSTD_CURRENT_MAX. + * Dictionaries right at the edge will immediately trigger overflow + * correction, but I don't want to insert extra constraints here. + */ + U32 maxDictSize = ZSTD_CURRENT_MAX - ZSTD_WINDOW_START_INDEX; + + int const CDictTaggedIndices = ZSTD_CDictIndicesAreTagged(¶ms->cParams); + if (CDictTaggedIndices && tfp == ZSTD_tfp_forCDict) { + /* Some dictionary matchfinders in zstd use "short cache", + * which treats the lower ZSTD_SHORT_CACHE_TAG_BITS of each + * CDict hashtable entry as a tag rather than as part of an index. + * When short cache is used, we need to truncate the dictionary + * so that its indices don't overlap with the tag. */ + U32 const shortCacheMaxDictSize = (1u << (32 - ZSTD_SHORT_CACHE_TAG_BITS)) - ZSTD_WINDOW_START_INDEX; + maxDictSize = MIN(maxDictSize, shortCacheMaxDictSize); + assert(!loadLdmDict); + } + + /* If the dictionary is too large, only load the suffix of the dictionary. */ + if (srcSize > maxDictSize) { + ip = iend - maxDictSize; + src = ip; + srcSize = maxDictSize; + } + } + + if (srcSize > ZSTD_CHUNKSIZE_MAX) { + /* We must have cleared our windows when our source is this large. */ + assert(ZSTD_window_isEmpty(ms->window)); + if (loadLdmDict) assert(ZSTD_window_isEmpty(ls->window)); + } + ZSTD_window_update(&ms->window, src, srcSize, /* forceNonContiguous */ 0); + + DEBUGLOG(4, "ZSTD_loadDictionaryContent: useRowMatchFinder=%d", (int)params->useRowMatchFinder); + + if (loadLdmDict) { /* Load the entire dict into LDM matchfinders. */ + DEBUGLOG(4, "ZSTD_loadDictionaryContent: Trigger loadLdmDict"); + ZSTD_window_update(&ls->window, src, srcSize, /* forceNonContiguous */ 0); + ls->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ls->window.base); + ZSTD_ldm_fillHashTable(ls, ip, iend, ¶ms->ldmParams); + DEBUGLOG(4, "ZSTD_loadDictionaryContent: ZSTD_ldm_fillHashTable completes"); + } + + /* If the dict is larger than we can reasonably index in our tables, only load the suffix. */ + { U32 maxDictSize = 1U << MIN(MAX(params->cParams.hashLog + 3, params->cParams.chainLog + 1), 31); + if (srcSize > maxDictSize) { + ip = iend - maxDictSize; + src = ip; + srcSize = maxDictSize; + } + } + + ms->nextToUpdate = (U32)(ip - ms->window.base); + ms->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ms->window.base); + ms->forceNonContiguous = params->deterministicRefPrefix; + + if (srcSize <= HASH_READ_SIZE) return 0; + + ZSTD_overflowCorrectIfNeeded(ms, ws, params, ip, iend); + + switch(params->cParams.strategy) + { + case ZSTD_fast: + ZSTD_fillHashTable(ms, iend, dtlm, tfp); + break; + case ZSTD_dfast: +#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR + ZSTD_fillDoubleHashTable(ms, iend, dtlm, tfp); +#else + assert(0); /* shouldn't be called: cparams should've been adjusted. */ +#endif + break; + + case ZSTD_greedy: + case ZSTD_lazy: + case ZSTD_lazy2: +#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) + assert(srcSize >= HASH_READ_SIZE); + if (ms->dedicatedDictSearch) { + assert(ms->chainTable != NULL); + ZSTD_dedicatedDictSearch_lazy_loadDictionary(ms, iend-HASH_READ_SIZE); + } else { + assert(params->useRowMatchFinder != ZSTD_ps_auto); + if (params->useRowMatchFinder == ZSTD_ps_enable) { + size_t const tagTableSize = ((size_t)1 << params->cParams.hashLog); + ZSTD_memset(ms->tagTable, 0, tagTableSize); + ZSTD_row_update(ms, iend-HASH_READ_SIZE); + DEBUGLOG(4, "Using row-based hash table for lazy dict"); + } else { + ZSTD_insertAndFindFirstIndex(ms, iend-HASH_READ_SIZE); + DEBUGLOG(4, "Using chain-based hash table for lazy dict"); + } + } +#else + assert(0); /* shouldn't be called: cparams should've been adjusted. */ +#endif + break; + + case ZSTD_btlazy2: /* we want the dictionary table fully sorted */ + case ZSTD_btopt: + case ZSTD_btultra: + case ZSTD_btultra2: +#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) + assert(srcSize >= HASH_READ_SIZE); + DEBUGLOG(4, "Fill %u bytes into the Binary Tree", (unsigned)srcSize); + ZSTD_updateTree(ms, iend-HASH_READ_SIZE, iend); +#else + assert(0); /* shouldn't be called: cparams should've been adjusted. */ +#endif + break; + + default: + assert(0); /* not possible : not a valid strategy id */ + } + + ms->nextToUpdate = (U32)(iend - ms->window.base); + return 0; +} + + +/* Dictionaries that assign zero probability to symbols that show up causes problems + * when FSE encoding. Mark dictionaries with zero probability symbols as FSE_repeat_check + * and only dictionaries with 100% valid symbols can be assumed valid. + */ +static FSE_repeat ZSTD_dictNCountRepeat(short* normalizedCounter, unsigned dictMaxSymbolValue, unsigned maxSymbolValue) +{ + U32 s; + if (dictMaxSymbolValue < maxSymbolValue) { + return FSE_repeat_check; + } + for (s = 0; s <= maxSymbolValue; ++s) { + if (normalizedCounter[s] == 0) { + return FSE_repeat_check; + } + } + return FSE_repeat_valid; +} + +size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace, + const void* const dict, size_t dictSize) +{ + short offcodeNCount[MaxOff+1]; + unsigned offcodeMaxValue = MaxOff; + const BYTE* dictPtr = (const BYTE*)dict; /* skip magic num and dict ID */ + const BYTE* const dictEnd = dictPtr + dictSize; + dictPtr += 8; + bs->entropy.huf.repeatMode = HUF_repeat_check; + + { unsigned maxSymbolValue = 255; + unsigned hasZeroWeights = 1; + size_t const hufHeaderSize = HUF_readCTable((HUF_CElt*)bs->entropy.huf.CTable, &maxSymbolValue, dictPtr, + (size_t)(dictEnd-dictPtr), &hasZeroWeights); + + /* We only set the loaded table as valid if it contains all non-zero + * weights. Otherwise, we set it to check */ + if (!hasZeroWeights && maxSymbolValue == 255) + bs->entropy.huf.repeatMode = HUF_repeat_valid; + + RETURN_ERROR_IF(HUF_isError(hufHeaderSize), dictionary_corrupted, ""); + dictPtr += hufHeaderSize; + } + + { unsigned offcodeLog; + size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, (size_t)(dictEnd-dictPtr)); + RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted, ""); + /* fill all offset symbols to avoid garbage at end of table */ + RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( + bs->entropy.fse.offcodeCTable, + offcodeNCount, MaxOff, offcodeLog, + workspace, HUF_WORKSPACE_SIZE)), + dictionary_corrupted, ""); + /* Defer checking offcodeMaxValue because we need to know the size of the dictionary content */ + dictPtr += offcodeHeaderSize; + } + + { short matchlengthNCount[MaxML+1]; + unsigned matchlengthMaxValue = MaxML, matchlengthLog; + size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); + RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted, ""); + RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( + bs->entropy.fse.matchlengthCTable, + matchlengthNCount, matchlengthMaxValue, matchlengthLog, + workspace, HUF_WORKSPACE_SIZE)), + dictionary_corrupted, ""); + bs->entropy.fse.matchlength_repeatMode = ZSTD_dictNCountRepeat(matchlengthNCount, matchlengthMaxValue, MaxML); + dictPtr += matchlengthHeaderSize; + } + + { short litlengthNCount[MaxLL+1]; + unsigned litlengthMaxValue = MaxLL, litlengthLog; + size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); + RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted, ""); + RETURN_ERROR_IF(FSE_isError(FSE_buildCTable_wksp( + bs->entropy.fse.litlengthCTable, + litlengthNCount, litlengthMaxValue, litlengthLog, + workspace, HUF_WORKSPACE_SIZE)), + dictionary_corrupted, ""); + bs->entropy.fse.litlength_repeatMode = ZSTD_dictNCountRepeat(litlengthNCount, litlengthMaxValue, MaxLL); + dictPtr += litlengthHeaderSize; + } + + RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted, ""); + bs->rep[0] = MEM_readLE32(dictPtr+0); + bs->rep[1] = MEM_readLE32(dictPtr+4); + bs->rep[2] = MEM_readLE32(dictPtr+8); + dictPtr += 12; + + { size_t const dictContentSize = (size_t)(dictEnd - dictPtr); + U32 offcodeMax = MaxOff; + if (dictContentSize <= ((U32)-1) - 128 KB) { + U32 const maxOffset = (U32)dictContentSize + 128 KB; /* The maximum offset that must be supported */ + offcodeMax = ZSTD_highbit32(maxOffset); /* Calculate minimum offset code required to represent maxOffset */ + } + /* All offset values <= dictContentSize + 128 KB must be representable for a valid table */ + bs->entropy.fse.offcode_repeatMode = ZSTD_dictNCountRepeat(offcodeNCount, offcodeMaxValue, MIN(offcodeMax, MaxOff)); + + /* All repCodes must be <= dictContentSize and != 0 */ + { U32 u; + for (u=0; u<3; u++) { + RETURN_ERROR_IF(bs->rep[u] == 0, dictionary_corrupted, ""); + RETURN_ERROR_IF(bs->rep[u] > dictContentSize, dictionary_corrupted, ""); + } } } + + return (size_t)(dictPtr - (const BYTE*)dict); +} + +/* Dictionary format : + * See : + * https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#dictionary-format + */ +/*! ZSTD_loadZstdDictionary() : + * @return : dictID, or an error code + * assumptions : magic number supposed already checked + * dictSize supposed >= 8 + */ +static size_t ZSTD_loadZstdDictionary(ZSTD_compressedBlockState_t* bs, + ZSTD_MatchState_t* ms, + ZSTD_cwksp* ws, + ZSTD_CCtx_params const* params, + const void* dict, size_t dictSize, + ZSTD_dictTableLoadMethod_e dtlm, + ZSTD_tableFillPurpose_e tfp, + void* workspace) +{ + const BYTE* dictPtr = (const BYTE*)dict; + const BYTE* const dictEnd = dictPtr + dictSize; + size_t dictID; + size_t eSize; + ZSTD_STATIC_ASSERT(HUF_WORKSPACE_SIZE >= (1<= 8); + assert(MEM_readLE32(dictPtr) == ZSTD_MAGIC_DICTIONARY); + + dictID = params->fParams.noDictIDFlag ? 0 : MEM_readLE32(dictPtr + 4 /* skip magic number */ ); + eSize = ZSTD_loadCEntropy(bs, workspace, dict, dictSize); + FORWARD_IF_ERROR(eSize, "ZSTD_loadCEntropy failed"); + dictPtr += eSize; + + { + size_t const dictContentSize = (size_t)(dictEnd - dictPtr); + FORWARD_IF_ERROR(ZSTD_loadDictionaryContent( + ms, NULL, ws, params, dictPtr, dictContentSize, dtlm, tfp), ""); + } + return dictID; +} + +/** ZSTD_compress_insertDictionary() : +* @return : dictID, or an error code */ +static size_t +ZSTD_compress_insertDictionary(ZSTD_compressedBlockState_t* bs, + ZSTD_MatchState_t* ms, + ldmState_t* ls, + ZSTD_cwksp* ws, + const ZSTD_CCtx_params* params, + const void* dict, size_t dictSize, + ZSTD_dictContentType_e dictContentType, + ZSTD_dictTableLoadMethod_e dtlm, + ZSTD_tableFillPurpose_e tfp, + void* workspace) +{ + DEBUGLOG(4, "ZSTD_compress_insertDictionary (dictSize=%u)", (U32)dictSize); + if ((dict==NULL) || (dictSize<8)) { + RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong, ""); + return 0; + } + + ZSTD_reset_compressedBlockState(bs); + + /* dict restricted modes */ + if (dictContentType == ZSTD_dct_rawContent) + return ZSTD_loadDictionaryContent(ms, ls, ws, params, dict, dictSize, dtlm, tfp); + + if (MEM_readLE32(dict) != ZSTD_MAGIC_DICTIONARY) { + if (dictContentType == ZSTD_dct_auto) { + DEBUGLOG(4, "raw content dictionary detected"); + return ZSTD_loadDictionaryContent( + ms, ls, ws, params, dict, dictSize, dtlm, tfp); + } + RETURN_ERROR_IF(dictContentType == ZSTD_dct_fullDict, dictionary_wrong, ""); + assert(0); /* impossible */ + } + + /* dict as full zstd dictionary */ + return ZSTD_loadZstdDictionary( + bs, ms, ws, params, dict, dictSize, dtlm, tfp, workspace); +} + +#define ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF (128 KB) +#define ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER (6ULL) + +/*! ZSTD_compressBegin_internal() : + * Assumption : either @dict OR @cdict (or none) is non-NULL, never both + * @return : 0, or an error code */ +static size_t ZSTD_compressBegin_internal(ZSTD_CCtx* cctx, + const void* dict, size_t dictSize, + ZSTD_dictContentType_e dictContentType, + ZSTD_dictTableLoadMethod_e dtlm, + const ZSTD_CDict* cdict, + const ZSTD_CCtx_params* params, U64 pledgedSrcSize, + ZSTD_buffered_policy_e zbuff) +{ + size_t const dictContentSize = cdict ? cdict->dictContentSize : dictSize; +#if ZSTD_TRACE + cctx->traceCtx = (ZSTD_trace_compress_begin != NULL) ? ZSTD_trace_compress_begin(cctx) : 0; +#endif + DEBUGLOG(4, "ZSTD_compressBegin_internal: wlog=%u", params->cParams.windowLog); + /* params are supposed to be fully validated at this point */ + assert(!ZSTD_isError(ZSTD_checkCParams(params->cParams))); + assert(!((dict) && (cdict))); /* either dict or cdict, not both */ + if ( (cdict) + && (cdict->dictContentSize > 0) + && ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF + || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER + || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN + || cdict->compressionLevel == 0) + && (params->attachDictPref != ZSTD_dictForceLoad) ) { + return ZSTD_resetCCtx_usingCDict(cctx, cdict, params, pledgedSrcSize, zbuff); + } + + FORWARD_IF_ERROR( ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize, + dictContentSize, + ZSTDcrp_makeClean, zbuff) , ""); + { size_t const dictID = cdict ? + ZSTD_compress_insertDictionary( + cctx->blockState.prevCBlock, &cctx->blockState.matchState, + &cctx->ldmState, &cctx->workspace, &cctx->appliedParams, cdict->dictContent, + cdict->dictContentSize, cdict->dictContentType, dtlm, + ZSTD_tfp_forCCtx, cctx->tmpWorkspace) + : ZSTD_compress_insertDictionary( + cctx->blockState.prevCBlock, &cctx->blockState.matchState, + &cctx->ldmState, &cctx->workspace, &cctx->appliedParams, dict, dictSize, + dictContentType, dtlm, ZSTD_tfp_forCCtx, cctx->tmpWorkspace); + FORWARD_IF_ERROR(dictID, "ZSTD_compress_insertDictionary failed"); + assert(dictID <= UINT_MAX); + cctx->dictID = (U32)dictID; + cctx->dictContentSize = dictContentSize; + } + return 0; +} + +size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx* cctx, + const void* dict, size_t dictSize, + ZSTD_dictContentType_e dictContentType, + ZSTD_dictTableLoadMethod_e dtlm, + const ZSTD_CDict* cdict, + const ZSTD_CCtx_params* params, + unsigned long long pledgedSrcSize) +{ + DEBUGLOG(4, "ZSTD_compressBegin_advanced_internal: wlog=%u", params->cParams.windowLog); + /* compression parameters verification and optimization */ + FORWARD_IF_ERROR( ZSTD_checkCParams(params->cParams) , ""); + return ZSTD_compressBegin_internal(cctx, + dict, dictSize, dictContentType, dtlm, + cdict, + params, pledgedSrcSize, + ZSTDb_not_buffered); +} + +/*! ZSTD_compressBegin_advanced() : +* @return : 0, or an error code */ +size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, + const void* dict, size_t dictSize, + ZSTD_parameters params, unsigned long long pledgedSrcSize) +{ + ZSTD_CCtx_params cctxParams; + ZSTD_CCtxParams_init_internal(&cctxParams, ¶ms, ZSTD_NO_CLEVEL); + return ZSTD_compressBegin_advanced_internal(cctx, + dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, + NULL /*cdict*/, + &cctxParams, pledgedSrcSize); +} + +static size_t +ZSTD_compressBegin_usingDict_deprecated(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel) +{ + ZSTD_CCtx_params cctxParams; + { ZSTD_parameters const params = ZSTD_getParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_noAttachDict); + ZSTD_CCtxParams_init_internal(&cctxParams, ¶ms, (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : compressionLevel); + } + DEBUGLOG(4, "ZSTD_compressBegin_usingDict (dictSize=%u)", (unsigned)dictSize); + return ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, NULL, + &cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, ZSTDb_not_buffered); +} + +size_t +ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel) +{ + return ZSTD_compressBegin_usingDict_deprecated(cctx, dict, dictSize, compressionLevel); +} + +size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel) +{ + return ZSTD_compressBegin_usingDict_deprecated(cctx, NULL, 0, compressionLevel); +} + + +/*! ZSTD_writeEpilogue() : +* Ends a frame. +* @return : nb of bytes written into dst (or an error code) */ +static size_t ZSTD_writeEpilogue(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity) +{ + BYTE* const ostart = (BYTE*)dst; + BYTE* op = ostart; + + DEBUGLOG(4, "ZSTD_writeEpilogue"); + RETURN_ERROR_IF(cctx->stage == ZSTDcs_created, stage_wrong, "init missing"); + + /* special case : empty frame */ + if (cctx->stage == ZSTDcs_init) { + size_t fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, &cctx->appliedParams, 0, 0); + FORWARD_IF_ERROR(fhSize, "ZSTD_writeFrameHeader failed"); + dstCapacity -= fhSize; + op += fhSize; + cctx->stage = ZSTDcs_ongoing; + } + + if (cctx->stage != ZSTDcs_ending) { + /* write one last empty block, make it the "last" block */ + U32 const cBlockHeader24 = 1 /* last block */ + (((U32)bt_raw)<<1) + 0; + ZSTD_STATIC_ASSERT(ZSTD_BLOCKHEADERSIZE == 3); + RETURN_ERROR_IF(dstCapacity<3, dstSize_tooSmall, "no room for epilogue"); + MEM_writeLE24(op, cBlockHeader24); + op += ZSTD_blockHeaderSize; + dstCapacity -= ZSTD_blockHeaderSize; + } + + if (cctx->appliedParams.fParams.checksumFlag) { + U32 const checksum = (U32) XXH64_digest(&cctx->xxhState); + RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "no room for checksum"); + DEBUGLOG(4, "ZSTD_writeEpilogue: write checksum : %08X", (unsigned)checksum); + MEM_writeLE32(op, checksum); + op += 4; + } + + cctx->stage = ZSTDcs_created; /* return to "created but no init" status */ + return (size_t)(op-ostart); +} + +void ZSTD_CCtx_trace(ZSTD_CCtx* cctx, size_t extraCSize) +{ +#if ZSTD_TRACE + if (cctx->traceCtx && ZSTD_trace_compress_end != NULL) { + int const streaming = cctx->inBuffSize > 0 || cctx->outBuffSize > 0 || cctx->appliedParams.nbWorkers > 0; + ZSTD_Trace trace; + ZSTD_memset(&trace, 0, sizeof(trace)); + trace.version = ZSTD_VERSION_NUMBER; + trace.streaming = streaming; + trace.dictionaryID = cctx->dictID; + trace.dictionarySize = cctx->dictContentSize; + trace.uncompressedSize = cctx->consumedSrcSize; + trace.compressedSize = cctx->producedCSize + extraCSize; + trace.params = &cctx->appliedParams; + trace.cctx = cctx; + ZSTD_trace_compress_end(cctx->traceCtx, &trace); + } + cctx->traceCtx = 0; +#else + (void)cctx; + (void)extraCSize; +#endif +} + +size_t ZSTD_compressEnd_public(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + size_t endResult; + size_t const cSize = ZSTD_compressContinue_internal(cctx, + dst, dstCapacity, src, srcSize, + 1 /* frame mode */, 1 /* last chunk */); + FORWARD_IF_ERROR(cSize, "ZSTD_compressContinue_internal failed"); + endResult = ZSTD_writeEpilogue(cctx, (char*)dst + cSize, dstCapacity-cSize); + FORWARD_IF_ERROR(endResult, "ZSTD_writeEpilogue failed"); + assert(!(cctx->appliedParams.fParams.contentSizeFlag && cctx->pledgedSrcSizePlusOne == 0)); + if (cctx->pledgedSrcSizePlusOne != 0) { /* control src size */ + ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN == (unsigned long long)-1); + DEBUGLOG(4, "end of frame : controlling src size"); + RETURN_ERROR_IF( + cctx->pledgedSrcSizePlusOne != cctx->consumedSrcSize+1, + srcSize_wrong, + "error : pledgedSrcSize = %u, while realSrcSize = %u", + (unsigned)cctx->pledgedSrcSizePlusOne-1, + (unsigned)cctx->consumedSrcSize); + } + ZSTD_CCtx_trace(cctx, endResult); + return cSize + endResult; +} + +/* NOTE: Must just wrap ZSTD_compressEnd_public() */ +size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + return ZSTD_compressEnd_public(cctx, dst, dstCapacity, src, srcSize); +} + +size_t ZSTD_compress_advanced (ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const void* dict,size_t dictSize, + ZSTD_parameters params) +{ + DEBUGLOG(4, "ZSTD_compress_advanced"); + FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams), ""); + ZSTD_CCtxParams_init_internal(&cctx->simpleApiParams, ¶ms, ZSTD_NO_CLEVEL); + return ZSTD_compress_advanced_internal(cctx, + dst, dstCapacity, + src, srcSize, + dict, dictSize, + &cctx->simpleApiParams); +} + +/* Internal */ +size_t ZSTD_compress_advanced_internal( + ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const void* dict,size_t dictSize, + const ZSTD_CCtx_params* params) +{ + DEBUGLOG(4, "ZSTD_compress_advanced_internal (srcSize:%u)", (unsigned)srcSize); + FORWARD_IF_ERROR( ZSTD_compressBegin_internal(cctx, + dict, dictSize, ZSTD_dct_auto, ZSTD_dtlm_fast, NULL, + params, srcSize, ZSTDb_not_buffered) , ""); + return ZSTD_compressEnd_public(cctx, dst, dstCapacity, src, srcSize); +} + +size_t ZSTD_compress_usingDict(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const void* dict, size_t dictSize, + int compressionLevel) +{ + { + ZSTD_parameters const params = ZSTD_getParams_internal(compressionLevel, srcSize, dict ? dictSize : 0, ZSTD_cpm_noAttachDict); + assert(params.fParams.contentSizeFlag == 1); + ZSTD_CCtxParams_init_internal(&cctx->simpleApiParams, ¶ms, (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT: compressionLevel); + } + DEBUGLOG(4, "ZSTD_compress_usingDict (srcSize=%u)", (unsigned)srcSize); + return ZSTD_compress_advanced_internal(cctx, dst, dstCapacity, src, srcSize, dict, dictSize, &cctx->simpleApiParams); +} + +size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + int compressionLevel) +{ + DEBUGLOG(4, "ZSTD_compressCCtx (srcSize=%u)", (unsigned)srcSize); + assert(cctx != NULL); + return ZSTD_compress_usingDict(cctx, dst, dstCapacity, src, srcSize, NULL, 0, compressionLevel); +} + +size_t ZSTD_compress(void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + int compressionLevel) +{ + size_t result; +#if ZSTD_COMPRESS_HEAPMODE + ZSTD_CCtx* cctx = ZSTD_createCCtx(); + RETURN_ERROR_IF(!cctx, memory_allocation, "ZSTD_createCCtx failed"); + result = ZSTD_compressCCtx(cctx, dst, dstCapacity, src, srcSize, compressionLevel); + ZSTD_freeCCtx(cctx); +#else + ZSTD_CCtx ctxBody; + ZSTD_initCCtx(&ctxBody, ZSTD_defaultCMem); + result = ZSTD_compressCCtx(&ctxBody, dst, dstCapacity, src, srcSize, compressionLevel); + ZSTD_freeCCtxContent(&ctxBody); /* can't free ctxBody itself, as it's on stack; free only heap content */ +#endif + return result; +} + + +/* ===== Dictionary API ===== */ + +/*! ZSTD_estimateCDictSize_advanced() : + * Estimate amount of memory that will be needed to create a dictionary with following arguments */ +size_t ZSTD_estimateCDictSize_advanced( + size_t dictSize, ZSTD_compressionParameters cParams, + ZSTD_dictLoadMethod_e dictLoadMethod) +{ + DEBUGLOG(5, "sizeof(ZSTD_CDict) : %u", (unsigned)sizeof(ZSTD_CDict)); + return ZSTD_cwksp_alloc_size(sizeof(ZSTD_CDict)) + + ZSTD_cwksp_alloc_size(HUF_WORKSPACE_SIZE) + /* enableDedicatedDictSearch == 1 ensures that CDict estimation will not be too small + * in case we are using DDS with row-hash. */ + + ZSTD_sizeof_matchState(&cParams, ZSTD_resolveRowMatchFinderMode(ZSTD_ps_auto, &cParams), + /* enableDedicatedDictSearch */ 1, /* forCCtx */ 0) + + (dictLoadMethod == ZSTD_dlm_byRef ? 0 + : ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(dictSize, sizeof(void *)))); +} + +size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel) +{ + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); + return ZSTD_estimateCDictSize_advanced(dictSize, cParams, ZSTD_dlm_byCopy); +} + +size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict) +{ + if (cdict==NULL) return 0; /* support sizeof on NULL */ + DEBUGLOG(5, "sizeof(*cdict) : %u", (unsigned)sizeof(*cdict)); + /* cdict may be in the workspace */ + return (cdict->workspace.workspace == cdict ? 0 : sizeof(*cdict)) + + ZSTD_cwksp_sizeof(&cdict->workspace); +} + +static size_t ZSTD_initCDict_internal( + ZSTD_CDict* cdict, + const void* dictBuffer, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType, + ZSTD_CCtx_params params) +{ + DEBUGLOG(3, "ZSTD_initCDict_internal (dictContentType:%u)", (unsigned)dictContentType); + assert(!ZSTD_checkCParams(params.cParams)); + cdict->matchState.cParams = params.cParams; + cdict->matchState.dedicatedDictSearch = params.enableDedicatedDictSearch; + if ((dictLoadMethod == ZSTD_dlm_byRef) || (!dictBuffer) || (!dictSize)) { + cdict->dictContent = dictBuffer; + } else { + void *internalBuffer = ZSTD_cwksp_reserve_object(&cdict->workspace, ZSTD_cwksp_align(dictSize, sizeof(void*))); + RETURN_ERROR_IF(!internalBuffer, memory_allocation, "NULL pointer!"); + cdict->dictContent = internalBuffer; + ZSTD_memcpy(internalBuffer, dictBuffer, dictSize); + } + cdict->dictContentSize = dictSize; + cdict->dictContentType = dictContentType; + + cdict->entropyWorkspace = (U32*)ZSTD_cwksp_reserve_object(&cdict->workspace, HUF_WORKSPACE_SIZE); + + + /* Reset the state to no dictionary */ + ZSTD_reset_compressedBlockState(&cdict->cBlockState); + FORWARD_IF_ERROR(ZSTD_reset_matchState( + &cdict->matchState, + &cdict->workspace, + ¶ms.cParams, + params.useRowMatchFinder, + ZSTDcrp_makeClean, + ZSTDirp_reset, + ZSTD_resetTarget_CDict), ""); + /* (Maybe) load the dictionary + * Skips loading the dictionary if it is < 8 bytes. + */ + { params.compressionLevel = ZSTD_CLEVEL_DEFAULT; + params.fParams.contentSizeFlag = 1; + { size_t const dictID = ZSTD_compress_insertDictionary( + &cdict->cBlockState, &cdict->matchState, NULL, &cdict->workspace, + ¶ms, cdict->dictContent, cdict->dictContentSize, + dictContentType, ZSTD_dtlm_full, ZSTD_tfp_forCDict, cdict->entropyWorkspace); + FORWARD_IF_ERROR(dictID, "ZSTD_compress_insertDictionary failed"); + assert(dictID <= (size_t)(U32)-1); + cdict->dictID = (U32)dictID; + } + } + + return 0; +} + +static ZSTD_CDict* +ZSTD_createCDict_advanced_internal(size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_compressionParameters cParams, + ZSTD_ParamSwitch_e useRowMatchFinder, + int enableDedicatedDictSearch, + ZSTD_customMem customMem) +{ + if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; + DEBUGLOG(3, "ZSTD_createCDict_advanced_internal (dictSize=%u)", (unsigned)dictSize); + + { size_t const workspaceSize = + ZSTD_cwksp_alloc_size(sizeof(ZSTD_CDict)) + + ZSTD_cwksp_alloc_size(HUF_WORKSPACE_SIZE) + + ZSTD_sizeof_matchState(&cParams, useRowMatchFinder, enableDedicatedDictSearch, /* forCCtx */ 0) + + (dictLoadMethod == ZSTD_dlm_byRef ? 0 + : ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(dictSize, sizeof(void*)))); + void* const workspace = ZSTD_customMalloc(workspaceSize, customMem); + ZSTD_cwksp ws; + ZSTD_CDict* cdict; + + if (!workspace) { + ZSTD_customFree(workspace, customMem); + return NULL; + } + + ZSTD_cwksp_init(&ws, workspace, workspaceSize, ZSTD_cwksp_dynamic_alloc); + + cdict = (ZSTD_CDict*)ZSTD_cwksp_reserve_object(&ws, sizeof(ZSTD_CDict)); + assert(cdict != NULL); + ZSTD_cwksp_move(&cdict->workspace, &ws); + cdict->customMem = customMem; + cdict->compressionLevel = ZSTD_NO_CLEVEL; /* signals advanced API usage */ + cdict->useRowMatchFinder = useRowMatchFinder; + return cdict; + } +} + +ZSTD_CDict* ZSTD_createCDict_advanced(const void* dictBuffer, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType, + ZSTD_compressionParameters cParams, + ZSTD_customMem customMem) +{ + ZSTD_CCtx_params cctxParams; + ZSTD_memset(&cctxParams, 0, sizeof(cctxParams)); + DEBUGLOG(3, "ZSTD_createCDict_advanced, dictSize=%u, mode=%u", (unsigned)dictSize, (unsigned)dictContentType); + ZSTD_CCtxParams_init(&cctxParams, 0); + cctxParams.cParams = cParams; + cctxParams.customMem = customMem; + return ZSTD_createCDict_advanced2( + dictBuffer, dictSize, + dictLoadMethod, dictContentType, + &cctxParams, customMem); +} + +ZSTD_CDict* ZSTD_createCDict_advanced2( + const void* dict, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType, + const ZSTD_CCtx_params* originalCctxParams, + ZSTD_customMem customMem) +{ + ZSTD_CCtx_params cctxParams = *originalCctxParams; + ZSTD_compressionParameters cParams; + ZSTD_CDict* cdict; + + DEBUGLOG(3, "ZSTD_createCDict_advanced2, dictSize=%u, mode=%u", (unsigned)dictSize, (unsigned)dictContentType); + if (!customMem.customAlloc ^ !customMem.customFree) return NULL; + + if (cctxParams.enableDedicatedDictSearch) { + cParams = ZSTD_dedicatedDictSearch_getCParams( + cctxParams.compressionLevel, dictSize); + ZSTD_overrideCParams(&cParams, &cctxParams.cParams); + } else { + cParams = ZSTD_getCParamsFromCCtxParams( + &cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); + } + + if (!ZSTD_dedicatedDictSearch_isSupported(&cParams)) { + /* Fall back to non-DDSS params */ + cctxParams.enableDedicatedDictSearch = 0; + cParams = ZSTD_getCParamsFromCCtxParams( + &cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); + } + + DEBUGLOG(3, "ZSTD_createCDict_advanced2: DedicatedDictSearch=%u", cctxParams.enableDedicatedDictSearch); + cctxParams.cParams = cParams; + cctxParams.useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(cctxParams.useRowMatchFinder, &cParams); + + cdict = ZSTD_createCDict_advanced_internal(dictSize, + dictLoadMethod, cctxParams.cParams, + cctxParams.useRowMatchFinder, cctxParams.enableDedicatedDictSearch, + customMem); + + if (!cdict || ZSTD_isError( ZSTD_initCDict_internal(cdict, + dict, dictSize, + dictLoadMethod, dictContentType, + cctxParams) )) { + ZSTD_freeCDict(cdict); + return NULL; + } + + return cdict; +} + +ZSTD_CDict* ZSTD_createCDict(const void* dict, size_t dictSize, int compressionLevel) +{ + ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); + ZSTD_CDict* const cdict = ZSTD_createCDict_advanced(dict, dictSize, + ZSTD_dlm_byCopy, ZSTD_dct_auto, + cParams, ZSTD_defaultCMem); + if (cdict) + cdict->compressionLevel = (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : compressionLevel; + return cdict; +} + +ZSTD_CDict* ZSTD_createCDict_byReference(const void* dict, size_t dictSize, int compressionLevel) +{ + ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN, dictSize, ZSTD_cpm_createCDict); + ZSTD_CDict* const cdict = ZSTD_createCDict_advanced(dict, dictSize, + ZSTD_dlm_byRef, ZSTD_dct_auto, + cParams, ZSTD_defaultCMem); + if (cdict) + cdict->compressionLevel = (compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : compressionLevel; + return cdict; +} + +size_t ZSTD_freeCDict(ZSTD_CDict* cdict) +{ + if (cdict==NULL) return 0; /* support free on NULL */ + { ZSTD_customMem const cMem = cdict->customMem; + int cdictInWorkspace = ZSTD_cwksp_owns_buffer(&cdict->workspace, cdict); + ZSTD_cwksp_free(&cdict->workspace, cMem); + if (!cdictInWorkspace) { + ZSTD_customFree(cdict, cMem); + } + return 0; + } +} + +/*! ZSTD_initStaticCDict_advanced() : + * Generate a digested dictionary in provided memory area. + * workspace: The memory area to emplace the dictionary into. + * Provided pointer must 8-bytes aligned. + * It must outlive dictionary usage. + * workspaceSize: Use ZSTD_estimateCDictSize() + * to determine how large workspace must be. + * cParams : use ZSTD_getCParams() to transform a compression level + * into its relevant cParams. + * @return : pointer to ZSTD_CDict*, or NULL if error (size too small) + * Note : there is no corresponding "free" function. + * Since workspace was allocated externally, it must be freed externally. + */ +const ZSTD_CDict* ZSTD_initStaticCDict( + void* workspace, size_t workspaceSize, + const void* dict, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType, + ZSTD_compressionParameters cParams) +{ + ZSTD_ParamSwitch_e const useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(ZSTD_ps_auto, &cParams); + /* enableDedicatedDictSearch == 1 ensures matchstate is not too small in case this CDict will be used for DDS + row hash */ + size_t const matchStateSize = ZSTD_sizeof_matchState(&cParams, useRowMatchFinder, /* enableDedicatedDictSearch */ 1, /* forCCtx */ 0); + size_t const neededSize = ZSTD_cwksp_alloc_size(sizeof(ZSTD_CDict)) + + (dictLoadMethod == ZSTD_dlm_byRef ? 0 + : ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(dictSize, sizeof(void*)))) + + ZSTD_cwksp_alloc_size(HUF_WORKSPACE_SIZE) + + matchStateSize; + ZSTD_CDict* cdict; + ZSTD_CCtx_params params; + + DEBUGLOG(4, "ZSTD_initStaticCDict (dictSize==%u)", (unsigned)dictSize); + if ((size_t)workspace & 7) return NULL; /* 8-aligned */ + + { + ZSTD_cwksp ws; + ZSTD_cwksp_init(&ws, workspace, workspaceSize, ZSTD_cwksp_static_alloc); + cdict = (ZSTD_CDict*)ZSTD_cwksp_reserve_object(&ws, sizeof(ZSTD_CDict)); + if (cdict == NULL) return NULL; + ZSTD_cwksp_move(&cdict->workspace, &ws); + } + + if (workspaceSize < neededSize) return NULL; + + ZSTD_CCtxParams_init(¶ms, 0); + params.cParams = cParams; + params.useRowMatchFinder = useRowMatchFinder; + cdict->useRowMatchFinder = useRowMatchFinder; + cdict->compressionLevel = ZSTD_NO_CLEVEL; + + if (ZSTD_isError( ZSTD_initCDict_internal(cdict, + dict, dictSize, + dictLoadMethod, dictContentType, + params) )) + return NULL; + + return cdict; +} + +ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict* cdict) +{ + assert(cdict != NULL); + return cdict->matchState.cParams; +} + +/*! ZSTD_getDictID_fromCDict() : + * Provides the dictID of the dictionary loaded into `cdict`. + * If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. + * Non-conformant dictionaries can still be loaded, but as content-only dictionaries. */ +unsigned ZSTD_getDictID_fromCDict(const ZSTD_CDict* cdict) +{ + if (cdict==NULL) return 0; + return cdict->dictID; +} + +/* ZSTD_compressBegin_usingCDict_internal() : + * Implementation of various ZSTD_compressBegin_usingCDict* functions. + */ +static size_t ZSTD_compressBegin_usingCDict_internal( + ZSTD_CCtx* const cctx, const ZSTD_CDict* const cdict, + ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) +{ + ZSTD_CCtx_params cctxParams; + DEBUGLOG(4, "ZSTD_compressBegin_usingCDict_internal"); + RETURN_ERROR_IF(cdict==NULL, dictionary_wrong, "NULL pointer!"); + /* Initialize the cctxParams from the cdict */ + { + ZSTD_parameters params; + params.fParams = fParams; + params.cParams = ( pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_SRCSIZE_CUTOFF + || pledgedSrcSize < cdict->dictContentSize * ZSTD_USE_CDICT_PARAMS_DICTSIZE_MULTIPLIER + || pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN + || cdict->compressionLevel == 0 ) ? + ZSTD_getCParamsFromCDict(cdict) + : ZSTD_getCParams(cdict->compressionLevel, + pledgedSrcSize, + cdict->dictContentSize); + ZSTD_CCtxParams_init_internal(&cctxParams, ¶ms, cdict->compressionLevel); + } + /* Increase window log to fit the entire dictionary and source if the + * source size is known. Limit the increase to 19, which is the + * window log for compression level 1 with the largest source size. + */ + if (pledgedSrcSize != ZSTD_CONTENTSIZE_UNKNOWN) { + U32 const limitedSrcSize = (U32)MIN(pledgedSrcSize, 1U << 19); + U32 const limitedSrcLog = limitedSrcSize > 1 ? ZSTD_highbit32(limitedSrcSize - 1) + 1 : 1; + cctxParams.cParams.windowLog = MAX(cctxParams.cParams.windowLog, limitedSrcLog); + } + return ZSTD_compressBegin_internal(cctx, + NULL, 0, ZSTD_dct_auto, ZSTD_dtlm_fast, + cdict, + &cctxParams, pledgedSrcSize, + ZSTDb_not_buffered); +} + + +/* ZSTD_compressBegin_usingCDict_advanced() : + * This function is DEPRECATED. + * cdict must be != NULL */ +size_t ZSTD_compressBegin_usingCDict_advanced( + ZSTD_CCtx* const cctx, const ZSTD_CDict* const cdict, + ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize) +{ + return ZSTD_compressBegin_usingCDict_internal(cctx, cdict, fParams, pledgedSrcSize); +} + +/* ZSTD_compressBegin_usingCDict() : + * cdict must be != NULL */ +size_t ZSTD_compressBegin_usingCDict_deprecated(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict) +{ + ZSTD_frameParameters const fParams = { 0 /*content*/, 0 /*checksum*/, 0 /*noDictID*/ }; + return ZSTD_compressBegin_usingCDict_internal(cctx, cdict, fParams, ZSTD_CONTENTSIZE_UNKNOWN); +} + +size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict) +{ + return ZSTD_compressBegin_usingCDict_deprecated(cctx, cdict); +} + +/*! ZSTD_compress_usingCDict_internal(): + * Implementation of various ZSTD_compress_usingCDict* functions. + */ +static size_t ZSTD_compress_usingCDict_internal(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const ZSTD_CDict* cdict, ZSTD_frameParameters fParams) +{ + FORWARD_IF_ERROR(ZSTD_compressBegin_usingCDict_internal(cctx, cdict, fParams, srcSize), ""); /* will check if cdict != NULL */ + return ZSTD_compressEnd_public(cctx, dst, dstCapacity, src, srcSize); +} + +/*! ZSTD_compress_usingCDict_advanced(): + * This function is DEPRECATED. + */ +size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const ZSTD_CDict* cdict, ZSTD_frameParameters fParams) +{ + return ZSTD_compress_usingCDict_internal(cctx, dst, dstCapacity, src, srcSize, cdict, fParams); +} + +/*! ZSTD_compress_usingCDict() : + * Compression using a digested Dictionary. + * Faster startup than ZSTD_compress_usingDict(), recommended when same dictionary is used multiple times. + * Note that compression parameters are decided at CDict creation time + * while frame parameters are hardcoded */ +size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const ZSTD_CDict* cdict) +{ + ZSTD_frameParameters const fParams = { 1 /*content*/, 0 /*checksum*/, 0 /*noDictID*/ }; + return ZSTD_compress_usingCDict_internal(cctx, dst, dstCapacity, src, srcSize, cdict, fParams); +} + + + +/* ****************************************************************** +* Streaming +********************************************************************/ + +ZSTD_CStream* ZSTD_createCStream(void) +{ + DEBUGLOG(3, "ZSTD_createCStream"); + return ZSTD_createCStream_advanced(ZSTD_defaultCMem); +} + +ZSTD_CStream* ZSTD_initStaticCStream(void *workspace, size_t workspaceSize) +{ + return ZSTD_initStaticCCtx(workspace, workspaceSize); +} + +ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem) +{ /* CStream and CCtx are now same object */ + return ZSTD_createCCtx_advanced(customMem); +} + +size_t ZSTD_freeCStream(ZSTD_CStream* zcs) +{ + return ZSTD_freeCCtx(zcs); /* same object */ +} + + + +/*====== Initialization ======*/ + +size_t ZSTD_CStreamInSize(void) { return ZSTD_BLOCKSIZE_MAX; } + +size_t ZSTD_CStreamOutSize(void) +{ + return ZSTD_compressBound(ZSTD_BLOCKSIZE_MAX) + ZSTD_blockHeaderSize + 4 /* 32-bits hash */ ; +} + +static ZSTD_CParamMode_e ZSTD_getCParamMode(ZSTD_CDict const* cdict, ZSTD_CCtx_params const* params, U64 pledgedSrcSize) +{ + if (cdict != NULL && ZSTD_shouldAttachDict(cdict, params, pledgedSrcSize)) + return ZSTD_cpm_attachDict; + else + return ZSTD_cpm_noAttachDict; +} + +/* ZSTD_resetCStream(): + * pledgedSrcSize == 0 means "unknown" */ +size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pss) +{ + /* temporary : 0 interpreted as "unknown" during transition period. + * Users willing to specify "unknown" **must** use ZSTD_CONTENTSIZE_UNKNOWN. + * 0 will be interpreted as "empty" in the future. + */ + U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; + DEBUGLOG(4, "ZSTD_resetCStream: pledgedSrcSize = %u", (unsigned)pledgedSrcSize); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); + return 0; +} + +/*! ZSTD_initCStream_internal() : + * Note : for lib/compress only. Used by zstdmt_compress.c. + * Assumption 1 : params are valid + * Assumption 2 : either dict, or cdict, is defined, not both */ +size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs, + const void* dict, size_t dictSize, const ZSTD_CDict* cdict, + const ZSTD_CCtx_params* params, + unsigned long long pledgedSrcSize) +{ + DEBUGLOG(4, "ZSTD_initCStream_internal"); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); + assert(!ZSTD_isError(ZSTD_checkCParams(params->cParams))); + zcs->requestedParams = *params; + assert(!((dict) && (cdict))); /* either dict or cdict, not both */ + if (dict) { + FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); + } else { + /* Dictionary is cleared if !cdict */ + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); + } + return 0; +} + +/* ZSTD_initCStream_usingCDict_advanced() : + * same as ZSTD_initCStream_usingCDict(), with control over frame parameters */ +size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, + const ZSTD_CDict* cdict, + ZSTD_frameParameters fParams, + unsigned long long pledgedSrcSize) +{ + DEBUGLOG(4, "ZSTD_initCStream_usingCDict_advanced"); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); + zcs->requestedParams.fParams = fParams; + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); + return 0; +} + +/* note : cdict must outlive compression session */ +size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict) +{ + DEBUGLOG(4, "ZSTD_initCStream_usingCDict"); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, cdict) , ""); + return 0; +} + + +/* ZSTD_initCStream_advanced() : + * pledgedSrcSize must be exact. + * if srcSize is not known at init time, use value ZSTD_CONTENTSIZE_UNKNOWN. + * dict is loaded with default parameters ZSTD_dct_auto and ZSTD_dlm_byCopy. */ +size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs, + const void* dict, size_t dictSize, + ZSTD_parameters params, unsigned long long pss) +{ + /* for compatibility with older programs relying on this behavior. + * Users should now specify ZSTD_CONTENTSIZE_UNKNOWN. + * This line will be removed in the future. + */ + U64 const pledgedSrcSize = (pss==0 && params.fParams.contentSizeFlag==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; + DEBUGLOG(4, "ZSTD_initCStream_advanced"); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); + FORWARD_IF_ERROR( ZSTD_checkCParams(params.cParams) , ""); + ZSTD_CCtxParams_setZstdParams(&zcs->requestedParams, ¶ms); + FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); + return 0; +} + +size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compressionLevel) +{ + DEBUGLOG(4, "ZSTD_initCStream_usingDict"); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_loadDictionary(zcs, dict, dictSize) , ""); + return 0; +} + +size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigned long long pss) +{ + /* temporary : 0 interpreted as "unknown" during transition period. + * Users willing to specify "unknown" **must** use ZSTD_CONTENTSIZE_UNKNOWN. + * 0 will be interpreted as "empty" in the future. + */ + U64 const pledgedSrcSize = (pss==0) ? ZSTD_CONTENTSIZE_UNKNOWN : pss; + DEBUGLOG(4, "ZSTD_initCStream_srcSize"); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize) , ""); + return 0; +} + +size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel) +{ + DEBUGLOG(4, "ZSTD_initCStream"); + FORWARD_IF_ERROR( ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_refCDict(zcs, NULL) , ""); + FORWARD_IF_ERROR( ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel) , ""); + return 0; +} + +/*====== Compression ======*/ + +static size_t ZSTD_nextInputSizeHint(const ZSTD_CCtx* cctx) +{ + if (cctx->appliedParams.inBufferMode == ZSTD_bm_stable) { + return cctx->blockSizeMax - cctx->stableIn_notConsumed; + } + assert(cctx->appliedParams.inBufferMode == ZSTD_bm_buffered); + { size_t hintInSize = cctx->inBuffTarget - cctx->inBuffPos; + if (hintInSize==0) hintInSize = cctx->blockSizeMax; + return hintInSize; + } +} + +/** ZSTD_compressStream_generic(): + * internal function for all *compressStream*() variants + * @return : hint size for next input to complete ongoing block */ +static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs, + ZSTD_outBuffer* output, + ZSTD_inBuffer* input, + ZSTD_EndDirective const flushMode) +{ + const char* const istart = (assert(input != NULL), (const char*)input->src); + const char* const iend = (istart != NULL) ? istart + input->size : istart; + const char* ip = (istart != NULL) ? istart + input->pos : istart; + char* const ostart = (assert(output != NULL), (char*)output->dst); + char* const oend = (ostart != NULL) ? ostart + output->size : ostart; + char* op = (ostart != NULL) ? ostart + output->pos : ostart; + U32 someMoreWork = 1; + + /* check expectations */ + DEBUGLOG(5, "ZSTD_compressStream_generic, flush=%i, srcSize = %zu", (int)flushMode, input->size - input->pos); + assert(zcs != NULL); + if (zcs->appliedParams.inBufferMode == ZSTD_bm_stable) { + assert(input->pos >= zcs->stableIn_notConsumed); + input->pos -= zcs->stableIn_notConsumed; + if (ip) ip -= zcs->stableIn_notConsumed; + zcs->stableIn_notConsumed = 0; + } + if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) { + assert(zcs->inBuff != NULL); + assert(zcs->inBuffSize > 0); + } + if (zcs->appliedParams.outBufferMode == ZSTD_bm_buffered) { + assert(zcs->outBuff != NULL); + assert(zcs->outBuffSize > 0); + } + if (input->src == NULL) assert(input->size == 0); + assert(input->pos <= input->size); + if (output->dst == NULL) assert(output->size == 0); + assert(output->pos <= output->size); + assert((U32)flushMode <= (U32)ZSTD_e_end); + + while (someMoreWork) { + switch(zcs->streamStage) + { + case zcss_init: + RETURN_ERROR(init_missing, "call ZSTD_initCStream() first!"); + + case zcss_load: + if ( (flushMode == ZSTD_e_end) + && ( (size_t)(oend-op) >= ZSTD_compressBound((size_t)(iend-ip)) /* Enough output space */ + || zcs->appliedParams.outBufferMode == ZSTD_bm_stable) /* OR we are allowed to return dstSizeTooSmall */ + && (zcs->inBuffPos == 0) ) { + /* shortcut to compression pass directly into output buffer */ + size_t const cSize = ZSTD_compressEnd_public(zcs, + op, (size_t)(oend-op), + ip, (size_t)(iend-ip)); + DEBUGLOG(4, "ZSTD_compressEnd : cSize=%u", (unsigned)cSize); + FORWARD_IF_ERROR(cSize, "ZSTD_compressEnd failed"); + ip = iend; + op += cSize; + zcs->frameEnded = 1; + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + someMoreWork = 0; break; + } + /* complete loading into inBuffer in buffered mode */ + if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) { + size_t const toLoad = zcs->inBuffTarget - zcs->inBuffPos; + size_t const loaded = ZSTD_limitCopy( + zcs->inBuff + zcs->inBuffPos, toLoad, + ip, (size_t)(iend-ip)); + zcs->inBuffPos += loaded; + if (ip) ip += loaded; + if ( (flushMode == ZSTD_e_continue) + && (zcs->inBuffPos < zcs->inBuffTarget) ) { + /* not enough input to fill full block : stop here */ + someMoreWork = 0; break; + } + if ( (flushMode == ZSTD_e_flush) + && (zcs->inBuffPos == zcs->inToCompress) ) { + /* empty */ + someMoreWork = 0; break; + } + } else { + assert(zcs->appliedParams.inBufferMode == ZSTD_bm_stable); + if ( (flushMode == ZSTD_e_continue) + && ( (size_t)(iend - ip) < zcs->blockSizeMax) ) { + /* can't compress a full block : stop here */ + zcs->stableIn_notConsumed = (size_t)(iend - ip); + ip = iend; /* pretend to have consumed input */ + someMoreWork = 0; break; + } + if ( (flushMode == ZSTD_e_flush) + && (ip == iend) ) { + /* empty */ + someMoreWork = 0; break; + } + } + /* compress current block (note : this stage cannot be stopped in the middle) */ + DEBUGLOG(5, "stream compression stage (flushMode==%u)", flushMode); + { int const inputBuffered = (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered); + void* cDst; + size_t cSize; + size_t oSize = (size_t)(oend-op); + size_t const iSize = inputBuffered ? zcs->inBuffPos - zcs->inToCompress + : MIN((size_t)(iend - ip), zcs->blockSizeMax); + if (oSize >= ZSTD_compressBound(iSize) || zcs->appliedParams.outBufferMode == ZSTD_bm_stable) + cDst = op; /* compress into output buffer, to skip flush stage */ + else + cDst = zcs->outBuff, oSize = zcs->outBuffSize; + if (inputBuffered) { + unsigned const lastBlock = (flushMode == ZSTD_e_end) && (ip==iend); + cSize = lastBlock ? + ZSTD_compressEnd_public(zcs, cDst, oSize, + zcs->inBuff + zcs->inToCompress, iSize) : + ZSTD_compressContinue_public(zcs, cDst, oSize, + zcs->inBuff + zcs->inToCompress, iSize); + FORWARD_IF_ERROR(cSize, "%s", lastBlock ? "ZSTD_compressEnd failed" : "ZSTD_compressContinue failed"); + zcs->frameEnded = lastBlock; + /* prepare next block */ + zcs->inBuffTarget = zcs->inBuffPos + zcs->blockSizeMax; + if (zcs->inBuffTarget > zcs->inBuffSize) + zcs->inBuffPos = 0, zcs->inBuffTarget = zcs->blockSizeMax; + DEBUGLOG(5, "inBuffTarget:%u / inBuffSize:%u", + (unsigned)zcs->inBuffTarget, (unsigned)zcs->inBuffSize); + if (!lastBlock) + assert(zcs->inBuffTarget <= zcs->inBuffSize); + zcs->inToCompress = zcs->inBuffPos; + } else { /* !inputBuffered, hence ZSTD_bm_stable */ + unsigned const lastBlock = (flushMode == ZSTD_e_end) && (ip + iSize == iend); + cSize = lastBlock ? + ZSTD_compressEnd_public(zcs, cDst, oSize, ip, iSize) : + ZSTD_compressContinue_public(zcs, cDst, oSize, ip, iSize); + /* Consume the input prior to error checking to mirror buffered mode. */ + if (ip) ip += iSize; + FORWARD_IF_ERROR(cSize, "%s", lastBlock ? "ZSTD_compressEnd failed" : "ZSTD_compressContinue failed"); + zcs->frameEnded = lastBlock; + if (lastBlock) assert(ip == iend); + } + if (cDst == op) { /* no need to flush */ + op += cSize; + if (zcs->frameEnded) { + DEBUGLOG(5, "Frame completed directly in outBuffer"); + someMoreWork = 0; + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + } + break; + } + zcs->outBuffContentSize = cSize; + zcs->outBuffFlushedSize = 0; + zcs->streamStage = zcss_flush; /* pass-through to flush stage */ + } + ZSTD_FALLTHROUGH; + case zcss_flush: + DEBUGLOG(5, "flush stage"); + assert(zcs->appliedParams.outBufferMode == ZSTD_bm_buffered); + { size_t const toFlush = zcs->outBuffContentSize - zcs->outBuffFlushedSize; + size_t const flushed = ZSTD_limitCopy(op, (size_t)(oend-op), + zcs->outBuff + zcs->outBuffFlushedSize, toFlush); + DEBUGLOG(5, "toFlush: %u into %u ==> flushed: %u", + (unsigned)toFlush, (unsigned)(oend-op), (unsigned)flushed); + if (flushed) + op += flushed; + zcs->outBuffFlushedSize += flushed; + if (toFlush!=flushed) { + /* flush not fully completed, presumably because dst is too small */ + assert(op==oend); + someMoreWork = 0; + break; + } + zcs->outBuffContentSize = zcs->outBuffFlushedSize = 0; + if (zcs->frameEnded) { + DEBUGLOG(5, "Frame completed on flush"); + someMoreWork = 0; + ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); + break; + } + zcs->streamStage = zcss_load; + break; + } + + default: /* impossible */ + assert(0); + } + } + + input->pos = (size_t)(ip - istart); + output->pos = (size_t)(op - ostart); + if (zcs->frameEnded) return 0; + return ZSTD_nextInputSizeHint(zcs); +} + +static size_t ZSTD_nextInputSizeHint_MTorST(const ZSTD_CCtx* cctx) +{ +#ifdef ZSTD_MULTITHREAD + if (cctx->appliedParams.nbWorkers >= 1) { + assert(cctx->mtctx != NULL); + return ZSTDMT_nextInputSizeHint(cctx->mtctx); + } +#endif + return ZSTD_nextInputSizeHint(cctx); + +} + +size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input) +{ + FORWARD_IF_ERROR( ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue) , ""); + return ZSTD_nextInputSizeHint_MTorST(zcs); +} + +/* After a compression call set the expected input/output buffer. + * This is validated at the start of the next compression call. + */ +static void +ZSTD_setBufferExpectations(ZSTD_CCtx* cctx, const ZSTD_outBuffer* output, const ZSTD_inBuffer* input) +{ + DEBUGLOG(5, "ZSTD_setBufferExpectations (for advanced stable in/out modes)"); + if (cctx->appliedParams.inBufferMode == ZSTD_bm_stable) { + cctx->expectedInBuffer = *input; + } + if (cctx->appliedParams.outBufferMode == ZSTD_bm_stable) { + cctx->expectedOutBufferSize = output->size - output->pos; + } +} + +/* Validate that the input/output buffers match the expectations set by + * ZSTD_setBufferExpectations. + */ +static size_t ZSTD_checkBufferStability(ZSTD_CCtx const* cctx, + ZSTD_outBuffer const* output, + ZSTD_inBuffer const* input, + ZSTD_EndDirective endOp) +{ + if (cctx->appliedParams.inBufferMode == ZSTD_bm_stable) { + ZSTD_inBuffer const expect = cctx->expectedInBuffer; + if (expect.src != input->src || expect.pos != input->pos) + RETURN_ERROR(stabilityCondition_notRespected, "ZSTD_c_stableInBuffer enabled but input differs!"); + } + (void)endOp; + if (cctx->appliedParams.outBufferMode == ZSTD_bm_stable) { + size_t const outBufferSize = output->size - output->pos; + if (cctx->expectedOutBufferSize != outBufferSize) + RETURN_ERROR(stabilityCondition_notRespected, "ZSTD_c_stableOutBuffer enabled but output size differs!"); + } + return 0; +} + +/* + * If @endOp == ZSTD_e_end, @inSize becomes pledgedSrcSize. + * Otherwise, it's ignored. + * @return: 0 on success, or a ZSTD_error code otherwise. + */ +static size_t ZSTD_CCtx_init_compressStream2(ZSTD_CCtx* cctx, + ZSTD_EndDirective endOp, + size_t inSize) +{ + ZSTD_CCtx_params params = cctx->requestedParams; + ZSTD_prefixDict const prefixDict = cctx->prefixDict; + FORWARD_IF_ERROR( ZSTD_initLocalDict(cctx) , ""); /* Init the local dict if present. */ + ZSTD_memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); /* single usage */ + assert(prefixDict.dict==NULL || cctx->cdict==NULL); /* only one can be set */ + if (cctx->cdict && !cctx->localDict.cdict) { + /* Let the cdict's compression level take priority over the requested params. + * But do not take the cdict's compression level if the "cdict" is actually a localDict + * generated from ZSTD_initLocalDict(). + */ + params.compressionLevel = cctx->cdict->compressionLevel; + } + DEBUGLOG(4, "ZSTD_CCtx_init_compressStream2 : transparent init stage"); + if (endOp == ZSTD_e_end) cctx->pledgedSrcSizePlusOne = inSize + 1; /* auto-determine pledgedSrcSize */ + + { size_t const dictSize = prefixDict.dict + ? prefixDict.dictSize + : (cctx->cdict ? cctx->cdict->dictContentSize : 0); + ZSTD_CParamMode_e const mode = ZSTD_getCParamMode(cctx->cdict, ¶ms, cctx->pledgedSrcSizePlusOne - 1); + params.cParams = ZSTD_getCParamsFromCCtxParams( + ¶ms, cctx->pledgedSrcSizePlusOne-1, + dictSize, mode); + } + + params.postBlockSplitter = ZSTD_resolveBlockSplitterMode(params.postBlockSplitter, ¶ms.cParams); + params.ldmParams.enableLdm = ZSTD_resolveEnableLdm(params.ldmParams.enableLdm, ¶ms.cParams); + params.useRowMatchFinder = ZSTD_resolveRowMatchFinderMode(params.useRowMatchFinder, ¶ms.cParams); + params.validateSequences = ZSTD_resolveExternalSequenceValidation(params.validateSequences); + params.maxBlockSize = ZSTD_resolveMaxBlockSize(params.maxBlockSize); + params.searchForExternalRepcodes = ZSTD_resolveExternalRepcodeSearch(params.searchForExternalRepcodes, params.compressionLevel); + +#ifdef ZSTD_MULTITHREAD + /* If external matchfinder is enabled, make sure to fail before checking job size (for consistency) */ + RETURN_ERROR_IF( + ZSTD_hasExtSeqProd(¶ms) && params.nbWorkers >= 1, + parameter_combination_unsupported, + "External sequence producer isn't supported with nbWorkers >= 1" + ); + + if ((cctx->pledgedSrcSizePlusOne-1) <= ZSTDMT_JOBSIZE_MIN) { + params.nbWorkers = 0; /* do not invoke multi-threading when src size is too small */ + } + if (params.nbWorkers > 0) { +# if ZSTD_TRACE + cctx->traceCtx = (ZSTD_trace_compress_begin != NULL) ? ZSTD_trace_compress_begin(cctx) : 0; +# endif + /* mt context creation */ + if (cctx->mtctx == NULL) { + DEBUGLOG(4, "ZSTD_compressStream2: creating new mtctx for nbWorkers=%u", + params.nbWorkers); + cctx->mtctx = ZSTDMT_createCCtx_advanced((U32)params.nbWorkers, cctx->customMem, cctx->pool); + RETURN_ERROR_IF(cctx->mtctx == NULL, memory_allocation, "NULL pointer!"); + } + /* mt compression */ + DEBUGLOG(4, "call ZSTDMT_initCStream_internal as nbWorkers=%u", params.nbWorkers); + FORWARD_IF_ERROR( ZSTDMT_initCStream_internal( + cctx->mtctx, + prefixDict.dict, prefixDict.dictSize, prefixDict.dictContentType, + cctx->cdict, params, cctx->pledgedSrcSizePlusOne-1) , ""); + cctx->dictID = cctx->cdict ? cctx->cdict->dictID : 0; + cctx->dictContentSize = cctx->cdict ? cctx->cdict->dictContentSize : prefixDict.dictSize; + cctx->consumedSrcSize = 0; + cctx->producedCSize = 0; + cctx->streamStage = zcss_load; + cctx->appliedParams = params; + } else +#endif /* ZSTD_MULTITHREAD */ + { U64 const pledgedSrcSize = cctx->pledgedSrcSizePlusOne - 1; + assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams))); + FORWARD_IF_ERROR( ZSTD_compressBegin_internal(cctx, + prefixDict.dict, prefixDict.dictSize, prefixDict.dictContentType, ZSTD_dtlm_fast, + cctx->cdict, + ¶ms, pledgedSrcSize, + ZSTDb_buffered) , ""); + assert(cctx->appliedParams.nbWorkers == 0); + cctx->inToCompress = 0; + cctx->inBuffPos = 0; + if (cctx->appliedParams.inBufferMode == ZSTD_bm_buffered) { + /* for small input: avoid automatic flush on reaching end of block, since + * it would require to add a 3-bytes null block to end frame + */ + cctx->inBuffTarget = cctx->blockSizeMax + (cctx->blockSizeMax == pledgedSrcSize); + } else { + cctx->inBuffTarget = 0; + } + cctx->outBuffContentSize = cctx->outBuffFlushedSize = 0; + cctx->streamStage = zcss_load; + cctx->frameEnded = 0; + } + return 0; +} + +/* @return provides a minimum amount of data remaining to be flushed from internal buffers + */ +size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, + ZSTD_outBuffer* output, + ZSTD_inBuffer* input, + ZSTD_EndDirective endOp) +{ + DEBUGLOG(5, "ZSTD_compressStream2, endOp=%u ", (unsigned)endOp); + /* check conditions */ + RETURN_ERROR_IF(output->pos > output->size, dstSize_tooSmall, "invalid output buffer"); + RETURN_ERROR_IF(input->pos > input->size, srcSize_wrong, "invalid input buffer"); + RETURN_ERROR_IF((U32)endOp > (U32)ZSTD_e_end, parameter_outOfBound, "invalid endDirective"); + assert(cctx != NULL); + + /* transparent initialization stage */ + if (cctx->streamStage == zcss_init) { + size_t const inputSize = input->size - input->pos; /* no obligation to start from pos==0 */ + size_t const totalInputSize = inputSize + cctx->stableIn_notConsumed; + if ( (cctx->requestedParams.inBufferMode == ZSTD_bm_stable) /* input is presumed stable, across invocations */ + && (endOp == ZSTD_e_continue) /* no flush requested, more input to come */ + && (totalInputSize < ZSTD_BLOCKSIZE_MAX) ) { /* not even reached one block yet */ + if (cctx->stableIn_notConsumed) { /* not the first time */ + /* check stable source guarantees */ + RETURN_ERROR_IF(input->src != cctx->expectedInBuffer.src, stabilityCondition_notRespected, "stableInBuffer condition not respected: wrong src pointer"); + RETURN_ERROR_IF(input->pos != cctx->expectedInBuffer.size, stabilityCondition_notRespected, "stableInBuffer condition not respected: externally modified pos"); + } + /* pretend input was consumed, to give a sense forward progress */ + input->pos = input->size; + /* save stable inBuffer, for later control, and flush/end */ + cctx->expectedInBuffer = *input; + /* but actually input wasn't consumed, so keep track of position from where compression shall resume */ + cctx->stableIn_notConsumed += inputSize; + /* don't initialize yet, wait for the first block of flush() order, for better parameters adaptation */ + return ZSTD_FRAMEHEADERSIZE_MIN(cctx->requestedParams.format); /* at least some header to produce */ + } + FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, endOp, totalInputSize), "compressStream2 initialization failed"); + ZSTD_setBufferExpectations(cctx, output, input); /* Set initial buffer expectations now that we've initialized */ + } + /* end of transparent initialization stage */ + + FORWARD_IF_ERROR(ZSTD_checkBufferStability(cctx, output, input, endOp), "invalid buffers"); + /* compression stage */ +#ifdef ZSTD_MULTITHREAD + if (cctx->appliedParams.nbWorkers > 0) { + size_t flushMin; + if (cctx->cParamsChanged) { + ZSTDMT_updateCParams_whileCompressing(cctx->mtctx, &cctx->requestedParams); + cctx->cParamsChanged = 0; + } + if (cctx->stableIn_notConsumed) { + assert(cctx->appliedParams.inBufferMode == ZSTD_bm_stable); + /* some early data was skipped - make it available for consumption */ + assert(input->pos >= cctx->stableIn_notConsumed); + input->pos -= cctx->stableIn_notConsumed; + cctx->stableIn_notConsumed = 0; + } + for (;;) { + size_t const ipos = input->pos; + size_t const opos = output->pos; + flushMin = ZSTDMT_compressStream_generic(cctx->mtctx, output, input, endOp); + cctx->consumedSrcSize += (U64)(input->pos - ipos); + cctx->producedCSize += (U64)(output->pos - opos); + if ( ZSTD_isError(flushMin) + || (endOp == ZSTD_e_end && flushMin == 0) ) { /* compression completed */ + if (flushMin == 0) + ZSTD_CCtx_trace(cctx, 0); + ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); + } + FORWARD_IF_ERROR(flushMin, "ZSTDMT_compressStream_generic failed"); + + if (endOp == ZSTD_e_continue) { + /* We only require some progress with ZSTD_e_continue, not maximal progress. + * We're done if we've consumed or produced any bytes, or either buffer is + * full. + */ + if (input->pos != ipos || output->pos != opos || input->pos == input->size || output->pos == output->size) + break; + } else { + assert(endOp == ZSTD_e_flush || endOp == ZSTD_e_end); + /* We require maximal progress. We're done when the flush is complete or the + * output buffer is full. + */ + if (flushMin == 0 || output->pos == output->size) + break; + } + } + DEBUGLOG(5, "completed ZSTD_compressStream2 delegating to ZSTDMT_compressStream_generic"); + /* Either we don't require maximum forward progress, we've finished the + * flush, or we are out of output space. + */ + assert(endOp == ZSTD_e_continue || flushMin == 0 || output->pos == output->size); + ZSTD_setBufferExpectations(cctx, output, input); + return flushMin; + } +#endif /* ZSTD_MULTITHREAD */ + FORWARD_IF_ERROR( ZSTD_compressStream_generic(cctx, output, input, endOp) , ""); + DEBUGLOG(5, "completed ZSTD_compressStream2"); + ZSTD_setBufferExpectations(cctx, output, input); + return cctx->outBuffContentSize - cctx->outBuffFlushedSize; /* remaining to flush */ +} + +size_t ZSTD_compressStream2_simpleArgs ( + ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, size_t* dstPos, + const void* src, size_t srcSize, size_t* srcPos, + ZSTD_EndDirective endOp) +{ + ZSTD_outBuffer output; + ZSTD_inBuffer input; + output.dst = dst; + output.size = dstCapacity; + output.pos = *dstPos; + input.src = src; + input.size = srcSize; + input.pos = *srcPos; + /* ZSTD_compressStream2() will check validity of dstPos and srcPos */ + { size_t const cErr = ZSTD_compressStream2(cctx, &output, &input, endOp); + *dstPos = output.pos; + *srcPos = input.pos; + return cErr; + } +} + +size_t ZSTD_compress2(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + ZSTD_bufferMode_e const originalInBufferMode = cctx->requestedParams.inBufferMode; + ZSTD_bufferMode_e const originalOutBufferMode = cctx->requestedParams.outBufferMode; + DEBUGLOG(4, "ZSTD_compress2 (srcSize=%u)", (unsigned)srcSize); + ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); + /* Enable stable input/output buffers. */ + cctx->requestedParams.inBufferMode = ZSTD_bm_stable; + cctx->requestedParams.outBufferMode = ZSTD_bm_stable; + { size_t oPos = 0; + size_t iPos = 0; + size_t const result = ZSTD_compressStream2_simpleArgs(cctx, + dst, dstCapacity, &oPos, + src, srcSize, &iPos, + ZSTD_e_end); + /* Reset to the original values. */ + cctx->requestedParams.inBufferMode = originalInBufferMode; + cctx->requestedParams.outBufferMode = originalOutBufferMode; + + FORWARD_IF_ERROR(result, "ZSTD_compressStream2_simpleArgs failed"); + if (result != 0) { /* compression not completed, due to lack of output space */ + assert(oPos == dstCapacity); + RETURN_ERROR(dstSize_tooSmall, ""); + } + assert(iPos == srcSize); /* all input is expected consumed */ + return oPos; + } +} + +/* ZSTD_validateSequence() : + * @offBase : must use the format required by ZSTD_storeSeq() + * @returns a ZSTD error code if sequence is not valid + */ +static size_t +ZSTD_validateSequence(U32 offBase, U32 matchLength, U32 minMatch, + size_t posInSrc, U32 windowLog, size_t dictSize, int useSequenceProducer) +{ + U32 const windowSize = 1u << windowLog; + /* posInSrc represents the amount of data the decoder would decode up to this point. + * As long as the amount of data decoded is less than or equal to window size, offsets may be + * larger than the total length of output decoded in order to reference the dict, even larger than + * window size. After output surpasses windowSize, we're limited to windowSize offsets again. + */ + size_t const offsetBound = posInSrc > windowSize ? (size_t)windowSize : posInSrc + (size_t)dictSize; + size_t const matchLenLowerBound = (minMatch == 3 || useSequenceProducer) ? 3 : 4; + RETURN_ERROR_IF(offBase > OFFSET_TO_OFFBASE(offsetBound), externalSequences_invalid, "Offset too large!"); + /* Validate maxNbSeq is large enough for the given matchLength and minMatch */ + RETURN_ERROR_IF(matchLength < matchLenLowerBound, externalSequences_invalid, "Matchlength too small for the minMatch"); + return 0; +} + +/* Returns an offset code, given a sequence's raw offset, the ongoing repcode array, and whether litLength == 0 */ +static U32 ZSTD_finalizeOffBase(U32 rawOffset, const U32 rep[ZSTD_REP_NUM], U32 ll0) +{ + U32 offBase = OFFSET_TO_OFFBASE(rawOffset); + + if (!ll0 && rawOffset == rep[0]) { + offBase = REPCODE1_TO_OFFBASE; + } else if (rawOffset == rep[1]) { + offBase = REPCODE_TO_OFFBASE(2 - ll0); + } else if (rawOffset == rep[2]) { + offBase = REPCODE_TO_OFFBASE(3 - ll0); + } else if (ll0 && rawOffset == rep[0] - 1) { + offBase = REPCODE3_TO_OFFBASE; + } + return offBase; +} + +/* This function scans through an array of ZSTD_Sequence, + * storing the sequences it reads, until it reaches a block delimiter. + * Note that the block delimiter includes the last literals of the block. + * @blockSize must be == sum(sequence_lengths). + * @returns @blockSize on success, and a ZSTD_error otherwise. + */ +static size_t +ZSTD_transferSequences_wBlockDelim(ZSTD_CCtx* cctx, + ZSTD_SequencePosition* seqPos, + const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, + const void* src, size_t blockSize, + ZSTD_ParamSwitch_e externalRepSearch) +{ + U32 idx = seqPos->idx; + U32 const startIdx = idx; + BYTE const* ip = (BYTE const*)(src); + const BYTE* const iend = ip + blockSize; + Repcodes_t updatedRepcodes; + U32 dictSize; + + DEBUGLOG(5, "ZSTD_transferSequences_wBlockDelim (blockSize = %zu)", blockSize); + + if (cctx->cdict) { + dictSize = (U32)cctx->cdict->dictContentSize; + } else if (cctx->prefixDict.dict) { + dictSize = (U32)cctx->prefixDict.dictSize; + } else { + dictSize = 0; + } + ZSTD_memcpy(updatedRepcodes.rep, cctx->blockState.prevCBlock->rep, sizeof(Repcodes_t)); + for (; idx < inSeqsSize && (inSeqs[idx].matchLength != 0 || inSeqs[idx].offset != 0); ++idx) { + U32 const litLength = inSeqs[idx].litLength; + U32 const matchLength = inSeqs[idx].matchLength; + U32 offBase; + + if (externalRepSearch == ZSTD_ps_disable) { + offBase = OFFSET_TO_OFFBASE(inSeqs[idx].offset); + } else { + U32 const ll0 = (litLength == 0); + offBase = ZSTD_finalizeOffBase(inSeqs[idx].offset, updatedRepcodes.rep, ll0); + ZSTD_updateRep(updatedRepcodes.rep, offBase, ll0); + } + + DEBUGLOG(6, "Storing sequence: (of: %u, ml: %u, ll: %u)", offBase, matchLength, litLength); + if (cctx->appliedParams.validateSequences) { + seqPos->posInSrc += litLength + matchLength; + FORWARD_IF_ERROR(ZSTD_validateSequence(offBase, matchLength, cctx->appliedParams.cParams.minMatch, + seqPos->posInSrc, + cctx->appliedParams.cParams.windowLog, dictSize, + ZSTD_hasExtSeqProd(&cctx->appliedParams)), + "Sequence validation failed"); + } + RETURN_ERROR_IF(idx - seqPos->idx >= cctx->seqStore.maxNbSeq, externalSequences_invalid, + "Not enough memory allocated. Try adjusting ZSTD_c_minMatch."); + ZSTD_storeSeq(&cctx->seqStore, litLength, ip, iend, offBase, matchLength); + ip += matchLength + litLength; + } + RETURN_ERROR_IF(idx == inSeqsSize, externalSequences_invalid, "Block delimiter not found."); + + /* If we skipped repcode search while parsing, we need to update repcodes now */ + assert(externalRepSearch != ZSTD_ps_auto); + assert(idx >= startIdx); + if (externalRepSearch == ZSTD_ps_disable && idx != startIdx) { + U32* const rep = updatedRepcodes.rep; + U32 lastSeqIdx = idx - 1; /* index of last non-block-delimiter sequence */ + + if (lastSeqIdx >= startIdx + 2) { + rep[2] = inSeqs[lastSeqIdx - 2].offset; + rep[1] = inSeqs[lastSeqIdx - 1].offset; + rep[0] = inSeqs[lastSeqIdx].offset; + } else if (lastSeqIdx == startIdx + 1) { + rep[2] = rep[0]; + rep[1] = inSeqs[lastSeqIdx - 1].offset; + rep[0] = inSeqs[lastSeqIdx].offset; + } else { + assert(lastSeqIdx == startIdx); + rep[2] = rep[1]; + rep[1] = rep[0]; + rep[0] = inSeqs[lastSeqIdx].offset; + } + } + + ZSTD_memcpy(cctx->blockState.nextCBlock->rep, updatedRepcodes.rep, sizeof(Repcodes_t)); + + if (inSeqs[idx].litLength) { + DEBUGLOG(6, "Storing last literals of size: %u", inSeqs[idx].litLength); + ZSTD_storeLastLiterals(&cctx->seqStore, ip, inSeqs[idx].litLength); + ip += inSeqs[idx].litLength; + seqPos->posInSrc += inSeqs[idx].litLength; + } + RETURN_ERROR_IF(ip != iend, externalSequences_invalid, "Blocksize doesn't agree with block delimiter!"); + seqPos->idx = idx+1; + return blockSize; +} + +/* + * This function attempts to scan through @blockSize bytes in @src + * represented by the sequences in @inSeqs, + * storing any (partial) sequences. + * + * Occasionally, we may want to reduce the actual number of bytes consumed from @src + * to avoid splitting a match, notably if it would produce a match smaller than MINMATCH. + * + * @returns the number of bytes consumed from @src, necessarily <= @blockSize. + * Otherwise, it may return a ZSTD error if something went wrong. + */ +static size_t +ZSTD_transferSequences_noDelim(ZSTD_CCtx* cctx, + ZSTD_SequencePosition* seqPos, + const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, + const void* src, size_t blockSize, + ZSTD_ParamSwitch_e externalRepSearch) +{ + U32 idx = seqPos->idx; + U32 startPosInSequence = seqPos->posInSequence; + U32 endPosInSequence = seqPos->posInSequence + (U32)blockSize; + size_t dictSize; + const BYTE* const istart = (const BYTE*)(src); + const BYTE* ip = istart; + const BYTE* iend = istart + blockSize; /* May be adjusted if we decide to process fewer than blockSize bytes */ + Repcodes_t updatedRepcodes; + U32 bytesAdjustment = 0; + U32 finalMatchSplit = 0; + + /* TODO(embg) support fast parsing mode in noBlockDelim mode */ + (void)externalRepSearch; + + if (cctx->cdict) { + dictSize = cctx->cdict->dictContentSize; + } else if (cctx->prefixDict.dict) { + dictSize = cctx->prefixDict.dictSize; + } else { + dictSize = 0; + } + DEBUGLOG(5, "ZSTD_transferSequences_noDelim: idx: %u PIS: %u blockSize: %zu", idx, startPosInSequence, blockSize); + DEBUGLOG(5, "Start seq: idx: %u (of: %u ml: %u ll: %u)", idx, inSeqs[idx].offset, inSeqs[idx].matchLength, inSeqs[idx].litLength); + ZSTD_memcpy(updatedRepcodes.rep, cctx->blockState.prevCBlock->rep, sizeof(Repcodes_t)); + while (endPosInSequence && idx < inSeqsSize && !finalMatchSplit) { + const ZSTD_Sequence currSeq = inSeqs[idx]; + U32 litLength = currSeq.litLength; + U32 matchLength = currSeq.matchLength; + U32 const rawOffset = currSeq.offset; + U32 offBase; + + /* Modify the sequence depending on where endPosInSequence lies */ + if (endPosInSequence >= currSeq.litLength + currSeq.matchLength) { + if (startPosInSequence >= litLength) { + startPosInSequence -= litLength; + litLength = 0; + matchLength -= startPosInSequence; + } else { + litLength -= startPosInSequence; + } + /* Move to the next sequence */ + endPosInSequence -= currSeq.litLength + currSeq.matchLength; + startPosInSequence = 0; + } else { + /* This is the final (partial) sequence we're adding from inSeqs, and endPosInSequence + does not reach the end of the match. So, we have to split the sequence */ + DEBUGLOG(6, "Require a split: diff: %u, idx: %u PIS: %u", + currSeq.litLength + currSeq.matchLength - endPosInSequence, idx, endPosInSequence); + if (endPosInSequence > litLength) { + U32 firstHalfMatchLength; + litLength = startPosInSequence >= litLength ? 0 : litLength - startPosInSequence; + firstHalfMatchLength = endPosInSequence - startPosInSequence - litLength; + if (matchLength > blockSize && firstHalfMatchLength >= cctx->appliedParams.cParams.minMatch) { + /* Only ever split the match if it is larger than the block size */ + U32 secondHalfMatchLength = currSeq.matchLength + currSeq.litLength - endPosInSequence; + if (secondHalfMatchLength < cctx->appliedParams.cParams.minMatch) { + /* Move the endPosInSequence backward so that it creates match of minMatch length */ + endPosInSequence -= cctx->appliedParams.cParams.minMatch - secondHalfMatchLength; + bytesAdjustment = cctx->appliedParams.cParams.minMatch - secondHalfMatchLength; + firstHalfMatchLength -= bytesAdjustment; + } + matchLength = firstHalfMatchLength; + /* Flag that we split the last match - after storing the sequence, exit the loop, + but keep the value of endPosInSequence */ + finalMatchSplit = 1; + } else { + /* Move the position in sequence backwards so that we don't split match, and break to store + * the last literals. We use the original currSeq.litLength as a marker for where endPosInSequence + * should go. We prefer to do this whenever it is not necessary to split the match, or if doing so + * would cause the first half of the match to be too small + */ + bytesAdjustment = endPosInSequence - currSeq.litLength; + endPosInSequence = currSeq.litLength; + break; + } + } else { + /* This sequence ends inside the literals, break to store the last literals */ + break; + } + } + /* Check if this offset can be represented with a repcode */ + { U32 const ll0 = (litLength == 0); + offBase = ZSTD_finalizeOffBase(rawOffset, updatedRepcodes.rep, ll0); + ZSTD_updateRep(updatedRepcodes.rep, offBase, ll0); + } + + if (cctx->appliedParams.validateSequences) { + seqPos->posInSrc += litLength + matchLength; + FORWARD_IF_ERROR(ZSTD_validateSequence(offBase, matchLength, cctx->appliedParams.cParams.minMatch, seqPos->posInSrc, + cctx->appliedParams.cParams.windowLog, dictSize, ZSTD_hasExtSeqProd(&cctx->appliedParams)), + "Sequence validation failed"); + } + DEBUGLOG(6, "Storing sequence: (of: %u, ml: %u, ll: %u)", offBase, matchLength, litLength); + RETURN_ERROR_IF(idx - seqPos->idx >= cctx->seqStore.maxNbSeq, externalSequences_invalid, + "Not enough memory allocated. Try adjusting ZSTD_c_minMatch."); + ZSTD_storeSeq(&cctx->seqStore, litLength, ip, iend, offBase, matchLength); + ip += matchLength + litLength; + if (!finalMatchSplit) + idx++; /* Next Sequence */ + } + DEBUGLOG(5, "Ending seq: idx: %u (of: %u ml: %u ll: %u)", idx, inSeqs[idx].offset, inSeqs[idx].matchLength, inSeqs[idx].litLength); + assert(idx == inSeqsSize || endPosInSequence <= inSeqs[idx].litLength + inSeqs[idx].matchLength); + seqPos->idx = idx; + seqPos->posInSequence = endPosInSequence; + ZSTD_memcpy(cctx->blockState.nextCBlock->rep, updatedRepcodes.rep, sizeof(Repcodes_t)); + + iend -= bytesAdjustment; + if (ip != iend) { + /* Store any last literals */ + U32 const lastLLSize = (U32)(iend - ip); + assert(ip <= iend); + DEBUGLOG(6, "Storing last literals of size: %u", lastLLSize); + ZSTD_storeLastLiterals(&cctx->seqStore, ip, lastLLSize); + seqPos->posInSrc += lastLLSize; + } + + return (size_t)(iend-istart); +} + +/* @seqPos represents a position within @inSeqs, + * it is read and updated by this function, + * once the goal to produce a block of size @blockSize is reached. + * @return: nb of bytes consumed from @src, necessarily <= @blockSize. + */ +typedef size_t (*ZSTD_SequenceCopier_f)(ZSTD_CCtx* cctx, + ZSTD_SequencePosition* seqPos, + const ZSTD_Sequence* const inSeqs, size_t inSeqsSize, + const void* src, size_t blockSize, + ZSTD_ParamSwitch_e externalRepSearch); + +static ZSTD_SequenceCopier_f ZSTD_selectSequenceCopier(ZSTD_SequenceFormat_e mode) +{ + assert(ZSTD_cParam_withinBounds(ZSTD_c_blockDelimiters, (int)mode)); + if (mode == ZSTD_sf_explicitBlockDelimiters) { + return ZSTD_transferSequences_wBlockDelim; + } + assert(mode == ZSTD_sf_noBlockDelimiters); + return ZSTD_transferSequences_noDelim; +} + +/* Discover the size of next block by searching for the delimiter. + * Note that a block delimiter **must** exist in this mode, + * otherwise it's an input error. + * The block size retrieved will be later compared to ensure it remains within bounds */ +static size_t +blockSize_explicitDelimiter(const ZSTD_Sequence* inSeqs, size_t inSeqsSize, ZSTD_SequencePosition seqPos) +{ + int end = 0; + size_t blockSize = 0; + size_t spos = seqPos.idx; + DEBUGLOG(6, "blockSize_explicitDelimiter : seq %zu / %zu", spos, inSeqsSize); + assert(spos <= inSeqsSize); + while (spos < inSeqsSize) { + end = (inSeqs[spos].offset == 0); + blockSize += inSeqs[spos].litLength + inSeqs[spos].matchLength; + if (end) { + if (inSeqs[spos].matchLength != 0) + RETURN_ERROR(externalSequences_invalid, "delimiter format error : both matchlength and offset must be == 0"); + break; + } + spos++; + } + if (!end) + RETURN_ERROR(externalSequences_invalid, "Reached end of sequences without finding a block delimiter"); + return blockSize; +} + +static size_t determine_blockSize(ZSTD_SequenceFormat_e mode, + size_t blockSize, size_t remaining, + const ZSTD_Sequence* inSeqs, size_t inSeqsSize, + ZSTD_SequencePosition seqPos) +{ + DEBUGLOG(6, "determine_blockSize : remainingSize = %zu", remaining); + if (mode == ZSTD_sf_noBlockDelimiters) { + /* Note: more a "target" block size */ + return MIN(remaining, blockSize); + } + assert(mode == ZSTD_sf_explicitBlockDelimiters); + { size_t const explicitBlockSize = blockSize_explicitDelimiter(inSeqs, inSeqsSize, seqPos); + FORWARD_IF_ERROR(explicitBlockSize, "Error while determining block size with explicit delimiters"); + if (explicitBlockSize > blockSize) + RETURN_ERROR(externalSequences_invalid, "sequences incorrectly define a too large block"); + if (explicitBlockSize > remaining) + RETURN_ERROR(externalSequences_invalid, "sequences define a frame longer than source"); + return explicitBlockSize; + } +} + +/* Compress all provided sequences, block-by-block. + * + * Returns the cumulative size of all compressed blocks (including their headers), + * otherwise a ZSTD error. + */ +static size_t +ZSTD_compressSequences_internal(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const ZSTD_Sequence* inSeqs, size_t inSeqsSize, + const void* src, size_t srcSize) +{ + size_t cSize = 0; + size_t remaining = srcSize; + ZSTD_SequencePosition seqPos = {0, 0, 0}; + + const BYTE* ip = (BYTE const*)src; + BYTE* op = (BYTE*)dst; + ZSTD_SequenceCopier_f const sequenceCopier = ZSTD_selectSequenceCopier(cctx->appliedParams.blockDelimiters); + + DEBUGLOG(4, "ZSTD_compressSequences_internal srcSize: %zu, inSeqsSize: %zu", srcSize, inSeqsSize); + /* Special case: empty frame */ + if (remaining == 0) { + U32 const cBlockHeader24 = 1 /* last block */ + (((U32)bt_raw)<<1); + RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "No room for empty frame block header"); + MEM_writeLE32(op, cBlockHeader24); + op += ZSTD_blockHeaderSize; + dstCapacity -= ZSTD_blockHeaderSize; + cSize += ZSTD_blockHeaderSize; + } + + while (remaining) { + size_t compressedSeqsSize; + size_t cBlockSize; + size_t blockSize = determine_blockSize(cctx->appliedParams.blockDelimiters, + cctx->blockSizeMax, remaining, + inSeqs, inSeqsSize, seqPos); + U32 const lastBlock = (blockSize == remaining); + FORWARD_IF_ERROR(blockSize, "Error while trying to determine block size"); + assert(blockSize <= remaining); + ZSTD_resetSeqStore(&cctx->seqStore); + + blockSize = sequenceCopier(cctx, + &seqPos, inSeqs, inSeqsSize, + ip, blockSize, + cctx->appliedParams.searchForExternalRepcodes); + FORWARD_IF_ERROR(blockSize, "Bad sequence copy"); + + /* If blocks are too small, emit as a nocompress block */ + /* TODO: See 3090. We reduced MIN_CBLOCK_SIZE from 3 to 2 so to compensate we are adding + * additional 1. We need to revisit and change this logic to be more consistent */ + if (blockSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1+1) { + cBlockSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cBlockSize, "Nocompress block failed"); + DEBUGLOG(5, "Block too small (%zu): data remains uncompressed: cSize=%zu", blockSize, cBlockSize); + cSize += cBlockSize; + ip += blockSize; + op += cBlockSize; + remaining -= blockSize; + dstCapacity -= cBlockSize; + continue; + } + + RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall, "not enough dstCapacity to write a new compressed block"); + compressedSeqsSize = ZSTD_entropyCompressSeqStore(&cctx->seqStore, + &cctx->blockState.prevCBlock->entropy, &cctx->blockState.nextCBlock->entropy, + &cctx->appliedParams, + op + ZSTD_blockHeaderSize /* Leave space for block header */, dstCapacity - ZSTD_blockHeaderSize, + blockSize, + cctx->tmpWorkspace, cctx->tmpWkspSize /* statically allocated in resetCCtx */, + cctx->bmi2); + FORWARD_IF_ERROR(compressedSeqsSize, "Compressing sequences of block failed"); + DEBUGLOG(5, "Compressed sequences size: %zu", compressedSeqsSize); + + if (!cctx->isFirstBlock && + ZSTD_maybeRLE(&cctx->seqStore) && + ZSTD_isRLE(ip, blockSize)) { + /* Note: don't emit the first block as RLE even if it qualifies because + * doing so will cause the decoder (cli <= v1.4.3 only) to throw an (invalid) error + * "should consume all input error." + */ + compressedSeqsSize = 1; + } + + if (compressedSeqsSize == 0) { + /* ZSTD_noCompressBlock writes the block header as well */ + cBlockSize = ZSTD_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cBlockSize, "ZSTD_noCompressBlock failed"); + DEBUGLOG(5, "Writing out nocompress block, size: %zu", cBlockSize); + } else if (compressedSeqsSize == 1) { + cBlockSize = ZSTD_rleCompressBlock(op, dstCapacity, *ip, blockSize, lastBlock); + FORWARD_IF_ERROR(cBlockSize, "ZSTD_rleCompressBlock failed"); + DEBUGLOG(5, "Writing out RLE block, size: %zu", cBlockSize); + } else { + U32 cBlockHeader; + /* Error checking and repcodes update */ + ZSTD_blockState_confirmRepcodesAndEntropyTables(&cctx->blockState); + if (cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) + cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; + + /* Write block header into beginning of block*/ + cBlockHeader = lastBlock + (((U32)bt_compressed)<<1) + (U32)(compressedSeqsSize << 3); + MEM_writeLE24(op, cBlockHeader); + cBlockSize = ZSTD_blockHeaderSize + compressedSeqsSize; + DEBUGLOG(5, "Writing out compressed block, size: %zu", cBlockSize); + } + + cSize += cBlockSize; + + if (lastBlock) { + break; + } else { + ip += blockSize; + op += cBlockSize; + remaining -= blockSize; + dstCapacity -= cBlockSize; + cctx->isFirstBlock = 0; + } + DEBUGLOG(5, "cSize running total: %zu (remaining dstCapacity=%zu)", cSize, dstCapacity); + } + + DEBUGLOG(4, "cSize final total: %zu", cSize); + return cSize; +} + +size_t ZSTD_compressSequences(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const ZSTD_Sequence* inSeqs, size_t inSeqsSize, + const void* src, size_t srcSize) +{ + BYTE* op = (BYTE*)dst; + size_t cSize = 0; + + /* Transparent initialization stage, same as compressStream2() */ + DEBUGLOG(4, "ZSTD_compressSequences (nbSeqs=%zu,dstCapacity=%zu)", inSeqsSize, dstCapacity); + assert(cctx != NULL); + FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, ZSTD_e_end, srcSize), "CCtx initialization failed"); + + /* Begin writing output, starting with frame header */ + { size_t const frameHeaderSize = ZSTD_writeFrameHeader(op, dstCapacity, + &cctx->appliedParams, srcSize, cctx->dictID); + op += frameHeaderSize; + assert(frameHeaderSize <= dstCapacity); + dstCapacity -= frameHeaderSize; + cSize += frameHeaderSize; + } + if (cctx->appliedParams.fParams.checksumFlag && srcSize) { + XXH64_update(&cctx->xxhState, src, srcSize); + } + + /* Now generate compressed blocks */ + { size_t const cBlocksSize = ZSTD_compressSequences_internal(cctx, + op, dstCapacity, + inSeqs, inSeqsSize, + src, srcSize); + FORWARD_IF_ERROR(cBlocksSize, "Compressing blocks failed!"); + cSize += cBlocksSize; + assert(cBlocksSize <= dstCapacity); + dstCapacity -= cBlocksSize; + } + + /* Complete with frame checksum, if needed */ + if (cctx->appliedParams.fParams.checksumFlag) { + U32 const checksum = (U32) XXH64_digest(&cctx->xxhState); + RETURN_ERROR_IF(dstCapacity<4, dstSize_tooSmall, "no room for checksum"); + DEBUGLOG(4, "Write checksum : %08X", (unsigned)checksum); + MEM_writeLE32((char*)dst + cSize, checksum); + cSize += 4; + } + + DEBUGLOG(4, "Final compressed size: %zu", cSize); + return cSize; +} + + +#if defined(__AVX2__) + +#include /* AVX2 intrinsics */ + +/* + * Convert 2 sequences per iteration, using AVX2 intrinsics: + * - offset -> offBase = offset + 2 + * - litLength -> (U16) litLength + * - matchLength -> (U16)(matchLength - 3) + * - rep is ignored + * Store only 8 bytes per SeqDef (offBase[4], litLength[2], mlBase[2]). + * + * At the end, instead of extracting two __m128i, + * we use _mm256_permute4x64_epi64(..., 0xE8) to move lane2 into lane1, + * then store the lower 16 bytes in one go. + * + * @returns 0 on succes, with no long length detected + * @returns > 0 if there is one long length (> 65535), + * indicating the position, and type. + */ +static size_t convertSequences_noRepcodes( + SeqDef* dstSeqs, + const ZSTD_Sequence* inSeqs, + size_t nbSequences) +{ + /* + * addition: + * For each 128-bit half: (offset+2, litLength+0, matchLength-3, rep+0) + */ + const __m256i addition = _mm256_setr_epi32( + ZSTD_REP_NUM, 0, -MINMATCH, 0, /* for sequence i */ + ZSTD_REP_NUM, 0, -MINMATCH, 0 /* for sequence i+1 */ + ); + + /* limit: check if there is a long length */ + const __m256i limit = _mm256_set1_epi32(65535); + + /* + * shuffle mask for byte-level rearrangement in each 128-bit half: + * + * Input layout (after addition) per 128-bit half: + * [ offset+2 (4 bytes) | litLength (4 bytes) | matchLength (4 bytes) | rep (4 bytes) ] + * We only need: + * offBase (4 bytes) = offset+2 + * litLength (2 bytes) = low 2 bytes of litLength + * mlBase (2 bytes) = low 2 bytes of (matchLength) + * => Bytes [0..3, 4..5, 8..9], zero the rest. + */ + const __m256i mask = _mm256_setr_epi8( + /* For the lower 128 bits => sequence i */ + 0, 1, 2, 3, /* offset+2 */ + 4, 5, /* litLength (16 bits) */ + 8, 9, /* matchLength (16 bits) */ + (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, + (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, + + /* For the upper 128 bits => sequence i+1 */ + 16,17,18,19, /* offset+2 */ + 20,21, /* litLength */ + 24,25, /* matchLength */ + (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, + (BYTE)0x80, (BYTE)0x80, (BYTE)0x80, (BYTE)0x80 + ); + + /* + * Next, we'll use _mm256_permute4x64_epi64(vshf, 0xE8). + * Explanation of 0xE8 = 11101000b => [lane0, lane2, lane2, lane3]. + * So the lower 128 bits become [lane0, lane2] => combining seq0 and seq1. + */ +#define PERM_LANE_0X_E8 0xE8 /* [0,2,2,3] in lane indices */ + + size_t longLen = 0, i = 0; + + /* AVX permutation depends on the specific definition of target structures */ + ZSTD_STATIC_ASSERT(sizeof(ZSTD_Sequence) == 16); + ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, offset) == 0); + ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, litLength) == 4); + ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, matchLength) == 8); + ZSTD_STATIC_ASSERT(sizeof(SeqDef) == 8); + ZSTD_STATIC_ASSERT(offsetof(SeqDef, offBase) == 0); + ZSTD_STATIC_ASSERT(offsetof(SeqDef, litLength) == 4); + ZSTD_STATIC_ASSERT(offsetof(SeqDef, mlBase) == 6); + + /* Process 2 sequences per loop iteration */ + for (; i + 1 < nbSequences; i += 2) { + /* Load 2 ZSTD_Sequence (32 bytes) */ + __m256i vin = _mm256_loadu_si256((const __m256i*)(const void*)&inSeqs[i]); + + /* Add {2, 0, -3, 0} in each 128-bit half */ + __m256i vadd = _mm256_add_epi32(vin, addition); + + /* Check for long length */ + __m256i ll_cmp = _mm256_cmpgt_epi32(vadd, limit); /* 0xFFFFFFFF for element > 65535 */ + int ll_res = _mm256_movemask_epi8(ll_cmp); + + /* Shuffle bytes so each half gives us the 8 bytes we need */ + __m256i vshf = _mm256_shuffle_epi8(vadd, mask); + /* + * Now: + * Lane0 = seq0's 8 bytes + * Lane1 = 0 + * Lane2 = seq1's 8 bytes + * Lane3 = 0 + */ + + /* Permute 64-bit lanes => move Lane2 down into Lane1. */ + __m256i vperm = _mm256_permute4x64_epi64(vshf, PERM_LANE_0X_E8); + /* + * Now the lower 16 bytes (Lane0+Lane1) = [seq0, seq1]. + * The upper 16 bytes are [Lane2, Lane3] = [seq1, 0], but we won't use them. + */ + + /* Store only the lower 16 bytes => 2 SeqDef (8 bytes each) */ + _mm_storeu_si128((__m128i *)(void*)&dstSeqs[i], _mm256_castsi256_si128(vperm)); + /* + * This writes out 16 bytes total: + * - offset 0..7 => seq0 (offBase, litLength, mlBase) + * - offset 8..15 => seq1 (offBase, litLength, mlBase) + */ + + /* check (unlikely) long lengths > 65535 + * indices for lengths correspond to bits [4..7], [8..11], [20..23], [24..27] + * => combined mask = 0x0FF00FF0 + */ + if (UNLIKELY((ll_res & 0x0FF00FF0) != 0)) { + /* long length detected: let's figure out which one*/ + if (inSeqs[i].matchLength > 65535+MINMATCH) { + assert(longLen == 0); + longLen = i + 1; + } + if (inSeqs[i].litLength > 65535) { + assert(longLen == 0); + longLen = i + nbSequences + 1; + } + if (inSeqs[i+1].matchLength > 65535+MINMATCH) { + assert(longLen == 0); + longLen = i + 1 + 1; + } + if (inSeqs[i+1].litLength > 65535) { + assert(longLen == 0); + longLen = i + 1 + nbSequences + 1; + } + } + } + + /* Handle leftover if @nbSequences is odd */ + if (i < nbSequences) { + /* process last sequence */ + assert(i == nbSequences - 1); + dstSeqs[i].offBase = OFFSET_TO_OFFBASE(inSeqs[i].offset); + dstSeqs[i].litLength = (U16)inSeqs[i].litLength; + dstSeqs[i].mlBase = (U16)(inSeqs[i].matchLength - MINMATCH); + /* check (unlikely) long lengths > 65535 */ + if (UNLIKELY(inSeqs[i].matchLength > 65535+MINMATCH)) { + assert(longLen == 0); + longLen = i + 1; + } + if (UNLIKELY(inSeqs[i].litLength > 65535)) { + assert(longLen == 0); + longLen = i + nbSequences + 1; + } + } + + return longLen; +} + +/* the vector implementation could also be ported to SSSE3, + * but since this implementation is targeting modern systems (>= Sapphire Rapid), + * it's not useful to develop and maintain code for older pre-AVX2 platforms */ + +#else /* no AVX2 */ + +static size_t convertSequences_noRepcodes( + SeqDef* dstSeqs, + const ZSTD_Sequence* inSeqs, + size_t nbSequences) +{ + size_t longLen = 0; + size_t n; + for (n=0; n 65535 */ + if (UNLIKELY(inSeqs[n].matchLength > 65535+MINMATCH)) { + assert(longLen == 0); + longLen = n + 1; + } + if (UNLIKELY(inSeqs[n].litLength > 65535)) { + assert(longLen == 0); + longLen = n + nbSequences + 1; + } + } + return longLen; +} + +#endif + +/* + * Precondition: Sequences must end on an explicit Block Delimiter + * @return: 0 on success, or an error code. + * Note: Sequence validation functionality has been disabled (removed). + * This is helpful to generate a lean main pipeline, improving performance. + * It may be re-inserted later. + */ +size_t ZSTD_convertBlockSequences(ZSTD_CCtx* cctx, + const ZSTD_Sequence* const inSeqs, size_t nbSequences, + int repcodeResolution) +{ + Repcodes_t updatedRepcodes; + size_t seqNb = 0; + + DEBUGLOG(5, "ZSTD_convertBlockSequences (nbSequences = %zu)", nbSequences); + + RETURN_ERROR_IF(nbSequences >= cctx->seqStore.maxNbSeq, externalSequences_invalid, + "Not enough memory allocated. Try adjusting ZSTD_c_minMatch."); + + ZSTD_memcpy(updatedRepcodes.rep, cctx->blockState.prevCBlock->rep, sizeof(Repcodes_t)); + + /* check end condition */ + assert(nbSequences >= 1); + assert(inSeqs[nbSequences-1].matchLength == 0); + assert(inSeqs[nbSequences-1].offset == 0); + + /* Convert Sequences from public format to internal format */ + if (!repcodeResolution) { + size_t const longl = convertSequences_noRepcodes(cctx->seqStore.sequencesStart, inSeqs, nbSequences-1); + cctx->seqStore.sequences = cctx->seqStore.sequencesStart + nbSequences-1; + if (longl) { + DEBUGLOG(5, "long length"); + assert(cctx->seqStore.longLengthType == ZSTD_llt_none); + if (longl <= nbSequences-1) { + DEBUGLOG(5, "long match length detected at pos %zu", longl-1); + cctx->seqStore.longLengthType = ZSTD_llt_matchLength; + cctx->seqStore.longLengthPos = (U32)(longl-1); + } else { + DEBUGLOG(5, "long literals length detected at pos %zu", longl-nbSequences); + assert(longl <= 2* (nbSequences-1)); + cctx->seqStore.longLengthType = ZSTD_llt_literalLength; + cctx->seqStore.longLengthPos = (U32)(longl-(nbSequences-1)-1); + } + } + } else { + for (seqNb = 0; seqNb < nbSequences - 1 ; seqNb++) { + U32 const litLength = inSeqs[seqNb].litLength; + U32 const matchLength = inSeqs[seqNb].matchLength; + U32 const ll0 = (litLength == 0); + U32 const offBase = ZSTD_finalizeOffBase(inSeqs[seqNb].offset, updatedRepcodes.rep, ll0); + + DEBUGLOG(6, "Storing sequence: (of: %u, ml: %u, ll: %u)", offBase, matchLength, litLength); + ZSTD_storeSeqOnly(&cctx->seqStore, litLength, offBase, matchLength); + ZSTD_updateRep(updatedRepcodes.rep, offBase, ll0); + } + } + + /* If we skipped repcode search while parsing, we need to update repcodes now */ + if (!repcodeResolution && nbSequences > 1) { + U32* const rep = updatedRepcodes.rep; + + if (nbSequences >= 4) { + U32 lastSeqIdx = (U32)nbSequences - 2; /* index of last full sequence */ + rep[2] = inSeqs[lastSeqIdx - 2].offset; + rep[1] = inSeqs[lastSeqIdx - 1].offset; + rep[0] = inSeqs[lastSeqIdx].offset; + } else if (nbSequences == 3) { + rep[2] = rep[0]; + rep[1] = inSeqs[0].offset; + rep[0] = inSeqs[1].offset; + } else { + assert(nbSequences == 2); + rep[2] = rep[1]; + rep[1] = rep[0]; + rep[0] = inSeqs[0].offset; + } + } + + ZSTD_memcpy(cctx->blockState.nextCBlock->rep, updatedRepcodes.rep, sizeof(Repcodes_t)); + + return 0; +} + +#if defined(ZSTD_ARCH_X86_AVX2) + +BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbSeqs) +{ + size_t i; + __m256i const zeroVec = _mm256_setzero_si256(); + __m256i sumVec = zeroVec; /* accumulates match+lit in 32-bit lanes */ + ZSTD_ALIGNED(32) U32 tmp[8]; /* temporary buffer for reduction */ + size_t mSum = 0, lSum = 0; + ZSTD_STATIC_ASSERT(sizeof(ZSTD_Sequence) == 16); + + /* Process 2 structs (32 bytes) at a time */ + for (i = 0; i + 2 <= nbSeqs; i += 2) { + /* Load two consecutive ZSTD_Sequence (8×4 = 32 bytes) */ + __m256i data = _mm256_loadu_si256((const __m256i*)(const void*)&seqs[i]); + /* check end of block signal */ + __m256i cmp = _mm256_cmpeq_epi32(data, zeroVec); + int cmp_res = _mm256_movemask_epi8(cmp); + /* indices for match lengths correspond to bits [8..11], [24..27] + * => combined mask = 0x0F000F00 */ + ZSTD_STATIC_ASSERT(offsetof(ZSTD_Sequence, matchLength) == 8); + if (cmp_res & 0x0F000F00) break; + /* Accumulate in sumVec */ + sumVec = _mm256_add_epi32(sumVec, data); + } + + /* Horizontal reduction */ + _mm256_store_si256((__m256i*)tmp, sumVec); + lSum = tmp[1] + tmp[5]; + mSum = tmp[2] + tmp[6]; + + /* Handle the leftover */ + for (; i < nbSeqs; i++) { + lSum += seqs[i].litLength; + mSum += seqs[i].matchLength; + if (seqs[i].matchLength == 0) break; /* end of block */ + } + + if (i==nbSeqs) { + /* reaching end of sequences: end of block signal was not present */ + BlockSummary bs; + bs.nbSequences = ERROR(externalSequences_invalid); + return bs; + } + { BlockSummary bs; + bs.nbSequences = i+1; + bs.blockSize = lSum + mSum; + bs.litSize = lSum; + return bs; + } +} + +#else + +BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbSeqs) +{ + size_t totalMatchSize = 0; + size_t litSize = 0; + size_t n; + assert(seqs); + for (n=0; nappliedParams.searchForExternalRepcodes == ZSTD_ps_enable); + assert(cctx->appliedParams.searchForExternalRepcodes != ZSTD_ps_auto); + + DEBUGLOG(4, "ZSTD_compressSequencesAndLiterals_internal: nbSeqs=%zu, litSize=%zu", nbSequences, litSize); + RETURN_ERROR_IF(nbSequences == 0, externalSequences_invalid, "Requires at least 1 end-of-block"); + + /* Special case: empty frame */ + if ((nbSequences == 1) && (inSeqs[0].litLength == 0)) { + U32 const cBlockHeader24 = 1 /* last block */ + (((U32)bt_raw)<<1); + RETURN_ERROR_IF(dstCapacity<3, dstSize_tooSmall, "No room for empty frame block header"); + MEM_writeLE24(op, cBlockHeader24); + op += ZSTD_blockHeaderSize; + dstCapacity -= ZSTD_blockHeaderSize; + cSize += ZSTD_blockHeaderSize; + } + + while (nbSequences) { + size_t compressedSeqsSize, cBlockSize, conversionStatus; + BlockSummary const block = ZSTD_get1BlockSummary(inSeqs, nbSequences); + U32 const lastBlock = (block.nbSequences == nbSequences); + FORWARD_IF_ERROR(block.nbSequences, "Error while trying to determine nb of sequences for a block"); + assert(block.nbSequences <= nbSequences); + RETURN_ERROR_IF(block.litSize > litSize, externalSequences_invalid, "discrepancy: Sequences require more literals than present in buffer"); + ZSTD_resetSeqStore(&cctx->seqStore); + + conversionStatus = ZSTD_convertBlockSequences(cctx, + inSeqs, block.nbSequences, + repcodeResolution); + FORWARD_IF_ERROR(conversionStatus, "Bad sequence conversion"); + inSeqs += block.nbSequences; + nbSequences -= block.nbSequences; + remaining -= block.blockSize; + + /* Note: when blockSize is very small, other variant send it uncompressed. + * Here, we still send the sequences, because we don't have the original source to send it uncompressed. + * One could imagine in theory reproducing the source from the sequences, + * but that's complex and costly memory intensive, and goes against the objectives of this variant. */ + + RETURN_ERROR_IF(dstCapacity < ZSTD_blockHeaderSize, dstSize_tooSmall, "not enough dstCapacity to write a new compressed block"); + + compressedSeqsSize = ZSTD_entropyCompressSeqStore_internal( + op + ZSTD_blockHeaderSize /* Leave space for block header */, dstCapacity - ZSTD_blockHeaderSize, + literals, block.litSize, + &cctx->seqStore, + &cctx->blockState.prevCBlock->entropy, &cctx->blockState.nextCBlock->entropy, + &cctx->appliedParams, + cctx->tmpWorkspace, cctx->tmpWkspSize /* statically allocated in resetCCtx */, + cctx->bmi2); + FORWARD_IF_ERROR(compressedSeqsSize, "Compressing sequences of block failed"); + /* note: the spec forbids for any compressed block to be larger than maximum block size */ + if (compressedSeqsSize > cctx->blockSizeMax) compressedSeqsSize = 0; + DEBUGLOG(5, "Compressed sequences size: %zu", compressedSeqsSize); + litSize -= block.litSize; + literals = (const char*)literals + block.litSize; + + /* Note: difficult to check source for RLE block when only Literals are provided, + * but it could be considered from analyzing the sequence directly */ + + if (compressedSeqsSize == 0) { + /* Sending uncompressed blocks is out of reach, because the source is not provided. + * In theory, one could use the sequences to regenerate the source, like a decompressor, + * but it's complex, and memory hungry, killing the purpose of this variant. + * Current outcome: generate an error code. + */ + RETURN_ERROR(cannotProduce_uncompressedBlock, "ZSTD_compressSequencesAndLiterals cannot generate an uncompressed block"); + } else { + U32 cBlockHeader; + assert(compressedSeqsSize > 1); /* no RLE */ + /* Error checking and repcodes update */ + ZSTD_blockState_confirmRepcodesAndEntropyTables(&cctx->blockState); + if (cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode == FSE_repeat_valid) + cctx->blockState.prevCBlock->entropy.fse.offcode_repeatMode = FSE_repeat_check; + + /* Write block header into beginning of block*/ + cBlockHeader = lastBlock + (((U32)bt_compressed)<<1) + (U32)(compressedSeqsSize << 3); + MEM_writeLE24(op, cBlockHeader); + cBlockSize = ZSTD_blockHeaderSize + compressedSeqsSize; + DEBUGLOG(5, "Writing out compressed block, size: %zu", cBlockSize); + } + + cSize += cBlockSize; + op += cBlockSize; + dstCapacity -= cBlockSize; + cctx->isFirstBlock = 0; + DEBUGLOG(5, "cSize running total: %zu (remaining dstCapacity=%zu)", cSize, dstCapacity); + + if (lastBlock) { + assert(nbSequences == 0); + break; + } + } + + RETURN_ERROR_IF(litSize != 0, externalSequences_invalid, "literals must be entirely and exactly consumed"); + RETURN_ERROR_IF(remaining != 0, externalSequences_invalid, "Sequences must represent a total of exactly srcSize=%zu", srcSize); + DEBUGLOG(4, "cSize final total: %zu", cSize); + return cSize; +} + +size_t +ZSTD_compressSequencesAndLiterals(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const ZSTD_Sequence* inSeqs, size_t inSeqsSize, + const void* literals, size_t litSize, size_t litCapacity, + size_t decompressedSize) +{ + BYTE* op = (BYTE*)dst; + size_t cSize = 0; + + /* Transparent initialization stage, same as compressStream2() */ + DEBUGLOG(4, "ZSTD_compressSequencesAndLiterals (dstCapacity=%zu)", dstCapacity); + assert(cctx != NULL); + if (litCapacity < litSize) { + RETURN_ERROR(workSpace_tooSmall, "literals buffer is not large enough: must be at least 8 bytes larger than litSize (risk of read out-of-bound)"); + } + FORWARD_IF_ERROR(ZSTD_CCtx_init_compressStream2(cctx, ZSTD_e_end, decompressedSize), "CCtx initialization failed"); + + if (cctx->appliedParams.blockDelimiters == ZSTD_sf_noBlockDelimiters) { + RETURN_ERROR(frameParameter_unsupported, "This mode is only compatible with explicit delimiters"); + } + if (cctx->appliedParams.validateSequences) { + RETURN_ERROR(parameter_unsupported, "This mode is not compatible with Sequence validation"); + } + if (cctx->appliedParams.fParams.checksumFlag) { + RETURN_ERROR(frameParameter_unsupported, "this mode is not compatible with frame checksum"); + } + + /* Begin writing output, starting with frame header */ + { size_t const frameHeaderSize = ZSTD_writeFrameHeader(op, dstCapacity, + &cctx->appliedParams, decompressedSize, cctx->dictID); + op += frameHeaderSize; + assert(frameHeaderSize <= dstCapacity); + dstCapacity -= frameHeaderSize; + cSize += frameHeaderSize; + } + + /* Now generate compressed blocks */ + { size_t const cBlocksSize = ZSTD_compressSequencesAndLiterals_internal(cctx, + op, dstCapacity, + inSeqs, inSeqsSize, + literals, litSize, decompressedSize); + FORWARD_IF_ERROR(cBlocksSize, "Compressing blocks failed!"); + cSize += cBlocksSize; + assert(cBlocksSize <= dstCapacity); + dstCapacity -= cBlocksSize; + } + + DEBUGLOG(4, "Final compressed size: %zu", cSize); + return cSize; +} + +/*====== Finalize ======*/ + +static ZSTD_inBuffer inBuffer_forEndFlush(const ZSTD_CStream* zcs) +{ + const ZSTD_inBuffer nullInput = { NULL, 0, 0 }; + const int stableInput = (zcs->appliedParams.inBufferMode == ZSTD_bm_stable); + return stableInput ? zcs->expectedInBuffer : nullInput; +} + +/*! ZSTD_flushStream() : + * @return : amount of data remaining to flush */ +size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) +{ + ZSTD_inBuffer input = inBuffer_forEndFlush(zcs); + input.size = input.pos; /* do not ingest more input during flush */ + return ZSTD_compressStream2(zcs, output, &input, ZSTD_e_flush); +} + +size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) +{ + ZSTD_inBuffer input = inBuffer_forEndFlush(zcs); + size_t const remainingToFlush = ZSTD_compressStream2(zcs, output, &input, ZSTD_e_end); + FORWARD_IF_ERROR(remainingToFlush , "ZSTD_compressStream2(,,ZSTD_e_end) failed"); + if (zcs->appliedParams.nbWorkers > 0) return remainingToFlush; /* minimal estimation */ + /* single thread mode : attempt to calculate remaining to flush more precisely */ + { size_t const lastBlockSize = zcs->frameEnded ? 0 : ZSTD_BLOCKHEADERSIZE; + size_t const checksumSize = (size_t)(zcs->frameEnded ? 0 : zcs->appliedParams.fParams.checksumFlag * 4); + size_t const toFlush = remainingToFlush + lastBlockSize + checksumSize; + DEBUGLOG(4, "ZSTD_endStream : remaining to flush : %u", (unsigned)toFlush); + return toFlush; + } +} + + +/*-===== Pre-defined compression levels =====-*/ +#include "clevels.h" + +int ZSTD_maxCLevel(void) { return ZSTD_MAX_CLEVEL; } +int ZSTD_minCLevel(void) { return (int)-ZSTD_TARGETLENGTH_MAX; } +int ZSTD_defaultCLevel(void) { return ZSTD_CLEVEL_DEFAULT; } + +static ZSTD_compressionParameters ZSTD_dedicatedDictSearch_getCParams(int const compressionLevel, size_t const dictSize) +{ + ZSTD_compressionParameters cParams = ZSTD_getCParams_internal(compressionLevel, 0, dictSize, ZSTD_cpm_createCDict); + switch (cParams.strategy) { + case ZSTD_fast: + case ZSTD_dfast: + break; + case ZSTD_greedy: + case ZSTD_lazy: + case ZSTD_lazy2: + cParams.hashLog += ZSTD_LAZY_DDSS_BUCKET_LOG; + break; + case ZSTD_btlazy2: + case ZSTD_btopt: + case ZSTD_btultra: + case ZSTD_btultra2: + break; + } + return cParams; +} + +static int ZSTD_dedicatedDictSearch_isSupported( + ZSTD_compressionParameters const* cParams) +{ + return (cParams->strategy >= ZSTD_greedy) + && (cParams->strategy <= ZSTD_lazy2) + && (cParams->hashLog > cParams->chainLog) + && (cParams->chainLog <= 24); +} + +/** + * Reverses the adjustment applied to cparams when enabling dedicated dict + * search. This is used to recover the params set to be used in the working + * context. (Otherwise, those tables would also grow.) + */ +static void ZSTD_dedicatedDictSearch_revertCParams( + ZSTD_compressionParameters* cParams) { + switch (cParams->strategy) { + case ZSTD_fast: + case ZSTD_dfast: + break; + case ZSTD_greedy: + case ZSTD_lazy: + case ZSTD_lazy2: + cParams->hashLog -= ZSTD_LAZY_DDSS_BUCKET_LOG; + if (cParams->hashLog < ZSTD_HASHLOG_MIN) { + cParams->hashLog = ZSTD_HASHLOG_MIN; + } + break; + case ZSTD_btlazy2: + case ZSTD_btopt: + case ZSTD_btultra: + case ZSTD_btultra2: + break; + } +} + +static U64 ZSTD_getCParamRowSize(U64 srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) +{ + switch (mode) { + case ZSTD_cpm_unknown: + case ZSTD_cpm_noAttachDict: + case ZSTD_cpm_createCDict: + break; + case ZSTD_cpm_attachDict: + dictSize = 0; + break; + default: + assert(0); + break; + } + { int const unknown = srcSizeHint == ZSTD_CONTENTSIZE_UNKNOWN; + size_t const addedSize = unknown && dictSize > 0 ? 500 : 0; + return unknown && dictSize == 0 ? ZSTD_CONTENTSIZE_UNKNOWN : srcSizeHint+dictSize+addedSize; + } +} + +/*! ZSTD_getCParams_internal() : + * @return ZSTD_compressionParameters structure for a selected compression level, srcSize and dictSize. + * Note: srcSizeHint 0 means 0, use ZSTD_CONTENTSIZE_UNKNOWN for unknown. + * Use dictSize == 0 for unknown or unused. + * Note: `mode` controls how we treat the `dictSize`. See docs for `ZSTD_CParamMode_e`. */ +static ZSTD_compressionParameters ZSTD_getCParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) +{ + U64 const rSize = ZSTD_getCParamRowSize(srcSizeHint, dictSize, mode); + U32 const tableID = (rSize <= 256 KB) + (rSize <= 128 KB) + (rSize <= 16 KB); + int row; + DEBUGLOG(5, "ZSTD_getCParams_internal (cLevel=%i)", compressionLevel); + + /* row */ + if (compressionLevel == 0) row = ZSTD_CLEVEL_DEFAULT; /* 0 == default */ + else if (compressionLevel < 0) row = 0; /* entry 0 is baseline for fast mode */ + else if (compressionLevel > ZSTD_MAX_CLEVEL) row = ZSTD_MAX_CLEVEL; + else row = compressionLevel; + + { ZSTD_compressionParameters cp = ZSTD_defaultCParameters[tableID][row]; + DEBUGLOG(5, "ZSTD_getCParams_internal selected tableID: %u row: %u strat: %u", tableID, row, (U32)cp.strategy); + /* acceleration factor */ + if (compressionLevel < 0) { + int const clampedCompressionLevel = MAX(ZSTD_minCLevel(), compressionLevel); + cp.targetLength = (unsigned)(-clampedCompressionLevel); + } + /* refine parameters based on srcSize & dictSize */ + return ZSTD_adjustCParams_internal(cp, srcSizeHint, dictSize, mode, ZSTD_ps_auto); + } +} + +/*! ZSTD_getCParams() : + * @return ZSTD_compressionParameters structure for a selected compression level, srcSize and dictSize. + * Size values are optional, provide 0 if not known or unused */ +ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) +{ + if (srcSizeHint == 0) srcSizeHint = ZSTD_CONTENTSIZE_UNKNOWN; + return ZSTD_getCParams_internal(compressionLevel, srcSizeHint, dictSize, ZSTD_cpm_unknown); +} + +/*! ZSTD_getParams() : + * same idea as ZSTD_getCParams() + * @return a `ZSTD_parameters` structure (instead of `ZSTD_compressionParameters`). + * Fields of `ZSTD_frameParameters` are set to default values */ +static ZSTD_parameters +ZSTD_getParams_internal(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode) +{ + ZSTD_parameters params; + ZSTD_compressionParameters const cParams = ZSTD_getCParams_internal(compressionLevel, srcSizeHint, dictSize, mode); + DEBUGLOG(5, "ZSTD_getParams (cLevel=%i)", compressionLevel); + ZSTD_memset(¶ms, 0, sizeof(params)); + params.cParams = cParams; + params.fParams.contentSizeFlag = 1; + return params; +} + +/*! ZSTD_getParams() : + * same idea as ZSTD_getCParams() + * @return a `ZSTD_parameters` structure (instead of `ZSTD_compressionParameters`). + * Fields of `ZSTD_frameParameters` are set to default values */ +ZSTD_parameters ZSTD_getParams(int compressionLevel, unsigned long long srcSizeHint, size_t dictSize) +{ + if (srcSizeHint == 0) srcSizeHint = ZSTD_CONTENTSIZE_UNKNOWN; + return ZSTD_getParams_internal(compressionLevel, srcSizeHint, dictSize, ZSTD_cpm_unknown); +} + +void ZSTD_registerSequenceProducer( + ZSTD_CCtx* zc, + void* extSeqProdState, + ZSTD_sequenceProducer_F extSeqProdFunc) +{ + assert(zc != NULL); + ZSTD_CCtxParams_registerSequenceProducer( + &zc->requestedParams, extSeqProdState, extSeqProdFunc + ); +} + +void ZSTD_CCtxParams_registerSequenceProducer( + ZSTD_CCtx_params* params, + void* extSeqProdState, + ZSTD_sequenceProducer_F extSeqProdFunc) +{ + assert(params != NULL); + if (extSeqProdFunc != NULL) { + params->extSeqProdFunc = extSeqProdFunc; + params->extSeqProdState = extSeqProdState; + } else { + params->extSeqProdFunc = NULL; + params->extSeqProdState = NULL; + } +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_internal.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_internal.h new file mode 100644 index 0000000000..ca5e2a4c5b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_internal.h @@ -0,0 +1,1636 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* This header contains definitions + * that shall **only** be used by modules within lib/compress. + */ + +#ifndef ZSTD_COMPRESS_H +#define ZSTD_COMPRESS_H + +/*-************************************* +* Dependencies +***************************************/ +#include "../common/zstd_internal.h" +#include "zstd_cwksp.h" +#ifdef ZSTD_MULTITHREAD +# include "zstdmt_compress.h" +#endif +#include "../common/bits.h" /* ZSTD_highbit32, ZSTD_NbCommonBytes */ +#include "zstd_preSplit.h" /* ZSTD_SLIPBLOCK_WORKSPACESIZE */ + +/*-************************************* +* Constants +***************************************/ +#define kSearchStrength 8 +#define HASH_READ_SIZE 8 +#define ZSTD_DUBT_UNSORTED_MARK 1 /* For btlazy2 strategy, index ZSTD_DUBT_UNSORTED_MARK==1 means "unsorted". + It could be confused for a real successor at index "1", if sorted as larger than its predecessor. + It's not a big deal though : candidate will just be sorted again. + Additionally, candidate position 1 will be lost. + But candidate 1 cannot hide a large tree of candidates, so it's a minimal loss. + The benefit is that ZSTD_DUBT_UNSORTED_MARK cannot be mishandled after table reuse with a different strategy. + This constant is required by ZSTD_compressBlock_btlazy2() and ZSTD_reduceTable_internal() */ + + +/*-************************************* +* Context memory management +***************************************/ +typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_ending } ZSTD_compressionStage_e; +typedef enum { zcss_init=0, zcss_load, zcss_flush } ZSTD_cStreamStage; + +typedef struct ZSTD_prefixDict_s { + const void* dict; + size_t dictSize; + ZSTD_dictContentType_e dictContentType; +} ZSTD_prefixDict; + +typedef struct { + void* dictBuffer; + void const* dict; + size_t dictSize; + ZSTD_dictContentType_e dictContentType; + ZSTD_CDict* cdict; +} ZSTD_localDict; + +typedef struct { + HUF_CElt CTable[HUF_CTABLE_SIZE_ST(255)]; + HUF_repeat repeatMode; +} ZSTD_hufCTables_t; + +typedef struct { + FSE_CTable offcodeCTable[FSE_CTABLE_SIZE_U32(OffFSELog, MaxOff)]; + FSE_CTable matchlengthCTable[FSE_CTABLE_SIZE_U32(MLFSELog, MaxML)]; + FSE_CTable litlengthCTable[FSE_CTABLE_SIZE_U32(LLFSELog, MaxLL)]; + FSE_repeat offcode_repeatMode; + FSE_repeat matchlength_repeatMode; + FSE_repeat litlength_repeatMode; +} ZSTD_fseCTables_t; + +typedef struct { + ZSTD_hufCTables_t huf; + ZSTD_fseCTables_t fse; +} ZSTD_entropyCTables_t; + +/*********************************************** +* Sequences * +***********************************************/ +typedef struct SeqDef_s { + U32 offBase; /* offBase == Offset + ZSTD_REP_NUM, or repcode 1,2,3 */ + U16 litLength; + U16 mlBase; /* mlBase == matchLength - MINMATCH */ +} SeqDef; + +/* Controls whether seqStore has a single "long" litLength or matchLength. See SeqStore_t. */ +typedef enum { + ZSTD_llt_none = 0, /* no longLengthType */ + ZSTD_llt_literalLength = 1, /* represents a long literal */ + ZSTD_llt_matchLength = 2 /* represents a long match */ +} ZSTD_longLengthType_e; + +typedef struct { + SeqDef* sequencesStart; + SeqDef* sequences; /* ptr to end of sequences */ + BYTE* litStart; + BYTE* lit; /* ptr to end of literals */ + BYTE* llCode; + BYTE* mlCode; + BYTE* ofCode; + size_t maxNbSeq; + size_t maxNbLit; + + /* longLengthPos and longLengthType to allow us to represent either a single litLength or matchLength + * in the seqStore that has a value larger than U16 (if it exists). To do so, we increment + * the existing value of the litLength or matchLength by 0x10000. + */ + ZSTD_longLengthType_e longLengthType; + U32 longLengthPos; /* Index of the sequence to apply long length modification to */ +} SeqStore_t; + +typedef struct { + U32 litLength; + U32 matchLength; +} ZSTD_SequenceLength; + +/** + * Returns the ZSTD_SequenceLength for the given sequences. It handles the decoding of long sequences + * indicated by longLengthPos and longLengthType, and adds MINMATCH back to matchLength. + */ +MEM_STATIC ZSTD_SequenceLength ZSTD_getSequenceLength(SeqStore_t const* seqStore, SeqDef const* seq) +{ + ZSTD_SequenceLength seqLen; + seqLen.litLength = seq->litLength; + seqLen.matchLength = seq->mlBase + MINMATCH; + if (seqStore->longLengthPos == (U32)(seq - seqStore->sequencesStart)) { + if (seqStore->longLengthType == ZSTD_llt_literalLength) { + seqLen.litLength += 0x10000; + } + if (seqStore->longLengthType == ZSTD_llt_matchLength) { + seqLen.matchLength += 0x10000; + } + } + return seqLen; +} + +const SeqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx); /* compress & dictBuilder */ +int ZSTD_seqToCodes(const SeqStore_t* seqStorePtr); /* compress, dictBuilder, decodeCorpus (shouldn't get its definition from here) */ + + +/*********************************************** +* Entropy buffer statistics structs and funcs * +***********************************************/ +/** ZSTD_hufCTablesMetadata_t : + * Stores Literals Block Type for a super-block in hType, and + * huffman tree description in hufDesBuffer. + * hufDesSize refers to the size of huffman tree description in bytes. + * This metadata is populated in ZSTD_buildBlockEntropyStats_literals() */ +typedef struct { + SymbolEncodingType_e hType; + BYTE hufDesBuffer[ZSTD_MAX_HUF_HEADER_SIZE]; + size_t hufDesSize; +} ZSTD_hufCTablesMetadata_t; + +/** ZSTD_fseCTablesMetadata_t : + * Stores symbol compression modes for a super-block in {ll, ol, ml}Type, and + * fse tables in fseTablesBuffer. + * fseTablesSize refers to the size of fse tables in bytes. + * This metadata is populated in ZSTD_buildBlockEntropyStats_sequences() */ +typedef struct { + SymbolEncodingType_e llType; + SymbolEncodingType_e ofType; + SymbolEncodingType_e mlType; + BYTE fseTablesBuffer[ZSTD_MAX_FSE_HEADERS_SIZE]; + size_t fseTablesSize; + size_t lastCountSize; /* This is to account for bug in 1.3.4. More detail in ZSTD_entropyCompressSeqStore_internal() */ +} ZSTD_fseCTablesMetadata_t; + +typedef struct { + ZSTD_hufCTablesMetadata_t hufMetadata; + ZSTD_fseCTablesMetadata_t fseMetadata; +} ZSTD_entropyCTablesMetadata_t; + +/** ZSTD_buildBlockEntropyStats() : + * Builds entropy for the block. + * @return : 0 on success or error code */ +size_t ZSTD_buildBlockEntropyStats( + const SeqStore_t* seqStorePtr, + const ZSTD_entropyCTables_t* prevEntropy, + ZSTD_entropyCTables_t* nextEntropy, + const ZSTD_CCtx_params* cctxParams, + ZSTD_entropyCTablesMetadata_t* entropyMetadata, + void* workspace, size_t wkspSize); + +/********************************* +* Compression internals structs * +*********************************/ + +typedef struct { + U32 off; /* Offset sumtype code for the match, using ZSTD_storeSeq() format */ + U32 len; /* Raw length of match */ +} ZSTD_match_t; + +typedef struct { + U32 offset; /* Offset of sequence */ + U32 litLength; /* Length of literals prior to match */ + U32 matchLength; /* Raw length of match */ +} rawSeq; + +typedef struct { + rawSeq* seq; /* The start of the sequences */ + size_t pos; /* The index in seq where reading stopped. pos <= size. */ + size_t posInSequence; /* The position within the sequence at seq[pos] where reading + stopped. posInSequence <= seq[pos].litLength + seq[pos].matchLength */ + size_t size; /* The number of sequences. <= capacity. */ + size_t capacity; /* The capacity starting from `seq` pointer */ +} RawSeqStore_t; + +UNUSED_ATTR static const RawSeqStore_t kNullRawSeqStore = {NULL, 0, 0, 0, 0}; + +typedef struct { + int price; /* price from beginning of segment to this position */ + U32 off; /* offset of previous match */ + U32 mlen; /* length of previous match */ + U32 litlen; /* nb of literals since previous match */ + U32 rep[ZSTD_REP_NUM]; /* offset history after previous match */ +} ZSTD_optimal_t; + +typedef enum { zop_dynamic=0, zop_predef } ZSTD_OptPrice_e; + +#define ZSTD_OPT_SIZE (ZSTD_OPT_NUM+3) +typedef struct { + /* All tables are allocated inside cctx->workspace by ZSTD_resetCCtx_internal() */ + unsigned* litFreq; /* table of literals statistics, of size 256 */ + unsigned* litLengthFreq; /* table of litLength statistics, of size (MaxLL+1) */ + unsigned* matchLengthFreq; /* table of matchLength statistics, of size (MaxML+1) */ + unsigned* offCodeFreq; /* table of offCode statistics, of size (MaxOff+1) */ + ZSTD_match_t* matchTable; /* list of found matches, of size ZSTD_OPT_SIZE */ + ZSTD_optimal_t* priceTable; /* All positions tracked by optimal parser, of size ZSTD_OPT_SIZE */ + + U32 litSum; /* nb of literals */ + U32 litLengthSum; /* nb of litLength codes */ + U32 matchLengthSum; /* nb of matchLength codes */ + U32 offCodeSum; /* nb of offset codes */ + U32 litSumBasePrice; /* to compare to log2(litfreq) */ + U32 litLengthSumBasePrice; /* to compare to log2(llfreq) */ + U32 matchLengthSumBasePrice;/* to compare to log2(mlfreq) */ + U32 offCodeSumBasePrice; /* to compare to log2(offreq) */ + ZSTD_OptPrice_e priceType; /* prices can be determined dynamically, or follow a pre-defined cost structure */ + const ZSTD_entropyCTables_t* symbolCosts; /* pre-calculated dictionary statistics */ + ZSTD_ParamSwitch_e literalCompressionMode; +} optState_t; + +typedef struct { + ZSTD_entropyCTables_t entropy; + U32 rep[ZSTD_REP_NUM]; +} ZSTD_compressedBlockState_t; + +typedef struct { + BYTE const* nextSrc; /* next block here to continue on current prefix */ + BYTE const* base; /* All regular indexes relative to this position */ + BYTE const* dictBase; /* extDict indexes relative to this position */ + U32 dictLimit; /* below that point, need extDict */ + U32 lowLimit; /* below that point, no more valid data */ + U32 nbOverflowCorrections; /* Number of times overflow correction has run since + * ZSTD_window_init(). Useful for debugging coredumps + * and for ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY. + */ +} ZSTD_window_t; + +#define ZSTD_WINDOW_START_INDEX 2 + +typedef struct ZSTD_MatchState_t ZSTD_MatchState_t; + +#define ZSTD_ROW_HASH_CACHE_SIZE 8 /* Size of prefetching hash cache for row-based matchfinder */ + +struct ZSTD_MatchState_t { + ZSTD_window_t window; /* State for window round buffer management */ + U32 loadedDictEnd; /* index of end of dictionary, within context's referential. + * When loadedDictEnd != 0, a dictionary is in use, and still valid. + * This relies on a mechanism to set loadedDictEnd=0 when dictionary is no longer within distance. + * Such mechanism is provided within ZSTD_window_enforceMaxDist() and ZSTD_checkDictValidity(). + * When dict referential is copied into active context (i.e. not attached), + * loadedDictEnd == dictSize, since referential starts from zero. + */ + U32 nextToUpdate; /* index from which to continue table update */ + U32 hashLog3; /* dispatch table for matches of len==3 : larger == faster, more memory */ + + U32 rowHashLog; /* For row-based matchfinder: Hashlog based on nb of rows in the hashTable.*/ + BYTE* tagTable; /* For row-based matchFinder: A row-based table containing the hashes and head index. */ + U32 hashCache[ZSTD_ROW_HASH_CACHE_SIZE]; /* For row-based matchFinder: a cache of hashes to improve speed */ + U64 hashSalt; /* For row-based matchFinder: salts the hash for reuse of tag table */ + U32 hashSaltEntropy; /* For row-based matchFinder: collects entropy for salt generation */ + + U32* hashTable; + U32* hashTable3; + U32* chainTable; + + int forceNonContiguous; /* Non-zero if we should force non-contiguous load for the next window update. */ + + int dedicatedDictSearch; /* Indicates whether this matchState is using the + * dedicated dictionary search structure. + */ + optState_t opt; /* optimal parser state */ + const ZSTD_MatchState_t* dictMatchState; + ZSTD_compressionParameters cParams; + const RawSeqStore_t* ldmSeqStore; + + /* Controls prefetching in some dictMatchState matchfinders. + * This behavior is controlled from the cctx ms. + * This parameter has no effect in the cdict ms. */ + int prefetchCDictTables; + + /* When == 0, lazy match finders insert every position. + * When != 0, lazy match finders only insert positions they search. + * This allows them to skip much faster over incompressible data, + * at a small cost to compression ratio. + */ + int lazySkipping; +}; + +typedef struct { + ZSTD_compressedBlockState_t* prevCBlock; + ZSTD_compressedBlockState_t* nextCBlock; + ZSTD_MatchState_t matchState; +} ZSTD_blockState_t; + +typedef struct { + U32 offset; + U32 checksum; +} ldmEntry_t; + +typedef struct { + BYTE const* split; + U32 hash; + U32 checksum; + ldmEntry_t* bucket; +} ldmMatchCandidate_t; + +#define LDM_BATCH_SIZE 64 + +typedef struct { + ZSTD_window_t window; /* State for the window round buffer management */ + ldmEntry_t* hashTable; + U32 loadedDictEnd; + BYTE* bucketOffsets; /* Next position in bucket to insert entry */ + size_t splitIndices[LDM_BATCH_SIZE]; + ldmMatchCandidate_t matchCandidates[LDM_BATCH_SIZE]; +} ldmState_t; + +typedef struct { + ZSTD_ParamSwitch_e enableLdm; /* ZSTD_ps_enable to enable LDM. ZSTD_ps_auto by default */ + U32 hashLog; /* Log size of hashTable */ + U32 bucketSizeLog; /* Log bucket size for collision resolution, at most 8 */ + U32 minMatchLength; /* Minimum match length */ + U32 hashRateLog; /* Log number of entries to skip */ + U32 windowLog; /* Window log for the LDM */ +} ldmParams_t; + +typedef struct { + int collectSequences; + ZSTD_Sequence* seqStart; + size_t seqIndex; + size_t maxSequences; +} SeqCollector; + +struct ZSTD_CCtx_params_s { + ZSTD_format_e format; + ZSTD_compressionParameters cParams; + ZSTD_frameParameters fParams; + + int compressionLevel; + int forceWindow; /* force back-references to respect limit of + * 1< 63) ? ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength]; +} + +/* ZSTD_MLcode() : + * note : mlBase = matchLength - MINMATCH; + * because it's the format it's stored in seqStore->sequences */ +MEM_STATIC U32 ZSTD_MLcode(U32 mlBase) +{ + static const BYTE ML_Code[128] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37, + 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 }; + static const U32 ML_deltaCode = 36; + return (mlBase > 127) ? ZSTD_highbit32(mlBase) + ML_deltaCode : ML_Code[mlBase]; +} + +/* ZSTD_cParam_withinBounds: + * @return 1 if value is within cParam bounds, + * 0 otherwise */ +MEM_STATIC int ZSTD_cParam_withinBounds(ZSTD_cParameter cParam, int value) +{ + ZSTD_bounds const bounds = ZSTD_cParam_getBounds(cParam); + if (ZSTD_isError(bounds.error)) return 0; + if (value < bounds.lowerBound) return 0; + if (value > bounds.upperBound) return 0; + return 1; +} + +/* ZSTD_selectAddr: + * @return index >= lowLimit ? candidate : backup, + * tries to force branchless codegen. */ +MEM_STATIC const BYTE* +ZSTD_selectAddr(U32 index, U32 lowLimit, const BYTE* candidate, const BYTE* backup) +{ +#if defined(__GNUC__) && defined(__x86_64__) + __asm__ ( + "cmp %1, %2\n" + "cmova %3, %0\n" + : "+r"(candidate) + : "r"(index), "r"(lowLimit), "r"(backup) + ); + return candidate; +#else + return index >= lowLimit ? candidate : backup; +#endif +} + +/* ZSTD_noCompressBlock() : + * Writes uncompressed block to dst buffer from given src. + * Returns the size of the block */ +MEM_STATIC size_t +ZSTD_noCompressBlock(void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) +{ + U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); + DEBUGLOG(5, "ZSTD_noCompressBlock (srcSize=%zu, dstCapacity=%zu)", srcSize, dstCapacity); + RETURN_ERROR_IF(srcSize + ZSTD_blockHeaderSize > dstCapacity, + dstSize_tooSmall, "dst buf too small for uncompressed block"); + MEM_writeLE24(dst, cBlockHeader24); + ZSTD_memcpy((BYTE*)dst + ZSTD_blockHeaderSize, src, srcSize); + return ZSTD_blockHeaderSize + srcSize; +} + +MEM_STATIC size_t +ZSTD_rleCompressBlock(void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U32 lastBlock) +{ + BYTE* const op = (BYTE*)dst; + U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); + RETURN_ERROR_IF(dstCapacity < 4, dstSize_tooSmall, ""); + MEM_writeLE24(op, cBlockHeader); + op[3] = src; + return 4; +} + + +/* ZSTD_minGain() : + * minimum compression required + * to generate a compress block or a compressed literals section. + * note : use same formula for both situations */ +MEM_STATIC size_t ZSTD_minGain(size_t srcSize, ZSTD_strategy strat) +{ + U32 const minlog = (strat>=ZSTD_btultra) ? (U32)(strat) - 1 : 6; + ZSTD_STATIC_ASSERT(ZSTD_btultra == 8); + assert(ZSTD_cParam_withinBounds(ZSTD_c_strategy, (int)strat)); + return (srcSize >> minlog) + 2; +} + +MEM_STATIC int ZSTD_literalsCompressionIsDisabled(const ZSTD_CCtx_params* cctxParams) +{ + switch (cctxParams->literalCompressionMode) { + case ZSTD_ps_enable: + return 0; + case ZSTD_ps_disable: + return 1; + default: + assert(0 /* impossible: pre-validated */); + ZSTD_FALLTHROUGH; + case ZSTD_ps_auto: + return (cctxParams->cParams.strategy == ZSTD_fast) && (cctxParams->cParams.targetLength > 0); + } +} + +/*! ZSTD_safecopyLiterals() : + * memcpy() function that won't read beyond more than WILDCOPY_OVERLENGTH bytes past ilimit_w. + * Only called when the sequence ends past ilimit_w, so it only needs to be optimized for single + * large copies. + */ +static void +ZSTD_safecopyLiterals(BYTE* op, BYTE const* ip, BYTE const* const iend, BYTE const* ilimit_w) +{ + assert(iend > ilimit_w); + if (ip <= ilimit_w) { + ZSTD_wildcopy(op, ip, ilimit_w - ip, ZSTD_no_overlap); + op += ilimit_w - ip; + ip = ilimit_w; + } + while (ip < iend) *op++ = *ip++; +} + + +#define REPCODE1_TO_OFFBASE REPCODE_TO_OFFBASE(1) +#define REPCODE2_TO_OFFBASE REPCODE_TO_OFFBASE(2) +#define REPCODE3_TO_OFFBASE REPCODE_TO_OFFBASE(3) +#define REPCODE_TO_OFFBASE(r) (assert((r)>=1), assert((r)<=ZSTD_REP_NUM), (r)) /* accepts IDs 1,2,3 */ +#define OFFSET_TO_OFFBASE(o) (assert((o)>0), o + ZSTD_REP_NUM) +#define OFFBASE_IS_OFFSET(o) ((o) > ZSTD_REP_NUM) +#define OFFBASE_IS_REPCODE(o) ( 1 <= (o) && (o) <= ZSTD_REP_NUM) +#define OFFBASE_TO_OFFSET(o) (assert(OFFBASE_IS_OFFSET(o)), (o) - ZSTD_REP_NUM) +#define OFFBASE_TO_REPCODE(o) (assert(OFFBASE_IS_REPCODE(o)), (o)) /* returns ID 1,2,3 */ + +/*! ZSTD_storeSeqOnly() : + * Store a sequence (litlen, litPtr, offBase and matchLength) into SeqStore_t. + * Literals themselves are not copied, but @litPtr is updated. + * @offBase : Users should employ macros REPCODE_TO_OFFBASE() and OFFSET_TO_OFFBASE(). + * @matchLength : must be >= MINMATCH +*/ +HINT_INLINE UNUSED_ATTR void +ZSTD_storeSeqOnly(SeqStore_t* seqStorePtr, + size_t litLength, + U32 offBase, + size_t matchLength) +{ + assert((size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart) < seqStorePtr->maxNbSeq); + + /* literal Length */ + assert(litLength <= ZSTD_BLOCKSIZE_MAX); + if (UNLIKELY(litLength>0xFFFF)) { + assert(seqStorePtr->longLengthType == ZSTD_llt_none); /* there can only be a single long length */ + seqStorePtr->longLengthType = ZSTD_llt_literalLength; + seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); + } + seqStorePtr->sequences[0].litLength = (U16)litLength; + + /* match offset */ + seqStorePtr->sequences[0].offBase = offBase; + + /* match Length */ + assert(matchLength <= ZSTD_BLOCKSIZE_MAX); + assert(matchLength >= MINMATCH); + { size_t const mlBase = matchLength - MINMATCH; + if (UNLIKELY(mlBase>0xFFFF)) { + assert(seqStorePtr->longLengthType == ZSTD_llt_none); /* there can only be a single long length */ + seqStorePtr->longLengthType = ZSTD_llt_matchLength; + seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); + } + seqStorePtr->sequences[0].mlBase = (U16)mlBase; + } + + seqStorePtr->sequences++; +} + +/*! ZSTD_storeSeq() : + * Store a sequence (litlen, litPtr, offBase and matchLength) into SeqStore_t. + * @offBase : Users should employ macros REPCODE_TO_OFFBASE() and OFFSET_TO_OFFBASE(). + * @matchLength : must be >= MINMATCH + * Allowed to over-read literals up to litLimit. +*/ +HINT_INLINE UNUSED_ATTR void +ZSTD_storeSeq(SeqStore_t* seqStorePtr, + size_t litLength, const BYTE* literals, const BYTE* litLimit, + U32 offBase, + size_t matchLength) +{ + BYTE const* const litLimit_w = litLimit - WILDCOPY_OVERLENGTH; + BYTE const* const litEnd = literals + litLength; +#if defined(DEBUGLEVEL) && (DEBUGLEVEL >= 6) + static const BYTE* g_start = NULL; + if (g_start==NULL) g_start = (const BYTE*)literals; /* note : index only works for compression within a single segment */ + { U32 const pos = (U32)((const BYTE*)literals - g_start); + DEBUGLOG(6, "Cpos%7u :%3u literals, match%4u bytes at offBase%7u", + pos, (U32)litLength, (U32)matchLength, (U32)offBase); + } +#endif + assert((size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart) < seqStorePtr->maxNbSeq); + /* copy Literals */ + assert(seqStorePtr->maxNbLit <= 128 KB); + assert(seqStorePtr->lit + litLength <= seqStorePtr->litStart + seqStorePtr->maxNbLit); + assert(literals + litLength <= litLimit); + if (litEnd <= litLimit_w) { + /* Common case we can use wildcopy. + * First copy 16 bytes, because literals are likely short. + */ + ZSTD_STATIC_ASSERT(WILDCOPY_OVERLENGTH >= 16); + ZSTD_copy16(seqStorePtr->lit, literals); + if (litLength > 16) { + ZSTD_wildcopy(seqStorePtr->lit+16, literals+16, (ptrdiff_t)litLength-16, ZSTD_no_overlap); + } + } else { + ZSTD_safecopyLiterals(seqStorePtr->lit, literals, litEnd, litLimit_w); + } + seqStorePtr->lit += litLength; + + ZSTD_storeSeqOnly(seqStorePtr, litLength, offBase, matchLength); +} + +/* ZSTD_updateRep() : + * updates in-place @rep (array of repeat offsets) + * @offBase : sum-type, using numeric representation of ZSTD_storeSeq() + */ +MEM_STATIC void +ZSTD_updateRep(U32 rep[ZSTD_REP_NUM], U32 const offBase, U32 const ll0) +{ + if (OFFBASE_IS_OFFSET(offBase)) { /* full offset */ + rep[2] = rep[1]; + rep[1] = rep[0]; + rep[0] = OFFBASE_TO_OFFSET(offBase); + } else { /* repcode */ + U32 const repCode = OFFBASE_TO_REPCODE(offBase) - 1 + ll0; + if (repCode > 0) { /* note : if repCode==0, no change */ + U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; + rep[2] = (repCode >= 2) ? rep[1] : rep[2]; + rep[1] = rep[0]; + rep[0] = currentOffset; + } else { /* repCode == 0 */ + /* nothing to do */ + } + } +} + +typedef struct repcodes_s { + U32 rep[3]; +} Repcodes_t; + +MEM_STATIC Repcodes_t +ZSTD_newRep(U32 const rep[ZSTD_REP_NUM], U32 const offBase, U32 const ll0) +{ + Repcodes_t newReps; + ZSTD_memcpy(&newReps, rep, sizeof(newReps)); + ZSTD_updateRep(newReps.rep, offBase, ll0); + return newReps; +} + + +/*-************************************* +* Match length counter +***************************************/ +MEM_STATIC size_t ZSTD_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* const pInLimit) +{ + const BYTE* const pStart = pIn; + const BYTE* const pInLoopLimit = pInLimit - (sizeof(size_t)-1); + + if (pIn < pInLoopLimit) { + { size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn); + if (diff) return ZSTD_NbCommonBytes(diff); } + pIn+=sizeof(size_t); pMatch+=sizeof(size_t); + while (pIn < pInLoopLimit) { + size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn); + if (!diff) { pIn+=sizeof(size_t); pMatch+=sizeof(size_t); continue; } + pIn += ZSTD_NbCommonBytes(diff); + return (size_t)(pIn - pStart); + } } + if (MEM_64bits() && (pIn<(pInLimit-3)) && (MEM_read32(pMatch) == MEM_read32(pIn))) { pIn+=4; pMatch+=4; } + if ((pIn<(pInLimit-1)) && (MEM_read16(pMatch) == MEM_read16(pIn))) { pIn+=2; pMatch+=2; } + if ((pIn> (32-h) ; } +MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h, 0); } /* only in zstd_opt.h */ +MEM_STATIC size_t ZSTD_hash3PtrS(const void* ptr, U32 h, U32 s) { return ZSTD_hash3(MEM_readLE32(ptr), h, s); } + +static const U32 prime4bytes = 2654435761U; +static U32 ZSTD_hash4(U32 u, U32 h, U32 s) { assert(h <= 32); return ((u * prime4bytes) ^ s) >> (32-h) ; } +static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_readLE32(ptr), h, 0); } +static size_t ZSTD_hash4PtrS(const void* ptr, U32 h, U32 s) { return ZSTD_hash4(MEM_readLE32(ptr), h, s); } + +static const U64 prime5bytes = 889523592379ULL; +static size_t ZSTD_hash5(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-40)) * prime5bytes) ^ s) >> (64-h)) ; } +static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(MEM_readLE64(p), h, 0); } +static size_t ZSTD_hash5PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash5(MEM_readLE64(p), h, s); } + +static const U64 prime6bytes = 227718039650203ULL; +static size_t ZSTD_hash6(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-48)) * prime6bytes) ^ s) >> (64-h)) ; } +static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(MEM_readLE64(p), h, 0); } +static size_t ZSTD_hash6PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash6(MEM_readLE64(p), h, s); } + +static const U64 prime7bytes = 58295818150454627ULL; +static size_t ZSTD_hash7(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-56)) * prime7bytes) ^ s) >> (64-h)) ; } +static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(MEM_readLE64(p), h, 0); } +static size_t ZSTD_hash7PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash7(MEM_readLE64(p), h, s); } + +static const U64 prime8bytes = 0xCF1BBCDCB7A56463ULL; +static size_t ZSTD_hash8(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u) * prime8bytes) ^ s) >> (64-h)) ; } +static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h, 0); } +static size_t ZSTD_hash8PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash8(MEM_readLE64(p), h, s); } + + +MEM_STATIC FORCE_INLINE_ATTR +size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls) +{ + /* Although some of these hashes do support hBits up to 64, some do not. + * To be on the safe side, always avoid hBits > 32. */ + assert(hBits <= 32); + + switch(mls) + { + default: + case 4: return ZSTD_hash4Ptr(p, hBits); + case 5: return ZSTD_hash5Ptr(p, hBits); + case 6: return ZSTD_hash6Ptr(p, hBits); + case 7: return ZSTD_hash7Ptr(p, hBits); + case 8: return ZSTD_hash8Ptr(p, hBits); + } +} + +MEM_STATIC FORCE_INLINE_ATTR +size_t ZSTD_hashPtrSalted(const void* p, U32 hBits, U32 mls, const U64 hashSalt) { + /* Although some of these hashes do support hBits up to 64, some do not. + * To be on the safe side, always avoid hBits > 32. */ + assert(hBits <= 32); + + switch(mls) + { + default: + case 4: return ZSTD_hash4PtrS(p, hBits, (U32)hashSalt); + case 5: return ZSTD_hash5PtrS(p, hBits, hashSalt); + case 6: return ZSTD_hash6PtrS(p, hBits, hashSalt); + case 7: return ZSTD_hash7PtrS(p, hBits, hashSalt); + case 8: return ZSTD_hash8PtrS(p, hBits, hashSalt); + } +} + + +/** ZSTD_ipow() : + * Return base^exponent. + */ +static U64 ZSTD_ipow(U64 base, U64 exponent) +{ + U64 power = 1; + while (exponent) { + if (exponent & 1) power *= base; + exponent >>= 1; + base *= base; + } + return power; +} + +#define ZSTD_ROLL_HASH_CHAR_OFFSET 10 + +/** ZSTD_rollingHash_append() : + * Add the buffer to the hash value. + */ +static U64 ZSTD_rollingHash_append(U64 hash, void const* buf, size_t size) +{ + BYTE const* istart = (BYTE const*)buf; + size_t pos; + for (pos = 0; pos < size; ++pos) { + hash *= prime8bytes; + hash += istart[pos] + ZSTD_ROLL_HASH_CHAR_OFFSET; + } + return hash; +} + +/** ZSTD_rollingHash_compute() : + * Compute the rolling hash value of the buffer. + */ +MEM_STATIC U64 ZSTD_rollingHash_compute(void const* buf, size_t size) +{ + return ZSTD_rollingHash_append(0, buf, size); +} + +/** ZSTD_rollingHash_primePower() : + * Compute the primePower to be passed to ZSTD_rollingHash_rotate() for a hash + * over a window of length bytes. + */ +MEM_STATIC U64 ZSTD_rollingHash_primePower(U32 length) +{ + return ZSTD_ipow(prime8bytes, length - 1); +} + +/** ZSTD_rollingHash_rotate() : + * Rotate the rolling hash by one byte. + */ +MEM_STATIC U64 ZSTD_rollingHash_rotate(U64 hash, BYTE toRemove, BYTE toAdd, U64 primePower) +{ + hash -= (toRemove + ZSTD_ROLL_HASH_CHAR_OFFSET) * primePower; + hash *= prime8bytes; + hash += toAdd + ZSTD_ROLL_HASH_CHAR_OFFSET; + return hash; +} + +/*-************************************* +* Round buffer management +***************************************/ +/* Max @current value allowed: + * In 32-bit mode: we want to avoid crossing the 2 GB limit, + * reducing risks of side effects in case of signed operations on indexes. + * In 64-bit mode: we want to ensure that adding the maximum job size (512 MB) + * doesn't overflow U32 index capacity (4 GB) */ +#define ZSTD_CURRENT_MAX (MEM_64bits() ? 3500U MB : 2000U MB) +/* Maximum chunk size before overflow correction needs to be called again */ +#define ZSTD_CHUNKSIZE_MAX \ + ( ((U32)-1) /* Maximum ending current index */ \ + - ZSTD_CURRENT_MAX) /* Maximum beginning lowLimit */ + +/** + * ZSTD_window_clear(): + * Clears the window containing the history by simply setting it to empty. + */ +MEM_STATIC void ZSTD_window_clear(ZSTD_window_t* window) +{ + size_t const endT = (size_t)(window->nextSrc - window->base); + U32 const end = (U32)endT; + + window->lowLimit = end; + window->dictLimit = end; +} + +MEM_STATIC U32 ZSTD_window_isEmpty(ZSTD_window_t const window) +{ + return window.dictLimit == ZSTD_WINDOW_START_INDEX && + window.lowLimit == ZSTD_WINDOW_START_INDEX && + (window.nextSrc - window.base) == ZSTD_WINDOW_START_INDEX; +} + +/** + * ZSTD_window_hasExtDict(): + * Returns non-zero if the window has a non-empty extDict. + */ +MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window) +{ + return window.lowLimit < window.dictLimit; +} + +/** + * ZSTD_matchState_dictMode(): + * Inspects the provided matchState and figures out what dictMode should be + * passed to the compressor. + */ +MEM_STATIC ZSTD_dictMode_e ZSTD_matchState_dictMode(const ZSTD_MatchState_t *ms) +{ + return ZSTD_window_hasExtDict(ms->window) ? + ZSTD_extDict : + ms->dictMatchState != NULL ? + (ms->dictMatchState->dedicatedDictSearch ? ZSTD_dedicatedDictSearch : ZSTD_dictMatchState) : + ZSTD_noDict; +} + +/* Defining this macro to non-zero tells zstd to run the overflow correction + * code much more frequently. This is very inefficient, and should only be + * used for tests and fuzzers. + */ +#ifndef ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY +# ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION +# define ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY 1 +# else +# define ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY 0 +# endif +#endif + +/** + * ZSTD_window_canOverflowCorrect(): + * Returns non-zero if the indices are large enough for overflow correction + * to work correctly without impacting compression ratio. + */ +MEM_STATIC U32 ZSTD_window_canOverflowCorrect(ZSTD_window_t const window, + U32 cycleLog, + U32 maxDist, + U32 loadedDictEnd, + void const* src) +{ + U32 const cycleSize = 1u << cycleLog; + U32 const curr = (U32)((BYTE const*)src - window.base); + U32 const minIndexToOverflowCorrect = cycleSize + + MAX(maxDist, cycleSize) + + ZSTD_WINDOW_START_INDEX; + + /* Adjust the min index to backoff the overflow correction frequency, + * so we don't waste too much CPU in overflow correction. If this + * computation overflows we don't really care, we just need to make + * sure it is at least minIndexToOverflowCorrect. + */ + U32 const adjustment = window.nbOverflowCorrections + 1; + U32 const adjustedIndex = MAX(minIndexToOverflowCorrect * adjustment, + minIndexToOverflowCorrect); + U32 const indexLargeEnough = curr > adjustedIndex; + + /* Only overflow correct early if the dictionary is invalidated already, + * so we don't hurt compression ratio. + */ + U32 const dictionaryInvalidated = curr > maxDist + loadedDictEnd; + + return indexLargeEnough && dictionaryInvalidated; +} + +/** + * ZSTD_window_needOverflowCorrection(): + * Returns non-zero if the indices are getting too large and need overflow + * protection. + */ +MEM_STATIC U32 ZSTD_window_needOverflowCorrection(ZSTD_window_t const window, + U32 cycleLog, + U32 maxDist, + U32 loadedDictEnd, + void const* src, + void const* srcEnd) +{ + U32 const curr = (U32)((BYTE const*)srcEnd - window.base); + if (ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY) { + if (ZSTD_window_canOverflowCorrect(window, cycleLog, maxDist, loadedDictEnd, src)) { + return 1; + } + } + return curr > ZSTD_CURRENT_MAX; +} + +/** + * ZSTD_window_correctOverflow(): + * Reduces the indices to protect from index overflow. + * Returns the correction made to the indices, which must be applied to every + * stored index. + * + * The least significant cycleLog bits of the indices must remain the same, + * which may be 0. Every index up to maxDist in the past must be valid. + */ +MEM_STATIC +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog, + U32 maxDist, void const* src) +{ + /* preemptive overflow correction: + * 1. correction is large enough: + * lowLimit > (3<<29) ==> current > 3<<29 + 1< (3<<29 + 1< (3<<29) - (1< (3<<29) - (1<<30) (NOTE: chainLog <= 30) + * > 1<<29 + * + * 2. (ip+ZSTD_CHUNKSIZE_MAX - cctx->base) doesn't overflow: + * After correction, current is less than (1<base < 1<<32. + * 3. (cctx->lowLimit + 1< 3<<29 + 1<base); + U32 const currentCycle = curr & cycleMask; + /* Ensure newCurrent - maxDist >= ZSTD_WINDOW_START_INDEX. */ + U32 const currentCycleCorrection = currentCycle < ZSTD_WINDOW_START_INDEX + ? MAX(cycleSize, ZSTD_WINDOW_START_INDEX) + : 0; + U32 const newCurrent = currentCycle + + currentCycleCorrection + + MAX(maxDist, cycleSize); + U32 const correction = curr - newCurrent; + /* maxDist must be a power of two so that: + * (newCurrent & cycleMask) == (curr & cycleMask) + * This is required to not corrupt the chains / binary tree. + */ + assert((maxDist & (maxDist - 1)) == 0); + assert((curr & cycleMask) == (newCurrent & cycleMask)); + assert(curr > newCurrent); + if (!ZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY) { + /* Loose bound, should be around 1<<29 (see above) */ + assert(correction > 1<<28); + } + + window->base += correction; + window->dictBase += correction; + if (window->lowLimit < correction + ZSTD_WINDOW_START_INDEX) { + window->lowLimit = ZSTD_WINDOW_START_INDEX; + } else { + window->lowLimit -= correction; + } + if (window->dictLimit < correction + ZSTD_WINDOW_START_INDEX) { + window->dictLimit = ZSTD_WINDOW_START_INDEX; + } else { + window->dictLimit -= correction; + } + + /* Ensure we can still reference the full window. */ + assert(newCurrent >= maxDist); + assert(newCurrent - maxDist >= ZSTD_WINDOW_START_INDEX); + /* Ensure that lowLimit and dictLimit didn't underflow. */ + assert(window->lowLimit <= newCurrent); + assert(window->dictLimit <= newCurrent); + + ++window->nbOverflowCorrections; + + DEBUGLOG(4, "Correction of 0x%x bytes to lowLimit=0x%x", correction, + window->lowLimit); + return correction; +} + +/** + * ZSTD_window_enforceMaxDist(): + * Updates lowLimit so that: + * (srcEnd - base) - lowLimit == maxDist + loadedDictEnd + * + * It ensures index is valid as long as index >= lowLimit. + * This must be called before a block compression call. + * + * loadedDictEnd is only defined if a dictionary is in use for current compression. + * As the name implies, loadedDictEnd represents the index at end of dictionary. + * The value lies within context's referential, it can be directly compared to blockEndIdx. + * + * If loadedDictEndPtr is NULL, no dictionary is in use, and we use loadedDictEnd == 0. + * If loadedDictEndPtr is not NULL, we set it to zero after updating lowLimit. + * This is because dictionaries are allowed to be referenced fully + * as long as the last byte of the dictionary is in the window. + * Once input has progressed beyond window size, dictionary cannot be referenced anymore. + * + * In normal dict mode, the dictionary lies between lowLimit and dictLimit. + * In dictMatchState mode, lowLimit and dictLimit are the same, + * and the dictionary is below them. + * forceWindow and dictMatchState are therefore incompatible. + */ +MEM_STATIC void +ZSTD_window_enforceMaxDist(ZSTD_window_t* window, + const void* blockEnd, + U32 maxDist, + U32* loadedDictEndPtr, + const ZSTD_MatchState_t** dictMatchStatePtr) +{ + U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); + U32 const loadedDictEnd = (loadedDictEndPtr != NULL) ? *loadedDictEndPtr : 0; + DEBUGLOG(5, "ZSTD_window_enforceMaxDist: blockEndIdx=%u, maxDist=%u, loadedDictEnd=%u", + (unsigned)blockEndIdx, (unsigned)maxDist, (unsigned)loadedDictEnd); + + /* - When there is no dictionary : loadedDictEnd == 0. + In which case, the test (blockEndIdx > maxDist) is merely to avoid + overflowing next operation `newLowLimit = blockEndIdx - maxDist`. + - When there is a standard dictionary : + Index referential is copied from the dictionary, + which means it starts from 0. + In which case, loadedDictEnd == dictSize, + and it makes sense to compare `blockEndIdx > maxDist + dictSize` + since `blockEndIdx` also starts from zero. + - When there is an attached dictionary : + loadedDictEnd is expressed within the referential of the context, + so it can be directly compared against blockEndIdx. + */ + if (blockEndIdx > maxDist + loadedDictEnd) { + U32 const newLowLimit = blockEndIdx - maxDist; + if (window->lowLimit < newLowLimit) window->lowLimit = newLowLimit; + if (window->dictLimit < window->lowLimit) { + DEBUGLOG(5, "Update dictLimit to match lowLimit, from %u to %u", + (unsigned)window->dictLimit, (unsigned)window->lowLimit); + window->dictLimit = window->lowLimit; + } + /* On reaching window size, dictionaries are invalidated */ + if (loadedDictEndPtr) *loadedDictEndPtr = 0; + if (dictMatchStatePtr) *dictMatchStatePtr = NULL; + } +} + +/* Similar to ZSTD_window_enforceMaxDist(), + * but only invalidates dictionary + * when input progresses beyond window size. + * assumption : loadedDictEndPtr and dictMatchStatePtr are valid (non NULL) + * loadedDictEnd uses same referential as window->base + * maxDist is the window size */ +MEM_STATIC void +ZSTD_checkDictValidity(const ZSTD_window_t* window, + const void* blockEnd, + U32 maxDist, + U32* loadedDictEndPtr, + const ZSTD_MatchState_t** dictMatchStatePtr) +{ + assert(loadedDictEndPtr != NULL); + assert(dictMatchStatePtr != NULL); + { U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); + U32 const loadedDictEnd = *loadedDictEndPtr; + DEBUGLOG(5, "ZSTD_checkDictValidity: blockEndIdx=%u, maxDist=%u, loadedDictEnd=%u", + (unsigned)blockEndIdx, (unsigned)maxDist, (unsigned)loadedDictEnd); + assert(blockEndIdx >= loadedDictEnd); + + if (blockEndIdx > loadedDictEnd + maxDist || loadedDictEnd != window->dictLimit) { + /* On reaching window size, dictionaries are invalidated. + * For simplification, if window size is reached anywhere within next block, + * the dictionary is invalidated for the full block. + * + * We also have to invalidate the dictionary if ZSTD_window_update() has detected + * non-contiguous segments, which means that loadedDictEnd != window->dictLimit. + * loadedDictEnd may be 0, if forceWindow is true, but in that case we never use + * dictMatchState, so setting it to NULL is not a problem. + */ + DEBUGLOG(6, "invalidating dictionary for current block (distance > windowSize)"); + *loadedDictEndPtr = 0; + *dictMatchStatePtr = NULL; + } else { + if (*loadedDictEndPtr != 0) { + DEBUGLOG(6, "dictionary considered valid for current block"); + } } } +} + +MEM_STATIC void ZSTD_window_init(ZSTD_window_t* window) { + ZSTD_memset(window, 0, sizeof(*window)); + window->base = (BYTE const*)" "; + window->dictBase = (BYTE const*)" "; + ZSTD_STATIC_ASSERT(ZSTD_DUBT_UNSORTED_MARK < ZSTD_WINDOW_START_INDEX); /* Start above ZSTD_DUBT_UNSORTED_MARK */ + window->dictLimit = ZSTD_WINDOW_START_INDEX; /* start from >0, so that 1st position is valid */ + window->lowLimit = ZSTD_WINDOW_START_INDEX; /* it ensures first and later CCtx usages compress the same */ + window->nextSrc = window->base + ZSTD_WINDOW_START_INDEX; /* see issue #1241 */ + window->nbOverflowCorrections = 0; +} + +/** + * ZSTD_window_update(): + * Updates the window by appending [src, src + srcSize) to the window. + * If it is not contiguous, the current prefix becomes the extDict, and we + * forget about the extDict. Handles overlap of the prefix and extDict. + * Returns non-zero if the segment is contiguous. + */ +MEM_STATIC +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 ZSTD_window_update(ZSTD_window_t* window, + const void* src, size_t srcSize, + int forceNonContiguous) +{ + BYTE const* const ip = (BYTE const*)src; + U32 contiguous = 1; + DEBUGLOG(5, "ZSTD_window_update"); + if (srcSize == 0) + return contiguous; + assert(window->base != NULL); + assert(window->dictBase != NULL); + /* Check if blocks follow each other */ + if (src != window->nextSrc || forceNonContiguous) { + /* not contiguous */ + size_t const distanceFromBase = (size_t)(window->nextSrc - window->base); + DEBUGLOG(5, "Non contiguous blocks, new segment starts at %u", window->dictLimit); + window->lowLimit = window->dictLimit; + assert(distanceFromBase == (size_t)(U32)distanceFromBase); /* should never overflow */ + window->dictLimit = (U32)distanceFromBase; + window->dictBase = window->base; + window->base = ip - distanceFromBase; + /* ms->nextToUpdate = window->dictLimit; */ + if (window->dictLimit - window->lowLimit < HASH_READ_SIZE) window->lowLimit = window->dictLimit; /* too small extDict */ + contiguous = 0; + } + window->nextSrc = ip + srcSize; + /* if input and dictionary overlap : reduce dictionary (area presumed modified by input) */ + if ( (ip+srcSize > window->dictBase + window->lowLimit) + & (ip < window->dictBase + window->dictLimit)) { + size_t const highInputIdx = (size_t)((ip + srcSize) - window->dictBase); + U32 const lowLimitMax = (highInputIdx > (size_t)window->dictLimit) ? window->dictLimit : (U32)highInputIdx; + assert(highInputIdx < UINT_MAX); + window->lowLimit = lowLimitMax; + DEBUGLOG(5, "Overlapping extDict and input : new lowLimit = %u", window->lowLimit); + } + return contiguous; +} + +/** + * Returns the lowest allowed match index. It may either be in the ext-dict or the prefix. + */ +MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_MatchState_t* ms, U32 curr, unsigned windowLog) +{ + U32 const maxDistance = 1U << windowLog; + U32 const lowestValid = ms->window.lowLimit; + U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; + U32 const isDictionary = (ms->loadedDictEnd != 0); + /* When using a dictionary the entire dictionary is valid if a single byte of the dictionary + * is within the window. We invalidate the dictionary (and set loadedDictEnd to 0) when it isn't + * valid for the entire block. So this check is sufficient to find the lowest valid match index. + */ + U32 const matchLowest = isDictionary ? lowestValid : withinWindow; + return matchLowest; +} + +/** + * Returns the lowest allowed match index in the prefix. + */ +MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_MatchState_t* ms, U32 curr, unsigned windowLog) +{ + U32 const maxDistance = 1U << windowLog; + U32 const lowestValid = ms->window.dictLimit; + U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; + U32 const isDictionary = (ms->loadedDictEnd != 0); + /* When computing the lowest prefix index we need to take the dictionary into account to handle + * the edge case where the dictionary and the source are contiguous in memory. + */ + U32 const matchLowest = isDictionary ? lowestValid : withinWindow; + return matchLowest; +} + +/* index_safety_check: + * intentional underflow : ensure repIndex isn't overlapping dict + prefix + * @return 1 if values are not overlapping, + * 0 otherwise */ +MEM_STATIC int ZSTD_index_overlap_check(const U32 prefixLowestIndex, const U32 repIndex) { + return ((U32)((prefixLowestIndex-1) - repIndex) >= 3); +} + + +/* debug functions */ +#if (DEBUGLEVEL>=2) + +MEM_STATIC double ZSTD_fWeight(U32 rawStat) +{ + U32 const fp_accuracy = 8; + U32 const fp_multiplier = (1 << fp_accuracy); + U32 const newStat = rawStat + 1; + U32 const hb = ZSTD_highbit32(newStat); + U32 const BWeight = hb * fp_multiplier; + U32 const FWeight = (newStat << fp_accuracy) >> hb; + U32 const weight = BWeight + FWeight; + assert(hb + fp_accuracy < 31); + return (double)weight / fp_multiplier; +} + +/* display a table content, + * listing each element, its frequency, and its predicted bit cost */ +MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max) +{ + unsigned u, sum; + for (u=0, sum=0; u<=max; u++) sum += table[u]; + DEBUGLOG(2, "total nb elts: %u", sum); + for (u=0; u<=max; u++) { + DEBUGLOG(2, "%2u: %5u (%.2f)", + u, table[u], ZSTD_fWeight(sum) - ZSTD_fWeight(table[u]) ); + } +} + +#endif + +/* Short Cache */ + +/* Normally, zstd matchfinders follow this flow: + * 1. Compute hash at ip + * 2. Load index from hashTable[hash] + * 3. Check if *ip == *(base + index) + * In dictionary compression, loading *(base + index) is often an L2 or even L3 miss. + * + * Short cache is an optimization which allows us to avoid step 3 most of the time + * when the data doesn't actually match. With short cache, the flow becomes: + * 1. Compute (hash, currentTag) at ip. currentTag is an 8-bit independent hash at ip. + * 2. Load (index, matchTag) from hashTable[hash]. See ZSTD_writeTaggedIndex to understand how this works. + * 3. Only if currentTag == matchTag, check *ip == *(base + index). Otherwise, continue. + * + * Currently, short cache is only implemented in CDict hashtables. Thus, its use is limited to + * dictMatchState matchfinders. + */ +#define ZSTD_SHORT_CACHE_TAG_BITS 8 +#define ZSTD_SHORT_CACHE_TAG_MASK ((1u << ZSTD_SHORT_CACHE_TAG_BITS) - 1) + +/* Helper function for ZSTD_fillHashTable and ZSTD_fillDoubleHashTable. + * Unpacks hashAndTag into (hash, tag), then packs (index, tag) into hashTable[hash]. */ +MEM_STATIC void ZSTD_writeTaggedIndex(U32* const hashTable, size_t hashAndTag, U32 index) { + size_t const hash = hashAndTag >> ZSTD_SHORT_CACHE_TAG_BITS; + U32 const tag = (U32)(hashAndTag & ZSTD_SHORT_CACHE_TAG_MASK); + assert(index >> (32 - ZSTD_SHORT_CACHE_TAG_BITS) == 0); + hashTable[hash] = (index << ZSTD_SHORT_CACHE_TAG_BITS) | tag; +} + +/* Helper function for short cache matchfinders. + * Unpacks tag1 and tag2 from lower bits of packedTag1 and packedTag2, then checks if the tags match. */ +MEM_STATIC int ZSTD_comparePackedTags(size_t packedTag1, size_t packedTag2) { + U32 const tag1 = packedTag1 & ZSTD_SHORT_CACHE_TAG_MASK; + U32 const tag2 = packedTag2 & ZSTD_SHORT_CACHE_TAG_MASK; + return tag1 == tag2; +} + +/* =============================================================== + * Shared internal declarations + * These prototypes may be called from sources not in lib/compress + * =============================================================== */ + +/* ZSTD_loadCEntropy() : + * dict : must point at beginning of a valid zstd dictionary. + * return : size of dictionary header (size of magic number + dict ID + entropy tables) + * assumptions : magic number supposed already checked + * and dictSize >= 8 */ +size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t* bs, void* workspace, + const void* const dict, size_t dictSize); + +void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t* bs); + +typedef struct { + U32 idx; /* Index in array of ZSTD_Sequence */ + U32 posInSequence; /* Position within sequence at idx */ + size_t posInSrc; /* Number of bytes given by sequences provided so far */ +} ZSTD_SequencePosition; + +/* for benchmark */ +size_t ZSTD_convertBlockSequences(ZSTD_CCtx* cctx, + const ZSTD_Sequence* const inSeqs, size_t nbSequences, + int const repcodeResolution); + +typedef struct { + size_t nbSequences; + size_t blockSize; + size_t litSize; +} BlockSummary; + +BlockSummary ZSTD_get1BlockSummary(const ZSTD_Sequence* seqs, size_t nbSeqs); + +/* ============================================================== + * Private declarations + * These prototypes shall only be called from within lib/compress + * ============================================================== */ + +/* ZSTD_getCParamsFromCCtxParams() : + * cParams are built depending on compressionLevel, src size hints, + * LDM and manually set compression parameters. + * Note: srcSizeHint == 0 means 0! + */ +ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams( + const ZSTD_CCtx_params* CCtxParams, U64 srcSizeHint, size_t dictSize, ZSTD_CParamMode_e mode); + +/*! ZSTD_initCStream_internal() : + * Private use only. Init streaming operation. + * expects params to be valid. + * must receive dict, or cdict, or none, but not both. + * @return : 0, or an error code */ +size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs, + const void* dict, size_t dictSize, + const ZSTD_CDict* cdict, + const ZSTD_CCtx_params* params, unsigned long long pledgedSrcSize); + +void ZSTD_resetSeqStore(SeqStore_t* ssPtr); + +/*! ZSTD_getCParamsFromCDict() : + * as the name implies */ +ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict* cdict); + +/* ZSTD_compressBegin_advanced_internal() : + * Private use only. To be called from zstdmt_compress.c. */ +size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx* cctx, + const void* dict, size_t dictSize, + ZSTD_dictContentType_e dictContentType, + ZSTD_dictTableLoadMethod_e dtlm, + const ZSTD_CDict* cdict, + const ZSTD_CCtx_params* params, + unsigned long long pledgedSrcSize); + +/* ZSTD_compress_advanced_internal() : + * Private use only. To be called from zstdmt_compress.c. */ +size_t ZSTD_compress_advanced_internal(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const void* dict,size_t dictSize, + const ZSTD_CCtx_params* params); + + +/* ZSTD_writeLastEmptyBlock() : + * output an empty Block with end-of-frame mark to complete a frame + * @return : size of data written into `dst` (== ZSTD_blockHeaderSize (defined in zstd_internal.h)) + * or an error code if `dstCapacity` is too small ( 1 */ +U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat); + +/** ZSTD_CCtx_trace() : + * Trace the end of a compression call. + */ +void ZSTD_CCtx_trace(ZSTD_CCtx* cctx, size_t extraCSize); + +/* Returns 1 if an external sequence producer is registered, otherwise returns 0. */ +MEM_STATIC int ZSTD_hasExtSeqProd(const ZSTD_CCtx_params* params) { + return params->extSeqProdFunc != NULL; +} + +/* =============================================================== + * Deprecated definitions that are still used internally to avoid + * deprecation warnings. These functions are exactly equivalent to + * their public variants, but avoid the deprecation warnings. + * =============================================================== */ + +size_t ZSTD_compressBegin_usingCDict_deprecated(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); + +size_t ZSTD_compressContinue_public(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize); + +size_t ZSTD_compressEnd_public(ZSTD_CCtx* cctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize); + +size_t ZSTD_compressBlock_deprecated(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize); + + +#endif /* ZSTD_COMPRESS_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.c new file mode 100644 index 0000000000..06036de5da --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.c @@ -0,0 +1,235 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + /*-************************************* + * Dependencies + ***************************************/ +#include "zstd_compress_literals.h" + + +/* ************************************************************** +* Debug Traces +****************************************************************/ +#if DEBUGLEVEL >= 2 + +static size_t showHexa(const void* src, size_t srcSize) +{ + const BYTE* const ip = (const BYTE*)src; + size_t u; + for (u=0; u31) + (srcSize>4095); + + DEBUGLOG(5, "ZSTD_noCompressLiterals: srcSize=%zu, dstCapacity=%zu", srcSize, dstCapacity); + + RETURN_ERROR_IF(srcSize + flSize > dstCapacity, dstSize_tooSmall, ""); + + switch(flSize) + { + case 1: /* 2 - 1 - 5 */ + ostart[0] = (BYTE)((U32)set_basic + (srcSize<<3)); + break; + case 2: /* 2 - 2 - 12 */ + MEM_writeLE16(ostart, (U16)((U32)set_basic + (1<<2) + (srcSize<<4))); + break; + case 3: /* 2 - 2 - 20 */ + MEM_writeLE32(ostart, (U32)((U32)set_basic + (3<<2) + (srcSize<<4))); + break; + default: /* not necessary : flSize is {1,2,3} */ + assert(0); + } + + ZSTD_memcpy(ostart + flSize, src, srcSize); + DEBUGLOG(5, "Raw (uncompressed) literals: %u -> %u", (U32)srcSize, (U32)(srcSize + flSize)); + return srcSize + flSize; +} + +static int allBytesIdentical(const void* src, size_t srcSize) +{ + assert(srcSize >= 1); + assert(src != NULL); + { const BYTE b = ((const BYTE*)src)[0]; + size_t p; + for (p=1; p31) + (srcSize>4095); + + assert(dstCapacity >= 4); (void)dstCapacity; + assert(allBytesIdentical(src, srcSize)); + + switch(flSize) + { + case 1: /* 2 - 1 - 5 */ + ostart[0] = (BYTE)((U32)set_rle + (srcSize<<3)); + break; + case 2: /* 2 - 2 - 12 */ + MEM_writeLE16(ostart, (U16)((U32)set_rle + (1<<2) + (srcSize<<4))); + break; + case 3: /* 2 - 2 - 20 */ + MEM_writeLE32(ostart, (U32)((U32)set_rle + (3<<2) + (srcSize<<4))); + break; + default: /* not necessary : flSize is {1,2,3} */ + assert(0); + } + + ostart[flSize] = *(const BYTE*)src; + DEBUGLOG(5, "RLE : Repeated Literal (%02X: %u times) -> %u bytes encoded", ((const BYTE*)src)[0], (U32)srcSize, (U32)flSize + 1); + return flSize+1; +} + +/* ZSTD_minLiteralsToCompress() : + * returns minimal amount of literals + * for literal compression to even be attempted. + * Minimum is made tighter as compression strategy increases. + */ +static size_t +ZSTD_minLiteralsToCompress(ZSTD_strategy strategy, HUF_repeat huf_repeat) +{ + assert((int)strategy >= 0); + assert((int)strategy <= 9); + /* btultra2 : min 8 bytes; + * then 2x larger for each successive compression strategy + * max threshold 64 bytes */ + { int const shift = MIN(9-(int)strategy, 3); + size_t const mintc = (huf_repeat == HUF_repeat_valid) ? 6 : (size_t)8 << shift; + DEBUGLOG(7, "minLiteralsToCompress = %zu", mintc); + return mintc; + } +} + +size_t ZSTD_compressLiterals ( + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + void* entropyWorkspace, size_t entropyWorkspaceSize, + const ZSTD_hufCTables_t* prevHuf, + ZSTD_hufCTables_t* nextHuf, + ZSTD_strategy strategy, + int disableLiteralCompression, + int suspectUncompressible, + int bmi2) +{ + size_t const lhSize = 3 + (srcSize >= 1 KB) + (srcSize >= 16 KB); + BYTE* const ostart = (BYTE*)dst; + U32 singleStream = srcSize < 256; + SymbolEncodingType_e hType = set_compressed; + size_t cLitSize; + + DEBUGLOG(5,"ZSTD_compressLiterals (disableLiteralCompression=%i, srcSize=%u, dstCapacity=%zu)", + disableLiteralCompression, (U32)srcSize, dstCapacity); + + DEBUGLOG(6, "Completed literals listing (%zu bytes)", showHexa(src, srcSize)); + + /* Prepare nextEntropy assuming reusing the existing table */ + ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + + if (disableLiteralCompression) + return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); + + /* if too small, don't even attempt compression (speed opt) */ + if (srcSize < ZSTD_minLiteralsToCompress(strategy, prevHuf->repeatMode)) + return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); + + RETURN_ERROR_IF(dstCapacity < lhSize+1, dstSize_tooSmall, "not enough space for compression"); + { HUF_repeat repeat = prevHuf->repeatMode; + int const flags = 0 + | (bmi2 ? HUF_flags_bmi2 : 0) + | (strategy < ZSTD_lazy && srcSize <= 1024 ? HUF_flags_preferRepeat : 0) + | (strategy >= HUF_OPTIMAL_DEPTH_THRESHOLD ? HUF_flags_optimalDepth : 0) + | (suspectUncompressible ? HUF_flags_suspectUncompressible : 0); + + typedef size_t (*huf_compress_f)(void*, size_t, const void*, size_t, unsigned, unsigned, void*, size_t, HUF_CElt*, HUF_repeat*, int); + huf_compress_f huf_compress; + if (repeat == HUF_repeat_valid && lhSize == 3) singleStream = 1; + huf_compress = singleStream ? HUF_compress1X_repeat : HUF_compress4X_repeat; + cLitSize = huf_compress(ostart+lhSize, dstCapacity-lhSize, + src, srcSize, + HUF_SYMBOLVALUE_MAX, LitHufLog, + entropyWorkspace, entropyWorkspaceSize, + (HUF_CElt*)nextHuf->CTable, + &repeat, flags); + DEBUGLOG(5, "%zu literals compressed into %zu bytes (before header)", srcSize, cLitSize); + if (repeat != HUF_repeat_none) { + /* reused the existing table */ + DEBUGLOG(5, "reusing statistics from previous huffman block"); + hType = set_repeat; + } + } + + { size_t const minGain = ZSTD_minGain(srcSize, strategy); + if ((cLitSize==0) || (cLitSize >= srcSize - minGain) || ERR_isError(cLitSize)) { + ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize); + } } + if (cLitSize==1) { + /* A return value of 1 signals that the alphabet consists of a single symbol. + * However, in some rare circumstances, it could be the compressed size (a single byte). + * For that outcome to have a chance to happen, it's necessary that `srcSize < 8`. + * (it's also necessary to not generate statistics). + * Therefore, in such a case, actively check that all bytes are identical. */ + if ((srcSize >= 8) || allBytesIdentical(src, srcSize)) { + ZSTD_memcpy(nextHuf, prevHuf, sizeof(*prevHuf)); + return ZSTD_compressRleLiteralsBlock(dst, dstCapacity, src, srcSize); + } } + + if (hType == set_compressed) { + /* using a newly constructed table */ + nextHuf->repeatMode = HUF_repeat_check; + } + + /* Build header */ + switch(lhSize) + { + case 3: /* 2 - 2 - 10 - 10 */ + if (!singleStream) assert(srcSize >= MIN_LITERALS_FOR_4_STREAMS); + { U32 const lhc = hType + ((U32)(!singleStream) << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<14); + MEM_writeLE24(ostart, lhc); + break; + } + case 4: /* 2 - 2 - 14 - 14 */ + assert(srcSize >= MIN_LITERALS_FOR_4_STREAMS); + { U32 const lhc = hType + (2 << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<18); + MEM_writeLE32(ostart, lhc); + break; + } + case 5: /* 2 - 2 - 18 - 18 */ + assert(srcSize >= MIN_LITERALS_FOR_4_STREAMS); + { U32 const lhc = hType + (3 << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<22); + MEM_writeLE32(ostart, lhc); + ostart[4] = (BYTE)(cLitSize >> 10); + break; + } + default: /* not possible : lhSize is {3,4,5} */ + assert(0); + } + DEBUGLOG(5, "Compressed literals: %u -> %u", (U32)srcSize, (U32)(lhSize+cLitSize)); + return lhSize+cLitSize; +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.h new file mode 100644 index 0000000000..b060c8ad21 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_literals.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_COMPRESS_LITERALS_H +#define ZSTD_COMPRESS_LITERALS_H + +#include "zstd_compress_internal.h" /* ZSTD_hufCTables_t, ZSTD_minGain() */ + + +size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize); + +/* ZSTD_compressRleLiteralsBlock() : + * Conditions : + * - All bytes in @src are identical + * - dstCapacity >= 4 */ +size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize); + +/* ZSTD_compressLiterals(): + * @entropyWorkspace: must be aligned on 4-bytes boundaries + * @entropyWorkspaceSize : must be >= HUF_WORKSPACE_SIZE + * @suspectUncompressible: sampling checks, to potentially skip huffman coding + */ +size_t ZSTD_compressLiterals (void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + void* entropyWorkspace, size_t entropyWorkspaceSize, + const ZSTD_hufCTables_t* prevHuf, + ZSTD_hufCTables_t* nextHuf, + ZSTD_strategy strategy, int disableLiteralCompression, + int suspectUncompressible, + int bmi2); + +#endif /* ZSTD_COMPRESS_LITERALS_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.c new file mode 100644 index 0000000000..7beb9daa60 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.c @@ -0,0 +1,442 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + /*-************************************* + * Dependencies + ***************************************/ +#include "zstd_compress_sequences.h" + +/** + * -log2(x / 256) lookup table for x in [0, 256). + * If x == 0: Return 0 + * Else: Return floor(-log2(x / 256) * 256) + */ +static unsigned const kInverseProbabilityLog256[256] = { + 0, 2048, 1792, 1642, 1536, 1453, 1386, 1329, 1280, 1236, 1197, 1162, + 1130, 1100, 1073, 1047, 1024, 1001, 980, 960, 941, 923, 906, 889, + 874, 859, 844, 830, 817, 804, 791, 779, 768, 756, 745, 734, + 724, 714, 704, 694, 685, 676, 667, 658, 650, 642, 633, 626, + 618, 610, 603, 595, 588, 581, 574, 567, 561, 554, 548, 542, + 535, 529, 523, 517, 512, 506, 500, 495, 489, 484, 478, 473, + 468, 463, 458, 453, 448, 443, 438, 434, 429, 424, 420, 415, + 411, 407, 402, 398, 394, 390, 386, 382, 377, 373, 370, 366, + 362, 358, 354, 350, 347, 343, 339, 336, 332, 329, 325, 322, + 318, 315, 311, 308, 305, 302, 298, 295, 292, 289, 286, 282, + 279, 276, 273, 270, 267, 264, 261, 258, 256, 253, 250, 247, + 244, 241, 239, 236, 233, 230, 228, 225, 222, 220, 217, 215, + 212, 209, 207, 204, 202, 199, 197, 194, 192, 190, 187, 185, + 182, 180, 178, 175, 173, 171, 168, 166, 164, 162, 159, 157, + 155, 153, 151, 149, 146, 144, 142, 140, 138, 136, 134, 132, + 130, 128, 126, 123, 121, 119, 117, 115, 114, 112, 110, 108, + 106, 104, 102, 100, 98, 96, 94, 93, 91, 89, 87, 85, + 83, 82, 80, 78, 76, 74, 73, 71, 69, 67, 66, 64, + 62, 61, 59, 57, 55, 54, 52, 50, 49, 47, 46, 44, + 42, 41, 39, 37, 36, 34, 33, 31, 30, 28, 26, 25, + 23, 22, 20, 19, 17, 16, 14, 13, 11, 10, 8, 7, + 5, 4, 2, 1, +}; + +static unsigned ZSTD_getFSEMaxSymbolValue(FSE_CTable const* ctable) { + void const* ptr = ctable; + U16 const* u16ptr = (U16 const*)ptr; + U32 const maxSymbolValue = MEM_read16(u16ptr + 1); + return maxSymbolValue; +} + +/** + * Returns true if we should use ncount=-1 else we should + * use ncount=1 for low probability symbols instead. + */ +static unsigned ZSTD_useLowProbCount(size_t const nbSeq) +{ + /* Heuristic: This should cover most blocks <= 16K and + * start to fade out after 16K to about 32K depending on + * compressibility. + */ + return nbSeq >= 2048; +} + +/** + * Returns the cost in bytes of encoding the normalized count header. + * Returns an error if any of the helper functions return an error. + */ +static size_t ZSTD_NCountCost(unsigned const* count, unsigned const max, + size_t const nbSeq, unsigned const FSELog) +{ + BYTE wksp[FSE_NCOUNTBOUND]; + S16 norm[MaxSeq + 1]; + const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); + FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)), ""); + return FSE_writeNCount(wksp, sizeof(wksp), norm, max, tableLog); +} + +/** + * Returns the cost in bits of encoding the distribution described by count + * using the entropy bound. + */ +static size_t ZSTD_entropyCost(unsigned const* count, unsigned const max, size_t const total) +{ + unsigned cost = 0; + unsigned s; + + assert(total > 0); + for (s = 0; s <= max; ++s) { + unsigned norm = (unsigned)((256 * count[s]) / total); + if (count[s] != 0 && norm == 0) + norm = 1; + assert(count[s] < total); + cost += count[s] * kInverseProbabilityLog256[norm]; + } + return cost >> 8; +} + +/** + * Returns the cost in bits of encoding the distribution in count using ctable. + * Returns an error if ctable cannot represent all the symbols in count. + */ +size_t ZSTD_fseBitCost( + FSE_CTable const* ctable, + unsigned const* count, + unsigned const max) +{ + unsigned const kAccuracyLog = 8; + size_t cost = 0; + unsigned s; + FSE_CState_t cstate; + FSE_initCState(&cstate, ctable); + if (ZSTD_getFSEMaxSymbolValue(ctable) < max) { + DEBUGLOG(5, "Repeat FSE_CTable has maxSymbolValue %u < %u", + ZSTD_getFSEMaxSymbolValue(ctable), max); + return ERROR(GENERIC); + } + for (s = 0; s <= max; ++s) { + unsigned const tableLog = cstate.stateLog; + unsigned const badCost = (tableLog + 1) << kAccuracyLog; + unsigned const bitCost = FSE_bitCost(cstate.symbolTT, tableLog, s, kAccuracyLog); + if (count[s] == 0) + continue; + if (bitCost >= badCost) { + DEBUGLOG(5, "Repeat FSE_CTable has Prob[%u] == 0", s); + return ERROR(GENERIC); + } + cost += (size_t)count[s] * bitCost; + } + return cost >> kAccuracyLog; +} + +/** + * Returns the cost in bits of encoding the distribution in count using the + * table described by norm. The max symbol support by norm is assumed >= max. + * norm must be valid for every symbol with non-zero probability in count. + */ +size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog, + unsigned const* count, unsigned const max) +{ + unsigned const shift = 8 - accuracyLog; + size_t cost = 0; + unsigned s; + assert(accuracyLog <= 8); + for (s = 0; s <= max; ++s) { + unsigned const normAcc = (norm[s] != -1) ? (unsigned)norm[s] : 1; + unsigned const norm256 = normAcc << shift; + assert(norm256 > 0); + assert(norm256 < 256); + cost += count[s] * kInverseProbabilityLog256[norm256]; + } + return cost >> 8; +} + +SymbolEncodingType_e +ZSTD_selectEncodingType( + FSE_repeat* repeatMode, unsigned const* count, unsigned const max, + size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, + FSE_CTable const* prevCTable, + short const* defaultNorm, U32 defaultNormLog, + ZSTD_DefaultPolicy_e const isDefaultAllowed, + ZSTD_strategy const strategy) +{ + ZSTD_STATIC_ASSERT(ZSTD_defaultDisallowed == 0 && ZSTD_defaultAllowed != 0); + if (mostFrequent == nbSeq) { + *repeatMode = FSE_repeat_none; + if (isDefaultAllowed && nbSeq <= 2) { + /* Prefer set_basic over set_rle when there are 2 or fewer symbols, + * since RLE uses 1 byte, but set_basic uses 5-6 bits per symbol. + * If basic encoding isn't possible, always choose RLE. + */ + DEBUGLOG(5, "Selected set_basic"); + return set_basic; + } + DEBUGLOG(5, "Selected set_rle"); + return set_rle; + } + if (strategy < ZSTD_lazy) { + if (isDefaultAllowed) { + size_t const staticFse_nbSeq_max = 1000; + size_t const mult = 10 - strategy; + size_t const baseLog = 3; + size_t const dynamicFse_nbSeq_min = (((size_t)1 << defaultNormLog) * mult) >> baseLog; /* 28-36 for offset, 56-72 for lengths */ + assert(defaultNormLog >= 5 && defaultNormLog <= 6); /* xx_DEFAULTNORMLOG */ + assert(mult <= 9 && mult >= 7); + if ( (*repeatMode == FSE_repeat_valid) + && (nbSeq < staticFse_nbSeq_max) ) { + DEBUGLOG(5, "Selected set_repeat"); + return set_repeat; + } + if ( (nbSeq < dynamicFse_nbSeq_min) + || (mostFrequent < (nbSeq >> (defaultNormLog-1))) ) { + DEBUGLOG(5, "Selected set_basic"); + /* The format allows default tables to be repeated, but it isn't useful. + * When using simple heuristics to select encoding type, we don't want + * to confuse these tables with dictionaries. When running more careful + * analysis, we don't need to waste time checking both repeating tables + * and default tables. + */ + *repeatMode = FSE_repeat_none; + return set_basic; + } + } + } else { + size_t const basicCost = isDefaultAllowed ? ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, count, max) : ERROR(GENERIC); + size_t const repeatCost = *repeatMode != FSE_repeat_none ? ZSTD_fseBitCost(prevCTable, count, max) : ERROR(GENERIC); + size_t const NCountCost = ZSTD_NCountCost(count, max, nbSeq, FSELog); + size_t const compressedCost = (NCountCost << 3) + ZSTD_entropyCost(count, max, nbSeq); + + if (isDefaultAllowed) { + assert(!ZSTD_isError(basicCost)); + assert(!(*repeatMode == FSE_repeat_valid && ZSTD_isError(repeatCost))); + } + assert(!ZSTD_isError(NCountCost)); + assert(compressedCost < ERROR(maxCode)); + DEBUGLOG(5, "Estimated bit costs: basic=%u\trepeat=%u\tcompressed=%u", + (unsigned)basicCost, (unsigned)repeatCost, (unsigned)compressedCost); + if (basicCost <= repeatCost && basicCost <= compressedCost) { + DEBUGLOG(5, "Selected set_basic"); + assert(isDefaultAllowed); + *repeatMode = FSE_repeat_none; + return set_basic; + } + if (repeatCost <= compressedCost) { + DEBUGLOG(5, "Selected set_repeat"); + assert(!ZSTD_isError(repeatCost)); + return set_repeat; + } + assert(compressedCost < basicCost && compressedCost < repeatCost); + } + DEBUGLOG(5, "Selected set_compressed"); + *repeatMode = FSE_repeat_check; + return set_compressed; +} + +typedef struct { + S16 norm[MaxSeq + 1]; + U32 wksp[FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(MaxSeq, MaxFSELog)]; +} ZSTD_BuildCTableWksp; + +size_t +ZSTD_buildCTable(void* dst, size_t dstCapacity, + FSE_CTable* nextCTable, U32 FSELog, SymbolEncodingType_e type, + unsigned* count, U32 max, + const BYTE* codeTable, size_t nbSeq, + const S16* defaultNorm, U32 defaultNormLog, U32 defaultMax, + const FSE_CTable* prevCTable, size_t prevCTableSize, + void* entropyWorkspace, size_t entropyWorkspaceSize) +{ + BYTE* op = (BYTE*)dst; + const BYTE* const oend = op + dstCapacity; + DEBUGLOG(6, "ZSTD_buildCTable (dstCapacity=%u)", (unsigned)dstCapacity); + + switch (type) { + case set_rle: + FORWARD_IF_ERROR(FSE_buildCTable_rle(nextCTable, (BYTE)max), ""); + RETURN_ERROR_IF(dstCapacity==0, dstSize_tooSmall, "not enough space"); + *op = codeTable[0]; + return 1; + case set_repeat: + ZSTD_memcpy(nextCTable, prevCTable, prevCTableSize); + return 0; + case set_basic: + FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, defaultNorm, defaultMax, defaultNormLog, entropyWorkspace, entropyWorkspaceSize), ""); /* note : could be pre-calculated */ + return 0; + case set_compressed: { + ZSTD_BuildCTableWksp* wksp = (ZSTD_BuildCTableWksp*)entropyWorkspace; + size_t nbSeq_1 = nbSeq; + const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); + if (count[codeTable[nbSeq-1]] > 1) { + count[codeTable[nbSeq-1]]--; + nbSeq_1--; + } + assert(nbSeq_1 > 1); + assert(entropyWorkspaceSize >= sizeof(ZSTD_BuildCTableWksp)); + (void)entropyWorkspaceSize; + FORWARD_IF_ERROR(FSE_normalizeCount(wksp->norm, tableLog, count, nbSeq_1, max, ZSTD_useLowProbCount(nbSeq_1)), "FSE_normalizeCount failed"); + assert(oend >= op); + { size_t const NCountSize = FSE_writeNCount(op, (size_t)(oend - op), wksp->norm, max, tableLog); /* overflow protected */ + FORWARD_IF_ERROR(NCountSize, "FSE_writeNCount failed"); + FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, wksp->norm, max, tableLog, wksp->wksp, sizeof(wksp->wksp)), "FSE_buildCTable_wksp failed"); + return NCountSize; + } + } + default: assert(0); RETURN_ERROR(GENERIC, "impossible to reach"); + } +} + +FORCE_INLINE_TEMPLATE size_t +ZSTD_encodeSequences_body( + void* dst, size_t dstCapacity, + FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, + FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, + FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, + SeqDef const* sequences, size_t nbSeq, int longOffsets) +{ + BIT_CStream_t blockStream; + FSE_CState_t stateMatchLength; + FSE_CState_t stateOffsetBits; + FSE_CState_t stateLitLength; + + RETURN_ERROR_IF( + ERR_isError(BIT_initCStream(&blockStream, dst, dstCapacity)), + dstSize_tooSmall, "not enough space remaining"); + DEBUGLOG(6, "available space for bitstream : %i (dstCapacity=%u)", + (int)(blockStream.endPtr - blockStream.startPtr), + (unsigned)dstCapacity); + + /* first symbols */ + FSE_initCState2(&stateMatchLength, CTable_MatchLength, mlCodeTable[nbSeq-1]); + FSE_initCState2(&stateOffsetBits, CTable_OffsetBits, ofCodeTable[nbSeq-1]); + FSE_initCState2(&stateLitLength, CTable_LitLength, llCodeTable[nbSeq-1]); + BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]); + if (MEM_32bits()) BIT_flushBits(&blockStream); + BIT_addBits(&blockStream, sequences[nbSeq-1].mlBase, ML_bits[mlCodeTable[nbSeq-1]]); + if (MEM_32bits()) BIT_flushBits(&blockStream); + if (longOffsets) { + U32 const ofBits = ofCodeTable[nbSeq-1]; + unsigned const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); + if (extraBits) { + BIT_addBits(&blockStream, sequences[nbSeq-1].offBase, extraBits); + BIT_flushBits(&blockStream); + } + BIT_addBits(&blockStream, sequences[nbSeq-1].offBase >> extraBits, + ofBits - extraBits); + } else { + BIT_addBits(&blockStream, sequences[nbSeq-1].offBase, ofCodeTable[nbSeq-1]); + } + BIT_flushBits(&blockStream); + + { size_t n; + for (n=nbSeq-2 ; n= 64-7-(LLFSELog+MLFSELog+OffFSELog))) + BIT_flushBits(&blockStream); /* (7)*/ + BIT_addBits(&blockStream, sequences[n].litLength, llBits); + if (MEM_32bits() && ((llBits+mlBits)>24)) BIT_flushBits(&blockStream); + BIT_addBits(&blockStream, sequences[n].mlBase, mlBits); + if (MEM_32bits() || (ofBits+mlBits+llBits > 56)) BIT_flushBits(&blockStream); + if (longOffsets) { + unsigned const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1); + if (extraBits) { + BIT_addBits(&blockStream, sequences[n].offBase, extraBits); + BIT_flushBits(&blockStream); /* (7)*/ + } + BIT_addBits(&blockStream, sequences[n].offBase >> extraBits, + ofBits - extraBits); /* 31 */ + } else { + BIT_addBits(&blockStream, sequences[n].offBase, ofBits); /* 31 */ + } + BIT_flushBits(&blockStream); /* (7)*/ + DEBUGLOG(7, "remaining space : %i", (int)(blockStream.endPtr - blockStream.ptr)); + } } + + DEBUGLOG(6, "ZSTD_encodeSequences: flushing ML state with %u bits", stateMatchLength.stateLog); + FSE_flushCState(&blockStream, &stateMatchLength); + DEBUGLOG(6, "ZSTD_encodeSequences: flushing Off state with %u bits", stateOffsetBits.stateLog); + FSE_flushCState(&blockStream, &stateOffsetBits); + DEBUGLOG(6, "ZSTD_encodeSequences: flushing LL state with %u bits", stateLitLength.stateLog); + FSE_flushCState(&blockStream, &stateLitLength); + + { size_t const streamSize = BIT_closeCStream(&blockStream); + RETURN_ERROR_IF(streamSize==0, dstSize_tooSmall, "not enough space"); + return streamSize; + } +} + +static size_t +ZSTD_encodeSequences_default( + void* dst, size_t dstCapacity, + FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, + FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, + FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, + SeqDef const* sequences, size_t nbSeq, int longOffsets) +{ + return ZSTD_encodeSequences_body(dst, dstCapacity, + CTable_MatchLength, mlCodeTable, + CTable_OffsetBits, ofCodeTable, + CTable_LitLength, llCodeTable, + sequences, nbSeq, longOffsets); +} + + +#if DYNAMIC_BMI2 + +static BMI2_TARGET_ATTRIBUTE size_t +ZSTD_encodeSequences_bmi2( + void* dst, size_t dstCapacity, + FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, + FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, + FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, + SeqDef const* sequences, size_t nbSeq, int longOffsets) +{ + return ZSTD_encodeSequences_body(dst, dstCapacity, + CTable_MatchLength, mlCodeTable, + CTable_OffsetBits, ofCodeTable, + CTable_LitLength, llCodeTable, + sequences, nbSeq, longOffsets); +} + +#endif + +size_t ZSTD_encodeSequences( + void* dst, size_t dstCapacity, + FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, + FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, + FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, + SeqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2) +{ + DEBUGLOG(5, "ZSTD_encodeSequences: dstCapacity = %u", (unsigned)dstCapacity); +#if DYNAMIC_BMI2 + if (bmi2) { + return ZSTD_encodeSequences_bmi2(dst, dstCapacity, + CTable_MatchLength, mlCodeTable, + CTable_OffsetBits, ofCodeTable, + CTable_LitLength, llCodeTable, + sequences, nbSeq, longOffsets); + } +#endif + (void)bmi2; + return ZSTD_encodeSequences_default(dst, dstCapacity, + CTable_MatchLength, mlCodeTable, + CTable_OffsetBits, ofCodeTable, + CTable_LitLength, llCodeTable, + sequences, nbSeq, longOffsets); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.h new file mode 100644 index 0000000000..4be8e91f24 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_sequences.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_COMPRESS_SEQUENCES_H +#define ZSTD_COMPRESS_SEQUENCES_H + +#include "zstd_compress_internal.h" /* SeqDef */ +#include "../common/fse.h" /* FSE_repeat, FSE_CTable */ +#include "../common/zstd_internal.h" /* SymbolEncodingType_e, ZSTD_strategy */ + +typedef enum { + ZSTD_defaultDisallowed = 0, + ZSTD_defaultAllowed = 1 +} ZSTD_DefaultPolicy_e; + +SymbolEncodingType_e +ZSTD_selectEncodingType( + FSE_repeat* repeatMode, unsigned const* count, unsigned const max, + size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, + FSE_CTable const* prevCTable, + short const* defaultNorm, U32 defaultNormLog, + ZSTD_DefaultPolicy_e const isDefaultAllowed, + ZSTD_strategy const strategy); + +size_t +ZSTD_buildCTable(void* dst, size_t dstCapacity, + FSE_CTable* nextCTable, U32 FSELog, SymbolEncodingType_e type, + unsigned* count, U32 max, + const BYTE* codeTable, size_t nbSeq, + const S16* defaultNorm, U32 defaultNormLog, U32 defaultMax, + const FSE_CTable* prevCTable, size_t prevCTableSize, + void* entropyWorkspace, size_t entropyWorkspaceSize); + +size_t ZSTD_encodeSequences( + void* dst, size_t dstCapacity, + FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, + FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, + FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, + SeqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2); + +size_t ZSTD_fseBitCost( + FSE_CTable const* ctable, + unsigned const* count, + unsigned const max); + +size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog, + unsigned const* count, unsigned const max); +#endif /* ZSTD_COMPRESS_SEQUENCES_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.c new file mode 100644 index 0000000000..6f57345be6 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.c @@ -0,0 +1,688 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + /*-************************************* + * Dependencies + ***************************************/ +#include "zstd_compress_superblock.h" + +#include "../common/zstd_internal.h" /* ZSTD_getSequenceLength */ +#include "hist.h" /* HIST_countFast_wksp */ +#include "zstd_compress_internal.h" /* ZSTD_[huf|fse|entropy]CTablesMetadata_t */ +#include "zstd_compress_sequences.h" +#include "zstd_compress_literals.h" + +/** ZSTD_compressSubBlock_literal() : + * Compresses literals section for a sub-block. + * When we have to write the Huffman table we will sometimes choose a header + * size larger than necessary. This is because we have to pick the header size + * before we know the table size + compressed size, so we have a bound on the + * table size. If we guessed incorrectly, we fall back to uncompressed literals. + * + * We write the header when writeEntropy=1 and set entropyWritten=1 when we succeeded + * in writing the header, otherwise it is set to 0. + * + * hufMetadata->hType has literals block type info. + * If it is set_basic, all sub-blocks literals section will be Raw_Literals_Block. + * If it is set_rle, all sub-blocks literals section will be RLE_Literals_Block. + * If it is set_compressed, first sub-block's literals section will be Compressed_Literals_Block + * If it is set_compressed, first sub-block's literals section will be Treeless_Literals_Block + * and the following sub-blocks' literals sections will be Treeless_Literals_Block. + * @return : compressed size of literals section of a sub-block + * Or 0 if unable to compress. + * Or error code */ +static size_t +ZSTD_compressSubBlock_literal(const HUF_CElt* hufTable, + const ZSTD_hufCTablesMetadata_t* hufMetadata, + const BYTE* literals, size_t litSize, + void* dst, size_t dstSize, + const int bmi2, int writeEntropy, int* entropyWritten) +{ + size_t const header = writeEntropy ? 200 : 0; + size_t const lhSize = 3 + (litSize >= (1 KB - header)) + (litSize >= (16 KB - header)); + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstSize; + BYTE* op = ostart + lhSize; + U32 const singleStream = lhSize == 3; + SymbolEncodingType_e hType = writeEntropy ? hufMetadata->hType : set_repeat; + size_t cLitSize = 0; + + DEBUGLOG(5, "ZSTD_compressSubBlock_literal (litSize=%zu, lhSize=%zu, writeEntropy=%d)", litSize, lhSize, writeEntropy); + + *entropyWritten = 0; + if (litSize == 0 || hufMetadata->hType == set_basic) { + DEBUGLOG(5, "ZSTD_compressSubBlock_literal using raw literal"); + return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); + } else if (hufMetadata->hType == set_rle) { + DEBUGLOG(5, "ZSTD_compressSubBlock_literal using rle literal"); + return ZSTD_compressRleLiteralsBlock(dst, dstSize, literals, litSize); + } + + assert(litSize > 0); + assert(hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat); + + if (writeEntropy && hufMetadata->hType == set_compressed) { + ZSTD_memcpy(op, hufMetadata->hufDesBuffer, hufMetadata->hufDesSize); + op += hufMetadata->hufDesSize; + cLitSize += hufMetadata->hufDesSize; + DEBUGLOG(5, "ZSTD_compressSubBlock_literal (hSize=%zu)", hufMetadata->hufDesSize); + } + + { int const flags = bmi2 ? HUF_flags_bmi2 : 0; + const size_t cSize = singleStream ? HUF_compress1X_usingCTable(op, (size_t)(oend-op), literals, litSize, hufTable, flags) + : HUF_compress4X_usingCTable(op, (size_t)(oend-op), literals, litSize, hufTable, flags); + op += cSize; + cLitSize += cSize; + if (cSize == 0 || ERR_isError(cSize)) { + DEBUGLOG(5, "Failed to write entropy tables %s", ZSTD_getErrorName(cSize)); + return 0; + } + /* If we expand and we aren't writing a header then emit uncompressed */ + if (!writeEntropy && cLitSize >= litSize) { + DEBUGLOG(5, "ZSTD_compressSubBlock_literal using raw literal because uncompressible"); + return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); + } + /* If we are writing headers then allow expansion that doesn't change our header size. */ + if (lhSize < (size_t)(3 + (cLitSize >= 1 KB) + (cLitSize >= 16 KB))) { + assert(cLitSize > litSize); + DEBUGLOG(5, "Literals expanded beyond allowed header size"); + return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); + } + DEBUGLOG(5, "ZSTD_compressSubBlock_literal (cSize=%zu)", cSize); + } + + /* Build header */ + switch(lhSize) + { + case 3: /* 2 - 2 - 10 - 10 */ + { U32 const lhc = hType + ((U32)(!singleStream) << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<14); + MEM_writeLE24(ostart, lhc); + break; + } + case 4: /* 2 - 2 - 14 - 14 */ + { U32 const lhc = hType + (2 << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<18); + MEM_writeLE32(ostart, lhc); + break; + } + case 5: /* 2 - 2 - 18 - 18 */ + { U32 const lhc = hType + (3 << 2) + ((U32)litSize<<4) + ((U32)cLitSize<<22); + MEM_writeLE32(ostart, lhc); + ostart[4] = (BYTE)(cLitSize >> 10); + break; + } + default: /* not possible : lhSize is {3,4,5} */ + assert(0); + } + *entropyWritten = 1; + DEBUGLOG(5, "Compressed literals: %u -> %u", (U32)litSize, (U32)(op-ostart)); + return (size_t)(op-ostart); +} + +static size_t +ZSTD_seqDecompressedSize(SeqStore_t const* seqStore, + const SeqDef* sequences, size_t nbSeqs, + size_t litSize, int lastSubBlock) +{ + size_t matchLengthSum = 0; + size_t litLengthSum = 0; + size_t n; + for (n=0; nllType, fseMetadata->ofType, and fseMetadata->mlType have + * symbol compression modes for the super-block. + * The first successfully compressed block will have these in its header. + * We set entropyWritten=1 when we succeed in compressing the sequences. + * The following sub-blocks will always have repeat mode. + * @return : compressed size of sequences section of a sub-block + * Or 0 if it is unable to compress + * Or error code. */ +static size_t +ZSTD_compressSubBlock_sequences(const ZSTD_fseCTables_t* fseTables, + const ZSTD_fseCTablesMetadata_t* fseMetadata, + const SeqDef* sequences, size_t nbSeq, + const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, + const ZSTD_CCtx_params* cctxParams, + void* dst, size_t dstCapacity, + const int bmi2, int writeEntropy, int* entropyWritten) +{ + const int longOffsets = cctxParams->cParams.windowLog > STREAM_ACCUMULATOR_MIN; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstCapacity; + BYTE* op = ostart; + BYTE* seqHead; + + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (nbSeq=%zu, writeEntropy=%d, longOffsets=%d)", nbSeq, writeEntropy, longOffsets); + + *entropyWritten = 0; + /* Sequences Header */ + RETURN_ERROR_IF((oend-op) < 3 /*max nbSeq Size*/ + 1 /*seqHead*/, + dstSize_tooSmall, ""); + if (nbSeq < 128) + *op++ = (BYTE)nbSeq; + else if (nbSeq < LONGNBSEQ) + op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2; + else + op[0]=0xFF, MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)), op+=3; + if (nbSeq==0) { + return (size_t)(op - ostart); + } + + /* seqHead : flags for FSE encoding type */ + seqHead = op++; + + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (seqHeadSize=%u)", (unsigned)(op-ostart)); + + if (writeEntropy) { + const U32 LLtype = fseMetadata->llType; + const U32 Offtype = fseMetadata->ofType; + const U32 MLtype = fseMetadata->mlType; + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (fseTablesSize=%zu)", fseMetadata->fseTablesSize); + *seqHead = (BYTE)((LLtype<<6) + (Offtype<<4) + (MLtype<<2)); + ZSTD_memcpy(op, fseMetadata->fseTablesBuffer, fseMetadata->fseTablesSize); + op += fseMetadata->fseTablesSize; + } else { + const U32 repeat = set_repeat; + *seqHead = (BYTE)((repeat<<6) + (repeat<<4) + (repeat<<2)); + } + + { size_t const bitstreamSize = ZSTD_encodeSequences( + op, (size_t)(oend - op), + fseTables->matchlengthCTable, mlCode, + fseTables->offcodeCTable, ofCode, + fseTables->litlengthCTable, llCode, + sequences, nbSeq, + longOffsets, bmi2); + FORWARD_IF_ERROR(bitstreamSize, "ZSTD_encodeSequences failed"); + op += bitstreamSize; + /* zstd versions <= 1.3.4 mistakenly report corruption when + * FSE_readNCount() receives a buffer < 4 bytes. + * Fixed by https://github.com/facebook/zstd/pull/1146. + * This can happen when the last set_compressed table present is 2 + * bytes and the bitstream is only one byte. + * In this exceedingly rare case, we will simply emit an uncompressed + * block, since it isn't worth optimizing. + */ +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + if (writeEntropy && fseMetadata->lastCountSize && fseMetadata->lastCountSize + bitstreamSize < 4) { + /* NCountSize >= 2 && bitstreamSize > 0 ==> lastCountSize == 3 */ + assert(fseMetadata->lastCountSize + bitstreamSize == 3); + DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.3.4 by " + "emitting an uncompressed block."); + return 0; + } +#endif + DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (bitstreamSize=%zu)", bitstreamSize); + } + + /* zstd versions <= 1.4.0 mistakenly report error when + * sequences section body size is less than 3 bytes. + * Fixed by https://github.com/facebook/zstd/pull/1664. + * This can happen when the previous sequences section block is compressed + * with rle mode and the current block's sequences section is compressed + * with repeat mode where sequences section body size can be 1 byte. + */ +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + if (op-seqHead < 4) { + DEBUGLOG(5, "Avoiding bug in zstd decoder in versions <= 1.4.0 by emitting " + "an uncompressed block when sequences are < 4 bytes"); + return 0; + } +#endif + + *entropyWritten = 1; + return (size_t)(op - ostart); +} + +/** ZSTD_compressSubBlock() : + * Compresses a single sub-block. + * @return : compressed size of the sub-block + * Or 0 if it failed to compress. */ +static size_t ZSTD_compressSubBlock(const ZSTD_entropyCTables_t* entropy, + const ZSTD_entropyCTablesMetadata_t* entropyMetadata, + const SeqDef* sequences, size_t nbSeq, + const BYTE* literals, size_t litSize, + const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, + const ZSTD_CCtx_params* cctxParams, + void* dst, size_t dstCapacity, + const int bmi2, + int writeLitEntropy, int writeSeqEntropy, + int* litEntropyWritten, int* seqEntropyWritten, + U32 lastBlock) +{ + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstCapacity; + BYTE* op = ostart + ZSTD_blockHeaderSize; + DEBUGLOG(5, "ZSTD_compressSubBlock (litSize=%zu, nbSeq=%zu, writeLitEntropy=%d, writeSeqEntropy=%d, lastBlock=%d)", + litSize, nbSeq, writeLitEntropy, writeSeqEntropy, lastBlock); + { size_t cLitSize = ZSTD_compressSubBlock_literal((const HUF_CElt*)entropy->huf.CTable, + &entropyMetadata->hufMetadata, literals, litSize, + op, (size_t)(oend-op), + bmi2, writeLitEntropy, litEntropyWritten); + FORWARD_IF_ERROR(cLitSize, "ZSTD_compressSubBlock_literal failed"); + if (cLitSize == 0) return 0; + op += cLitSize; + } + { size_t cSeqSize = ZSTD_compressSubBlock_sequences(&entropy->fse, + &entropyMetadata->fseMetadata, + sequences, nbSeq, + llCode, mlCode, ofCode, + cctxParams, + op, (size_t)(oend-op), + bmi2, writeSeqEntropy, seqEntropyWritten); + FORWARD_IF_ERROR(cSeqSize, "ZSTD_compressSubBlock_sequences failed"); + if (cSeqSize == 0) return 0; + op += cSeqSize; + } + /* Write block header */ + { size_t cSize = (size_t)(op-ostart) - ZSTD_blockHeaderSize; + U32 const cBlockHeader24 = lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3); + MEM_writeLE24(ostart, cBlockHeader24); + } + return (size_t)(op-ostart); +} + +static size_t ZSTD_estimateSubBlockSize_literal(const BYTE* literals, size_t litSize, + const ZSTD_hufCTables_t* huf, + const ZSTD_hufCTablesMetadata_t* hufMetadata, + void* workspace, size_t wkspSize, + int writeEntropy) +{ + unsigned* const countWksp = (unsigned*)workspace; + unsigned maxSymbolValue = 255; + size_t literalSectionHeaderSize = 3; /* Use hard coded size of 3 bytes */ + + if (hufMetadata->hType == set_basic) return litSize; + else if (hufMetadata->hType == set_rle) return 1; + else if (hufMetadata->hType == set_compressed || hufMetadata->hType == set_repeat) { + size_t const largest = HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)literals, litSize, workspace, wkspSize); + if (ZSTD_isError(largest)) return litSize; + { size_t cLitSizeEstimate = HUF_estimateCompressedSize((const HUF_CElt*)huf->CTable, countWksp, maxSymbolValue); + if (writeEntropy) cLitSizeEstimate += hufMetadata->hufDesSize; + return cLitSizeEstimate + literalSectionHeaderSize; + } } + assert(0); /* impossible */ + return 0; +} + +static size_t ZSTD_estimateSubBlockSize_symbolType(SymbolEncodingType_e type, + const BYTE* codeTable, unsigned maxCode, + size_t nbSeq, const FSE_CTable* fseCTable, + const U8* additionalBits, + short const* defaultNorm, U32 defaultNormLog, U32 defaultMax, + void* workspace, size_t wkspSize) +{ + unsigned* const countWksp = (unsigned*)workspace; + const BYTE* ctp = codeTable; + const BYTE* const ctStart = ctp; + const BYTE* const ctEnd = ctStart + nbSeq; + size_t cSymbolTypeSizeEstimateInBits = 0; + unsigned max = maxCode; + + HIST_countFast_wksp(countWksp, &max, codeTable, nbSeq, workspace, wkspSize); /* can't fail */ + if (type == set_basic) { + /* We selected this encoding type, so it must be valid. */ + assert(max <= defaultMax); + cSymbolTypeSizeEstimateInBits = max <= defaultMax + ? ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, countWksp, max) + : ERROR(GENERIC); + } else if (type == set_rle) { + cSymbolTypeSizeEstimateInBits = 0; + } else if (type == set_compressed || type == set_repeat) { + cSymbolTypeSizeEstimateInBits = ZSTD_fseBitCost(fseCTable, countWksp, max); + } + if (ZSTD_isError(cSymbolTypeSizeEstimateInBits)) return nbSeq * 10; + while (ctp < ctEnd) { + if (additionalBits) cSymbolTypeSizeEstimateInBits += additionalBits[*ctp]; + else cSymbolTypeSizeEstimateInBits += *ctp; /* for offset, offset code is also the number of additional bits */ + ctp++; + } + return cSymbolTypeSizeEstimateInBits / 8; +} + +static size_t ZSTD_estimateSubBlockSize_sequences(const BYTE* ofCodeTable, + const BYTE* llCodeTable, + const BYTE* mlCodeTable, + size_t nbSeq, + const ZSTD_fseCTables_t* fseTables, + const ZSTD_fseCTablesMetadata_t* fseMetadata, + void* workspace, size_t wkspSize, + int writeEntropy) +{ + size_t const sequencesSectionHeaderSize = 3; /* Use hard coded size of 3 bytes */ + size_t cSeqSizeEstimate = 0; + if (nbSeq == 0) return sequencesSectionHeaderSize; + cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->ofType, ofCodeTable, MaxOff, + nbSeq, fseTables->offcodeCTable, NULL, + OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, + workspace, wkspSize); + cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->llType, llCodeTable, MaxLL, + nbSeq, fseTables->litlengthCTable, LL_bits, + LL_defaultNorm, LL_defaultNormLog, MaxLL, + workspace, wkspSize); + cSeqSizeEstimate += ZSTD_estimateSubBlockSize_symbolType(fseMetadata->mlType, mlCodeTable, MaxML, + nbSeq, fseTables->matchlengthCTable, ML_bits, + ML_defaultNorm, ML_defaultNormLog, MaxML, + workspace, wkspSize); + if (writeEntropy) cSeqSizeEstimate += fseMetadata->fseTablesSize; + return cSeqSizeEstimate + sequencesSectionHeaderSize; +} + +typedef struct { + size_t estLitSize; + size_t estBlockSize; +} EstimatedBlockSize; +static EstimatedBlockSize ZSTD_estimateSubBlockSize(const BYTE* literals, size_t litSize, + const BYTE* ofCodeTable, + const BYTE* llCodeTable, + const BYTE* mlCodeTable, + size_t nbSeq, + const ZSTD_entropyCTables_t* entropy, + const ZSTD_entropyCTablesMetadata_t* entropyMetadata, + void* workspace, size_t wkspSize, + int writeLitEntropy, int writeSeqEntropy) +{ + EstimatedBlockSize ebs; + ebs.estLitSize = ZSTD_estimateSubBlockSize_literal(literals, litSize, + &entropy->huf, &entropyMetadata->hufMetadata, + workspace, wkspSize, writeLitEntropy); + ebs.estBlockSize = ZSTD_estimateSubBlockSize_sequences(ofCodeTable, llCodeTable, mlCodeTable, + nbSeq, &entropy->fse, &entropyMetadata->fseMetadata, + workspace, wkspSize, writeSeqEntropy); + ebs.estBlockSize += ebs.estLitSize + ZSTD_blockHeaderSize; + return ebs; +} + +static int ZSTD_needSequenceEntropyTables(ZSTD_fseCTablesMetadata_t const* fseMetadata) +{ + if (fseMetadata->llType == set_compressed || fseMetadata->llType == set_rle) + return 1; + if (fseMetadata->mlType == set_compressed || fseMetadata->mlType == set_rle) + return 1; + if (fseMetadata->ofType == set_compressed || fseMetadata->ofType == set_rle) + return 1; + return 0; +} + +static size_t countLiterals(SeqStore_t const* seqStore, const SeqDef* sp, size_t seqCount) +{ + size_t n, total = 0; + assert(sp != NULL); + for (n=0; n %zu bytes", seqCount, (const void*)sp, total); + return total; +} + +#define BYTESCALE 256 + +static size_t sizeBlockSequences(const SeqDef* sp, size_t nbSeqs, + size_t targetBudget, size_t avgLitCost, size_t avgSeqCost, + int firstSubBlock) +{ + size_t n, budget = 0, inSize=0; + /* entropy headers */ + size_t const headerSize = (size_t)firstSubBlock * 120 * BYTESCALE; /* generous estimate */ + assert(firstSubBlock==0 || firstSubBlock==1); + budget += headerSize; + + /* first sequence => at least one sequence*/ + budget += sp[0].litLength * avgLitCost + avgSeqCost; + if (budget > targetBudget) return 1; + inSize = sp[0].litLength + (sp[0].mlBase+MINMATCH); + + /* loop over sequences */ + for (n=1; n targetBudget) + /* though continue to expand until the sub-block is deemed compressible */ + && (budget < inSize * BYTESCALE) ) + break; + } + + return n; +} + +/** ZSTD_compressSubBlock_multi() : + * Breaks super-block into multiple sub-blocks and compresses them. + * Entropy will be written into the first block. + * The following blocks use repeat_mode to compress. + * Sub-blocks are all compressed, except the last one when beneficial. + * @return : compressed size of the super block (which features multiple ZSTD blocks) + * or 0 if it failed to compress. */ +static size_t ZSTD_compressSubBlock_multi(const SeqStore_t* seqStorePtr, + const ZSTD_compressedBlockState_t* prevCBlock, + ZSTD_compressedBlockState_t* nextCBlock, + const ZSTD_entropyCTablesMetadata_t* entropyMetadata, + const ZSTD_CCtx_params* cctxParams, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const int bmi2, U32 lastBlock, + void* workspace, size_t wkspSize) +{ + const SeqDef* const sstart = seqStorePtr->sequencesStart; + const SeqDef* const send = seqStorePtr->sequences; + const SeqDef* sp = sstart; /* tracks progresses within seqStorePtr->sequences */ + size_t const nbSeqs = (size_t)(send - sstart); + const BYTE* const lstart = seqStorePtr->litStart; + const BYTE* const lend = seqStorePtr->lit; + const BYTE* lp = lstart; + size_t const nbLiterals = (size_t)(lend - lstart); + BYTE const* ip = (BYTE const*)src; + BYTE const* const iend = ip + srcSize; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ostart + dstCapacity; + BYTE* op = ostart; + const BYTE* llCodePtr = seqStorePtr->llCode; + const BYTE* mlCodePtr = seqStorePtr->mlCode; + const BYTE* ofCodePtr = seqStorePtr->ofCode; + size_t const minTarget = ZSTD_TARGETCBLOCKSIZE_MIN; /* enforce minimum size, to reduce undesirable side effects */ + size_t const targetCBlockSize = MAX(minTarget, cctxParams->targetCBlockSize); + int writeLitEntropy = (entropyMetadata->hufMetadata.hType == set_compressed); + int writeSeqEntropy = 1; + + DEBUGLOG(5, "ZSTD_compressSubBlock_multi (srcSize=%u, litSize=%u, nbSeq=%u)", + (unsigned)srcSize, (unsigned)(lend-lstart), (unsigned)(send-sstart)); + + /* let's start by a general estimation for the full block */ + if (nbSeqs > 0) { + EstimatedBlockSize const ebs = + ZSTD_estimateSubBlockSize(lp, nbLiterals, + ofCodePtr, llCodePtr, mlCodePtr, nbSeqs, + &nextCBlock->entropy, entropyMetadata, + workspace, wkspSize, + writeLitEntropy, writeSeqEntropy); + /* quick estimation */ + size_t const avgLitCost = nbLiterals ? (ebs.estLitSize * BYTESCALE) / nbLiterals : BYTESCALE; + size_t const avgSeqCost = ((ebs.estBlockSize - ebs.estLitSize) * BYTESCALE) / nbSeqs; + const size_t nbSubBlocks = MAX((ebs.estBlockSize + (targetCBlockSize/2)) / targetCBlockSize, 1); + size_t n, avgBlockBudget, blockBudgetSupp=0; + avgBlockBudget = (ebs.estBlockSize * BYTESCALE) / nbSubBlocks; + DEBUGLOG(5, "estimated fullblock size=%u bytes ; avgLitCost=%.2f ; avgSeqCost=%.2f ; targetCBlockSize=%u, nbSubBlocks=%u ; avgBlockBudget=%.0f bytes", + (unsigned)ebs.estBlockSize, (double)avgLitCost/BYTESCALE, (double)avgSeqCost/BYTESCALE, + (unsigned)targetCBlockSize, (unsigned)nbSubBlocks, (double)avgBlockBudget/BYTESCALE); + /* simplification: if estimates states that the full superblock doesn't compress, just bail out immediately + * this will result in the production of a single uncompressed block covering @srcSize.*/ + if (ebs.estBlockSize > srcSize) return 0; + + /* compress and write sub-blocks */ + assert(nbSubBlocks>0); + for (n=0; n < nbSubBlocks-1; n++) { + /* determine nb of sequences for current sub-block + nbLiterals from next sequence */ + size_t const seqCount = sizeBlockSequences(sp, (size_t)(send-sp), + avgBlockBudget + blockBudgetSupp, avgLitCost, avgSeqCost, n==0); + /* if reached last sequence : break to last sub-block (simplification) */ + assert(seqCount <= (size_t)(send-sp)); + if (sp + seqCount == send) break; + assert(seqCount > 0); + /* compress sub-block */ + { int litEntropyWritten = 0; + int seqEntropyWritten = 0; + size_t litSize = countLiterals(seqStorePtr, sp, seqCount); + const size_t decompressedSize = + ZSTD_seqDecompressedSize(seqStorePtr, sp, seqCount, litSize, 0); + size_t const cSize = ZSTD_compressSubBlock(&nextCBlock->entropy, entropyMetadata, + sp, seqCount, + lp, litSize, + llCodePtr, mlCodePtr, ofCodePtr, + cctxParams, + op, (size_t)(oend-op), + bmi2, writeLitEntropy, writeSeqEntropy, + &litEntropyWritten, &seqEntropyWritten, + 0); + FORWARD_IF_ERROR(cSize, "ZSTD_compressSubBlock failed"); + + /* check compressibility, update state components */ + if (cSize > 0 && cSize < decompressedSize) { + DEBUGLOG(5, "Committed sub-block compressing %u bytes => %u bytes", + (unsigned)decompressedSize, (unsigned)cSize); + assert(ip + decompressedSize <= iend); + ip += decompressedSize; + lp += litSize; + op += cSize; + llCodePtr += seqCount; + mlCodePtr += seqCount; + ofCodePtr += seqCount; + /* Entropy only needs to be written once */ + if (litEntropyWritten) { + writeLitEntropy = 0; + } + if (seqEntropyWritten) { + writeSeqEntropy = 0; + } + sp += seqCount; + blockBudgetSupp = 0; + } } + /* otherwise : do not compress yet, coalesce current sub-block with following one */ + } + } /* if (nbSeqs > 0) */ + + /* write last block */ + DEBUGLOG(5, "Generate last sub-block: %u sequences remaining", (unsigned)(send - sp)); + { int litEntropyWritten = 0; + int seqEntropyWritten = 0; + size_t litSize = (size_t)(lend - lp); + size_t seqCount = (size_t)(send - sp); + const size_t decompressedSize = + ZSTD_seqDecompressedSize(seqStorePtr, sp, seqCount, litSize, 1); + size_t const cSize = ZSTD_compressSubBlock(&nextCBlock->entropy, entropyMetadata, + sp, seqCount, + lp, litSize, + llCodePtr, mlCodePtr, ofCodePtr, + cctxParams, + op, (size_t)(oend-op), + bmi2, writeLitEntropy, writeSeqEntropy, + &litEntropyWritten, &seqEntropyWritten, + lastBlock); + FORWARD_IF_ERROR(cSize, "ZSTD_compressSubBlock failed"); + + /* update pointers, the nb of literals borrowed from next sequence must be preserved */ + if (cSize > 0 && cSize < decompressedSize) { + DEBUGLOG(5, "Last sub-block compressed %u bytes => %u bytes", + (unsigned)decompressedSize, (unsigned)cSize); + assert(ip + decompressedSize <= iend); + ip += decompressedSize; + lp += litSize; + op += cSize; + llCodePtr += seqCount; + mlCodePtr += seqCount; + ofCodePtr += seqCount; + /* Entropy only needs to be written once */ + if (litEntropyWritten) { + writeLitEntropy = 0; + } + if (seqEntropyWritten) { + writeSeqEntropy = 0; + } + sp += seqCount; + } + } + + + if (writeLitEntropy) { + DEBUGLOG(5, "Literal entropy tables were never written"); + ZSTD_memcpy(&nextCBlock->entropy.huf, &prevCBlock->entropy.huf, sizeof(prevCBlock->entropy.huf)); + } + if (writeSeqEntropy && ZSTD_needSequenceEntropyTables(&entropyMetadata->fseMetadata)) { + /* If we haven't written our entropy tables, then we've violated our contract and + * must emit an uncompressed block. + */ + DEBUGLOG(5, "Sequence entropy tables were never written => cancel, emit an uncompressed block"); + return 0; + } + + if (ip < iend) { + /* some data left : last part of the block sent uncompressed */ + size_t const rSize = (size_t)((iend - ip)); + size_t const cSize = ZSTD_noCompressBlock(op, (size_t)(oend - op), ip, rSize, lastBlock); + DEBUGLOG(5, "Generate last uncompressed sub-block of %u bytes", (unsigned)(rSize)); + FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed"); + assert(cSize != 0); + op += cSize; + /* We have to regenerate the repcodes because we've skipped some sequences */ + if (sp < send) { + const SeqDef* seq; + Repcodes_t rep; + ZSTD_memcpy(&rep, prevCBlock->rep, sizeof(rep)); + for (seq = sstart; seq < sp; ++seq) { + ZSTD_updateRep(rep.rep, seq->offBase, ZSTD_getSequenceLength(seqStorePtr, seq).litLength == 0); + } + ZSTD_memcpy(nextCBlock->rep, &rep, sizeof(rep)); + } + } + + DEBUGLOG(5, "ZSTD_compressSubBlock_multi compressed all subBlocks: total compressed size = %u", + (unsigned)(op-ostart)); + return (size_t)(op-ostart); +} + +size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + unsigned lastBlock) +{ + ZSTD_entropyCTablesMetadata_t entropyMetadata; + + FORWARD_IF_ERROR(ZSTD_buildBlockEntropyStats(&zc->seqStore, + &zc->blockState.prevCBlock->entropy, + &zc->blockState.nextCBlock->entropy, + &zc->appliedParams, + &entropyMetadata, + zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */), ""); + + return ZSTD_compressSubBlock_multi(&zc->seqStore, + zc->blockState.prevCBlock, + zc->blockState.nextCBlock, + &entropyMetadata, + &zc->appliedParams, + dst, dstCapacity, + src, srcSize, + zc->bmi2, lastBlock, + zc->tmpWorkspace, zc->tmpWkspSize /* statically allocated in resetCCtx */); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.h new file mode 100644 index 0000000000..8e494f0d5e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_compress_superblock.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_COMPRESS_ADVANCED_H +#define ZSTD_COMPRESS_ADVANCED_H + +/*-************************************* +* Dependencies +***************************************/ + +#include "../zstd.h" /* ZSTD_CCtx */ + +/*-************************************* +* Target Compressed Block Size +***************************************/ + +/* ZSTD_compressSuperBlock() : + * Used to compress a super block when targetCBlockSize is being used. + * The given block will be compressed into multiple sub blocks that are around targetCBlockSize. */ +size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc, + void* dst, size_t dstCapacity, + void const* src, size_t srcSize, + unsigned lastBlock); + +#endif /* ZSTD_COMPRESS_ADVANCED_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_cwksp.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_cwksp.h new file mode 100644 index 0000000000..77518002d0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_cwksp.h @@ -0,0 +1,765 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_CWKSP_H +#define ZSTD_CWKSP_H + +/*-************************************* +* Dependencies +***************************************/ +#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customFree */ +#include "../common/zstd_internal.h" +#include "../common/portability_macros.h" +#include "../common/compiler.h" /* ZS2_isPower2 */ + +/*-************************************* +* Constants +***************************************/ + +/* Since the workspace is effectively its own little malloc implementation / + * arena, when we run under ASAN, we should similarly insert redzones between + * each internal element of the workspace, so ASAN will catch overruns that + * reach outside an object but that stay inside the workspace. + * + * This defines the size of that redzone. + */ +#ifndef ZSTD_CWKSP_ASAN_REDZONE_SIZE +#define ZSTD_CWKSP_ASAN_REDZONE_SIZE 128 +#endif + + +/* Set our tables and aligneds to align by 64 bytes */ +#define ZSTD_CWKSP_ALIGNMENT_BYTES 64 + +/*-************************************* +* Structures +***************************************/ +typedef enum { + ZSTD_cwksp_alloc_objects, + ZSTD_cwksp_alloc_aligned_init_once, + ZSTD_cwksp_alloc_aligned, + ZSTD_cwksp_alloc_buffers +} ZSTD_cwksp_alloc_phase_e; + +/** + * Used to describe whether the workspace is statically allocated (and will not + * necessarily ever be freed), or if it's dynamically allocated and we can + * expect a well-formed caller to free this. + */ +typedef enum { + ZSTD_cwksp_dynamic_alloc, + ZSTD_cwksp_static_alloc +} ZSTD_cwksp_static_alloc_e; + +/** + * Zstd fits all its internal datastructures into a single continuous buffer, + * so that it only needs to perform a single OS allocation (or so that a buffer + * can be provided to it and it can perform no allocations at all). This buffer + * is called the workspace. + * + * Several optimizations complicate that process of allocating memory ranges + * from this workspace for each internal datastructure: + * + * - These different internal datastructures have different setup requirements: + * + * - The static objects need to be cleared once and can then be trivially + * reused for each compression. + * + * - Various buffers don't need to be initialized at all--they are always + * written into before they're read. + * + * - The matchstate tables have a unique requirement that they don't need + * their memory to be totally cleared, but they do need the memory to have + * some bound, i.e., a guarantee that all values in the memory they've been + * allocated is less than some maximum value (which is the starting value + * for the indices that they will then use for compression). When this + * guarantee is provided to them, they can use the memory without any setup + * work. When it can't, they have to clear the area. + * + * - These buffers also have different alignment requirements. + * + * - We would like to reuse the objects in the workspace for multiple + * compressions without having to perform any expensive reallocation or + * reinitialization work. + * + * - We would like to be able to efficiently reuse the workspace across + * multiple compressions **even when the compression parameters change** and + * we need to resize some of the objects (where possible). + * + * To attempt to manage this buffer, given these constraints, the ZSTD_cwksp + * abstraction was created. It works as follows: + * + * Workspace Layout: + * + * [ ... workspace ... ] + * [objects][tables ->] free space [<- buffers][<- aligned][<- init once] + * + * The various objects that live in the workspace are divided into the + * following categories, and are allocated separately: + * + * - Static objects: this is optionally the enclosing ZSTD_CCtx or ZSTD_CDict, + * so that literally everything fits in a single buffer. Note: if present, + * this must be the first object in the workspace, since ZSTD_customFree{CCtx, + * CDict}() rely on a pointer comparison to see whether one or two frees are + * required. + * + * - Fixed size objects: these are fixed-size, fixed-count objects that are + * nonetheless "dynamically" allocated in the workspace so that we can + * control how they're initialized separately from the broader ZSTD_CCtx. + * Examples: + * - Entropy Workspace + * - 2 x ZSTD_compressedBlockState_t + * - CDict dictionary contents + * + * - Tables: these are any of several different datastructures (hash tables, + * chain tables, binary trees) that all respect a common format: they are + * uint32_t arrays, all of whose values are between 0 and (nextSrc - base). + * Their sizes depend on the cparams. These tables are 64-byte aligned. + * + * - Init once: these buffers require to be initialized at least once before + * use. They should be used when we want to skip memory initialization + * while not triggering memory checkers (like Valgrind) when reading from + * from this memory without writing to it first. + * These buffers should be used carefully as they might contain data + * from previous compressions. + * Buffers are aligned to 64 bytes. + * + * - Aligned: these buffers don't require any initialization before they're + * used. The user of the buffer should make sure they write into a buffer + * location before reading from it. + * Buffers are aligned to 64 bytes. + * + * - Buffers: these buffers are used for various purposes that don't require + * any alignment or initialization before they're used. This means they can + * be moved around at no cost for a new compression. + * + * Allocating Memory: + * + * The various types of objects must be allocated in order, so they can be + * correctly packed into the workspace buffer. That order is: + * + * 1. Objects + * 2. Init once / Tables + * 3. Aligned / Tables + * 4. Buffers / Tables + * + * Attempts to reserve objects of different types out of order will fail. + */ +typedef struct { + void* workspace; + void* workspaceEnd; + + void* objectEnd; + void* tableEnd; + void* tableValidEnd; + void* allocStart; + void* initOnceStart; + + BYTE allocFailed; + int workspaceOversizedDuration; + ZSTD_cwksp_alloc_phase_e phase; + ZSTD_cwksp_static_alloc_e isStatic; +} ZSTD_cwksp; + +/*-************************************* +* Functions +***************************************/ + +MEM_STATIC size_t ZSTD_cwksp_available_space(ZSTD_cwksp* ws); +MEM_STATIC void* ZSTD_cwksp_initialAllocStart(ZSTD_cwksp* ws); + +MEM_STATIC void ZSTD_cwksp_assert_internal_consistency(ZSTD_cwksp* ws) { + (void)ws; + assert(ws->workspace <= ws->objectEnd); + assert(ws->objectEnd <= ws->tableEnd); + assert(ws->objectEnd <= ws->tableValidEnd); + assert(ws->tableEnd <= ws->allocStart); + assert(ws->tableValidEnd <= ws->allocStart); + assert(ws->allocStart <= ws->workspaceEnd); + assert(ws->initOnceStart <= ZSTD_cwksp_initialAllocStart(ws)); + assert(ws->workspace <= ws->initOnceStart); +#if ZSTD_MEMORY_SANITIZER + { + intptr_t const offset = __msan_test_shadow(ws->initOnceStart, + (U8*)ZSTD_cwksp_initialAllocStart(ws) - (U8*)ws->initOnceStart); + (void)offset; +#if defined(ZSTD_MSAN_PRINT) + if(offset!=-1) { + __msan_print_shadow((U8*)ws->initOnceStart + offset - 8, 32); + } +#endif + assert(offset==-1); + }; +#endif +} + +/** + * Align must be a power of 2. + */ +MEM_STATIC size_t ZSTD_cwksp_align(size_t size, size_t align) { + size_t const mask = align - 1; + assert(ZSTD_isPower2(align)); + return (size + mask) & ~mask; +} + +/** + * Use this to determine how much space in the workspace we will consume to + * allocate this object. (Normally it should be exactly the size of the object, + * but under special conditions, like ASAN, where we pad each object, it might + * be larger.) + * + * Since tables aren't currently redzoned, you don't need to call through this + * to figure out how much space you need for the matchState tables. Everything + * else is though. + * + * Do not use for sizing aligned buffers. Instead, use ZSTD_cwksp_aligned64_alloc_size(). + */ +MEM_STATIC size_t ZSTD_cwksp_alloc_size(size_t size) { + if (size == 0) + return 0; +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + return size + 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; +#else + return size; +#endif +} + +MEM_STATIC size_t ZSTD_cwksp_aligned_alloc_size(size_t size, size_t alignment) { + return ZSTD_cwksp_alloc_size(ZSTD_cwksp_align(size, alignment)); +} + +/** + * Returns an adjusted alloc size that is the nearest larger multiple of 64 bytes. + * Used to determine the number of bytes required for a given "aligned". + */ +MEM_STATIC size_t ZSTD_cwksp_aligned64_alloc_size(size_t size) { + return ZSTD_cwksp_aligned_alloc_size(size, ZSTD_CWKSP_ALIGNMENT_BYTES); +} + +/** + * Returns the amount of additional space the cwksp must allocate + * for internal purposes (currently only alignment). + */ +MEM_STATIC size_t ZSTD_cwksp_slack_space_required(void) { + /* For alignment, the wksp will always allocate an additional 2*ZSTD_CWKSP_ALIGNMENT_BYTES + * bytes to align the beginning of tables section and end of buffers; + */ + size_t const slackSpace = ZSTD_CWKSP_ALIGNMENT_BYTES * 2; + return slackSpace; +} + + +/** + * Return the number of additional bytes required to align a pointer to the given number of bytes. + * alignBytes must be a power of two. + */ +MEM_STATIC size_t ZSTD_cwksp_bytes_to_align_ptr(void* ptr, const size_t alignBytes) { + size_t const alignBytesMask = alignBytes - 1; + size_t const bytes = (alignBytes - ((size_t)ptr & (alignBytesMask))) & alignBytesMask; + assert(ZSTD_isPower2(alignBytes)); + assert(bytes < alignBytes); + return bytes; +} + +/** + * Returns the initial value for allocStart which is used to determine the position from + * which we can allocate from the end of the workspace. + */ +MEM_STATIC void* ZSTD_cwksp_initialAllocStart(ZSTD_cwksp* ws) +{ + char* endPtr = (char*)ws->workspaceEnd; + assert(ZSTD_isPower2(ZSTD_CWKSP_ALIGNMENT_BYTES)); + endPtr = endPtr - ((size_t)endPtr % ZSTD_CWKSP_ALIGNMENT_BYTES); + return (void*)endPtr; +} + +/** + * Internal function. Do not use directly. + * Reserves the given number of bytes within the aligned/buffer segment of the wksp, + * which counts from the end of the wksp (as opposed to the object/table segment). + * + * Returns a pointer to the beginning of that space. + */ +MEM_STATIC void* +ZSTD_cwksp_reserve_internal_buffer_space(ZSTD_cwksp* ws, size_t const bytes) +{ + void* const alloc = (BYTE*)ws->allocStart - bytes; + void* const bottom = ws->tableEnd; + DEBUGLOG(5, "cwksp: reserving [0x%p]:%zd bytes; %zd bytes remaining", + alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); + ZSTD_cwksp_assert_internal_consistency(ws); + assert(alloc >= bottom); + if (alloc < bottom) { + DEBUGLOG(4, "cwksp: alloc failed!"); + ws->allocFailed = 1; + return NULL; + } + /* the area is reserved from the end of wksp. + * If it overlaps with tableValidEnd, it voids guarantees on values' range */ + if (alloc < ws->tableValidEnd) { + ws->tableValidEnd = alloc; + } + ws->allocStart = alloc; + return alloc; +} + +/** + * Moves the cwksp to the next phase, and does any necessary allocations. + * cwksp initialization must necessarily go through each phase in order. + * Returns a 0 on success, or zstd error + */ +MEM_STATIC size_t +ZSTD_cwksp_internal_advance_phase(ZSTD_cwksp* ws, ZSTD_cwksp_alloc_phase_e phase) +{ + assert(phase >= ws->phase); + if (phase > ws->phase) { + /* Going from allocating objects to allocating initOnce / tables */ + if (ws->phase < ZSTD_cwksp_alloc_aligned_init_once && + phase >= ZSTD_cwksp_alloc_aligned_init_once) { + ws->tableValidEnd = ws->objectEnd; + ws->initOnceStart = ZSTD_cwksp_initialAllocStart(ws); + + { /* Align the start of the tables to 64 bytes. Use [0, 63] bytes */ + void *const alloc = ws->objectEnd; + size_t const bytesToAlign = ZSTD_cwksp_bytes_to_align_ptr(alloc, ZSTD_CWKSP_ALIGNMENT_BYTES); + void *const objectEnd = (BYTE *) alloc + bytesToAlign; + DEBUGLOG(5, "reserving table alignment addtl space: %zu", bytesToAlign); + RETURN_ERROR_IF(objectEnd > ws->workspaceEnd, memory_allocation, + "table phase - alignment initial allocation failed!"); + ws->objectEnd = objectEnd; + ws->tableEnd = objectEnd; /* table area starts being empty */ + if (ws->tableValidEnd < ws->tableEnd) { + ws->tableValidEnd = ws->tableEnd; + } + } + } + ws->phase = phase; + ZSTD_cwksp_assert_internal_consistency(ws); + } + return 0; +} + +/** + * Returns whether this object/buffer/etc was allocated in this workspace. + */ +MEM_STATIC int ZSTD_cwksp_owns_buffer(const ZSTD_cwksp* ws, const void* ptr) +{ + return (ptr != NULL) && (ws->workspace <= ptr) && (ptr < ws->workspaceEnd); +} + +/** + * Internal function. Do not use directly. + */ +MEM_STATIC void* +ZSTD_cwksp_reserve_internal(ZSTD_cwksp* ws, size_t bytes, ZSTD_cwksp_alloc_phase_e phase) +{ + void* alloc; + if (ZSTD_isError(ZSTD_cwksp_internal_advance_phase(ws, phase)) || bytes == 0) { + return NULL; + } + +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + /* over-reserve space */ + bytes += 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; +#endif + + alloc = ZSTD_cwksp_reserve_internal_buffer_space(ws, bytes); + +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + /* Move alloc so there's ZSTD_CWKSP_ASAN_REDZONE_SIZE unused space on + * either size. */ + if (alloc) { + alloc = (BYTE *)alloc + ZSTD_CWKSP_ASAN_REDZONE_SIZE; + if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { + /* We need to keep the redzone poisoned while unpoisoning the bytes that + * are actually allocated. */ + __asan_unpoison_memory_region(alloc, bytes - 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE); + } + } +#endif + + return alloc; +} + +/** + * Reserves and returns unaligned memory. + */ +MEM_STATIC BYTE* ZSTD_cwksp_reserve_buffer(ZSTD_cwksp* ws, size_t bytes) +{ + return (BYTE*)ZSTD_cwksp_reserve_internal(ws, bytes, ZSTD_cwksp_alloc_buffers); +} + +/** + * Reserves and returns memory sized on and aligned on ZSTD_CWKSP_ALIGNMENT_BYTES (64 bytes). + * This memory has been initialized at least once in the past. + * This doesn't mean it has been initialized this time, and it might contain data from previous + * operations. + * The main usage is for algorithms that might need read access into uninitialized memory. + * The algorithm must maintain safety under these conditions and must make sure it doesn't + * leak any of the past data (directly or in side channels). + */ +MEM_STATIC void* ZSTD_cwksp_reserve_aligned_init_once(ZSTD_cwksp* ws, size_t bytes) +{ + size_t const alignedBytes = ZSTD_cwksp_align(bytes, ZSTD_CWKSP_ALIGNMENT_BYTES); + void* ptr = ZSTD_cwksp_reserve_internal(ws, alignedBytes, ZSTD_cwksp_alloc_aligned_init_once); + assert(((size_t)ptr & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); + if(ptr && ptr < ws->initOnceStart) { + /* We assume the memory following the current allocation is either: + * 1. Not usable as initOnce memory (end of workspace) + * 2. Another initOnce buffer that has been allocated before (and so was previously memset) + * 3. An ASAN redzone, in which case we don't want to write on it + * For these reasons it should be fine to not explicitly zero every byte up to ws->initOnceStart. + * Note that we assume here that MSAN and ASAN cannot run in the same time. */ + ZSTD_memset(ptr, 0, MIN((size_t)((U8*)ws->initOnceStart - (U8*)ptr), alignedBytes)); + ws->initOnceStart = ptr; + } +#if ZSTD_MEMORY_SANITIZER + assert(__msan_test_shadow(ptr, bytes) == -1); +#endif + return ptr; +} + +/** + * Reserves and returns memory sized on and aligned on ZSTD_CWKSP_ALIGNMENT_BYTES (64 bytes). + */ +MEM_STATIC void* ZSTD_cwksp_reserve_aligned64(ZSTD_cwksp* ws, size_t bytes) +{ + void* const ptr = ZSTD_cwksp_reserve_internal(ws, + ZSTD_cwksp_align(bytes, ZSTD_CWKSP_ALIGNMENT_BYTES), + ZSTD_cwksp_alloc_aligned); + assert(((size_t)ptr & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); + return ptr; +} + +/** + * Aligned on 64 bytes. These buffers have the special property that + * their values remain constrained, allowing us to reuse them without + * memset()-ing them. + */ +MEM_STATIC void* ZSTD_cwksp_reserve_table(ZSTD_cwksp* ws, size_t bytes) +{ + const ZSTD_cwksp_alloc_phase_e phase = ZSTD_cwksp_alloc_aligned_init_once; + void* alloc; + void* end; + void* top; + + /* We can only start allocating tables after we are done reserving space for objects at the + * start of the workspace */ + if(ws->phase < phase) { + if (ZSTD_isError(ZSTD_cwksp_internal_advance_phase(ws, phase))) { + return NULL; + } + } + alloc = ws->tableEnd; + end = (BYTE *)alloc + bytes; + top = ws->allocStart; + + DEBUGLOG(5, "cwksp: reserving %p table %zd bytes, %zd bytes remaining", + alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); + assert((bytes & (sizeof(U32)-1)) == 0); + ZSTD_cwksp_assert_internal_consistency(ws); + assert(end <= top); + if (end > top) { + DEBUGLOG(4, "cwksp: table alloc failed!"); + ws->allocFailed = 1; + return NULL; + } + ws->tableEnd = end; + +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { + __asan_unpoison_memory_region(alloc, bytes); + } +#endif + + assert((bytes & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); + assert(((size_t)alloc & (ZSTD_CWKSP_ALIGNMENT_BYTES-1)) == 0); + return alloc; +} + +/** + * Aligned on sizeof(void*). + * Note : should happen only once, at workspace first initialization + */ +MEM_STATIC void* ZSTD_cwksp_reserve_object(ZSTD_cwksp* ws, size_t bytes) +{ + size_t const roundedBytes = ZSTD_cwksp_align(bytes, sizeof(void*)); + void* alloc = ws->objectEnd; + void* end = (BYTE*)alloc + roundedBytes; + +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + /* over-reserve space */ + end = (BYTE *)end + 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; +#endif + + DEBUGLOG(4, + "cwksp: reserving %p object %zd bytes (rounded to %zd), %zd bytes remaining", + alloc, bytes, roundedBytes, ZSTD_cwksp_available_space(ws) - roundedBytes); + assert((size_t)alloc % ZSTD_ALIGNOF(void*) == 0); + assert(bytes % ZSTD_ALIGNOF(void*) == 0); + ZSTD_cwksp_assert_internal_consistency(ws); + /* we must be in the first phase, no advance is possible */ + if (ws->phase != ZSTD_cwksp_alloc_objects || end > ws->workspaceEnd) { + DEBUGLOG(3, "cwksp: object alloc failed!"); + ws->allocFailed = 1; + return NULL; + } + ws->objectEnd = end; + ws->tableEnd = end; + ws->tableValidEnd = end; + +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + /* Move alloc so there's ZSTD_CWKSP_ASAN_REDZONE_SIZE unused space on + * either size. */ + alloc = (BYTE*)alloc + ZSTD_CWKSP_ASAN_REDZONE_SIZE; + if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { + __asan_unpoison_memory_region(alloc, bytes); + } +#endif + + return alloc; +} +/** + * with alignment control + * Note : should happen only once, at workspace first initialization + */ +MEM_STATIC void* ZSTD_cwksp_reserve_object_aligned(ZSTD_cwksp* ws, size_t byteSize, size_t alignment) +{ + size_t const mask = alignment - 1; + size_t const surplus = (alignment > sizeof(void*)) ? alignment - sizeof(void*) : 0; + void* const start = ZSTD_cwksp_reserve_object(ws, byteSize + surplus); + if (start == NULL) return NULL; + if (surplus == 0) return start; + assert(ZSTD_isPower2(alignment)); + return (void*)(((size_t)start + surplus) & ~mask); +} + +MEM_STATIC void ZSTD_cwksp_mark_tables_dirty(ZSTD_cwksp* ws) +{ + DEBUGLOG(4, "cwksp: ZSTD_cwksp_mark_tables_dirty"); + +#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE) + /* To validate that the table reuse logic is sound, and that we don't + * access table space that we haven't cleaned, we re-"poison" the table + * space every time we mark it dirty. + * Since tableValidEnd space and initOnce space may overlap we don't poison + * the initOnce portion as it break its promise. This means that this poisoning + * check isn't always applied fully. */ + { + size_t size = (BYTE*)ws->tableValidEnd - (BYTE*)ws->objectEnd; + assert(__msan_test_shadow(ws->objectEnd, size) == -1); + if((BYTE*)ws->tableValidEnd < (BYTE*)ws->initOnceStart) { + __msan_poison(ws->objectEnd, size); + } else { + assert(ws->initOnceStart >= ws->objectEnd); + __msan_poison(ws->objectEnd, (BYTE*)ws->initOnceStart - (BYTE*)ws->objectEnd); + } + } +#endif + + assert(ws->tableValidEnd >= ws->objectEnd); + assert(ws->tableValidEnd <= ws->allocStart); + ws->tableValidEnd = ws->objectEnd; + ZSTD_cwksp_assert_internal_consistency(ws); +} + +MEM_STATIC void ZSTD_cwksp_mark_tables_clean(ZSTD_cwksp* ws) { + DEBUGLOG(4, "cwksp: ZSTD_cwksp_mark_tables_clean"); + assert(ws->tableValidEnd >= ws->objectEnd); + assert(ws->tableValidEnd <= ws->allocStart); + if (ws->tableValidEnd < ws->tableEnd) { + ws->tableValidEnd = ws->tableEnd; + } + ZSTD_cwksp_assert_internal_consistency(ws); +} + +/** + * Zero the part of the allocated tables not already marked clean. + */ +MEM_STATIC void ZSTD_cwksp_clean_tables(ZSTD_cwksp* ws) { + DEBUGLOG(4, "cwksp: ZSTD_cwksp_clean_tables"); + assert(ws->tableValidEnd >= ws->objectEnd); + assert(ws->tableValidEnd <= ws->allocStart); + if (ws->tableValidEnd < ws->tableEnd) { + ZSTD_memset(ws->tableValidEnd, 0, (size_t)((BYTE*)ws->tableEnd - (BYTE*)ws->tableValidEnd)); + } + ZSTD_cwksp_mark_tables_clean(ws); +} + +/** + * Invalidates table allocations. + * All other allocations remain valid. + */ +MEM_STATIC void ZSTD_cwksp_clear_tables(ZSTD_cwksp* ws) +{ + DEBUGLOG(4, "cwksp: clearing tables!"); + +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + /* We don't do this when the workspace is statically allocated, because + * when that is the case, we have no capability to hook into the end of the + * workspace's lifecycle to unpoison the memory. + */ + if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { + size_t size = (BYTE*)ws->tableValidEnd - (BYTE*)ws->objectEnd; + __asan_poison_memory_region(ws->objectEnd, size); + } +#endif + + ws->tableEnd = ws->objectEnd; + ZSTD_cwksp_assert_internal_consistency(ws); +} + +/** + * Invalidates all buffer, aligned, and table allocations. + * Object allocations remain valid. + */ +MEM_STATIC void ZSTD_cwksp_clear(ZSTD_cwksp* ws) { + DEBUGLOG(4, "cwksp: clearing!"); + +#if ZSTD_MEMORY_SANITIZER && !defined (ZSTD_MSAN_DONT_POISON_WORKSPACE) + /* To validate that the context reuse logic is sound, and that we don't + * access stuff that this compression hasn't initialized, we re-"poison" + * the workspace except for the areas in which we expect memory reuse + * without initialization (objects, valid tables area and init once + * memory). */ + { + if((BYTE*)ws->tableValidEnd < (BYTE*)ws->initOnceStart) { + size_t size = (BYTE*)ws->initOnceStart - (BYTE*)ws->tableValidEnd; + __msan_poison(ws->tableValidEnd, size); + } + } +#endif + +#if ZSTD_ADDRESS_SANITIZER && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE) + /* We don't do this when the workspace is statically allocated, because + * when that is the case, we have no capability to hook into the end of the + * workspace's lifecycle to unpoison the memory. + */ + if (ws->isStatic == ZSTD_cwksp_dynamic_alloc) { + size_t size = (BYTE*)ws->workspaceEnd - (BYTE*)ws->objectEnd; + __asan_poison_memory_region(ws->objectEnd, size); + } +#endif + + ws->tableEnd = ws->objectEnd; + ws->allocStart = ZSTD_cwksp_initialAllocStart(ws); + ws->allocFailed = 0; + if (ws->phase > ZSTD_cwksp_alloc_aligned_init_once) { + ws->phase = ZSTD_cwksp_alloc_aligned_init_once; + } + ZSTD_cwksp_assert_internal_consistency(ws); +} + +MEM_STATIC size_t ZSTD_cwksp_sizeof(const ZSTD_cwksp* ws) { + return (size_t)((BYTE*)ws->workspaceEnd - (BYTE*)ws->workspace); +} + +MEM_STATIC size_t ZSTD_cwksp_used(const ZSTD_cwksp* ws) { + return (size_t)((BYTE*)ws->tableEnd - (BYTE*)ws->workspace) + + (size_t)((BYTE*)ws->workspaceEnd - (BYTE*)ws->allocStart); +} + +/** + * The provided workspace takes ownership of the buffer [start, start+size). + * Any existing values in the workspace are ignored (the previously managed + * buffer, if present, must be separately freed). + */ +MEM_STATIC void ZSTD_cwksp_init(ZSTD_cwksp* ws, void* start, size_t size, ZSTD_cwksp_static_alloc_e isStatic) { + DEBUGLOG(4, "cwksp: init'ing workspace with %zd bytes", size); + assert(((size_t)start & (sizeof(void*)-1)) == 0); /* ensure correct alignment */ + ws->workspace = start; + ws->workspaceEnd = (BYTE*)start + size; + ws->objectEnd = ws->workspace; + ws->tableValidEnd = ws->objectEnd; + ws->initOnceStart = ZSTD_cwksp_initialAllocStart(ws); + ws->phase = ZSTD_cwksp_alloc_objects; + ws->isStatic = isStatic; + ZSTD_cwksp_clear(ws); + ws->workspaceOversizedDuration = 0; + ZSTD_cwksp_assert_internal_consistency(ws); +} + +MEM_STATIC size_t ZSTD_cwksp_create(ZSTD_cwksp* ws, size_t size, ZSTD_customMem customMem) { + void* workspace = ZSTD_customMalloc(size, customMem); + DEBUGLOG(4, "cwksp: creating new workspace with %zd bytes", size); + RETURN_ERROR_IF(workspace == NULL, memory_allocation, "NULL pointer!"); + ZSTD_cwksp_init(ws, workspace, size, ZSTD_cwksp_dynamic_alloc); + return 0; +} + +MEM_STATIC void ZSTD_cwksp_free(ZSTD_cwksp* ws, ZSTD_customMem customMem) { + void *ptr = ws->workspace; + DEBUGLOG(4, "cwksp: freeing workspace"); +#if ZSTD_MEMORY_SANITIZER && !defined(ZSTD_MSAN_DONT_POISON_WORKSPACE) + if (ptr != NULL && customMem.customFree != NULL) { + __msan_unpoison(ptr, ZSTD_cwksp_sizeof(ws)); + } +#endif + ZSTD_memset(ws, 0, sizeof(ZSTD_cwksp)); + ZSTD_customFree(ptr, customMem); +} + +/** + * Moves the management of a workspace from one cwksp to another. The src cwksp + * is left in an invalid state (src must be re-init()'ed before it's used again). + */ +MEM_STATIC void ZSTD_cwksp_move(ZSTD_cwksp* dst, ZSTD_cwksp* src) { + *dst = *src; + ZSTD_memset(src, 0, sizeof(ZSTD_cwksp)); +} + +MEM_STATIC int ZSTD_cwksp_reserve_failed(const ZSTD_cwksp* ws) { + return ws->allocFailed; +} + +/*-************************************* +* Functions Checking Free Space +***************************************/ + +/* ZSTD_alignmentSpaceWithinBounds() : + * Returns if the estimated space needed for a wksp is within an acceptable limit of the + * actual amount of space used. + */ +MEM_STATIC int ZSTD_cwksp_estimated_space_within_bounds(const ZSTD_cwksp *const ws, size_t const estimatedSpace) { + /* We have an alignment space between objects and tables between tables and buffers, so we can have up to twice + * the alignment bytes difference between estimation and actual usage */ + return (estimatedSpace - ZSTD_cwksp_slack_space_required()) <= ZSTD_cwksp_used(ws) && + ZSTD_cwksp_used(ws) <= estimatedSpace; +} + + +MEM_STATIC size_t ZSTD_cwksp_available_space(ZSTD_cwksp* ws) { + return (size_t)((BYTE*)ws->allocStart - (BYTE*)ws->tableEnd); +} + +MEM_STATIC int ZSTD_cwksp_check_available(ZSTD_cwksp* ws, size_t additionalNeededSpace) { + return ZSTD_cwksp_available_space(ws) >= additionalNeededSpace; +} + +MEM_STATIC int ZSTD_cwksp_check_too_large(ZSTD_cwksp* ws, size_t additionalNeededSpace) { + return ZSTD_cwksp_check_available( + ws, additionalNeededSpace * ZSTD_WORKSPACETOOLARGE_FACTOR); +} + +MEM_STATIC int ZSTD_cwksp_check_wasteful(ZSTD_cwksp* ws, size_t additionalNeededSpace) { + return ZSTD_cwksp_check_too_large(ws, additionalNeededSpace) + && ws->workspaceOversizedDuration > ZSTD_WORKSPACETOOLARGE_MAXDURATION; +} + +MEM_STATIC void ZSTD_cwksp_bump_oversized_duration( + ZSTD_cwksp* ws, size_t additionalNeededSpace) { + if (ZSTD_cwksp_check_too_large(ws, additionalNeededSpace)) { + ws->workspaceOversizedDuration++; + } else { + ws->workspaceOversizedDuration = 0; + } +} + +#endif /* ZSTD_CWKSP_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.c new file mode 100644 index 0000000000..1a266e7d95 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.c @@ -0,0 +1,778 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "zstd_compress_internal.h" +#include "zstd_double_fast.h" + +#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_fillDoubleHashTableForCDict(ZSTD_MatchState_t* ms, + void const* end, ZSTD_dictTableLoadMethod_e dtlm) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashLarge = ms->hashTable; + U32 const hBitsL = cParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; + U32 const mls = cParams->minMatch; + U32* const hashSmall = ms->chainTable; + U32 const hBitsS = cParams->chainLog + ZSTD_SHORT_CACHE_TAG_BITS; + const BYTE* const base = ms->window.base; + const BYTE* ip = base + ms->nextToUpdate; + const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; + const U32 fastHashFillStep = 3; + + /* Always insert every fastHashFillStep position into the hash tables. + * Insert the other positions into the large hash table if their entry + * is empty. + */ + for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) { + U32 const curr = (U32)(ip - base); + U32 i; + for (i = 0; i < fastHashFillStep; ++i) { + size_t const smHashAndTag = ZSTD_hashPtr(ip + i, hBitsS, mls); + size_t const lgHashAndTag = ZSTD_hashPtr(ip + i, hBitsL, 8); + if (i == 0) { + ZSTD_writeTaggedIndex(hashSmall, smHashAndTag, curr + i); + } + if (i == 0 || hashLarge[lgHashAndTag >> ZSTD_SHORT_CACHE_TAG_BITS] == 0) { + ZSTD_writeTaggedIndex(hashLarge, lgHashAndTag, curr + i); + } + /* Only load extra positions for ZSTD_dtlm_full */ + if (dtlm == ZSTD_dtlm_fast) + break; + } } +} + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_fillDoubleHashTableForCCtx(ZSTD_MatchState_t* ms, + void const* end, ZSTD_dictTableLoadMethod_e dtlm) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashLarge = ms->hashTable; + U32 const hBitsL = cParams->hashLog; + U32 const mls = cParams->minMatch; + U32* const hashSmall = ms->chainTable; + U32 const hBitsS = cParams->chainLog; + const BYTE* const base = ms->window.base; + const BYTE* ip = base + ms->nextToUpdate; + const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; + const U32 fastHashFillStep = 3; + + /* Always insert every fastHashFillStep position into the hash tables. + * Insert the other positions into the large hash table if their entry + * is empty. + */ + for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) { + U32 const curr = (U32)(ip - base); + U32 i; + for (i = 0; i < fastHashFillStep; ++i) { + size_t const smHash = ZSTD_hashPtr(ip + i, hBitsS, mls); + size_t const lgHash = ZSTD_hashPtr(ip + i, hBitsL, 8); + if (i == 0) + hashSmall[smHash] = curr + i; + if (i == 0 || hashLarge[lgHash] == 0) + hashLarge[lgHash] = curr + i; + /* Only load extra positions for ZSTD_dtlm_full */ + if (dtlm == ZSTD_dtlm_fast) + break; + } } +} + +void ZSTD_fillDoubleHashTable(ZSTD_MatchState_t* ms, + const void* const end, + ZSTD_dictTableLoadMethod_e dtlm, + ZSTD_tableFillPurpose_e tfp) +{ + if (tfp == ZSTD_tfp_forCDict) { + ZSTD_fillDoubleHashTableForCDict(ms, end, dtlm); + } else { + ZSTD_fillDoubleHashTableForCCtx(ms, end, dtlm); + } +} + + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_doubleFast_noDict_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize, U32 const mls /* template */) +{ + ZSTD_compressionParameters const* cParams = &ms->cParams; + U32* const hashLong = ms->hashTable; + const U32 hBitsL = cParams->hashLog; + U32* const hashSmall = ms->chainTable; + const U32 hBitsS = cParams->chainLog; + const BYTE* const base = ms->window.base; + const BYTE* const istart = (const BYTE*)src; + const BYTE* anchor = istart; + const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); + /* presumes that, if there is a dictionary, it must be using Attach mode */ + const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); + const BYTE* const prefixLowest = base + prefixLowestIndex; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = iend - HASH_READ_SIZE; + U32 offset_1=rep[0], offset_2=rep[1]; + U32 offsetSaved1 = 0, offsetSaved2 = 0; + + size_t mLength; + U32 offset; + U32 curr; + + /* how many positions to search before increasing step size */ + const size_t kStepIncr = 1 << kSearchStrength; + /* the position at which to increment the step size if no match is found */ + const BYTE* nextStep; + size_t step; /* the current step size */ + + size_t hl0; /* the long hash at ip */ + size_t hl1; /* the long hash at ip1 */ + + U32 idxl0; /* the long match index for ip */ + U32 idxl1; /* the long match index for ip1 */ + + const BYTE* matchl0; /* the long match for ip */ + const BYTE* matchs0; /* the short match for ip */ + const BYTE* matchl1; /* the long match for ip1 */ + const BYTE* matchs0_safe; /* matchs0 or safe address */ + + const BYTE* ip = istart; /* the current position */ + const BYTE* ip1; /* the next position */ + /* Array of ~random data, should have low probability of matching data + * we load from here instead of from tables, if matchl0/matchl1 are + * invalid indices. Used to avoid unpredictable branches. */ + const BYTE dummy[] = {0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0xe2,0xb4}; + + DEBUGLOG(5, "ZSTD_compressBlock_doubleFast_noDict_generic"); + + /* init */ + ip += ((ip - prefixLowest) == 0); + { + U32 const current = (U32)(ip - base); + U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, cParams->windowLog); + U32 const maxRep = current - windowLow; + if (offset_2 > maxRep) offsetSaved2 = offset_2, offset_2 = 0; + if (offset_1 > maxRep) offsetSaved1 = offset_1, offset_1 = 0; + } + + /* Outer Loop: one iteration per match found and stored */ + while (1) { + step = 1; + nextStep = ip + kStepIncr; + ip1 = ip + step; + + if (ip1 > ilimit) { + goto _cleanup; + } + + hl0 = ZSTD_hashPtr(ip, hBitsL, 8); + idxl0 = hashLong[hl0]; + matchl0 = base + idxl0; + + /* Inner Loop: one iteration per search / position */ + do { + const size_t hs0 = ZSTD_hashPtr(ip, hBitsS, mls); + const U32 idxs0 = hashSmall[hs0]; + curr = (U32)(ip-base); + matchs0 = base + idxs0; + + hashLong[hl0] = hashSmall[hs0] = curr; /* update hash tables */ + + /* check noDict repcode */ + if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) { + mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; + ip++; + ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); + goto _match_stored; + } + + hl1 = ZSTD_hashPtr(ip1, hBitsL, 8); + + /* idxl0 > prefixLowestIndex is a (somewhat) unpredictable branch. + * However expression below complies into conditional move. Since + * match is unlikely and we only *branch* on idxl0 > prefixLowestIndex + * if there is a match, all branches become predictable. */ + { const BYTE* const matchl0_safe = ZSTD_selectAddr(idxl0, prefixLowestIndex, matchl0, &dummy[0]); + + /* check prefix long match */ + if (MEM_read64(matchl0_safe) == MEM_read64(ip) && matchl0_safe == matchl0) { + mLength = ZSTD_count(ip+8, matchl0+8, iend) + 8; + offset = (U32)(ip-matchl0); + while (((ip>anchor) & (matchl0>prefixLowest)) && (ip[-1] == matchl0[-1])) { ip--; matchl0--; mLength++; } /* catch up */ + goto _match_found; + } } + + idxl1 = hashLong[hl1]; + matchl1 = base + idxl1; + + /* Same optimization as matchl0 above */ + matchs0_safe = ZSTD_selectAddr(idxs0, prefixLowestIndex, matchs0, &dummy[0]); + + /* check prefix short match */ + if(MEM_read32(matchs0_safe) == MEM_read32(ip) && matchs0_safe == matchs0) { + goto _search_next_long; + } + + if (ip1 >= nextStep) { + PREFETCH_L1(ip1 + 64); + PREFETCH_L1(ip1 + 128); + step++; + nextStep += kStepIncr; + } + ip = ip1; + ip1 += step; + + hl0 = hl1; + idxl0 = idxl1; + matchl0 = matchl1; + #if defined(__aarch64__) + PREFETCH_L1(ip+256); + #endif + } while (ip1 <= ilimit); + +_cleanup: + /* If offset_1 started invalid (offsetSaved1 != 0) and became valid (offset_1 != 0), + * rotate saved offsets. See comment in ZSTD_compressBlock_fast_noDict for more context. */ + offsetSaved2 = ((offsetSaved1 != 0) && (offset_1 != 0)) ? offsetSaved1 : offsetSaved2; + + /* save reps for next block */ + rep[0] = offset_1 ? offset_1 : offsetSaved1; + rep[1] = offset_2 ? offset_2 : offsetSaved2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); + +_search_next_long: + + /* short match found: let's check for a longer one */ + mLength = ZSTD_count(ip+4, matchs0+4, iend) + 4; + offset = (U32)(ip - matchs0); + + /* check long match at +1 position */ + if ((idxl1 > prefixLowestIndex) && (MEM_read64(matchl1) == MEM_read64(ip1))) { + size_t const l1len = ZSTD_count(ip1+8, matchl1+8, iend) + 8; + if (l1len > mLength) { + /* use the long match instead */ + ip = ip1; + mLength = l1len; + offset = (U32)(ip-matchl1); + matchs0 = matchl1; + } + } + + while (((ip>anchor) & (matchs0>prefixLowest)) && (ip[-1] == matchs0[-1])) { ip--; matchs0--; mLength++; } /* complete backward */ + + /* fall-through */ + +_match_found: /* requires ip, offset, mLength */ + offset_2 = offset_1; + offset_1 = offset; + + if (step < 4) { + /* It is unsafe to write this value back to the hashtable when ip1 is + * greater than or equal to the new ip we will have after we're done + * processing this match. Rather than perform that test directly + * (ip1 >= ip + mLength), which costs speed in practice, we do a simpler + * more predictable test. The minmatch even if we take a short match is + * 4 bytes, so as long as step, the distance between ip and ip1 + * (initially) is less than 4, we know ip1 < new ip. */ + hashLong[hl1] = (U32)(ip1 - base); + } + + ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); + +_match_stored: + /* match found */ + ip += mLength; + anchor = ip; + + if (ip <= ilimit) { + /* Complementary insertion */ + /* done after iLimit test, as candidates could be > iend-8 */ + { U32 const indexToInsert = curr+2; + hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert; + hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); + hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert; + hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); + } + + /* check immediate repcode */ + while ( (ip <= ilimit) + && ( (offset_2>0) + & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) { + /* store sequence */ + size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; + U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; /* swap offset_2 <=> offset_1 */ + hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip-base); + hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip-base); + ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, rLength); + ip += rLength; + anchor = ip; + continue; /* faster when present ... (?) */ + } + } + } +} + + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_doubleFast_dictMatchState_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize, + U32 const mls /* template */) +{ + ZSTD_compressionParameters const* cParams = &ms->cParams; + U32* const hashLong = ms->hashTable; + const U32 hBitsL = cParams->hashLog; + U32* const hashSmall = ms->chainTable; + const U32 hBitsS = cParams->chainLog; + const BYTE* const base = ms->window.base; + const BYTE* const istart = (const BYTE*)src; + const BYTE* ip = istart; + const BYTE* anchor = istart; + const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); + /* presumes that, if there is a dictionary, it must be using Attach mode */ + const U32 prefixLowestIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); + const BYTE* const prefixLowest = base + prefixLowestIndex; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = iend - HASH_READ_SIZE; + U32 offset_1=rep[0], offset_2=rep[1]; + + const ZSTD_MatchState_t* const dms = ms->dictMatchState; + const ZSTD_compressionParameters* const dictCParams = &dms->cParams; + const U32* const dictHashLong = dms->hashTable; + const U32* const dictHashSmall = dms->chainTable; + const U32 dictStartIndex = dms->window.dictLimit; + const BYTE* const dictBase = dms->window.base; + const BYTE* const dictStart = dictBase + dictStartIndex; + const BYTE* const dictEnd = dms->window.nextSrc; + const U32 dictIndexDelta = prefixLowestIndex - (U32)(dictEnd - dictBase); + const U32 dictHBitsL = dictCParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; + const U32 dictHBitsS = dictCParams->chainLog + ZSTD_SHORT_CACHE_TAG_BITS; + const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictStart)); + + DEBUGLOG(5, "ZSTD_compressBlock_doubleFast_dictMatchState_generic"); + + /* if a dictionary is attached, it must be within window range */ + assert(ms->window.dictLimit + (1U << cParams->windowLog) >= endIndex); + + if (ms->prefetchCDictTables) { + size_t const hashTableBytes = (((size_t)1) << dictCParams->hashLog) * sizeof(U32); + size_t const chainTableBytes = (((size_t)1) << dictCParams->chainLog) * sizeof(U32); + PREFETCH_AREA(dictHashLong, hashTableBytes); + PREFETCH_AREA(dictHashSmall, chainTableBytes); + } + + /* init */ + ip += (dictAndPrefixLength == 0); + + /* dictMatchState repCode checks don't currently handle repCode == 0 + * disabling. */ + assert(offset_1 <= dictAndPrefixLength); + assert(offset_2 <= dictAndPrefixLength); + + /* Main Search Loop */ + while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */ + size_t mLength; + U32 offset; + size_t const h2 = ZSTD_hashPtr(ip, hBitsL, 8); + size_t const h = ZSTD_hashPtr(ip, hBitsS, mls); + size_t const dictHashAndTagL = ZSTD_hashPtr(ip, dictHBitsL, 8); + size_t const dictHashAndTagS = ZSTD_hashPtr(ip, dictHBitsS, mls); + U32 const dictMatchIndexAndTagL = dictHashLong[dictHashAndTagL >> ZSTD_SHORT_CACHE_TAG_BITS]; + U32 const dictMatchIndexAndTagS = dictHashSmall[dictHashAndTagS >> ZSTD_SHORT_CACHE_TAG_BITS]; + int const dictTagsMatchL = ZSTD_comparePackedTags(dictMatchIndexAndTagL, dictHashAndTagL); + int const dictTagsMatchS = ZSTD_comparePackedTags(dictMatchIndexAndTagS, dictHashAndTagS); + U32 const curr = (U32)(ip-base); + U32 const matchIndexL = hashLong[h2]; + U32 matchIndexS = hashSmall[h]; + const BYTE* matchLong = base + matchIndexL; + const BYTE* match = base + matchIndexS; + const U32 repIndex = curr + 1 - offset_1; + const BYTE* repMatch = (repIndex < prefixLowestIndex) ? + dictBase + (repIndex - dictIndexDelta) : + base + repIndex; + hashLong[h2] = hashSmall[h] = curr; /* update hash tables */ + + /* check repcode */ + if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) + && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { + const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; + mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; + ip++; + ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); + goto _match_stored; + } + + if ((matchIndexL >= prefixLowestIndex) && (MEM_read64(matchLong) == MEM_read64(ip))) { + /* check prefix long match */ + mLength = ZSTD_count(ip+8, matchLong+8, iend) + 8; + offset = (U32)(ip-matchLong); + while (((ip>anchor) & (matchLong>prefixLowest)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */ + goto _match_found; + } else if (dictTagsMatchL) { + /* check dictMatchState long match */ + U32 const dictMatchIndexL = dictMatchIndexAndTagL >> ZSTD_SHORT_CACHE_TAG_BITS; + const BYTE* dictMatchL = dictBase + dictMatchIndexL; + assert(dictMatchL < dictEnd); + + if (dictMatchL > dictStart && MEM_read64(dictMatchL) == MEM_read64(ip)) { + mLength = ZSTD_count_2segments(ip+8, dictMatchL+8, iend, dictEnd, prefixLowest) + 8; + offset = (U32)(curr - dictMatchIndexL - dictIndexDelta); + while (((ip>anchor) & (dictMatchL>dictStart)) && (ip[-1] == dictMatchL[-1])) { ip--; dictMatchL--; mLength++; } /* catch up */ + goto _match_found; + } } + + if (matchIndexS > prefixLowestIndex) { + /* short match candidate */ + if (MEM_read32(match) == MEM_read32(ip)) { + goto _search_next_long; + } + } else if (dictTagsMatchS) { + /* check dictMatchState short match */ + U32 const dictMatchIndexS = dictMatchIndexAndTagS >> ZSTD_SHORT_CACHE_TAG_BITS; + match = dictBase + dictMatchIndexS; + matchIndexS = dictMatchIndexS + dictIndexDelta; + + if (match > dictStart && MEM_read32(match) == MEM_read32(ip)) { + goto _search_next_long; + } } + + ip += ((ip-anchor) >> kSearchStrength) + 1; +#if defined(__aarch64__) + PREFETCH_L1(ip+256); +#endif + continue; + +_search_next_long: + { size_t const hl3 = ZSTD_hashPtr(ip+1, hBitsL, 8); + size_t const dictHashAndTagL3 = ZSTD_hashPtr(ip+1, dictHBitsL, 8); + U32 const matchIndexL3 = hashLong[hl3]; + U32 const dictMatchIndexAndTagL3 = dictHashLong[dictHashAndTagL3 >> ZSTD_SHORT_CACHE_TAG_BITS]; + int const dictTagsMatchL3 = ZSTD_comparePackedTags(dictMatchIndexAndTagL3, dictHashAndTagL3); + const BYTE* matchL3 = base + matchIndexL3; + hashLong[hl3] = curr + 1; + + /* check prefix long +1 match */ + if ((matchIndexL3 >= prefixLowestIndex) && (MEM_read64(matchL3) == MEM_read64(ip+1))) { + mLength = ZSTD_count(ip+9, matchL3+8, iend) + 8; + ip++; + offset = (U32)(ip-matchL3); + while (((ip>anchor) & (matchL3>prefixLowest)) && (ip[-1] == matchL3[-1])) { ip--; matchL3--; mLength++; } /* catch up */ + goto _match_found; + } else if (dictTagsMatchL3) { + /* check dict long +1 match */ + U32 const dictMatchIndexL3 = dictMatchIndexAndTagL3 >> ZSTD_SHORT_CACHE_TAG_BITS; + const BYTE* dictMatchL3 = dictBase + dictMatchIndexL3; + assert(dictMatchL3 < dictEnd); + if (dictMatchL3 > dictStart && MEM_read64(dictMatchL3) == MEM_read64(ip+1)) { + mLength = ZSTD_count_2segments(ip+1+8, dictMatchL3+8, iend, dictEnd, prefixLowest) + 8; + ip++; + offset = (U32)(curr + 1 - dictMatchIndexL3 - dictIndexDelta); + while (((ip>anchor) & (dictMatchL3>dictStart)) && (ip[-1] == dictMatchL3[-1])) { ip--; dictMatchL3--; mLength++; } /* catch up */ + goto _match_found; + } } } + + /* if no long +1 match, explore the short match we found */ + if (matchIndexS < prefixLowestIndex) { + mLength = ZSTD_count_2segments(ip+4, match+4, iend, dictEnd, prefixLowest) + 4; + offset = (U32)(curr - matchIndexS); + while (((ip>anchor) & (match>dictStart)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ + } else { + mLength = ZSTD_count(ip+4, match+4, iend) + 4; + offset = (U32)(ip - match); + while (((ip>anchor) & (match>prefixLowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ + } + +_match_found: + offset_2 = offset_1; + offset_1 = offset; + + ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); + +_match_stored: + /* match found */ + ip += mLength; + anchor = ip; + + if (ip <= ilimit) { + /* Complementary insertion */ + /* done after iLimit test, as candidates could be > iend-8 */ + { U32 const indexToInsert = curr+2; + hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert; + hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); + hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert; + hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); + } + + /* check immediate repcode */ + while (ip <= ilimit) { + U32 const current2 = (U32)(ip-base); + U32 const repIndex2 = current2 - offset_2; + const BYTE* repMatch2 = repIndex2 < prefixLowestIndex ? + dictBase + repIndex2 - dictIndexDelta : + base + repIndex2; + if ( (ZSTD_index_overlap_check(prefixLowestIndex, repIndex2)) + && (MEM_read32(repMatch2) == MEM_read32(ip)) ) { + const BYTE* const repEnd2 = repIndex2 < prefixLowestIndex ? dictEnd : iend; + size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixLowest) + 4; + U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */ + ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); + hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = current2; + hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = current2; + ip += repLength2; + anchor = ip; + continue; + } + break; + } + } + } /* while (ip < ilimit) */ + + /* save reps for next block */ + rep[0] = offset_1; + rep[1] = offset_2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); +} + +#define ZSTD_GEN_DFAST_FN(dictMode, mls) \ + static size_t ZSTD_compressBlock_doubleFast_##dictMode##_##mls( \ + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], \ + void const* src, size_t srcSize) \ + { \ + return ZSTD_compressBlock_doubleFast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mls); \ + } + +ZSTD_GEN_DFAST_FN(noDict, 4) +ZSTD_GEN_DFAST_FN(noDict, 5) +ZSTD_GEN_DFAST_FN(noDict, 6) +ZSTD_GEN_DFAST_FN(noDict, 7) + +ZSTD_GEN_DFAST_FN(dictMatchState, 4) +ZSTD_GEN_DFAST_FN(dictMatchState, 5) +ZSTD_GEN_DFAST_FN(dictMatchState, 6) +ZSTD_GEN_DFAST_FN(dictMatchState, 7) + + +size_t ZSTD_compressBlock_doubleFast( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + const U32 mls = ms->cParams.minMatch; + switch(mls) + { + default: /* includes case 3 */ + case 4 : + return ZSTD_compressBlock_doubleFast_noDict_4(ms, seqStore, rep, src, srcSize); + case 5 : + return ZSTD_compressBlock_doubleFast_noDict_5(ms, seqStore, rep, src, srcSize); + case 6 : + return ZSTD_compressBlock_doubleFast_noDict_6(ms, seqStore, rep, src, srcSize); + case 7 : + return ZSTD_compressBlock_doubleFast_noDict_7(ms, seqStore, rep, src, srcSize); + } +} + + +size_t ZSTD_compressBlock_doubleFast_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + const U32 mls = ms->cParams.minMatch; + switch(mls) + { + default: /* includes case 3 */ + case 4 : + return ZSTD_compressBlock_doubleFast_dictMatchState_4(ms, seqStore, rep, src, srcSize); + case 5 : + return ZSTD_compressBlock_doubleFast_dictMatchState_5(ms, seqStore, rep, src, srcSize); + case 6 : + return ZSTD_compressBlock_doubleFast_dictMatchState_6(ms, seqStore, rep, src, srcSize); + case 7 : + return ZSTD_compressBlock_doubleFast_dictMatchState_7(ms, seqStore, rep, src, srcSize); + } +} + + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_doubleFast_extDict_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize, + U32 const mls /* template */) +{ + ZSTD_compressionParameters const* cParams = &ms->cParams; + U32* const hashLong = ms->hashTable; + U32 const hBitsL = cParams->hashLog; + U32* const hashSmall = ms->chainTable; + U32 const hBitsS = cParams->chainLog; + const BYTE* const istart = (const BYTE*)src; + const BYTE* ip = istart; + const BYTE* anchor = istart; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = iend - 8; + const BYTE* const base = ms->window.base; + const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); + const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); + const U32 dictStartIndex = lowLimit; + const U32 dictLimit = ms->window.dictLimit; + const U32 prefixStartIndex = (dictLimit > lowLimit) ? dictLimit : lowLimit; + const BYTE* const prefixStart = base + prefixStartIndex; + const BYTE* const dictBase = ms->window.dictBase; + const BYTE* const dictStart = dictBase + dictStartIndex; + const BYTE* const dictEnd = dictBase + prefixStartIndex; + U32 offset_1=rep[0], offset_2=rep[1]; + + DEBUGLOG(5, "ZSTD_compressBlock_doubleFast_extDict_generic (srcSize=%zu)", srcSize); + + /* if extDict is invalidated due to maxDistance, switch to "regular" variant */ + if (prefixStartIndex == dictStartIndex) + return ZSTD_compressBlock_doubleFast(ms, seqStore, rep, src, srcSize); + + /* Search Loop */ + while (ip < ilimit) { /* < instead of <=, because (ip+1) */ + const size_t hSmall = ZSTD_hashPtr(ip, hBitsS, mls); + const U32 matchIndex = hashSmall[hSmall]; + const BYTE* const matchBase = matchIndex < prefixStartIndex ? dictBase : base; + const BYTE* match = matchBase + matchIndex; + + const size_t hLong = ZSTD_hashPtr(ip, hBitsL, 8); + const U32 matchLongIndex = hashLong[hLong]; + const BYTE* const matchLongBase = matchLongIndex < prefixStartIndex ? dictBase : base; + const BYTE* matchLong = matchLongBase + matchLongIndex; + + const U32 curr = (U32)(ip-base); + const U32 repIndex = curr + 1 - offset_1; /* offset_1 expected <= curr +1 */ + const BYTE* const repBase = repIndex < prefixStartIndex ? dictBase : base; + const BYTE* const repMatch = repBase + repIndex; + size_t mLength; + hashSmall[hSmall] = hashLong[hLong] = curr; /* update hash table */ + + if (((ZSTD_index_overlap_check(prefixStartIndex, repIndex)) + & (offset_1 <= curr+1 - dictStartIndex)) /* note: we are searching at curr+1 */ + && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { + const BYTE* repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend; + mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixStart) + 4; + ip++; + ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); + } else { + if ((matchLongIndex > dictStartIndex) && (MEM_read64(matchLong) == MEM_read64(ip))) { + const BYTE* const matchEnd = matchLongIndex < prefixStartIndex ? dictEnd : iend; + const BYTE* const lowMatchPtr = matchLongIndex < prefixStartIndex ? dictStart : prefixStart; + U32 offset; + mLength = ZSTD_count_2segments(ip+8, matchLong+8, iend, matchEnd, prefixStart) + 8; + offset = curr - matchLongIndex; + while (((ip>anchor) & (matchLong>lowMatchPtr)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */ + offset_2 = offset_1; + offset_1 = offset; + ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); + + } else if ((matchIndex > dictStartIndex) && (MEM_read32(match) == MEM_read32(ip))) { + size_t const h3 = ZSTD_hashPtr(ip+1, hBitsL, 8); + U32 const matchIndex3 = hashLong[h3]; + const BYTE* const match3Base = matchIndex3 < prefixStartIndex ? dictBase : base; + const BYTE* match3 = match3Base + matchIndex3; + U32 offset; + hashLong[h3] = curr + 1; + if ( (matchIndex3 > dictStartIndex) && (MEM_read64(match3) == MEM_read64(ip+1)) ) { + const BYTE* const matchEnd = matchIndex3 < prefixStartIndex ? dictEnd : iend; + const BYTE* const lowMatchPtr = matchIndex3 < prefixStartIndex ? dictStart : prefixStart; + mLength = ZSTD_count_2segments(ip+9, match3+8, iend, matchEnd, prefixStart) + 8; + ip++; + offset = curr+1 - matchIndex3; + while (((ip>anchor) & (match3>lowMatchPtr)) && (ip[-1] == match3[-1])) { ip--; match3--; mLength++; } /* catch up */ + } else { + const BYTE* const matchEnd = matchIndex < prefixStartIndex ? dictEnd : iend; + const BYTE* const lowMatchPtr = matchIndex < prefixStartIndex ? dictStart : prefixStart; + mLength = ZSTD_count_2segments(ip+4, match+4, iend, matchEnd, prefixStart) + 4; + offset = curr - matchIndex; + while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */ + } + offset_2 = offset_1; + offset_1 = offset; + ZSTD_storeSeq(seqStore, (size_t)(ip-anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); + + } else { + ip += ((ip-anchor) >> kSearchStrength) + 1; + continue; + } } + + /* move to next sequence start */ + ip += mLength; + anchor = ip; + + if (ip <= ilimit) { + /* Complementary insertion */ + /* done after iLimit test, as candidates could be > iend-8 */ + { U32 const indexToInsert = curr+2; + hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert; + hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); + hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert; + hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); + } + + /* check immediate repcode */ + while (ip <= ilimit) { + U32 const current2 = (U32)(ip-base); + U32 const repIndex2 = current2 - offset_2; + const BYTE* repMatch2 = repIndex2 < prefixStartIndex ? dictBase + repIndex2 : base + repIndex2; + if ( ((ZSTD_index_overlap_check(prefixStartIndex, repIndex2)) + & (offset_2 <= current2 - dictStartIndex)) + && (MEM_read32(repMatch2) == MEM_read32(ip)) ) { + const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend; + size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, prefixStart) + 4; + U32 const tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */ + ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); + hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = current2; + hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = current2; + ip += repLength2; + anchor = ip; + continue; + } + break; + } } } + + /* save reps for next block */ + rep[0] = offset_1; + rep[1] = offset_2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); +} + +ZSTD_GEN_DFAST_FN(extDict, 4) +ZSTD_GEN_DFAST_FN(extDict, 5) +ZSTD_GEN_DFAST_FN(extDict, 6) +ZSTD_GEN_DFAST_FN(extDict, 7) + +size_t ZSTD_compressBlock_doubleFast_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + U32 const mls = ms->cParams.minMatch; + switch(mls) + { + default: /* includes case 3 */ + case 4 : + return ZSTD_compressBlock_doubleFast_extDict_4(ms, seqStore, rep, src, srcSize); + case 5 : + return ZSTD_compressBlock_doubleFast_extDict_5(ms, seqStore, rep, src, srcSize); + case 6 : + return ZSTD_compressBlock_doubleFast_extDict_6(ms, seqStore, rep, src, srcSize); + case 7 : + return ZSTD_compressBlock_doubleFast_extDict_7(ms, seqStore, rep, src, srcSize); + } +} + +#endif /* ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.h new file mode 100644 index 0000000000..cd562fea8e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_double_fast.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_DOUBLE_FAST_H +#define ZSTD_DOUBLE_FAST_H + +#include "../common/mem.h" /* U32 */ +#include "zstd_compress_internal.h" /* ZSTD_CCtx, size_t */ + +#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR + +void ZSTD_fillDoubleHashTable(ZSTD_MatchState_t* ms, + void const* end, ZSTD_dictTableLoadMethod_e dtlm, + ZSTD_tableFillPurpose_e tfp); + +size_t ZSTD_compressBlock_doubleFast( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_doubleFast_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_doubleFast_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#define ZSTD_COMPRESSBLOCK_DOUBLEFAST ZSTD_compressBlock_doubleFast +#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE ZSTD_compressBlock_doubleFast_dictMatchState +#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT ZSTD_compressBlock_doubleFast_extDict +#else +#define ZSTD_COMPRESSBLOCK_DOUBLEFAST NULL +#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_DICTMATCHSTATE NULL +#define ZSTD_COMPRESSBLOCK_DOUBLEFAST_EXTDICT NULL +#endif /* ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR */ + +#endif /* ZSTD_DOUBLE_FAST_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.c new file mode 100644 index 0000000000..ee25bcbac8 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.c @@ -0,0 +1,985 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "zstd_compress_internal.h" /* ZSTD_hashPtr, ZSTD_count, ZSTD_storeSeq */ +#include "zstd_fast.h" + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_fillHashTableForCDict(ZSTD_MatchState_t* ms, + const void* const end, + ZSTD_dictTableLoadMethod_e dtlm) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hBits = cParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; + U32 const mls = cParams->minMatch; + const BYTE* const base = ms->window.base; + const BYTE* ip = base + ms->nextToUpdate; + const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; + const U32 fastHashFillStep = 3; + + /* Currently, we always use ZSTD_dtlm_full for filling CDict tables. + * Feel free to remove this assert if there's a good reason! */ + assert(dtlm == ZSTD_dtlm_full); + + /* Always insert every fastHashFillStep position into the hash table. + * Insert the other positions if their hash entry is empty. + */ + for ( ; ip + fastHashFillStep < iend + 2; ip += fastHashFillStep) { + U32 const curr = (U32)(ip - base); + { size_t const hashAndTag = ZSTD_hashPtr(ip, hBits, mls); + ZSTD_writeTaggedIndex(hashTable, hashAndTag, curr); } + + if (dtlm == ZSTD_dtlm_fast) continue; + /* Only load extra positions for ZSTD_dtlm_full */ + { U32 p; + for (p = 1; p < fastHashFillStep; ++p) { + size_t const hashAndTag = ZSTD_hashPtr(ip + p, hBits, mls); + if (hashTable[hashAndTag >> ZSTD_SHORT_CACHE_TAG_BITS] == 0) { /* not yet filled */ + ZSTD_writeTaggedIndex(hashTable, hashAndTag, curr + p); + } } } } +} + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_fillHashTableForCCtx(ZSTD_MatchState_t* ms, + const void* const end, + ZSTD_dictTableLoadMethod_e dtlm) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hBits = cParams->hashLog; + U32 const mls = cParams->minMatch; + const BYTE* const base = ms->window.base; + const BYTE* ip = base + ms->nextToUpdate; + const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE; + const U32 fastHashFillStep = 3; + + /* Currently, we always use ZSTD_dtlm_fast for filling CCtx tables. + * Feel free to remove this assert if there's a good reason! */ + assert(dtlm == ZSTD_dtlm_fast); + + /* Always insert every fastHashFillStep position into the hash table. + * Insert the other positions if their hash entry is empty. + */ + for ( ; ip + fastHashFillStep < iend + 2; ip += fastHashFillStep) { + U32 const curr = (U32)(ip - base); + size_t const hash0 = ZSTD_hashPtr(ip, hBits, mls); + hashTable[hash0] = curr; + if (dtlm == ZSTD_dtlm_fast) continue; + /* Only load extra positions for ZSTD_dtlm_full */ + { U32 p; + for (p = 1; p < fastHashFillStep; ++p) { + size_t const hash = ZSTD_hashPtr(ip + p, hBits, mls); + if (hashTable[hash] == 0) { /* not yet filled */ + hashTable[hash] = curr + p; + } } } } +} + +void ZSTD_fillHashTable(ZSTD_MatchState_t* ms, + const void* const end, + ZSTD_dictTableLoadMethod_e dtlm, + ZSTD_tableFillPurpose_e tfp) +{ + if (tfp == ZSTD_tfp_forCDict) { + ZSTD_fillHashTableForCDict(ms, end, dtlm); + } else { + ZSTD_fillHashTableForCCtx(ms, end, dtlm); + } +} + + +typedef int (*ZSTD_match4Found) (const BYTE* currentPtr, const BYTE* matchAddress, U32 matchIdx, U32 idxLowLimit); + +static int +ZSTD_match4Found_cmov(const BYTE* currentPtr, const BYTE* matchAddress, U32 matchIdx, U32 idxLowLimit) +{ + /* Array of ~random data, should have low probability of matching data. + * Load from here if the index is invalid. + * Used to avoid unpredictable branches. */ + static const BYTE dummy[] = {0x12,0x34,0x56,0x78}; + + /* currentIdx >= lowLimit is a (somewhat) unpredictable branch. + * However expression below compiles into conditional move. + */ + const BYTE* mvalAddr = ZSTD_selectAddr(matchIdx, idxLowLimit, matchAddress, dummy); + /* Note: this used to be written as : return test1 && test2; + * Unfortunately, once inlined, these tests become branches, + * in which case it becomes critical that they are executed in the right order (test1 then test2). + * So we have to write these tests in a specific manner to ensure their ordering. + */ + if (MEM_read32(currentPtr) != MEM_read32(mvalAddr)) return 0; + /* force ordering of these tests, which matters once the function is inlined, as they become branches */ +#if defined(__GNUC__) + __asm__(""); +#endif + return matchIdx >= idxLowLimit; +} + +static int +ZSTD_match4Found_branch(const BYTE* currentPtr, const BYTE* matchAddress, U32 matchIdx, U32 idxLowLimit) +{ + /* using a branch instead of a cmov, + * because it's faster in scenarios where matchIdx >= idxLowLimit is generally true, + * aka almost all candidates are within range */ + U32 mval; + if (matchIdx >= idxLowLimit) { + mval = MEM_read32(matchAddress); + } else { + mval = MEM_read32(currentPtr) ^ 1; /* guaranteed to not match. */ + } + + return (MEM_read32(currentPtr) == mval); +} + + +/** + * If you squint hard enough (and ignore repcodes), the search operation at any + * given position is broken into 4 stages: + * + * 1. Hash (map position to hash value via input read) + * 2. Lookup (map hash val to index via hashtable read) + * 3. Load (map index to value at that position via input read) + * 4. Compare + * + * Each of these steps involves a memory read at an address which is computed + * from the previous step. This means these steps must be sequenced and their + * latencies are cumulative. + * + * Rather than do 1->2->3->4 sequentially for a single position before moving + * onto the next, this implementation interleaves these operations across the + * next few positions: + * + * R = Repcode Read & Compare + * H = Hash + * T = Table Lookup + * M = Match Read & Compare + * + * Pos | Time --> + * ----+------------------- + * N | ... M + * N+1 | ... TM + * N+2 | R H T M + * N+3 | H TM + * N+4 | R H T M + * N+5 | H ... + * N+6 | R ... + * + * This is very much analogous to the pipelining of execution in a CPU. And just + * like a CPU, we have to dump the pipeline when we find a match (i.e., take a + * branch). + * + * When this happens, we throw away our current state, and do the following prep + * to re-enter the loop: + * + * Pos | Time --> + * ----+------------------- + * N | H T + * N+1 | H + * + * This is also the work we do at the beginning to enter the loop initially. + */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_fast_noDict_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize, + U32 const mls, int useCmov) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hlog = cParams->hashLog; + size_t const stepSize = cParams->targetLength + !(cParams->targetLength) + 1; /* min 2 */ + const BYTE* const base = ms->window.base; + const BYTE* const istart = (const BYTE*)src; + const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); + const U32 prefixStartIndex = ZSTD_getLowestPrefixIndex(ms, endIndex, cParams->windowLog); + const BYTE* const prefixStart = base + prefixStartIndex; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = iend - HASH_READ_SIZE; + + const BYTE* anchor = istart; + const BYTE* ip0 = istart; + const BYTE* ip1; + const BYTE* ip2; + const BYTE* ip3; + U32 current0; + + U32 rep_offset1 = rep[0]; + U32 rep_offset2 = rep[1]; + U32 offsetSaved1 = 0, offsetSaved2 = 0; + + size_t hash0; /* hash for ip0 */ + size_t hash1; /* hash for ip1 */ + U32 matchIdx; /* match idx for ip0 */ + + U32 offcode; + const BYTE* match0; + size_t mLength; + + /* ip0 and ip1 are always adjacent. The targetLength skipping and + * uncompressibility acceleration is applied to every other position, + * matching the behavior of #1562. step therefore represents the gap + * between pairs of positions, from ip0 to ip2 or ip1 to ip3. */ + size_t step; + const BYTE* nextStep; + const size_t kStepIncr = (1 << (kSearchStrength - 1)); + const ZSTD_match4Found matchFound = useCmov ? ZSTD_match4Found_cmov : ZSTD_match4Found_branch; + + DEBUGLOG(5, "ZSTD_compressBlock_fast_generic"); + ip0 += (ip0 == prefixStart); + { U32 const curr = (U32)(ip0 - base); + U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, cParams->windowLog); + U32 const maxRep = curr - windowLow; + if (rep_offset2 > maxRep) offsetSaved2 = rep_offset2, rep_offset2 = 0; + if (rep_offset1 > maxRep) offsetSaved1 = rep_offset1, rep_offset1 = 0; + } + + /* start each op */ +_start: /* Requires: ip0 */ + + step = stepSize; + nextStep = ip0 + kStepIncr; + + /* calculate positions, ip0 - anchor == 0, so we skip step calc */ + ip1 = ip0 + 1; + ip2 = ip0 + step; + ip3 = ip2 + 1; + + if (ip3 >= ilimit) { + goto _cleanup; + } + + hash0 = ZSTD_hashPtr(ip0, hlog, mls); + hash1 = ZSTD_hashPtr(ip1, hlog, mls); + + matchIdx = hashTable[hash0]; + + do { + /* load repcode match for ip[2]*/ + const U32 rval = MEM_read32(ip2 - rep_offset1); + + /* write back hash table entry */ + current0 = (U32)(ip0 - base); + hashTable[hash0] = current0; + + /* check repcode at ip[2] */ + if ((MEM_read32(ip2) == rval) & (rep_offset1 > 0)) { + ip0 = ip2; + match0 = ip0 - rep_offset1; + mLength = ip0[-1] == match0[-1]; + ip0 -= mLength; + match0 -= mLength; + offcode = REPCODE1_TO_OFFBASE; + mLength += 4; + + /* Write next hash table entry: it's already calculated. + * This write is known to be safe because ip1 is before the + * repcode (ip2). */ + hashTable[hash1] = (U32)(ip1 - base); + + goto _match; + } + + if (matchFound(ip0, base + matchIdx, matchIdx, prefixStartIndex)) { + /* Write next hash table entry (it's already calculated). + * This write is known to be safe because the ip1 == ip0 + 1, + * so searching will resume after ip1 */ + hashTable[hash1] = (U32)(ip1 - base); + + goto _offset; + } + + /* lookup ip[1] */ + matchIdx = hashTable[hash1]; + + /* hash ip[2] */ + hash0 = hash1; + hash1 = ZSTD_hashPtr(ip2, hlog, mls); + + /* advance to next positions */ + ip0 = ip1; + ip1 = ip2; + ip2 = ip3; + + /* write back hash table entry */ + current0 = (U32)(ip0 - base); + hashTable[hash0] = current0; + + if (matchFound(ip0, base + matchIdx, matchIdx, prefixStartIndex)) { + /* Write next hash table entry, since it's already calculated */ + if (step <= 4) { + /* Avoid writing an index if it's >= position where search will resume. + * The minimum possible match has length 4, so search can resume at ip0 + 4. + */ + hashTable[hash1] = (U32)(ip1 - base); + } + goto _offset; + } + + /* lookup ip[1] */ + matchIdx = hashTable[hash1]; + + /* hash ip[2] */ + hash0 = hash1; + hash1 = ZSTD_hashPtr(ip2, hlog, mls); + + /* advance to next positions */ + ip0 = ip1; + ip1 = ip2; + ip2 = ip0 + step; + ip3 = ip1 + step; + + /* calculate step */ + if (ip2 >= nextStep) { + step++; + PREFETCH_L1(ip1 + 64); + PREFETCH_L1(ip1 + 128); + nextStep += kStepIncr; + } + } while (ip3 < ilimit); + +_cleanup: + /* Note that there are probably still a couple positions one could search. + * However, it seems to be a meaningful performance hit to try to search + * them. So let's not. */ + + /* When the repcodes are outside of the prefix, we set them to zero before the loop. + * When the offsets are still zero, we need to restore them after the block to have a correct + * repcode history. If only one offset was invalid, it is easy. The tricky case is when both + * offsets were invalid. We need to figure out which offset to refill with. + * - If both offsets are zero they are in the same order. + * - If both offsets are non-zero, we won't restore the offsets from `offsetSaved[12]`. + * - If only one is zero, we need to decide which offset to restore. + * - If rep_offset1 is non-zero, then rep_offset2 must be offsetSaved1. + * - It is impossible for rep_offset2 to be non-zero. + * + * So if rep_offset1 started invalid (offsetSaved1 != 0) and became valid (rep_offset1 != 0), then + * set rep[0] = rep_offset1 and rep[1] = offsetSaved1. + */ + offsetSaved2 = ((offsetSaved1 != 0) && (rep_offset1 != 0)) ? offsetSaved1 : offsetSaved2; + + /* save reps for next block */ + rep[0] = rep_offset1 ? rep_offset1 : offsetSaved1; + rep[1] = rep_offset2 ? rep_offset2 : offsetSaved2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); + +_offset: /* Requires: ip0, idx */ + + /* Compute the offset code. */ + match0 = base + matchIdx; + rep_offset2 = rep_offset1; + rep_offset1 = (U32)(ip0-match0); + offcode = OFFSET_TO_OFFBASE(rep_offset1); + mLength = 4; + + /* Count the backwards match length. */ + while (((ip0>anchor) & (match0>prefixStart)) && (ip0[-1] == match0[-1])) { + ip0--; + match0--; + mLength++; + } + +_match: /* Requires: ip0, match0, offcode */ + + /* Count the forward length. */ + mLength += ZSTD_count(ip0 + mLength, match0 + mLength, iend); + + ZSTD_storeSeq(seqStore, (size_t)(ip0 - anchor), anchor, iend, offcode, mLength); + + ip0 += mLength; + anchor = ip0; + + /* Fill table and check for immediate repcode. */ + if (ip0 <= ilimit) { + /* Fill Table */ + assert(base+current0+2 > istart); /* check base overflow */ + hashTable[ZSTD_hashPtr(base+current0+2, hlog, mls)] = current0+2; /* here because current+2 could be > iend-8 */ + hashTable[ZSTD_hashPtr(ip0-2, hlog, mls)] = (U32)(ip0-2-base); + + if (rep_offset2 > 0) { /* rep_offset2==0 means rep_offset2 is invalidated */ + while ( (ip0 <= ilimit) && (MEM_read32(ip0) == MEM_read32(ip0 - rep_offset2)) ) { + /* store sequence */ + size_t const rLength = ZSTD_count(ip0+4, ip0+4-rep_offset2, iend) + 4; + { U32 const tmpOff = rep_offset2; rep_offset2 = rep_offset1; rep_offset1 = tmpOff; } /* swap rep_offset2 <=> rep_offset1 */ + hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = (U32)(ip0-base); + ip0 += rLength; + ZSTD_storeSeq(seqStore, 0 /*litLen*/, anchor, iend, REPCODE1_TO_OFFBASE, rLength); + anchor = ip0; + continue; /* faster when present (confirmed on gcc-8) ... (?) */ + } } } + + goto _start; +} + +#define ZSTD_GEN_FAST_FN(dictMode, mml, cmov) \ + static size_t ZSTD_compressBlock_fast_##dictMode##_##mml##_##cmov( \ + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], \ + void const* src, size_t srcSize) \ + { \ + return ZSTD_compressBlock_fast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mml, cmov); \ + } + +ZSTD_GEN_FAST_FN(noDict, 4, 1) +ZSTD_GEN_FAST_FN(noDict, 5, 1) +ZSTD_GEN_FAST_FN(noDict, 6, 1) +ZSTD_GEN_FAST_FN(noDict, 7, 1) + +ZSTD_GEN_FAST_FN(noDict, 4, 0) +ZSTD_GEN_FAST_FN(noDict, 5, 0) +ZSTD_GEN_FAST_FN(noDict, 6, 0) +ZSTD_GEN_FAST_FN(noDict, 7, 0) + +size_t ZSTD_compressBlock_fast( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + U32 const mml = ms->cParams.minMatch; + /* use cmov when "candidate in range" branch is likely unpredictable */ + int const useCmov = ms->cParams.windowLog < 19; + assert(ms->dictMatchState == NULL); + if (useCmov) { + switch(mml) + { + default: /* includes case 3 */ + case 4 : + return ZSTD_compressBlock_fast_noDict_4_1(ms, seqStore, rep, src, srcSize); + case 5 : + return ZSTD_compressBlock_fast_noDict_5_1(ms, seqStore, rep, src, srcSize); + case 6 : + return ZSTD_compressBlock_fast_noDict_6_1(ms, seqStore, rep, src, srcSize); + case 7 : + return ZSTD_compressBlock_fast_noDict_7_1(ms, seqStore, rep, src, srcSize); + } + } else { + /* use a branch instead */ + switch(mml) + { + default: /* includes case 3 */ + case 4 : + return ZSTD_compressBlock_fast_noDict_4_0(ms, seqStore, rep, src, srcSize); + case 5 : + return ZSTD_compressBlock_fast_noDict_5_0(ms, seqStore, rep, src, srcSize); + case 6 : + return ZSTD_compressBlock_fast_noDict_6_0(ms, seqStore, rep, src, srcSize); + case 7 : + return ZSTD_compressBlock_fast_noDict_7_0(ms, seqStore, rep, src, srcSize); + } + } +} + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_fast_dictMatchState_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize, U32 const mls, U32 const hasStep) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hlog = cParams->hashLog; + /* support stepSize of 0 */ + U32 const stepSize = cParams->targetLength + !(cParams->targetLength); + const BYTE* const base = ms->window.base; + const BYTE* const istart = (const BYTE*)src; + const BYTE* ip0 = istart; + const BYTE* ip1 = ip0 + stepSize; /* we assert below that stepSize >= 1 */ + const BYTE* anchor = istart; + const U32 prefixStartIndex = ms->window.dictLimit; + const BYTE* const prefixStart = base + prefixStartIndex; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = iend - HASH_READ_SIZE; + U32 offset_1=rep[0], offset_2=rep[1]; + + const ZSTD_MatchState_t* const dms = ms->dictMatchState; + const ZSTD_compressionParameters* const dictCParams = &dms->cParams ; + const U32* const dictHashTable = dms->hashTable; + const U32 dictStartIndex = dms->window.dictLimit; + const BYTE* const dictBase = dms->window.base; + const BYTE* const dictStart = dictBase + dictStartIndex; + const BYTE* const dictEnd = dms->window.nextSrc; + const U32 dictIndexDelta = prefixStartIndex - (U32)(dictEnd - dictBase); + const U32 dictAndPrefixLength = (U32)(istart - prefixStart + dictEnd - dictStart); + const U32 dictHBits = dictCParams->hashLog + ZSTD_SHORT_CACHE_TAG_BITS; + + /* if a dictionary is still attached, it necessarily means that + * it is within window size. So we just check it. */ + const U32 maxDistance = 1U << cParams->windowLog; + const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); + assert(endIndex - prefixStartIndex <= maxDistance); + (void)maxDistance; (void)endIndex; /* these variables are not used when assert() is disabled */ + + (void)hasStep; /* not currently specialized on whether it's accelerated */ + + /* ensure there will be no underflow + * when translating a dict index into a local index */ + assert(prefixStartIndex >= (U32)(dictEnd - dictBase)); + + if (ms->prefetchCDictTables) { + size_t const hashTableBytes = (((size_t)1) << dictCParams->hashLog) * sizeof(U32); + PREFETCH_AREA(dictHashTable, hashTableBytes); + } + + /* init */ + DEBUGLOG(5, "ZSTD_compressBlock_fast_dictMatchState_generic"); + ip0 += (dictAndPrefixLength == 0); + /* dictMatchState repCode checks don't currently handle repCode == 0 + * disabling. */ + assert(offset_1 <= dictAndPrefixLength); + assert(offset_2 <= dictAndPrefixLength); + + /* Outer search loop */ + assert(stepSize >= 1); + while (ip1 <= ilimit) { /* repcode check at (ip0 + 1) is safe because ip0 < ip1 */ + size_t mLength; + size_t hash0 = ZSTD_hashPtr(ip0, hlog, mls); + + size_t const dictHashAndTag0 = ZSTD_hashPtr(ip0, dictHBits, mls); + U32 dictMatchIndexAndTag = dictHashTable[dictHashAndTag0 >> ZSTD_SHORT_CACHE_TAG_BITS]; + int dictTagsMatch = ZSTD_comparePackedTags(dictMatchIndexAndTag, dictHashAndTag0); + + U32 matchIndex = hashTable[hash0]; + U32 curr = (U32)(ip0 - base); + size_t step = stepSize; + const size_t kStepIncr = 1 << kSearchStrength; + const BYTE* nextStep = ip0 + kStepIncr; + + /* Inner search loop */ + while (1) { + const BYTE* match = base + matchIndex; + const U32 repIndex = curr + 1 - offset_1; + const BYTE* repMatch = (repIndex < prefixStartIndex) ? + dictBase + (repIndex - dictIndexDelta) : + base + repIndex; + const size_t hash1 = ZSTD_hashPtr(ip1, hlog, mls); + size_t const dictHashAndTag1 = ZSTD_hashPtr(ip1, dictHBits, mls); + hashTable[hash0] = curr; /* update hash table */ + + if ((ZSTD_index_overlap_check(prefixStartIndex, repIndex)) + && (MEM_read32(repMatch) == MEM_read32(ip0 + 1))) { + const BYTE* const repMatchEnd = repIndex < prefixStartIndex ? dictEnd : iend; + mLength = ZSTD_count_2segments(ip0 + 1 + 4, repMatch + 4, iend, repMatchEnd, prefixStart) + 4; + ip0++; + ZSTD_storeSeq(seqStore, (size_t) (ip0 - anchor), anchor, iend, REPCODE1_TO_OFFBASE, mLength); + break; + } + + if (dictTagsMatch) { + /* Found a possible dict match */ + const U32 dictMatchIndex = dictMatchIndexAndTag >> ZSTD_SHORT_CACHE_TAG_BITS; + const BYTE* dictMatch = dictBase + dictMatchIndex; + if (dictMatchIndex > dictStartIndex && + MEM_read32(dictMatch) == MEM_read32(ip0)) { + /* To replicate extDict parse behavior, we only use dict matches when the normal matchIndex is invalid */ + if (matchIndex <= prefixStartIndex) { + U32 const offset = (U32) (curr - dictMatchIndex - dictIndexDelta); + mLength = ZSTD_count_2segments(ip0 + 4, dictMatch + 4, iend, dictEnd, prefixStart) + 4; + while (((ip0 > anchor) & (dictMatch > dictStart)) + && (ip0[-1] == dictMatch[-1])) { + ip0--; + dictMatch--; + mLength++; + } /* catch up */ + offset_2 = offset_1; + offset_1 = offset; + ZSTD_storeSeq(seqStore, (size_t) (ip0 - anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); + break; + } + } + } + + if (ZSTD_match4Found_cmov(ip0, match, matchIndex, prefixStartIndex)) { + /* found a regular match of size >= 4 */ + U32 const offset = (U32) (ip0 - match); + mLength = ZSTD_count(ip0 + 4, match + 4, iend) + 4; + while (((ip0 > anchor) & (match > prefixStart)) + && (ip0[-1] == match[-1])) { + ip0--; + match--; + mLength++; + } /* catch up */ + offset_2 = offset_1; + offset_1 = offset; + ZSTD_storeSeq(seqStore, (size_t) (ip0 - anchor), anchor, iend, OFFSET_TO_OFFBASE(offset), mLength); + break; + } + + /* Prepare for next iteration */ + dictMatchIndexAndTag = dictHashTable[dictHashAndTag1 >> ZSTD_SHORT_CACHE_TAG_BITS]; + dictTagsMatch = ZSTD_comparePackedTags(dictMatchIndexAndTag, dictHashAndTag1); + matchIndex = hashTable[hash1]; + + if (ip1 >= nextStep) { + step++; + nextStep += kStepIncr; + } + ip0 = ip1; + ip1 = ip1 + step; + if (ip1 > ilimit) goto _cleanup; + + curr = (U32)(ip0 - base); + hash0 = hash1; + } /* end inner search loop */ + + /* match found */ + assert(mLength); + ip0 += mLength; + anchor = ip0; + + if (ip0 <= ilimit) { + /* Fill Table */ + assert(base+curr+2 > istart); /* check base overflow */ + hashTable[ZSTD_hashPtr(base+curr+2, hlog, mls)] = curr+2; /* here because curr+2 could be > iend-8 */ + hashTable[ZSTD_hashPtr(ip0-2, hlog, mls)] = (U32)(ip0-2-base); + + /* check immediate repcode */ + while (ip0 <= ilimit) { + U32 const current2 = (U32)(ip0-base); + U32 const repIndex2 = current2 - offset_2; + const BYTE* repMatch2 = repIndex2 < prefixStartIndex ? + dictBase - dictIndexDelta + repIndex2 : + base + repIndex2; + if ( (ZSTD_index_overlap_check(prefixStartIndex, repIndex2)) + && (MEM_read32(repMatch2) == MEM_read32(ip0))) { + const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend; + size_t const repLength2 = ZSTD_count_2segments(ip0+4, repMatch2+4, iend, repEnd2, prefixStart) + 4; + U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */ + ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); + hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = current2; + ip0 += repLength2; + anchor = ip0; + continue; + } + break; + } + } + + /* Prepare for next iteration */ + assert(ip0 == anchor); + ip1 = ip0 + stepSize; + } + +_cleanup: + /* save reps for next block */ + rep[0] = offset_1; + rep[1] = offset_2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); +} + + +ZSTD_GEN_FAST_FN(dictMatchState, 4, 0) +ZSTD_GEN_FAST_FN(dictMatchState, 5, 0) +ZSTD_GEN_FAST_FN(dictMatchState, 6, 0) +ZSTD_GEN_FAST_FN(dictMatchState, 7, 0) + +size_t ZSTD_compressBlock_fast_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + U32 const mls = ms->cParams.minMatch; + assert(ms->dictMatchState != NULL); + switch(mls) + { + default: /* includes case 3 */ + case 4 : + return ZSTD_compressBlock_fast_dictMatchState_4_0(ms, seqStore, rep, src, srcSize); + case 5 : + return ZSTD_compressBlock_fast_dictMatchState_5_0(ms, seqStore, rep, src, srcSize); + case 6 : + return ZSTD_compressBlock_fast_dictMatchState_6_0(ms, seqStore, rep, src, srcSize); + case 7 : + return ZSTD_compressBlock_fast_dictMatchState_7_0(ms, seqStore, rep, src, srcSize); + } +} + + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_fast_extDict_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize, U32 const mls, U32 const hasStep) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hlog = cParams->hashLog; + /* support stepSize of 0 */ + size_t const stepSize = cParams->targetLength + !(cParams->targetLength) + 1; + const BYTE* const base = ms->window.base; + const BYTE* const dictBase = ms->window.dictBase; + const BYTE* const istart = (const BYTE*)src; + const BYTE* anchor = istart; + const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); + const U32 lowLimit = ZSTD_getLowestMatchIndex(ms, endIndex, cParams->windowLog); + const U32 dictStartIndex = lowLimit; + const BYTE* const dictStart = dictBase + dictStartIndex; + const U32 dictLimit = ms->window.dictLimit; + const U32 prefixStartIndex = dictLimit < lowLimit ? lowLimit : dictLimit; + const BYTE* const prefixStart = base + prefixStartIndex; + const BYTE* const dictEnd = dictBase + prefixStartIndex; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = iend - 8; + U32 offset_1=rep[0], offset_2=rep[1]; + U32 offsetSaved1 = 0, offsetSaved2 = 0; + + const BYTE* ip0 = istart; + const BYTE* ip1; + const BYTE* ip2; + const BYTE* ip3; + U32 current0; + + + size_t hash0; /* hash for ip0 */ + size_t hash1; /* hash for ip1 */ + U32 idx; /* match idx for ip0 */ + const BYTE* idxBase; /* base pointer for idx */ + + U32 offcode; + const BYTE* match0; + size_t mLength; + const BYTE* matchEnd = 0; /* initialize to avoid warning, assert != 0 later */ + + size_t step; + const BYTE* nextStep; + const size_t kStepIncr = (1 << (kSearchStrength - 1)); + + (void)hasStep; /* not currently specialized on whether it's accelerated */ + + DEBUGLOG(5, "ZSTD_compressBlock_fast_extDict_generic (offset_1=%u)", offset_1); + + /* switch to "regular" variant if extDict is invalidated due to maxDistance */ + if (prefixStartIndex == dictStartIndex) + return ZSTD_compressBlock_fast(ms, seqStore, rep, src, srcSize); + + { U32 const curr = (U32)(ip0 - base); + U32 const maxRep = curr - dictStartIndex; + if (offset_2 >= maxRep) offsetSaved2 = offset_2, offset_2 = 0; + if (offset_1 >= maxRep) offsetSaved1 = offset_1, offset_1 = 0; + } + + /* start each op */ +_start: /* Requires: ip0 */ + + step = stepSize; + nextStep = ip0 + kStepIncr; + + /* calculate positions, ip0 - anchor == 0, so we skip step calc */ + ip1 = ip0 + 1; + ip2 = ip0 + step; + ip3 = ip2 + 1; + + if (ip3 >= ilimit) { + goto _cleanup; + } + + hash0 = ZSTD_hashPtr(ip0, hlog, mls); + hash1 = ZSTD_hashPtr(ip1, hlog, mls); + + idx = hashTable[hash0]; + idxBase = idx < prefixStartIndex ? dictBase : base; + + do { + { /* load repcode match for ip[2] */ + U32 const current2 = (U32)(ip2 - base); + U32 const repIndex = current2 - offset_1; + const BYTE* const repBase = repIndex < prefixStartIndex ? dictBase : base; + U32 rval; + if ( ((U32)(prefixStartIndex - repIndex) >= 4) /* intentional underflow */ + & (offset_1 > 0) ) { + rval = MEM_read32(repBase + repIndex); + } else { + rval = MEM_read32(ip2) ^ 1; /* guaranteed to not match. */ + } + + /* write back hash table entry */ + current0 = (U32)(ip0 - base); + hashTable[hash0] = current0; + + /* check repcode at ip[2] */ + if (MEM_read32(ip2) == rval) { + ip0 = ip2; + match0 = repBase + repIndex; + matchEnd = repIndex < prefixStartIndex ? dictEnd : iend; + assert((match0 != prefixStart) & (match0 != dictStart)); + mLength = ip0[-1] == match0[-1]; + ip0 -= mLength; + match0 -= mLength; + offcode = REPCODE1_TO_OFFBASE; + mLength += 4; + goto _match; + } } + + { /* load match for ip[0] */ + U32 const mval = idx >= dictStartIndex ? + MEM_read32(idxBase + idx) : + MEM_read32(ip0) ^ 1; /* guaranteed not to match */ + + /* check match at ip[0] */ + if (MEM_read32(ip0) == mval) { + /* found a match! */ + goto _offset; + } } + + /* lookup ip[1] */ + idx = hashTable[hash1]; + idxBase = idx < prefixStartIndex ? dictBase : base; + + /* hash ip[2] */ + hash0 = hash1; + hash1 = ZSTD_hashPtr(ip2, hlog, mls); + + /* advance to next positions */ + ip0 = ip1; + ip1 = ip2; + ip2 = ip3; + + /* write back hash table entry */ + current0 = (U32)(ip0 - base); + hashTable[hash0] = current0; + + { /* load match for ip[0] */ + U32 const mval = idx >= dictStartIndex ? + MEM_read32(idxBase + idx) : + MEM_read32(ip0) ^ 1; /* guaranteed not to match */ + + /* check match at ip[0] */ + if (MEM_read32(ip0) == mval) { + /* found a match! */ + goto _offset; + } } + + /* lookup ip[1] */ + idx = hashTable[hash1]; + idxBase = idx < prefixStartIndex ? dictBase : base; + + /* hash ip[2] */ + hash0 = hash1; + hash1 = ZSTD_hashPtr(ip2, hlog, mls); + + /* advance to next positions */ + ip0 = ip1; + ip1 = ip2; + ip2 = ip0 + step; + ip3 = ip1 + step; + + /* calculate step */ + if (ip2 >= nextStep) { + step++; + PREFETCH_L1(ip1 + 64); + PREFETCH_L1(ip1 + 128); + nextStep += kStepIncr; + } + } while (ip3 < ilimit); + +_cleanup: + /* Note that there are probably still a couple positions we could search. + * However, it seems to be a meaningful performance hit to try to search + * them. So let's not. */ + + /* If offset_1 started invalid (offsetSaved1 != 0) and became valid (offset_1 != 0), + * rotate saved offsets. See comment in ZSTD_compressBlock_fast_noDict for more context. */ + offsetSaved2 = ((offsetSaved1 != 0) && (offset_1 != 0)) ? offsetSaved1 : offsetSaved2; + + /* save reps for next block */ + rep[0] = offset_1 ? offset_1 : offsetSaved1; + rep[1] = offset_2 ? offset_2 : offsetSaved2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); + +_offset: /* Requires: ip0, idx, idxBase */ + + /* Compute the offset code. */ + { U32 const offset = current0 - idx; + const BYTE* const lowMatchPtr = idx < prefixStartIndex ? dictStart : prefixStart; + matchEnd = idx < prefixStartIndex ? dictEnd : iend; + match0 = idxBase + idx; + offset_2 = offset_1; + offset_1 = offset; + offcode = OFFSET_TO_OFFBASE(offset); + mLength = 4; + + /* Count the backwards match length. */ + while (((ip0>anchor) & (match0>lowMatchPtr)) && (ip0[-1] == match0[-1])) { + ip0--; + match0--; + mLength++; + } } + +_match: /* Requires: ip0, match0, offcode, matchEnd */ + + /* Count the forward length. */ + assert(matchEnd != 0); + mLength += ZSTD_count_2segments(ip0 + mLength, match0 + mLength, iend, matchEnd, prefixStart); + + ZSTD_storeSeq(seqStore, (size_t)(ip0 - anchor), anchor, iend, offcode, mLength); + + ip0 += mLength; + anchor = ip0; + + /* write next hash table entry */ + if (ip1 < ip0) { + hashTable[hash1] = (U32)(ip1 - base); + } + + /* Fill table and check for immediate repcode. */ + if (ip0 <= ilimit) { + /* Fill Table */ + assert(base+current0+2 > istart); /* check base overflow */ + hashTable[ZSTD_hashPtr(base+current0+2, hlog, mls)] = current0+2; /* here because current+2 could be > iend-8 */ + hashTable[ZSTD_hashPtr(ip0-2, hlog, mls)] = (U32)(ip0-2-base); + + while (ip0 <= ilimit) { + U32 const repIndex2 = (U32)(ip0-base) - offset_2; + const BYTE* const repMatch2 = repIndex2 < prefixStartIndex ? dictBase + repIndex2 : base + repIndex2; + if ( ((ZSTD_index_overlap_check(prefixStartIndex, repIndex2)) & (offset_2 > 0)) + && (MEM_read32(repMatch2) == MEM_read32(ip0)) ) { + const BYTE* const repEnd2 = repIndex2 < prefixStartIndex ? dictEnd : iend; + size_t const repLength2 = ZSTD_count_2segments(ip0+4, repMatch2+4, iend, repEnd2, prefixStart) + 4; + { U32 const tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; } /* swap offset_2 <=> offset_1 */ + ZSTD_storeSeq(seqStore, 0 /*litlen*/, anchor, iend, REPCODE1_TO_OFFBASE, repLength2); + hashTable[ZSTD_hashPtr(ip0, hlog, mls)] = (U32)(ip0-base); + ip0 += repLength2; + anchor = ip0; + continue; + } + break; + } } + + goto _start; +} + +ZSTD_GEN_FAST_FN(extDict, 4, 0) +ZSTD_GEN_FAST_FN(extDict, 5, 0) +ZSTD_GEN_FAST_FN(extDict, 6, 0) +ZSTD_GEN_FAST_FN(extDict, 7, 0) + +size_t ZSTD_compressBlock_fast_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + U32 const mls = ms->cParams.minMatch; + assert(ms->dictMatchState == NULL); + switch(mls) + { + default: /* includes case 3 */ + case 4 : + return ZSTD_compressBlock_fast_extDict_4_0(ms, seqStore, rep, src, srcSize); + case 5 : + return ZSTD_compressBlock_fast_extDict_5_0(ms, seqStore, rep, src, srcSize); + case 6 : + return ZSTD_compressBlock_fast_extDict_6_0(ms, seqStore, rep, src, srcSize); + case 7 : + return ZSTD_compressBlock_fast_extDict_7_0(ms, seqStore, rep, src, srcSize); + } +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.h new file mode 100644 index 0000000000..216821ac33 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_fast.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_FAST_H +#define ZSTD_FAST_H + +#include "../common/mem.h" /* U32 */ +#include "zstd_compress_internal.h" + +void ZSTD_fillHashTable(ZSTD_MatchState_t* ms, + void const* end, ZSTD_dictTableLoadMethod_e dtlm, + ZSTD_tableFillPurpose_e tfp); +size_t ZSTD_compressBlock_fast( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_fast_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_fast_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#endif /* ZSTD_FAST_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.c new file mode 100644 index 0000000000..272ebe0ece --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.c @@ -0,0 +1,2199 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "zstd_compress_internal.h" +#include "zstd_lazy.h" +#include "../common/bits.h" /* ZSTD_countTrailingZeros64 */ + +#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) + +#define kLazySkippingStep 8 + + +/*-************************************* +* Binary Tree search +***************************************/ + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_updateDUBT(ZSTD_MatchState_t* ms, + const BYTE* ip, const BYTE* iend, + U32 mls) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hashLog = cParams->hashLog; + + U32* const bt = ms->chainTable; + U32 const btLog = cParams->chainLog - 1; + U32 const btMask = (1 << btLog) - 1; + + const BYTE* const base = ms->window.base; + U32 const target = (U32)(ip - base); + U32 idx = ms->nextToUpdate; + + if (idx != target) + DEBUGLOG(7, "ZSTD_updateDUBT, from %u to %u (dictLimit:%u)", + idx, target, ms->window.dictLimit); + assert(ip + 8 <= iend); /* condition for ZSTD_hashPtr */ + (void)iend; + + assert(idx >= ms->window.dictLimit); /* condition for valid base+idx */ + for ( ; idx < target ; idx++) { + size_t const h = ZSTD_hashPtr(base + idx, hashLog, mls); /* assumption : ip + 8 <= iend */ + U32 const matchIndex = hashTable[h]; + + U32* const nextCandidatePtr = bt + 2*(idx&btMask); + U32* const sortMarkPtr = nextCandidatePtr + 1; + + DEBUGLOG(8, "ZSTD_updateDUBT: insert %u", idx); + hashTable[h] = idx; /* Update Hash Table */ + *nextCandidatePtr = matchIndex; /* update BT like a chain */ + *sortMarkPtr = ZSTD_DUBT_UNSORTED_MARK; + } + ms->nextToUpdate = target; +} + + +/** ZSTD_insertDUBT1() : + * sort one already inserted but unsorted position + * assumption : curr >= btlow == (curr - btmask) + * doesn't fail */ +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_insertDUBT1(const ZSTD_MatchState_t* ms, + U32 curr, const BYTE* inputEnd, + U32 nbCompares, U32 btLow, + const ZSTD_dictMode_e dictMode) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const bt = ms->chainTable; + U32 const btLog = cParams->chainLog - 1; + U32 const btMask = (1 << btLog) - 1; + size_t commonLengthSmaller=0, commonLengthLarger=0; + const BYTE* const base = ms->window.base; + const BYTE* const dictBase = ms->window.dictBase; + const U32 dictLimit = ms->window.dictLimit; + const BYTE* const ip = (curr>=dictLimit) ? base + curr : dictBase + curr; + const BYTE* const iend = (curr>=dictLimit) ? inputEnd : dictBase + dictLimit; + const BYTE* const dictEnd = dictBase + dictLimit; + const BYTE* const prefixStart = base + dictLimit; + const BYTE* match; + U32* smallerPtr = bt + 2*(curr&btMask); + U32* largerPtr = smallerPtr + 1; + U32 matchIndex = *smallerPtr; /* this candidate is unsorted : next sorted candidate is reached through *smallerPtr, while *largerPtr contains previous unsorted candidate (which is already saved and can be overwritten) */ + U32 dummy32; /* to be nullified at the end */ + U32 const windowValid = ms->window.lowLimit; + U32 const maxDistance = 1U << cParams->windowLog; + U32 const windowLow = (curr - windowValid > maxDistance) ? curr - maxDistance : windowValid; + + + DEBUGLOG(8, "ZSTD_insertDUBT1(%u) (dictLimit=%u, lowLimit=%u)", + curr, dictLimit, windowLow); + assert(curr >= btLow); + assert(ip < iend); /* condition for ZSTD_count */ + + for (; nbCompares && (matchIndex > windowLow); --nbCompares) { + U32* const nextPtr = bt + 2*(matchIndex & btMask); + size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ + assert(matchIndex < curr); + /* note : all candidates are now supposed sorted, + * but it's still possible to have nextPtr[1] == ZSTD_DUBT_UNSORTED_MARK + * when a real index has the same value as ZSTD_DUBT_UNSORTED_MARK */ + + if ( (dictMode != ZSTD_extDict) + || (matchIndex+matchLength >= dictLimit) /* both in current segment*/ + || (curr < dictLimit) /* both in extDict */) { + const BYTE* const mBase = ( (dictMode != ZSTD_extDict) + || (matchIndex+matchLength >= dictLimit)) ? + base : dictBase; + assert( (matchIndex+matchLength >= dictLimit) /* might be wrong if extDict is incorrectly set to 0 */ + || (curr < dictLimit) ); + match = mBase + matchIndex; + matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); + } else { + match = dictBase + matchIndex; + matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); + if (matchIndex+matchLength >= dictLimit) + match = base + matchIndex; /* preparation for next read of match[matchLength] */ + } + + DEBUGLOG(8, "ZSTD_insertDUBT1: comparing %u with %u : found %u common bytes ", + curr, matchIndex, (U32)matchLength); + + if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ + break; /* drop , to guarantee consistency ; miss a bit of compression, but other solutions can corrupt tree */ + } + + if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ + /* match is smaller than current */ + *smallerPtr = matchIndex; /* update smaller idx */ + commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ + if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */ + DEBUGLOG(8, "ZSTD_insertDUBT1: %u (>btLow=%u) is smaller : next => %u", + matchIndex, btLow, nextPtr[1]); + smallerPtr = nextPtr+1; /* new "candidate" => larger than match, which was smaller than target */ + matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to current */ + } else { + /* match is larger than current */ + *largerPtr = matchIndex; + commonLengthLarger = matchLength; + if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */ + DEBUGLOG(8, "ZSTD_insertDUBT1: %u (>btLow=%u) is larger => %u", + matchIndex, btLow, nextPtr[0]); + largerPtr = nextPtr; + matchIndex = nextPtr[0]; + } } + + *smallerPtr = *largerPtr = 0; +} + + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_DUBT_findBetterDictMatch ( + const ZSTD_MatchState_t* ms, + const BYTE* const ip, const BYTE* const iend, + size_t* offsetPtr, + size_t bestLength, + U32 nbCompares, + U32 const mls, + const ZSTD_dictMode_e dictMode) +{ + const ZSTD_MatchState_t * const dms = ms->dictMatchState; + const ZSTD_compressionParameters* const dmsCParams = &dms->cParams; + const U32 * const dictHashTable = dms->hashTable; + U32 const hashLog = dmsCParams->hashLog; + size_t const h = ZSTD_hashPtr(ip, hashLog, mls); + U32 dictMatchIndex = dictHashTable[h]; + + const BYTE* const base = ms->window.base; + const BYTE* const prefixStart = base + ms->window.dictLimit; + U32 const curr = (U32)(ip-base); + const BYTE* const dictBase = dms->window.base; + const BYTE* const dictEnd = dms->window.nextSrc; + U32 const dictHighLimit = (U32)(dms->window.nextSrc - dms->window.base); + U32 const dictLowLimit = dms->window.lowLimit; + U32 const dictIndexDelta = ms->window.lowLimit - dictHighLimit; + + U32* const dictBt = dms->chainTable; + U32 const btLog = dmsCParams->chainLog - 1; + U32 const btMask = (1 << btLog) - 1; + U32 const btLow = (btMask >= dictHighLimit - dictLowLimit) ? dictLowLimit : dictHighLimit - btMask; + + size_t commonLengthSmaller=0, commonLengthLarger=0; + + (void)dictMode; + assert(dictMode == ZSTD_dictMatchState); + + for (; nbCompares && (dictMatchIndex > dictLowLimit); --nbCompares) { + U32* const nextPtr = dictBt + 2*(dictMatchIndex & btMask); + size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ + const BYTE* match = dictBase + dictMatchIndex; + matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); + if (dictMatchIndex+matchLength >= dictHighLimit) + match = base + dictMatchIndex + dictIndexDelta; /* to prepare for next usage of match[matchLength] */ + + if (matchLength > bestLength) { + U32 matchIndex = dictMatchIndex + dictIndexDelta; + if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) ) { + DEBUGLOG(9, "ZSTD_DUBT_findBetterDictMatch(%u) : found better match length %u -> %u and offsetCode %u -> %u (dictMatchIndex %u, matchIndex %u)", + curr, (U32)bestLength, (U32)matchLength, (U32)*offsetPtr, OFFSET_TO_OFFBASE(curr - matchIndex), dictMatchIndex, matchIndex); + bestLength = matchLength, *offsetPtr = OFFSET_TO_OFFBASE(curr - matchIndex); + } + if (ip+matchLength == iend) { /* reached end of input : ip[matchLength] is not valid, no way to know if it's larger or smaller than match */ + break; /* drop, to guarantee consistency (miss a little bit of compression) */ + } + } + + if (match[matchLength] < ip[matchLength]) { + if (dictMatchIndex <= btLow) { break; } /* beyond tree size, stop the search */ + commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ + dictMatchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ + } else { + /* match is larger than current */ + if (dictMatchIndex <= btLow) { break; } /* beyond tree size, stop the search */ + commonLengthLarger = matchLength; + dictMatchIndex = nextPtr[0]; + } + } + + if (bestLength >= MINMATCH) { + U32 const mIndex = curr - (U32)OFFBASE_TO_OFFSET(*offsetPtr); (void)mIndex; + DEBUGLOG(8, "ZSTD_DUBT_findBetterDictMatch(%u) : found match of length %u and offsetCode %u (pos %u)", + curr, (U32)bestLength, (U32)*offsetPtr, mIndex); + } + return bestLength; + +} + + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_DUBT_findBestMatch(ZSTD_MatchState_t* ms, + const BYTE* const ip, const BYTE* const iend, + size_t* offBasePtr, + U32 const mls, + const ZSTD_dictMode_e dictMode) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hashLog = cParams->hashLog; + size_t const h = ZSTD_hashPtr(ip, hashLog, mls); + U32 matchIndex = hashTable[h]; + + const BYTE* const base = ms->window.base; + U32 const curr = (U32)(ip-base); + U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog); + + U32* const bt = ms->chainTable; + U32 const btLog = cParams->chainLog - 1; + U32 const btMask = (1 << btLog) - 1; + U32 const btLow = (btMask >= curr) ? 0 : curr - btMask; + U32 const unsortLimit = MAX(btLow, windowLow); + + U32* nextCandidate = bt + 2*(matchIndex&btMask); + U32* unsortedMark = bt + 2*(matchIndex&btMask) + 1; + U32 nbCompares = 1U << cParams->searchLog; + U32 nbCandidates = nbCompares; + U32 previousCandidate = 0; + + DEBUGLOG(7, "ZSTD_DUBT_findBestMatch (%u) ", curr); + assert(ip <= iend-8); /* required for h calculation */ + assert(dictMode != ZSTD_dedicatedDictSearch); + + /* reach end of unsorted candidates list */ + while ( (matchIndex > unsortLimit) + && (*unsortedMark == ZSTD_DUBT_UNSORTED_MARK) + && (nbCandidates > 1) ) { + DEBUGLOG(8, "ZSTD_DUBT_findBestMatch: candidate %u is unsorted", + matchIndex); + *unsortedMark = previousCandidate; /* the unsortedMark becomes a reversed chain, to move up back to original position */ + previousCandidate = matchIndex; + matchIndex = *nextCandidate; + nextCandidate = bt + 2*(matchIndex&btMask); + unsortedMark = bt + 2*(matchIndex&btMask) + 1; + nbCandidates --; + } + + /* nullify last candidate if it's still unsorted + * simplification, detrimental to compression ratio, beneficial for speed */ + if ( (matchIndex > unsortLimit) + && (*unsortedMark==ZSTD_DUBT_UNSORTED_MARK) ) { + DEBUGLOG(7, "ZSTD_DUBT_findBestMatch: nullify last unsorted candidate %u", + matchIndex); + *nextCandidate = *unsortedMark = 0; + } + + /* batch sort stacked candidates */ + matchIndex = previousCandidate; + while (matchIndex) { /* will end on matchIndex == 0 */ + U32* const nextCandidateIdxPtr = bt + 2*(matchIndex&btMask) + 1; + U32 const nextCandidateIdx = *nextCandidateIdxPtr; + ZSTD_insertDUBT1(ms, matchIndex, iend, + nbCandidates, unsortLimit, dictMode); + matchIndex = nextCandidateIdx; + nbCandidates++; + } + + /* find longest match */ + { size_t commonLengthSmaller = 0, commonLengthLarger = 0; + const BYTE* const dictBase = ms->window.dictBase; + const U32 dictLimit = ms->window.dictLimit; + const BYTE* const dictEnd = dictBase + dictLimit; + const BYTE* const prefixStart = base + dictLimit; + U32* smallerPtr = bt + 2*(curr&btMask); + U32* largerPtr = bt + 2*(curr&btMask) + 1; + U32 matchEndIdx = curr + 8 + 1; + U32 dummy32; /* to be nullified at the end */ + size_t bestLength = 0; + + matchIndex = hashTable[h]; + hashTable[h] = curr; /* Update Hash Table */ + + for (; nbCompares && (matchIndex > windowLow); --nbCompares) { + U32* const nextPtr = bt + 2*(matchIndex & btMask); + size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ + const BYTE* match; + + if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) { + match = base + matchIndex; + matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); + } else { + match = dictBase + matchIndex; + matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); + if (matchIndex+matchLength >= dictLimit) + match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ + } + + if (matchLength > bestLength) { + if (matchLength > matchEndIdx - matchIndex) + matchEndIdx = matchIndex + (U32)matchLength; + if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr - matchIndex + 1) - ZSTD_highbit32((U32)*offBasePtr)) ) + bestLength = matchLength, *offBasePtr = OFFSET_TO_OFFBASE(curr - matchIndex); + if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ + if (dictMode == ZSTD_dictMatchState) { + nbCompares = 0; /* in addition to avoiding checking any + * further in this loop, make sure we + * skip checking in the dictionary. */ + } + break; /* drop, to guarantee consistency (miss a little bit of compression) */ + } + } + + if (match[matchLength] < ip[matchLength]) { + /* match is smaller than current */ + *smallerPtr = matchIndex; /* update smaller idx */ + commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ + if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ + smallerPtr = nextPtr+1; /* new "smaller" => larger of match */ + matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ + } else { + /* match is larger than current */ + *largerPtr = matchIndex; + commonLengthLarger = matchLength; + if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ + largerPtr = nextPtr; + matchIndex = nextPtr[0]; + } } + + *smallerPtr = *largerPtr = 0; + + assert(nbCompares <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ + if (dictMode == ZSTD_dictMatchState && nbCompares) { + bestLength = ZSTD_DUBT_findBetterDictMatch( + ms, ip, iend, + offBasePtr, bestLength, nbCompares, + mls, dictMode); + } + + assert(matchEndIdx > curr+8); /* ensure nextToUpdate is increased */ + ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ + if (bestLength >= MINMATCH) { + U32 const mIndex = curr - (U32)OFFBASE_TO_OFFSET(*offBasePtr); (void)mIndex; + DEBUGLOG(8, "ZSTD_DUBT_findBestMatch(%u) : found match of length %u and offsetCode %u (pos %u)", + curr, (U32)bestLength, (U32)*offBasePtr, mIndex); + } + return bestLength; + } +} + + +/** ZSTD_BtFindBestMatch() : Tree updater, providing best match */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_BtFindBestMatch( ZSTD_MatchState_t* ms, + const BYTE* const ip, const BYTE* const iLimit, + size_t* offBasePtr, + const U32 mls /* template */, + const ZSTD_dictMode_e dictMode) +{ + DEBUGLOG(7, "ZSTD_BtFindBestMatch"); + if (ip < ms->window.base + ms->nextToUpdate) return 0; /* skipped area */ + ZSTD_updateDUBT(ms, ip, iLimit, mls); + return ZSTD_DUBT_findBestMatch(ms, ip, iLimit, offBasePtr, mls, dictMode); +} + +/*********************************** +* Dedicated dict search +***********************************/ + +void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_MatchState_t* ms, const BYTE* const ip) +{ + const BYTE* const base = ms->window.base; + U32 const target = (U32)(ip - base); + U32* const hashTable = ms->hashTable; + U32* const chainTable = ms->chainTable; + U32 const chainSize = 1 << ms->cParams.chainLog; + U32 idx = ms->nextToUpdate; + U32 const minChain = chainSize < target - idx ? target - chainSize : idx; + U32 const bucketSize = 1 << ZSTD_LAZY_DDSS_BUCKET_LOG; + U32 const cacheSize = bucketSize - 1; + U32 const chainAttempts = (1 << ms->cParams.searchLog) - cacheSize; + U32 const chainLimit = chainAttempts > 255 ? 255 : chainAttempts; + + /* We know the hashtable is oversized by a factor of `bucketSize`. + * We are going to temporarily pretend `bucketSize == 1`, keeping only a + * single entry. We will use the rest of the space to construct a temporary + * chaintable. + */ + U32 const hashLog = ms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG; + U32* const tmpHashTable = hashTable; + U32* const tmpChainTable = hashTable + ((size_t)1 << hashLog); + U32 const tmpChainSize = (U32)((1 << ZSTD_LAZY_DDSS_BUCKET_LOG) - 1) << hashLog; + U32 const tmpMinChain = tmpChainSize < target ? target - tmpChainSize : idx; + U32 hashIdx; + + assert(ms->cParams.chainLog <= 24); + assert(ms->cParams.hashLog > ms->cParams.chainLog); + assert(idx != 0); + assert(tmpMinChain <= minChain); + + /* fill conventional hash table and conventional chain table */ + for ( ; idx < target; idx++) { + U32 const h = (U32)ZSTD_hashPtr(base + idx, hashLog, ms->cParams.minMatch); + if (idx >= tmpMinChain) { + tmpChainTable[idx - tmpMinChain] = hashTable[h]; + } + tmpHashTable[h] = idx; + } + + /* sort chains into ddss chain table */ + { + U32 chainPos = 0; + for (hashIdx = 0; hashIdx < (1U << hashLog); hashIdx++) { + U32 count; + U32 countBeyondMinChain = 0; + U32 i = tmpHashTable[hashIdx]; + for (count = 0; i >= tmpMinChain && count < cacheSize; count++) { + /* skip through the chain to the first position that won't be + * in the hash cache bucket */ + if (i < minChain) { + countBeyondMinChain++; + } + i = tmpChainTable[i - tmpMinChain]; + } + if (count == cacheSize) { + for (count = 0; count < chainLimit;) { + if (i < minChain) { + if (!i || ++countBeyondMinChain > cacheSize) { + /* only allow pulling `cacheSize` number of entries + * into the cache or chainTable beyond `minChain`, + * to replace the entries pulled out of the + * chainTable into the cache. This lets us reach + * back further without increasing the total number + * of entries in the chainTable, guaranteeing the + * DDSS chain table will fit into the space + * allocated for the regular one. */ + break; + } + } + chainTable[chainPos++] = i; + count++; + if (i < tmpMinChain) { + break; + } + i = tmpChainTable[i - tmpMinChain]; + } + } else { + count = 0; + } + if (count) { + tmpHashTable[hashIdx] = ((chainPos - count) << 8) + count; + } else { + tmpHashTable[hashIdx] = 0; + } + } + assert(chainPos <= chainSize); /* I believe this is guaranteed... */ + } + + /* move chain pointers into the last entry of each hash bucket */ + for (hashIdx = (1 << hashLog); hashIdx; ) { + U32 const bucketIdx = --hashIdx << ZSTD_LAZY_DDSS_BUCKET_LOG; + U32 const chainPackedPointer = tmpHashTable[hashIdx]; + U32 i; + for (i = 0; i < cacheSize; i++) { + hashTable[bucketIdx + i] = 0; + } + hashTable[bucketIdx + bucketSize - 1] = chainPackedPointer; + } + + /* fill the buckets of the hash table */ + for (idx = ms->nextToUpdate; idx < target; idx++) { + U32 const h = (U32)ZSTD_hashPtr(base + idx, hashLog, ms->cParams.minMatch) + << ZSTD_LAZY_DDSS_BUCKET_LOG; + U32 i; + /* Shift hash cache down 1. */ + for (i = cacheSize - 1; i; i--) + hashTable[h + i] = hashTable[h + i - 1]; + hashTable[h] = idx; + } + + ms->nextToUpdate = target; +} + +/* Returns the longest match length found in the dedicated dict search structure. + * If none are longer than the argument ml, then ml will be returned. + */ +FORCE_INLINE_TEMPLATE +size_t ZSTD_dedicatedDictSearch_lazy_search(size_t* offsetPtr, size_t ml, U32 nbAttempts, + const ZSTD_MatchState_t* const dms, + const BYTE* const ip, const BYTE* const iLimit, + const BYTE* const prefixStart, const U32 curr, + const U32 dictLimit, const size_t ddsIdx) { + const U32 ddsLowestIndex = dms->window.dictLimit; + const BYTE* const ddsBase = dms->window.base; + const BYTE* const ddsEnd = dms->window.nextSrc; + const U32 ddsSize = (U32)(ddsEnd - ddsBase); + const U32 ddsIndexDelta = dictLimit - ddsSize; + const U32 bucketSize = (1 << ZSTD_LAZY_DDSS_BUCKET_LOG); + const U32 bucketLimit = nbAttempts < bucketSize - 1 ? nbAttempts : bucketSize - 1; + U32 ddsAttempt; + U32 matchIndex; + + for (ddsAttempt = 0; ddsAttempt < bucketSize - 1; ddsAttempt++) { + PREFETCH_L1(ddsBase + dms->hashTable[ddsIdx + ddsAttempt]); + } + + { + U32 const chainPackedPointer = dms->hashTable[ddsIdx + bucketSize - 1]; + U32 const chainIndex = chainPackedPointer >> 8; + + PREFETCH_L1(&dms->chainTable[chainIndex]); + } + + for (ddsAttempt = 0; ddsAttempt < bucketLimit; ddsAttempt++) { + size_t currentMl=0; + const BYTE* match; + matchIndex = dms->hashTable[ddsIdx + ddsAttempt]; + match = ddsBase + matchIndex; + + if (!matchIndex) { + return ml; + } + + /* guaranteed by table construction */ + (void)ddsLowestIndex; + assert(matchIndex >= ddsLowestIndex); + assert(match+4 <= ddsEnd); + if (MEM_read32(match) == MEM_read32(ip)) { + /* assumption : matchIndex <= dictLimit-4 (by table construction) */ + currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, ddsEnd, prefixStart) + 4; + } + + /* save best solution */ + if (currentMl > ml) { + ml = currentMl; + *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + ddsIndexDelta)); + if (ip+currentMl == iLimit) { + /* best possible, avoids read overflow on next attempt */ + return ml; + } + } + } + + { + U32 const chainPackedPointer = dms->hashTable[ddsIdx + bucketSize - 1]; + U32 chainIndex = chainPackedPointer >> 8; + U32 const chainLength = chainPackedPointer & 0xFF; + U32 const chainAttempts = nbAttempts - ddsAttempt; + U32 const chainLimit = chainAttempts > chainLength ? chainLength : chainAttempts; + U32 chainAttempt; + + for (chainAttempt = 0 ; chainAttempt < chainLimit; chainAttempt++) { + PREFETCH_L1(ddsBase + dms->chainTable[chainIndex + chainAttempt]); + } + + for (chainAttempt = 0 ; chainAttempt < chainLimit; chainAttempt++, chainIndex++) { + size_t currentMl=0; + const BYTE* match; + matchIndex = dms->chainTable[chainIndex]; + match = ddsBase + matchIndex; + + /* guaranteed by table construction */ + assert(matchIndex >= ddsLowestIndex); + assert(match+4 <= ddsEnd); + if (MEM_read32(match) == MEM_read32(ip)) { + /* assumption : matchIndex <= dictLimit-4 (by table construction) */ + currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, ddsEnd, prefixStart) + 4; + } + + /* save best solution */ + if (currentMl > ml) { + ml = currentMl; + *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + ddsIndexDelta)); + if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ + } + } + } + return ml; +} + + +/* ********************************* +* Hash Chain +***********************************/ +#define NEXT_IN_CHAIN(d, mask) chainTable[(d) & (mask)] + +/* Update chains up to ip (excluded) + Assumption : always within prefix (i.e. not within extDict) */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 ZSTD_insertAndFindFirstIndex_internal( + ZSTD_MatchState_t* ms, + const ZSTD_compressionParameters* const cParams, + const BYTE* ip, U32 const mls, U32 const lazySkipping) +{ + U32* const hashTable = ms->hashTable; + const U32 hashLog = cParams->hashLog; + U32* const chainTable = ms->chainTable; + const U32 chainMask = (1 << cParams->chainLog) - 1; + const BYTE* const base = ms->window.base; + const U32 target = (U32)(ip - base); + U32 idx = ms->nextToUpdate; + + while(idx < target) { /* catch up */ + size_t const h = ZSTD_hashPtr(base+idx, hashLog, mls); + NEXT_IN_CHAIN(idx, chainMask) = hashTable[h]; + hashTable[h] = idx; + idx++; + /* Stop inserting every position when in the lazy skipping mode. */ + if (lazySkipping) + break; + } + + ms->nextToUpdate = target; + return hashTable[ZSTD_hashPtr(ip, hashLog, mls)]; +} + +U32 ZSTD_insertAndFindFirstIndex(ZSTD_MatchState_t* ms, const BYTE* ip) { + const ZSTD_compressionParameters* const cParams = &ms->cParams; + return ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, ms->cParams.minMatch, /* lazySkipping*/ 0); +} + +/* inlining is important to hardwire a hot branch (template emulation) */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_HcFindBestMatch( + ZSTD_MatchState_t* ms, + const BYTE* const ip, const BYTE* const iLimit, + size_t* offsetPtr, + const U32 mls, const ZSTD_dictMode_e dictMode) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const chainTable = ms->chainTable; + const U32 chainSize = (1 << cParams->chainLog); + const U32 chainMask = chainSize-1; + const BYTE* const base = ms->window.base; + const BYTE* const dictBase = ms->window.dictBase; + const U32 dictLimit = ms->window.dictLimit; + const BYTE* const prefixStart = base + dictLimit; + const BYTE* const dictEnd = dictBase + dictLimit; + const U32 curr = (U32)(ip-base); + const U32 maxDistance = 1U << cParams->windowLog; + const U32 lowestValid = ms->window.lowLimit; + const U32 withinMaxDistance = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; + const U32 isDictionary = (ms->loadedDictEnd != 0); + const U32 lowLimit = isDictionary ? lowestValid : withinMaxDistance; + const U32 minChain = curr > chainSize ? curr - chainSize : 0; + U32 nbAttempts = 1U << cParams->searchLog; + size_t ml=4-1; + + const ZSTD_MatchState_t* const dms = ms->dictMatchState; + const U32 ddsHashLog = dictMode == ZSTD_dedicatedDictSearch + ? dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG : 0; + const size_t ddsIdx = dictMode == ZSTD_dedicatedDictSearch + ? ZSTD_hashPtr(ip, ddsHashLog, mls) << ZSTD_LAZY_DDSS_BUCKET_LOG : 0; + + U32 matchIndex; + + if (dictMode == ZSTD_dedicatedDictSearch) { + const U32* entry = &dms->hashTable[ddsIdx]; + PREFETCH_L1(entry); + } + + /* HC4 match finder */ + matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls, ms->lazySkipping); + + for ( ; (matchIndex>=lowLimit) & (nbAttempts>0) ; nbAttempts--) { + size_t currentMl=0; + if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { + const BYTE* const match = base + matchIndex; + assert(matchIndex >= dictLimit); /* ensures this is true if dictMode != ZSTD_extDict */ + /* read 4B starting from (match + ml + 1 - sizeof(U32)) */ + if (MEM_read32(match + ml - 3) == MEM_read32(ip + ml - 3)) /* potentially better */ + currentMl = ZSTD_count(ip, match, iLimit); + } else { + const BYTE* const match = dictBase + matchIndex; + assert(match+4 <= dictEnd); + if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */ + currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dictEnd, prefixStart) + 4; + } + + /* save best solution */ + if (currentMl > ml) { + ml = currentMl; + *offsetPtr = OFFSET_TO_OFFBASE(curr - matchIndex); + if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ + } + + if (matchIndex <= minChain) break; + matchIndex = NEXT_IN_CHAIN(matchIndex, chainMask); + } + + assert(nbAttempts <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ + if (dictMode == ZSTD_dedicatedDictSearch) { + ml = ZSTD_dedicatedDictSearch_lazy_search(offsetPtr, ml, nbAttempts, dms, + ip, iLimit, prefixStart, curr, dictLimit, ddsIdx); + } else if (dictMode == ZSTD_dictMatchState) { + const U32* const dmsChainTable = dms->chainTable; + const U32 dmsChainSize = (1 << dms->cParams.chainLog); + const U32 dmsChainMask = dmsChainSize - 1; + const U32 dmsLowestIndex = dms->window.dictLimit; + const BYTE* const dmsBase = dms->window.base; + const BYTE* const dmsEnd = dms->window.nextSrc; + const U32 dmsSize = (U32)(dmsEnd - dmsBase); + const U32 dmsIndexDelta = dictLimit - dmsSize; + const U32 dmsMinChain = dmsSize > dmsChainSize ? dmsSize - dmsChainSize : 0; + + matchIndex = dms->hashTable[ZSTD_hashPtr(ip, dms->cParams.hashLog, mls)]; + + for ( ; (matchIndex>=dmsLowestIndex) & (nbAttempts>0) ; nbAttempts--) { + size_t currentMl=0; + const BYTE* const match = dmsBase + matchIndex; + assert(match+4 <= dmsEnd); + if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */ + currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dmsEnd, prefixStart) + 4; + + /* save best solution */ + if (currentMl > ml) { + ml = currentMl; + assert(curr > matchIndex + dmsIndexDelta); + *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + dmsIndexDelta)); + if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ + } + + if (matchIndex <= dmsMinChain) break; + + matchIndex = dmsChainTable[matchIndex & dmsChainMask]; + } + } + + return ml; +} + +/* ********************************* +* (SIMD) Row-based matchfinder +***********************************/ +/* Constants for row-based hash */ +#define ZSTD_ROW_HASH_TAG_MASK ((1u << ZSTD_ROW_HASH_TAG_BITS) - 1) +#define ZSTD_ROW_HASH_MAX_ENTRIES 64 /* absolute maximum number of entries per row, for all configurations */ + +#define ZSTD_ROW_HASH_CACHE_MASK (ZSTD_ROW_HASH_CACHE_SIZE - 1) + +typedef U64 ZSTD_VecMask; /* Clarifies when we are interacting with a U64 representing a mask of matches */ + +/* ZSTD_VecMask_next(): + * Starting from the LSB, returns the idx of the next non-zero bit. + * Basically counting the nb of trailing zeroes. + */ +MEM_STATIC U32 ZSTD_VecMask_next(ZSTD_VecMask val) { + return ZSTD_countTrailingZeros64(val); +} + +/* ZSTD_row_nextIndex(): + * Returns the next index to insert at within a tagTable row, and updates the "head" + * value to reflect the update. Essentially cycles backwards from [1, {entries per row}) + */ +FORCE_INLINE_TEMPLATE U32 ZSTD_row_nextIndex(BYTE* const tagRow, U32 const rowMask) { + U32 next = (*tagRow-1) & rowMask; + next += (next == 0) ? rowMask : 0; /* skip first position */ + *tagRow = (BYTE)next; + return next; +} + +/* ZSTD_isAligned(): + * Checks that a pointer is aligned to "align" bytes which must be a power of 2. + */ +MEM_STATIC int ZSTD_isAligned(void const* ptr, size_t align) { + assert((align & (align - 1)) == 0); + return (((size_t)ptr) & (align - 1)) == 0; +} + +/* ZSTD_row_prefetch(): + * Performs prefetching for the hashTable and tagTable at a given row. + */ +FORCE_INLINE_TEMPLATE void ZSTD_row_prefetch(U32 const* hashTable, BYTE const* tagTable, U32 const relRow, U32 const rowLog) { + PREFETCH_L1(hashTable + relRow); + if (rowLog >= 5) { + PREFETCH_L1(hashTable + relRow + 16); + /* Note: prefetching more of the hash table does not appear to be beneficial for 128-entry rows */ + } + PREFETCH_L1(tagTable + relRow); + if (rowLog == 6) { + PREFETCH_L1(tagTable + relRow + 32); + } + assert(rowLog == 4 || rowLog == 5 || rowLog == 6); + assert(ZSTD_isAligned(hashTable + relRow, 64)); /* prefetched hash row always 64-byte aligned */ + assert(ZSTD_isAligned(tagTable + relRow, (size_t)1 << rowLog)); /* prefetched tagRow sits on correct multiple of bytes (32,64,128) */ +} + +/* ZSTD_row_fillHashCache(): + * Fill up the hash cache starting at idx, prefetching up to ZSTD_ROW_HASH_CACHE_SIZE entries, + * but not beyond iLimit. + */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_row_fillHashCache(ZSTD_MatchState_t* ms, const BYTE* base, + U32 const rowLog, U32 const mls, + U32 idx, const BYTE* const iLimit) +{ + U32 const* const hashTable = ms->hashTable; + BYTE const* const tagTable = ms->tagTable; + U32 const hashLog = ms->rowHashLog; + U32 const maxElemsToPrefetch = (base + idx) > iLimit ? 0 : (U32)(iLimit - (base + idx) + 1); + U32 const lim = idx + MIN(ZSTD_ROW_HASH_CACHE_SIZE, maxElemsToPrefetch); + + for (; idx < lim; ++idx) { + U32 const hash = (U32)ZSTD_hashPtrSalted(base + idx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, ms->hashSalt); + U32 const row = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; + ZSTD_row_prefetch(hashTable, tagTable, row, rowLog); + ms->hashCache[idx & ZSTD_ROW_HASH_CACHE_MASK] = hash; + } + + DEBUGLOG(6, "ZSTD_row_fillHashCache(): [%u %u %u %u %u %u %u %u]", ms->hashCache[0], ms->hashCache[1], + ms->hashCache[2], ms->hashCache[3], ms->hashCache[4], + ms->hashCache[5], ms->hashCache[6], ms->hashCache[7]); +} + +/* ZSTD_row_nextCachedHash(): + * Returns the hash of base + idx, and replaces the hash in the hash cache with the byte at + * base + idx + ZSTD_ROW_HASH_CACHE_SIZE. Also prefetches the appropriate rows from hashTable and tagTable. + */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 ZSTD_row_nextCachedHash(U32* cache, U32 const* hashTable, + BYTE const* tagTable, BYTE const* base, + U32 idx, U32 const hashLog, + U32 const rowLog, U32 const mls, + U64 const hashSalt) +{ + U32 const newHash = (U32)ZSTD_hashPtrSalted(base+idx+ZSTD_ROW_HASH_CACHE_SIZE, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, hashSalt); + U32 const row = (newHash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; + ZSTD_row_prefetch(hashTable, tagTable, row, rowLog); + { U32 const hash = cache[idx & ZSTD_ROW_HASH_CACHE_MASK]; + cache[idx & ZSTD_ROW_HASH_CACHE_MASK] = newHash; + return hash; + } +} + +/* ZSTD_row_update_internalImpl(): + * Updates the hash table with positions starting from updateStartIdx until updateEndIdx. + */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_row_update_internalImpl(ZSTD_MatchState_t* ms, + U32 updateStartIdx, U32 const updateEndIdx, + U32 const mls, U32 const rowLog, + U32 const rowMask, U32 const useCache) +{ + U32* const hashTable = ms->hashTable; + BYTE* const tagTable = ms->tagTable; + U32 const hashLog = ms->rowHashLog; + const BYTE* const base = ms->window.base; + + DEBUGLOG(6, "ZSTD_row_update_internalImpl(): updateStartIdx=%u, updateEndIdx=%u", updateStartIdx, updateEndIdx); + for (; updateStartIdx < updateEndIdx; ++updateStartIdx) { + U32 const hash = useCache ? ZSTD_row_nextCachedHash(ms->hashCache, hashTable, tagTable, base, updateStartIdx, hashLog, rowLog, mls, ms->hashSalt) + : (U32)ZSTD_hashPtrSalted(base + updateStartIdx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, ms->hashSalt); + U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; + U32* const row = hashTable + relRow; + BYTE* tagRow = tagTable + relRow; + U32 const pos = ZSTD_row_nextIndex(tagRow, rowMask); + + assert(hash == ZSTD_hashPtrSalted(base + updateStartIdx, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, ms->hashSalt)); + tagRow[pos] = hash & ZSTD_ROW_HASH_TAG_MASK; + row[pos] = updateStartIdx; + } +} + +/* ZSTD_row_update_internal(): + * Inserts the byte at ip into the appropriate position in the hash table, and updates ms->nextToUpdate. + * Skips sections of long matches as is necessary. + */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_row_update_internal(ZSTD_MatchState_t* ms, const BYTE* ip, + U32 const mls, U32 const rowLog, + U32 const rowMask, U32 const useCache) +{ + U32 idx = ms->nextToUpdate; + const BYTE* const base = ms->window.base; + const U32 target = (U32)(ip - base); + const U32 kSkipThreshold = 384; + const U32 kMaxMatchStartPositionsToUpdate = 96; + const U32 kMaxMatchEndPositionsToUpdate = 32; + + if (useCache) { + /* Only skip positions when using hash cache, i.e. + * if we are loading a dict, don't skip anything. + * If we decide to skip, then we only update a set number + * of positions at the beginning and end of the match. + */ + if (UNLIKELY(target - idx > kSkipThreshold)) { + U32 const bound = idx + kMaxMatchStartPositionsToUpdate; + ZSTD_row_update_internalImpl(ms, idx, bound, mls, rowLog, rowMask, useCache); + idx = target - kMaxMatchEndPositionsToUpdate; + ZSTD_row_fillHashCache(ms, base, rowLog, mls, idx, ip+1); + } + } + assert(target >= idx); + ZSTD_row_update_internalImpl(ms, idx, target, mls, rowLog, rowMask, useCache); + ms->nextToUpdate = target; +} + +/* ZSTD_row_update(): + * External wrapper for ZSTD_row_update_internal(). Used for filling the hashtable during dictionary + * processing. + */ +void ZSTD_row_update(ZSTD_MatchState_t* const ms, const BYTE* ip) { + const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6); + const U32 rowMask = (1u << rowLog) - 1; + const U32 mls = MIN(ms->cParams.minMatch, 6 /* mls caps out at 6 */); + + DEBUGLOG(5, "ZSTD_row_update(), rowLog=%u", rowLog); + ZSTD_row_update_internal(ms, ip, mls, rowLog, rowMask, 0 /* don't use cache */); +} + +/* Returns the mask width of bits group of which will be set to 1. Given not all + * architectures have easy movemask instruction, this helps to iterate over + * groups of bits easier and faster. + */ +FORCE_INLINE_TEMPLATE U32 +ZSTD_row_matchMaskGroupWidth(const U32 rowEntries) +{ + assert((rowEntries == 16) || (rowEntries == 32) || rowEntries == 64); + assert(rowEntries <= ZSTD_ROW_HASH_MAX_ENTRIES); + (void)rowEntries; +#if defined(ZSTD_ARCH_ARM_NEON) + /* NEON path only works for little endian */ + if (!MEM_isLittleEndian()) { + return 1; + } + if (rowEntries == 16) { + return 4; + } + if (rowEntries == 32) { + return 2; + } + if (rowEntries == 64) { + return 1; + } +#endif + return 1; +} + +#if defined(ZSTD_ARCH_X86_SSE2) +FORCE_INLINE_TEMPLATE ZSTD_VecMask +ZSTD_row_getSSEMask(int nbChunks, const BYTE* const src, const BYTE tag, const U32 head) +{ + const __m128i comparisonMask = _mm_set1_epi8((char)tag); + int matches[4] = {0}; + int i; + assert(nbChunks == 1 || nbChunks == 2 || nbChunks == 4); + for (i=0; i> chunkSize; + do { + size_t chunk = MEM_readST(&src[i]); + chunk ^= splatChar; + chunk = (((chunk | x80) - x01) | chunk) & x80; + matches <<= chunkSize; + matches |= (chunk * extractMagic) >> shiftAmount; + i -= chunkSize; + } while (i >= 0); + } else { /* big endian: reverse bits during extraction */ + const size_t msb = xFF ^ (xFF >> 1); + const size_t extractMagic = (msb / 0x1FF) | msb; + do { + size_t chunk = MEM_readST(&src[i]); + chunk ^= splatChar; + chunk = (((chunk | x80) - x01) | chunk) & x80; + matches <<= chunkSize; + matches |= ((chunk >> 7) * extractMagic) >> shiftAmount; + i -= chunkSize; + } while (i >= 0); + } + matches = ~matches; + if (rowEntries == 16) { + return ZSTD_rotateRight_U16((U16)matches, headGrouped); + } else if (rowEntries == 32) { + return ZSTD_rotateRight_U32((U32)matches, headGrouped); + } else { + return ZSTD_rotateRight_U64((U64)matches, headGrouped); + } + } +#endif +} + +/* The high-level approach of the SIMD row based match finder is as follows: + * - Figure out where to insert the new entry: + * - Generate a hash for current input position and split it into a one byte of tag and `rowHashLog` bits of index. + * - The hash is salted by a value that changes on every context reset, so when the same table is used + * we will avoid collisions that would otherwise slow us down by introducing phantom matches. + * - The hashTable is effectively split into groups or "rows" of 15 or 31 entries of U32, and the index determines + * which row to insert into. + * - Determine the correct position within the row to insert the entry into. Each row of 15 or 31 can + * be considered as a circular buffer with a "head" index that resides in the tagTable (overall 16 or 32 bytes + * per row). + * - Use SIMD to efficiently compare the tags in the tagTable to the 1-byte tag calculated for the position and + * generate a bitfield that we can cycle through to check the collisions in the hash table. + * - Pick the longest match. + * - Insert the tag into the equivalent row and position in the tagTable. + */ +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_RowFindBestMatch( + ZSTD_MatchState_t* ms, + const BYTE* const ip, const BYTE* const iLimit, + size_t* offsetPtr, + const U32 mls, const ZSTD_dictMode_e dictMode, + const U32 rowLog) +{ + U32* const hashTable = ms->hashTable; + BYTE* const tagTable = ms->tagTable; + U32* const hashCache = ms->hashCache; + const U32 hashLog = ms->rowHashLog; + const ZSTD_compressionParameters* const cParams = &ms->cParams; + const BYTE* const base = ms->window.base; + const BYTE* const dictBase = ms->window.dictBase; + const U32 dictLimit = ms->window.dictLimit; + const BYTE* const prefixStart = base + dictLimit; + const BYTE* const dictEnd = dictBase + dictLimit; + const U32 curr = (U32)(ip-base); + const U32 maxDistance = 1U << cParams->windowLog; + const U32 lowestValid = ms->window.lowLimit; + const U32 withinMaxDistance = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; + const U32 isDictionary = (ms->loadedDictEnd != 0); + const U32 lowLimit = isDictionary ? lowestValid : withinMaxDistance; + const U32 rowEntries = (1U << rowLog); + const U32 rowMask = rowEntries - 1; + const U32 cappedSearchLog = MIN(cParams->searchLog, rowLog); /* nb of searches is capped at nb entries per row */ + const U32 groupWidth = ZSTD_row_matchMaskGroupWidth(rowEntries); + const U64 hashSalt = ms->hashSalt; + U32 nbAttempts = 1U << cappedSearchLog; + size_t ml=4-1; + U32 hash; + + /* DMS/DDS variables that may be referenced laster */ + const ZSTD_MatchState_t* const dms = ms->dictMatchState; + + /* Initialize the following variables to satisfy static analyzer */ + size_t ddsIdx = 0; + U32 ddsExtraAttempts = 0; /* cctx hash tables are limited in searches, but allow extra searches into DDS */ + U32 dmsTag = 0; + U32* dmsRow = NULL; + BYTE* dmsTagRow = NULL; + + if (dictMode == ZSTD_dedicatedDictSearch) { + const U32 ddsHashLog = dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG; + { /* Prefetch DDS hashtable entry */ + ddsIdx = ZSTD_hashPtr(ip, ddsHashLog, mls) << ZSTD_LAZY_DDSS_BUCKET_LOG; + PREFETCH_L1(&dms->hashTable[ddsIdx]); + } + ddsExtraAttempts = cParams->searchLog > rowLog ? 1U << (cParams->searchLog - rowLog) : 0; + } + + if (dictMode == ZSTD_dictMatchState) { + /* Prefetch DMS rows */ + U32* const dmsHashTable = dms->hashTable; + BYTE* const dmsTagTable = dms->tagTable; + U32 const dmsHash = (U32)ZSTD_hashPtr(ip, dms->rowHashLog + ZSTD_ROW_HASH_TAG_BITS, mls); + U32 const dmsRelRow = (dmsHash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; + dmsTag = dmsHash & ZSTD_ROW_HASH_TAG_MASK; + dmsTagRow = (BYTE*)(dmsTagTable + dmsRelRow); + dmsRow = dmsHashTable + dmsRelRow; + ZSTD_row_prefetch(dmsHashTable, dmsTagTable, dmsRelRow, rowLog); + } + + /* Update the hashTable and tagTable up to (but not including) ip */ + if (!ms->lazySkipping) { + ZSTD_row_update_internal(ms, ip, mls, rowLog, rowMask, 1 /* useCache */); + hash = ZSTD_row_nextCachedHash(hashCache, hashTable, tagTable, base, curr, hashLog, rowLog, mls, hashSalt); + } else { + /* Stop inserting every position when in the lazy skipping mode. + * The hash cache is also not kept up to date in this mode. + */ + hash = (U32)ZSTD_hashPtrSalted(ip, hashLog + ZSTD_ROW_HASH_TAG_BITS, mls, hashSalt); + ms->nextToUpdate = curr; + } + ms->hashSaltEntropy += hash; /* collect salt entropy */ + + { /* Get the hash for ip, compute the appropriate row */ + U32 const relRow = (hash >> ZSTD_ROW_HASH_TAG_BITS) << rowLog; + U32 const tag = hash & ZSTD_ROW_HASH_TAG_MASK; + U32* const row = hashTable + relRow; + BYTE* tagRow = (BYTE*)(tagTable + relRow); + U32 const headGrouped = (*tagRow & rowMask) * groupWidth; + U32 matchBuffer[ZSTD_ROW_HASH_MAX_ENTRIES]; + size_t numMatches = 0; + size_t currMatch = 0; + ZSTD_VecMask matches = ZSTD_row_getMatchMask(tagRow, (BYTE)tag, headGrouped, rowEntries); + + /* Cycle through the matches and prefetch */ + for (; (matches > 0) && (nbAttempts > 0); matches &= (matches - 1)) { + U32 const matchPos = ((headGrouped + ZSTD_VecMask_next(matches)) / groupWidth) & rowMask; + U32 const matchIndex = row[matchPos]; + if(matchPos == 0) continue; + assert(numMatches < rowEntries); + if (matchIndex < lowLimit) + break; + if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { + PREFETCH_L1(base + matchIndex); + } else { + PREFETCH_L1(dictBase + matchIndex); + } + matchBuffer[numMatches++] = matchIndex; + --nbAttempts; + } + + /* Speed opt: insert current byte into hashtable too. This allows us to avoid one iteration of the loop + in ZSTD_row_update_internal() at the next search. */ + { + U32 const pos = ZSTD_row_nextIndex(tagRow, rowMask); + tagRow[pos] = (BYTE)tag; + row[pos] = ms->nextToUpdate++; + } + + /* Return the longest match */ + for (; currMatch < numMatches; ++currMatch) { + U32 const matchIndex = matchBuffer[currMatch]; + size_t currentMl=0; + assert(matchIndex < curr); + assert(matchIndex >= lowLimit); + + if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { + const BYTE* const match = base + matchIndex; + assert(matchIndex >= dictLimit); /* ensures this is true if dictMode != ZSTD_extDict */ + /* read 4B starting from (match + ml + 1 - sizeof(U32)) */ + if (MEM_read32(match + ml - 3) == MEM_read32(ip + ml - 3)) /* potentially better */ + currentMl = ZSTD_count(ip, match, iLimit); + } else { + const BYTE* const match = dictBase + matchIndex; + assert(match+4 <= dictEnd); + if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */ + currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dictEnd, prefixStart) + 4; + } + + /* Save best solution */ + if (currentMl > ml) { + ml = currentMl; + *offsetPtr = OFFSET_TO_OFFBASE(curr - matchIndex); + if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */ + } + } + } + + assert(nbAttempts <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ + if (dictMode == ZSTD_dedicatedDictSearch) { + ml = ZSTD_dedicatedDictSearch_lazy_search(offsetPtr, ml, nbAttempts + ddsExtraAttempts, dms, + ip, iLimit, prefixStart, curr, dictLimit, ddsIdx); + } else if (dictMode == ZSTD_dictMatchState) { + /* TODO: Measure and potentially add prefetching to DMS */ + const U32 dmsLowestIndex = dms->window.dictLimit; + const BYTE* const dmsBase = dms->window.base; + const BYTE* const dmsEnd = dms->window.nextSrc; + const U32 dmsSize = (U32)(dmsEnd - dmsBase); + const U32 dmsIndexDelta = dictLimit - dmsSize; + + { U32 const headGrouped = (*dmsTagRow & rowMask) * groupWidth; + U32 matchBuffer[ZSTD_ROW_HASH_MAX_ENTRIES]; + size_t numMatches = 0; + size_t currMatch = 0; + ZSTD_VecMask matches = ZSTD_row_getMatchMask(dmsTagRow, (BYTE)dmsTag, headGrouped, rowEntries); + + for (; (matches > 0) && (nbAttempts > 0); matches &= (matches - 1)) { + U32 const matchPos = ((headGrouped + ZSTD_VecMask_next(matches)) / groupWidth) & rowMask; + U32 const matchIndex = dmsRow[matchPos]; + if(matchPos == 0) continue; + if (matchIndex < dmsLowestIndex) + break; + PREFETCH_L1(dmsBase + matchIndex); + matchBuffer[numMatches++] = matchIndex; + --nbAttempts; + } + + /* Return the longest match */ + for (; currMatch < numMatches; ++currMatch) { + U32 const matchIndex = matchBuffer[currMatch]; + size_t currentMl=0; + assert(matchIndex >= dmsLowestIndex); + assert(matchIndex < curr); + + { const BYTE* const match = dmsBase + matchIndex; + assert(match+4 <= dmsEnd); + if (MEM_read32(match) == MEM_read32(ip)) + currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dmsEnd, prefixStart) + 4; + } + + if (currentMl > ml) { + ml = currentMl; + assert(curr > matchIndex + dmsIndexDelta); + *offsetPtr = OFFSET_TO_OFFBASE(curr - (matchIndex + dmsIndexDelta)); + if (ip+currentMl == iLimit) break; + } + } + } + } + return ml; +} + + +/** + * Generate search functions templated on (dictMode, mls, rowLog). + * These functions are outlined for code size & compilation time. + * ZSTD_searchMax() dispatches to the correct implementation function. + * + * TODO: The start of the search function involves loading and calculating a + * bunch of constants from the ZSTD_MatchState_t. These computations could be + * done in an initialization function, and saved somewhere in the match state. + * Then we could pass a pointer to the saved state instead of the match state, + * and avoid duplicate computations. + * + * TODO: Move the match re-winding into searchMax. This improves compression + * ratio, and unlocks further simplifications with the next TODO. + * + * TODO: Try moving the repcode search into searchMax. After the re-winding + * and repcode search are in searchMax, there is no more logic in the match + * finder loop that requires knowledge about the dictMode. So we should be + * able to avoid force inlining it, and we can join the extDict loop with + * the single segment loop. It should go in searchMax instead of its own + * function to avoid having multiple virtual function calls per search. + */ + +#define ZSTD_BT_SEARCH_FN(dictMode, mls) ZSTD_BtFindBestMatch_##dictMode##_##mls +#define ZSTD_HC_SEARCH_FN(dictMode, mls) ZSTD_HcFindBestMatch_##dictMode##_##mls +#define ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog) ZSTD_RowFindBestMatch_##dictMode##_##mls##_##rowLog + +#define ZSTD_SEARCH_FN_ATTRS FORCE_NOINLINE + +#define GEN_ZSTD_BT_SEARCH_FN(dictMode, mls) \ + ZSTD_SEARCH_FN_ATTRS size_t ZSTD_BT_SEARCH_FN(dictMode, mls)( \ + ZSTD_MatchState_t* ms, \ + const BYTE* ip, const BYTE* const iLimit, \ + size_t* offBasePtr) \ + { \ + assert(MAX(4, MIN(6, ms->cParams.minMatch)) == mls); \ + return ZSTD_BtFindBestMatch(ms, ip, iLimit, offBasePtr, mls, ZSTD_##dictMode); \ + } \ + +#define GEN_ZSTD_HC_SEARCH_FN(dictMode, mls) \ + ZSTD_SEARCH_FN_ATTRS size_t ZSTD_HC_SEARCH_FN(dictMode, mls)( \ + ZSTD_MatchState_t* ms, \ + const BYTE* ip, const BYTE* const iLimit, \ + size_t* offsetPtr) \ + { \ + assert(MAX(4, MIN(6, ms->cParams.minMatch)) == mls); \ + return ZSTD_HcFindBestMatch(ms, ip, iLimit, offsetPtr, mls, ZSTD_##dictMode); \ + } \ + +#define GEN_ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog) \ + ZSTD_SEARCH_FN_ATTRS size_t ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog)( \ + ZSTD_MatchState_t* ms, \ + const BYTE* ip, const BYTE* const iLimit, \ + size_t* offsetPtr) \ + { \ + assert(MAX(4, MIN(6, ms->cParams.minMatch)) == mls); \ + assert(MAX(4, MIN(6, ms->cParams.searchLog)) == rowLog); \ + return ZSTD_RowFindBestMatch(ms, ip, iLimit, offsetPtr, mls, ZSTD_##dictMode, rowLog); \ + } \ + +#define ZSTD_FOR_EACH_ROWLOG(X, dictMode, mls) \ + X(dictMode, mls, 4) \ + X(dictMode, mls, 5) \ + X(dictMode, mls, 6) + +#define ZSTD_FOR_EACH_MLS_ROWLOG(X, dictMode) \ + ZSTD_FOR_EACH_ROWLOG(X, dictMode, 4) \ + ZSTD_FOR_EACH_ROWLOG(X, dictMode, 5) \ + ZSTD_FOR_EACH_ROWLOG(X, dictMode, 6) + +#define ZSTD_FOR_EACH_MLS(X, dictMode) \ + X(dictMode, 4) \ + X(dictMode, 5) \ + X(dictMode, 6) + +#define ZSTD_FOR_EACH_DICT_MODE(X, ...) \ + X(__VA_ARGS__, noDict) \ + X(__VA_ARGS__, extDict) \ + X(__VA_ARGS__, dictMatchState) \ + X(__VA_ARGS__, dedicatedDictSearch) + +/* Generate row search fns for each combination of (dictMode, mls, rowLog) */ +ZSTD_FOR_EACH_DICT_MODE(ZSTD_FOR_EACH_MLS_ROWLOG, GEN_ZSTD_ROW_SEARCH_FN) +/* Generate binary Tree search fns for each combination of (dictMode, mls) */ +ZSTD_FOR_EACH_DICT_MODE(ZSTD_FOR_EACH_MLS, GEN_ZSTD_BT_SEARCH_FN) +/* Generate hash chain search fns for each combination of (dictMode, mls) */ +ZSTD_FOR_EACH_DICT_MODE(ZSTD_FOR_EACH_MLS, GEN_ZSTD_HC_SEARCH_FN) + +typedef enum { search_hashChain=0, search_binaryTree=1, search_rowHash=2 } searchMethod_e; + +#define GEN_ZSTD_CALL_BT_SEARCH_FN(dictMode, mls) \ + case mls: \ + return ZSTD_BT_SEARCH_FN(dictMode, mls)(ms, ip, iend, offsetPtr); +#define GEN_ZSTD_CALL_HC_SEARCH_FN(dictMode, mls) \ + case mls: \ + return ZSTD_HC_SEARCH_FN(dictMode, mls)(ms, ip, iend, offsetPtr); +#define GEN_ZSTD_CALL_ROW_SEARCH_FN(dictMode, mls, rowLog) \ + case rowLog: \ + return ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog)(ms, ip, iend, offsetPtr); + +#define ZSTD_SWITCH_MLS(X, dictMode) \ + switch (mls) { \ + ZSTD_FOR_EACH_MLS(X, dictMode) \ + } + +#define ZSTD_SWITCH_ROWLOG(dictMode, mls) \ + case mls: \ + switch (rowLog) { \ + ZSTD_FOR_EACH_ROWLOG(GEN_ZSTD_CALL_ROW_SEARCH_FN, dictMode, mls) \ + } \ + ZSTD_UNREACHABLE; \ + break; + +#define ZSTD_SWITCH_SEARCH_METHOD(dictMode) \ + switch (searchMethod) { \ + case search_hashChain: \ + ZSTD_SWITCH_MLS(GEN_ZSTD_CALL_HC_SEARCH_FN, dictMode) \ + break; \ + case search_binaryTree: \ + ZSTD_SWITCH_MLS(GEN_ZSTD_CALL_BT_SEARCH_FN, dictMode) \ + break; \ + case search_rowHash: \ + ZSTD_SWITCH_MLS(ZSTD_SWITCH_ROWLOG, dictMode) \ + break; \ + } \ + ZSTD_UNREACHABLE; + +/** + * Searches for the longest match at @p ip. + * Dispatches to the correct implementation function based on the + * (searchMethod, dictMode, mls, rowLog). We use switch statements + * here instead of using an indirect function call through a function + * pointer because after Spectre and Meltdown mitigations, indirect + * function calls can be very costly, especially in the kernel. + * + * NOTE: dictMode and searchMethod should be templated, so those switch + * statements should be optimized out. Only the mls & rowLog switches + * should be left. + * + * @param ms The match state. + * @param ip The position to search at. + * @param iend The end of the input data. + * @param[out] offsetPtr Stores the match offset into this pointer. + * @param mls The minimum search length, in the range [4, 6]. + * @param rowLog The row log (if applicable), in the range [4, 6]. + * @param searchMethod The search method to use (templated). + * @param dictMode The dictMode (templated). + * + * @returns The length of the longest match found, or < mls if no match is found. + * If a match is found its offset is stored in @p offsetPtr. + */ +FORCE_INLINE_TEMPLATE size_t ZSTD_searchMax( + ZSTD_MatchState_t* ms, + const BYTE* ip, + const BYTE* iend, + size_t* offsetPtr, + U32 const mls, + U32 const rowLog, + searchMethod_e const searchMethod, + ZSTD_dictMode_e const dictMode) +{ + if (dictMode == ZSTD_noDict) { + ZSTD_SWITCH_SEARCH_METHOD(noDict) + } else if (dictMode == ZSTD_extDict) { + ZSTD_SWITCH_SEARCH_METHOD(extDict) + } else if (dictMode == ZSTD_dictMatchState) { + ZSTD_SWITCH_SEARCH_METHOD(dictMatchState) + } else if (dictMode == ZSTD_dedicatedDictSearch) { + ZSTD_SWITCH_SEARCH_METHOD(dedicatedDictSearch) + } + ZSTD_UNREACHABLE; + return 0; +} + +/* ******************************* +* Common parser - lazy strategy +*********************************/ + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_lazy_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, + U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize, + const searchMethod_e searchMethod, const U32 depth, + ZSTD_dictMode_e const dictMode) +{ + const BYTE* const istart = (const BYTE*)src; + const BYTE* ip = istart; + const BYTE* anchor = istart; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = (searchMethod == search_rowHash) ? iend - 8 - ZSTD_ROW_HASH_CACHE_SIZE : iend - 8; + const BYTE* const base = ms->window.base; + const U32 prefixLowestIndex = ms->window.dictLimit; + const BYTE* const prefixLowest = base + prefixLowestIndex; + const U32 mls = BOUNDED(4, ms->cParams.minMatch, 6); + const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6); + + U32 offset_1 = rep[0], offset_2 = rep[1]; + U32 offsetSaved1 = 0, offsetSaved2 = 0; + + const int isDMS = dictMode == ZSTD_dictMatchState; + const int isDDS = dictMode == ZSTD_dedicatedDictSearch; + const int isDxS = isDMS || isDDS; + const ZSTD_MatchState_t* const dms = ms->dictMatchState; + const U32 dictLowestIndex = isDxS ? dms->window.dictLimit : 0; + const BYTE* const dictBase = isDxS ? dms->window.base : NULL; + const BYTE* const dictLowest = isDxS ? dictBase + dictLowestIndex : NULL; + const BYTE* const dictEnd = isDxS ? dms->window.nextSrc : NULL; + const U32 dictIndexDelta = isDxS ? + prefixLowestIndex - (U32)(dictEnd - dictBase) : + 0; + const U32 dictAndPrefixLength = (U32)((ip - prefixLowest) + (dictEnd - dictLowest)); + + DEBUGLOG(5, "ZSTD_compressBlock_lazy_generic (dictMode=%u) (searchFunc=%u)", (U32)dictMode, (U32)searchMethod); + ip += (dictAndPrefixLength == 0); + if (dictMode == ZSTD_noDict) { + U32 const curr = (U32)(ip - base); + U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, curr, ms->cParams.windowLog); + U32 const maxRep = curr - windowLow; + if (offset_2 > maxRep) offsetSaved2 = offset_2, offset_2 = 0; + if (offset_1 > maxRep) offsetSaved1 = offset_1, offset_1 = 0; + } + if (isDxS) { + /* dictMatchState repCode checks don't currently handle repCode == 0 + * disabling. */ + assert(offset_1 <= dictAndPrefixLength); + assert(offset_2 <= dictAndPrefixLength); + } + + /* Reset the lazy skipping state */ + ms->lazySkipping = 0; + + if (searchMethod == search_rowHash) { + ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); + } + + /* Match Loop */ +#if defined(__GNUC__) && defined(__x86_64__) + /* I've measured random a 5% speed loss on levels 5 & 6 (greedy) when the + * code alignment is perturbed. To fix the instability align the loop on 32-bytes. + */ + __asm__(".p2align 5"); +#endif + while (ip < ilimit) { + size_t matchLength=0; + size_t offBase = REPCODE1_TO_OFFBASE; + const BYTE* start=ip+1; + DEBUGLOG(7, "search baseline (depth 0)"); + + /* check repCode */ + if (isDxS) { + const U32 repIndex = (U32)(ip - base) + 1 - offset_1; + const BYTE* repMatch = ((dictMode == ZSTD_dictMatchState || dictMode == ZSTD_dedicatedDictSearch) + && repIndex < prefixLowestIndex) ? + dictBase + (repIndex - dictIndexDelta) : + base + repIndex; + if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) + && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { + const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; + matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; + if (depth==0) goto _storeSequence; + } + } + if ( dictMode == ZSTD_noDict + && ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1)))) { + matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; + if (depth==0) goto _storeSequence; + } + + /* first search (depth 0) */ + { size_t offbaseFound = 999999999; + size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &offbaseFound, mls, rowLog, searchMethod, dictMode); + if (ml2 > matchLength) + matchLength = ml2, start = ip, offBase = offbaseFound; + } + + if (matchLength < 4) { + size_t const step = ((size_t)(ip-anchor) >> kSearchStrength) + 1; /* jump faster over incompressible sections */; + ip += step; + /* Enter the lazy skipping mode once we are skipping more than 8 bytes at a time. + * In this mode we stop inserting every position into our tables, and only insert + * positions that we search, which is one in step positions. + * The exact cutoff is flexible, I've just chosen a number that is reasonably high, + * so we minimize the compression ratio loss in "normal" scenarios. This mode gets + * triggered once we've gone 2KB without finding any matches. + */ + ms->lazySkipping = step > kLazySkippingStep; + continue; + } + + /* let's try to find a better solution */ + if (depth>=1) + while (ip0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) { + size_t const mlRep = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4; + int const gain2 = (int)(mlRep * 3); + int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1); + if ((mlRep >= 4) && (gain2 > gain1)) + matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; + } + if (isDxS) { + const U32 repIndex = (U32)(ip - base) - offset_1; + const BYTE* repMatch = repIndex < prefixLowestIndex ? + dictBase + (repIndex - dictIndexDelta) : + base + repIndex; + if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) + && (MEM_read32(repMatch) == MEM_read32(ip)) ) { + const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; + size_t const mlRep = ZSTD_count_2segments(ip+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; + int const gain2 = (int)(mlRep * 3); + int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1); + if ((mlRep >= 4) && (gain2 > gain1)) + matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; + } + } + { size_t ofbCandidate=999999999; + size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, dictMode); + int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ + int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 4); + if ((ml2 >= 4) && (gain2 > gain1)) { + matchLength = ml2, offBase = ofbCandidate, start = ip; + continue; /* search a better one */ + } } + + /* let's find an even better one */ + if ((depth==2) && (ip0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) { + size_t const mlRep = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4; + int const gain2 = (int)(mlRep * 4); + int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1); + if ((mlRep >= 4) && (gain2 > gain1)) + matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; + } + if (isDxS) { + const U32 repIndex = (U32)(ip - base) - offset_1; + const BYTE* repMatch = repIndex < prefixLowestIndex ? + dictBase + (repIndex - dictIndexDelta) : + base + repIndex; + if ((ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) + && (MEM_read32(repMatch) == MEM_read32(ip)) ) { + const BYTE* repMatchEnd = repIndex < prefixLowestIndex ? dictEnd : iend; + size_t const mlRep = ZSTD_count_2segments(ip+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; + int const gain2 = (int)(mlRep * 4); + int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1); + if ((mlRep >= 4) && (gain2 > gain1)) + matchLength = mlRep, offBase = REPCODE1_TO_OFFBASE, start = ip; + } + } + { size_t ofbCandidate=999999999; + size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, dictMode); + int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ + int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 7); + if ((ml2 >= 4) && (gain2 > gain1)) { + matchLength = ml2, offBase = ofbCandidate, start = ip; + continue; + } } } + break; /* nothing found : store previous solution */ + } + + /* NOTE: + * Pay attention that `start[-value]` can lead to strange undefined behavior + * notably if `value` is unsigned, resulting in a large positive `-value`. + */ + /* catch up */ + if (OFFBASE_IS_OFFSET(offBase)) { + if (dictMode == ZSTD_noDict) { + while ( ((start > anchor) & (start - OFFBASE_TO_OFFSET(offBase) > prefixLowest)) + && (start[-1] == (start-OFFBASE_TO_OFFSET(offBase))[-1]) ) /* only search for offset within prefix */ + { start--; matchLength++; } + } + if (isDxS) { + U32 const matchIndex = (U32)((size_t)(start-base) - OFFBASE_TO_OFFSET(offBase)); + const BYTE* match = (matchIndex < prefixLowestIndex) ? dictBase + matchIndex - dictIndexDelta : base + matchIndex; + const BYTE* const mStart = (matchIndex < prefixLowestIndex) ? dictLowest : prefixLowest; + while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch up */ + } + offset_2 = offset_1; offset_1 = (U32)OFFBASE_TO_OFFSET(offBase); + } + /* store sequence */ +_storeSequence: + { size_t const litLength = (size_t)(start - anchor); + ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offBase, matchLength); + anchor = ip = start + matchLength; + } + if (ms->lazySkipping) { + /* We've found a match, disable lazy skipping mode, and refill the hash cache. */ + if (searchMethod == search_rowHash) { + ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); + } + ms->lazySkipping = 0; + } + + /* check immediate repcode */ + if (isDxS) { + while (ip <= ilimit) { + U32 const current2 = (U32)(ip-base); + U32 const repIndex = current2 - offset_2; + const BYTE* repMatch = repIndex < prefixLowestIndex ? + dictBase - dictIndexDelta + repIndex : + base + repIndex; + if ( (ZSTD_index_overlap_check(prefixLowestIndex, repIndex)) + && (MEM_read32(repMatch) == MEM_read32(ip)) ) { + const BYTE* const repEnd2 = repIndex < prefixLowestIndex ? dictEnd : iend; + matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd2, prefixLowest) + 4; + offBase = offset_2; offset_2 = offset_1; offset_1 = (U32)offBase; /* swap offset_2 <=> offset_1 */ + ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, matchLength); + ip += matchLength; + anchor = ip; + continue; + } + break; + } + } + + if (dictMode == ZSTD_noDict) { + while ( ((ip <= ilimit) & (offset_2>0)) + && (MEM_read32(ip) == MEM_read32(ip - offset_2)) ) { + /* store sequence */ + matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; + offBase = offset_2; offset_2 = offset_1; offset_1 = (U32)offBase; /* swap repcodes */ + ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, matchLength); + ip += matchLength; + anchor = ip; + continue; /* faster when present ... (?) */ + } } } + + /* If offset_1 started invalid (offsetSaved1 != 0) and became valid (offset_1 != 0), + * rotate saved offsets. See comment in ZSTD_compressBlock_fast_noDict for more context. */ + offsetSaved2 = ((offsetSaved1 != 0) && (offset_1 != 0)) ? offsetSaved1 : offsetSaved2; + + /* save reps for next block */ + rep[0] = offset_1 ? offset_1 : offsetSaved1; + rep[1] = offset_2 ? offset_2 : offsetSaved2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); +} +#endif /* build exclusions */ + + +#ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_greedy( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_greedy_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_greedy_dedicatedDictSearch( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_dedicatedDictSearch); +} + +size_t ZSTD_compressBlock_greedy_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_greedy_dictMatchState_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0, ZSTD_dedicatedDictSearch); +} +#endif + +#ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_lazy( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_lazy_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_lazy_dedicatedDictSearch( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_dedicatedDictSearch); +} + +size_t ZSTD_compressBlock_lazy_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_lazy_dictMatchState_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1, ZSTD_dedicatedDictSearch); +} +#endif + +#ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_lazy2( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_lazy2_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_dedicatedDictSearch); +} + +size_t ZSTD_compressBlock_lazy2_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_lazy2_dictMatchState_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2, ZSTD_dedicatedDictSearch); +} +#endif + +#ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btlazy2( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_btlazy2_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD_dictMatchState); +} +#endif + +#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_compressBlock_lazy_extDict_generic( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, + U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize, + const searchMethod_e searchMethod, const U32 depth) +{ + const BYTE* const istart = (const BYTE*)src; + const BYTE* ip = istart; + const BYTE* anchor = istart; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = searchMethod == search_rowHash ? iend - 8 - ZSTD_ROW_HASH_CACHE_SIZE : iend - 8; + const BYTE* const base = ms->window.base; + const U32 dictLimit = ms->window.dictLimit; + const BYTE* const prefixStart = base + dictLimit; + const BYTE* const dictBase = ms->window.dictBase; + const BYTE* const dictEnd = dictBase + dictLimit; + const BYTE* const dictStart = dictBase + ms->window.lowLimit; + const U32 windowLog = ms->cParams.windowLog; + const U32 mls = BOUNDED(4, ms->cParams.minMatch, 6); + const U32 rowLog = BOUNDED(4, ms->cParams.searchLog, 6); + + U32 offset_1 = rep[0], offset_2 = rep[1]; + + DEBUGLOG(5, "ZSTD_compressBlock_lazy_extDict_generic (searchFunc=%u)", (U32)searchMethod); + + /* Reset the lazy skipping state */ + ms->lazySkipping = 0; + + /* init */ + ip += (ip == prefixStart); + if (searchMethod == search_rowHash) { + ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); + } + + /* Match Loop */ +#if defined(__GNUC__) && defined(__x86_64__) + /* I've measured random a 5% speed loss on levels 5 & 6 (greedy) when the + * code alignment is perturbed. To fix the instability align the loop on 32-bytes. + */ + __asm__(".p2align 5"); +#endif + while (ip < ilimit) { + size_t matchLength=0; + size_t offBase = REPCODE1_TO_OFFBASE; + const BYTE* start=ip+1; + U32 curr = (U32)(ip-base); + + /* check repCode */ + { const U32 windowLow = ZSTD_getLowestMatchIndex(ms, curr+1, windowLog); + const U32 repIndex = (U32)(curr+1 - offset_1); + const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; + const BYTE* const repMatch = repBase + repIndex; + if ( (ZSTD_index_overlap_check(dictLimit, repIndex)) + & (offset_1 <= curr+1 - windowLow) ) /* note: we are searching at curr+1 */ + if (MEM_read32(ip+1) == MEM_read32(repMatch)) { + /* repcode detected we should take it */ + const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; + matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; + if (depth==0) goto _storeSequence; + } } + + /* first search (depth 0) */ + { size_t ofbCandidate = 999999999; + size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, ZSTD_extDict); + if (ml2 > matchLength) + matchLength = ml2, start = ip, offBase = ofbCandidate; + } + + if (matchLength < 4) { + size_t const step = ((size_t)(ip-anchor) >> kSearchStrength); + ip += step + 1; /* jump faster over incompressible sections */ + /* Enter the lazy skipping mode once we are skipping more than 8 bytes at a time. + * In this mode we stop inserting every position into our tables, and only insert + * positions that we search, which is one in step positions. + * The exact cutoff is flexible, I've just chosen a number that is reasonably high, + * so we minimize the compression ratio loss in "normal" scenarios. This mode gets + * triggered once we've gone 2KB without finding any matches. + */ + ms->lazySkipping = step > kLazySkippingStep; + continue; + } + + /* let's try to find a better solution */ + if (depth>=1) + while (ip repIndex >= windowLow` */ + if (MEM_read32(ip) == MEM_read32(repMatch)) { + /* repcode detected */ + const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; + size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; + int const gain2 = (int)(repLength * 3); + int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offBase) + 1); + if ((repLength >= 4) && (gain2 > gain1)) + matchLength = repLength, offBase = REPCODE1_TO_OFFBASE, start = ip; + } } + + /* search match, depth 1 */ + { size_t ofbCandidate = 999999999; + size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, ZSTD_extDict); + int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ + int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 4); + if ((ml2 >= 4) && (gain2 > gain1)) { + matchLength = ml2, offBase = ofbCandidate, start = ip; + continue; /* search a better one */ + } } + + /* let's find an even better one */ + if ((depth==2) && (ip repIndex >= windowLow` */ + if (MEM_read32(ip) == MEM_read32(repMatch)) { + /* repcode detected */ + const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; + size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; + int const gain2 = (int)(repLength * 4); + int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 1); + if ((repLength >= 4) && (gain2 > gain1)) + matchLength = repLength, offBase = REPCODE1_TO_OFFBASE, start = ip; + } } + + /* search match, depth 2 */ + { size_t ofbCandidate = 999999999; + size_t const ml2 = ZSTD_searchMax(ms, ip, iend, &ofbCandidate, mls, rowLog, searchMethod, ZSTD_extDict); + int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)ofbCandidate)); /* raw approx */ + int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offBase) + 7); + if ((ml2 >= 4) && (gain2 > gain1)) { + matchLength = ml2, offBase = ofbCandidate, start = ip; + continue; + } } } + break; /* nothing found : store previous solution */ + } + + /* catch up */ + if (OFFBASE_IS_OFFSET(offBase)) { + U32 const matchIndex = (U32)((size_t)(start-base) - OFFBASE_TO_OFFSET(offBase)); + const BYTE* match = (matchIndex < dictLimit) ? dictBase + matchIndex : base + matchIndex; + const BYTE* const mStart = (matchIndex < dictLimit) ? dictStart : prefixStart; + while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch up */ + offset_2 = offset_1; offset_1 = (U32)OFFBASE_TO_OFFSET(offBase); + } + + /* store sequence */ +_storeSequence: + { size_t const litLength = (size_t)(start - anchor); + ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offBase, matchLength); + anchor = ip = start + matchLength; + } + if (ms->lazySkipping) { + /* We've found a match, disable lazy skipping mode, and refill the hash cache. */ + if (searchMethod == search_rowHash) { + ZSTD_row_fillHashCache(ms, base, rowLog, mls, ms->nextToUpdate, ilimit); + } + ms->lazySkipping = 0; + } + + /* check immediate repcode */ + while (ip <= ilimit) { + const U32 repCurrent = (U32)(ip-base); + const U32 windowLow = ZSTD_getLowestMatchIndex(ms, repCurrent, windowLog); + const U32 repIndex = repCurrent - offset_2; + const BYTE* const repBase = repIndex < dictLimit ? dictBase : base; + const BYTE* const repMatch = repBase + repIndex; + if ( (ZSTD_index_overlap_check(dictLimit, repIndex)) + & (offset_2 <= repCurrent - windowLow) ) /* equivalent to `curr > repIndex >= windowLow` */ + if (MEM_read32(ip) == MEM_read32(repMatch)) { + /* repcode detected we should take it */ + const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend; + matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; + offBase = offset_2; offset_2 = offset_1; offset_1 = (U32)offBase; /* swap offset history */ + ZSTD_storeSeq(seqStore, 0, anchor, iend, REPCODE1_TO_OFFBASE, matchLength); + ip += matchLength; + anchor = ip; + continue; /* faster when present ... (?) */ + } + break; + } } + + /* Save reps for next block */ + rep[0] = offset_1; + rep[1] = offset_2; + + /* Return the last literals size */ + return (size_t)(iend - anchor); +} +#endif /* build exclusions */ + +#ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_greedy_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0); +} + +size_t ZSTD_compressBlock_greedy_extDict_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 0); +} +#endif + +#ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_lazy_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) + +{ + return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1); +} + +size_t ZSTD_compressBlock_lazy_extDict_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) + +{ + return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 1); +} +#endif + +#ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_lazy2_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) + +{ + return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2); +} + +size_t ZSTD_compressBlock_lazy2_extDict_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) +{ + return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_rowHash, 2); +} +#endif + +#ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btlazy2_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize) + +{ + return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2); +} +#endif diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.h new file mode 100644 index 0000000000..bd8dc49e64 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_lazy.h @@ -0,0 +1,193 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_LAZY_H +#define ZSTD_LAZY_H + +#include "zstd_compress_internal.h" + +/** + * Dedicated Dictionary Search Structure bucket log. In the + * ZSTD_dedicatedDictSearch mode, the hashTable has + * 2 ** ZSTD_LAZY_DDSS_BUCKET_LOG entries in each bucket, rather than just + * one. + */ +#define ZSTD_LAZY_DDSS_BUCKET_LOG 2 + +#define ZSTD_ROW_HASH_TAG_BITS 8 /* nb bits to use for the tag */ + +#if !defined(ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) +U32 ZSTD_insertAndFindFirstIndex(ZSTD_MatchState_t* ms, const BYTE* ip); +void ZSTD_row_update(ZSTD_MatchState_t* const ms, const BYTE* ip); + +void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_MatchState_t* ms, const BYTE* const ip); + +void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! used in ZSTD_reduceIndex(). preemptively increase value of ZSTD_DUBT_UNSORTED_MARK */ +#endif + +#ifndef ZSTD_EXCLUDE_GREEDY_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_greedy( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_greedy_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_greedy_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_greedy_dictMatchState_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_greedy_dedicatedDictSearch( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_greedy_dedicatedDictSearch_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_greedy_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_greedy_extDict_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#define ZSTD_COMPRESSBLOCK_GREEDY ZSTD_compressBlock_greedy +#define ZSTD_COMPRESSBLOCK_GREEDY_ROW ZSTD_compressBlock_greedy_row +#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE ZSTD_compressBlock_greedy_dictMatchState +#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW ZSTD_compressBlock_greedy_dictMatchState_row +#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH ZSTD_compressBlock_greedy_dedicatedDictSearch +#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_greedy_dedicatedDictSearch_row +#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT ZSTD_compressBlock_greedy_extDict +#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW ZSTD_compressBlock_greedy_extDict_row +#else +#define ZSTD_COMPRESSBLOCK_GREEDY NULL +#define ZSTD_COMPRESSBLOCK_GREEDY_ROW NULL +#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE NULL +#define ZSTD_COMPRESSBLOCK_GREEDY_DICTMATCHSTATE_ROW NULL +#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH NULL +#define ZSTD_COMPRESSBLOCK_GREEDY_DEDICATEDDICTSEARCH_ROW NULL +#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT NULL +#define ZSTD_COMPRESSBLOCK_GREEDY_EXTDICT_ROW NULL +#endif + +#ifndef ZSTD_EXCLUDE_LAZY_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_lazy( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy_dictMatchState_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy_dedicatedDictSearch( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy_dedicatedDictSearch_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy_extDict_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#define ZSTD_COMPRESSBLOCK_LAZY ZSTD_compressBlock_lazy +#define ZSTD_COMPRESSBLOCK_LAZY_ROW ZSTD_compressBlock_lazy_row +#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE ZSTD_compressBlock_lazy_dictMatchState +#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy_dictMatchState_row +#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy_dedicatedDictSearch +#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy_dedicatedDictSearch_row +#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT ZSTD_compressBlock_lazy_extDict +#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW ZSTD_compressBlock_lazy_extDict_row +#else +#define ZSTD_COMPRESSBLOCK_LAZY NULL +#define ZSTD_COMPRESSBLOCK_LAZY_ROW NULL +#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE NULL +#define ZSTD_COMPRESSBLOCK_LAZY_DICTMATCHSTATE_ROW NULL +#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH NULL +#define ZSTD_COMPRESSBLOCK_LAZY_DEDICATEDDICTSEARCH_ROW NULL +#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT NULL +#define ZSTD_COMPRESSBLOCK_LAZY_EXTDICT_ROW NULL +#endif + +#ifndef ZSTD_EXCLUDE_LAZY2_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_lazy2( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy2_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy2_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy2_dictMatchState_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy2_dedicatedDictSearch_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy2_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_lazy2_extDict_row( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#define ZSTD_COMPRESSBLOCK_LAZY2 ZSTD_compressBlock_lazy2 +#define ZSTD_COMPRESSBLOCK_LAZY2_ROW ZSTD_compressBlock_lazy2_row +#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE ZSTD_compressBlock_lazy2_dictMatchState +#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW ZSTD_compressBlock_lazy2_dictMatchState_row +#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH ZSTD_compressBlock_lazy2_dedicatedDictSearch +#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW ZSTD_compressBlock_lazy2_dedicatedDictSearch_row +#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT ZSTD_compressBlock_lazy2_extDict +#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW ZSTD_compressBlock_lazy2_extDict_row +#else +#define ZSTD_COMPRESSBLOCK_LAZY2 NULL +#define ZSTD_COMPRESSBLOCK_LAZY2_ROW NULL +#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE NULL +#define ZSTD_COMPRESSBLOCK_LAZY2_DICTMATCHSTATE_ROW NULL +#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH NULL +#define ZSTD_COMPRESSBLOCK_LAZY2_DEDICATEDDICTSEARCH_ROW NULL +#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT NULL +#define ZSTD_COMPRESSBLOCK_LAZY2_EXTDICT_ROW NULL +#endif + +#ifndef ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btlazy2( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_btlazy2_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_btlazy2_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#define ZSTD_COMPRESSBLOCK_BTLAZY2 ZSTD_compressBlock_btlazy2 +#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE ZSTD_compressBlock_btlazy2_dictMatchState +#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT ZSTD_compressBlock_btlazy2_extDict +#else +#define ZSTD_COMPRESSBLOCK_BTLAZY2 NULL +#define ZSTD_COMPRESSBLOCK_BTLAZY2_DICTMATCHSTATE NULL +#define ZSTD_COMPRESSBLOCK_BTLAZY2_EXTDICT NULL +#endif + +#endif /* ZSTD_LAZY_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.c new file mode 100644 index 0000000000..070551cad8 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.c @@ -0,0 +1,745 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "zstd_ldm.h" + +#include "../common/debug.h" +#include "../common/xxhash.h" +#include "zstd_fast.h" /* ZSTD_fillHashTable() */ +#include "zstd_double_fast.h" /* ZSTD_fillDoubleHashTable() */ +#include "zstd_ldm_geartab.h" + +#define LDM_BUCKET_SIZE_LOG 4 +#define LDM_MIN_MATCH_LENGTH 64 +#define LDM_HASH_RLOG 7 + +typedef struct { + U64 rolling; + U64 stopMask; +} ldmRollingHashState_t; + +/** ZSTD_ldm_gear_init(): + * + * Initializes the rolling hash state such that it will honor the + * settings in params. */ +static void ZSTD_ldm_gear_init(ldmRollingHashState_t* state, ldmParams_t const* params) +{ + unsigned maxBitsInMask = MIN(params->minMatchLength, 64); + unsigned hashRateLog = params->hashRateLog; + + state->rolling = ~(U32)0; + + /* The choice of the splitting criterion is subject to two conditions: + * 1. it has to trigger on average every 2^(hashRateLog) bytes; + * 2. ideally, it has to depend on a window of minMatchLength bytes. + * + * In the gear hash algorithm, bit n depends on the last n bytes; + * so in order to obtain a good quality splitting criterion it is + * preferable to use bits with high weight. + * + * To match condition 1 we use a mask with hashRateLog bits set + * and, because of the previous remark, we make sure these bits + * have the highest possible weight while still respecting + * condition 2. + */ + if (hashRateLog > 0 && hashRateLog <= maxBitsInMask) { + state->stopMask = (((U64)1 << hashRateLog) - 1) << (maxBitsInMask - hashRateLog); + } else { + /* In this degenerate case we simply honor the hash rate. */ + state->stopMask = ((U64)1 << hashRateLog) - 1; + } +} + +/** ZSTD_ldm_gear_reset() + * Feeds [data, data + minMatchLength) into the hash without registering any + * splits. This effectively resets the hash state. This is used when skipping + * over data, either at the beginning of a block, or skipping sections. + */ +static void ZSTD_ldm_gear_reset(ldmRollingHashState_t* state, + BYTE const* data, size_t minMatchLength) +{ + U64 hash = state->rolling; + size_t n = 0; + +#define GEAR_ITER_ONCE() do { \ + hash = (hash << 1) + ZSTD_ldm_gearTab[data[n] & 0xff]; \ + n += 1; \ + } while (0) + while (n + 3 < minMatchLength) { + GEAR_ITER_ONCE(); + GEAR_ITER_ONCE(); + GEAR_ITER_ONCE(); + GEAR_ITER_ONCE(); + } + while (n < minMatchLength) { + GEAR_ITER_ONCE(); + } +#undef GEAR_ITER_ONCE +} + +/** ZSTD_ldm_gear_feed(): + * + * Registers in the splits array all the split points found in the first + * size bytes following the data pointer. This function terminates when + * either all the data has been processed or LDM_BATCH_SIZE splits are + * present in the splits array. + * + * Precondition: The splits array must not be full. + * Returns: The number of bytes processed. */ +static size_t ZSTD_ldm_gear_feed(ldmRollingHashState_t* state, + BYTE const* data, size_t size, + size_t* splits, unsigned* numSplits) +{ + size_t n; + U64 hash, mask; + + hash = state->rolling; + mask = state->stopMask; + n = 0; + +#define GEAR_ITER_ONCE() do { \ + hash = (hash << 1) + ZSTD_ldm_gearTab[data[n] & 0xff]; \ + n += 1; \ + if (UNLIKELY((hash & mask) == 0)) { \ + splits[*numSplits] = n; \ + *numSplits += 1; \ + if (*numSplits == LDM_BATCH_SIZE) \ + goto done; \ + } \ + } while (0) + + while (n + 3 < size) { + GEAR_ITER_ONCE(); + GEAR_ITER_ONCE(); + GEAR_ITER_ONCE(); + GEAR_ITER_ONCE(); + } + while (n < size) { + GEAR_ITER_ONCE(); + } + +#undef GEAR_ITER_ONCE + +done: + state->rolling = hash; + return n; +} + +void ZSTD_ldm_adjustParameters(ldmParams_t* params, + const ZSTD_compressionParameters* cParams) +{ + params->windowLog = cParams->windowLog; + ZSTD_STATIC_ASSERT(LDM_BUCKET_SIZE_LOG <= ZSTD_LDM_BUCKETSIZELOG_MAX); + DEBUGLOG(4, "ZSTD_ldm_adjustParameters"); + if (params->hashRateLog == 0) { + if (params->hashLog > 0) { + /* if params->hashLog is set, derive hashRateLog from it */ + assert(params->hashLog <= ZSTD_HASHLOG_MAX); + if (params->windowLog > params->hashLog) { + params->hashRateLog = params->windowLog - params->hashLog; + } + } else { + assert(1 <= (int)cParams->strategy && (int)cParams->strategy <= 9); + /* mapping from [fast, rate7] to [btultra2, rate4] */ + params->hashRateLog = 7 - (cParams->strategy/3); + } + } + if (params->hashLog == 0) { + params->hashLog = BOUNDED(ZSTD_HASHLOG_MIN, params->windowLog - params->hashRateLog, ZSTD_HASHLOG_MAX); + } + if (params->minMatchLength == 0) { + params->minMatchLength = LDM_MIN_MATCH_LENGTH; + if (cParams->strategy >= ZSTD_btultra) + params->minMatchLength /= 2; + } + if (params->bucketSizeLog==0) { + assert(1 <= (int)cParams->strategy && (int)cParams->strategy <= 9); + params->bucketSizeLog = BOUNDED(LDM_BUCKET_SIZE_LOG, (U32)cParams->strategy, ZSTD_LDM_BUCKETSIZELOG_MAX); + } + params->bucketSizeLog = MIN(params->bucketSizeLog, params->hashLog); +} + +size_t ZSTD_ldm_getTableSize(ldmParams_t params) +{ + size_t const ldmHSize = ((size_t)1) << params.hashLog; + size_t const ldmBucketSizeLog = MIN(params.bucketSizeLog, params.hashLog); + size_t const ldmBucketSize = ((size_t)1) << (params.hashLog - ldmBucketSizeLog); + size_t const totalSize = ZSTD_cwksp_alloc_size(ldmBucketSize) + + ZSTD_cwksp_alloc_size(ldmHSize * sizeof(ldmEntry_t)); + return params.enableLdm == ZSTD_ps_enable ? totalSize : 0; +} + +size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params, size_t maxChunkSize) +{ + return params.enableLdm == ZSTD_ps_enable ? (maxChunkSize / params.minMatchLength) : 0; +} + +/** ZSTD_ldm_getBucket() : + * Returns a pointer to the start of the bucket associated with hash. */ +static ldmEntry_t* ZSTD_ldm_getBucket( + const ldmState_t* ldmState, size_t hash, U32 const bucketSizeLog) +{ + return ldmState->hashTable + (hash << bucketSizeLog); +} + +/** ZSTD_ldm_insertEntry() : + * Insert the entry with corresponding hash into the hash table */ +static void ZSTD_ldm_insertEntry(ldmState_t* ldmState, + size_t const hash, const ldmEntry_t entry, + U32 const bucketSizeLog) +{ + BYTE* const pOffset = ldmState->bucketOffsets + hash; + unsigned const offset = *pOffset; + + *(ZSTD_ldm_getBucket(ldmState, hash, bucketSizeLog) + offset) = entry; + *pOffset = (BYTE)((offset + 1) & ((1u << bucketSizeLog) - 1)); + +} + +/** ZSTD_ldm_countBackwardsMatch() : + * Returns the number of bytes that match backwards before pIn and pMatch. + * + * We count only bytes where pMatch >= pBase and pIn >= pAnchor. */ +static size_t ZSTD_ldm_countBackwardsMatch( + const BYTE* pIn, const BYTE* pAnchor, + const BYTE* pMatch, const BYTE* pMatchBase) +{ + size_t matchLength = 0; + while (pIn > pAnchor && pMatch > pMatchBase && pIn[-1] == pMatch[-1]) { + pIn--; + pMatch--; + matchLength++; + } + return matchLength; +} + +/** ZSTD_ldm_countBackwardsMatch_2segments() : + * Returns the number of bytes that match backwards from pMatch, + * even with the backwards match spanning 2 different segments. + * + * On reaching `pMatchBase`, start counting from mEnd */ +static size_t ZSTD_ldm_countBackwardsMatch_2segments( + const BYTE* pIn, const BYTE* pAnchor, + const BYTE* pMatch, const BYTE* pMatchBase, + const BYTE* pExtDictStart, const BYTE* pExtDictEnd) +{ + size_t matchLength = ZSTD_ldm_countBackwardsMatch(pIn, pAnchor, pMatch, pMatchBase); + if (pMatch - matchLength != pMatchBase || pMatchBase == pExtDictStart) { + /* If backwards match is entirely in the extDict or prefix, immediately return */ + return matchLength; + } + DEBUGLOG(7, "ZSTD_ldm_countBackwardsMatch_2segments: found 2-parts backwards match (length in prefix==%zu)", matchLength); + matchLength += ZSTD_ldm_countBackwardsMatch(pIn - matchLength, pAnchor, pExtDictEnd, pExtDictStart); + DEBUGLOG(7, "final backwards match length = %zu", matchLength); + return matchLength; +} + +/** ZSTD_ldm_fillFastTables() : + * + * Fills the relevant tables for the ZSTD_fast and ZSTD_dfast strategies. + * This is similar to ZSTD_loadDictionaryContent. + * + * The tables for the other strategies are filled within their + * block compressors. */ +static size_t ZSTD_ldm_fillFastTables(ZSTD_MatchState_t* ms, + void const* end) +{ + const BYTE* const iend = (const BYTE*)end; + + switch(ms->cParams.strategy) + { + case ZSTD_fast: + ZSTD_fillHashTable(ms, iend, ZSTD_dtlm_fast, ZSTD_tfp_forCCtx); + break; + + case ZSTD_dfast: +#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR + ZSTD_fillDoubleHashTable(ms, iend, ZSTD_dtlm_fast, ZSTD_tfp_forCCtx); +#else + assert(0); /* shouldn't be called: cparams should've been adjusted. */ +#endif + break; + + case ZSTD_greedy: + case ZSTD_lazy: + case ZSTD_lazy2: + case ZSTD_btlazy2: + case ZSTD_btopt: + case ZSTD_btultra: + case ZSTD_btultra2: + break; + default: + assert(0); /* not possible : not a valid strategy id */ + } + + return 0; +} + +void ZSTD_ldm_fillHashTable( + ldmState_t* ldmState, const BYTE* ip, + const BYTE* iend, ldmParams_t const* params) +{ + U32 const minMatchLength = params->minMatchLength; + U32 const bucketSizeLog = params->bucketSizeLog; + U32 const hBits = params->hashLog - bucketSizeLog; + BYTE const* const base = ldmState->window.base; + BYTE const* const istart = ip; + ldmRollingHashState_t hashState; + size_t* const splits = ldmState->splitIndices; + unsigned numSplits; + + DEBUGLOG(5, "ZSTD_ldm_fillHashTable"); + + ZSTD_ldm_gear_init(&hashState, params); + while (ip < iend) { + size_t hashed; + unsigned n; + + numSplits = 0; + hashed = ZSTD_ldm_gear_feed(&hashState, ip, (size_t)(iend - ip), splits, &numSplits); + + for (n = 0; n < numSplits; n++) { + if (ip + splits[n] >= istart + minMatchLength) { + BYTE const* const split = ip + splits[n] - minMatchLength; + U64 const xxhash = XXH64(split, minMatchLength, 0); + U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1)); + ldmEntry_t entry; + + entry.offset = (U32)(split - base); + entry.checksum = (U32)(xxhash >> 32); + ZSTD_ldm_insertEntry(ldmState, hash, entry, params->bucketSizeLog); + } + } + + ip += hashed; + } +} + + +/** ZSTD_ldm_limitTableUpdate() : + * + * Sets cctx->nextToUpdate to a position corresponding closer to anchor + * if it is far way + * (after a long match, only update tables a limited amount). */ +static void ZSTD_ldm_limitTableUpdate(ZSTD_MatchState_t* ms, const BYTE* anchor) +{ + U32 const curr = (U32)(anchor - ms->window.base); + if (curr > ms->nextToUpdate + 1024) { + ms->nextToUpdate = + curr - MIN(512, curr - ms->nextToUpdate - 1024); + } +} + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_ldm_generateSequences_internal( + ldmState_t* ldmState, RawSeqStore_t* rawSeqStore, + ldmParams_t const* params, void const* src, size_t srcSize) +{ + /* LDM parameters */ + int const extDict = ZSTD_window_hasExtDict(ldmState->window); + U32 const minMatchLength = params->minMatchLength; + U32 const entsPerBucket = 1U << params->bucketSizeLog; + U32 const hBits = params->hashLog - params->bucketSizeLog; + /* Prefix and extDict parameters */ + U32 const dictLimit = ldmState->window.dictLimit; + U32 const lowestIndex = extDict ? ldmState->window.lowLimit : dictLimit; + BYTE const* const base = ldmState->window.base; + BYTE const* const dictBase = extDict ? ldmState->window.dictBase : NULL; + BYTE const* const dictStart = extDict ? dictBase + lowestIndex : NULL; + BYTE const* const dictEnd = extDict ? dictBase + dictLimit : NULL; + BYTE const* const lowPrefixPtr = base + dictLimit; + /* Input bounds */ + BYTE const* const istart = (BYTE const*)src; + BYTE const* const iend = istart + srcSize; + BYTE const* const ilimit = iend - HASH_READ_SIZE; + /* Input positions */ + BYTE const* anchor = istart; + BYTE const* ip = istart; + /* Rolling hash state */ + ldmRollingHashState_t hashState; + /* Arrays for staged-processing */ + size_t* const splits = ldmState->splitIndices; + ldmMatchCandidate_t* const candidates = ldmState->matchCandidates; + unsigned numSplits; + + if (srcSize < minMatchLength) + return iend - anchor; + + /* Initialize the rolling hash state with the first minMatchLength bytes */ + ZSTD_ldm_gear_init(&hashState, params); + ZSTD_ldm_gear_reset(&hashState, ip, minMatchLength); + ip += minMatchLength; + + while (ip < ilimit) { + size_t hashed; + unsigned n; + + numSplits = 0; + hashed = ZSTD_ldm_gear_feed(&hashState, ip, ilimit - ip, + splits, &numSplits); + + for (n = 0; n < numSplits; n++) { + BYTE const* const split = ip + splits[n] - minMatchLength; + U64 const xxhash = XXH64(split, minMatchLength, 0); + U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1)); + + candidates[n].split = split; + candidates[n].hash = hash; + candidates[n].checksum = (U32)(xxhash >> 32); + candidates[n].bucket = ZSTD_ldm_getBucket(ldmState, hash, params->bucketSizeLog); + PREFETCH_L1(candidates[n].bucket); + } + + for (n = 0; n < numSplits; n++) { + size_t forwardMatchLength = 0, backwardMatchLength = 0, + bestMatchLength = 0, mLength; + U32 offset; + BYTE const* const split = candidates[n].split; + U32 const checksum = candidates[n].checksum; + U32 const hash = candidates[n].hash; + ldmEntry_t* const bucket = candidates[n].bucket; + ldmEntry_t const* cur; + ldmEntry_t const* bestEntry = NULL; + ldmEntry_t newEntry; + + newEntry.offset = (U32)(split - base); + newEntry.checksum = checksum; + + /* If a split point would generate a sequence overlapping with + * the previous one, we merely register it in the hash table and + * move on */ + if (split < anchor) { + ZSTD_ldm_insertEntry(ldmState, hash, newEntry, params->bucketSizeLog); + continue; + } + + for (cur = bucket; cur < bucket + entsPerBucket; cur++) { + size_t curForwardMatchLength, curBackwardMatchLength, + curTotalMatchLength; + if (cur->checksum != checksum || cur->offset <= lowestIndex) { + continue; + } + if (extDict) { + BYTE const* const curMatchBase = + cur->offset < dictLimit ? dictBase : base; + BYTE const* const pMatch = curMatchBase + cur->offset; + BYTE const* const matchEnd = + cur->offset < dictLimit ? dictEnd : iend; + BYTE const* const lowMatchPtr = + cur->offset < dictLimit ? dictStart : lowPrefixPtr; + curForwardMatchLength = + ZSTD_count_2segments(split, pMatch, iend, matchEnd, lowPrefixPtr); + if (curForwardMatchLength < minMatchLength) { + continue; + } + curBackwardMatchLength = ZSTD_ldm_countBackwardsMatch_2segments( + split, anchor, pMatch, lowMatchPtr, dictStart, dictEnd); + } else { /* !extDict */ + BYTE const* const pMatch = base + cur->offset; + curForwardMatchLength = ZSTD_count(split, pMatch, iend); + if (curForwardMatchLength < minMatchLength) { + continue; + } + curBackwardMatchLength = + ZSTD_ldm_countBackwardsMatch(split, anchor, pMatch, lowPrefixPtr); + } + curTotalMatchLength = curForwardMatchLength + curBackwardMatchLength; + + if (curTotalMatchLength > bestMatchLength) { + bestMatchLength = curTotalMatchLength; + forwardMatchLength = curForwardMatchLength; + backwardMatchLength = curBackwardMatchLength; + bestEntry = cur; + } + } + + /* No match found -- insert an entry into the hash table + * and process the next candidate match */ + if (bestEntry == NULL) { + ZSTD_ldm_insertEntry(ldmState, hash, newEntry, params->bucketSizeLog); + continue; + } + + /* Match found */ + offset = (U32)(split - base) - bestEntry->offset; + mLength = forwardMatchLength + backwardMatchLength; + { + rawSeq* const seq = rawSeqStore->seq + rawSeqStore->size; + + /* Out of sequence storage */ + if (rawSeqStore->size == rawSeqStore->capacity) + return ERROR(dstSize_tooSmall); + seq->litLength = (U32)(split - backwardMatchLength - anchor); + seq->matchLength = (U32)mLength; + seq->offset = offset; + rawSeqStore->size++; + } + + /* Insert the current entry into the hash table --- it must be + * done after the previous block to avoid clobbering bestEntry */ + ZSTD_ldm_insertEntry(ldmState, hash, newEntry, params->bucketSizeLog); + + anchor = split + forwardMatchLength; + + /* If we find a match that ends after the data that we've hashed + * then we have a repeating, overlapping, pattern. E.g. all zeros. + * If one repetition of the pattern matches our `stopMask` then all + * repetitions will. We don't need to insert them all into out table, + * only the first one. So skip over overlapping matches. + * This is a major speed boost (20x) for compressing a single byte + * repeated, when that byte ends up in the table. + */ + if (anchor > ip + hashed) { + ZSTD_ldm_gear_reset(&hashState, anchor - minMatchLength, minMatchLength); + /* Continue the outer loop at anchor (ip + hashed == anchor). */ + ip = anchor - hashed; + break; + } + } + + ip += hashed; + } + + return iend - anchor; +} + +/*! ZSTD_ldm_reduceTable() : + * reduce table indexes by `reducerValue` */ +static void ZSTD_ldm_reduceTable(ldmEntry_t* const table, U32 const size, + U32 const reducerValue) +{ + U32 u; + for (u = 0; u < size; u++) { + if (table[u].offset < reducerValue) table[u].offset = 0; + else table[u].offset -= reducerValue; + } +} + +size_t ZSTD_ldm_generateSequences( + ldmState_t* ldmState, RawSeqStore_t* sequences, + ldmParams_t const* params, void const* src, size_t srcSize) +{ + U32 const maxDist = 1U << params->windowLog; + BYTE const* const istart = (BYTE const*)src; + BYTE const* const iend = istart + srcSize; + size_t const kMaxChunkSize = 1 << 20; + size_t const nbChunks = (srcSize / kMaxChunkSize) + ((srcSize % kMaxChunkSize) != 0); + size_t chunk; + size_t leftoverSize = 0; + + assert(ZSTD_CHUNKSIZE_MAX >= kMaxChunkSize); + /* Check that ZSTD_window_update() has been called for this chunk prior + * to passing it to this function. + */ + assert(ldmState->window.nextSrc >= (BYTE const*)src + srcSize); + /* The input could be very large (in zstdmt), so it must be broken up into + * chunks to enforce the maximum distance and handle overflow correction. + */ + assert(sequences->pos <= sequences->size); + assert(sequences->size <= sequences->capacity); + for (chunk = 0; chunk < nbChunks && sequences->size < sequences->capacity; ++chunk) { + BYTE const* const chunkStart = istart + chunk * kMaxChunkSize; + size_t const remaining = (size_t)(iend - chunkStart); + BYTE const *const chunkEnd = + (remaining < kMaxChunkSize) ? iend : chunkStart + kMaxChunkSize; + size_t const chunkSize = chunkEnd - chunkStart; + size_t newLeftoverSize; + size_t const prevSize = sequences->size; + + assert(chunkStart < iend); + /* 1. Perform overflow correction if necessary. */ + if (ZSTD_window_needOverflowCorrection(ldmState->window, 0, maxDist, ldmState->loadedDictEnd, chunkStart, chunkEnd)) { + U32 const ldmHSize = 1U << params->hashLog; + U32 const correction = ZSTD_window_correctOverflow( + &ldmState->window, /* cycleLog */ 0, maxDist, chunkStart); + ZSTD_ldm_reduceTable(ldmState->hashTable, ldmHSize, correction); + /* invalidate dictionaries on overflow correction */ + ldmState->loadedDictEnd = 0; + } + /* 2. We enforce the maximum offset allowed. + * + * kMaxChunkSize should be small enough that we don't lose too much of + * the window through early invalidation. + * TODO: * Test the chunk size. + * * Try invalidation after the sequence generation and test the + * offset against maxDist directly. + * + * NOTE: Because of dictionaries + sequence splitting we MUST make sure + * that any offset used is valid at the END of the sequence, since it may + * be split into two sequences. This condition holds when using + * ZSTD_window_enforceMaxDist(), but if we move to checking offsets + * against maxDist directly, we'll have to carefully handle that case. + */ + ZSTD_window_enforceMaxDist(&ldmState->window, chunkEnd, maxDist, &ldmState->loadedDictEnd, NULL); + /* 3. Generate the sequences for the chunk, and get newLeftoverSize. */ + newLeftoverSize = ZSTD_ldm_generateSequences_internal( + ldmState, sequences, params, chunkStart, chunkSize); + if (ZSTD_isError(newLeftoverSize)) + return newLeftoverSize; + /* 4. We add the leftover literals from previous iterations to the first + * newly generated sequence, or add the `newLeftoverSize` if none are + * generated. + */ + /* Prepend the leftover literals from the last call */ + if (prevSize < sequences->size) { + sequences->seq[prevSize].litLength += (U32)leftoverSize; + leftoverSize = newLeftoverSize; + } else { + assert(newLeftoverSize == chunkSize); + leftoverSize += chunkSize; + } + } + return 0; +} + +void +ZSTD_ldm_skipSequences(RawSeqStore_t* rawSeqStore, size_t srcSize, U32 const minMatch) +{ + while (srcSize > 0 && rawSeqStore->pos < rawSeqStore->size) { + rawSeq* seq = rawSeqStore->seq + rawSeqStore->pos; + if (srcSize <= seq->litLength) { + /* Skip past srcSize literals */ + seq->litLength -= (U32)srcSize; + return; + } + srcSize -= seq->litLength; + seq->litLength = 0; + if (srcSize < seq->matchLength) { + /* Skip past the first srcSize of the match */ + seq->matchLength -= (U32)srcSize; + if (seq->matchLength < minMatch) { + /* The match is too short, omit it */ + if (rawSeqStore->pos + 1 < rawSeqStore->size) { + seq[1].litLength += seq[0].matchLength; + } + rawSeqStore->pos++; + } + return; + } + srcSize -= seq->matchLength; + seq->matchLength = 0; + rawSeqStore->pos++; + } +} + +/** + * If the sequence length is longer than remaining then the sequence is split + * between this block and the next. + * + * Returns the current sequence to handle, or if the rest of the block should + * be literals, it returns a sequence with offset == 0. + */ +static rawSeq maybeSplitSequence(RawSeqStore_t* rawSeqStore, + U32 const remaining, U32 const minMatch) +{ + rawSeq sequence = rawSeqStore->seq[rawSeqStore->pos]; + assert(sequence.offset > 0); + /* Likely: No partial sequence */ + if (remaining >= sequence.litLength + sequence.matchLength) { + rawSeqStore->pos++; + return sequence; + } + /* Cut the sequence short (offset == 0 ==> rest is literals). */ + if (remaining <= sequence.litLength) { + sequence.offset = 0; + } else if (remaining < sequence.litLength + sequence.matchLength) { + sequence.matchLength = remaining - sequence.litLength; + if (sequence.matchLength < minMatch) { + sequence.offset = 0; + } + } + /* Skip past `remaining` bytes for the future sequences. */ + ZSTD_ldm_skipSequences(rawSeqStore, remaining, minMatch); + return sequence; +} + +void ZSTD_ldm_skipRawSeqStoreBytes(RawSeqStore_t* rawSeqStore, size_t nbBytes) { + U32 currPos = (U32)(rawSeqStore->posInSequence + nbBytes); + while (currPos && rawSeqStore->pos < rawSeqStore->size) { + rawSeq currSeq = rawSeqStore->seq[rawSeqStore->pos]; + if (currPos >= currSeq.litLength + currSeq.matchLength) { + currPos -= currSeq.litLength + currSeq.matchLength; + rawSeqStore->pos++; + } else { + rawSeqStore->posInSequence = currPos; + break; + } + } + if (currPos == 0 || rawSeqStore->pos == rawSeqStore->size) { + rawSeqStore->posInSequence = 0; + } +} + +size_t ZSTD_ldm_blockCompress(RawSeqStore_t* rawSeqStore, + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + ZSTD_ParamSwitch_e useRowMatchFinder, + void const* src, size_t srcSize) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + unsigned const minMatch = cParams->minMatch; + ZSTD_BlockCompressor_f const blockCompressor = + ZSTD_selectBlockCompressor(cParams->strategy, useRowMatchFinder, ZSTD_matchState_dictMode(ms)); + /* Input bounds */ + BYTE const* const istart = (BYTE const*)src; + BYTE const* const iend = istart + srcSize; + /* Input positions */ + BYTE const* ip = istart; + + DEBUGLOG(5, "ZSTD_ldm_blockCompress: srcSize=%zu", srcSize); + /* If using opt parser, use LDMs only as candidates rather than always accepting them */ + if (cParams->strategy >= ZSTD_btopt) { + size_t lastLLSize; + ms->ldmSeqStore = rawSeqStore; + lastLLSize = blockCompressor(ms, seqStore, rep, src, srcSize); + ZSTD_ldm_skipRawSeqStoreBytes(rawSeqStore, srcSize); + return lastLLSize; + } + + assert(rawSeqStore->pos <= rawSeqStore->size); + assert(rawSeqStore->size <= rawSeqStore->capacity); + /* Loop through each sequence and apply the block compressor to the literals */ + while (rawSeqStore->pos < rawSeqStore->size && ip < iend) { + /* maybeSplitSequence updates rawSeqStore->pos */ + rawSeq const sequence = maybeSplitSequence(rawSeqStore, + (U32)(iend - ip), minMatch); + /* End signal */ + if (sequence.offset == 0) + break; + + assert(ip + sequence.litLength + sequence.matchLength <= iend); + + /* Fill tables for block compressor */ + ZSTD_ldm_limitTableUpdate(ms, ip); + ZSTD_ldm_fillFastTables(ms, ip); + /* Run the block compressor */ + DEBUGLOG(5, "pos %u : calling block compressor on segment of size %u", (unsigned)(ip-istart), sequence.litLength); + { + int i; + size_t const newLitLength = + blockCompressor(ms, seqStore, rep, ip, sequence.litLength); + ip += sequence.litLength; + /* Update the repcodes */ + for (i = ZSTD_REP_NUM - 1; i > 0; i--) + rep[i] = rep[i-1]; + rep[0] = sequence.offset; + /* Store the sequence */ + ZSTD_storeSeq(seqStore, newLitLength, ip - newLitLength, iend, + OFFSET_TO_OFFBASE(sequence.offset), + sequence.matchLength); + ip += sequence.matchLength; + } + } + /* Fill the tables for the block compressor */ + ZSTD_ldm_limitTableUpdate(ms, ip); + ZSTD_ldm_fillFastTables(ms, ip); + /* Compress the last literals */ + return blockCompressor(ms, seqStore, rep, ip, iend - ip); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.h new file mode 100644 index 0000000000..42736231aa --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm.h @@ -0,0 +1,109 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_LDM_H +#define ZSTD_LDM_H + +#include "zstd_compress_internal.h" /* ldmParams_t, U32 */ +#include "../zstd.h" /* ZSTD_CCtx, size_t */ + +/*-************************************* +* Long distance matching +***************************************/ + +#define ZSTD_LDM_DEFAULT_WINDOW_LOG ZSTD_WINDOWLOG_LIMIT_DEFAULT + +void ZSTD_ldm_fillHashTable( + ldmState_t* state, const BYTE* ip, + const BYTE* iend, ldmParams_t const* params); + +/** + * ZSTD_ldm_generateSequences(): + * + * Generates the sequences using the long distance match finder. + * Generates long range matching sequences in `sequences`, which parse a prefix + * of the source. `sequences` must be large enough to store every sequence, + * which can be checked with `ZSTD_ldm_getMaxNbSeq()`. + * @returns 0 or an error code. + * + * NOTE: The user must have called ZSTD_window_update() for all of the input + * they have, even if they pass it to ZSTD_ldm_generateSequences() in chunks. + * NOTE: This function returns an error if it runs out of space to store + * sequences. + */ +size_t ZSTD_ldm_generateSequences( + ldmState_t* ldms, RawSeqStore_t* sequences, + ldmParams_t const* params, void const* src, size_t srcSize); + +/** + * ZSTD_ldm_blockCompress(): + * + * Compresses a block using the predefined sequences, along with a secondary + * block compressor. The literals section of every sequence is passed to the + * secondary block compressor, and those sequences are interspersed with the + * predefined sequences. Returns the length of the last literals. + * Updates `rawSeqStore.pos` to indicate how many sequences have been consumed. + * `rawSeqStore.seq` may also be updated to split the last sequence between two + * blocks. + * @return The length of the last literals. + * + * NOTE: The source must be at most the maximum block size, but the predefined + * sequences can be any size, and may be longer than the block. In the case that + * they are longer than the block, the last sequences may need to be split into + * two. We handle that case correctly, and update `rawSeqStore` appropriately. + * NOTE: This function does not return any errors. + */ +size_t ZSTD_ldm_blockCompress(RawSeqStore_t* rawSeqStore, + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + ZSTD_ParamSwitch_e useRowMatchFinder, + void const* src, size_t srcSize); + +/** + * ZSTD_ldm_skipSequences(): + * + * Skip past `srcSize` bytes worth of sequences in `rawSeqStore`. + * Avoids emitting matches less than `minMatch` bytes. + * Must be called for data that is not passed to ZSTD_ldm_blockCompress(). + */ +void ZSTD_ldm_skipSequences(RawSeqStore_t* rawSeqStore, size_t srcSize, + U32 const minMatch); + +/* ZSTD_ldm_skipRawSeqStoreBytes(): + * Moves forward in rawSeqStore by nbBytes, updating fields 'pos' and 'posInSequence'. + * Not to be used in conjunction with ZSTD_ldm_skipSequences(). + * Must be called for data with is not passed to ZSTD_ldm_blockCompress(). + */ +void ZSTD_ldm_skipRawSeqStoreBytes(RawSeqStore_t* rawSeqStore, size_t nbBytes); + +/** ZSTD_ldm_getTableSize() : + * Estimate the space needed for long distance matching tables or 0 if LDM is + * disabled. + */ +size_t ZSTD_ldm_getTableSize(ldmParams_t params); + +/** ZSTD_ldm_getSeqSpace() : + * Return an upper bound on the number of sequences that can be produced by + * the long distance matcher, or 0 if LDM is disabled. + */ +size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params, size_t maxChunkSize); + +/** ZSTD_ldm_adjustParameters() : + * If the params->hashRateLog is not set, set it to its default value based on + * windowLog and params->hashLog. + * + * Ensures that params->bucketSizeLog is <= params->hashLog (setting it to + * params->hashLog if it is not). + * + * Ensures that the minMatchLength >= targetLength during optimal parsing. + */ +void ZSTD_ldm_adjustParameters(ldmParams_t* params, + ZSTD_compressionParameters const* cParams); + +#endif /* ZSTD_FAST_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm_geartab.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm_geartab.h new file mode 100644 index 0000000000..ef34bc5c92 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_ldm_geartab.h @@ -0,0 +1,106 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_LDM_GEARTAB_H +#define ZSTD_LDM_GEARTAB_H + +#include "../common/compiler.h" /* UNUSED_ATTR */ +#include "../common/mem.h" /* U64 */ + +static UNUSED_ATTR const U64 ZSTD_ldm_gearTab[256] = { + 0xf5b8f72c5f77775c, 0x84935f266b7ac412, 0xb647ada9ca730ccc, + 0xb065bb4b114fb1de, 0x34584e7e8c3a9fd0, 0x4e97e17c6ae26b05, + 0x3a03d743bc99a604, 0xcecd042422c4044f, 0x76de76c58524259e, + 0x9c8528f65badeaca, 0x86563706e2097529, 0x2902475fa375d889, + 0xafb32a9739a5ebe6, 0xce2714da3883e639, 0x21eaf821722e69e, + 0x37b628620b628, 0x49a8d455d88caf5, 0x8556d711e6958140, + 0x4f7ae74fc605c1f, 0x829f0c3468bd3a20, 0x4ffdc885c625179e, + 0x8473de048a3daf1b, 0x51008822b05646b2, 0x69d75d12b2d1cc5f, + 0x8c9d4a19159154bc, 0xc3cc10f4abbd4003, 0xd06ddc1cecb97391, + 0xbe48e6e7ed80302e, 0x3481db31cee03547, 0xacc3f67cdaa1d210, + 0x65cb771d8c7f96cc, 0x8eb27177055723dd, 0xc789950d44cd94be, + 0x934feadc3700b12b, 0x5e485f11edbdf182, 0x1e2e2a46fd64767a, + 0x2969ca71d82efa7c, 0x9d46e9935ebbba2e, 0xe056b67e05e6822b, + 0x94d73f55739d03a0, 0xcd7010bdb69b5a03, 0x455ef9fcd79b82f4, + 0x869cb54a8749c161, 0x38d1a4fa6185d225, 0xb475166f94bbe9bb, + 0xa4143548720959f1, 0x7aed4780ba6b26ba, 0xd0ce264439e02312, + 0x84366d746078d508, 0xa8ce973c72ed17be, 0x21c323a29a430b01, + 0x9962d617e3af80ee, 0xab0ce91d9c8cf75b, 0x530e8ee6d19a4dbc, + 0x2ef68c0cf53f5d72, 0xc03a681640a85506, 0x496e4e9f9c310967, + 0x78580472b59b14a0, 0x273824c23b388577, 0x66bf923ad45cb553, + 0x47ae1a5a2492ba86, 0x35e304569e229659, 0x4765182a46870b6f, + 0x6cbab625e9099412, 0xddac9a2e598522c1, 0x7172086e666624f2, + 0xdf5003ca503b7837, 0x88c0c1db78563d09, 0x58d51865acfc289d, + 0x177671aec65224f1, 0xfb79d8a241e967d7, 0x2be1e101cad9a49a, + 0x6625682f6e29186b, 0x399553457ac06e50, 0x35dffb4c23abb74, + 0x429db2591f54aade, 0xc52802a8037d1009, 0x6acb27381f0b25f3, + 0xf45e2551ee4f823b, 0x8b0ea2d99580c2f7, 0x3bed519cbcb4e1e1, + 0xff452823dbb010a, 0x9d42ed614f3dd267, 0x5b9313c06257c57b, + 0xa114b8008b5e1442, 0xc1fe311c11c13d4b, 0x66e8763ea34c5568, + 0x8b982af1c262f05d, 0xee8876faaa75fbb7, 0x8a62a4d0d172bb2a, + 0xc13d94a3b7449a97, 0x6dbbba9dc15d037c, 0xc786101f1d92e0f1, + 0xd78681a907a0b79b, 0xf61aaf2962c9abb9, 0x2cfd16fcd3cb7ad9, + 0x868c5b6744624d21, 0x25e650899c74ddd7, 0xba042af4a7c37463, + 0x4eb1a539465a3eca, 0xbe09dbf03b05d5ca, 0x774e5a362b5472ba, + 0x47a1221229d183cd, 0x504b0ca18ef5a2df, 0xdffbdfbde2456eb9, + 0x46cd2b2fbee34634, 0xf2aef8fe819d98c3, 0x357f5276d4599d61, + 0x24a5483879c453e3, 0x88026889192b4b9, 0x28da96671782dbec, + 0x4ef37c40588e9aaa, 0x8837b90651bc9fb3, 0xc164f741d3f0e5d6, + 0xbc135a0a704b70ba, 0x69cd868f7622ada, 0xbc37ba89e0b9c0ab, + 0x47c14a01323552f6, 0x4f00794bacee98bb, 0x7107de7d637a69d5, + 0x88af793bb6f2255e, 0xf3c6466b8799b598, 0xc288c616aa7f3b59, + 0x81ca63cf42fca3fd, 0x88d85ace36a2674b, 0xd056bd3792389e7, + 0xe55c396c4e9dd32d, 0xbefb504571e6c0a6, 0x96ab32115e91e8cc, + 0xbf8acb18de8f38d1, 0x66dae58801672606, 0x833b6017872317fb, + 0xb87c16f2d1c92864, 0xdb766a74e58b669c, 0x89659f85c61417be, + 0xc8daad856011ea0c, 0x76a4b565b6fe7eae, 0xa469d085f6237312, + 0xaaf0365683a3e96c, 0x4dbb746f8424f7b8, 0x638755af4e4acc1, + 0x3d7807f5bde64486, 0x17be6d8f5bbb7639, 0x903f0cd44dc35dc, + 0x67b672eafdf1196c, 0xa676ff93ed4c82f1, 0x521d1004c5053d9d, + 0x37ba9ad09ccc9202, 0x84e54d297aacfb51, 0xa0b4b776a143445, + 0x820d471e20b348e, 0x1874383cb83d46dc, 0x97edeec7a1efe11c, + 0xb330e50b1bdc42aa, 0x1dd91955ce70e032, 0xa514cdb88f2939d5, + 0x2791233fd90db9d3, 0x7b670a4cc50f7a9b, 0x77c07d2a05c6dfa5, + 0xe3778b6646d0a6fa, 0xb39c8eda47b56749, 0x933ed448addbef28, + 0xaf846af6ab7d0bf4, 0xe5af208eb666e49, 0x5e6622f73534cd6a, + 0x297daeca42ef5b6e, 0x862daef3d35539a6, 0xe68722498f8e1ea9, + 0x981c53093dc0d572, 0xfa09b0bfbf86fbf5, 0x30b1e96166219f15, + 0x70e7d466bdc4fb83, 0x5a66736e35f2a8e9, 0xcddb59d2b7c1baef, + 0xd6c7d247d26d8996, 0xea4e39eac8de1ba3, 0x539c8bb19fa3aff2, + 0x9f90e4c5fd508d8, 0xa34e5956fbaf3385, 0x2e2f8e151d3ef375, + 0x173691e9b83faec1, 0xb85a8d56bf016379, 0x8382381267408ae3, + 0xb90f901bbdc0096d, 0x7c6ad32933bcec65, 0x76bb5e2f2c8ad595, + 0x390f851a6cf46d28, 0xc3e6064da1c2da72, 0xc52a0c101cfa5389, + 0xd78eaf84a3fbc530, 0x3781b9e2288b997e, 0x73c2f6dea83d05c4, + 0x4228e364c5b5ed7, 0x9d7a3edf0da43911, 0x8edcfeda24686756, + 0x5e7667a7b7a9b3a1, 0x4c4f389fa143791d, 0xb08bc1023da7cddc, + 0x7ab4be3ae529b1cc, 0x754e6132dbe74ff9, 0x71635442a839df45, + 0x2f6fb1643fbe52de, 0x961e0a42cf7a8177, 0xf3b45d83d89ef2ea, + 0xee3de4cf4a6e3e9b, 0xcd6848542c3295e7, 0xe4cee1664c78662f, + 0x9947548b474c68c4, 0x25d73777a5ed8b0b, 0xc915b1d636b7fc, + 0x21c2ba75d9b0d2da, 0x5f6b5dcf608a64a1, 0xdcf333255ff9570c, + 0x633b922418ced4ee, 0xc136dde0b004b34a, 0x58cc83b05d4b2f5a, + 0x5eb424dda28e42d2, 0x62df47369739cd98, 0xb4e0b42485e4ce17, + 0x16e1f0c1f9a8d1e7, 0x8ec3916707560ebf, 0x62ba6e2df2cc9db3, + 0xcbf9f4ff77d83a16, 0x78d9d7d07d2bbcc4, 0xef554ce1e02c41f4, + 0x8d7581127eccf94d, 0xa9b53336cb3c8a05, 0x38c42c0bf45c4f91, + 0x640893cdf4488863, 0x80ec34bc575ea568, 0x39f324f5b48eaa40, + 0xe9d9ed1f8eff527f, 0x9224fc058cc5a214, 0xbaba00b04cfe7741, + 0x309a9f120fcf52af, 0xa558f3ec65626212, 0x424bec8b7adabe2f, + 0x41622513a6aea433, 0xb88da2d5324ca798, 0xd287733b245528a4, + 0x9a44697e6d68aec3, 0x7b1093be2f49bb28, 0x50bbec632e3d8aad, + 0x6cd90723e1ea8283, 0x897b9e7431b02bf3, 0x219efdcb338a7047, + 0x3b0311f0a27c0656, 0xdb17bf91c0db96e7, 0x8cd4fd6b4e85a5b2, + 0xfab071054ba6409d, 0x40d6fe831fa9dfd9, 0xaf358debad7d791e, + 0xeb8d0e25a65e3e58, 0xbbcbd3df14e08580, 0xcf751f27ecdab2b, + 0x2b4da14f2613d8f4 +}; + +#endif /* ZSTD_LDM_GEARTAB_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.c new file mode 100644 index 0000000000..3d7171b755 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.c @@ -0,0 +1,1580 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "zstd_compress_internal.h" +#include "hist.h" +#include "zstd_opt.h" + +#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) + +#define ZSTD_LITFREQ_ADD 2 /* scaling factor for litFreq, so that frequencies adapt faster to new stats */ +#define ZSTD_MAX_PRICE (1<<30) + +#define ZSTD_PREDEF_THRESHOLD 8 /* if srcSize < ZSTD_PREDEF_THRESHOLD, symbols' cost is assumed static, directly determined by pre-defined distributions */ + + +/*-************************************* +* Price functions for optimal parser +***************************************/ + +#if 0 /* approximation at bit level (for tests) */ +# define BITCOST_ACCURACY 0 +# define BITCOST_MULTIPLIER (1 << BITCOST_ACCURACY) +# define WEIGHT(stat, opt) ((void)(opt), ZSTD_bitWeight(stat)) +#elif 0 /* fractional bit accuracy (for tests) */ +# define BITCOST_ACCURACY 8 +# define BITCOST_MULTIPLIER (1 << BITCOST_ACCURACY) +# define WEIGHT(stat,opt) ((void)(opt), ZSTD_fracWeight(stat)) +#else /* opt==approx, ultra==accurate */ +# define BITCOST_ACCURACY 8 +# define BITCOST_MULTIPLIER (1 << BITCOST_ACCURACY) +# define WEIGHT(stat,opt) ((opt) ? ZSTD_fracWeight(stat) : ZSTD_bitWeight(stat)) +#endif + +/* ZSTD_bitWeight() : + * provide estimated "cost" of a stat in full bits only */ +MEM_STATIC U32 ZSTD_bitWeight(U32 stat) +{ + return (ZSTD_highbit32(stat+1) * BITCOST_MULTIPLIER); +} + +/* ZSTD_fracWeight() : + * provide fractional-bit "cost" of a stat, + * using linear interpolation approximation */ +MEM_STATIC U32 ZSTD_fracWeight(U32 rawStat) +{ + U32 const stat = rawStat + 1; + U32 const hb = ZSTD_highbit32(stat); + U32 const BWeight = hb * BITCOST_MULTIPLIER; + /* Fweight was meant for "Fractional weight" + * but it's effectively a value between 1 and 2 + * using fixed point arithmetic */ + U32 const FWeight = (stat << BITCOST_ACCURACY) >> hb; + U32 const weight = BWeight + FWeight; + assert(hb + BITCOST_ACCURACY < 31); + return weight; +} + +#if (DEBUGLEVEL>=2) +/* debugging function, + * @return price in bytes as fractional value + * for debug messages only */ +MEM_STATIC double ZSTD_fCost(int price) +{ + return (double)price / (BITCOST_MULTIPLIER*8); +} +#endif + +static int ZSTD_compressedLiterals(optState_t const* const optPtr) +{ + return optPtr->literalCompressionMode != ZSTD_ps_disable; +} + +static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) +{ + if (ZSTD_compressedLiterals(optPtr)) + optPtr->litSumBasePrice = WEIGHT(optPtr->litSum, optLevel); + optPtr->litLengthSumBasePrice = WEIGHT(optPtr->litLengthSum, optLevel); + optPtr->matchLengthSumBasePrice = WEIGHT(optPtr->matchLengthSum, optLevel); + optPtr->offCodeSumBasePrice = WEIGHT(optPtr->offCodeSum, optLevel); +} + + +static U32 sum_u32(const unsigned table[], size_t nbElts) +{ + size_t n; + U32 total = 0; + for (n=0; n0); + unsigned const newStat = base + (table[s] >> shift); + sum += newStat; + table[s] = newStat; + } + return sum; +} + +/* ZSTD_scaleStats() : + * reduce all elt frequencies in table if sum too large + * return the resulting sum of elements */ +static U32 ZSTD_scaleStats(unsigned* table, U32 lastEltIndex, U32 logTarget) +{ + U32 const prevsum = sum_u32(table, lastEltIndex+1); + U32 const factor = prevsum >> logTarget; + DEBUGLOG(5, "ZSTD_scaleStats (nbElts=%u, target=%u)", (unsigned)lastEltIndex+1, (unsigned)logTarget); + assert(logTarget < 30); + if (factor <= 1) return prevsum; + return ZSTD_downscaleStats(table, lastEltIndex, ZSTD_highbit32(factor), base_1guaranteed); +} + +/* ZSTD_rescaleFreqs() : + * if first block (detected by optPtr->litLengthSum == 0) : init statistics + * take hints from dictionary if there is one + * and init from zero if there is none, + * using src for literals stats, and baseline stats for sequence symbols + * otherwise downscale existing stats, to be used as seed for next block. + */ +static void +ZSTD_rescaleFreqs(optState_t* const optPtr, + const BYTE* const src, size_t const srcSize, + int const optLevel) +{ + int const compressedLiterals = ZSTD_compressedLiterals(optPtr); + DEBUGLOG(5, "ZSTD_rescaleFreqs (srcSize=%u)", (unsigned)srcSize); + optPtr->priceType = zop_dynamic; + + if (optPtr->litLengthSum == 0) { /* no literals stats collected -> first block assumed -> init */ + + /* heuristic: use pre-defined stats for too small inputs */ + if (srcSize <= ZSTD_PREDEF_THRESHOLD) { + DEBUGLOG(5, "srcSize <= %i : use predefined stats", ZSTD_PREDEF_THRESHOLD); + optPtr->priceType = zop_predef; + } + + assert(optPtr->symbolCosts != NULL); + if (optPtr->symbolCosts->huf.repeatMode == HUF_repeat_valid) { + + /* huffman stats covering the full value set : table presumed generated by dictionary */ + optPtr->priceType = zop_dynamic; + + if (compressedLiterals) { + /* generate literals statistics from huffman table */ + unsigned lit; + assert(optPtr->litFreq != NULL); + optPtr->litSum = 0; + for (lit=0; lit<=MaxLit; lit++) { + U32 const scaleLog = 11; /* scale to 2K */ + U32 const bitCost = HUF_getNbBitsFromCTable(optPtr->symbolCosts->huf.CTable, lit); + assert(bitCost <= scaleLog); + optPtr->litFreq[lit] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; + optPtr->litSum += optPtr->litFreq[lit]; + } } + + { unsigned ll; + FSE_CState_t llstate; + FSE_initCState(&llstate, optPtr->symbolCosts->fse.litlengthCTable); + optPtr->litLengthSum = 0; + for (ll=0; ll<=MaxLL; ll++) { + U32 const scaleLog = 10; /* scale to 1K */ + U32 const bitCost = FSE_getMaxNbBits(llstate.symbolTT, ll); + assert(bitCost < scaleLog); + optPtr->litLengthFreq[ll] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; + optPtr->litLengthSum += optPtr->litLengthFreq[ll]; + } } + + { unsigned ml; + FSE_CState_t mlstate; + FSE_initCState(&mlstate, optPtr->symbolCosts->fse.matchlengthCTable); + optPtr->matchLengthSum = 0; + for (ml=0; ml<=MaxML; ml++) { + U32 const scaleLog = 10; + U32 const bitCost = FSE_getMaxNbBits(mlstate.symbolTT, ml); + assert(bitCost < scaleLog); + optPtr->matchLengthFreq[ml] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; + optPtr->matchLengthSum += optPtr->matchLengthFreq[ml]; + } } + + { unsigned of; + FSE_CState_t ofstate; + FSE_initCState(&ofstate, optPtr->symbolCosts->fse.offcodeCTable); + optPtr->offCodeSum = 0; + for (of=0; of<=MaxOff; of++) { + U32 const scaleLog = 10; + U32 const bitCost = FSE_getMaxNbBits(ofstate.symbolTT, of); + assert(bitCost < scaleLog); + optPtr->offCodeFreq[of] = bitCost ? 1 << (scaleLog-bitCost) : 1 /*minimum to calculate cost*/; + optPtr->offCodeSum += optPtr->offCodeFreq[of]; + } } + + } else { /* first block, no dictionary */ + + assert(optPtr->litFreq != NULL); + if (compressedLiterals) { + /* base initial cost of literals on direct frequency within src */ + unsigned lit = MaxLit; + HIST_count_simple(optPtr->litFreq, &lit, src, srcSize); /* use raw first block to init statistics */ + optPtr->litSum = ZSTD_downscaleStats(optPtr->litFreq, MaxLit, 8, base_0possible); + } + + { unsigned const baseLLfreqs[MaxLL+1] = { + 4, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1 + }; + ZSTD_memcpy(optPtr->litLengthFreq, baseLLfreqs, sizeof(baseLLfreqs)); + optPtr->litLengthSum = sum_u32(baseLLfreqs, MaxLL+1); + } + + { unsigned ml; + for (ml=0; ml<=MaxML; ml++) + optPtr->matchLengthFreq[ml] = 1; + } + optPtr->matchLengthSum = MaxML+1; + + { unsigned const baseOFCfreqs[MaxOff+1] = { + 6, 2, 1, 1, 2, 3, 4, 4, + 4, 3, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 + }; + ZSTD_memcpy(optPtr->offCodeFreq, baseOFCfreqs, sizeof(baseOFCfreqs)); + optPtr->offCodeSum = sum_u32(baseOFCfreqs, MaxOff+1); + } + + } + + } else { /* new block : scale down accumulated statistics */ + + if (compressedLiterals) + optPtr->litSum = ZSTD_scaleStats(optPtr->litFreq, MaxLit, 12); + optPtr->litLengthSum = ZSTD_scaleStats(optPtr->litLengthFreq, MaxLL, 11); + optPtr->matchLengthSum = ZSTD_scaleStats(optPtr->matchLengthFreq, MaxML, 11); + optPtr->offCodeSum = ZSTD_scaleStats(optPtr->offCodeFreq, MaxOff, 11); + } + + ZSTD_setBasePrices(optPtr, optLevel); +} + +/* ZSTD_rawLiteralsCost() : + * price of literals (only) in specified segment (which length can be 0). + * does not include price of literalLength symbol */ +static U32 ZSTD_rawLiteralsCost(const BYTE* const literals, U32 const litLength, + const optState_t* const optPtr, + int optLevel) +{ + DEBUGLOG(8, "ZSTD_rawLiteralsCost (%u literals)", litLength); + if (litLength == 0) return 0; + + if (!ZSTD_compressedLiterals(optPtr)) + return (litLength << 3) * BITCOST_MULTIPLIER; /* Uncompressed - 8 bytes per literal. */ + + if (optPtr->priceType == zop_predef) + return (litLength*6) * BITCOST_MULTIPLIER; /* 6 bit per literal - no statistic used */ + + /* dynamic statistics */ + { U32 price = optPtr->litSumBasePrice * litLength; + U32 const litPriceMax = optPtr->litSumBasePrice - BITCOST_MULTIPLIER; + U32 u; + assert(optPtr->litSumBasePrice >= BITCOST_MULTIPLIER); + for (u=0; u < litLength; u++) { + U32 litPrice = WEIGHT(optPtr->litFreq[literals[u]], optLevel); + if (UNLIKELY(litPrice > litPriceMax)) litPrice = litPriceMax; + price -= litPrice; + } + return price; + } +} + +/* ZSTD_litLengthPrice() : + * cost of literalLength symbol */ +static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) +{ + assert(litLength <= ZSTD_BLOCKSIZE_MAX); + if (optPtr->priceType == zop_predef) + return WEIGHT(litLength, optLevel); + + /* ZSTD_LLcode() can't compute litLength price for sizes >= ZSTD_BLOCKSIZE_MAX + * because it isn't representable in the zstd format. + * So instead just pretend it would cost 1 bit more than ZSTD_BLOCKSIZE_MAX - 1. + * In such a case, the block would be all literals. + */ + if (litLength == ZSTD_BLOCKSIZE_MAX) + return BITCOST_MULTIPLIER + ZSTD_litLengthPrice(ZSTD_BLOCKSIZE_MAX - 1, optPtr, optLevel); + + /* dynamic statistics */ + { U32 const llCode = ZSTD_LLcode(litLength); + return (LL_bits[llCode] * BITCOST_MULTIPLIER) + + optPtr->litLengthSumBasePrice + - WEIGHT(optPtr->litLengthFreq[llCode], optLevel); + } +} + +/* ZSTD_getMatchPrice() : + * Provides the cost of the match part (offset + matchLength) of a sequence. + * Must be combined with ZSTD_fullLiteralsCost() to get the full cost of a sequence. + * @offBase : sumtype, representing an offset or a repcode, and using numeric representation of ZSTD_storeSeq() + * @optLevel: when <2, favors small offset for decompression speed (improved cache efficiency) + */ +FORCE_INLINE_TEMPLATE U32 +ZSTD_getMatchPrice(U32 const offBase, + U32 const matchLength, + const optState_t* const optPtr, + int const optLevel) +{ + U32 price; + U32 const offCode = ZSTD_highbit32(offBase); + U32 const mlBase = matchLength - MINMATCH; + assert(matchLength >= MINMATCH); + + if (optPtr->priceType == zop_predef) /* fixed scheme, does not use statistics */ + return WEIGHT(mlBase, optLevel) + + ((16 + offCode) * BITCOST_MULTIPLIER); /* emulated offset cost */ + + /* dynamic statistics */ + price = (offCode * BITCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq[offCode], optLevel)); + if ((optLevel<2) /*static*/ && offCode >= 20) + price += (offCode-19)*2 * BITCOST_MULTIPLIER; /* handicap for long distance offsets, favor decompression speed */ + + /* match Length */ + { U32 const mlCode = ZSTD_MLcode(mlBase); + price += (ML_bits[mlCode] * BITCOST_MULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr->matchLengthFreq[mlCode], optLevel)); + } + + price += BITCOST_MULTIPLIER / 5; /* heuristic : make matches a bit more costly to favor less sequences -> faster decompression speed */ + + DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price); + return price; +} + +/* ZSTD_updateStats() : + * assumption : literals + litLength <= iend */ +static void ZSTD_updateStats(optState_t* const optPtr, + U32 litLength, const BYTE* literals, + U32 offBase, U32 matchLength) +{ + /* literals */ + if (ZSTD_compressedLiterals(optPtr)) { + U32 u; + for (u=0; u < litLength; u++) + optPtr->litFreq[literals[u]] += ZSTD_LITFREQ_ADD; + optPtr->litSum += litLength*ZSTD_LITFREQ_ADD; + } + + /* literal Length */ + { U32 const llCode = ZSTD_LLcode(litLength); + optPtr->litLengthFreq[llCode]++; + optPtr->litLengthSum++; + } + + /* offset code : follows storeSeq() numeric representation */ + { U32 const offCode = ZSTD_highbit32(offBase); + assert(offCode <= MaxOff); + optPtr->offCodeFreq[offCode]++; + optPtr->offCodeSum++; + } + + /* match Length */ + { U32 const mlBase = matchLength - MINMATCH; + U32 const mlCode = ZSTD_MLcode(mlBase); + optPtr->matchLengthFreq[mlCode]++; + optPtr->matchLengthSum++; + } +} + + +/* ZSTD_readMINMATCH() : + * function safe only for comparisons + * assumption : memPtr must be at least 4 bytes before end of buffer */ +MEM_STATIC U32 ZSTD_readMINMATCH(const void* memPtr, U32 length) +{ + switch (length) + { + default : + case 4 : return MEM_read32(memPtr); + case 3 : if (MEM_isLittleEndian()) + return MEM_read32(memPtr)<<8; + else + return MEM_read32(memPtr)>>8; + } +} + + +/* Update hashTable3 up to ip (excluded) + Assumption : always within prefix (i.e. not within extDict) */ +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 ZSTD_insertAndFindFirstIndexHash3 (const ZSTD_MatchState_t* ms, + U32* nextToUpdate3, + const BYTE* const ip) +{ + U32* const hashTable3 = ms->hashTable3; + U32 const hashLog3 = ms->hashLog3; + const BYTE* const base = ms->window.base; + U32 idx = *nextToUpdate3; + U32 const target = (U32)(ip - base); + size_t const hash3 = ZSTD_hash3Ptr(ip, hashLog3); + assert(hashLog3 > 0); + + while(idx < target) { + hashTable3[ZSTD_hash3Ptr(base+idx, hashLog3)] = idx; + idx++; + } + + *nextToUpdate3 = target; + return hashTable3[hash3]; +} + + +/*-************************************* +* Binary Tree search +***************************************/ +/** ZSTD_insertBt1() : add one or multiple positions to tree. + * @param ip assumed <= iend-8 . + * @param target The target of ZSTD_updateTree_internal() - we are filling to this position + * @return : nb of positions added */ +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 ZSTD_insertBt1( + const ZSTD_MatchState_t* ms, + const BYTE* const ip, const BYTE* const iend, + U32 const target, + U32 const mls, const int extDict) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32* const hashTable = ms->hashTable; + U32 const hashLog = cParams->hashLog; + size_t const h = ZSTD_hashPtr(ip, hashLog, mls); + U32* const bt = ms->chainTable; + U32 const btLog = cParams->chainLog - 1; + U32 const btMask = (1 << btLog) - 1; + U32 matchIndex = hashTable[h]; + size_t commonLengthSmaller=0, commonLengthLarger=0; + const BYTE* const base = ms->window.base; + const BYTE* const dictBase = ms->window.dictBase; + const U32 dictLimit = ms->window.dictLimit; + const BYTE* const dictEnd = dictBase + dictLimit; + const BYTE* const prefixStart = base + dictLimit; + const BYTE* match; + const U32 curr = (U32)(ip-base); + const U32 btLow = btMask >= curr ? 0 : curr - btMask; + U32* smallerPtr = bt + 2*(curr&btMask); + U32* largerPtr = smallerPtr + 1; + U32 dummy32; /* to be nullified at the end */ + /* windowLow is based on target because + * we only need positions that will be in the window at the end of the tree update. + */ + U32 const windowLow = ZSTD_getLowestMatchIndex(ms, target, cParams->windowLog); + U32 matchEndIdx = curr+8+1; + size_t bestLength = 8; + U32 nbCompares = 1U << cParams->searchLog; +#ifdef ZSTD_C_PREDICT + U32 predictedSmall = *(bt + 2*((curr-1)&btMask) + 0); + U32 predictedLarge = *(bt + 2*((curr-1)&btMask) + 1); + predictedSmall += (predictedSmall>0); + predictedLarge += (predictedLarge>0); +#endif /* ZSTD_C_PREDICT */ + + DEBUGLOG(8, "ZSTD_insertBt1 (%u)", curr); + + assert(curr <= target); + assert(ip <= iend-8); /* required for h calculation */ + hashTable[h] = curr; /* Update Hash Table */ + + assert(windowLow > 0); + for (; nbCompares && (matchIndex >= windowLow); --nbCompares) { + U32* const nextPtr = bt + 2*(matchIndex & btMask); + size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ + assert(matchIndex < curr); + +#ifdef ZSTD_C_PREDICT /* note : can create issues when hlog small <= 11 */ + const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll buffer */ + if (matchIndex == predictedSmall) { + /* no need to check length, result known */ + *smallerPtr = matchIndex; + if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ + smallerPtr = nextPtr+1; /* new "smaller" => larger of match */ + matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ + predictedSmall = predictPtr[1] + (predictPtr[1]>0); + continue; + } + if (matchIndex == predictedLarge) { + *largerPtr = matchIndex; + if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ + largerPtr = nextPtr; + matchIndex = nextPtr[0]; + predictedLarge = predictPtr[0] + (predictPtr[0]>0); + continue; + } +#endif + + if (!extDict || (matchIndex+matchLength >= dictLimit)) { + assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */ + match = base + matchIndex; + matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); + } else { + match = dictBase + matchIndex; + matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); + if (matchIndex+matchLength >= dictLimit) + match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ + } + + if (matchLength > bestLength) { + bestLength = matchLength; + if (matchLength > matchEndIdx - matchIndex) + matchEndIdx = matchIndex + (U32)matchLength; + } + + if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ + break; /* drop , to guarantee consistency ; miss a bit of compression, but other solutions can corrupt tree */ + } + + if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ + /* match is smaller than current */ + *smallerPtr = matchIndex; /* update smaller idx */ + commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ + if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */ + smallerPtr = nextPtr+1; /* new "candidate" => larger than match, which was smaller than target */ + matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to current */ + } else { + /* match is larger than current */ + *largerPtr = matchIndex; + commonLengthLarger = matchLength; + if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */ + largerPtr = nextPtr; + matchIndex = nextPtr[0]; + } } + + *smallerPtr = *largerPtr = 0; + { U32 positions = 0; + if (bestLength > 384) positions = MIN(192, (U32)(bestLength - 384)); /* speed optimization */ + assert(matchEndIdx > curr + 8); + return MAX(positions, matchEndIdx - (curr + 8)); + } +} + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_updateTree_internal( + ZSTD_MatchState_t* ms, + const BYTE* const ip, const BYTE* const iend, + const U32 mls, const ZSTD_dictMode_e dictMode) +{ + const BYTE* const base = ms->window.base; + U32 const target = (U32)(ip - base); + U32 idx = ms->nextToUpdate; + DEBUGLOG(7, "ZSTD_updateTree_internal, from %u to %u (dictMode:%u)", + idx, target, dictMode); + + while(idx < target) { + U32 const forward = ZSTD_insertBt1(ms, base+idx, iend, target, mls, dictMode == ZSTD_extDict); + assert(idx < (U32)(idx + forward)); + idx += forward; + } + assert((size_t)(ip - base) <= (size_t)(U32)(-1)); + assert((size_t)(iend - base) <= (size_t)(U32)(-1)); + ms->nextToUpdate = target; +} + +void ZSTD_updateTree(ZSTD_MatchState_t* ms, const BYTE* ip, const BYTE* iend) { + ZSTD_updateTree_internal(ms, ip, iend, ms->cParams.minMatch, ZSTD_noDict); +} + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 +ZSTD_insertBtAndGetAllMatches ( + ZSTD_match_t* matches, /* store result (found matches) in this table (presumed large enough) */ + ZSTD_MatchState_t* ms, + U32* nextToUpdate3, + const BYTE* const ip, const BYTE* const iLimit, + const ZSTD_dictMode_e dictMode, + const U32 rep[ZSTD_REP_NUM], + const U32 ll0, /* tells if associated literal length is 0 or not. This value must be 0 or 1 */ + const U32 lengthToBeat, + const U32 mls /* template */) +{ + const ZSTD_compressionParameters* const cParams = &ms->cParams; + U32 const sufficient_len = MIN(cParams->targetLength, ZSTD_OPT_NUM -1); + const BYTE* const base = ms->window.base; + U32 const curr = (U32)(ip-base); + U32 const hashLog = cParams->hashLog; + U32 const minMatch = (mls==3) ? 3 : 4; + U32* const hashTable = ms->hashTable; + size_t const h = ZSTD_hashPtr(ip, hashLog, mls); + U32 matchIndex = hashTable[h]; + U32* const bt = ms->chainTable; + U32 const btLog = cParams->chainLog - 1; + U32 const btMask= (1U << btLog) - 1; + size_t commonLengthSmaller=0, commonLengthLarger=0; + const BYTE* const dictBase = ms->window.dictBase; + U32 const dictLimit = ms->window.dictLimit; + const BYTE* const dictEnd = dictBase + dictLimit; + const BYTE* const prefixStart = base + dictLimit; + U32 const btLow = (btMask >= curr) ? 0 : curr - btMask; + U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog); + U32 const matchLow = windowLow ? windowLow : 1; + U32* smallerPtr = bt + 2*(curr&btMask); + U32* largerPtr = bt + 2*(curr&btMask) + 1; + U32 matchEndIdx = curr+8+1; /* farthest referenced position of any match => detects repetitive patterns */ + U32 dummy32; /* to be nullified at the end */ + U32 mnum = 0; + U32 nbCompares = 1U << cParams->searchLog; + + const ZSTD_MatchState_t* dms = dictMode == ZSTD_dictMatchState ? ms->dictMatchState : NULL; + const ZSTD_compressionParameters* const dmsCParams = + dictMode == ZSTD_dictMatchState ? &dms->cParams : NULL; + const BYTE* const dmsBase = dictMode == ZSTD_dictMatchState ? dms->window.base : NULL; + const BYTE* const dmsEnd = dictMode == ZSTD_dictMatchState ? dms->window.nextSrc : NULL; + U32 const dmsHighLimit = dictMode == ZSTD_dictMatchState ? (U32)(dmsEnd - dmsBase) : 0; + U32 const dmsLowLimit = dictMode == ZSTD_dictMatchState ? dms->window.lowLimit : 0; + U32 const dmsIndexDelta = dictMode == ZSTD_dictMatchState ? windowLow - dmsHighLimit : 0; + U32 const dmsHashLog = dictMode == ZSTD_dictMatchState ? dmsCParams->hashLog : hashLog; + U32 const dmsBtLog = dictMode == ZSTD_dictMatchState ? dmsCParams->chainLog - 1 : btLog; + U32 const dmsBtMask = dictMode == ZSTD_dictMatchState ? (1U << dmsBtLog) - 1 : 0; + U32 const dmsBtLow = dictMode == ZSTD_dictMatchState && dmsBtMask < dmsHighLimit - dmsLowLimit ? dmsHighLimit - dmsBtMask : dmsLowLimit; + + size_t bestLength = lengthToBeat-1; + DEBUGLOG(8, "ZSTD_insertBtAndGetAllMatches: current=%u", curr); + + /* check repCode */ + assert(ll0 <= 1); /* necessarily 1 or 0 */ + { U32 const lastR = ZSTD_REP_NUM + ll0; + U32 repCode; + for (repCode = ll0; repCode < lastR; repCode++) { + U32 const repOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; + U32 const repIndex = curr - repOffset; + U32 repLen = 0; + assert(curr >= dictLimit); + if (repOffset-1 /* intentional overflow, discards 0 and -1 */ < curr-dictLimit) { /* equivalent to `curr > repIndex >= dictLimit` */ + /* We must validate the repcode offset because when we're using a dictionary the + * valid offset range shrinks when the dictionary goes out of bounds. + */ + if ((repIndex >= windowLow) & (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(ip - repOffset, minMatch))) { + repLen = (U32)ZSTD_count(ip+minMatch, ip+minMatch-repOffset, iLimit) + minMatch; + } + } else { /* repIndex < dictLimit || repIndex >= curr */ + const BYTE* const repMatch = dictMode == ZSTD_dictMatchState ? + dmsBase + repIndex - dmsIndexDelta : + dictBase + repIndex; + assert(curr >= windowLow); + if ( dictMode == ZSTD_extDict + && ( ((repOffset-1) /*intentional overflow*/ < curr - windowLow) /* equivalent to `curr > repIndex >= windowLow` */ + & (ZSTD_index_overlap_check(dictLimit, repIndex)) ) + && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) { + repLen = (U32)ZSTD_count_2segments(ip+minMatch, repMatch+minMatch, iLimit, dictEnd, prefixStart) + minMatch; + } + if (dictMode == ZSTD_dictMatchState + && ( ((repOffset-1) /*intentional overflow*/ < curr - (dmsLowLimit + dmsIndexDelta)) /* equivalent to `curr > repIndex >= dmsLowLimit` */ + & (ZSTD_index_overlap_check(dictLimit, repIndex)) ) + && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) { + repLen = (U32)ZSTD_count_2segments(ip+minMatch, repMatch+minMatch, iLimit, dmsEnd, prefixStart) + minMatch; + } } + /* save longer solution */ + if (repLen > bestLength) { + DEBUGLOG(8, "found repCode %u (ll0:%u, offset:%u) of length %u", + repCode, ll0, repOffset, repLen); + bestLength = repLen; + matches[mnum].off = REPCODE_TO_OFFBASE(repCode - ll0 + 1); /* expect value between 1 and 3 */ + matches[mnum].len = (U32)repLen; + mnum++; + if ( (repLen > sufficient_len) + | (ip+repLen == iLimit) ) { /* best possible */ + return mnum; + } } } } + + /* HC3 match finder */ + if ((mls == 3) /*static*/ && (bestLength < mls)) { + U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3(ms, nextToUpdate3, ip); + if ((matchIndex3 >= matchLow) + & (curr - matchIndex3 < (1<<18)) /*heuristic : longer distance likely too expensive*/ ) { + size_t mlen; + if ((dictMode == ZSTD_noDict) /*static*/ || (dictMode == ZSTD_dictMatchState) /*static*/ || (matchIndex3 >= dictLimit)) { + const BYTE* const match = base + matchIndex3; + mlen = ZSTD_count(ip, match, iLimit); + } else { + const BYTE* const match = dictBase + matchIndex3; + mlen = ZSTD_count_2segments(ip, match, iLimit, dictEnd, prefixStart); + } + + /* save best solution */ + if (mlen >= mls /* == 3 > bestLength */) { + DEBUGLOG(8, "found small match with hlog3, of length %u", + (U32)mlen); + bestLength = mlen; + assert(curr > matchIndex3); + assert(mnum==0); /* no prior solution */ + matches[0].off = OFFSET_TO_OFFBASE(curr - matchIndex3); + matches[0].len = (U32)mlen; + mnum = 1; + if ( (mlen > sufficient_len) | + (ip+mlen == iLimit) ) { /* best possible length */ + ms->nextToUpdate = curr+1; /* skip insertion */ + return 1; + } } } + /* no dictMatchState lookup: dicts don't have a populated HC3 table */ + } /* if (mls == 3) */ + + hashTable[h] = curr; /* Update Hash Table */ + + for (; nbCompares && (matchIndex >= matchLow); --nbCompares) { + U32* const nextPtr = bt + 2*(matchIndex & btMask); + const BYTE* match; + size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ + assert(curr > matchIndex); + + if ((dictMode == ZSTD_noDict) || (dictMode == ZSTD_dictMatchState) || (matchIndex+matchLength >= dictLimit)) { + assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */ + match = base + matchIndex; + if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */ + matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit); + } else { + match = dictBase + matchIndex; + assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */ + matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStart); + if (matchIndex+matchLength >= dictLimit) + match = base + matchIndex; /* prepare for match[matchLength] read */ + } + + if (matchLength > bestLength) { + DEBUGLOG(8, "found match of length %u at distance %u (offBase=%u)", + (U32)matchLength, curr - matchIndex, OFFSET_TO_OFFBASE(curr - matchIndex)); + assert(matchEndIdx > matchIndex); + if (matchLength > matchEndIdx - matchIndex) + matchEndIdx = matchIndex + (U32)matchLength; + bestLength = matchLength; + matches[mnum].off = OFFSET_TO_OFFBASE(curr - matchIndex); + matches[mnum].len = (U32)matchLength; + mnum++; + if ( (matchLength > ZSTD_OPT_NUM) + | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { + if (dictMode == ZSTD_dictMatchState) nbCompares = 0; /* break should also skip searching dms */ + break; /* drop, to preserve bt consistency (miss a little bit of compression) */ + } } + + if (match[matchLength] < ip[matchLength]) { + /* match smaller than current */ + *smallerPtr = matchIndex; /* update smaller idx */ + commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ + if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ + smallerPtr = nextPtr+1; /* new candidate => larger than match, which was smaller than current */ + matchIndex = nextPtr[1]; /* new matchIndex, larger than previous, closer to current */ + } else { + *largerPtr = matchIndex; + commonLengthLarger = matchLength; + if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ + largerPtr = nextPtr; + matchIndex = nextPtr[0]; + } } + + *smallerPtr = *largerPtr = 0; + + assert(nbCompares <= (1U << ZSTD_SEARCHLOG_MAX)); /* Check we haven't underflowed. */ + if (dictMode == ZSTD_dictMatchState && nbCompares) { + size_t const dmsH = ZSTD_hashPtr(ip, dmsHashLog, mls); + U32 dictMatchIndex = dms->hashTable[dmsH]; + const U32* const dmsBt = dms->chainTable; + commonLengthSmaller = commonLengthLarger = 0; + for (; nbCompares && (dictMatchIndex > dmsLowLimit); --nbCompares) { + const U32* const nextPtr = dmsBt + 2*(dictMatchIndex & dmsBtMask); + size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */ + const BYTE* match = dmsBase + dictMatchIndex; + matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dmsEnd, prefixStart); + if (dictMatchIndex+matchLength >= dmsHighLimit) + match = base + dictMatchIndex + dmsIndexDelta; /* to prepare for next usage of match[matchLength] */ + + if (matchLength > bestLength) { + matchIndex = dictMatchIndex + dmsIndexDelta; + DEBUGLOG(8, "found dms match of length %u at distance %u (offBase=%u)", + (U32)matchLength, curr - matchIndex, OFFSET_TO_OFFBASE(curr - matchIndex)); + if (matchLength > matchEndIdx - matchIndex) + matchEndIdx = matchIndex + (U32)matchLength; + bestLength = matchLength; + matches[mnum].off = OFFSET_TO_OFFBASE(curr - matchIndex); + matches[mnum].len = (U32)matchLength; + mnum++; + if ( (matchLength > ZSTD_OPT_NUM) + | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { + break; /* drop, to guarantee consistency (miss a little bit of compression) */ + } } + + if (dictMatchIndex <= dmsBtLow) { break; } /* beyond tree size, stop the search */ + if (match[matchLength] < ip[matchLength]) { + commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */ + dictMatchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ + } else { + /* match is larger than current */ + commonLengthLarger = matchLength; + dictMatchIndex = nextPtr[0]; + } } } /* if (dictMode == ZSTD_dictMatchState) */ + + assert(matchEndIdx > curr+8); + ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ + return mnum; +} + +typedef U32 (*ZSTD_getAllMatchesFn)( + ZSTD_match_t*, + ZSTD_MatchState_t*, + U32*, + const BYTE*, + const BYTE*, + const U32 rep[ZSTD_REP_NUM], + U32 const ll0, + U32 const lengthToBeat); + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +U32 ZSTD_btGetAllMatches_internal( + ZSTD_match_t* matches, + ZSTD_MatchState_t* ms, + U32* nextToUpdate3, + const BYTE* ip, + const BYTE* const iHighLimit, + const U32 rep[ZSTD_REP_NUM], + U32 const ll0, + U32 const lengthToBeat, + const ZSTD_dictMode_e dictMode, + const U32 mls) +{ + assert(BOUNDED(3, ms->cParams.minMatch, 6) == mls); + DEBUGLOG(8, "ZSTD_BtGetAllMatches(dictMode=%d, mls=%u)", (int)dictMode, mls); + if (ip < ms->window.base + ms->nextToUpdate) + return 0; /* skipped area */ + ZSTD_updateTree_internal(ms, ip, iHighLimit, mls, dictMode); + return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode, rep, ll0, lengthToBeat, mls); +} + +#define ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, mls) ZSTD_btGetAllMatches_##dictMode##_##mls + +#define GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, mls) \ + static U32 ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, mls)( \ + ZSTD_match_t* matches, \ + ZSTD_MatchState_t* ms, \ + U32* nextToUpdate3, \ + const BYTE* ip, \ + const BYTE* const iHighLimit, \ + const U32 rep[ZSTD_REP_NUM], \ + U32 const ll0, \ + U32 const lengthToBeat) \ + { \ + return ZSTD_btGetAllMatches_internal( \ + matches, ms, nextToUpdate3, ip, iHighLimit, \ + rep, ll0, lengthToBeat, ZSTD_##dictMode, mls); \ + } + +#define GEN_ZSTD_BT_GET_ALL_MATCHES(dictMode) \ + GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 3) \ + GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 4) \ + GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 5) \ + GEN_ZSTD_BT_GET_ALL_MATCHES_(dictMode, 6) + +GEN_ZSTD_BT_GET_ALL_MATCHES(noDict) +GEN_ZSTD_BT_GET_ALL_MATCHES(extDict) +GEN_ZSTD_BT_GET_ALL_MATCHES(dictMatchState) + +#define ZSTD_BT_GET_ALL_MATCHES_ARRAY(dictMode) \ + { \ + ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 3), \ + ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 4), \ + ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 5), \ + ZSTD_BT_GET_ALL_MATCHES_FN(dictMode, 6) \ + } + +static ZSTD_getAllMatchesFn +ZSTD_selectBtGetAllMatches(ZSTD_MatchState_t const* ms, ZSTD_dictMode_e const dictMode) +{ + ZSTD_getAllMatchesFn const getAllMatchesFns[3][4] = { + ZSTD_BT_GET_ALL_MATCHES_ARRAY(noDict), + ZSTD_BT_GET_ALL_MATCHES_ARRAY(extDict), + ZSTD_BT_GET_ALL_MATCHES_ARRAY(dictMatchState) + }; + U32 const mls = BOUNDED(3, ms->cParams.minMatch, 6); + assert((U32)dictMode < 3); + assert(mls - 3 < 4); + return getAllMatchesFns[(int)dictMode][mls - 3]; +} + +/************************* +* LDM helper functions * +*************************/ + +/* Struct containing info needed to make decision about ldm inclusion */ +typedef struct { + RawSeqStore_t seqStore; /* External match candidates store for this block */ + U32 startPosInBlock; /* Start position of the current match candidate */ + U32 endPosInBlock; /* End position of the current match candidate */ + U32 offset; /* Offset of the match candidate */ +} ZSTD_optLdm_t; + +/* ZSTD_optLdm_skipRawSeqStoreBytes(): + * Moves forward in @rawSeqStore by @nbBytes, + * which will update the fields 'pos' and 'posInSequence'. + */ +static void ZSTD_optLdm_skipRawSeqStoreBytes(RawSeqStore_t* rawSeqStore, size_t nbBytes) +{ + U32 currPos = (U32)(rawSeqStore->posInSequence + nbBytes); + while (currPos && rawSeqStore->pos < rawSeqStore->size) { + rawSeq currSeq = rawSeqStore->seq[rawSeqStore->pos]; + if (currPos >= currSeq.litLength + currSeq.matchLength) { + currPos -= currSeq.litLength + currSeq.matchLength; + rawSeqStore->pos++; + } else { + rawSeqStore->posInSequence = currPos; + break; + } + } + if (currPos == 0 || rawSeqStore->pos == rawSeqStore->size) { + rawSeqStore->posInSequence = 0; + } +} + +/* ZSTD_opt_getNextMatchAndUpdateSeqStore(): + * Calculates the beginning and end of the next match in the current block. + * Updates 'pos' and 'posInSequence' of the ldmSeqStore. + */ +static void +ZSTD_opt_getNextMatchAndUpdateSeqStore(ZSTD_optLdm_t* optLdm, U32 currPosInBlock, + U32 blockBytesRemaining) +{ + rawSeq currSeq; + U32 currBlockEndPos; + U32 literalsBytesRemaining; + U32 matchBytesRemaining; + + /* Setting match end position to MAX to ensure we never use an LDM during this block */ + if (optLdm->seqStore.size == 0 || optLdm->seqStore.pos >= optLdm->seqStore.size) { + optLdm->startPosInBlock = UINT_MAX; + optLdm->endPosInBlock = UINT_MAX; + return; + } + /* Calculate appropriate bytes left in matchLength and litLength + * after adjusting based on ldmSeqStore->posInSequence */ + currSeq = optLdm->seqStore.seq[optLdm->seqStore.pos]; + assert(optLdm->seqStore.posInSequence <= currSeq.litLength + currSeq.matchLength); + currBlockEndPos = currPosInBlock + blockBytesRemaining; + literalsBytesRemaining = (optLdm->seqStore.posInSequence < currSeq.litLength) ? + currSeq.litLength - (U32)optLdm->seqStore.posInSequence : + 0; + matchBytesRemaining = (literalsBytesRemaining == 0) ? + currSeq.matchLength - ((U32)optLdm->seqStore.posInSequence - currSeq.litLength) : + currSeq.matchLength; + + /* If there are more literal bytes than bytes remaining in block, no ldm is possible */ + if (literalsBytesRemaining >= blockBytesRemaining) { + optLdm->startPosInBlock = UINT_MAX; + optLdm->endPosInBlock = UINT_MAX; + ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, blockBytesRemaining); + return; + } + + /* Matches may be < minMatch by this process. In that case, we will reject them + when we are deciding whether or not to add the ldm */ + optLdm->startPosInBlock = currPosInBlock + literalsBytesRemaining; + optLdm->endPosInBlock = optLdm->startPosInBlock + matchBytesRemaining; + optLdm->offset = currSeq.offset; + + if (optLdm->endPosInBlock > currBlockEndPos) { + /* Match ends after the block ends, we can't use the whole match */ + optLdm->endPosInBlock = currBlockEndPos; + ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, currBlockEndPos - currPosInBlock); + } else { + /* Consume nb of bytes equal to size of sequence left */ + ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, literalsBytesRemaining + matchBytesRemaining); + } +} + +/* ZSTD_optLdm_maybeAddMatch(): + * Adds a match if it's long enough, + * based on it's 'matchStartPosInBlock' and 'matchEndPosInBlock', + * into 'matches'. Maintains the correct ordering of 'matches'. + */ +static void ZSTD_optLdm_maybeAddMatch(ZSTD_match_t* matches, U32* nbMatches, + const ZSTD_optLdm_t* optLdm, U32 currPosInBlock, + U32 minMatch) +{ + U32 const posDiff = currPosInBlock - optLdm->startPosInBlock; + /* Note: ZSTD_match_t actually contains offBase and matchLength (before subtracting MINMATCH) */ + U32 const candidateMatchLength = optLdm->endPosInBlock - optLdm->startPosInBlock - posDiff; + + /* Ensure that current block position is not outside of the match */ + if (currPosInBlock < optLdm->startPosInBlock + || currPosInBlock >= optLdm->endPosInBlock + || candidateMatchLength < minMatch) { + return; + } + + if (*nbMatches == 0 || ((candidateMatchLength > matches[*nbMatches-1].len) && *nbMatches < ZSTD_OPT_NUM)) { + U32 const candidateOffBase = OFFSET_TO_OFFBASE(optLdm->offset); + DEBUGLOG(6, "ZSTD_optLdm_maybeAddMatch(): Adding ldm candidate match (offBase: %u matchLength %u) at block position=%u", + candidateOffBase, candidateMatchLength, currPosInBlock); + matches[*nbMatches].len = candidateMatchLength; + matches[*nbMatches].off = candidateOffBase; + (*nbMatches)++; + } +} + +/* ZSTD_optLdm_processMatchCandidate(): + * Wrapper function to update ldm seq store and call ldm functions as necessary. + */ +static void +ZSTD_optLdm_processMatchCandidate(ZSTD_optLdm_t* optLdm, + ZSTD_match_t* matches, U32* nbMatches, + U32 currPosInBlock, U32 remainingBytes, + U32 minMatch) +{ + if (optLdm->seqStore.size == 0 || optLdm->seqStore.pos >= optLdm->seqStore.size) { + return; + } + + if (currPosInBlock >= optLdm->endPosInBlock) { + if (currPosInBlock > optLdm->endPosInBlock) { + /* The position at which ZSTD_optLdm_processMatchCandidate() is called is not necessarily + * at the end of a match from the ldm seq store, and will often be some bytes + * over beyond matchEndPosInBlock. As such, we need to correct for these "overshoots" + */ + U32 const posOvershoot = currPosInBlock - optLdm->endPosInBlock; + ZSTD_optLdm_skipRawSeqStoreBytes(&optLdm->seqStore, posOvershoot); + } + ZSTD_opt_getNextMatchAndUpdateSeqStore(optLdm, currPosInBlock, remainingBytes); + } + ZSTD_optLdm_maybeAddMatch(matches, nbMatches, optLdm, currPosInBlock, minMatch); +} + + +/*-******************************* +* Optimal parser +*********************************/ + +#if 0 /* debug */ + +static void +listStats(const U32* table, int lastEltID) +{ + int const nbElts = lastEltID + 1; + int enb; + for (enb=0; enb < nbElts; enb++) { + (void)table; + /* RAWLOG(2, "%3i:%3i, ", enb, table[enb]); */ + RAWLOG(2, "%4i,", table[enb]); + } + RAWLOG(2, " \n"); +} + +#endif + +#define LIT_PRICE(_p) (int)ZSTD_rawLiteralsCost(_p, 1, optStatePtr, optLevel) +#define LL_PRICE(_l) (int)ZSTD_litLengthPrice(_l, optStatePtr, optLevel) +#define LL_INCPRICE(_l) (LL_PRICE(_l) - LL_PRICE(_l-1)) + +FORCE_INLINE_TEMPLATE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t +ZSTD_compressBlock_opt_generic(ZSTD_MatchState_t* ms, + SeqStore_t* seqStore, + U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize, + const int optLevel, + const ZSTD_dictMode_e dictMode) +{ + optState_t* const optStatePtr = &ms->opt; + const BYTE* const istart = (const BYTE*)src; + const BYTE* ip = istart; + const BYTE* anchor = istart; + const BYTE* const iend = istart + srcSize; + const BYTE* const ilimit = iend - 8; + const BYTE* const base = ms->window.base; + const BYTE* const prefixStart = base + ms->window.dictLimit; + const ZSTD_compressionParameters* const cParams = &ms->cParams; + + ZSTD_getAllMatchesFn getAllMatches = ZSTD_selectBtGetAllMatches(ms, dictMode); + + U32 const sufficient_len = MIN(cParams->targetLength, ZSTD_OPT_NUM -1); + U32 const minMatch = (cParams->minMatch == 3) ? 3 : 4; + U32 nextToUpdate3 = ms->nextToUpdate; + + ZSTD_optimal_t* const opt = optStatePtr->priceTable; + ZSTD_match_t* const matches = optStatePtr->matchTable; + ZSTD_optimal_t lastStretch; + ZSTD_optLdm_t optLdm; + + ZSTD_memset(&lastStretch, 0, sizeof(ZSTD_optimal_t)); + + optLdm.seqStore = ms->ldmSeqStore ? *ms->ldmSeqStore : kNullRawSeqStore; + optLdm.endPosInBlock = optLdm.startPosInBlock = optLdm.offset = 0; + ZSTD_opt_getNextMatchAndUpdateSeqStore(&optLdm, (U32)(ip-istart), (U32)(iend-ip)); + + /* init */ + DEBUGLOG(5, "ZSTD_compressBlock_opt_generic: current=%u, prefix=%u, nextToUpdate=%u", + (U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate); + assert(optLevel <= 2); + ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); + ip += (ip==prefixStart); + + /* Match Loop */ + while (ip < ilimit) { + U32 cur, last_pos = 0; + + /* find first match */ + { U32 const litlen = (U32)(ip - anchor); + U32 const ll0 = !litlen; + U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, ip, iend, rep, ll0, minMatch); + ZSTD_optLdm_processMatchCandidate(&optLdm, matches, &nbMatches, + (U32)(ip-istart), (U32)(iend-ip), + minMatch); + if (!nbMatches) { + DEBUGLOG(8, "no match found at cPos %u", (unsigned)(ip-istart)); + ip++; + continue; + } + + /* Match found: let's store this solution, and eventually find more candidates. + * During this forward pass, @opt is used to store stretches, + * defined as "a match followed by N literals". + * Note how this is different from a Sequence, which is "N literals followed by a match". + * Storing stretches allows us to store different match predecessors + * for each literal position part of a literals run. */ + + /* initialize opt[0] */ + opt[0].mlen = 0; /* there are only literals so far */ + opt[0].litlen = litlen; + /* No need to include the actual price of the literals before the first match + * because it is static for the duration of the forward pass, and is included + * in every subsequent price. But, we include the literal length because + * the cost variation of litlen depends on the value of litlen. + */ + opt[0].price = LL_PRICE(litlen); + ZSTD_STATIC_ASSERT(sizeof(opt[0].rep[0]) == sizeof(rep[0])); + ZSTD_memcpy(&opt[0].rep, rep, sizeof(opt[0].rep)); + + /* large match -> immediate encoding */ + { U32 const maxML = matches[nbMatches-1].len; + U32 const maxOffBase = matches[nbMatches-1].off; + DEBUGLOG(6, "found %u matches of maxLength=%u and maxOffBase=%u at cPos=%u => start new series", + nbMatches, maxML, maxOffBase, (U32)(ip-prefixStart)); + + if (maxML > sufficient_len) { + lastStretch.litlen = 0; + lastStretch.mlen = maxML; + lastStretch.off = maxOffBase; + DEBUGLOG(6, "large match (%u>%u) => immediate encoding", + maxML, sufficient_len); + cur = 0; + last_pos = maxML; + goto _shortestPath; + } } + + /* set prices for first matches starting position == 0 */ + assert(opt[0].price >= 0); + { U32 pos; + U32 matchNb; + for (pos = 1; pos < minMatch; pos++) { + opt[pos].price = ZSTD_MAX_PRICE; + opt[pos].mlen = 0; + opt[pos].litlen = litlen + pos; + } + for (matchNb = 0; matchNb < nbMatches; matchNb++) { + U32 const offBase = matches[matchNb].off; + U32 const end = matches[matchNb].len; + for ( ; pos <= end ; pos++ ) { + int const matchPrice = (int)ZSTD_getMatchPrice(offBase, pos, optStatePtr, optLevel); + int const sequencePrice = opt[0].price + matchPrice; + DEBUGLOG(7, "rPos:%u => set initial price : %.2f", + pos, ZSTD_fCost(sequencePrice)); + opt[pos].mlen = pos; + opt[pos].off = offBase; + opt[pos].litlen = 0; /* end of match */ + opt[pos].price = sequencePrice + LL_PRICE(0); + } + } + last_pos = pos-1; + opt[pos].price = ZSTD_MAX_PRICE; + } + } + + /* check further positions */ + for (cur = 1; cur <= last_pos; cur++) { + const BYTE* const inr = ip + cur; + assert(cur <= ZSTD_OPT_NUM); + DEBUGLOG(7, "cPos:%i==rPos:%u", (int)(inr-istart), cur); + + /* Fix current position with one literal if cheaper */ + { U32 const litlen = opt[cur-1].litlen + 1; + int const price = opt[cur-1].price + + LIT_PRICE(ip+cur-1) + + LL_INCPRICE(litlen); + assert(price < 1000000000); /* overflow check */ + if (price <= opt[cur].price) { + ZSTD_optimal_t const prevMatch = opt[cur]; + DEBUGLOG(7, "cPos:%i==rPos:%u : better price (%.2f<=%.2f) using literal (ll==%u) (hist:%u,%u,%u)", + (int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, + opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]); + opt[cur] = opt[cur-1]; + opt[cur].litlen = litlen; + opt[cur].price = price; + if ( (optLevel >= 1) /* additional check only for higher modes */ + && (prevMatch.litlen == 0) /* replace a match */ + && (LL_INCPRICE(1) < 0) /* ll1 is cheaper than ll0 */ + && LIKELY(ip + cur < iend) + ) { + /* check next position, in case it would be cheaper */ + int with1literal = prevMatch.price + LIT_PRICE(ip+cur) + LL_INCPRICE(1); + int withMoreLiterals = price + LIT_PRICE(ip+cur) + LL_INCPRICE(litlen+1); + DEBUGLOG(7, "then at next rPos %u : match+1lit %.2f vs %ulits %.2f", + cur+1, ZSTD_fCost(with1literal), litlen+1, ZSTD_fCost(withMoreLiterals)); + if ( (with1literal < withMoreLiterals) + && (with1literal < opt[cur+1].price) ) { + /* update offset history - before it disappears */ + U32 const prev = cur - prevMatch.mlen; + Repcodes_t const newReps = ZSTD_newRep(opt[prev].rep, prevMatch.off, opt[prev].litlen==0); + assert(cur >= prevMatch.mlen); + DEBUGLOG(7, "==> match+1lit is cheaper (%.2f < %.2f) (hist:%u,%u,%u) !", + ZSTD_fCost(with1literal), ZSTD_fCost(withMoreLiterals), + newReps.rep[0], newReps.rep[1], newReps.rep[2] ); + opt[cur+1] = prevMatch; /* mlen & offbase */ + ZSTD_memcpy(opt[cur+1].rep, &newReps, sizeof(Repcodes_t)); + opt[cur+1].litlen = 1; + opt[cur+1].price = with1literal; + if (last_pos < cur+1) last_pos = cur+1; + } + } + } else { + DEBUGLOG(7, "cPos:%i==rPos:%u : literal would cost more (%.2f>%.2f)", + (int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price)); + } + } + + /* Offset history is not updated during match comparison. + * Do it here, now that the match is selected and confirmed. + */ + ZSTD_STATIC_ASSERT(sizeof(opt[cur].rep) == sizeof(Repcodes_t)); + assert(cur >= opt[cur].mlen); + if (opt[cur].litlen == 0) { + /* just finished a match => alter offset history */ + U32 const prev = cur - opt[cur].mlen; + Repcodes_t const newReps = ZSTD_newRep(opt[prev].rep, opt[cur].off, opt[prev].litlen==0); + ZSTD_memcpy(opt[cur].rep, &newReps, sizeof(Repcodes_t)); + } + + /* last match must start at a minimum distance of 8 from oend */ + if (inr > ilimit) continue; + + if (cur == last_pos) break; + + if ( (optLevel==0) /*static_test*/ + && (opt[cur+1].price <= opt[cur].price + (BITCOST_MULTIPLIER/2)) ) { + DEBUGLOG(7, "skip current position : next rPos(%u) price is cheaper", cur+1); + continue; /* skip unpromising positions; about ~+6% speed, -0.01 ratio */ + } + + assert(opt[cur].price >= 0); + { U32 const ll0 = (opt[cur].litlen == 0); + int const previousPrice = opt[cur].price; + int const basePrice = previousPrice + LL_PRICE(0); + U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, inr, iend, opt[cur].rep, ll0, minMatch); + U32 matchNb; + + ZSTD_optLdm_processMatchCandidate(&optLdm, matches, &nbMatches, + (U32)(inr-istart), (U32)(iend-inr), + minMatch); + + if (!nbMatches) { + DEBUGLOG(7, "rPos:%u : no match found", cur); + continue; + } + + { U32 const longestML = matches[nbMatches-1].len; + DEBUGLOG(7, "cPos:%i==rPos:%u, found %u matches, of longest ML=%u", + (int)(inr-istart), cur, nbMatches, longestML); + + if ( (longestML > sufficient_len) + || (cur + longestML >= ZSTD_OPT_NUM) + || (ip + cur + longestML >= iend) ) { + lastStretch.mlen = longestML; + lastStretch.off = matches[nbMatches-1].off; + lastStretch.litlen = 0; + last_pos = cur + longestML; + goto _shortestPath; + } } + + /* set prices using matches found at position == cur */ + for (matchNb = 0; matchNb < nbMatches; matchNb++) { + U32 const offset = matches[matchNb].off; + U32 const lastML = matches[matchNb].len; + U32 const startML = (matchNb>0) ? matches[matchNb-1].len+1 : minMatch; + U32 mlen; + + DEBUGLOG(7, "testing match %u => offBase=%4u, mlen=%2u, llen=%2u", + matchNb, matches[matchNb].off, lastML, opt[cur].litlen); + + for (mlen = lastML; mlen >= startML; mlen--) { /* scan downward */ + U32 const pos = cur + mlen; + int const price = basePrice + (int)ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); + + if ((pos > last_pos) || (price < opt[pos].price)) { + DEBUGLOG(7, "rPos:%u (ml=%2u) => new better price (%.2f<%.2f)", + pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); + while (last_pos < pos) { + /* fill empty positions, for future comparisons */ + last_pos++; + opt[last_pos].price = ZSTD_MAX_PRICE; + opt[last_pos].litlen = !0; /* just needs to be != 0, to mean "not an end of match" */ + } + opt[pos].mlen = mlen; + opt[pos].off = offset; + opt[pos].litlen = 0; + opt[pos].price = price; + } else { + DEBUGLOG(7, "rPos:%u (ml=%2u) => new price is worse (%.2f>=%.2f)", + pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); + if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ + } + } } } + opt[last_pos+1].price = ZSTD_MAX_PRICE; + } /* for (cur = 1; cur <= last_pos; cur++) */ + + lastStretch = opt[last_pos]; + assert(cur >= lastStretch.mlen); + cur = last_pos - lastStretch.mlen; + +_shortestPath: /* cur, last_pos, best_mlen, best_off have to be set */ + assert(opt[0].mlen == 0); + assert(last_pos >= lastStretch.mlen); + assert(cur == last_pos - lastStretch.mlen); + + if (lastStretch.mlen==0) { + /* no solution : all matches have been converted into literals */ + assert(lastStretch.litlen == (ip - anchor) + last_pos); + ip += last_pos; + continue; + } + assert(lastStretch.off > 0); + + /* Update offset history */ + if (lastStretch.litlen == 0) { + /* finishing on a match : update offset history */ + Repcodes_t const reps = ZSTD_newRep(opt[cur].rep, lastStretch.off, opt[cur].litlen==0); + ZSTD_memcpy(rep, &reps, sizeof(Repcodes_t)); + } else { + ZSTD_memcpy(rep, lastStretch.rep, sizeof(Repcodes_t)); + assert(cur >= lastStretch.litlen); + cur -= lastStretch.litlen; + } + + /* Let's write the shortest path solution. + * It is stored in @opt in reverse order, + * starting from @storeEnd (==cur+2), + * effectively partially @opt overwriting. + * Content is changed too: + * - So far, @opt stored stretches, aka a match followed by literals + * - Now, it will store sequences, aka literals followed by a match + */ + { U32 const storeEnd = cur + 2; + U32 storeStart = storeEnd; + U32 stretchPos = cur; + + DEBUGLOG(6, "start reverse traversal (last_pos:%u, cur:%u)", + last_pos, cur); (void)last_pos; + assert(storeEnd < ZSTD_OPT_SIZE); + DEBUGLOG(6, "last stretch copied into pos=%u (llen=%u,mlen=%u,ofc=%u)", + storeEnd, lastStretch.litlen, lastStretch.mlen, lastStretch.off); + if (lastStretch.litlen > 0) { + /* last "sequence" is unfinished: just a bunch of literals */ + opt[storeEnd].litlen = lastStretch.litlen; + opt[storeEnd].mlen = 0; + storeStart = storeEnd-1; + opt[storeStart] = lastStretch; + } { + opt[storeEnd] = lastStretch; /* note: litlen will be fixed */ + storeStart = storeEnd; + } + while (1) { + ZSTD_optimal_t nextStretch = opt[stretchPos]; + opt[storeStart].litlen = nextStretch.litlen; + DEBUGLOG(6, "selected sequence (llen=%u,mlen=%u,ofc=%u)", + opt[storeStart].litlen, opt[storeStart].mlen, opt[storeStart].off); + if (nextStretch.mlen == 0) { + /* reaching beginning of segment */ + break; + } + storeStart--; + opt[storeStart] = nextStretch; /* note: litlen will be fixed */ + assert(nextStretch.litlen + nextStretch.mlen <= stretchPos); + stretchPos -= nextStretch.litlen + nextStretch.mlen; + } + + /* save sequences */ + DEBUGLOG(6, "sending selected sequences into seqStore"); + { U32 storePos; + for (storePos=storeStart; storePos <= storeEnd; storePos++) { + U32 const llen = opt[storePos].litlen; + U32 const mlen = opt[storePos].mlen; + U32 const offBase = opt[storePos].off; + U32 const advance = llen + mlen; + DEBUGLOG(6, "considering seq starting at %i, llen=%u, mlen=%u", + (int)(anchor - istart), (unsigned)llen, (unsigned)mlen); + + if (mlen==0) { /* only literals => must be last "sequence", actually starting a new stream of sequences */ + assert(storePos == storeEnd); /* must be last sequence */ + ip = anchor + llen; /* last "sequence" is a bunch of literals => don't progress anchor */ + continue; /* will finish */ + } + + assert(anchor + llen <= iend); + ZSTD_updateStats(optStatePtr, llen, anchor, offBase, mlen); + ZSTD_storeSeq(seqStore, llen, anchor, iend, offBase, mlen); + anchor += advance; + ip = anchor; + } } + DEBUGLOG(7, "new offset history : %u, %u, %u", rep[0], rep[1], rep[2]); + + /* update all costs */ + ZSTD_setBasePrices(optStatePtr, optLevel); + } + } /* while (ip < ilimit) */ + + /* Return the last literals size */ + return (size_t)(iend - anchor); +} +#endif /* build exclusions */ + +#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR +static size_t ZSTD_compressBlock_opt0( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) +{ + return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /* optLevel */, dictMode); +} +#endif + +#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR +static size_t ZSTD_compressBlock_opt2( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) +{ + return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /* optLevel */, dictMode); +} +#endif + +#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btopt( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + DEBUGLOG(5, "ZSTD_compressBlock_btopt"); + return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_noDict); +} +#endif + + + + +#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR +/* ZSTD_initStats_ultra(): + * make a first compression pass, just to seed stats with more accurate starting values. + * only works on first block, with no dictionary and no ldm. + * this function cannot error out, its narrow contract must be respected. + */ +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_initStats_ultra(ZSTD_MatchState_t* ms, + SeqStore_t* seqStore, + U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + U32 tmpRep[ZSTD_REP_NUM]; /* updated rep codes will sink here */ + ZSTD_memcpy(tmpRep, rep, sizeof(tmpRep)); + + DEBUGLOG(4, "ZSTD_initStats_ultra (srcSize=%zu)", srcSize); + assert(ms->opt.litLengthSum == 0); /* first block */ + assert(seqStore->sequences == seqStore->sequencesStart); /* no ldm */ + assert(ms->window.dictLimit == ms->window.lowLimit); /* no dictionary */ + assert(ms->window.dictLimit - ms->nextToUpdate <= 1); /* no prefix (note: intentional overflow, defined as 2-complement) */ + + ZSTD_compressBlock_opt2(ms, seqStore, tmpRep, src, srcSize, ZSTD_noDict); /* generate stats into ms->opt*/ + + /* invalidate first scan from history, only keep entropy stats */ + ZSTD_resetSeqStore(seqStore); + ms->window.base -= srcSize; + ms->window.dictLimit += (U32)srcSize; + ms->window.lowLimit = ms->window.dictLimit; + ms->nextToUpdate = ms->window.dictLimit; + +} + +size_t ZSTD_compressBlock_btultra( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + DEBUGLOG(5, "ZSTD_compressBlock_btultra (srcSize=%zu)", srcSize); + return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); +} + +size_t ZSTD_compressBlock_btultra2( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + U32 const curr = (U32)((const BYTE*)src - ms->window.base); + DEBUGLOG(5, "ZSTD_compressBlock_btultra2 (srcSize=%zu)", srcSize); + + /* 2-passes strategy: + * this strategy makes a first pass over first block to collect statistics + * in order to seed next round's statistics with it. + * After 1st pass, function forgets history, and starts a new block. + * Consequently, this can only work if no data has been previously loaded in tables, + * aka, no dictionary, no prefix, no ldm preprocessing. + * The compression ratio gain is generally small (~0.5% on first block), + * the cost is 2x cpu time on first block. */ + assert(srcSize <= ZSTD_BLOCKSIZE_MAX); + if ( (ms->opt.litLengthSum==0) /* first block */ + && (seqStore->sequences == seqStore->sequencesStart) /* no ldm */ + && (ms->window.dictLimit == ms->window.lowLimit) /* no dictionary */ + && (curr == ms->window.dictLimit) /* start of frame, nothing already loaded nor skipped */ + && (srcSize > ZSTD_PREDEF_THRESHOLD) /* input large enough to not employ default stats */ + ) { + ZSTD_initStats_ultra(ms, seqStore, rep, src, srcSize); + } + + return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); +} +#endif + +#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btopt_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_btopt_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_extDict); +} +#endif + +#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btultra_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); +} + +size_t ZSTD_compressBlock_btultra_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + const void* src, size_t srcSize) +{ + return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_extDict); +} +#endif + +/* note : no btultra2 variant for extDict nor dictMatchState, + * because btultra2 is not meant to work with dictionaries + * and is only specific for the first block (no prefix) */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.h new file mode 100644 index 0000000000..756c7b1d0c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_opt.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_OPT_H +#define ZSTD_OPT_H + +#include "zstd_compress_internal.h" + +#if !defined(ZSTD_EXCLUDE_BTLAZY2_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR) \ + || !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR) +/* used in ZSTD_loadDictionaryContent() */ +void ZSTD_updateTree(ZSTD_MatchState_t* ms, const BYTE* ip, const BYTE* iend); +#endif + +#ifndef ZSTD_EXCLUDE_BTOPT_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btopt( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_btopt_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_btopt_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#define ZSTD_COMPRESSBLOCK_BTOPT ZSTD_compressBlock_btopt +#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE ZSTD_compressBlock_btopt_dictMatchState +#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT ZSTD_compressBlock_btopt_extDict +#else +#define ZSTD_COMPRESSBLOCK_BTOPT NULL +#define ZSTD_COMPRESSBLOCK_BTOPT_DICTMATCHSTATE NULL +#define ZSTD_COMPRESSBLOCK_BTOPT_EXTDICT NULL +#endif + +#ifndef ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR +size_t ZSTD_compressBlock_btultra( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_btultra_dictMatchState( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); +size_t ZSTD_compressBlock_btultra_extDict( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + + /* note : no btultra2 variant for extDict nor dictMatchState, + * because btultra2 is not meant to work with dictionaries + * and is only specific for the first block (no prefix) */ +size_t ZSTD_compressBlock_btultra2( + ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], + void const* src, size_t srcSize); + +#define ZSTD_COMPRESSBLOCK_BTULTRA ZSTD_compressBlock_btultra +#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE ZSTD_compressBlock_btultra_dictMatchState +#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT ZSTD_compressBlock_btultra_extDict +#define ZSTD_COMPRESSBLOCK_BTULTRA2 ZSTD_compressBlock_btultra2 +#else +#define ZSTD_COMPRESSBLOCK_BTULTRA NULL +#define ZSTD_COMPRESSBLOCK_BTULTRA_DICTMATCHSTATE NULL +#define ZSTD_COMPRESSBLOCK_BTULTRA_EXTDICT NULL +#define ZSTD_COMPRESSBLOCK_BTULTRA2 NULL +#endif + +#endif /* ZSTD_OPT_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.c new file mode 100644 index 0000000000..d820c20ac2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.c @@ -0,0 +1,238 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "../common/compiler.h" /* ZSTD_ALIGNOF */ +#include "../common/mem.h" /* S64 */ +#include "../common/zstd_deps.h" /* ZSTD_memset */ +#include "../common/zstd_internal.h" /* ZSTD_STATIC_ASSERT */ +#include "hist.h" /* HIST_add */ +#include "zstd_preSplit.h" + + +#define BLOCKSIZE_MIN 3500 +#define THRESHOLD_PENALTY_RATE 16 +#define THRESHOLD_BASE (THRESHOLD_PENALTY_RATE - 2) +#define THRESHOLD_PENALTY 3 + +#define HASHLENGTH 2 +#define HASHLOG_MAX 10 +#define HASHTABLESIZE (1 << HASHLOG_MAX) +#define HASHMASK (HASHTABLESIZE - 1) +#define KNUTH 0x9e3779b9 + +/* for hashLog > 8, hash 2 bytes. + * for hashLog == 8, just take the byte, no hashing. + * The speed of this method relies on compile-time constant propagation */ +FORCE_INLINE_TEMPLATE unsigned hash2(const void *p, unsigned hashLog) +{ + assert(hashLog >= 8); + if (hashLog == 8) return (U32)((const BYTE*)p)[0]; + assert(hashLog <= HASHLOG_MAX); + return (U32)(MEM_read16(p)) * KNUTH >> (32 - hashLog); +} + + +typedef struct { + unsigned events[HASHTABLESIZE]; + size_t nbEvents; +} Fingerprint; +typedef struct { + Fingerprint pastEvents; + Fingerprint newEvents; +} FPStats; + +static void initStats(FPStats* fpstats) +{ + ZSTD_memset(fpstats, 0, sizeof(FPStats)); +} + +FORCE_INLINE_TEMPLATE void +addEvents_generic(Fingerprint* fp, const void* src, size_t srcSize, size_t samplingRate, unsigned hashLog) +{ + const char* p = (const char*)src; + size_t limit = srcSize - HASHLENGTH + 1; + size_t n; + assert(srcSize >= HASHLENGTH); + for (n = 0; n < limit; n+=samplingRate) { + fp->events[hash2(p+n, hashLog)]++; + } + fp->nbEvents += limit/samplingRate; +} + +FORCE_INLINE_TEMPLATE void +recordFingerprint_generic(Fingerprint* fp, const void* src, size_t srcSize, size_t samplingRate, unsigned hashLog) +{ + ZSTD_memset(fp, 0, sizeof(unsigned) * ((size_t)1 << hashLog)); + fp->nbEvents = 0; + addEvents_generic(fp, src, srcSize, samplingRate, hashLog); +} + +typedef void (*RecordEvents_f)(Fingerprint* fp, const void* src, size_t srcSize); + +#define FP_RECORD(_rate) ZSTD_recordFingerprint_##_rate + +#define ZSTD_GEN_RECORD_FINGERPRINT(_rate, _hSize) \ + static void FP_RECORD(_rate)(Fingerprint* fp, const void* src, size_t srcSize) \ + { \ + recordFingerprint_generic(fp, src, srcSize, _rate, _hSize); \ + } + +ZSTD_GEN_RECORD_FINGERPRINT(1, 10) +ZSTD_GEN_RECORD_FINGERPRINT(5, 10) +ZSTD_GEN_RECORD_FINGERPRINT(11, 9) +ZSTD_GEN_RECORD_FINGERPRINT(43, 8) + + +static U64 abs64(S64 s64) { return (U64)((s64 < 0) ? -s64 : s64); } + +static U64 fpDistance(const Fingerprint* fp1, const Fingerprint* fp2, unsigned hashLog) +{ + U64 distance = 0; + size_t n; + assert(hashLog <= HASHLOG_MAX); + for (n = 0; n < ((size_t)1 << hashLog); n++) { + distance += + abs64((S64)fp1->events[n] * (S64)fp2->nbEvents - (S64)fp2->events[n] * (S64)fp1->nbEvents); + } + return distance; +} + +/* Compare newEvents with pastEvents + * return 1 when considered "too different" + */ +static int compareFingerprints(const Fingerprint* ref, + const Fingerprint* newfp, + int penalty, + unsigned hashLog) +{ + assert(ref->nbEvents > 0); + assert(newfp->nbEvents > 0); + { U64 p50 = (U64)ref->nbEvents * (U64)newfp->nbEvents; + U64 deviation = fpDistance(ref, newfp, hashLog); + U64 threshold = p50 * (U64)(THRESHOLD_BASE + penalty) / THRESHOLD_PENALTY_RATE; + return deviation >= threshold; + } +} + +static void mergeEvents(Fingerprint* acc, const Fingerprint* newfp) +{ + size_t n; + for (n = 0; n < HASHTABLESIZE; n++) { + acc->events[n] += newfp->events[n]; + } + acc->nbEvents += newfp->nbEvents; +} + +static void flushEvents(FPStats* fpstats) +{ + size_t n; + for (n = 0; n < HASHTABLESIZE; n++) { + fpstats->pastEvents.events[n] = fpstats->newEvents.events[n]; + } + fpstats->pastEvents.nbEvents = fpstats->newEvents.nbEvents; + ZSTD_memset(&fpstats->newEvents, 0, sizeof(fpstats->newEvents)); +} + +static void removeEvents(Fingerprint* acc, const Fingerprint* slice) +{ + size_t n; + for (n = 0; n < HASHTABLESIZE; n++) { + assert(acc->events[n] >= slice->events[n]); + acc->events[n] -= slice->events[n]; + } + acc->nbEvents -= slice->nbEvents; +} + +#define CHUNKSIZE (8 << 10) +static size_t ZSTD_splitBlock_byChunks(const void* blockStart, size_t blockSize, + int level, + void* workspace, size_t wkspSize) +{ + static const RecordEvents_f records_fs[] = { + FP_RECORD(43), FP_RECORD(11), FP_RECORD(5), FP_RECORD(1) + }; + static const unsigned hashParams[] = { 8, 9, 10, 10 }; + const RecordEvents_f record_f = (assert(0<=level && level<=3), records_fs[level]); + FPStats* const fpstats = (FPStats*)workspace; + const char* p = (const char*)blockStart; + int penalty = THRESHOLD_PENALTY; + size_t pos = 0; + assert(blockSize == (128 << 10)); + assert(workspace != NULL); + assert((size_t)workspace % ZSTD_ALIGNOF(FPStats) == 0); + ZSTD_STATIC_ASSERT(ZSTD_SLIPBLOCK_WORKSPACESIZE >= sizeof(FPStats)); + assert(wkspSize >= sizeof(FPStats)); (void)wkspSize; + + initStats(fpstats); + record_f(&fpstats->pastEvents, p, CHUNKSIZE); + for (pos = CHUNKSIZE; pos <= blockSize - CHUNKSIZE; pos += CHUNKSIZE) { + record_f(&fpstats->newEvents, p + pos, CHUNKSIZE); + if (compareFingerprints(&fpstats->pastEvents, &fpstats->newEvents, penalty, hashParams[level])) { + return pos; + } else { + mergeEvents(&fpstats->pastEvents, &fpstats->newEvents); + if (penalty > 0) penalty--; + } + } + assert(pos == blockSize); + return blockSize; + (void)flushEvents; (void)removeEvents; +} + +/* ZSTD_splitBlock_fromBorders(): very fast strategy : + * compare fingerprint from beginning and end of the block, + * derive from their difference if it's preferable to split in the middle, + * repeat the process a second time, for finer grained decision. + * 3 times did not brought improvements, so I stopped at 2. + * Benefits are good enough for a cheap heuristic. + * More accurate splitting saves more, but speed impact is also more perceptible. + * For better accuracy, use more elaborate variant *_byChunks. + */ +static size_t ZSTD_splitBlock_fromBorders(const void* blockStart, size_t blockSize, + void* workspace, size_t wkspSize) +{ +#define SEGMENT_SIZE 512 + FPStats* const fpstats = (FPStats*)workspace; + Fingerprint* middleEvents = (Fingerprint*)(void*)((char*)workspace + 512 * sizeof(unsigned)); + assert(blockSize == (128 << 10)); + assert(workspace != NULL); + assert((size_t)workspace % ZSTD_ALIGNOF(FPStats) == 0); + ZSTD_STATIC_ASSERT(ZSTD_SLIPBLOCK_WORKSPACESIZE >= sizeof(FPStats)); + assert(wkspSize >= sizeof(FPStats)); (void)wkspSize; + + initStats(fpstats); + HIST_add(fpstats->pastEvents.events, blockStart, SEGMENT_SIZE); + HIST_add(fpstats->newEvents.events, (const char*)blockStart + blockSize - SEGMENT_SIZE, SEGMENT_SIZE); + fpstats->pastEvents.nbEvents = fpstats->newEvents.nbEvents = SEGMENT_SIZE; + if (!compareFingerprints(&fpstats->pastEvents, &fpstats->newEvents, 0, 8)) + return blockSize; + + HIST_add(middleEvents->events, (const char*)blockStart + blockSize/2 - SEGMENT_SIZE/2, SEGMENT_SIZE); + middleEvents->nbEvents = SEGMENT_SIZE; + { U64 const distFromBegin = fpDistance(&fpstats->pastEvents, middleEvents, 8); + U64 const distFromEnd = fpDistance(&fpstats->newEvents, middleEvents, 8); + U64 const minDistance = SEGMENT_SIZE * SEGMENT_SIZE / 3; + if (abs64((S64)distFromBegin - (S64)distFromEnd) < minDistance) + return 64 KB; + return (distFromBegin > distFromEnd) ? 32 KB : 96 KB; + } +} + +size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize, + int level, + void* workspace, size_t wkspSize) +{ + DEBUGLOG(6, "ZSTD_splitBlock (level=%i)", level); + assert(0<=level && level<=4); + if (level == 0) + return ZSTD_splitBlock_fromBorders(blockStart, blockSize, workspace, wkspSize); + /* level >= 1*/ + return ZSTD_splitBlock_byChunks(blockStart, blockSize, level-1, workspace, wkspSize); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.h new file mode 100644 index 0000000000..b89a200dcc --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstd_preSplit.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_PRESPLIT_H +#define ZSTD_PRESPLIT_H + +#include /* size_t */ + +#define ZSTD_SLIPBLOCK_WORKSPACESIZE 8208 + +/* ZSTD_splitBlock(): + * @level must be a value between 0 and 4. + * higher levels spend more energy to detect block boundaries. + * @workspace must be aligned for size_t. + * @wkspSize must be at least >= ZSTD_SLIPBLOCK_WORKSPACESIZE + * note: + * For the time being, this function only accepts full 128 KB blocks. + * Therefore, @blockSize must be == 128 KB. + * While this could be extended to smaller sizes in the future, + * it is not yet clear if this would be useful. TBD. + */ +size_t ZSTD_splitBlock(const void* blockStart, size_t blockSize, + int level, + void* workspace, size_t wkspSize); + +#endif /* ZSTD_PRESPLIT_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.c b/cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.c new file mode 100644 index 0000000000..0f1fe6d746 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.c @@ -0,0 +1,1923 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/* ====== Compiler specifics ====== */ +#if defined(_MSC_VER) +# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */ +#endif + + +/* ====== Dependencies ====== */ +#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customCalloc, ZSTD_customFree */ +#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memset, INT_MAX, UINT_MAX */ +#include "../common/mem.h" /* MEM_STATIC */ +#include "../common/pool.h" /* threadpool */ +#include "../common/threading.h" /* mutex */ +#include "zstd_compress_internal.h" /* MIN, ERROR, ZSTD_*, ZSTD_highbit32 */ +#include "zstd_ldm.h" +#include "zstdmt_compress.h" + +/* Guards code to support resizing the SeqPool. + * We will want to resize the SeqPool to save memory in the future. + * Until then, comment the code out since it is unused. + */ +#define ZSTD_RESIZE_SEQPOOL 0 + +/* ====== Debug ====== */ +#if defined(DEBUGLEVEL) && (DEBUGLEVEL>=2) \ + && !defined(_MSC_VER) \ + && !defined(__MINGW32__) + +# include +# include +# include + +# define DEBUG_PRINTHEX(l,p,n) \ + do { \ + unsigned debug_u; \ + for (debug_u=0; debug_u<(n); debug_u++) \ + RAWLOG(l, "%02X ", ((const unsigned char*)(p))[debug_u]); \ + RAWLOG(l, " \n"); \ + } while (0) + +static unsigned long long GetCurrentClockTimeMicroseconds(void) +{ + static clock_t _ticksPerSecond = 0; + if (_ticksPerSecond <= 0) _ticksPerSecond = sysconf(_SC_CLK_TCK); + + { struct tms junk; clock_t newTicks = (clock_t) times(&junk); + return ((((unsigned long long)newTicks)*(1000000))/_ticksPerSecond); +} } + +#define MUTEX_WAIT_TIME_DLEVEL 6 +#define ZSTD_PTHREAD_MUTEX_LOCK(mutex) \ + do { \ + if (DEBUGLEVEL >= MUTEX_WAIT_TIME_DLEVEL) { \ + unsigned long long const beforeTime = GetCurrentClockTimeMicroseconds(); \ + ZSTD_pthread_mutex_lock(mutex); \ + { unsigned long long const afterTime = GetCurrentClockTimeMicroseconds(); \ + unsigned long long const elapsedTime = (afterTime-beforeTime); \ + if (elapsedTime > 1000) { \ + /* or whatever threshold you like; I'm using 1 millisecond here */ \ + DEBUGLOG(MUTEX_WAIT_TIME_DLEVEL, \ + "Thread took %llu microseconds to acquire mutex %s \n", \ + elapsedTime, #mutex); \ + } } \ + } else { \ + ZSTD_pthread_mutex_lock(mutex); \ + } \ + } while (0) + +#else + +# define ZSTD_PTHREAD_MUTEX_LOCK(m) ZSTD_pthread_mutex_lock(m) +# define DEBUG_PRINTHEX(l,p,n) do { } while (0) + +#endif + + +/* ===== Buffer Pool ===== */ +/* a single Buffer Pool can be invoked from multiple threads in parallel */ + +typedef struct buffer_s { + void* start; + size_t capacity; +} Buffer; + +static const Buffer g_nullBuffer = { NULL, 0 }; + +typedef struct ZSTDMT_bufferPool_s { + ZSTD_pthread_mutex_t poolMutex; + size_t bufferSize; + unsigned totalBuffers; + unsigned nbBuffers; + ZSTD_customMem cMem; + Buffer* buffers; +} ZSTDMT_bufferPool; + +static void ZSTDMT_freeBufferPool(ZSTDMT_bufferPool* bufPool) +{ + DEBUGLOG(3, "ZSTDMT_freeBufferPool (address:%08X)", (U32)(size_t)bufPool); + if (!bufPool) return; /* compatibility with free on NULL */ + if (bufPool->buffers) { + unsigned u; + for (u=0; utotalBuffers; u++) { + DEBUGLOG(4, "free buffer %2u (address:%08X)", u, (U32)(size_t)bufPool->buffers[u].start); + ZSTD_customFree(bufPool->buffers[u].start, bufPool->cMem); + } + ZSTD_customFree(bufPool->buffers, bufPool->cMem); + } + ZSTD_pthread_mutex_destroy(&bufPool->poolMutex); + ZSTD_customFree(bufPool, bufPool->cMem); +} + +static ZSTDMT_bufferPool* ZSTDMT_createBufferPool(unsigned maxNbBuffers, ZSTD_customMem cMem) +{ + ZSTDMT_bufferPool* const bufPool = + (ZSTDMT_bufferPool*)ZSTD_customCalloc(sizeof(ZSTDMT_bufferPool), cMem); + if (bufPool==NULL) return NULL; + if (ZSTD_pthread_mutex_init(&bufPool->poolMutex, NULL)) { + ZSTD_customFree(bufPool, cMem); + return NULL; + } + bufPool->buffers = (Buffer*)ZSTD_customCalloc(maxNbBuffers * sizeof(Buffer), cMem); + if (bufPool->buffers==NULL) { + ZSTDMT_freeBufferPool(bufPool); + return NULL; + } + bufPool->bufferSize = 64 KB; + bufPool->totalBuffers = maxNbBuffers; + bufPool->nbBuffers = 0; + bufPool->cMem = cMem; + return bufPool; +} + +/* only works at initialization, not during compression */ +static size_t ZSTDMT_sizeof_bufferPool(ZSTDMT_bufferPool* bufPool) +{ + size_t const poolSize = sizeof(*bufPool); + size_t const arraySize = bufPool->totalBuffers * sizeof(Buffer); + unsigned u; + size_t totalBufferSize = 0; + ZSTD_pthread_mutex_lock(&bufPool->poolMutex); + for (u=0; utotalBuffers; u++) + totalBufferSize += bufPool->buffers[u].capacity; + ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); + + return poolSize + arraySize + totalBufferSize; +} + +/* ZSTDMT_setBufferSize() : + * all future buffers provided by this buffer pool will have _at least_ this size + * note : it's better for all buffers to have same size, + * as they become freely interchangeable, reducing malloc/free usages and memory fragmentation */ +static void ZSTDMT_setBufferSize(ZSTDMT_bufferPool* const bufPool, size_t const bSize) +{ + ZSTD_pthread_mutex_lock(&bufPool->poolMutex); + DEBUGLOG(4, "ZSTDMT_setBufferSize: bSize = %u", (U32)bSize); + bufPool->bufferSize = bSize; + ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); +} + + +static ZSTDMT_bufferPool* ZSTDMT_expandBufferPool(ZSTDMT_bufferPool* srcBufPool, unsigned maxNbBuffers) +{ + if (srcBufPool==NULL) return NULL; + if (srcBufPool->totalBuffers >= maxNbBuffers) /* good enough */ + return srcBufPool; + /* need a larger buffer pool */ + { ZSTD_customMem const cMem = srcBufPool->cMem; + size_t const bSize = srcBufPool->bufferSize; /* forward parameters */ + ZSTDMT_bufferPool* newBufPool; + ZSTDMT_freeBufferPool(srcBufPool); + newBufPool = ZSTDMT_createBufferPool(maxNbBuffers, cMem); + if (newBufPool==NULL) return newBufPool; + ZSTDMT_setBufferSize(newBufPool, bSize); + return newBufPool; + } +} + +/** ZSTDMT_getBuffer() : + * assumption : bufPool must be valid + * @return : a buffer, with start pointer and size + * note: allocation may fail, in this case, start==NULL and size==0 */ +static Buffer ZSTDMT_getBuffer(ZSTDMT_bufferPool* bufPool) +{ + size_t const bSize = bufPool->bufferSize; + DEBUGLOG(5, "ZSTDMT_getBuffer: bSize = %u", (U32)bufPool->bufferSize); + ZSTD_pthread_mutex_lock(&bufPool->poolMutex); + if (bufPool->nbBuffers) { /* try to use an existing buffer */ + Buffer const buf = bufPool->buffers[--(bufPool->nbBuffers)]; + size_t const availBufferSize = buf.capacity; + bufPool->buffers[bufPool->nbBuffers] = g_nullBuffer; + if ((availBufferSize >= bSize) & ((availBufferSize>>3) <= bSize)) { + /* large enough, but not too much */ + DEBUGLOG(5, "ZSTDMT_getBuffer: provide buffer %u of size %u", + bufPool->nbBuffers, (U32)buf.capacity); + ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); + return buf; + } + /* size conditions not respected : scratch this buffer, create new one */ + DEBUGLOG(5, "ZSTDMT_getBuffer: existing buffer does not meet size conditions => freeing"); + ZSTD_customFree(buf.start, bufPool->cMem); + } + ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); + /* create new buffer */ + DEBUGLOG(5, "ZSTDMT_getBuffer: create a new buffer"); + { Buffer buffer; + void* const start = ZSTD_customMalloc(bSize, bufPool->cMem); + buffer.start = start; /* note : start can be NULL if malloc fails ! */ + buffer.capacity = (start==NULL) ? 0 : bSize; + if (start==NULL) { + DEBUGLOG(5, "ZSTDMT_getBuffer: buffer allocation failure !!"); + } else { + DEBUGLOG(5, "ZSTDMT_getBuffer: created buffer of size %u", (U32)bSize); + } + return buffer; + } +} + +#if ZSTD_RESIZE_SEQPOOL +/** ZSTDMT_resizeBuffer() : + * assumption : bufPool must be valid + * @return : a buffer that is at least the buffer pool buffer size. + * If a reallocation happens, the data in the input buffer is copied. + */ +static Buffer ZSTDMT_resizeBuffer(ZSTDMT_bufferPool* bufPool, Buffer buffer) +{ + size_t const bSize = bufPool->bufferSize; + if (buffer.capacity < bSize) { + void* const start = ZSTD_customMalloc(bSize, bufPool->cMem); + Buffer newBuffer; + newBuffer.start = start; + newBuffer.capacity = start == NULL ? 0 : bSize; + if (start != NULL) { + assert(newBuffer.capacity >= buffer.capacity); + ZSTD_memcpy(newBuffer.start, buffer.start, buffer.capacity); + DEBUGLOG(5, "ZSTDMT_resizeBuffer: created buffer of size %u", (U32)bSize); + return newBuffer; + } + DEBUGLOG(5, "ZSTDMT_resizeBuffer: buffer allocation failure !!"); + } + return buffer; +} +#endif + +/* store buffer for later re-use, up to pool capacity */ +static void ZSTDMT_releaseBuffer(ZSTDMT_bufferPool* bufPool, Buffer buf) +{ + DEBUGLOG(5, "ZSTDMT_releaseBuffer"); + if (buf.start == NULL) return; /* compatible with release on NULL */ + ZSTD_pthread_mutex_lock(&bufPool->poolMutex); + if (bufPool->nbBuffers < bufPool->totalBuffers) { + bufPool->buffers[bufPool->nbBuffers++] = buf; /* stored for later use */ + DEBUGLOG(5, "ZSTDMT_releaseBuffer: stored buffer of size %u in slot %u", + (U32)buf.capacity, (U32)(bufPool->nbBuffers-1)); + ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); + return; + } + ZSTD_pthread_mutex_unlock(&bufPool->poolMutex); + /* Reached bufferPool capacity (note: should not happen) */ + DEBUGLOG(5, "ZSTDMT_releaseBuffer: pool capacity reached => freeing "); + ZSTD_customFree(buf.start, bufPool->cMem); +} + +/* We need 2 output buffers per worker since each dstBuff must be flushed after it is released. + * The 3 additional buffers are as follows: + * 1 buffer for input loading + * 1 buffer for "next input" when submitting current one + * 1 buffer stuck in queue */ +#define BUF_POOL_MAX_NB_BUFFERS(nbWorkers) (2*(nbWorkers) + 3) + +/* After a worker releases its rawSeqStore, it is immediately ready for reuse. + * So we only need one seq buffer per worker. */ +#define SEQ_POOL_MAX_NB_BUFFERS(nbWorkers) (nbWorkers) + +/* ===== Seq Pool Wrapper ====== */ + +typedef ZSTDMT_bufferPool ZSTDMT_seqPool; + +static size_t ZSTDMT_sizeof_seqPool(ZSTDMT_seqPool* seqPool) +{ + return ZSTDMT_sizeof_bufferPool(seqPool); +} + +static RawSeqStore_t bufferToSeq(Buffer buffer) +{ + RawSeqStore_t seq = kNullRawSeqStore; + seq.seq = (rawSeq*)buffer.start; + seq.capacity = buffer.capacity / sizeof(rawSeq); + return seq; +} + +static Buffer seqToBuffer(RawSeqStore_t seq) +{ + Buffer buffer; + buffer.start = seq.seq; + buffer.capacity = seq.capacity * sizeof(rawSeq); + return buffer; +} + +static RawSeqStore_t ZSTDMT_getSeq(ZSTDMT_seqPool* seqPool) +{ + if (seqPool->bufferSize == 0) { + return kNullRawSeqStore; + } + return bufferToSeq(ZSTDMT_getBuffer(seqPool)); +} + +#if ZSTD_RESIZE_SEQPOOL +static RawSeqStore_t ZSTDMT_resizeSeq(ZSTDMT_seqPool* seqPool, RawSeqStore_t seq) +{ + return bufferToSeq(ZSTDMT_resizeBuffer(seqPool, seqToBuffer(seq))); +} +#endif + +static void ZSTDMT_releaseSeq(ZSTDMT_seqPool* seqPool, RawSeqStore_t seq) +{ + ZSTDMT_releaseBuffer(seqPool, seqToBuffer(seq)); +} + +static void ZSTDMT_setNbSeq(ZSTDMT_seqPool* const seqPool, size_t const nbSeq) +{ + ZSTDMT_setBufferSize(seqPool, nbSeq * sizeof(rawSeq)); +} + +static ZSTDMT_seqPool* ZSTDMT_createSeqPool(unsigned nbWorkers, ZSTD_customMem cMem) +{ + ZSTDMT_seqPool* const seqPool = ZSTDMT_createBufferPool(SEQ_POOL_MAX_NB_BUFFERS(nbWorkers), cMem); + if (seqPool == NULL) return NULL; + ZSTDMT_setNbSeq(seqPool, 0); + return seqPool; +} + +static void ZSTDMT_freeSeqPool(ZSTDMT_seqPool* seqPool) +{ + ZSTDMT_freeBufferPool(seqPool); +} + +static ZSTDMT_seqPool* ZSTDMT_expandSeqPool(ZSTDMT_seqPool* pool, U32 nbWorkers) +{ + return ZSTDMT_expandBufferPool(pool, SEQ_POOL_MAX_NB_BUFFERS(nbWorkers)); +} + + +/* ===== CCtx Pool ===== */ +/* a single CCtx Pool can be invoked from multiple threads in parallel */ + +typedef struct { + ZSTD_pthread_mutex_t poolMutex; + int totalCCtx; + int availCCtx; + ZSTD_customMem cMem; + ZSTD_CCtx** cctxs; +} ZSTDMT_CCtxPool; + +/* note : all CCtx borrowed from the pool must be reverted back to the pool _before_ freeing the pool */ +static void ZSTDMT_freeCCtxPool(ZSTDMT_CCtxPool* pool) +{ + if (!pool) return; + ZSTD_pthread_mutex_destroy(&pool->poolMutex); + if (pool->cctxs) { + int cid; + for (cid=0; cidtotalCCtx; cid++) + ZSTD_freeCCtx(pool->cctxs[cid]); /* free compatible with NULL */ + ZSTD_customFree(pool->cctxs, pool->cMem); + } + ZSTD_customFree(pool, pool->cMem); +} + +/* ZSTDMT_createCCtxPool() : + * implies nbWorkers >= 1 , checked by caller ZSTDMT_createCCtx() */ +static ZSTDMT_CCtxPool* ZSTDMT_createCCtxPool(int nbWorkers, + ZSTD_customMem cMem) +{ + ZSTDMT_CCtxPool* const cctxPool = + (ZSTDMT_CCtxPool*) ZSTD_customCalloc(sizeof(ZSTDMT_CCtxPool), cMem); + assert(nbWorkers > 0); + if (!cctxPool) return NULL; + if (ZSTD_pthread_mutex_init(&cctxPool->poolMutex, NULL)) { + ZSTD_customFree(cctxPool, cMem); + return NULL; + } + cctxPool->totalCCtx = nbWorkers; + cctxPool->cctxs = (ZSTD_CCtx**)ZSTD_customCalloc(nbWorkers * sizeof(ZSTD_CCtx*), cMem); + if (!cctxPool->cctxs) { + ZSTDMT_freeCCtxPool(cctxPool); + return NULL; + } + cctxPool->cMem = cMem; + cctxPool->cctxs[0] = ZSTD_createCCtx_advanced(cMem); + if (!cctxPool->cctxs[0]) { ZSTDMT_freeCCtxPool(cctxPool); return NULL; } + cctxPool->availCCtx = 1; /* at least one cctx for single-thread mode */ + DEBUGLOG(3, "cctxPool created, with %u workers", nbWorkers); + return cctxPool; +} + +static ZSTDMT_CCtxPool* ZSTDMT_expandCCtxPool(ZSTDMT_CCtxPool* srcPool, + int nbWorkers) +{ + if (srcPool==NULL) return NULL; + if (nbWorkers <= srcPool->totalCCtx) return srcPool; /* good enough */ + /* need a larger cctx pool */ + { ZSTD_customMem const cMem = srcPool->cMem; + ZSTDMT_freeCCtxPool(srcPool); + return ZSTDMT_createCCtxPool(nbWorkers, cMem); + } +} + +/* only works during initialization phase, not during compression */ +static size_t ZSTDMT_sizeof_CCtxPool(ZSTDMT_CCtxPool* cctxPool) +{ + ZSTD_pthread_mutex_lock(&cctxPool->poolMutex); + { unsigned const nbWorkers = cctxPool->totalCCtx; + size_t const poolSize = sizeof(*cctxPool); + size_t const arraySize = cctxPool->totalCCtx * sizeof(ZSTD_CCtx*); + size_t totalCCtxSize = 0; + unsigned u; + for (u=0; ucctxs[u]); + } + ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex); + assert(nbWorkers > 0); + return poolSize + arraySize + totalCCtxSize; + } +} + +static ZSTD_CCtx* ZSTDMT_getCCtx(ZSTDMT_CCtxPool* cctxPool) +{ + DEBUGLOG(5, "ZSTDMT_getCCtx"); + ZSTD_pthread_mutex_lock(&cctxPool->poolMutex); + if (cctxPool->availCCtx) { + cctxPool->availCCtx--; + { ZSTD_CCtx* const cctx = cctxPool->cctxs[cctxPool->availCCtx]; + ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex); + return cctx; + } } + ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex); + DEBUGLOG(5, "create one more CCtx"); + return ZSTD_createCCtx_advanced(cctxPool->cMem); /* note : can be NULL, when creation fails ! */ +} + +static void ZSTDMT_releaseCCtx(ZSTDMT_CCtxPool* pool, ZSTD_CCtx* cctx) +{ + if (cctx==NULL) return; /* compatibility with release on NULL */ + ZSTD_pthread_mutex_lock(&pool->poolMutex); + if (pool->availCCtx < pool->totalCCtx) + pool->cctxs[pool->availCCtx++] = cctx; + else { + /* pool overflow : should not happen, since totalCCtx==nbWorkers */ + DEBUGLOG(4, "CCtx pool overflow : free cctx"); + ZSTD_freeCCtx(cctx); + } + ZSTD_pthread_mutex_unlock(&pool->poolMutex); +} + +/* ==== Serial State ==== */ + +typedef struct { + void const* start; + size_t size; +} Range; + +typedef struct { + /* All variables in the struct are protected by mutex. */ + ZSTD_pthread_mutex_t mutex; + ZSTD_pthread_cond_t cond; + ZSTD_CCtx_params params; + ldmState_t ldmState; + XXH64_state_t xxhState; + unsigned nextJobID; + /* Protects ldmWindow. + * Must be acquired after the main mutex when acquiring both. + */ + ZSTD_pthread_mutex_t ldmWindowMutex; + ZSTD_pthread_cond_t ldmWindowCond; /* Signaled when ldmWindow is updated */ + ZSTD_window_t ldmWindow; /* A thread-safe copy of ldmState.window */ +} SerialState; + +static int +ZSTDMT_serialState_reset(SerialState* serialState, + ZSTDMT_seqPool* seqPool, + ZSTD_CCtx_params params, + size_t jobSize, + const void* dict, size_t const dictSize, + ZSTD_dictContentType_e dictContentType) +{ + /* Adjust parameters */ + if (params.ldmParams.enableLdm == ZSTD_ps_enable) { + DEBUGLOG(4, "LDM window size = %u KB", (1U << params.cParams.windowLog) >> 10); + ZSTD_ldm_adjustParameters(¶ms.ldmParams, ¶ms.cParams); + assert(params.ldmParams.hashLog >= params.ldmParams.bucketSizeLog); + assert(params.ldmParams.hashRateLog < 32); + } else { + ZSTD_memset(¶ms.ldmParams, 0, sizeof(params.ldmParams)); + } + serialState->nextJobID = 0; + if (params.fParams.checksumFlag) + XXH64_reset(&serialState->xxhState, 0); + if (params.ldmParams.enableLdm == ZSTD_ps_enable) { + ZSTD_customMem cMem = params.customMem; + unsigned const hashLog = params.ldmParams.hashLog; + size_t const hashSize = ((size_t)1 << hashLog) * sizeof(ldmEntry_t); + unsigned const bucketLog = + params.ldmParams.hashLog - params.ldmParams.bucketSizeLog; + unsigned const prevBucketLog = + serialState->params.ldmParams.hashLog - + serialState->params.ldmParams.bucketSizeLog; + size_t const numBuckets = (size_t)1 << bucketLog; + /* Size the seq pool tables */ + ZSTDMT_setNbSeq(seqPool, ZSTD_ldm_getMaxNbSeq(params.ldmParams, jobSize)); + /* Reset the window */ + ZSTD_window_init(&serialState->ldmState.window); + /* Resize tables and output space if necessary. */ + if (serialState->ldmState.hashTable == NULL || serialState->params.ldmParams.hashLog < hashLog) { + ZSTD_customFree(serialState->ldmState.hashTable, cMem); + serialState->ldmState.hashTable = (ldmEntry_t*)ZSTD_customMalloc(hashSize, cMem); + } + if (serialState->ldmState.bucketOffsets == NULL || prevBucketLog < bucketLog) { + ZSTD_customFree(serialState->ldmState.bucketOffsets, cMem); + serialState->ldmState.bucketOffsets = (BYTE*)ZSTD_customMalloc(numBuckets, cMem); + } + if (!serialState->ldmState.hashTable || !serialState->ldmState.bucketOffsets) + return 1; + /* Zero the tables */ + ZSTD_memset(serialState->ldmState.hashTable, 0, hashSize); + ZSTD_memset(serialState->ldmState.bucketOffsets, 0, numBuckets); + + /* Update window state and fill hash table with dict */ + serialState->ldmState.loadedDictEnd = 0; + if (dictSize > 0) { + if (dictContentType == ZSTD_dct_rawContent) { + BYTE const* const dictEnd = (const BYTE*)dict + dictSize; + ZSTD_window_update(&serialState->ldmState.window, dict, dictSize, /* forceNonContiguous */ 0); + ZSTD_ldm_fillHashTable(&serialState->ldmState, (const BYTE*)dict, dictEnd, ¶ms.ldmParams); + serialState->ldmState.loadedDictEnd = params.forceWindow ? 0 : (U32)(dictEnd - serialState->ldmState.window.base); + } else { + /* don't even load anything */ + } + } + + /* Initialize serialState's copy of ldmWindow. */ + serialState->ldmWindow = serialState->ldmState.window; + } + + serialState->params = params; + serialState->params.jobSize = (U32)jobSize; + return 0; +} + +static int ZSTDMT_serialState_init(SerialState* serialState) +{ + int initError = 0; + ZSTD_memset(serialState, 0, sizeof(*serialState)); + initError |= ZSTD_pthread_mutex_init(&serialState->mutex, NULL); + initError |= ZSTD_pthread_cond_init(&serialState->cond, NULL); + initError |= ZSTD_pthread_mutex_init(&serialState->ldmWindowMutex, NULL); + initError |= ZSTD_pthread_cond_init(&serialState->ldmWindowCond, NULL); + return initError; +} + +static void ZSTDMT_serialState_free(SerialState* serialState) +{ + ZSTD_customMem cMem = serialState->params.customMem; + ZSTD_pthread_mutex_destroy(&serialState->mutex); + ZSTD_pthread_cond_destroy(&serialState->cond); + ZSTD_pthread_mutex_destroy(&serialState->ldmWindowMutex); + ZSTD_pthread_cond_destroy(&serialState->ldmWindowCond); + ZSTD_customFree(serialState->ldmState.hashTable, cMem); + ZSTD_customFree(serialState->ldmState.bucketOffsets, cMem); +} + +static void +ZSTDMT_serialState_genSequences(SerialState* serialState, + RawSeqStore_t* seqStore, + Range src, unsigned jobID) +{ + /* Wait for our turn */ + ZSTD_PTHREAD_MUTEX_LOCK(&serialState->mutex); + while (serialState->nextJobID < jobID) { + DEBUGLOG(5, "wait for serialState->cond"); + ZSTD_pthread_cond_wait(&serialState->cond, &serialState->mutex); + } + /* A future job may error and skip our job */ + if (serialState->nextJobID == jobID) { + /* It is now our turn, do any processing necessary */ + if (serialState->params.ldmParams.enableLdm == ZSTD_ps_enable) { + size_t error; + DEBUGLOG(6, "ZSTDMT_serialState_genSequences: LDM update"); + assert(seqStore->seq != NULL && seqStore->pos == 0 && + seqStore->size == 0 && seqStore->capacity > 0); + assert(src.size <= serialState->params.jobSize); + ZSTD_window_update(&serialState->ldmState.window, src.start, src.size, /* forceNonContiguous */ 0); + error = ZSTD_ldm_generateSequences( + &serialState->ldmState, seqStore, + &serialState->params.ldmParams, src.start, src.size); + /* We provide a large enough buffer to never fail. */ + assert(!ZSTD_isError(error)); (void)error; + /* Update ldmWindow to match the ldmState.window and signal the main + * thread if it is waiting for a buffer. + */ + ZSTD_PTHREAD_MUTEX_LOCK(&serialState->ldmWindowMutex); + serialState->ldmWindow = serialState->ldmState.window; + ZSTD_pthread_cond_signal(&serialState->ldmWindowCond); + ZSTD_pthread_mutex_unlock(&serialState->ldmWindowMutex); + } + if (serialState->params.fParams.checksumFlag && src.size > 0) + XXH64_update(&serialState->xxhState, src.start, src.size); + } + /* Now it is the next jobs turn */ + serialState->nextJobID++; + ZSTD_pthread_cond_broadcast(&serialState->cond); + ZSTD_pthread_mutex_unlock(&serialState->mutex); +} + +static void +ZSTDMT_serialState_applySequences(const SerialState* serialState, /* just for an assert() check */ + ZSTD_CCtx* jobCCtx, + const RawSeqStore_t* seqStore) +{ + if (seqStore->size > 0) { + DEBUGLOG(5, "ZSTDMT_serialState_applySequences: uploading %u external sequences", (unsigned)seqStore->size); + assert(serialState->params.ldmParams.enableLdm == ZSTD_ps_enable); (void)serialState; + assert(jobCCtx); + ZSTD_referenceExternalSequences(jobCCtx, seqStore->seq, seqStore->size); + } +} + +static void ZSTDMT_serialState_ensureFinished(SerialState* serialState, + unsigned jobID, size_t cSize) +{ + ZSTD_PTHREAD_MUTEX_LOCK(&serialState->mutex); + if (serialState->nextJobID <= jobID) { + assert(ZSTD_isError(cSize)); (void)cSize; + DEBUGLOG(5, "Skipping past job %u because of error", jobID); + serialState->nextJobID = jobID + 1; + ZSTD_pthread_cond_broadcast(&serialState->cond); + + ZSTD_PTHREAD_MUTEX_LOCK(&serialState->ldmWindowMutex); + ZSTD_window_clear(&serialState->ldmWindow); + ZSTD_pthread_cond_signal(&serialState->ldmWindowCond); + ZSTD_pthread_mutex_unlock(&serialState->ldmWindowMutex); + } + ZSTD_pthread_mutex_unlock(&serialState->mutex); + +} + + +/* ------------------------------------------ */ +/* ===== Worker thread ===== */ +/* ------------------------------------------ */ + +static const Range kNullRange = { NULL, 0 }; + +typedef struct { + size_t consumed; /* SHARED - set0 by mtctx, then modified by worker AND read by mtctx */ + size_t cSize; /* SHARED - set0 by mtctx, then modified by worker AND read by mtctx, then set0 by mtctx */ + ZSTD_pthread_mutex_t job_mutex; /* Thread-safe - used by mtctx and worker */ + ZSTD_pthread_cond_t job_cond; /* Thread-safe - used by mtctx and worker */ + ZSTDMT_CCtxPool* cctxPool; /* Thread-safe - used by mtctx and (all) workers */ + ZSTDMT_bufferPool* bufPool; /* Thread-safe - used by mtctx and (all) workers */ + ZSTDMT_seqPool* seqPool; /* Thread-safe - used by mtctx and (all) workers */ + SerialState* serial; /* Thread-safe - used by mtctx and (all) workers */ + Buffer dstBuff; /* set by worker (or mtctx), then read by worker & mtctx, then modified by mtctx => no barrier */ + Range prefix; /* set by mtctx, then read by worker & mtctx => no barrier */ + Range src; /* set by mtctx, then read by worker & mtctx => no barrier */ + unsigned jobID; /* set by mtctx, then read by worker => no barrier */ + unsigned firstJob; /* set by mtctx, then read by worker => no barrier */ + unsigned lastJob; /* set by mtctx, then read by worker => no barrier */ + ZSTD_CCtx_params params; /* set by mtctx, then read by worker => no barrier */ + const ZSTD_CDict* cdict; /* set by mtctx, then read by worker => no barrier */ + unsigned long long fullFrameSize; /* set by mtctx, then read by worker => no barrier */ + size_t dstFlushed; /* used only by mtctx */ + unsigned frameChecksumNeeded; /* used only by mtctx */ +} ZSTDMT_jobDescription; + +#define JOB_ERROR(e) \ + do { \ + ZSTD_PTHREAD_MUTEX_LOCK(&job->job_mutex); \ + job->cSize = e; \ + ZSTD_pthread_mutex_unlock(&job->job_mutex); \ + goto _endJob; \ + } while (0) + +/* ZSTDMT_compressionJob() is a POOL_function type */ +static void ZSTDMT_compressionJob(void* jobDescription) +{ + ZSTDMT_jobDescription* const job = (ZSTDMT_jobDescription*)jobDescription; + ZSTD_CCtx_params jobParams = job->params; /* do not modify job->params ! copy it, modify the copy */ + ZSTD_CCtx* const cctx = ZSTDMT_getCCtx(job->cctxPool); + RawSeqStore_t rawSeqStore = ZSTDMT_getSeq(job->seqPool); + Buffer dstBuff = job->dstBuff; + size_t lastCBlockSize = 0; + + DEBUGLOG(5, "ZSTDMT_compressionJob: job %u", job->jobID); + /* resources */ + if (cctx==NULL) JOB_ERROR(ERROR(memory_allocation)); + if (dstBuff.start == NULL) { /* streaming job : doesn't provide a dstBuffer */ + dstBuff = ZSTDMT_getBuffer(job->bufPool); + if (dstBuff.start==NULL) JOB_ERROR(ERROR(memory_allocation)); + job->dstBuff = dstBuff; /* this value can be read in ZSTDMT_flush, when it copies the whole job */ + } + if (jobParams.ldmParams.enableLdm == ZSTD_ps_enable && rawSeqStore.seq == NULL) + JOB_ERROR(ERROR(memory_allocation)); + + /* Don't compute the checksum for chunks, since we compute it externally, + * but write it in the header. + */ + if (job->jobID != 0) jobParams.fParams.checksumFlag = 0; + /* Don't run LDM for the chunks, since we handle it externally */ + jobParams.ldmParams.enableLdm = ZSTD_ps_disable; + /* Correct nbWorkers to 0. */ + jobParams.nbWorkers = 0; + + + /* init */ + + /* Perform serial step as early as possible */ + ZSTDMT_serialState_genSequences(job->serial, &rawSeqStore, job->src, job->jobID); + + if (job->cdict) { + size_t const initError = ZSTD_compressBegin_advanced_internal(cctx, NULL, 0, ZSTD_dct_auto, ZSTD_dtlm_fast, job->cdict, &jobParams, job->fullFrameSize); + assert(job->firstJob); /* only allowed for first job */ + if (ZSTD_isError(initError)) JOB_ERROR(initError); + } else { + U64 const pledgedSrcSize = job->firstJob ? job->fullFrameSize : job->src.size; + { size_t const forceWindowError = ZSTD_CCtxParams_setParameter(&jobParams, ZSTD_c_forceMaxWindow, !job->firstJob); + if (ZSTD_isError(forceWindowError)) JOB_ERROR(forceWindowError); + } + if (!job->firstJob) { + size_t const err = ZSTD_CCtxParams_setParameter(&jobParams, ZSTD_c_deterministicRefPrefix, 0); + if (ZSTD_isError(err)) JOB_ERROR(err); + } + DEBUGLOG(6, "ZSTDMT_compressionJob: job %u: loading prefix of size %zu", job->jobID, job->prefix.size); + { size_t const initError = ZSTD_compressBegin_advanced_internal(cctx, + job->prefix.start, job->prefix.size, ZSTD_dct_rawContent, + ZSTD_dtlm_fast, + NULL, /*cdict*/ + &jobParams, pledgedSrcSize); + if (ZSTD_isError(initError)) JOB_ERROR(initError); + } } + + /* External Sequences can only be applied after CCtx initialization */ + ZSTDMT_serialState_applySequences(job->serial, cctx, &rawSeqStore); + + if (!job->firstJob) { /* flush and overwrite frame header when it's not first job */ + size_t const hSize = ZSTD_compressContinue_public(cctx, dstBuff.start, dstBuff.capacity, job->src.start, 0); + if (ZSTD_isError(hSize)) JOB_ERROR(hSize); + DEBUGLOG(5, "ZSTDMT_compressionJob: flush and overwrite %u bytes of frame header (not first job)", (U32)hSize); + ZSTD_invalidateRepCodes(cctx); + } + + /* compress the entire job by smaller chunks, for better granularity */ + { size_t const chunkSize = 4*ZSTD_BLOCKSIZE_MAX; + int const nbChunks = (int)((job->src.size + (chunkSize-1)) / chunkSize); + const BYTE* ip = (const BYTE*) job->src.start; + BYTE* const ostart = (BYTE*)dstBuff.start; + BYTE* op = ostart; + BYTE* oend = op + dstBuff.capacity; + int chunkNb; + if (sizeof(size_t) > sizeof(int)) assert(job->src.size < ((size_t)INT_MAX) * chunkSize); /* check overflow */ + DEBUGLOG(5, "ZSTDMT_compressionJob: compress %u bytes in %i blocks", (U32)job->src.size, nbChunks); + assert(job->cSize == 0); + for (chunkNb = 1; chunkNb < nbChunks; chunkNb++) { + size_t const cSize = ZSTD_compressContinue_public(cctx, op, oend-op, ip, chunkSize); + if (ZSTD_isError(cSize)) JOB_ERROR(cSize); + ip += chunkSize; + op += cSize; assert(op < oend); + /* stats */ + ZSTD_PTHREAD_MUTEX_LOCK(&job->job_mutex); + job->cSize += cSize; + job->consumed = chunkSize * chunkNb; + DEBUGLOG(5, "ZSTDMT_compressionJob: compress new block : cSize==%u bytes (total: %u)", + (U32)cSize, (U32)job->cSize); + ZSTD_pthread_cond_signal(&job->job_cond); /* warns some more data is ready to be flushed */ + ZSTD_pthread_mutex_unlock(&job->job_mutex); + } + /* last block */ + assert(chunkSize > 0); + assert((chunkSize & (chunkSize - 1)) == 0); /* chunkSize must be power of 2 for mask==(chunkSize-1) to work */ + if ((nbChunks > 0) | job->lastJob /*must output a "last block" flag*/ ) { + size_t const lastBlockSize1 = job->src.size & (chunkSize-1); + size_t const lastBlockSize = ((lastBlockSize1==0) & (job->src.size>=chunkSize)) ? chunkSize : lastBlockSize1; + size_t const cSize = (job->lastJob) ? + ZSTD_compressEnd_public(cctx, op, oend-op, ip, lastBlockSize) : + ZSTD_compressContinue_public(cctx, op, oend-op, ip, lastBlockSize); + if (ZSTD_isError(cSize)) JOB_ERROR(cSize); + lastCBlockSize = cSize; + } } + if (!job->firstJob) { + /* Double check that we don't have an ext-dict, because then our + * repcode invalidation doesn't work. + */ + assert(!ZSTD_window_hasExtDict(cctx->blockState.matchState.window)); + } + ZSTD_CCtx_trace(cctx, 0); + +_endJob: + ZSTDMT_serialState_ensureFinished(job->serial, job->jobID, job->cSize); + if (job->prefix.size > 0) + DEBUGLOG(5, "Finished with prefix: %zx", (size_t)job->prefix.start); + DEBUGLOG(5, "Finished with source: %zx", (size_t)job->src.start); + /* release resources */ + ZSTDMT_releaseSeq(job->seqPool, rawSeqStore); + ZSTDMT_releaseCCtx(job->cctxPool, cctx); + /* report */ + ZSTD_PTHREAD_MUTEX_LOCK(&job->job_mutex); + if (ZSTD_isError(job->cSize)) assert(lastCBlockSize == 0); + job->cSize += lastCBlockSize; + job->consumed = job->src.size; /* when job->consumed == job->src.size , compression job is presumed completed */ + ZSTD_pthread_cond_signal(&job->job_cond); + ZSTD_pthread_mutex_unlock(&job->job_mutex); +} + + +/* ------------------------------------------ */ +/* ===== Multi-threaded compression ===== */ +/* ------------------------------------------ */ + +typedef struct { + Range prefix; /* read-only non-owned prefix buffer */ + Buffer buffer; + size_t filled; +} InBuff_t; + +typedef struct { + BYTE* buffer; /* The round input buffer. All jobs get references + * to pieces of the buffer. ZSTDMT_tryGetInputRange() + * handles handing out job input buffers, and makes + * sure it doesn't overlap with any pieces still in use. + */ + size_t capacity; /* The capacity of buffer. */ + size_t pos; /* The position of the current inBuff in the round + * buffer. Updated past the end if the inBuff once + * the inBuff is sent to the worker thread. + * pos <= capacity. + */ +} RoundBuff_t; + +static const RoundBuff_t kNullRoundBuff = {NULL, 0, 0}; + +#define RSYNC_LENGTH 32 +/* Don't create chunks smaller than the zstd block size. + * This stops us from regressing compression ratio too much, + * and ensures our output fits in ZSTD_compressBound(). + * + * If this is shrunk < ZSTD_BLOCKSIZELOG_MIN then + * ZSTD_COMPRESSBOUND() will need to be updated. + */ +#define RSYNC_MIN_BLOCK_LOG ZSTD_BLOCKSIZELOG_MAX +#define RSYNC_MIN_BLOCK_SIZE (1< one job is already prepared, but pool has shortage of workers. Don't create a new job. */ + InBuff_t inBuff; + RoundBuff_t roundBuff; + SerialState serial; + RSyncState_t rsync; + unsigned jobIDMask; + unsigned doneJobID; + unsigned nextJobID; + unsigned frameEnded; + unsigned allJobsCompleted; + unsigned long long frameContentSize; + unsigned long long consumed; + unsigned long long produced; + ZSTD_customMem cMem; + ZSTD_CDict* cdictLocal; + const ZSTD_CDict* cdict; + unsigned providedFactory: 1; +}; + +static void ZSTDMT_freeJobsTable(ZSTDMT_jobDescription* jobTable, U32 nbJobs, ZSTD_customMem cMem) +{ + U32 jobNb; + if (jobTable == NULL) return; + for (jobNb=0; jobNb mtctx->jobIDMask+1) { /* need more job capacity */ + ZSTDMT_freeJobsTable(mtctx->jobs, mtctx->jobIDMask+1, mtctx->cMem); + mtctx->jobIDMask = 0; + mtctx->jobs = ZSTDMT_createJobsTable(&nbJobs, mtctx->cMem); + if (mtctx->jobs==NULL) return ERROR(memory_allocation); + assert((nbJobs != 0) && ((nbJobs & (nbJobs - 1)) == 0)); /* ensure nbJobs is a power of 2 */ + mtctx->jobIDMask = nbJobs - 1; + } + return 0; +} + + +/* ZSTDMT_CCtxParam_setNbWorkers(): + * Internal use only */ +static size_t ZSTDMT_CCtxParam_setNbWorkers(ZSTD_CCtx_params* params, unsigned nbWorkers) +{ + return ZSTD_CCtxParams_setParameter(params, ZSTD_c_nbWorkers, (int)nbWorkers); +} + +MEM_STATIC ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced_internal(unsigned nbWorkers, ZSTD_customMem cMem, ZSTD_threadPool* pool) +{ + ZSTDMT_CCtx* mtctx; + U32 nbJobs = nbWorkers + 2; + int initError; + DEBUGLOG(3, "ZSTDMT_createCCtx_advanced (nbWorkers = %u)", nbWorkers); + + if (nbWorkers < 1) return NULL; + nbWorkers = MIN(nbWorkers , ZSTDMT_NBWORKERS_MAX); + if ((cMem.customAlloc!=NULL) ^ (cMem.customFree!=NULL)) + /* invalid custom allocator */ + return NULL; + + mtctx = (ZSTDMT_CCtx*) ZSTD_customCalloc(sizeof(ZSTDMT_CCtx), cMem); + if (!mtctx) return NULL; + ZSTDMT_CCtxParam_setNbWorkers(&mtctx->params, nbWorkers); + mtctx->cMem = cMem; + mtctx->allJobsCompleted = 1; + if (pool != NULL) { + mtctx->factory = pool; + mtctx->providedFactory = 1; + } + else { + mtctx->factory = POOL_create_advanced(nbWorkers, 0, cMem); + mtctx->providedFactory = 0; + } + mtctx->jobs = ZSTDMT_createJobsTable(&nbJobs, cMem); + assert(nbJobs > 0); assert((nbJobs & (nbJobs - 1)) == 0); /* ensure nbJobs is a power of 2 */ + mtctx->jobIDMask = nbJobs - 1; + mtctx->bufPool = ZSTDMT_createBufferPool(BUF_POOL_MAX_NB_BUFFERS(nbWorkers), cMem); + mtctx->cctxPool = ZSTDMT_createCCtxPool(nbWorkers, cMem); + mtctx->seqPool = ZSTDMT_createSeqPool(nbWorkers, cMem); + initError = ZSTDMT_serialState_init(&mtctx->serial); + mtctx->roundBuff = kNullRoundBuff; + if (!mtctx->factory | !mtctx->jobs | !mtctx->bufPool | !mtctx->cctxPool | !mtctx->seqPool | initError) { + ZSTDMT_freeCCtx(mtctx); + return NULL; + } + DEBUGLOG(3, "mt_cctx created, for %u threads", nbWorkers); + return mtctx; +} + +ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbWorkers, ZSTD_customMem cMem, ZSTD_threadPool* pool) +{ +#ifdef ZSTD_MULTITHREAD + return ZSTDMT_createCCtx_advanced_internal(nbWorkers, cMem, pool); +#else + (void)nbWorkers; + (void)cMem; + (void)pool; + return NULL; +#endif +} + + +/* ZSTDMT_releaseAllJobResources() : + * note : ensure all workers are killed first ! */ +static void ZSTDMT_releaseAllJobResources(ZSTDMT_CCtx* mtctx) +{ + unsigned jobID; + DEBUGLOG(3, "ZSTDMT_releaseAllJobResources"); + for (jobID=0; jobID <= mtctx->jobIDMask; jobID++) { + /* Copy the mutex/cond out */ + ZSTD_pthread_mutex_t const mutex = mtctx->jobs[jobID].job_mutex; + ZSTD_pthread_cond_t const cond = mtctx->jobs[jobID].job_cond; + + DEBUGLOG(4, "job%02u: release dst address %08X", jobID, (U32)(size_t)mtctx->jobs[jobID].dstBuff.start); + ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[jobID].dstBuff); + + /* Clear the job description, but keep the mutex/cond */ + ZSTD_memset(&mtctx->jobs[jobID], 0, sizeof(mtctx->jobs[jobID])); + mtctx->jobs[jobID].job_mutex = mutex; + mtctx->jobs[jobID].job_cond = cond; + } + mtctx->inBuff.buffer = g_nullBuffer; + mtctx->inBuff.filled = 0; + mtctx->allJobsCompleted = 1; +} + +static void ZSTDMT_waitForAllJobsCompleted(ZSTDMT_CCtx* mtctx) +{ + DEBUGLOG(4, "ZSTDMT_waitForAllJobsCompleted"); + while (mtctx->doneJobID < mtctx->nextJobID) { + unsigned const jobID = mtctx->doneJobID & mtctx->jobIDMask; + ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[jobID].job_mutex); + while (mtctx->jobs[jobID].consumed < mtctx->jobs[jobID].src.size) { + DEBUGLOG(4, "waiting for jobCompleted signal from job %u", mtctx->doneJobID); /* we want to block when waiting for data to flush */ + ZSTD_pthread_cond_wait(&mtctx->jobs[jobID].job_cond, &mtctx->jobs[jobID].job_mutex); + } + ZSTD_pthread_mutex_unlock(&mtctx->jobs[jobID].job_mutex); + mtctx->doneJobID++; + } +} + +size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* mtctx) +{ + if (mtctx==NULL) return 0; /* compatible with free on NULL */ + if (!mtctx->providedFactory) + POOL_free(mtctx->factory); /* stop and free worker threads */ + ZSTDMT_releaseAllJobResources(mtctx); /* release job resources into pools first */ + ZSTDMT_freeJobsTable(mtctx->jobs, mtctx->jobIDMask+1, mtctx->cMem); + ZSTDMT_freeBufferPool(mtctx->bufPool); + ZSTDMT_freeCCtxPool(mtctx->cctxPool); + ZSTDMT_freeSeqPool(mtctx->seqPool); + ZSTDMT_serialState_free(&mtctx->serial); + ZSTD_freeCDict(mtctx->cdictLocal); + if (mtctx->roundBuff.buffer) + ZSTD_customFree(mtctx->roundBuff.buffer, mtctx->cMem); + ZSTD_customFree(mtctx, mtctx->cMem); + return 0; +} + +size_t ZSTDMT_sizeof_CCtx(ZSTDMT_CCtx* mtctx) +{ + if (mtctx == NULL) return 0; /* supports sizeof NULL */ + return sizeof(*mtctx) + + POOL_sizeof(mtctx->factory) + + ZSTDMT_sizeof_bufferPool(mtctx->bufPool) + + (mtctx->jobIDMask+1) * sizeof(ZSTDMT_jobDescription) + + ZSTDMT_sizeof_CCtxPool(mtctx->cctxPool) + + ZSTDMT_sizeof_seqPool(mtctx->seqPool) + + ZSTD_sizeof_CDict(mtctx->cdictLocal) + + mtctx->roundBuff.capacity; +} + + +/* ZSTDMT_resize() : + * @return : error code if fails, 0 on success */ +static size_t ZSTDMT_resize(ZSTDMT_CCtx* mtctx, unsigned nbWorkers) +{ + if (POOL_resize(mtctx->factory, nbWorkers)) return ERROR(memory_allocation); + FORWARD_IF_ERROR( ZSTDMT_expandJobsTable(mtctx, nbWorkers) , ""); + mtctx->bufPool = ZSTDMT_expandBufferPool(mtctx->bufPool, BUF_POOL_MAX_NB_BUFFERS(nbWorkers)); + if (mtctx->bufPool == NULL) return ERROR(memory_allocation); + mtctx->cctxPool = ZSTDMT_expandCCtxPool(mtctx->cctxPool, nbWorkers); + if (mtctx->cctxPool == NULL) return ERROR(memory_allocation); + mtctx->seqPool = ZSTDMT_expandSeqPool(mtctx->seqPool, nbWorkers); + if (mtctx->seqPool == NULL) return ERROR(memory_allocation); + ZSTDMT_CCtxParam_setNbWorkers(&mtctx->params, nbWorkers); + return 0; +} + + +/*! ZSTDMT_updateCParams_whileCompressing() : + * Updates a selected set of compression parameters, remaining compatible with currently active frame. + * New parameters will be applied to next compression job. */ +void ZSTDMT_updateCParams_whileCompressing(ZSTDMT_CCtx* mtctx, const ZSTD_CCtx_params* cctxParams) +{ + U32 const saved_wlog = mtctx->params.cParams.windowLog; /* Do not modify windowLog while compressing */ + int const compressionLevel = cctxParams->compressionLevel; + DEBUGLOG(5, "ZSTDMT_updateCParams_whileCompressing (level:%i)", + compressionLevel); + mtctx->params.compressionLevel = compressionLevel; + { ZSTD_compressionParameters cParams = ZSTD_getCParamsFromCCtxParams(cctxParams, ZSTD_CONTENTSIZE_UNKNOWN, 0, ZSTD_cpm_noAttachDict); + cParams.windowLog = saved_wlog; + mtctx->params.cParams = cParams; + } +} + +/* ZSTDMT_getFrameProgression(): + * tells how much data has been consumed (input) and produced (output) for current frame. + * able to count progression inside worker threads. + * Note : mutex will be acquired during statistics collection inside workers. */ +ZSTD_frameProgression ZSTDMT_getFrameProgression(ZSTDMT_CCtx* mtctx) +{ + ZSTD_frameProgression fps; + DEBUGLOG(5, "ZSTDMT_getFrameProgression"); + fps.ingested = mtctx->consumed + mtctx->inBuff.filled; + fps.consumed = mtctx->consumed; + fps.produced = fps.flushed = mtctx->produced; + fps.currentJobID = mtctx->nextJobID; + fps.nbActiveWorkers = 0; + { unsigned jobNb; + unsigned lastJobNb = mtctx->nextJobID + mtctx->jobReady; assert(mtctx->jobReady <= 1); + DEBUGLOG(6, "ZSTDMT_getFrameProgression: jobs: from %u to <%u (jobReady:%u)", + mtctx->doneJobID, lastJobNb, mtctx->jobReady); + for (jobNb = mtctx->doneJobID ; jobNb < lastJobNb ; jobNb++) { + unsigned const wJobID = jobNb & mtctx->jobIDMask; + ZSTDMT_jobDescription* jobPtr = &mtctx->jobs[wJobID]; + ZSTD_pthread_mutex_lock(&jobPtr->job_mutex); + { size_t const cResult = jobPtr->cSize; + size_t const produced = ZSTD_isError(cResult) ? 0 : cResult; + size_t const flushed = ZSTD_isError(cResult) ? 0 : jobPtr->dstFlushed; + assert(flushed <= produced); + fps.ingested += jobPtr->src.size; + fps.consumed += jobPtr->consumed; + fps.produced += produced; + fps.flushed += flushed; + fps.nbActiveWorkers += (jobPtr->consumed < jobPtr->src.size); + } + ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); + } + } + return fps; +} + + +size_t ZSTDMT_toFlushNow(ZSTDMT_CCtx* mtctx) +{ + size_t toFlush; + unsigned const jobID = mtctx->doneJobID; + assert(jobID <= mtctx->nextJobID); + if (jobID == mtctx->nextJobID) return 0; /* no active job => nothing to flush */ + + /* look into oldest non-fully-flushed job */ + { unsigned const wJobID = jobID & mtctx->jobIDMask; + ZSTDMT_jobDescription* const jobPtr = &mtctx->jobs[wJobID]; + ZSTD_pthread_mutex_lock(&jobPtr->job_mutex); + { size_t const cResult = jobPtr->cSize; + size_t const produced = ZSTD_isError(cResult) ? 0 : cResult; + size_t const flushed = ZSTD_isError(cResult) ? 0 : jobPtr->dstFlushed; + assert(flushed <= produced); + assert(jobPtr->consumed <= jobPtr->src.size); + toFlush = produced - flushed; + /* if toFlush==0, nothing is available to flush. + * However, jobID is expected to still be active: + * if jobID was already completed and fully flushed, + * ZSTDMT_flushProduced() should have already moved onto next job. + * Therefore, some input has not yet been consumed. */ + if (toFlush==0) { + assert(jobPtr->consumed < jobPtr->src.size); + } + } + ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); + } + + return toFlush; +} + + +/* ------------------------------------------ */ +/* ===== Multi-threaded compression ===== */ +/* ------------------------------------------ */ + +static unsigned ZSTDMT_computeTargetJobLog(const ZSTD_CCtx_params* params) +{ + unsigned jobLog; + if (params->ldmParams.enableLdm == ZSTD_ps_enable) { + /* In Long Range Mode, the windowLog is typically oversized. + * In which case, it's preferable to determine the jobSize + * based on cycleLog instead. */ + jobLog = MAX(21, ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy) + 3); + } else { + jobLog = MAX(20, params->cParams.windowLog + 2); + } + return MIN(jobLog, (unsigned)ZSTDMT_JOBLOG_MAX); +} + +static int ZSTDMT_overlapLog_default(ZSTD_strategy strat) +{ + switch(strat) + { + case ZSTD_btultra2: + return 9; + case ZSTD_btultra: + case ZSTD_btopt: + return 8; + case ZSTD_btlazy2: + case ZSTD_lazy2: + return 7; + case ZSTD_lazy: + case ZSTD_greedy: + case ZSTD_dfast: + case ZSTD_fast: + default:; + } + return 6; +} + +static int ZSTDMT_overlapLog(int ovlog, ZSTD_strategy strat) +{ + assert(0 <= ovlog && ovlog <= 9); + if (ovlog == 0) return ZSTDMT_overlapLog_default(strat); + return ovlog; +} + +static size_t ZSTDMT_computeOverlapSize(const ZSTD_CCtx_params* params) +{ + int const overlapRLog = 9 - ZSTDMT_overlapLog(params->overlapLog, params->cParams.strategy); + int ovLog = (overlapRLog >= 8) ? 0 : (params->cParams.windowLog - overlapRLog); + assert(0 <= overlapRLog && overlapRLog <= 8); + if (params->ldmParams.enableLdm == ZSTD_ps_enable) { + /* In Long Range Mode, the windowLog is typically oversized. + * In which case, it's preferable to determine the jobSize + * based on chainLog instead. + * Then, ovLog becomes a fraction of the jobSize, rather than windowSize */ + ovLog = MIN(params->cParams.windowLog, ZSTDMT_computeTargetJobLog(params) - 2) + - overlapRLog; + } + assert(0 <= ovLog && ovLog <= ZSTD_WINDOWLOG_MAX); + DEBUGLOG(4, "overlapLog : %i", params->overlapLog); + DEBUGLOG(4, "overlap size : %i", 1 << ovLog); + return (ovLog==0) ? 0 : (size_t)1 << ovLog; +} + +/* ====================================== */ +/* ======= Streaming API ======= */ +/* ====================================== */ + +size_t ZSTDMT_initCStream_internal( + ZSTDMT_CCtx* mtctx, + const void* dict, size_t dictSize, ZSTD_dictContentType_e dictContentType, + const ZSTD_CDict* cdict, ZSTD_CCtx_params params, + unsigned long long pledgedSrcSize) +{ + DEBUGLOG(4, "ZSTDMT_initCStream_internal (pledgedSrcSize=%u, nbWorkers=%u, cctxPool=%u)", + (U32)pledgedSrcSize, params.nbWorkers, mtctx->cctxPool->totalCCtx); + + /* params supposed partially fully validated at this point */ + assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams))); + assert(!((dict) && (cdict))); /* either dict or cdict, not both */ + + /* init */ + if (params.nbWorkers != mtctx->params.nbWorkers) + FORWARD_IF_ERROR( ZSTDMT_resize(mtctx, (unsigned)params.nbWorkers) , ""); + + if (params.jobSize != 0 && params.jobSize < ZSTDMT_JOBSIZE_MIN) params.jobSize = ZSTDMT_JOBSIZE_MIN; + if (params.jobSize > (size_t)ZSTDMT_JOBSIZE_MAX) params.jobSize = (size_t)ZSTDMT_JOBSIZE_MAX; + + if (mtctx->allJobsCompleted == 0) { /* previous compression not correctly finished */ + ZSTDMT_waitForAllJobsCompleted(mtctx); + ZSTDMT_releaseAllJobResources(mtctx); + mtctx->allJobsCompleted = 1; + } + + mtctx->params = params; + mtctx->frameContentSize = pledgedSrcSize; + ZSTD_freeCDict(mtctx->cdictLocal); + if (dict) { + mtctx->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize, + ZSTD_dlm_byCopy, dictContentType, /* note : a loadPrefix becomes an internal CDict */ + params.cParams, mtctx->cMem); + mtctx->cdict = mtctx->cdictLocal; + if (mtctx->cdictLocal == NULL) return ERROR(memory_allocation); + } else { + mtctx->cdictLocal = NULL; + mtctx->cdict = cdict; + } + + mtctx->targetPrefixSize = ZSTDMT_computeOverlapSize(¶ms); + DEBUGLOG(4, "overlapLog=%i => %u KB", params.overlapLog, (U32)(mtctx->targetPrefixSize>>10)); + mtctx->targetSectionSize = params.jobSize; + if (mtctx->targetSectionSize == 0) { + mtctx->targetSectionSize = 1ULL << ZSTDMT_computeTargetJobLog(¶ms); + } + assert(mtctx->targetSectionSize <= (size_t)ZSTDMT_JOBSIZE_MAX); + + if (params.rsyncable) { + /* Aim for the targetsectionSize as the average job size. */ + U32 const jobSizeKB = (U32)(mtctx->targetSectionSize >> 10); + U32 const rsyncBits = (assert(jobSizeKB >= 1), ZSTD_highbit32(jobSizeKB) + 10); + /* We refuse to create jobs < RSYNC_MIN_BLOCK_SIZE bytes, so make sure our + * expected job size is at least 4x larger. */ + assert(rsyncBits >= RSYNC_MIN_BLOCK_LOG + 2); + DEBUGLOG(4, "rsyncLog = %u", rsyncBits); + mtctx->rsync.hash = 0; + mtctx->rsync.hitMask = (1ULL << rsyncBits) - 1; + mtctx->rsync.primePower = ZSTD_rollingHash_primePower(RSYNC_LENGTH); + } + if (mtctx->targetSectionSize < mtctx->targetPrefixSize) mtctx->targetSectionSize = mtctx->targetPrefixSize; /* job size must be >= overlap size */ + DEBUGLOG(4, "Job Size : %u KB (note : set to %u)", (U32)(mtctx->targetSectionSize>>10), (U32)params.jobSize); + DEBUGLOG(4, "inBuff Size : %u KB", (U32)(mtctx->targetSectionSize>>10)); + ZSTDMT_setBufferSize(mtctx->bufPool, ZSTD_compressBound(mtctx->targetSectionSize)); + { + /* If ldm is enabled we need windowSize space. */ + size_t const windowSize = mtctx->params.ldmParams.enableLdm == ZSTD_ps_enable ? (1U << mtctx->params.cParams.windowLog) : 0; + /* Two buffers of slack, plus extra space for the overlap + * This is the minimum slack that LDM works with. One extra because + * flush might waste up to targetSectionSize-1 bytes. Another extra + * for the overlap (if > 0), then one to fill which doesn't overlap + * with the LDM window. + */ + size_t const nbSlackBuffers = 2 + (mtctx->targetPrefixSize > 0); + size_t const slackSize = mtctx->targetSectionSize * nbSlackBuffers; + /* Compute the total size, and always have enough slack */ + size_t const nbWorkers = MAX(mtctx->params.nbWorkers, 1); + size_t const sectionsSize = mtctx->targetSectionSize * nbWorkers; + size_t const capacity = MAX(windowSize, sectionsSize) + slackSize; + if (mtctx->roundBuff.capacity < capacity) { + if (mtctx->roundBuff.buffer) + ZSTD_customFree(mtctx->roundBuff.buffer, mtctx->cMem); + mtctx->roundBuff.buffer = (BYTE*)ZSTD_customMalloc(capacity, mtctx->cMem); + if (mtctx->roundBuff.buffer == NULL) { + mtctx->roundBuff.capacity = 0; + return ERROR(memory_allocation); + } + mtctx->roundBuff.capacity = capacity; + } + } + DEBUGLOG(4, "roundBuff capacity : %u KB", (U32)(mtctx->roundBuff.capacity>>10)); + mtctx->roundBuff.pos = 0; + mtctx->inBuff.buffer = g_nullBuffer; + mtctx->inBuff.filled = 0; + mtctx->inBuff.prefix = kNullRange; + mtctx->doneJobID = 0; + mtctx->nextJobID = 0; + mtctx->frameEnded = 0; + mtctx->allJobsCompleted = 0; + mtctx->consumed = 0; + mtctx->produced = 0; + + /* update dictionary */ + ZSTD_freeCDict(mtctx->cdictLocal); + mtctx->cdictLocal = NULL; + mtctx->cdict = NULL; + if (dict) { + if (dictContentType == ZSTD_dct_rawContent) { + mtctx->inBuff.prefix.start = (const BYTE*)dict; + mtctx->inBuff.prefix.size = dictSize; + } else { + /* note : a loadPrefix becomes an internal CDict */ + mtctx->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize, + ZSTD_dlm_byRef, dictContentType, + params.cParams, mtctx->cMem); + mtctx->cdict = mtctx->cdictLocal; + if (mtctx->cdictLocal == NULL) return ERROR(memory_allocation); + } + } else { + mtctx->cdict = cdict; + } + + if (ZSTDMT_serialState_reset(&mtctx->serial, mtctx->seqPool, params, mtctx->targetSectionSize, + dict, dictSize, dictContentType)) + return ERROR(memory_allocation); + + + return 0; +} + + +/* ZSTDMT_writeLastEmptyBlock() + * Write a single empty block with an end-of-frame to finish a frame. + * Job must be created from streaming variant. + * This function is always successful if expected conditions are fulfilled. + */ +static void ZSTDMT_writeLastEmptyBlock(ZSTDMT_jobDescription* job) +{ + assert(job->lastJob == 1); + assert(job->src.size == 0); /* last job is empty -> will be simplified into a last empty block */ + assert(job->firstJob == 0); /* cannot be first job, as it also needs to create frame header */ + assert(job->dstBuff.start == NULL); /* invoked from streaming variant only (otherwise, dstBuff might be user's output) */ + job->dstBuff = ZSTDMT_getBuffer(job->bufPool); + if (job->dstBuff.start == NULL) { + job->cSize = ERROR(memory_allocation); + return; + } + assert(job->dstBuff.capacity >= ZSTD_blockHeaderSize); /* no buffer should ever be that small */ + job->src = kNullRange; + job->cSize = ZSTD_writeLastEmptyBlock(job->dstBuff.start, job->dstBuff.capacity); + assert(!ZSTD_isError(job->cSize)); + assert(job->consumed == 0); +} + +static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* mtctx, size_t srcSize, ZSTD_EndDirective endOp) +{ + unsigned const jobID = mtctx->nextJobID & mtctx->jobIDMask; + int const endFrame = (endOp == ZSTD_e_end); + + if (mtctx->nextJobID > mtctx->doneJobID + mtctx->jobIDMask) { + DEBUGLOG(5, "ZSTDMT_createCompressionJob: will not create new job : table is full"); + assert((mtctx->nextJobID & mtctx->jobIDMask) == (mtctx->doneJobID & mtctx->jobIDMask)); + return 0; + } + + if (!mtctx->jobReady) { + BYTE const* src = (BYTE const*)mtctx->inBuff.buffer.start; + DEBUGLOG(5, "ZSTDMT_createCompressionJob: preparing job %u to compress %u bytes with %u preload ", + mtctx->nextJobID, (U32)srcSize, (U32)mtctx->inBuff.prefix.size); + mtctx->jobs[jobID].src.start = src; + mtctx->jobs[jobID].src.size = srcSize; + assert(mtctx->inBuff.filled >= srcSize); + mtctx->jobs[jobID].prefix = mtctx->inBuff.prefix; + mtctx->jobs[jobID].consumed = 0; + mtctx->jobs[jobID].cSize = 0; + mtctx->jobs[jobID].params = mtctx->params; + mtctx->jobs[jobID].cdict = mtctx->nextJobID==0 ? mtctx->cdict : NULL; + mtctx->jobs[jobID].fullFrameSize = mtctx->frameContentSize; + mtctx->jobs[jobID].dstBuff = g_nullBuffer; + mtctx->jobs[jobID].cctxPool = mtctx->cctxPool; + mtctx->jobs[jobID].bufPool = mtctx->bufPool; + mtctx->jobs[jobID].seqPool = mtctx->seqPool; + mtctx->jobs[jobID].serial = &mtctx->serial; + mtctx->jobs[jobID].jobID = mtctx->nextJobID; + mtctx->jobs[jobID].firstJob = (mtctx->nextJobID==0); + mtctx->jobs[jobID].lastJob = endFrame; + mtctx->jobs[jobID].frameChecksumNeeded = mtctx->params.fParams.checksumFlag && endFrame && (mtctx->nextJobID>0); + mtctx->jobs[jobID].dstFlushed = 0; + + /* Update the round buffer pos and clear the input buffer to be reset */ + mtctx->roundBuff.pos += srcSize; + mtctx->inBuff.buffer = g_nullBuffer; + mtctx->inBuff.filled = 0; + /* Set the prefix for next job */ + if (!endFrame) { + size_t const newPrefixSize = MIN(srcSize, mtctx->targetPrefixSize); + mtctx->inBuff.prefix.start = src + srcSize - newPrefixSize; + mtctx->inBuff.prefix.size = newPrefixSize; + } else { /* endFrame==1 => no need for another input buffer */ + mtctx->inBuff.prefix = kNullRange; + mtctx->frameEnded = endFrame; + if (mtctx->nextJobID == 0) { + /* single job exception : checksum is already calculated directly within worker thread */ + mtctx->params.fParams.checksumFlag = 0; + } } + + if ( (srcSize == 0) + && (mtctx->nextJobID>0)/*single job must also write frame header*/ ) { + DEBUGLOG(5, "ZSTDMT_createCompressionJob: creating a last empty block to end frame"); + assert(endOp == ZSTD_e_end); /* only possible case : need to end the frame with an empty last block */ + ZSTDMT_writeLastEmptyBlock(mtctx->jobs + jobID); + mtctx->nextJobID++; + return 0; + } + } + + DEBUGLOG(5, "ZSTDMT_createCompressionJob: posting job %u : %u bytes (end:%u, jobNb == %u (mod:%u))", + mtctx->nextJobID, + (U32)mtctx->jobs[jobID].src.size, + mtctx->jobs[jobID].lastJob, + mtctx->nextJobID, + jobID); + if (POOL_tryAdd(mtctx->factory, ZSTDMT_compressionJob, &mtctx->jobs[jobID])) { + mtctx->nextJobID++; + mtctx->jobReady = 0; + } else { + DEBUGLOG(5, "ZSTDMT_createCompressionJob: no worker available for job %u", mtctx->nextJobID); + mtctx->jobReady = 1; + } + return 0; +} + + +/*! ZSTDMT_flushProduced() : + * flush whatever data has been produced but not yet flushed in current job. + * move to next job if current one is fully flushed. + * `output` : `pos` will be updated with amount of data flushed . + * `blockToFlush` : if >0, the function will block and wait if there is no data available to flush . + * @return : amount of data remaining within internal buffer, 0 if no more, 1 if unknown but > 0, or an error code */ +static size_t ZSTDMT_flushProduced(ZSTDMT_CCtx* mtctx, ZSTD_outBuffer* output, unsigned blockToFlush, ZSTD_EndDirective end) +{ + unsigned const wJobID = mtctx->doneJobID & mtctx->jobIDMask; + DEBUGLOG(5, "ZSTDMT_flushProduced (blocking:%u , job %u <= %u)", + blockToFlush, mtctx->doneJobID, mtctx->nextJobID); + assert(output->size >= output->pos); + + ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[wJobID].job_mutex); + if ( blockToFlush + && (mtctx->doneJobID < mtctx->nextJobID) ) { + assert(mtctx->jobs[wJobID].dstFlushed <= mtctx->jobs[wJobID].cSize); + while (mtctx->jobs[wJobID].dstFlushed == mtctx->jobs[wJobID].cSize) { /* nothing to flush */ + if (mtctx->jobs[wJobID].consumed == mtctx->jobs[wJobID].src.size) { + DEBUGLOG(5, "job %u is completely consumed (%u == %u) => don't wait for cond, there will be none", + mtctx->doneJobID, (U32)mtctx->jobs[wJobID].consumed, (U32)mtctx->jobs[wJobID].src.size); + break; + } + DEBUGLOG(5, "waiting for something to flush from job %u (currently flushed: %u bytes)", + mtctx->doneJobID, (U32)mtctx->jobs[wJobID].dstFlushed); + ZSTD_pthread_cond_wait(&mtctx->jobs[wJobID].job_cond, &mtctx->jobs[wJobID].job_mutex); /* block when nothing to flush but some to come */ + } } + + /* try to flush something */ + { size_t cSize = mtctx->jobs[wJobID].cSize; /* shared */ + size_t const srcConsumed = mtctx->jobs[wJobID].consumed; /* shared */ + size_t const srcSize = mtctx->jobs[wJobID].src.size; /* read-only, could be done after mutex lock, but no-declaration-after-statement */ + ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); + if (ZSTD_isError(cSize)) { + DEBUGLOG(5, "ZSTDMT_flushProduced: job %u : compression error detected : %s", + mtctx->doneJobID, ZSTD_getErrorName(cSize)); + ZSTDMT_waitForAllJobsCompleted(mtctx); + ZSTDMT_releaseAllJobResources(mtctx); + return cSize; + } + /* add frame checksum if necessary (can only happen once) */ + assert(srcConsumed <= srcSize); + if ( (srcConsumed == srcSize) /* job completed -> worker no longer active */ + && mtctx->jobs[wJobID].frameChecksumNeeded ) { + U32 const checksum = (U32)XXH64_digest(&mtctx->serial.xxhState); + DEBUGLOG(4, "ZSTDMT_flushProduced: writing checksum : %08X \n", checksum); + MEM_writeLE32((char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].cSize, checksum); + cSize += 4; + mtctx->jobs[wJobID].cSize += 4; /* can write this shared value, as worker is no longer active */ + mtctx->jobs[wJobID].frameChecksumNeeded = 0; + } + + if (cSize > 0) { /* compression is ongoing or completed */ + size_t const toFlush = MIN(cSize - mtctx->jobs[wJobID].dstFlushed, output->size - output->pos); + DEBUGLOG(5, "ZSTDMT_flushProduced: Flushing %u bytes from job %u (completion:%u/%u, generated:%u)", + (U32)toFlush, mtctx->doneJobID, (U32)srcConsumed, (U32)srcSize, (U32)cSize); + assert(mtctx->doneJobID < mtctx->nextJobID); + assert(cSize >= mtctx->jobs[wJobID].dstFlushed); + assert(mtctx->jobs[wJobID].dstBuff.start != NULL); + if (toFlush > 0) { + ZSTD_memcpy((char*)output->dst + output->pos, + (const char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].dstFlushed, + toFlush); + } + output->pos += toFlush; + mtctx->jobs[wJobID].dstFlushed += toFlush; /* can write : this value is only used by mtctx */ + + if ( (srcConsumed == srcSize) /* job is completed */ + && (mtctx->jobs[wJobID].dstFlushed == cSize) ) { /* output buffer fully flushed => free this job position */ + DEBUGLOG(5, "Job %u completed (%u bytes), moving to next one", + mtctx->doneJobID, (U32)mtctx->jobs[wJobID].dstFlushed); + ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[wJobID].dstBuff); + DEBUGLOG(5, "dstBuffer released"); + mtctx->jobs[wJobID].dstBuff = g_nullBuffer; + mtctx->jobs[wJobID].cSize = 0; /* ensure this job slot is considered "not started" in future check */ + mtctx->consumed += srcSize; + mtctx->produced += cSize; + mtctx->doneJobID++; + } } + + /* return value : how many bytes left in buffer ; fake it to 1 when unknown but >0 */ + if (cSize > mtctx->jobs[wJobID].dstFlushed) return (cSize - mtctx->jobs[wJobID].dstFlushed); + if (srcSize > srcConsumed) return 1; /* current job not completely compressed */ + } + if (mtctx->doneJobID < mtctx->nextJobID) return 1; /* some more jobs ongoing */ + if (mtctx->jobReady) return 1; /* one job is ready to push, just not yet in the list */ + if (mtctx->inBuff.filled > 0) return 1; /* input is not empty, and still needs to be converted into a job */ + mtctx->allJobsCompleted = mtctx->frameEnded; /* all jobs are entirely flushed => if this one is last one, frame is completed */ + if (end == ZSTD_e_end) return !mtctx->frameEnded; /* for ZSTD_e_end, question becomes : is frame completed ? instead of : are internal buffers fully flushed ? */ + return 0; /* internal buffers fully flushed */ +} + +/** + * Returns the range of data used by the earliest job that is not yet complete. + * If the data of the first job is broken up into two segments, we cover both + * sections. + */ +static Range ZSTDMT_getInputDataInUse(ZSTDMT_CCtx* mtctx) +{ + unsigned const firstJobID = mtctx->doneJobID; + unsigned const lastJobID = mtctx->nextJobID; + unsigned jobID; + + /* no need to check during first round */ + size_t roundBuffCapacity = mtctx->roundBuff.capacity; + size_t nbJobs1stRoundMin = roundBuffCapacity / mtctx->targetSectionSize; + if (lastJobID < nbJobs1stRoundMin) return kNullRange; + + for (jobID = firstJobID; jobID < lastJobID; ++jobID) { + unsigned const wJobID = jobID & mtctx->jobIDMask; + size_t consumed; + + ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[wJobID].job_mutex); + consumed = mtctx->jobs[wJobID].consumed; + ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); + + if (consumed < mtctx->jobs[wJobID].src.size) { + Range range = mtctx->jobs[wJobID].prefix; + if (range.size == 0) { + /* Empty prefix */ + range = mtctx->jobs[wJobID].src; + } + /* Job source in multiple segments not supported yet */ + assert(range.start <= mtctx->jobs[wJobID].src.start); + return range; + } + } + return kNullRange; +} + +/** + * Returns non-zero iff buffer and range overlap. + */ +static int ZSTDMT_isOverlapped(Buffer buffer, Range range) +{ + BYTE const* const bufferStart = (BYTE const*)buffer.start; + BYTE const* const rangeStart = (BYTE const*)range.start; + + if (rangeStart == NULL || bufferStart == NULL) + return 0; + + { + BYTE const* const bufferEnd = bufferStart + buffer.capacity; + BYTE const* const rangeEnd = rangeStart + range.size; + + /* Empty ranges cannot overlap */ + if (bufferStart == bufferEnd || rangeStart == rangeEnd) + return 0; + + return bufferStart < rangeEnd && rangeStart < bufferEnd; + } +} + +static int ZSTDMT_doesOverlapWindow(Buffer buffer, ZSTD_window_t window) +{ + Range extDict; + Range prefix; + + DEBUGLOG(5, "ZSTDMT_doesOverlapWindow"); + extDict.start = window.dictBase + window.lowLimit; + extDict.size = window.dictLimit - window.lowLimit; + + prefix.start = window.base + window.dictLimit; + prefix.size = window.nextSrc - (window.base + window.dictLimit); + DEBUGLOG(5, "extDict [0x%zx, 0x%zx)", + (size_t)extDict.start, + (size_t)extDict.start + extDict.size); + DEBUGLOG(5, "prefix [0x%zx, 0x%zx)", + (size_t)prefix.start, + (size_t)prefix.start + prefix.size); + + return ZSTDMT_isOverlapped(buffer, extDict) + || ZSTDMT_isOverlapped(buffer, prefix); +} + +static void ZSTDMT_waitForLdmComplete(ZSTDMT_CCtx* mtctx, Buffer buffer) +{ + if (mtctx->params.ldmParams.enableLdm == ZSTD_ps_enable) { + ZSTD_pthread_mutex_t* mutex = &mtctx->serial.ldmWindowMutex; + DEBUGLOG(5, "ZSTDMT_waitForLdmComplete"); + DEBUGLOG(5, "source [0x%zx, 0x%zx)", + (size_t)buffer.start, + (size_t)buffer.start + buffer.capacity); + ZSTD_PTHREAD_MUTEX_LOCK(mutex); + while (ZSTDMT_doesOverlapWindow(buffer, mtctx->serial.ldmWindow)) { + DEBUGLOG(5, "Waiting for LDM to finish..."); + ZSTD_pthread_cond_wait(&mtctx->serial.ldmWindowCond, mutex); + } + DEBUGLOG(6, "Done waiting for LDM to finish"); + ZSTD_pthread_mutex_unlock(mutex); + } +} + +/** + * Attempts to set the inBuff to the next section to fill. + * If any part of the new section is still in use we give up. + * Returns non-zero if the buffer is filled. + */ +static int ZSTDMT_tryGetInputRange(ZSTDMT_CCtx* mtctx) +{ + Range const inUse = ZSTDMT_getInputDataInUse(mtctx); + size_t const spaceLeft = mtctx->roundBuff.capacity - mtctx->roundBuff.pos; + size_t const spaceNeeded = mtctx->targetSectionSize; + Buffer buffer; + + DEBUGLOG(5, "ZSTDMT_tryGetInputRange"); + assert(mtctx->inBuff.buffer.start == NULL); + assert(mtctx->roundBuff.capacity >= spaceNeeded); + + if (spaceLeft < spaceNeeded) { + /* ZSTD_invalidateRepCodes() doesn't work for extDict variants. + * Simply copy the prefix to the beginning in that case. + */ + BYTE* const start = (BYTE*)mtctx->roundBuff.buffer; + size_t const prefixSize = mtctx->inBuff.prefix.size; + + buffer.start = start; + buffer.capacity = prefixSize; + if (ZSTDMT_isOverlapped(buffer, inUse)) { + DEBUGLOG(5, "Waiting for buffer..."); + return 0; + } + ZSTDMT_waitForLdmComplete(mtctx, buffer); + ZSTD_memmove(start, mtctx->inBuff.prefix.start, prefixSize); + mtctx->inBuff.prefix.start = start; + mtctx->roundBuff.pos = prefixSize; + } + buffer.start = mtctx->roundBuff.buffer + mtctx->roundBuff.pos; + buffer.capacity = spaceNeeded; + + if (ZSTDMT_isOverlapped(buffer, inUse)) { + DEBUGLOG(5, "Waiting for buffer..."); + return 0; + } + assert(!ZSTDMT_isOverlapped(buffer, mtctx->inBuff.prefix)); + + ZSTDMT_waitForLdmComplete(mtctx, buffer); + + DEBUGLOG(5, "Using prefix range [%zx, %zx)", + (size_t)mtctx->inBuff.prefix.start, + (size_t)mtctx->inBuff.prefix.start + mtctx->inBuff.prefix.size); + DEBUGLOG(5, "Using source range [%zx, %zx)", + (size_t)buffer.start, + (size_t)buffer.start + buffer.capacity); + + + mtctx->inBuff.buffer = buffer; + mtctx->inBuff.filled = 0; + assert(mtctx->roundBuff.pos + buffer.capacity <= mtctx->roundBuff.capacity); + return 1; +} + +typedef struct { + size_t toLoad; /* The number of bytes to load from the input. */ + int flush; /* Boolean declaring if we must flush because we found a synchronization point. */ +} SyncPoint; + +/** + * Searches through the input for a synchronization point. If one is found, we + * will instruct the caller to flush, and return the number of bytes to load. + * Otherwise, we will load as many bytes as possible and instruct the caller + * to continue as normal. + */ +static SyncPoint +findSynchronizationPoint(ZSTDMT_CCtx const* mtctx, ZSTD_inBuffer const input) +{ + BYTE const* const istart = (BYTE const*)input.src + input.pos; + U64 const primePower = mtctx->rsync.primePower; + U64 const hitMask = mtctx->rsync.hitMask; + + SyncPoint syncPoint; + U64 hash; + BYTE const* prev; + size_t pos; + + syncPoint.toLoad = MIN(input.size - input.pos, mtctx->targetSectionSize - mtctx->inBuff.filled); + syncPoint.flush = 0; + if (!mtctx->params.rsyncable) + /* Rsync is disabled. */ + return syncPoint; + if (mtctx->inBuff.filled + input.size - input.pos < RSYNC_MIN_BLOCK_SIZE) + /* We don't emit synchronization points if it would produce too small blocks. + * We don't have enough input to find a synchronization point, so don't look. + */ + return syncPoint; + if (mtctx->inBuff.filled + syncPoint.toLoad < RSYNC_LENGTH) + /* Not enough to compute the hash. + * We will miss any synchronization points in this RSYNC_LENGTH byte + * window. However, since it depends only in the internal buffers, if the + * state is already synchronized, we will remain synchronized. + * Additionally, the probability that we miss a synchronization point is + * low: RSYNC_LENGTH / targetSectionSize. + */ + return syncPoint; + /* Initialize the loop variables. */ + if (mtctx->inBuff.filled < RSYNC_MIN_BLOCK_SIZE) { + /* We don't need to scan the first RSYNC_MIN_BLOCK_SIZE positions + * because they can't possibly be a sync point. So we can start + * part way through the input buffer. + */ + pos = RSYNC_MIN_BLOCK_SIZE - mtctx->inBuff.filled; + if (pos >= RSYNC_LENGTH) { + prev = istart + pos - RSYNC_LENGTH; + hash = ZSTD_rollingHash_compute(prev, RSYNC_LENGTH); + } else { + assert(mtctx->inBuff.filled >= RSYNC_LENGTH); + prev = (BYTE const*)mtctx->inBuff.buffer.start + mtctx->inBuff.filled - RSYNC_LENGTH; + hash = ZSTD_rollingHash_compute(prev + pos, (RSYNC_LENGTH - pos)); + hash = ZSTD_rollingHash_append(hash, istart, pos); + } + } else { + /* We have enough bytes buffered to initialize the hash, + * and have processed enough bytes to find a sync point. + * Start scanning at the beginning of the input. + */ + assert(mtctx->inBuff.filled >= RSYNC_MIN_BLOCK_SIZE); + assert(RSYNC_MIN_BLOCK_SIZE >= RSYNC_LENGTH); + pos = 0; + prev = (BYTE const*)mtctx->inBuff.buffer.start + mtctx->inBuff.filled - RSYNC_LENGTH; + hash = ZSTD_rollingHash_compute(prev, RSYNC_LENGTH); + if ((hash & hitMask) == hitMask) { + /* We're already at a sync point so don't load any more until + * we're able to flush this sync point. + * This likely happened because the job table was full so we + * couldn't add our job. + */ + syncPoint.toLoad = 0; + syncPoint.flush = 1; + return syncPoint; + } + } + /* Starting with the hash of the previous RSYNC_LENGTH bytes, roll + * through the input. If we hit a synchronization point, then cut the + * job off, and tell the compressor to flush the job. Otherwise, load + * all the bytes and continue as normal. + * If we go too long without a synchronization point (targetSectionSize) + * then a block will be emitted anyways, but this is okay, since if we + * are already synchronized we will remain synchronized. + */ + assert(pos < RSYNC_LENGTH || ZSTD_rollingHash_compute(istart + pos - RSYNC_LENGTH, RSYNC_LENGTH) == hash); + for (; pos < syncPoint.toLoad; ++pos) { + BYTE const toRemove = pos < RSYNC_LENGTH ? prev[pos] : istart[pos - RSYNC_LENGTH]; + /* This assert is very expensive, and Debian compiles with asserts enabled. + * So disable it for now. We can get similar coverage by checking it at the + * beginning & end of the loop. + * assert(pos < RSYNC_LENGTH || ZSTD_rollingHash_compute(istart + pos - RSYNC_LENGTH, RSYNC_LENGTH) == hash); + */ + hash = ZSTD_rollingHash_rotate(hash, toRemove, istart[pos], primePower); + assert(mtctx->inBuff.filled + pos >= RSYNC_MIN_BLOCK_SIZE); + if ((hash & hitMask) == hitMask) { + syncPoint.toLoad = pos + 1; + syncPoint.flush = 1; + ++pos; /* for assert */ + break; + } + } + assert(pos < RSYNC_LENGTH || ZSTD_rollingHash_compute(istart + pos - RSYNC_LENGTH, RSYNC_LENGTH) == hash); + return syncPoint; +} + +size_t ZSTDMT_nextInputSizeHint(const ZSTDMT_CCtx* mtctx) +{ + size_t hintInSize = mtctx->targetSectionSize - mtctx->inBuff.filled; + if (hintInSize==0) hintInSize = mtctx->targetSectionSize; + return hintInSize; +} + +/** ZSTDMT_compressStream_generic() : + * internal use only - exposed to be invoked from zstd_compress.c + * assumption : output and input are valid (pos <= size) + * @return : minimum amount of data remaining to flush, 0 if none */ +size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx, + ZSTD_outBuffer* output, + ZSTD_inBuffer* input, + ZSTD_EndDirective endOp) +{ + unsigned forwardInputProgress = 0; + DEBUGLOG(5, "ZSTDMT_compressStream_generic (endOp=%u, srcSize=%u)", + (U32)endOp, (U32)(input->size - input->pos)); + assert(output->pos <= output->size); + assert(input->pos <= input->size); + + if ((mtctx->frameEnded) && (endOp==ZSTD_e_continue)) { + /* current frame being ended. Only flush/end are allowed */ + return ERROR(stage_wrong); + } + + /* fill input buffer */ + if ( (!mtctx->jobReady) + && (input->size > input->pos) ) { /* support NULL input */ + if (mtctx->inBuff.buffer.start == NULL) { + assert(mtctx->inBuff.filled == 0); /* Can't fill an empty buffer */ + if (!ZSTDMT_tryGetInputRange(mtctx)) { + /* It is only possible for this operation to fail if there are + * still compression jobs ongoing. + */ + DEBUGLOG(5, "ZSTDMT_tryGetInputRange failed"); + assert(mtctx->doneJobID != mtctx->nextJobID); + } else + DEBUGLOG(5, "ZSTDMT_tryGetInputRange completed successfully : mtctx->inBuff.buffer.start = %p", mtctx->inBuff.buffer.start); + } + if (mtctx->inBuff.buffer.start != NULL) { + SyncPoint const syncPoint = findSynchronizationPoint(mtctx, *input); + if (syncPoint.flush && endOp == ZSTD_e_continue) { + endOp = ZSTD_e_flush; + } + assert(mtctx->inBuff.buffer.capacity >= mtctx->targetSectionSize); + DEBUGLOG(5, "ZSTDMT_compressStream_generic: adding %u bytes on top of %u to buffer of size %u", + (U32)syncPoint.toLoad, (U32)mtctx->inBuff.filled, (U32)mtctx->targetSectionSize); + ZSTD_memcpy((char*)mtctx->inBuff.buffer.start + mtctx->inBuff.filled, (const char*)input->src + input->pos, syncPoint.toLoad); + input->pos += syncPoint.toLoad; + mtctx->inBuff.filled += syncPoint.toLoad; + forwardInputProgress = syncPoint.toLoad>0; + } + } + if ((input->pos < input->size) && (endOp == ZSTD_e_end)) { + /* Can't end yet because the input is not fully consumed. + * We are in one of these cases: + * - mtctx->inBuff is NULL & empty: we couldn't get an input buffer so don't create a new job. + * - We filled the input buffer: flush this job but don't end the frame. + * - We hit a synchronization point: flush this job but don't end the frame. + */ + assert(mtctx->inBuff.filled == 0 || mtctx->inBuff.filled == mtctx->targetSectionSize || mtctx->params.rsyncable); + endOp = ZSTD_e_flush; + } + + if ( (mtctx->jobReady) + || (mtctx->inBuff.filled >= mtctx->targetSectionSize) /* filled enough : let's compress */ + || ((endOp != ZSTD_e_continue) && (mtctx->inBuff.filled > 0)) /* something to flush : let's go */ + || ((endOp == ZSTD_e_end) && (!mtctx->frameEnded)) ) { /* must finish the frame with a zero-size block */ + size_t const jobSize = mtctx->inBuff.filled; + assert(mtctx->inBuff.filled <= mtctx->targetSectionSize); + FORWARD_IF_ERROR( ZSTDMT_createCompressionJob(mtctx, jobSize, endOp) , ""); + } + + /* check for potential compressed data ready to be flushed */ + { size_t const remainingToFlush = ZSTDMT_flushProduced(mtctx, output, !forwardInputProgress, endOp); /* block if there was no forward input progress */ + if (input->pos < input->size) return MAX(remainingToFlush, 1); /* input not consumed : do not end flush yet */ + DEBUGLOG(5, "end of ZSTDMT_compressStream_generic: remainingToFlush = %u", (U32)remainingToFlush); + return remainingToFlush; + } +} diff --git a/cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.h b/cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.h new file mode 100644 index 0000000000..91b489b9cb --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/compress/zstdmt_compress.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + #ifndef ZSTDMT_COMPRESS_H + #define ZSTDMT_COMPRESS_H + +/* === Dependencies === */ +#include "../common/zstd_deps.h" /* size_t */ +#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters */ +#include "../zstd.h" /* ZSTD_inBuffer, ZSTD_outBuffer, ZSTDLIB_API */ + +/* Note : This is an internal API. + * These APIs used to be exposed with ZSTDLIB_API, + * because it used to be the only way to invoke MT compression. + * Now, you must use ZSTD_compress2 and ZSTD_compressStream2() instead. + * + * This API requires ZSTD_MULTITHREAD to be defined during compilation, + * otherwise ZSTDMT_createCCtx*() will fail. + */ + +/* === Constants === */ +#ifndef ZSTDMT_NBWORKERS_MAX /* a different value can be selected at compile time */ +# define ZSTDMT_NBWORKERS_MAX ((sizeof(void*)==4) /*32-bit*/ ? 64 : 256) +#endif +#ifndef ZSTDMT_JOBSIZE_MIN /* a different value can be selected at compile time */ +# define ZSTDMT_JOBSIZE_MIN (512 KB) +#endif +#define ZSTDMT_JOBLOG_MAX (MEM_32bits() ? 29 : 30) +#define ZSTDMT_JOBSIZE_MAX (MEM_32bits() ? (512 MB) : (1024 MB)) + + +/* ======================================================== + * === Private interface, for use by ZSTD_compress.c === + * === Not exposed in libzstd. Never invoke directly === + * ======================================================== */ + +/* === Memory management === */ +typedef struct ZSTDMT_CCtx_s ZSTDMT_CCtx; +/* Requires ZSTD_MULTITHREAD to be defined during compilation, otherwise it will return NULL. */ +ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbWorkers, + ZSTD_customMem cMem, + ZSTD_threadPool *pool); +size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* mtctx); + +size_t ZSTDMT_sizeof_CCtx(ZSTDMT_CCtx* mtctx); + +/* === Streaming functions === */ + +size_t ZSTDMT_nextInputSizeHint(const ZSTDMT_CCtx* mtctx); + +/*! ZSTDMT_initCStream_internal() : + * Private use only. Init streaming operation. + * expects params to be valid. + * must receive dict, or cdict, or none, but not both. + * mtctx can be freshly constructed or reused from a prior compression. + * If mtctx is reused, memory allocations from the prior compression may not be freed, + * even if they are not needed for the current compression. + * @return : 0, or an error code */ +size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* mtctx, + const void* dict, size_t dictSize, ZSTD_dictContentType_e dictContentType, + const ZSTD_CDict* cdict, + ZSTD_CCtx_params params, unsigned long long pledgedSrcSize); + +/*! ZSTDMT_compressStream_generic() : + * Combines ZSTDMT_compressStream() with optional ZSTDMT_flushStream() or ZSTDMT_endStream() + * depending on flush directive. + * @return : minimum amount of data still to be flushed + * 0 if fully flushed + * or an error code + * note : needs to be init using any ZSTD_initCStream*() variant */ +size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx, + ZSTD_outBuffer* output, + ZSTD_inBuffer* input, + ZSTD_EndDirective endOp); + + /*! ZSTDMT_toFlushNow() + * Tell how many bytes are ready to be flushed immediately. + * Probe the oldest active job (not yet entirely flushed) and check its output buffer. + * If return 0, it means there is no active job, + * or, it means oldest job is still active, but everything produced has been flushed so far, + * therefore flushing is limited by speed of oldest job. */ +size_t ZSTDMT_toFlushNow(ZSTDMT_CCtx* mtctx); + +/*! ZSTDMT_updateCParams_whileCompressing() : + * Updates only a selected set of compression parameters, to remain compatible with current frame. + * New parameters will be applied to next compression job. */ +void ZSTDMT_updateCParams_whileCompressing(ZSTDMT_CCtx* mtctx, const ZSTD_CCtx_params* cctxParams); + +/*! ZSTDMT_getFrameProgression(): + * tells how much data has been consumed (input) and produced (output) for current frame. + * able to count progression inside worker threads. + */ +ZSTD_frameProgression ZSTDMT_getFrameProgression(ZSTDMT_CCtx* mtctx); + +#endif /* ZSTDMT_COMPRESS_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress.c b/cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress.c new file mode 100644 index 0000000000..f85dd0beea --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress.c @@ -0,0 +1,1944 @@ +/* ****************************************************************** + * huff0 huffman decoder, + * part of Finite State Entropy library + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * You can contact the author at : + * - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. +****************************************************************** */ + +/* ************************************************************** +* Dependencies +****************************************************************/ +#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memset */ +#include "../common/compiler.h" +#include "../common/bitstream.h" /* BIT_* */ +#include "../common/fse.h" /* to compress headers */ +#include "../common/huf.h" +#include "../common/error_private.h" +#include "../common/zstd_internal.h" +#include "../common/bits.h" /* ZSTD_highbit32, ZSTD_countTrailingZeros64 */ + +/* ************************************************************** +* Constants +****************************************************************/ + +#define HUF_DECODER_FAST_TABLELOG 11 + +/* ************************************************************** +* Macros +****************************************************************/ + +#ifdef HUF_DISABLE_FAST_DECODE +# define HUF_ENABLE_FAST_DECODE 0 +#else +# define HUF_ENABLE_FAST_DECODE 1 +#endif + +/* These two optional macros force the use one way or another of the two + * Huffman decompression implementations. You can't force in both directions + * at the same time. + */ +#if defined(HUF_FORCE_DECOMPRESS_X1) && \ + defined(HUF_FORCE_DECOMPRESS_X2) +#error "Cannot force the use of the X1 and X2 decoders at the same time!" +#endif + +/* When DYNAMIC_BMI2 is enabled, fast decoders are only called when bmi2 is + * supported at runtime, so we can add the BMI2 target attribute. + * When it is disabled, we will still get BMI2 if it is enabled statically. + */ +#if DYNAMIC_BMI2 +# define HUF_FAST_BMI2_ATTRS BMI2_TARGET_ATTRIBUTE +#else +# define HUF_FAST_BMI2_ATTRS +#endif + +#ifdef __cplusplus +# define HUF_EXTERN_C extern "C" +#else +# define HUF_EXTERN_C +#endif +#define HUF_ASM_DECL HUF_EXTERN_C + +#if DYNAMIC_BMI2 +# define HUF_NEED_BMI2_FUNCTION 1 +#else +# define HUF_NEED_BMI2_FUNCTION 0 +#endif + +/* ************************************************************** +* Error Management +****************************************************************/ +#define HUF_isError ERR_isError + + +/* ************************************************************** +* Byte alignment for workSpace management +****************************************************************/ +#define HUF_ALIGN(x, a) HUF_ALIGN_MASK((x), (a) - 1) +#define HUF_ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) + + +/* ************************************************************** +* BMI2 Variant Wrappers +****************************************************************/ +typedef size_t (*HUF_DecompressUsingDTableFn)(void *dst, size_t dstSize, + const void *cSrc, + size_t cSrcSize, + const HUF_DTable *DTable); + +#if DYNAMIC_BMI2 + +#define HUF_DGEN(fn) \ + \ + static size_t fn##_default( \ + void* dst, size_t dstSize, \ + const void* cSrc, size_t cSrcSize, \ + const HUF_DTable* DTable) \ + { \ + return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ + } \ + \ + static BMI2_TARGET_ATTRIBUTE size_t fn##_bmi2( \ + void* dst, size_t dstSize, \ + const void* cSrc, size_t cSrcSize, \ + const HUF_DTable* DTable) \ + { \ + return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ + } \ + \ + static size_t fn(void* dst, size_t dstSize, void const* cSrc, \ + size_t cSrcSize, HUF_DTable const* DTable, int flags) \ + { \ + if (flags & HUF_flags_bmi2) { \ + return fn##_bmi2(dst, dstSize, cSrc, cSrcSize, DTable); \ + } \ + return fn##_default(dst, dstSize, cSrc, cSrcSize, DTable); \ + } + +#else + +#define HUF_DGEN(fn) \ + static size_t fn(void* dst, size_t dstSize, void const* cSrc, \ + size_t cSrcSize, HUF_DTable const* DTable, int flags) \ + { \ + (void)flags; \ + return fn##_body(dst, dstSize, cSrc, cSrcSize, DTable); \ + } + +#endif + + +/*-***************************/ +/* generic DTableDesc */ +/*-***************************/ +typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; + +static DTableDesc HUF_getDTableDesc(const HUF_DTable* table) +{ + DTableDesc dtd; + ZSTD_memcpy(&dtd, table, sizeof(dtd)); + return dtd; +} + +static size_t HUF_initFastDStream(BYTE const* ip) { + BYTE const lastByte = ip[7]; + size_t const bitsConsumed = lastByte ? 8 - ZSTD_highbit32(lastByte) : 0; + size_t const value = MEM_readLEST(ip) | 1; + assert(bitsConsumed <= 8); + assert(sizeof(size_t) == 8); + return value << bitsConsumed; +} + + +/** + * The input/output arguments to the Huffman fast decoding loop: + * + * ip [in/out] - The input pointers, must be updated to reflect what is consumed. + * op [in/out] - The output pointers, must be updated to reflect what is written. + * bits [in/out] - The bitstream containers, must be updated to reflect the current state. + * dt [in] - The decoding table. + * ilowest [in] - The beginning of the valid range of the input. Decoders may read + * down to this pointer. It may be below iend[0]. + * oend [in] - The end of the output stream. op[3] must not cross oend. + * iend [in] - The end of each input stream. ip[i] may cross iend[i], + * as long as it is above ilowest, but that indicates corruption. + */ +typedef struct { + BYTE const* ip[4]; + BYTE* op[4]; + U64 bits[4]; + void const* dt; + BYTE const* ilowest; + BYTE* oend; + BYTE const* iend[4]; +} HUF_DecompressFastArgs; + +typedef void (*HUF_DecompressFastLoopFn)(HUF_DecompressFastArgs*); + +/** + * Initializes args for the fast decoding loop. + * @returns 1 on success + * 0 if the fallback implementation should be used. + * Or an error code on failure. + */ +static size_t HUF_DecompressFastArgs_init(HUF_DecompressFastArgs* args, void* dst, size_t dstSize, void const* src, size_t srcSize, const HUF_DTable* DTable) +{ + void const* dt = DTable + 1; + U32 const dtLog = HUF_getDTableDesc(DTable).tableLog; + + const BYTE* const istart = (const BYTE*)src; + + BYTE* const oend = ZSTD_maybeNullPtrAdd((BYTE*)dst, dstSize); + + /* The fast decoding loop assumes 64-bit little-endian. + * This condition is false on x32. + */ + if (!MEM_isLittleEndian() || MEM_32bits()) + return 0; + + /* Avoid nullptr addition */ + if (dstSize == 0) + return 0; + assert(dst != NULL); + + /* strict minimum : jump table + 1 byte per stream */ + if (srcSize < 10) + return ERROR(corruption_detected); + + /* Must have at least 8 bytes per stream because we don't handle initializing smaller bit containers. + * If table log is not correct at this point, fallback to the old decoder. + * On small inputs we don't have enough data to trigger the fast loop, so use the old decoder. + */ + if (dtLog != HUF_DECODER_FAST_TABLELOG) + return 0; + + /* Read the jump table. */ + { + size_t const length1 = MEM_readLE16(istart); + size_t const length2 = MEM_readLE16(istart+2); + size_t const length3 = MEM_readLE16(istart+4); + size_t const length4 = srcSize - (length1 + length2 + length3 + 6); + args->iend[0] = istart + 6; /* jumpTable */ + args->iend[1] = args->iend[0] + length1; + args->iend[2] = args->iend[1] + length2; + args->iend[3] = args->iend[2] + length3; + + /* HUF_initFastDStream() requires this, and this small of an input + * won't benefit from the ASM loop anyways. + */ + if (length1 < 8 || length2 < 8 || length3 < 8 || length4 < 8) + return 0; + if (length4 > srcSize) return ERROR(corruption_detected); /* overflow */ + } + /* ip[] contains the position that is currently loaded into bits[]. */ + args->ip[0] = args->iend[1] - sizeof(U64); + args->ip[1] = args->iend[2] - sizeof(U64); + args->ip[2] = args->iend[3] - sizeof(U64); + args->ip[3] = (BYTE const*)src + srcSize - sizeof(U64); + + /* op[] contains the output pointers. */ + args->op[0] = (BYTE*)dst; + args->op[1] = args->op[0] + (dstSize+3)/4; + args->op[2] = args->op[1] + (dstSize+3)/4; + args->op[3] = args->op[2] + (dstSize+3)/4; + + /* No point to call the ASM loop for tiny outputs. */ + if (args->op[3] >= oend) + return 0; + + /* bits[] is the bit container. + * It is read from the MSB down to the LSB. + * It is shifted left as it is read, and zeros are + * shifted in. After the lowest valid bit a 1 is + * set, so that CountTrailingZeros(bits[]) can be used + * to count how many bits we've consumed. + */ + args->bits[0] = HUF_initFastDStream(args->ip[0]); + args->bits[1] = HUF_initFastDStream(args->ip[1]); + args->bits[2] = HUF_initFastDStream(args->ip[2]); + args->bits[3] = HUF_initFastDStream(args->ip[3]); + + /* The decoders must be sure to never read beyond ilowest. + * This is lower than iend[0], but allowing decoders to read + * down to ilowest can allow an extra iteration or two in the + * fast loop. + */ + args->ilowest = istart; + + args->oend = oend; + args->dt = dt; + + return 1; +} + +static size_t HUF_initRemainingDStream(BIT_DStream_t* bit, HUF_DecompressFastArgs const* args, int stream, BYTE* segmentEnd) +{ + /* Validate that we haven't overwritten. */ + if (args->op[stream] > segmentEnd) + return ERROR(corruption_detected); + /* Validate that we haven't read beyond iend[]. + * Note that ip[] may be < iend[] because the MSB is + * the next bit to read, and we may have consumed 100% + * of the stream, so down to iend[i] - 8 is valid. + */ + if (args->ip[stream] < args->iend[stream] - 8) + return ERROR(corruption_detected); + + /* Construct the BIT_DStream_t. */ + assert(sizeof(size_t) == 8); + bit->bitContainer = MEM_readLEST(args->ip[stream]); + bit->bitsConsumed = ZSTD_countTrailingZeros64(args->bits[stream]); + bit->start = (const char*)args->ilowest; + bit->limitPtr = bit->start + sizeof(size_t); + bit->ptr = (const char*)args->ip[stream]; + + return 0; +} + +/* Calls X(N) for each stream 0, 1, 2, 3. */ +#define HUF_4X_FOR_EACH_STREAM(X) \ + do { \ + X(0); \ + X(1); \ + X(2); \ + X(3); \ + } while (0) + +/* Calls X(N, var) for each stream 0, 1, 2, 3. */ +#define HUF_4X_FOR_EACH_STREAM_WITH_VAR(X, var) \ + do { \ + X(0, (var)); \ + X(1, (var)); \ + X(2, (var)); \ + X(3, (var)); \ + } while (0) + + +#ifndef HUF_FORCE_DECOMPRESS_X2 + +/*-***************************/ +/* single-symbol decoding */ +/*-***************************/ +typedef struct { BYTE nbBits; BYTE byte; } HUF_DEltX1; /* single-symbol decoding */ + +/** + * Packs 4 HUF_DEltX1 structs into a U64. This is used to lay down 4 entries at + * a time. + */ +static U64 HUF_DEltX1_set4(BYTE symbol, BYTE nbBits) { + U64 D4; + if (MEM_isLittleEndian()) { + D4 = (U64)((symbol << 8) + nbBits); + } else { + D4 = (U64)(symbol + (nbBits << 8)); + } + assert(D4 < (1U << 16)); + D4 *= 0x0001000100010001ULL; + return D4; +} + +/** + * Increase the tableLog to targetTableLog and rescales the stats. + * If tableLog > targetTableLog this is a no-op. + * @returns New tableLog + */ +static U32 HUF_rescaleStats(BYTE* huffWeight, U32* rankVal, U32 nbSymbols, U32 tableLog, U32 targetTableLog) +{ + if (tableLog > targetTableLog) + return tableLog; + if (tableLog < targetTableLog) { + U32 const scale = targetTableLog - tableLog; + U32 s; + /* Increase the weight for all non-zero probability symbols by scale. */ + for (s = 0; s < nbSymbols; ++s) { + huffWeight[s] += (BYTE)((huffWeight[s] == 0) ? 0 : scale); + } + /* Update rankVal to reflect the new weights. + * All weights except 0 get moved to weight + scale. + * Weights [1, scale] are empty. + */ + for (s = targetTableLog; s > scale; --s) { + rankVal[s] = rankVal[s - scale]; + } + for (s = scale; s > 0; --s) { + rankVal[s] = 0; + } + } + return targetTableLog; +} + +typedef struct { + U32 rankVal[HUF_TABLELOG_ABSOLUTEMAX + 1]; + U32 rankStart[HUF_TABLELOG_ABSOLUTEMAX + 1]; + U32 statsWksp[HUF_READ_STATS_WORKSPACE_SIZE_U32]; + BYTE symbols[HUF_SYMBOLVALUE_MAX + 1]; + BYTE huffWeight[HUF_SYMBOLVALUE_MAX + 1]; +} HUF_ReadDTableX1_Workspace; + +size_t HUF_readDTableX1_wksp(HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize, int flags) +{ + U32 tableLog = 0; + U32 nbSymbols = 0; + size_t iSize; + void* const dtPtr = DTable + 1; + HUF_DEltX1* const dt = (HUF_DEltX1*)dtPtr; + HUF_ReadDTableX1_Workspace* wksp = (HUF_ReadDTableX1_Workspace*)workSpace; + + DEBUG_STATIC_ASSERT(HUF_DECOMPRESS_WORKSPACE_SIZE >= sizeof(*wksp)); + if (sizeof(*wksp) > wkspSize) return ERROR(tableLog_tooLarge); + + DEBUG_STATIC_ASSERT(sizeof(DTableDesc) == sizeof(HUF_DTable)); + /* ZSTD_memset(huffWeight, 0, sizeof(huffWeight)); */ /* is not necessary, even though some analyzer complain ... */ + + iSize = HUF_readStats_wksp(wksp->huffWeight, HUF_SYMBOLVALUE_MAX + 1, wksp->rankVal, &nbSymbols, &tableLog, src, srcSize, wksp->statsWksp, sizeof(wksp->statsWksp), flags); + if (HUF_isError(iSize)) return iSize; + + + /* Table header */ + { DTableDesc dtd = HUF_getDTableDesc(DTable); + U32 const maxTableLog = dtd.maxTableLog + 1; + U32 const targetTableLog = MIN(maxTableLog, HUF_DECODER_FAST_TABLELOG); + tableLog = HUF_rescaleStats(wksp->huffWeight, wksp->rankVal, nbSymbols, tableLog, targetTableLog); + if (tableLog > (U32)(dtd.maxTableLog+1)) return ERROR(tableLog_tooLarge); /* DTable too small, Huffman tree cannot fit in */ + dtd.tableType = 0; + dtd.tableLog = (BYTE)tableLog; + ZSTD_memcpy(DTable, &dtd, sizeof(dtd)); + } + + /* Compute symbols and rankStart given rankVal: + * + * rankVal already contains the number of values of each weight. + * + * symbols contains the symbols ordered by weight. First are the rankVal[0] + * weight 0 symbols, followed by the rankVal[1] weight 1 symbols, and so on. + * symbols[0] is filled (but unused) to avoid a branch. + * + * rankStart contains the offset where each rank belongs in the DTable. + * rankStart[0] is not filled because there are no entries in the table for + * weight 0. + */ + { int n; + U32 nextRankStart = 0; + int const unroll = 4; + int const nLimit = (int)nbSymbols - unroll + 1; + for (n=0; n<(int)tableLog+1; n++) { + U32 const curr = nextRankStart; + nextRankStart += wksp->rankVal[n]; + wksp->rankStart[n] = curr; + } + for (n=0; n < nLimit; n += unroll) { + int u; + for (u=0; u < unroll; ++u) { + size_t const w = wksp->huffWeight[n+u]; + wksp->symbols[wksp->rankStart[w]++] = (BYTE)(n+u); + } + } + for (; n < (int)nbSymbols; ++n) { + size_t const w = wksp->huffWeight[n]; + wksp->symbols[wksp->rankStart[w]++] = (BYTE)n; + } + } + + /* fill DTable + * We fill all entries of each weight in order. + * That way length is a constant for each iteration of the outer loop. + * We can switch based on the length to a different inner loop which is + * optimized for that particular case. + */ + { U32 w; + int symbol = wksp->rankVal[0]; + int rankStart = 0; + for (w=1; wrankVal[w]; + int const length = (1 << w) >> 1; + int uStart = rankStart; + BYTE const nbBits = (BYTE)(tableLog + 1 - w); + int s; + int u; + switch (length) { + case 1: + for (s=0; ssymbols[symbol + s]; + D.nbBits = nbBits; + dt[uStart] = D; + uStart += 1; + } + break; + case 2: + for (s=0; ssymbols[symbol + s]; + D.nbBits = nbBits; + dt[uStart+0] = D; + dt[uStart+1] = D; + uStart += 2; + } + break; + case 4: + for (s=0; ssymbols[symbol + s], nbBits); + MEM_write64(dt + uStart, D4); + uStart += 4; + } + break; + case 8: + for (s=0; ssymbols[symbol + s], nbBits); + MEM_write64(dt + uStart, D4); + MEM_write64(dt + uStart + 4, D4); + uStart += 8; + } + break; + default: + for (s=0; ssymbols[symbol + s], nbBits); + for (u=0; u < length; u += 16) { + MEM_write64(dt + uStart + u + 0, D4); + MEM_write64(dt + uStart + u + 4, D4); + MEM_write64(dt + uStart + u + 8, D4); + MEM_write64(dt + uStart + u + 12, D4); + } + assert(u == length); + uStart += length; + } + break; + } + symbol += symbolCount; + rankStart += symbolCount * length; + } + } + return iSize; +} + +FORCE_INLINE_TEMPLATE BYTE +HUF_decodeSymbolX1(BIT_DStream_t* Dstream, const HUF_DEltX1* dt, const U32 dtLog) +{ + size_t const val = BIT_lookBitsFast(Dstream, dtLog); /* note : dtLog >= 1 */ + BYTE const c = dt[val].byte; + BIT_skipBits(Dstream, dt[val].nbBits); + return c; +} + +#define HUF_DECODE_SYMBOLX1_0(ptr, DStreamPtr) \ + do { *ptr++ = HUF_decodeSymbolX1(DStreamPtr, dt, dtLog); } while (0) + +#define HUF_DECODE_SYMBOLX1_1(ptr, DStreamPtr) \ + do { \ + if (MEM_64bits() || (HUF_TABLELOG_MAX<=12)) \ + HUF_DECODE_SYMBOLX1_0(ptr, DStreamPtr); \ + } while (0) + +#define HUF_DECODE_SYMBOLX1_2(ptr, DStreamPtr) \ + do { \ + if (MEM_64bits()) \ + HUF_DECODE_SYMBOLX1_0(ptr, DStreamPtr); \ + } while (0) + +HINT_INLINE size_t +HUF_decodeStreamX1(BYTE* p, BIT_DStream_t* const bitDPtr, BYTE* const pEnd, const HUF_DEltX1* const dt, const U32 dtLog) +{ + BYTE* const pStart = p; + + /* up to 4 symbols at a time */ + if ((pEnd - p) > 3) { + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd-3)) { + HUF_DECODE_SYMBOLX1_2(p, bitDPtr); + HUF_DECODE_SYMBOLX1_1(p, bitDPtr); + HUF_DECODE_SYMBOLX1_2(p, bitDPtr); + HUF_DECODE_SYMBOLX1_0(p, bitDPtr); + } + } else { + BIT_reloadDStream(bitDPtr); + } + + /* [0-3] symbols remaining */ + if (MEM_32bits()) + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd)) + HUF_DECODE_SYMBOLX1_0(p, bitDPtr); + + /* no more data to retrieve from bitstream, no need to reload */ + while (p < pEnd) + HUF_DECODE_SYMBOLX1_0(p, bitDPtr); + + return (size_t)(pEnd-pStart); +} + +FORCE_INLINE_TEMPLATE size_t +HUF_decompress1X1_usingDTable_internal_body( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const HUF_DTable* DTable) +{ + BYTE* op = (BYTE*)dst; + BYTE* const oend = ZSTD_maybeNullPtrAdd(op, dstSize); + const void* dtPtr = DTable + 1; + const HUF_DEltX1* const dt = (const HUF_DEltX1*)dtPtr; + BIT_DStream_t bitD; + DTableDesc const dtd = HUF_getDTableDesc(DTable); + U32 const dtLog = dtd.tableLog; + + CHECK_F( BIT_initDStream(&bitD, cSrc, cSrcSize) ); + + HUF_decodeStreamX1(op, &bitD, oend, dt, dtLog); + + if (!BIT_endOfDStream(&bitD)) return ERROR(corruption_detected); + + return dstSize; +} + +/* HUF_decompress4X1_usingDTable_internal_body(): + * Conditions : + * @dstSize >= 6 + */ +FORCE_INLINE_TEMPLATE size_t +HUF_decompress4X1_usingDTable_internal_body( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const HUF_DTable* DTable) +{ + /* Check */ + if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ + if (dstSize < 6) return ERROR(corruption_detected); /* stream 4-split doesn't work */ + + { const BYTE* const istart = (const BYTE*) cSrc; + BYTE* const ostart = (BYTE*) dst; + BYTE* const oend = ostart + dstSize; + BYTE* const olimit = oend - 3; + const void* const dtPtr = DTable + 1; + const HUF_DEltX1* const dt = (const HUF_DEltX1*)dtPtr; + + /* Init */ + BIT_DStream_t bitD1; + BIT_DStream_t bitD2; + BIT_DStream_t bitD3; + BIT_DStream_t bitD4; + size_t const length1 = MEM_readLE16(istart); + size_t const length2 = MEM_readLE16(istart+2); + size_t const length3 = MEM_readLE16(istart+4); + size_t const length4 = cSrcSize - (length1 + length2 + length3 + 6); + const BYTE* const istart1 = istart + 6; /* jumpTable */ + const BYTE* const istart2 = istart1 + length1; + const BYTE* const istart3 = istart2 + length2; + const BYTE* const istart4 = istart3 + length3; + const size_t segmentSize = (dstSize+3) / 4; + BYTE* const opStart2 = ostart + segmentSize; + BYTE* const opStart3 = opStart2 + segmentSize; + BYTE* const opStart4 = opStart3 + segmentSize; + BYTE* op1 = ostart; + BYTE* op2 = opStart2; + BYTE* op3 = opStart3; + BYTE* op4 = opStart4; + DTableDesc const dtd = HUF_getDTableDesc(DTable); + U32 const dtLog = dtd.tableLog; + U32 endSignal = 1; + + if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ + if (opStart4 > oend) return ERROR(corruption_detected); /* overflow */ + assert(dstSize >= 6); /* validated above */ + CHECK_F( BIT_initDStream(&bitD1, istart1, length1) ); + CHECK_F( BIT_initDStream(&bitD2, istart2, length2) ); + CHECK_F( BIT_initDStream(&bitD3, istart3, length3) ); + CHECK_F( BIT_initDStream(&bitD4, istart4, length4) ); + + /* up to 16 symbols per loop (4 symbols per stream) in 64-bit mode */ + if ((size_t)(oend - op4) >= sizeof(size_t)) { + for ( ; (endSignal) & (op4 < olimit) ; ) { + HUF_DECODE_SYMBOLX1_2(op1, &bitD1); + HUF_DECODE_SYMBOLX1_2(op2, &bitD2); + HUF_DECODE_SYMBOLX1_2(op3, &bitD3); + HUF_DECODE_SYMBOLX1_2(op4, &bitD4); + HUF_DECODE_SYMBOLX1_1(op1, &bitD1); + HUF_DECODE_SYMBOLX1_1(op2, &bitD2); + HUF_DECODE_SYMBOLX1_1(op3, &bitD3); + HUF_DECODE_SYMBOLX1_1(op4, &bitD4); + HUF_DECODE_SYMBOLX1_2(op1, &bitD1); + HUF_DECODE_SYMBOLX1_2(op2, &bitD2); + HUF_DECODE_SYMBOLX1_2(op3, &bitD3); + HUF_DECODE_SYMBOLX1_2(op4, &bitD4); + HUF_DECODE_SYMBOLX1_0(op1, &bitD1); + HUF_DECODE_SYMBOLX1_0(op2, &bitD2); + HUF_DECODE_SYMBOLX1_0(op3, &bitD3); + HUF_DECODE_SYMBOLX1_0(op4, &bitD4); + endSignal &= BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished; + } + } + + /* check corruption */ + /* note : should not be necessary : op# advance in lock step, and we control op4. + * but curiously, binary generated by gcc 7.2 & 7.3 with -mbmi2 runs faster when >=1 test is present */ + if (op1 > opStart2) return ERROR(corruption_detected); + if (op2 > opStart3) return ERROR(corruption_detected); + if (op3 > opStart4) return ERROR(corruption_detected); + /* note : op4 supposed already verified within main loop */ + + /* finish bitStreams one by one */ + HUF_decodeStreamX1(op1, &bitD1, opStart2, dt, dtLog); + HUF_decodeStreamX1(op2, &bitD2, opStart3, dt, dtLog); + HUF_decodeStreamX1(op3, &bitD3, opStart4, dt, dtLog); + HUF_decodeStreamX1(op4, &bitD4, oend, dt, dtLog); + + /* check */ + { U32 const endCheck = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); + if (!endCheck) return ERROR(corruption_detected); } + + /* decoded size */ + return dstSize; + } +} + +#if HUF_NEED_BMI2_FUNCTION +static BMI2_TARGET_ATTRIBUTE +size_t HUF_decompress4X1_usingDTable_internal_bmi2(void* dst, size_t dstSize, void const* cSrc, + size_t cSrcSize, HUF_DTable const* DTable) { + return HUF_decompress4X1_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); +} +#endif + +static +size_t HUF_decompress4X1_usingDTable_internal_default(void* dst, size_t dstSize, void const* cSrc, + size_t cSrcSize, HUF_DTable const* DTable) { + return HUF_decompress4X1_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); +} + +#if ZSTD_ENABLE_ASM_X86_64_BMI2 + +HUF_ASM_DECL void HUF_decompress4X1_usingDTable_internal_fast_asm_loop(HUF_DecompressFastArgs* args) ZSTDLIB_HIDDEN; + +#endif + +static HUF_FAST_BMI2_ATTRS +void HUF_decompress4X1_usingDTable_internal_fast_c_loop(HUF_DecompressFastArgs* args) +{ + U64 bits[4]; + BYTE const* ip[4]; + BYTE* op[4]; + U16 const* const dtable = (U16 const*)args->dt; + BYTE* const oend = args->oend; + BYTE const* const ilowest = args->ilowest; + + /* Copy the arguments to local variables */ + ZSTD_memcpy(&bits, &args->bits, sizeof(bits)); + ZSTD_memcpy((void*)(&ip), &args->ip, sizeof(ip)); + ZSTD_memcpy(&op, &args->op, sizeof(op)); + + assert(MEM_isLittleEndian()); + assert(!MEM_32bits()); + + for (;;) { + BYTE* olimit; + int stream; + + /* Assert loop preconditions */ +#ifndef NDEBUG + for (stream = 0; stream < 4; ++stream) { + assert(op[stream] <= (stream == 3 ? oend : op[stream + 1])); + assert(ip[stream] >= ilowest); + } +#endif + /* Compute olimit */ + { + /* Each iteration produces 5 output symbols per stream */ + size_t const oiters = (size_t)(oend - op[3]) / 5; + /* Each iteration consumes up to 11 bits * 5 = 55 bits < 7 bytes + * per stream. + */ + size_t const iiters = (size_t)(ip[0] - ilowest) / 7; + /* We can safely run iters iterations before running bounds checks */ + size_t const iters = MIN(oiters, iiters); + size_t const symbols = iters * 5; + + /* We can simply check that op[3] < olimit, instead of checking all + * of our bounds, since we can't hit the other bounds until we've run + * iters iterations, which only happens when op[3] == olimit. + */ + olimit = op[3] + symbols; + + /* Exit fast decoding loop once we reach the end. */ + if (op[3] == olimit) + break; + + /* Exit the decoding loop if any input pointer has crossed the + * previous one. This indicates corruption, and a precondition + * to our loop is that ip[i] >= ip[0]. + */ + for (stream = 1; stream < 4; ++stream) { + if (ip[stream] < ip[stream - 1]) + goto _out; + } + } + +#ifndef NDEBUG + for (stream = 1; stream < 4; ++stream) { + assert(ip[stream] >= ip[stream - 1]); + } +#endif + +#define HUF_4X1_DECODE_SYMBOL(_stream, _symbol) \ + do { \ + int const index = (int)(bits[(_stream)] >> 53); \ + int const entry = (int)dtable[index]; \ + bits[(_stream)] <<= (entry & 0x3F); \ + op[(_stream)][(_symbol)] = (BYTE)((entry >> 8) & 0xFF); \ + } while (0) + +#define HUF_4X1_RELOAD_STREAM(_stream) \ + do { \ + int const ctz = ZSTD_countTrailingZeros64(bits[(_stream)]); \ + int const nbBits = ctz & 7; \ + int const nbBytes = ctz >> 3; \ + op[(_stream)] += 5; \ + ip[(_stream)] -= nbBytes; \ + bits[(_stream)] = MEM_read64(ip[(_stream)]) | 1; \ + bits[(_stream)] <<= nbBits; \ + } while (0) + + /* Manually unroll the loop because compilers don't consistently + * unroll the inner loops, which destroys performance. + */ + do { + /* Decode 5 symbols in each of the 4 streams */ + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 0); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 1); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 2); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 3); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X1_DECODE_SYMBOL, 4); + + /* Reload each of the 4 the bitstreams */ + HUF_4X_FOR_EACH_STREAM(HUF_4X1_RELOAD_STREAM); + } while (op[3] < olimit); + +#undef HUF_4X1_DECODE_SYMBOL +#undef HUF_4X1_RELOAD_STREAM + } + +_out: + + /* Save the final values of each of the state variables back to args. */ + ZSTD_memcpy(&args->bits, &bits, sizeof(bits)); + ZSTD_memcpy((void*)(&args->ip), &ip, sizeof(ip)); + ZSTD_memcpy(&args->op, &op, sizeof(op)); +} + +/** + * @returns @p dstSize on success (>= 6) + * 0 if the fallback implementation should be used + * An error if an error occurred + */ +static HUF_FAST_BMI2_ATTRS +size_t +HUF_decompress4X1_usingDTable_internal_fast( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const HUF_DTable* DTable, + HUF_DecompressFastLoopFn loopFn) +{ + void const* dt = DTable + 1; + BYTE const* const ilowest = (BYTE const*)cSrc; + BYTE* const oend = ZSTD_maybeNullPtrAdd((BYTE*)dst, dstSize); + HUF_DecompressFastArgs args; + { size_t const ret = HUF_DecompressFastArgs_init(&args, dst, dstSize, cSrc, cSrcSize, DTable); + FORWARD_IF_ERROR(ret, "Failed to init fast loop args"); + if (ret == 0) + return 0; + } + + assert(args.ip[0] >= args.ilowest); + loopFn(&args); + + /* Our loop guarantees that ip[] >= ilowest and that we haven't + * overwritten any op[]. + */ + assert(args.ip[0] >= ilowest); + assert(args.ip[0] >= ilowest); + assert(args.ip[1] >= ilowest); + assert(args.ip[2] >= ilowest); + assert(args.ip[3] >= ilowest); + assert(args.op[3] <= oend); + + assert(ilowest == args.ilowest); + assert(ilowest + 6 == args.iend[0]); + (void)ilowest; + + /* finish bit streams one by one. */ + { size_t const segmentSize = (dstSize+3) / 4; + BYTE* segmentEnd = (BYTE*)dst; + int i; + for (i = 0; i < 4; ++i) { + BIT_DStream_t bit; + if (segmentSize <= (size_t)(oend - segmentEnd)) + segmentEnd += segmentSize; + else + segmentEnd = oend; + FORWARD_IF_ERROR(HUF_initRemainingDStream(&bit, &args, i, segmentEnd), "corruption"); + /* Decompress and validate that we've produced exactly the expected length. */ + args.op[i] += HUF_decodeStreamX1(args.op[i], &bit, segmentEnd, (HUF_DEltX1 const*)dt, HUF_DECODER_FAST_TABLELOG); + if (args.op[i] != segmentEnd) return ERROR(corruption_detected); + } + } + + /* decoded size */ + assert(dstSize != 0); + return dstSize; +} + +HUF_DGEN(HUF_decompress1X1_usingDTable_internal) + +static size_t HUF_decompress4X1_usingDTable_internal(void* dst, size_t dstSize, void const* cSrc, + size_t cSrcSize, HUF_DTable const* DTable, int flags) +{ + HUF_DecompressUsingDTableFn fallbackFn = HUF_decompress4X1_usingDTable_internal_default; + HUF_DecompressFastLoopFn loopFn = HUF_decompress4X1_usingDTable_internal_fast_c_loop; + +#if DYNAMIC_BMI2 + if (flags & HUF_flags_bmi2) { + fallbackFn = HUF_decompress4X1_usingDTable_internal_bmi2; +# if ZSTD_ENABLE_ASM_X86_64_BMI2 + if (!(flags & HUF_flags_disableAsm)) { + loopFn = HUF_decompress4X1_usingDTable_internal_fast_asm_loop; + } +# endif + } else { + return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); + } +#endif + +#if ZSTD_ENABLE_ASM_X86_64_BMI2 && defined(__BMI2__) + if (!(flags & HUF_flags_disableAsm)) { + loopFn = HUF_decompress4X1_usingDTable_internal_fast_asm_loop; + } +#endif + + if (HUF_ENABLE_FAST_DECODE && !(flags & HUF_flags_disableFast)) { + size_t const ret = HUF_decompress4X1_usingDTable_internal_fast(dst, dstSize, cSrc, cSrcSize, DTable, loopFn); + if (ret != 0) + return ret; + } + return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); +} + +static size_t HUF_decompress4X1_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + void* workSpace, size_t wkspSize, int flags) +{ + const BYTE* ip = (const BYTE*) cSrc; + + size_t const hSize = HUF_readDTableX1_wksp(dctx, cSrc, cSrcSize, workSpace, wkspSize, flags); + if (HUF_isError(hSize)) return hSize; + if (hSize >= cSrcSize) return ERROR(srcSize_wrong); + ip += hSize; cSrcSize -= hSize; + + return HUF_decompress4X1_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx, flags); +} + +#endif /* HUF_FORCE_DECOMPRESS_X2 */ + + +#ifndef HUF_FORCE_DECOMPRESS_X1 + +/* *************************/ +/* double-symbols decoding */ +/* *************************/ + +typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX2; /* double-symbols decoding */ +typedef struct { BYTE symbol; } sortedSymbol_t; +typedef U32 rankValCol_t[HUF_TABLELOG_MAX + 1]; +typedef rankValCol_t rankVal_t[HUF_TABLELOG_MAX]; + +/** + * Constructs a HUF_DEltX2 in a U32. + */ +static U32 HUF_buildDEltX2U32(U32 symbol, U32 nbBits, U32 baseSeq, int level) +{ + U32 seq; + DEBUG_STATIC_ASSERT(offsetof(HUF_DEltX2, sequence) == 0); + DEBUG_STATIC_ASSERT(offsetof(HUF_DEltX2, nbBits) == 2); + DEBUG_STATIC_ASSERT(offsetof(HUF_DEltX2, length) == 3); + DEBUG_STATIC_ASSERT(sizeof(HUF_DEltX2) == sizeof(U32)); + if (MEM_isLittleEndian()) { + seq = level == 1 ? symbol : (baseSeq + (symbol << 8)); + return seq + (nbBits << 16) + ((U32)level << 24); + } else { + seq = level == 1 ? (symbol << 8) : ((baseSeq << 8) + symbol); + return (seq << 16) + (nbBits << 8) + (U32)level; + } +} + +/** + * Constructs a HUF_DEltX2. + */ +static HUF_DEltX2 HUF_buildDEltX2(U32 symbol, U32 nbBits, U32 baseSeq, int level) +{ + HUF_DEltX2 DElt; + U32 const val = HUF_buildDEltX2U32(symbol, nbBits, baseSeq, level); + DEBUG_STATIC_ASSERT(sizeof(DElt) == sizeof(val)); + ZSTD_memcpy(&DElt, &val, sizeof(val)); + return DElt; +} + +/** + * Constructs 2 HUF_DEltX2s and packs them into a U64. + */ +static U64 HUF_buildDEltX2U64(U32 symbol, U32 nbBits, U16 baseSeq, int level) +{ + U32 DElt = HUF_buildDEltX2U32(symbol, nbBits, baseSeq, level); + return (U64)DElt + ((U64)DElt << 32); +} + +/** + * Fills the DTable rank with all the symbols from [begin, end) that are each + * nbBits long. + * + * @param DTableRank The start of the rank in the DTable. + * @param begin The first symbol to fill (inclusive). + * @param end The last symbol to fill (exclusive). + * @param nbBits Each symbol is nbBits long. + * @param tableLog The table log. + * @param baseSeq If level == 1 { 0 } else { the first level symbol } + * @param level The level in the table. Must be 1 or 2. + */ +static void HUF_fillDTableX2ForWeight( + HUF_DEltX2* DTableRank, + sortedSymbol_t const* begin, sortedSymbol_t const* end, + U32 nbBits, U32 tableLog, + U16 baseSeq, int const level) +{ + U32 const length = 1U << ((tableLog - nbBits) & 0x1F /* quiet static-analyzer */); + const sortedSymbol_t* ptr; + assert(level >= 1 && level <= 2); + switch (length) { + case 1: + for (ptr = begin; ptr != end; ++ptr) { + HUF_DEltX2 const DElt = HUF_buildDEltX2(ptr->symbol, nbBits, baseSeq, level); + *DTableRank++ = DElt; + } + break; + case 2: + for (ptr = begin; ptr != end; ++ptr) { + HUF_DEltX2 const DElt = HUF_buildDEltX2(ptr->symbol, nbBits, baseSeq, level); + DTableRank[0] = DElt; + DTableRank[1] = DElt; + DTableRank += 2; + } + break; + case 4: + for (ptr = begin; ptr != end; ++ptr) { + U64 const DEltX2 = HUF_buildDEltX2U64(ptr->symbol, nbBits, baseSeq, level); + ZSTD_memcpy(DTableRank + 0, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTableRank + 2, &DEltX2, sizeof(DEltX2)); + DTableRank += 4; + } + break; + case 8: + for (ptr = begin; ptr != end; ++ptr) { + U64 const DEltX2 = HUF_buildDEltX2U64(ptr->symbol, nbBits, baseSeq, level); + ZSTD_memcpy(DTableRank + 0, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTableRank + 2, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTableRank + 4, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTableRank + 6, &DEltX2, sizeof(DEltX2)); + DTableRank += 8; + } + break; + default: + for (ptr = begin; ptr != end; ++ptr) { + U64 const DEltX2 = HUF_buildDEltX2U64(ptr->symbol, nbBits, baseSeq, level); + HUF_DEltX2* const DTableRankEnd = DTableRank + length; + for (; DTableRank != DTableRankEnd; DTableRank += 8) { + ZSTD_memcpy(DTableRank + 0, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTableRank + 2, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTableRank + 4, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTableRank + 6, &DEltX2, sizeof(DEltX2)); + } + } + break; + } +} + +/* HUF_fillDTableX2Level2() : + * `rankValOrigin` must be a table of at least (HUF_TABLELOG_MAX + 1) U32 */ +static void HUF_fillDTableX2Level2(HUF_DEltX2* DTable, U32 targetLog, const U32 consumedBits, + const U32* rankVal, const int minWeight, const int maxWeight1, + const sortedSymbol_t* sortedSymbols, U32 const* rankStart, + U32 nbBitsBaseline, U16 baseSeq) +{ + /* Fill skipped values (all positions up to rankVal[minWeight]). + * These are positions only get a single symbol because the combined weight + * is too large. + */ + if (minWeight>1) { + U32 const length = 1U << ((targetLog - consumedBits) & 0x1F /* quiet static-analyzer */); + U64 const DEltX2 = HUF_buildDEltX2U64(baseSeq, consumedBits, /* baseSeq */ 0, /* level */ 1); + int const skipSize = rankVal[minWeight]; + assert(length > 1); + assert((U32)skipSize < length); + switch (length) { + case 2: + assert(skipSize == 1); + ZSTD_memcpy(DTable, &DEltX2, sizeof(DEltX2)); + break; + case 4: + assert(skipSize <= 4); + ZSTD_memcpy(DTable + 0, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTable + 2, &DEltX2, sizeof(DEltX2)); + break; + default: + { + int i; + for (i = 0; i < skipSize; i += 8) { + ZSTD_memcpy(DTable + i + 0, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTable + i + 2, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTable + i + 4, &DEltX2, sizeof(DEltX2)); + ZSTD_memcpy(DTable + i + 6, &DEltX2, sizeof(DEltX2)); + } + } + } + } + + /* Fill each of the second level symbols by weight. */ + { + int w; + for (w = minWeight; w < maxWeight1; ++w) { + int const begin = rankStart[w]; + int const end = rankStart[w+1]; + U32 const nbBits = nbBitsBaseline - w; + U32 const totalBits = nbBits + consumedBits; + HUF_fillDTableX2ForWeight( + DTable + rankVal[w], + sortedSymbols + begin, sortedSymbols + end, + totalBits, targetLog, + baseSeq, /* level */ 2); + } + } +} + +static void HUF_fillDTableX2(HUF_DEltX2* DTable, const U32 targetLog, + const sortedSymbol_t* sortedList, + const U32* rankStart, rankValCol_t* rankValOrigin, const U32 maxWeight, + const U32 nbBitsBaseline) +{ + U32* const rankVal = rankValOrigin[0]; + const int scaleLog = nbBitsBaseline - targetLog; /* note : targetLog >= srcLog, hence scaleLog <= 1 */ + const U32 minBits = nbBitsBaseline - maxWeight; + int w; + int const wEnd = (int)maxWeight + 1; + + /* Fill DTable in order of weight. */ + for (w = 1; w < wEnd; ++w) { + int const begin = (int)rankStart[w]; + int const end = (int)rankStart[w+1]; + U32 const nbBits = nbBitsBaseline - w; + + if (targetLog-nbBits >= minBits) { + /* Enough room for a second symbol. */ + int start = rankVal[w]; + U32 const length = 1U << ((targetLog - nbBits) & 0x1F /* quiet static-analyzer */); + int minWeight = nbBits + scaleLog; + int s; + if (minWeight < 1) minWeight = 1; + /* Fill the DTable for every symbol of weight w. + * These symbols get at least 1 second symbol. + */ + for (s = begin; s != end; ++s) { + HUF_fillDTableX2Level2( + DTable + start, targetLog, nbBits, + rankValOrigin[nbBits], minWeight, wEnd, + sortedList, rankStart, + nbBitsBaseline, sortedList[s].symbol); + start += length; + } + } else { + /* Only a single symbol. */ + HUF_fillDTableX2ForWeight( + DTable + rankVal[w], + sortedList + begin, sortedList + end, + nbBits, targetLog, + /* baseSeq */ 0, /* level */ 1); + } + } +} + +typedef struct { + rankValCol_t rankVal[HUF_TABLELOG_MAX]; + U32 rankStats[HUF_TABLELOG_MAX + 1]; + U32 rankStart0[HUF_TABLELOG_MAX + 3]; + sortedSymbol_t sortedSymbol[HUF_SYMBOLVALUE_MAX + 1]; + BYTE weightList[HUF_SYMBOLVALUE_MAX + 1]; + U32 calleeWksp[HUF_READ_STATS_WORKSPACE_SIZE_U32]; +} HUF_ReadDTableX2_Workspace; + +size_t HUF_readDTableX2_wksp(HUF_DTable* DTable, + const void* src, size_t srcSize, + void* workSpace, size_t wkspSize, int flags) +{ + U32 tableLog, maxW, nbSymbols; + DTableDesc dtd = HUF_getDTableDesc(DTable); + U32 maxTableLog = dtd.maxTableLog; + size_t iSize; + void* dtPtr = DTable+1; /* force compiler to avoid strict-aliasing */ + HUF_DEltX2* const dt = (HUF_DEltX2*)dtPtr; + U32 *rankStart; + + HUF_ReadDTableX2_Workspace* const wksp = (HUF_ReadDTableX2_Workspace*)workSpace; + + if (sizeof(*wksp) > wkspSize) return ERROR(GENERIC); + + rankStart = wksp->rankStart0 + 1; + ZSTD_memset(wksp->rankStats, 0, sizeof(wksp->rankStats)); + ZSTD_memset(wksp->rankStart0, 0, sizeof(wksp->rankStart0)); + + DEBUG_STATIC_ASSERT(sizeof(HUF_DEltX2) == sizeof(HUF_DTable)); /* if compiler fails here, assertion is wrong */ + if (maxTableLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge); + /* ZSTD_memset(weightList, 0, sizeof(weightList)); */ /* is not necessary, even though some analyzer complain ... */ + + iSize = HUF_readStats_wksp(wksp->weightList, HUF_SYMBOLVALUE_MAX + 1, wksp->rankStats, &nbSymbols, &tableLog, src, srcSize, wksp->calleeWksp, sizeof(wksp->calleeWksp), flags); + if (HUF_isError(iSize)) return iSize; + + /* check result */ + if (tableLog > maxTableLog) return ERROR(tableLog_tooLarge); /* DTable can't fit code depth */ + if (tableLog <= HUF_DECODER_FAST_TABLELOG && maxTableLog > HUF_DECODER_FAST_TABLELOG) maxTableLog = HUF_DECODER_FAST_TABLELOG; + + /* find maxWeight */ + for (maxW = tableLog; wksp->rankStats[maxW]==0; maxW--) {} /* necessarily finds a solution before 0 */ + + /* Get start index of each weight */ + { U32 w, nextRankStart = 0; + for (w=1; wrankStats[w]; + rankStart[w] = curr; + } + rankStart[0] = nextRankStart; /* put all 0w symbols at the end of sorted list*/ + rankStart[maxW+1] = nextRankStart; + } + + /* sort symbols by weight */ + { U32 s; + for (s=0; sweightList[s]; + U32 const r = rankStart[w]++; + wksp->sortedSymbol[r].symbol = (BYTE)s; + } + rankStart[0] = 0; /* forget 0w symbols; this is beginning of weight(1) */ + } + + /* Build rankVal */ + { U32* const rankVal0 = wksp->rankVal[0]; + { int const rescale = (maxTableLog-tableLog) - 1; /* tableLog <= maxTableLog */ + U32 nextRankVal = 0; + U32 w; + for (w=1; wrankStats[w] << (w+rescale); + rankVal0[w] = curr; + } } + { U32 const minBits = tableLog+1 - maxW; + U32 consumed; + for (consumed = minBits; consumed < maxTableLog - minBits + 1; consumed++) { + U32* const rankValPtr = wksp->rankVal[consumed]; + U32 w; + for (w = 1; w < maxW+1; w++) { + rankValPtr[w] = rankVal0[w] >> consumed; + } } } } + + HUF_fillDTableX2(dt, maxTableLog, + wksp->sortedSymbol, + wksp->rankStart0, wksp->rankVal, maxW, + tableLog+1); + + dtd.tableLog = (BYTE)maxTableLog; + dtd.tableType = 1; + ZSTD_memcpy(DTable, &dtd, sizeof(dtd)); + return iSize; +} + + +FORCE_INLINE_TEMPLATE U32 +HUF_decodeSymbolX2(void* op, BIT_DStream_t* DStream, const HUF_DEltX2* dt, const U32 dtLog) +{ + size_t const val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ + ZSTD_memcpy(op, &dt[val].sequence, 2); + BIT_skipBits(DStream, dt[val].nbBits); + return dt[val].length; +} + +FORCE_INLINE_TEMPLATE U32 +HUF_decodeLastSymbolX2(void* op, BIT_DStream_t* DStream, const HUF_DEltX2* dt, const U32 dtLog) +{ + size_t const val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ + ZSTD_memcpy(op, &dt[val].sequence, 1); + if (dt[val].length==1) { + BIT_skipBits(DStream, dt[val].nbBits); + } else { + if (DStream->bitsConsumed < (sizeof(DStream->bitContainer)*8)) { + BIT_skipBits(DStream, dt[val].nbBits); + if (DStream->bitsConsumed > (sizeof(DStream->bitContainer)*8)) + /* ugly hack; works only because it's the last symbol. Note : can't easily extract nbBits from just this symbol */ + DStream->bitsConsumed = (sizeof(DStream->bitContainer)*8); + } + } + return 1; +} + +#define HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) \ + do { ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog); } while (0) + +#define HUF_DECODE_SYMBOLX2_1(ptr, DStreamPtr) \ + do { \ + if (MEM_64bits() || (HUF_TABLELOG_MAX<=12)) \ + ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog); \ + } while (0) + +#define HUF_DECODE_SYMBOLX2_2(ptr, DStreamPtr) \ + do { \ + if (MEM_64bits()) \ + ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog); \ + } while (0) + +HINT_INLINE size_t +HUF_decodeStreamX2(BYTE* p, BIT_DStream_t* bitDPtr, BYTE* const pEnd, + const HUF_DEltX2* const dt, const U32 dtLog) +{ + BYTE* const pStart = p; + + /* up to 8 symbols at a time */ + if ((size_t)(pEnd - p) >= sizeof(bitDPtr->bitContainer)) { + if (dtLog <= 11 && MEM_64bits()) { + /* up to 10 symbols at a time */ + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd-9)) { + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + } + } else { + /* up to 8 symbols at a time */ + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p < pEnd-(sizeof(bitDPtr->bitContainer)-1))) { + HUF_DECODE_SYMBOLX2_2(p, bitDPtr); + HUF_DECODE_SYMBOLX2_1(p, bitDPtr); + HUF_DECODE_SYMBOLX2_2(p, bitDPtr); + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + } + } + } else { + BIT_reloadDStream(bitDPtr); + } + + /* closer to end : up to 2 symbols at a time */ + if ((size_t)(pEnd - p) >= 2) { + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) & (p <= pEnd-2)) + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + + while (p <= pEnd-2) + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); /* no need to reload : reached the end of DStream */ + } + + if (p < pEnd) + p += HUF_decodeLastSymbolX2(p, bitDPtr, dt, dtLog); + + return p-pStart; +} + +FORCE_INLINE_TEMPLATE size_t +HUF_decompress1X2_usingDTable_internal_body( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const HUF_DTable* DTable) +{ + BIT_DStream_t bitD; + + /* Init */ + CHECK_F( BIT_initDStream(&bitD, cSrc, cSrcSize) ); + + /* decode */ + { BYTE* const ostart = (BYTE*) dst; + BYTE* const oend = ZSTD_maybeNullPtrAdd(ostart, dstSize); + const void* const dtPtr = DTable+1; /* force compiler to not use strict-aliasing */ + const HUF_DEltX2* const dt = (const HUF_DEltX2*)dtPtr; + DTableDesc const dtd = HUF_getDTableDesc(DTable); + HUF_decodeStreamX2(ostart, &bitD, oend, dt, dtd.tableLog); + } + + /* check */ + if (!BIT_endOfDStream(&bitD)) return ERROR(corruption_detected); + + /* decoded size */ + return dstSize; +} + +/* HUF_decompress4X2_usingDTable_internal_body(): + * Conditions: + * @dstSize >= 6 + */ +FORCE_INLINE_TEMPLATE size_t +HUF_decompress4X2_usingDTable_internal_body( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const HUF_DTable* DTable) +{ + if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ + if (dstSize < 6) return ERROR(corruption_detected); /* stream 4-split doesn't work */ + + { const BYTE* const istart = (const BYTE*) cSrc; + BYTE* const ostart = (BYTE*) dst; + BYTE* const oend = ostart + dstSize; + BYTE* const olimit = oend - (sizeof(size_t)-1); + const void* const dtPtr = DTable+1; + const HUF_DEltX2* const dt = (const HUF_DEltX2*)dtPtr; + + /* Init */ + BIT_DStream_t bitD1; + BIT_DStream_t bitD2; + BIT_DStream_t bitD3; + BIT_DStream_t bitD4; + size_t const length1 = MEM_readLE16(istart); + size_t const length2 = MEM_readLE16(istart+2); + size_t const length3 = MEM_readLE16(istart+4); + size_t const length4 = cSrcSize - (length1 + length2 + length3 + 6); + const BYTE* const istart1 = istart + 6; /* jumpTable */ + const BYTE* const istart2 = istart1 + length1; + const BYTE* const istart3 = istart2 + length2; + const BYTE* const istart4 = istart3 + length3; + size_t const segmentSize = (dstSize+3) / 4; + BYTE* const opStart2 = ostart + segmentSize; + BYTE* const opStart3 = opStart2 + segmentSize; + BYTE* const opStart4 = opStart3 + segmentSize; + BYTE* op1 = ostart; + BYTE* op2 = opStart2; + BYTE* op3 = opStart3; + BYTE* op4 = opStart4; + U32 endSignal = 1; + DTableDesc const dtd = HUF_getDTableDesc(DTable); + U32 const dtLog = dtd.tableLog; + + if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ + if (opStart4 > oend) return ERROR(corruption_detected); /* overflow */ + assert(dstSize >= 6 /* validated above */); + CHECK_F( BIT_initDStream(&bitD1, istart1, length1) ); + CHECK_F( BIT_initDStream(&bitD2, istart2, length2) ); + CHECK_F( BIT_initDStream(&bitD3, istart3, length3) ); + CHECK_F( BIT_initDStream(&bitD4, istart4, length4) ); + + /* 16-32 symbols per loop (4-8 symbols per stream) */ + if ((size_t)(oend - op4) >= sizeof(size_t)) { + for ( ; (endSignal) & (op4 < olimit); ) { +#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_1(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_0(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_1(op2, &bitD2); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_0(op2, &bitD2); + endSignal &= BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished; + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_1(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_0(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_1(op4, &bitD4); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_0(op4, &bitD4); + endSignal &= BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished; + endSignal &= BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished; +#else + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_1(op1, &bitD1); + HUF_DECODE_SYMBOLX2_1(op2, &bitD2); + HUF_DECODE_SYMBOLX2_1(op3, &bitD3); + HUF_DECODE_SYMBOLX2_1(op4, &bitD4); + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_0(op1, &bitD1); + HUF_DECODE_SYMBOLX2_0(op2, &bitD2); + HUF_DECODE_SYMBOLX2_0(op3, &bitD3); + HUF_DECODE_SYMBOLX2_0(op4, &bitD4); + endSignal = (U32)LIKELY((U32) + (BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished) + & (BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished) + & (BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished) + & (BIT_reloadDStreamFast(&bitD4) == BIT_DStream_unfinished)); +#endif + } + } + + /* check corruption */ + if (op1 > opStart2) return ERROR(corruption_detected); + if (op2 > opStart3) return ERROR(corruption_detected); + if (op3 > opStart4) return ERROR(corruption_detected); + /* note : op4 already verified within main loop */ + + /* finish bitStreams one by one */ + HUF_decodeStreamX2(op1, &bitD1, opStart2, dt, dtLog); + HUF_decodeStreamX2(op2, &bitD2, opStart3, dt, dtLog); + HUF_decodeStreamX2(op3, &bitD3, opStart4, dt, dtLog); + HUF_decodeStreamX2(op4, &bitD4, oend, dt, dtLog); + + /* check */ + { U32 const endCheck = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); + if (!endCheck) return ERROR(corruption_detected); } + + /* decoded size */ + return dstSize; + } +} + +#if HUF_NEED_BMI2_FUNCTION +static BMI2_TARGET_ATTRIBUTE +size_t HUF_decompress4X2_usingDTable_internal_bmi2(void* dst, size_t dstSize, void const* cSrc, + size_t cSrcSize, HUF_DTable const* DTable) { + return HUF_decompress4X2_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); +} +#endif + +static +size_t HUF_decompress4X2_usingDTable_internal_default(void* dst, size_t dstSize, void const* cSrc, + size_t cSrcSize, HUF_DTable const* DTable) { + return HUF_decompress4X2_usingDTable_internal_body(dst, dstSize, cSrc, cSrcSize, DTable); +} + +#if ZSTD_ENABLE_ASM_X86_64_BMI2 + +HUF_ASM_DECL void HUF_decompress4X2_usingDTable_internal_fast_asm_loop(HUF_DecompressFastArgs* args) ZSTDLIB_HIDDEN; + +#endif + +static HUF_FAST_BMI2_ATTRS +void HUF_decompress4X2_usingDTable_internal_fast_c_loop(HUF_DecompressFastArgs* args) +{ + U64 bits[4]; + BYTE const* ip[4]; + BYTE* op[4]; + BYTE* oend[4]; + HUF_DEltX2 const* const dtable = (HUF_DEltX2 const*)args->dt; + BYTE const* const ilowest = args->ilowest; + + /* Copy the arguments to local registers. */ + ZSTD_memcpy(&bits, &args->bits, sizeof(bits)); + ZSTD_memcpy((void*)(&ip), &args->ip, sizeof(ip)); + ZSTD_memcpy(&op, &args->op, sizeof(op)); + + oend[0] = op[1]; + oend[1] = op[2]; + oend[2] = op[3]; + oend[3] = args->oend; + + assert(MEM_isLittleEndian()); + assert(!MEM_32bits()); + + for (;;) { + BYTE* olimit; + int stream; + + /* Assert loop preconditions */ +#ifndef NDEBUG + for (stream = 0; stream < 4; ++stream) { + assert(op[stream] <= oend[stream]); + assert(ip[stream] >= ilowest); + } +#endif + /* Compute olimit */ + { + /* Each loop does 5 table lookups for each of the 4 streams. + * Each table lookup consumes up to 11 bits of input, and produces + * up to 2 bytes of output. + */ + /* We can consume up to 7 bytes of input per iteration per stream. + * We also know that each input pointer is >= ip[0]. So we can run + * iters loops before running out of input. + */ + size_t iters = (size_t)(ip[0] - ilowest) / 7; + /* Each iteration can produce up to 10 bytes of output per stream. + * Each output stream my advance at different rates. So take the + * minimum number of safe iterations among all the output streams. + */ + for (stream = 0; stream < 4; ++stream) { + size_t const oiters = (size_t)(oend[stream] - op[stream]) / 10; + iters = MIN(iters, oiters); + } + + /* Each iteration produces at least 5 output symbols. So until + * op[3] crosses olimit, we know we haven't executed iters + * iterations yet. This saves us maintaining an iters counter, + * at the expense of computing the remaining # of iterations + * more frequently. + */ + olimit = op[3] + (iters * 5); + + /* Exit the fast decoding loop once we reach the end. */ + if (op[3] == olimit) + break; + + /* Exit the decoding loop if any input pointer has crossed the + * previous one. This indicates corruption, and a precondition + * to our loop is that ip[i] >= ip[0]. + */ + for (stream = 1; stream < 4; ++stream) { + if (ip[stream] < ip[stream - 1]) + goto _out; + } + } + +#ifndef NDEBUG + for (stream = 1; stream < 4; ++stream) { + assert(ip[stream] >= ip[stream - 1]); + } +#endif + +#define HUF_4X2_DECODE_SYMBOL(_stream, _decode3) \ + do { \ + if ((_decode3) || (_stream) != 3) { \ + int const index = (int)(bits[(_stream)] >> 53); \ + HUF_DEltX2 const entry = dtable[index]; \ + MEM_write16(op[(_stream)], entry.sequence); \ + bits[(_stream)] <<= (entry.nbBits) & 0x3F; \ + op[(_stream)] += (entry.length); \ + } \ + } while (0) + +#define HUF_4X2_RELOAD_STREAM(_stream) \ + do { \ + HUF_4X2_DECODE_SYMBOL(3, 1); \ + { \ + int const ctz = ZSTD_countTrailingZeros64(bits[(_stream)]); \ + int const nbBits = ctz & 7; \ + int const nbBytes = ctz >> 3; \ + ip[(_stream)] -= nbBytes; \ + bits[(_stream)] = MEM_read64(ip[(_stream)]) | 1; \ + bits[(_stream)] <<= nbBits; \ + } \ + } while (0) + + /* Manually unroll the loop because compilers don't consistently + * unroll the inner loops, which destroys performance. + */ + do { + /* Decode 5 symbols from each of the first 3 streams. + * The final stream will be decoded during the reload phase + * to reduce register pressure. + */ + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); + HUF_4X_FOR_EACH_STREAM_WITH_VAR(HUF_4X2_DECODE_SYMBOL, 0); + + /* Decode one symbol from the final stream */ + HUF_4X2_DECODE_SYMBOL(3, 1); + + /* Decode 4 symbols from the final stream & reload bitstreams. + * The final stream is reloaded last, meaning that all 5 symbols + * are decoded from the final stream before it is reloaded. + */ + HUF_4X_FOR_EACH_STREAM(HUF_4X2_RELOAD_STREAM); + } while (op[3] < olimit); + } + +#undef HUF_4X2_DECODE_SYMBOL +#undef HUF_4X2_RELOAD_STREAM + +_out: + + /* Save the final values of each of the state variables back to args. */ + ZSTD_memcpy(&args->bits, &bits, sizeof(bits)); + ZSTD_memcpy((void*)(&args->ip), &ip, sizeof(ip)); + ZSTD_memcpy(&args->op, &op, sizeof(op)); +} + + +static HUF_FAST_BMI2_ATTRS size_t +HUF_decompress4X2_usingDTable_internal_fast( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const HUF_DTable* DTable, + HUF_DecompressFastLoopFn loopFn) { + void const* dt = DTable + 1; + const BYTE* const ilowest = (const BYTE*)cSrc; + BYTE* const oend = ZSTD_maybeNullPtrAdd((BYTE*)dst, dstSize); + HUF_DecompressFastArgs args; + { + size_t const ret = HUF_DecompressFastArgs_init(&args, dst, dstSize, cSrc, cSrcSize, DTable); + FORWARD_IF_ERROR(ret, "Failed to init asm args"); + if (ret == 0) + return 0; + } + + assert(args.ip[0] >= args.ilowest); + loopFn(&args); + + /* note : op4 already verified within main loop */ + assert(args.ip[0] >= ilowest); + assert(args.ip[1] >= ilowest); + assert(args.ip[2] >= ilowest); + assert(args.ip[3] >= ilowest); + assert(args.op[3] <= oend); + + assert(ilowest == args.ilowest); + assert(ilowest + 6 == args.iend[0]); + (void)ilowest; + + /* finish bitStreams one by one */ + { + size_t const segmentSize = (dstSize+3) / 4; + BYTE* segmentEnd = (BYTE*)dst; + int i; + for (i = 0; i < 4; ++i) { + BIT_DStream_t bit; + if (segmentSize <= (size_t)(oend - segmentEnd)) + segmentEnd += segmentSize; + else + segmentEnd = oend; + FORWARD_IF_ERROR(HUF_initRemainingDStream(&bit, &args, i, segmentEnd), "corruption"); + args.op[i] += HUF_decodeStreamX2(args.op[i], &bit, segmentEnd, (HUF_DEltX2 const*)dt, HUF_DECODER_FAST_TABLELOG); + if (args.op[i] != segmentEnd) + return ERROR(corruption_detected); + } + } + + /* decoded size */ + return dstSize; +} + +static size_t HUF_decompress4X2_usingDTable_internal(void* dst, size_t dstSize, void const* cSrc, + size_t cSrcSize, HUF_DTable const* DTable, int flags) +{ + HUF_DecompressUsingDTableFn fallbackFn = HUF_decompress4X2_usingDTable_internal_default; + HUF_DecompressFastLoopFn loopFn = HUF_decompress4X2_usingDTable_internal_fast_c_loop; + +#if DYNAMIC_BMI2 + if (flags & HUF_flags_bmi2) { + fallbackFn = HUF_decompress4X2_usingDTable_internal_bmi2; +# if ZSTD_ENABLE_ASM_X86_64_BMI2 + if (!(flags & HUF_flags_disableAsm)) { + loopFn = HUF_decompress4X2_usingDTable_internal_fast_asm_loop; + } +# endif + } else { + return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); + } +#endif + +#if ZSTD_ENABLE_ASM_X86_64_BMI2 && defined(__BMI2__) + if (!(flags & HUF_flags_disableAsm)) { + loopFn = HUF_decompress4X2_usingDTable_internal_fast_asm_loop; + } +#endif + + if (HUF_ENABLE_FAST_DECODE && !(flags & HUF_flags_disableFast)) { + size_t const ret = HUF_decompress4X2_usingDTable_internal_fast(dst, dstSize, cSrc, cSrcSize, DTable, loopFn); + if (ret != 0) + return ret; + } + return fallbackFn(dst, dstSize, cSrc, cSrcSize, DTable); +} + +HUF_DGEN(HUF_decompress1X2_usingDTable_internal) + +size_t HUF_decompress1X2_DCtx_wksp(HUF_DTable* DCtx, void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + void* workSpace, size_t wkspSize, int flags) +{ + const BYTE* ip = (const BYTE*) cSrc; + + size_t const hSize = HUF_readDTableX2_wksp(DCtx, cSrc, cSrcSize, + workSpace, wkspSize, flags); + if (HUF_isError(hSize)) return hSize; + if (hSize >= cSrcSize) return ERROR(srcSize_wrong); + ip += hSize; cSrcSize -= hSize; + + return HUF_decompress1X2_usingDTable_internal(dst, dstSize, ip, cSrcSize, DCtx, flags); +} + +static size_t HUF_decompress4X2_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + void* workSpace, size_t wkspSize, int flags) +{ + const BYTE* ip = (const BYTE*) cSrc; + + size_t hSize = HUF_readDTableX2_wksp(dctx, cSrc, cSrcSize, + workSpace, wkspSize, flags); + if (HUF_isError(hSize)) return hSize; + if (hSize >= cSrcSize) return ERROR(srcSize_wrong); + ip += hSize; cSrcSize -= hSize; + + return HUF_decompress4X2_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx, flags); +} + +#endif /* HUF_FORCE_DECOMPRESS_X1 */ + + +/* ***********************************/ +/* Universal decompression selectors */ +/* ***********************************/ + + +#if !defined(HUF_FORCE_DECOMPRESS_X1) && !defined(HUF_FORCE_DECOMPRESS_X2) +typedef struct { U32 tableTime; U32 decode256Time; } algo_time_t; +static const algo_time_t algoTime[16 /* Quantization */][2 /* single, double */] = +{ + /* single, double, quad */ + {{0,0}, {1,1}}, /* Q==0 : impossible */ + {{0,0}, {1,1}}, /* Q==1 : impossible */ + {{ 150,216}, { 381,119}}, /* Q == 2 : 12-18% */ + {{ 170,205}, { 514,112}}, /* Q == 3 : 18-25% */ + {{ 177,199}, { 539,110}}, /* Q == 4 : 25-32% */ + {{ 197,194}, { 644,107}}, /* Q == 5 : 32-38% */ + {{ 221,192}, { 735,107}}, /* Q == 6 : 38-44% */ + {{ 256,189}, { 881,106}}, /* Q == 7 : 44-50% */ + {{ 359,188}, {1167,109}}, /* Q == 8 : 50-56% */ + {{ 582,187}, {1570,114}}, /* Q == 9 : 56-62% */ + {{ 688,187}, {1712,122}}, /* Q ==10 : 62-69% */ + {{ 825,186}, {1965,136}}, /* Q ==11 : 69-75% */ + {{ 976,185}, {2131,150}}, /* Q ==12 : 75-81% */ + {{1180,186}, {2070,175}}, /* Q ==13 : 81-87% */ + {{1377,185}, {1731,202}}, /* Q ==14 : 87-93% */ + {{1412,185}, {1695,202}}, /* Q ==15 : 93-99% */ +}; +#endif + +/** HUF_selectDecoder() : + * Tells which decoder is likely to decode faster, + * based on a set of pre-computed metrics. + * @return : 0==HUF_decompress4X1, 1==HUF_decompress4X2 . + * Assumption : 0 < dstSize <= 128 KB */ +U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize) +{ + assert(dstSize > 0); + assert(dstSize <= 128*1024); +#if defined(HUF_FORCE_DECOMPRESS_X1) + (void)dstSize; + (void)cSrcSize; + return 0; +#elif defined(HUF_FORCE_DECOMPRESS_X2) + (void)dstSize; + (void)cSrcSize; + return 1; +#else + /* decoder timing evaluation */ + { U32 const Q = (cSrcSize >= dstSize) ? 15 : (U32)(cSrcSize * 16 / dstSize); /* Q < 16 */ + U32 const D256 = (U32)(dstSize >> 8); + U32 const DTime0 = algoTime[Q][0].tableTime + (algoTime[Q][0].decode256Time * D256); + U32 DTime1 = algoTime[Q][1].tableTime + (algoTime[Q][1].decode256Time * D256); + DTime1 += DTime1 >> 5; /* small advantage to algorithm using less memory, to reduce cache eviction */ + return DTime1 < DTime0; + } +#endif +} + +size_t HUF_decompress1X_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + void* workSpace, size_t wkspSize, int flags) +{ + /* validation checks */ + if (dstSize == 0) return ERROR(dstSize_tooSmall); + if (cSrcSize > dstSize) return ERROR(corruption_detected); /* invalid */ + if (cSrcSize == dstSize) { ZSTD_memcpy(dst, cSrc, dstSize); return dstSize; } /* not compressed */ + if (cSrcSize == 1) { ZSTD_memset(dst, *(const BYTE*)cSrc, dstSize); return dstSize; } /* RLE */ + + { U32 const algoNb = HUF_selectDecoder(dstSize, cSrcSize); +#if defined(HUF_FORCE_DECOMPRESS_X1) + (void)algoNb; + assert(algoNb == 0); + return HUF_decompress1X1_DCtx_wksp(dctx, dst, dstSize, cSrc, + cSrcSize, workSpace, wkspSize, flags); +#elif defined(HUF_FORCE_DECOMPRESS_X2) + (void)algoNb; + assert(algoNb == 1); + return HUF_decompress1X2_DCtx_wksp(dctx, dst, dstSize, cSrc, + cSrcSize, workSpace, wkspSize, flags); +#else + return algoNb ? HUF_decompress1X2_DCtx_wksp(dctx, dst, dstSize, cSrc, + cSrcSize, workSpace, wkspSize, flags): + HUF_decompress1X1_DCtx_wksp(dctx, dst, dstSize, cSrc, + cSrcSize, workSpace, wkspSize, flags); +#endif + } +} + + +size_t HUF_decompress1X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags) +{ + DTableDesc const dtd = HUF_getDTableDesc(DTable); +#if defined(HUF_FORCE_DECOMPRESS_X1) + (void)dtd; + assert(dtd.tableType == 0); + return HUF_decompress1X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); +#elif defined(HUF_FORCE_DECOMPRESS_X2) + (void)dtd; + assert(dtd.tableType == 1); + return HUF_decompress1X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); +#else + return dtd.tableType ? HUF_decompress1X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags) : + HUF_decompress1X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); +#endif +} + +#ifndef HUF_FORCE_DECOMPRESS_X2 +size_t HUF_decompress1X1_DCtx_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags) +{ + const BYTE* ip = (const BYTE*) cSrc; + + size_t const hSize = HUF_readDTableX1_wksp(dctx, cSrc, cSrcSize, workSpace, wkspSize, flags); + if (HUF_isError(hSize)) return hSize; + if (hSize >= cSrcSize) return ERROR(srcSize_wrong); + ip += hSize; cSrcSize -= hSize; + + return HUF_decompress1X1_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx, flags); +} +#endif + +size_t HUF_decompress4X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int flags) +{ + DTableDesc const dtd = HUF_getDTableDesc(DTable); +#if defined(HUF_FORCE_DECOMPRESS_X1) + (void)dtd; + assert(dtd.tableType == 0); + return HUF_decompress4X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); +#elif defined(HUF_FORCE_DECOMPRESS_X2) + (void)dtd; + assert(dtd.tableType == 1); + return HUF_decompress4X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); +#else + return dtd.tableType ? HUF_decompress4X2_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags) : + HUF_decompress4X1_usingDTable_internal(dst, maxDstSize, cSrc, cSrcSize, DTable, flags); +#endif +} + +size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize, void* workSpace, size_t wkspSize, int flags) +{ + /* validation checks */ + if (dstSize == 0) return ERROR(dstSize_tooSmall); + if (cSrcSize == 0) return ERROR(corruption_detected); + + { U32 const algoNb = HUF_selectDecoder(dstSize, cSrcSize); +#if defined(HUF_FORCE_DECOMPRESS_X1) + (void)algoNb; + assert(algoNb == 0); + return HUF_decompress4X1_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags); +#elif defined(HUF_FORCE_DECOMPRESS_X2) + (void)algoNb; + assert(algoNb == 1); + return HUF_decompress4X2_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags); +#else + return algoNb ? HUF_decompress4X2_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags) : + HUF_decompress4X1_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize, flags); +#endif + } +} diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress_amd64.S b/cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress_amd64.S new file mode 100644 index 0000000000..656aada95b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/huf_decompress_amd64.S @@ -0,0 +1,602 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#include "../common/portability_macros.h" + +#if defined(__ELF__) && defined(__GNUC__) +/* Stack marking + * ref: https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart + */ +.section .note.GNU-stack,"",%progbits + +#if defined(__aarch64__) +/* Mark that this assembly supports BTI & PAC, because it is empty for aarch64. + * See: https://github.com/facebook/zstd/issues/3841 + * See: https://gcc.godbolt.org/z/sqr5T4ffK + * See: https://lore.kernel.org/linux-arm-kernel/20200429211641.9279-8-broonie@kernel.org/ + * See: https://reviews.llvm.org/D62609 + */ +.pushsection .note.gnu.property, "a" +.p2align 3 +.long 4 /* size of the name - "GNU\0" */ +.long 0x10 /* size of descriptor */ +.long 0x5 /* NT_GNU_PROPERTY_TYPE_0 */ +.asciz "GNU" +.long 0xc0000000 /* pr_type - GNU_PROPERTY_AARCH64_FEATURE_1_AND */ +.long 4 /* pr_datasz - 4 bytes */ +.long 3 /* pr_data - GNU_PROPERTY_AARCH64_FEATURE_1_BTI | GNU_PROPERTY_AARCH64_FEATURE_1_PAC */ +.p2align 3 /* pr_padding - bring everything to 8 byte alignment */ +.popsection +#endif + +#endif + +#if ZSTD_ENABLE_ASM_X86_64_BMI2 + +/* Calling convention: + * + * %rdi (or %rcx on Windows) contains the first argument: HUF_DecompressAsmArgs*. + * %rbp isn't maintained (no frame pointer). + * %rsp contains the stack pointer that grows down. + * No red-zone is assumed, only addresses >= %rsp are used. + * All register contents are preserved. + */ + +ZSTD_HIDE_ASM_FUNCTION(HUF_decompress4X1_usingDTable_internal_fast_asm_loop) +ZSTD_HIDE_ASM_FUNCTION(HUF_decompress4X2_usingDTable_internal_fast_asm_loop) +ZSTD_HIDE_ASM_FUNCTION(_HUF_decompress4X2_usingDTable_internal_fast_asm_loop) +ZSTD_HIDE_ASM_FUNCTION(_HUF_decompress4X1_usingDTable_internal_fast_asm_loop) +.global HUF_decompress4X1_usingDTable_internal_fast_asm_loop +.global HUF_decompress4X2_usingDTable_internal_fast_asm_loop +.global _HUF_decompress4X1_usingDTable_internal_fast_asm_loop +.global _HUF_decompress4X2_usingDTable_internal_fast_asm_loop +.text + +/* Sets up register mappings for clarity. + * op[], bits[], dtable & ip[0] each get their own register. + * ip[1,2,3] & olimit alias var[]. + * %rax is a scratch register. + */ + +#define op0 rsi +#define op1 rbx +#define op2 rcx +#define op3 rdi + +#define ip0 r8 +#define ip1 r9 +#define ip2 r10 +#define ip3 r11 + +#define bits0 rbp +#define bits1 rdx +#define bits2 r12 +#define bits3 r13 +#define dtable r14 +#define olimit r15 + +/* var[] aliases ip[1,2,3] & olimit + * ip[1,2,3] are saved every iteration. + * olimit is only used in compute_olimit. + */ +#define var0 r15 +#define var1 r9 +#define var2 r10 +#define var3 r11 + +/* 32-bit var registers */ +#define vard0 r15d +#define vard1 r9d +#define vard2 r10d +#define vard3 r11d + +/* Calls X(N) for each stream 0, 1, 2, 3. */ +#define FOR_EACH_STREAM(X) \ + X(0); \ + X(1); \ + X(2); \ + X(3) + +/* Calls X(N, idx) for each stream 0, 1, 2, 3. */ +#define FOR_EACH_STREAM_WITH_INDEX(X, idx) \ + X(0, idx); \ + X(1, idx); \ + X(2, idx); \ + X(3, idx) + +/* Define both _HUF_* & HUF_* symbols because MacOS + * C symbols are prefixed with '_' & Linux symbols aren't. + */ +_HUF_decompress4X1_usingDTable_internal_fast_asm_loop: +HUF_decompress4X1_usingDTable_internal_fast_asm_loop: + ZSTD_CET_ENDBRANCH + /* Save all registers - even if they are callee saved for simplicity. */ + push %rax + push %rbx + push %rcx + push %rdx + push %rbp + push %rsi + push %rdi + push %r8 + push %r9 + push %r10 + push %r11 + push %r12 + push %r13 + push %r14 + push %r15 + + /* Read HUF_DecompressAsmArgs* args from %rax */ +#if defined(_WIN32) + movq %rcx, %rax +#else + movq %rdi, %rax +#endif + movq 0(%rax), %ip0 + movq 8(%rax), %ip1 + movq 16(%rax), %ip2 + movq 24(%rax), %ip3 + movq 32(%rax), %op0 + movq 40(%rax), %op1 + movq 48(%rax), %op2 + movq 56(%rax), %op3 + movq 64(%rax), %bits0 + movq 72(%rax), %bits1 + movq 80(%rax), %bits2 + movq 88(%rax), %bits3 + movq 96(%rax), %dtable + push %rax /* argument */ + push 104(%rax) /* ilowest */ + push 112(%rax) /* oend */ + push %olimit /* olimit space */ + + subq $24, %rsp + +.L_4X1_compute_olimit: + /* Computes how many iterations we can do safely + * %r15, %rax may be clobbered + * rbx, rdx must be saved + * op3 & ip0 mustn't be clobbered + */ + movq %rbx, 0(%rsp) + movq %rdx, 8(%rsp) + + movq 32(%rsp), %rax /* rax = oend */ + subq %op3, %rax /* rax = oend - op3 */ + + /* r15 = (oend - op3) / 5 */ + movabsq $-3689348814741910323, %rdx + mulq %rdx + movq %rdx, %r15 + shrq $2, %r15 + + movq %ip0, %rax /* rax = ip0 */ + movq 40(%rsp), %rdx /* rdx = ilowest */ + subq %rdx, %rax /* rax = ip0 - ilowest */ + movq %rax, %rbx /* rbx = ip0 - ilowest */ + + /* rdx = (ip0 - ilowest) / 7 */ + movabsq $2635249153387078803, %rdx + mulq %rdx + subq %rdx, %rbx + shrq %rbx + addq %rbx, %rdx + shrq $2, %rdx + + /* r15 = min(%rdx, %r15) */ + cmpq %rdx, %r15 + cmova %rdx, %r15 + + /* r15 = r15 * 5 */ + leaq (%r15, %r15, 4), %r15 + + /* olimit = op3 + r15 */ + addq %op3, %olimit + + movq 8(%rsp), %rdx + movq 0(%rsp), %rbx + + /* If (op3 + 20 > olimit) */ + movq %op3, %rax /* rax = op3 */ + cmpq %rax, %olimit /* op3 == olimit */ + je .L_4X1_exit + + /* If (ip1 < ip0) go to exit */ + cmpq %ip0, %ip1 + jb .L_4X1_exit + + /* If (ip2 < ip1) go to exit */ + cmpq %ip1, %ip2 + jb .L_4X1_exit + + /* If (ip3 < ip2) go to exit */ + cmpq %ip2, %ip3 + jb .L_4X1_exit + +/* Reads top 11 bits from bits[n] + * Loads dt[bits[n]] into var[n] + */ +#define GET_NEXT_DELT(n) \ + movq $53, %var##n; \ + shrxq %var##n, %bits##n, %var##n; \ + movzwl (%dtable,%var##n,2),%vard##n + +/* var[n] must contain the DTable entry computed with GET_NEXT_DELT + * Moves var[n] to %rax + * bits[n] <<= var[n] & 63 + * op[n][idx] = %rax >> 8 + * %ah is a way to access bits [8, 16) of %rax + */ +#define DECODE_FROM_DELT(n, idx) \ + movq %var##n, %rax; \ + shlxq %var##n, %bits##n, %bits##n; \ + movb %ah, idx(%op##n) + +/* Assumes GET_NEXT_DELT has been called. + * Calls DECODE_FROM_DELT then GET_NEXT_DELT + */ +#define DECODE_AND_GET_NEXT(n, idx) \ + DECODE_FROM_DELT(n, idx); \ + GET_NEXT_DELT(n) \ + +/* // ctz & nbBytes is stored in bits[n] + * // nbBits is stored in %rax + * ctz = CTZ[bits[n]] + * nbBits = ctz & 7 + * nbBytes = ctz >> 3 + * op[n] += 5 + * ip[n] -= nbBytes + * // Note: x86-64 is little-endian ==> no bswap + * bits[n] = MEM_readST(ip[n]) | 1 + * bits[n] <<= nbBits + */ +#define RELOAD_BITS(n) \ + bsfq %bits##n, %bits##n; \ + movq %bits##n, %rax; \ + andq $7, %rax; \ + shrq $3, %bits##n; \ + leaq 5(%op##n), %op##n; \ + subq %bits##n, %ip##n; \ + movq (%ip##n), %bits##n; \ + orq $1, %bits##n; \ + shlx %rax, %bits##n, %bits##n + + /* Store clobbered variables on the stack */ + movq %olimit, 24(%rsp) + movq %ip1, 0(%rsp) + movq %ip2, 8(%rsp) + movq %ip3, 16(%rsp) + + /* Call GET_NEXT_DELT for each stream */ + FOR_EACH_STREAM(GET_NEXT_DELT) + + .p2align 6 + +.L_4X1_loop_body: + /* Decode 5 symbols in each of the 4 streams (20 total) + * Must have called GET_NEXT_DELT for each stream + */ + FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 0) + FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 1) + FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 2) + FOR_EACH_STREAM_WITH_INDEX(DECODE_AND_GET_NEXT, 3) + FOR_EACH_STREAM_WITH_INDEX(DECODE_FROM_DELT, 4) + + /* Load ip[1,2,3] from stack (var[] aliases them) + * ip[] is needed for RELOAD_BITS + * Each will be stored back to the stack after RELOAD + */ + movq 0(%rsp), %ip1 + movq 8(%rsp), %ip2 + movq 16(%rsp), %ip3 + + /* Reload each stream & fetch the next table entry + * to prepare for the next iteration + */ + RELOAD_BITS(0) + GET_NEXT_DELT(0) + + RELOAD_BITS(1) + movq %ip1, 0(%rsp) + GET_NEXT_DELT(1) + + RELOAD_BITS(2) + movq %ip2, 8(%rsp) + GET_NEXT_DELT(2) + + RELOAD_BITS(3) + movq %ip3, 16(%rsp) + GET_NEXT_DELT(3) + + /* If op3 < olimit: continue the loop */ + cmp %op3, 24(%rsp) + ja .L_4X1_loop_body + + /* Reload ip[1,2,3] from stack */ + movq 0(%rsp), %ip1 + movq 8(%rsp), %ip2 + movq 16(%rsp), %ip3 + + /* Re-compute olimit */ + jmp .L_4X1_compute_olimit + +#undef GET_NEXT_DELT +#undef DECODE_FROM_DELT +#undef DECODE +#undef RELOAD_BITS +.L_4X1_exit: + addq $24, %rsp + + /* Restore stack (oend & olimit) */ + pop %rax /* olimit */ + pop %rax /* oend */ + pop %rax /* ilowest */ + pop %rax /* arg */ + + /* Save ip / op / bits */ + movq %ip0, 0(%rax) + movq %ip1, 8(%rax) + movq %ip2, 16(%rax) + movq %ip3, 24(%rax) + movq %op0, 32(%rax) + movq %op1, 40(%rax) + movq %op2, 48(%rax) + movq %op3, 56(%rax) + movq %bits0, 64(%rax) + movq %bits1, 72(%rax) + movq %bits2, 80(%rax) + movq %bits3, 88(%rax) + + /* Restore registers */ + pop %r15 + pop %r14 + pop %r13 + pop %r12 + pop %r11 + pop %r10 + pop %r9 + pop %r8 + pop %rdi + pop %rsi + pop %rbp + pop %rdx + pop %rcx + pop %rbx + pop %rax + ret + +_HUF_decompress4X2_usingDTable_internal_fast_asm_loop: +HUF_decompress4X2_usingDTable_internal_fast_asm_loop: + ZSTD_CET_ENDBRANCH + /* Save all registers - even if they are callee saved for simplicity. */ + push %rax + push %rbx + push %rcx + push %rdx + push %rbp + push %rsi + push %rdi + push %r8 + push %r9 + push %r10 + push %r11 + push %r12 + push %r13 + push %r14 + push %r15 + + /* Read HUF_DecompressAsmArgs* args from %rax */ +#if defined(_WIN32) + movq %rcx, %rax +#else + movq %rdi, %rax +#endif + movq 0(%rax), %ip0 + movq 8(%rax), %ip1 + movq 16(%rax), %ip2 + movq 24(%rax), %ip3 + movq 32(%rax), %op0 + movq 40(%rax), %op1 + movq 48(%rax), %op2 + movq 56(%rax), %op3 + movq 64(%rax), %bits0 + movq 72(%rax), %bits1 + movq 80(%rax), %bits2 + movq 88(%rax), %bits3 + movq 96(%rax), %dtable + push %rax /* argument */ + push %rax /* olimit */ + push 104(%rax) /* ilowest */ + + movq 112(%rax), %rax + push %rax /* oend3 */ + + movq %op3, %rax + push %rax /* oend2 */ + + movq %op2, %rax + push %rax /* oend1 */ + + movq %op1, %rax + push %rax /* oend0 */ + + /* Scratch space */ + subq $8, %rsp + +.L_4X2_compute_olimit: + /* Computes how many iterations we can do safely + * %r15, %rax may be clobbered + * rdx must be saved + * op[1,2,3,4] & ip0 mustn't be clobbered + */ + movq %rdx, 0(%rsp) + + /* We can consume up to 7 input bytes each iteration. */ + movq %ip0, %rax /* rax = ip0 */ + movq 40(%rsp), %rdx /* rdx = ilowest */ + subq %rdx, %rax /* rax = ip0 - ilowest */ + movq %rax, %r15 /* r15 = ip0 - ilowest */ + + /* rdx = rax / 7 */ + movabsq $2635249153387078803, %rdx + mulq %rdx + subq %rdx, %r15 + shrq %r15 + addq %r15, %rdx + shrq $2, %rdx + + /* r15 = (ip0 - ilowest) / 7 */ + movq %rdx, %r15 + + /* r15 = min(r15, min(oend0 - op0, oend1 - op1, oend2 - op2, oend3 - op3) / 10) */ + movq 8(%rsp), %rax /* rax = oend0 */ + subq %op0, %rax /* rax = oend0 - op0 */ + movq 16(%rsp), %rdx /* rdx = oend1 */ + subq %op1, %rdx /* rdx = oend1 - op1 */ + + cmpq %rax, %rdx + cmova %rax, %rdx /* rdx = min(%rdx, %rax) */ + + movq 24(%rsp), %rax /* rax = oend2 */ + subq %op2, %rax /* rax = oend2 - op2 */ + + cmpq %rax, %rdx + cmova %rax, %rdx /* rdx = min(%rdx, %rax) */ + + movq 32(%rsp), %rax /* rax = oend3 */ + subq %op3, %rax /* rax = oend3 - op3 */ + + cmpq %rax, %rdx + cmova %rax, %rdx /* rdx = min(%rdx, %rax) */ + + movabsq $-3689348814741910323, %rax + mulq %rdx + shrq $3, %rdx /* rdx = rdx / 10 */ + + /* r15 = min(%rdx, %r15) */ + cmpq %rdx, %r15 + cmova %rdx, %r15 + + /* olimit = op3 + 5 * r15 */ + movq %r15, %rax + leaq (%op3, %rax, 4), %olimit + addq %rax, %olimit + + movq 0(%rsp), %rdx + + /* If (op3 + 10 > olimit) */ + movq %op3, %rax /* rax = op3 */ + cmpq %rax, %olimit /* op3 == olimit */ + je .L_4X2_exit + + /* If (ip1 < ip0) go to exit */ + cmpq %ip0, %ip1 + jb .L_4X2_exit + + /* If (ip2 < ip1) go to exit */ + cmpq %ip1, %ip2 + jb .L_4X2_exit + + /* If (ip3 < ip2) go to exit */ + cmpq %ip2, %ip3 + jb .L_4X2_exit + +#define DECODE(n, idx) \ + movq %bits##n, %rax; \ + shrq $53, %rax; \ + movzwl 0(%dtable,%rax,4),%r8d; \ + movzbl 2(%dtable,%rax,4),%r15d; \ + movzbl 3(%dtable,%rax,4),%eax; \ + movw %r8w, (%op##n); \ + shlxq %r15, %bits##n, %bits##n; \ + addq %rax, %op##n + +#define RELOAD_BITS(n) \ + bsfq %bits##n, %bits##n; \ + movq %bits##n, %rax; \ + shrq $3, %bits##n; \ + andq $7, %rax; \ + subq %bits##n, %ip##n; \ + movq (%ip##n), %bits##n; \ + orq $1, %bits##n; \ + shlxq %rax, %bits##n, %bits##n + + + movq %olimit, 48(%rsp) + + .p2align 6 + +.L_4X2_loop_body: + /* We clobber r8, so store it on the stack */ + movq %r8, 0(%rsp) + + /* Decode 5 symbols from each of the 4 streams (20 symbols total). */ + FOR_EACH_STREAM_WITH_INDEX(DECODE, 0) + FOR_EACH_STREAM_WITH_INDEX(DECODE, 1) + FOR_EACH_STREAM_WITH_INDEX(DECODE, 2) + FOR_EACH_STREAM_WITH_INDEX(DECODE, 3) + FOR_EACH_STREAM_WITH_INDEX(DECODE, 4) + + /* Reload r8 */ + movq 0(%rsp), %r8 + + FOR_EACH_STREAM(RELOAD_BITS) + + cmp %op3, 48(%rsp) + ja .L_4X2_loop_body + jmp .L_4X2_compute_olimit + +#undef DECODE +#undef RELOAD_BITS +.L_4X2_exit: + addq $8, %rsp + /* Restore stack (oend & olimit) */ + pop %rax /* oend0 */ + pop %rax /* oend1 */ + pop %rax /* oend2 */ + pop %rax /* oend3 */ + pop %rax /* ilowest */ + pop %rax /* olimit */ + pop %rax /* arg */ + + /* Save ip / op / bits */ + movq %ip0, 0(%rax) + movq %ip1, 8(%rax) + movq %ip2, 16(%rax) + movq %ip3, 24(%rax) + movq %op0, 32(%rax) + movq %op1, 40(%rax) + movq %op2, 48(%rax) + movq %op3, 56(%rax) + movq %bits0, 64(%rax) + movq %bits1, 72(%rax) + movq %bits2, 80(%rax) + movq %bits3, 88(%rax) + + /* Restore registers */ + pop %r15 + pop %r14 + pop %r13 + pop %r12 + pop %r11 + pop %r10 + pop %r9 + pop %r8 + pop %rdi + pop %rsi + pop %rbp + pop %rdx + pop %rcx + pop %rbx + pop %rax + ret + +#endif diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.c b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.c new file mode 100644 index 0000000000..309ec0d036 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.c @@ -0,0 +1,244 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* zstd_ddict.c : + * concentrates all logic that needs to know the internals of ZSTD_DDict object */ + +/*-******************************************************* +* Dependencies +*********************************************************/ +#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customFree */ +#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memmove, ZSTD_memset */ +#include "../common/cpu.h" /* bmi2 */ +#include "../common/mem.h" /* low level memory routines */ +#define FSE_STATIC_LINKING_ONLY +#include "../common/fse.h" +#include "../common/huf.h" +#include "zstd_decompress_internal.h" +#include "zstd_ddict.h" + +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) +# include "../legacy/zstd_legacy.h" +#endif + + + +/*-******************************************************* +* Types +*********************************************************/ +struct ZSTD_DDict_s { + void* dictBuffer; + const void* dictContent; + size_t dictSize; + ZSTD_entropyDTables_t entropy; + U32 dictID; + U32 entropyPresent; + ZSTD_customMem cMem; +}; /* typedef'd to ZSTD_DDict within "zstd.h" */ + +const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict) +{ + assert(ddict != NULL); + return ddict->dictContent; +} + +size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict) +{ + assert(ddict != NULL); + return ddict->dictSize; +} + +void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) +{ + DEBUGLOG(4, "ZSTD_copyDDictParameters"); + assert(dctx != NULL); + assert(ddict != NULL); + dctx->dictID = ddict->dictID; + dctx->prefixStart = ddict->dictContent; + dctx->virtualStart = ddict->dictContent; + dctx->dictEnd = (const BYTE*)ddict->dictContent + ddict->dictSize; + dctx->previousDstEnd = dctx->dictEnd; +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + dctx->dictContentBeginForFuzzing = dctx->prefixStart; + dctx->dictContentEndForFuzzing = dctx->previousDstEnd; +#endif + if (ddict->entropyPresent) { + dctx->litEntropy = 1; + dctx->fseEntropy = 1; + dctx->LLTptr = ddict->entropy.LLTable; + dctx->MLTptr = ddict->entropy.MLTable; + dctx->OFTptr = ddict->entropy.OFTable; + dctx->HUFptr = ddict->entropy.hufTable; + dctx->entropy.rep[0] = ddict->entropy.rep[0]; + dctx->entropy.rep[1] = ddict->entropy.rep[1]; + dctx->entropy.rep[2] = ddict->entropy.rep[2]; + } else { + dctx->litEntropy = 0; + dctx->fseEntropy = 0; + } +} + + +static size_t +ZSTD_loadEntropy_intoDDict(ZSTD_DDict* ddict, + ZSTD_dictContentType_e dictContentType) +{ + ddict->dictID = 0; + ddict->entropyPresent = 0; + if (dictContentType == ZSTD_dct_rawContent) return 0; + + if (ddict->dictSize < 8) { + if (dictContentType == ZSTD_dct_fullDict) + return ERROR(dictionary_corrupted); /* only accept specified dictionaries */ + return 0; /* pure content mode */ + } + { U32 const magic = MEM_readLE32(ddict->dictContent); + if (magic != ZSTD_MAGIC_DICTIONARY) { + if (dictContentType == ZSTD_dct_fullDict) + return ERROR(dictionary_corrupted); /* only accept specified dictionaries */ + return 0; /* pure content mode */ + } + } + ddict->dictID = MEM_readLE32((const char*)ddict->dictContent + ZSTD_FRAMEIDSIZE); + + /* load entropy tables */ + RETURN_ERROR_IF(ZSTD_isError(ZSTD_loadDEntropy( + &ddict->entropy, ddict->dictContent, ddict->dictSize)), + dictionary_corrupted, ""); + ddict->entropyPresent = 1; + return 0; +} + + +static size_t ZSTD_initDDict_internal(ZSTD_DDict* ddict, + const void* dict, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType) +{ + if ((dictLoadMethod == ZSTD_dlm_byRef) || (!dict) || (!dictSize)) { + ddict->dictBuffer = NULL; + ddict->dictContent = dict; + if (!dict) dictSize = 0; + } else { + void* const internalBuffer = ZSTD_customMalloc(dictSize, ddict->cMem); + ddict->dictBuffer = internalBuffer; + ddict->dictContent = internalBuffer; + if (!internalBuffer) return ERROR(memory_allocation); + ZSTD_memcpy(internalBuffer, dict, dictSize); + } + ddict->dictSize = dictSize; + ddict->entropy.hufTable[0] = (HUF_DTable)((ZSTD_HUFFDTABLE_CAPACITY_LOG)*0x1000001); /* cover both little and big endian */ + + /* parse dictionary content */ + FORWARD_IF_ERROR( ZSTD_loadEntropy_intoDDict(ddict, dictContentType) , ""); + + return 0; +} + +ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType, + ZSTD_customMem customMem) +{ + if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; + + { ZSTD_DDict* const ddict = (ZSTD_DDict*) ZSTD_customMalloc(sizeof(ZSTD_DDict), customMem); + if (ddict == NULL) return NULL; + ddict->cMem = customMem; + { size_t const initResult = ZSTD_initDDict_internal(ddict, + dict, dictSize, + dictLoadMethod, dictContentType); + if (ZSTD_isError(initResult)) { + ZSTD_freeDDict(ddict); + return NULL; + } } + return ddict; + } +} + +/*! ZSTD_createDDict() : +* Create a digested dictionary, to start decompression without startup delay. +* `dict` content is copied inside DDict. +* Consequently, `dict` can be released after `ZSTD_DDict` creation */ +ZSTD_DDict* ZSTD_createDDict(const void* dict, size_t dictSize) +{ + ZSTD_customMem const allocator = { NULL, NULL, NULL }; + return ZSTD_createDDict_advanced(dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dct_auto, allocator); +} + +/*! ZSTD_createDDict_byReference() : + * Create a digested dictionary, to start decompression without startup delay. + * Dictionary content is simply referenced, it will be accessed during decompression. + * Warning : dictBuffer must outlive DDict (DDict must be freed before dictBuffer) */ +ZSTD_DDict* ZSTD_createDDict_byReference(const void* dictBuffer, size_t dictSize) +{ + ZSTD_customMem const allocator = { NULL, NULL, NULL }; + return ZSTD_createDDict_advanced(dictBuffer, dictSize, ZSTD_dlm_byRef, ZSTD_dct_auto, allocator); +} + + +const ZSTD_DDict* ZSTD_initStaticDDict( + void* sBuffer, size_t sBufferSize, + const void* dict, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType) +{ + size_t const neededSpace = sizeof(ZSTD_DDict) + + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize); + ZSTD_DDict* const ddict = (ZSTD_DDict*)sBuffer; + assert(sBuffer != NULL); + assert(dict != NULL); + if ((size_t)sBuffer & 7) return NULL; /* 8-aligned */ + if (sBufferSize < neededSpace) return NULL; + if (dictLoadMethod == ZSTD_dlm_byCopy) { + ZSTD_memcpy(ddict+1, dict, dictSize); /* local copy */ + dict = ddict+1; + } + if (ZSTD_isError( ZSTD_initDDict_internal(ddict, + dict, dictSize, + ZSTD_dlm_byRef, dictContentType) )) + return NULL; + return ddict; +} + + +size_t ZSTD_freeDDict(ZSTD_DDict* ddict) +{ + if (ddict==NULL) return 0; /* support free on NULL */ + { ZSTD_customMem const cMem = ddict->cMem; + ZSTD_customFree(ddict->dictBuffer, cMem); + ZSTD_customFree(ddict, cMem); + return 0; + } +} + +/*! ZSTD_estimateDDictSize() : + * Estimate amount of memory that will be needed to create a dictionary for decompression. + * Note : dictionary created by reference using ZSTD_dlm_byRef are smaller */ +size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod) +{ + return sizeof(ZSTD_DDict) + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize); +} + +size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict) +{ + if (ddict==NULL) return 0; /* support sizeof on NULL */ + return sizeof(*ddict) + (ddict->dictBuffer ? ddict->dictSize : 0) ; +} + +/*! ZSTD_getDictID_fromDDict() : + * Provides the dictID of the dictionary loaded into `ddict`. + * If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. + * Non-conformant dictionaries can still be loaded, but as content-only dictionaries. */ +unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict) +{ + if (ddict==NULL) return 0; + return ddict->dictID; +} diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.h b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.h new file mode 100644 index 0000000000..c4ca8877a0 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_ddict.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +#ifndef ZSTD_DDICT_H +#define ZSTD_DDICT_H + +/*-******************************************************* + * Dependencies + *********************************************************/ +#include "../common/zstd_deps.h" /* size_t */ +#include "../zstd.h" /* ZSTD_DDict, and several public functions */ + + +/*-******************************************************* + * Interface + *********************************************************/ + +/* note: several prototypes are already published in `zstd.h` : + * ZSTD_createDDict() + * ZSTD_createDDict_byReference() + * ZSTD_createDDict_advanced() + * ZSTD_freeDDict() + * ZSTD_initStaticDDict() + * ZSTD_sizeof_DDict() + * ZSTD_estimateDDictSize() + * ZSTD_getDictID_fromDict() + */ + +const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict); +size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict); + +void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict); + + + +#endif /* ZSTD_DDICT_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress.c b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress.c new file mode 100644 index 0000000000..9eb98327ef --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress.c @@ -0,0 +1,2410 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/* *************************************************************** +* Tuning parameters +*****************************************************************/ +/*! + * HEAPMODE : + * Select how default decompression function ZSTD_decompress() allocates its context, + * on stack (0), or into heap (1, default; requires malloc()). + * Note that functions with explicit context such as ZSTD_decompressDCtx() are unaffected. + */ +#ifndef ZSTD_HEAPMODE +# define ZSTD_HEAPMODE 1 +#endif + +/*! +* LEGACY_SUPPORT : +* if set to 1+, ZSTD_decompress() can decode older formats (v0.1+) +*/ +#ifndef ZSTD_LEGACY_SUPPORT +# define ZSTD_LEGACY_SUPPORT 0 +#endif + +/*! + * MAXWINDOWSIZE_DEFAULT : + * maximum window size accepted by DStream __by default__. + * Frames requiring more memory will be rejected. + * It's possible to set a different limit using ZSTD_DCtx_setMaxWindowSize(). + */ +#ifndef ZSTD_MAXWINDOWSIZE_DEFAULT +# define ZSTD_MAXWINDOWSIZE_DEFAULT (((U32)1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT) + 1) +#endif + +/*! + * NO_FORWARD_PROGRESS_MAX : + * maximum allowed nb of calls to ZSTD_decompressStream() + * without any forward progress + * (defined as: no byte read from input, and no byte flushed to output) + * before triggering an error. + */ +#ifndef ZSTD_NO_FORWARD_PROGRESS_MAX +# define ZSTD_NO_FORWARD_PROGRESS_MAX 16 +#endif + + +/*-******************************************************* +* Dependencies +*********************************************************/ +#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memmove, ZSTD_memset */ +#include "../common/allocations.h" /* ZSTD_customMalloc, ZSTD_customCalloc, ZSTD_customFree */ +#include "../common/error_private.h" +#include "../common/zstd_internal.h" /* blockProperties_t */ +#include "../common/mem.h" /* low level memory routines */ +#include "../common/bits.h" /* ZSTD_highbit32 */ +#define FSE_STATIC_LINKING_ONLY +#include "../common/fse.h" +#include "../common/huf.h" +#include "../common/xxhash.h" /* XXH64_reset, XXH64_update, XXH64_digest, XXH64 */ +#include "zstd_decompress_internal.h" /* ZSTD_DCtx */ +#include "zstd_ddict.h" /* ZSTD_DDictDictContent */ +#include "zstd_decompress_block.h" /* ZSTD_decompressBlock_internal */ + +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) +# include "../legacy/zstd_legacy.h" +#endif + + + +/************************************* + * Multiple DDicts Hashset internals * + *************************************/ + +#define DDICT_HASHSET_MAX_LOAD_FACTOR_COUNT_MULT 4 +#define DDICT_HASHSET_MAX_LOAD_FACTOR_SIZE_MULT 3 /* These two constants represent SIZE_MULT/COUNT_MULT load factor without using a float. + * Currently, that means a 0.75 load factor. + * So, if count * COUNT_MULT / size * SIZE_MULT != 0, then we've exceeded + * the load factor of the ddict hash set. + */ + +#define DDICT_HASHSET_TABLE_BASE_SIZE 64 +#define DDICT_HASHSET_RESIZE_FACTOR 2 + +/* Hash function to determine starting position of dict insertion within the table + * Returns an index between [0, hashSet->ddictPtrTableSize] + */ +static size_t ZSTD_DDictHashSet_getIndex(const ZSTD_DDictHashSet* hashSet, U32 dictID) { + const U64 hash = XXH64(&dictID, sizeof(U32), 0); + /* DDict ptr table size is a multiple of 2, use size - 1 as mask to get index within [0, hashSet->ddictPtrTableSize) */ + return hash & (hashSet->ddictPtrTableSize - 1); +} + +/* Adds DDict to a hashset without resizing it. + * If inserting a DDict with a dictID that already exists in the set, replaces the one in the set. + * Returns 0 if successful, or a zstd error code if something went wrong. + */ +static size_t ZSTD_DDictHashSet_emplaceDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict) { + const U32 dictID = ZSTD_getDictID_fromDDict(ddict); + size_t idx = ZSTD_DDictHashSet_getIndex(hashSet, dictID); + const size_t idxRangeMask = hashSet->ddictPtrTableSize - 1; + RETURN_ERROR_IF(hashSet->ddictPtrCount == hashSet->ddictPtrTableSize, GENERIC, "Hash set is full!"); + DEBUGLOG(4, "Hashed index: for dictID: %u is %zu", dictID, idx); + while (hashSet->ddictPtrTable[idx] != NULL) { + /* Replace existing ddict if inserting ddict with same dictID */ + if (ZSTD_getDictID_fromDDict(hashSet->ddictPtrTable[idx]) == dictID) { + DEBUGLOG(4, "DictID already exists, replacing rather than adding"); + hashSet->ddictPtrTable[idx] = ddict; + return 0; + } + idx &= idxRangeMask; + idx++; + } + DEBUGLOG(4, "Final idx after probing for dictID %u is: %zu", dictID, idx); + hashSet->ddictPtrTable[idx] = ddict; + hashSet->ddictPtrCount++; + return 0; +} + +/* Expands hash table by factor of DDICT_HASHSET_RESIZE_FACTOR and + * rehashes all values, allocates new table, frees old table. + * Returns 0 on success, otherwise a zstd error code. + */ +static size_t ZSTD_DDictHashSet_expand(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { + size_t newTableSize = hashSet->ddictPtrTableSize * DDICT_HASHSET_RESIZE_FACTOR; + const ZSTD_DDict** newTable = (const ZSTD_DDict**)ZSTD_customCalloc(sizeof(ZSTD_DDict*) * newTableSize, customMem); + const ZSTD_DDict** oldTable = hashSet->ddictPtrTable; + size_t oldTableSize = hashSet->ddictPtrTableSize; + size_t i; + + DEBUGLOG(4, "Expanding DDict hash table! Old size: %zu new size: %zu", oldTableSize, newTableSize); + RETURN_ERROR_IF(!newTable, memory_allocation, "Expanded hashset allocation failed!"); + hashSet->ddictPtrTable = newTable; + hashSet->ddictPtrTableSize = newTableSize; + hashSet->ddictPtrCount = 0; + for (i = 0; i < oldTableSize; ++i) { + if (oldTable[i] != NULL) { + FORWARD_IF_ERROR(ZSTD_DDictHashSet_emplaceDDict(hashSet, oldTable[i]), ""); + } + } + ZSTD_customFree((void*)oldTable, customMem); + DEBUGLOG(4, "Finished re-hash"); + return 0; +} + +/* Fetches a DDict with the given dictID + * Returns the ZSTD_DDict* with the requested dictID. If it doesn't exist, then returns NULL. + */ +static const ZSTD_DDict* ZSTD_DDictHashSet_getDDict(ZSTD_DDictHashSet* hashSet, U32 dictID) { + size_t idx = ZSTD_DDictHashSet_getIndex(hashSet, dictID); + const size_t idxRangeMask = hashSet->ddictPtrTableSize - 1; + DEBUGLOG(4, "Hashed index: for dictID: %u is %zu", dictID, idx); + for (;;) { + size_t currDictID = ZSTD_getDictID_fromDDict(hashSet->ddictPtrTable[idx]); + if (currDictID == dictID || currDictID == 0) { + /* currDictID == 0 implies a NULL ddict entry */ + break; + } else { + idx &= idxRangeMask; /* Goes to start of table when we reach the end */ + idx++; + } + } + DEBUGLOG(4, "Final idx after probing for dictID %u is: %zu", dictID, idx); + return hashSet->ddictPtrTable[idx]; +} + +/* Allocates space for and returns a ddict hash set + * The hash set's ZSTD_DDict* table has all values automatically set to NULL to begin with. + * Returns NULL if allocation failed. + */ +static ZSTD_DDictHashSet* ZSTD_createDDictHashSet(ZSTD_customMem customMem) { + ZSTD_DDictHashSet* ret = (ZSTD_DDictHashSet*)ZSTD_customMalloc(sizeof(ZSTD_DDictHashSet), customMem); + DEBUGLOG(4, "Allocating new hash set"); + if (!ret) + return NULL; + ret->ddictPtrTable = (const ZSTD_DDict**)ZSTD_customCalloc(DDICT_HASHSET_TABLE_BASE_SIZE * sizeof(ZSTD_DDict*), customMem); + if (!ret->ddictPtrTable) { + ZSTD_customFree(ret, customMem); + return NULL; + } + ret->ddictPtrTableSize = DDICT_HASHSET_TABLE_BASE_SIZE; + ret->ddictPtrCount = 0; + return ret; +} + +/* Frees the table of ZSTD_DDict* within a hashset, then frees the hashset itself. + * Note: The ZSTD_DDict* within the table are NOT freed. + */ +static void ZSTD_freeDDictHashSet(ZSTD_DDictHashSet* hashSet, ZSTD_customMem customMem) { + DEBUGLOG(4, "Freeing ddict hash set"); + if (hashSet && hashSet->ddictPtrTable) { + ZSTD_customFree((void*)hashSet->ddictPtrTable, customMem); + } + if (hashSet) { + ZSTD_customFree(hashSet, customMem); + } +} + +/* Public function: Adds a DDict into the ZSTD_DDictHashSet, possibly triggering a resize of the hash set. + * Returns 0 on success, or a ZSTD error. + */ +static size_t ZSTD_DDictHashSet_addDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict, ZSTD_customMem customMem) { + DEBUGLOG(4, "Adding dict ID: %u to hashset with - Count: %zu Tablesize: %zu", ZSTD_getDictID_fromDDict(ddict), hashSet->ddictPtrCount, hashSet->ddictPtrTableSize); + if (hashSet->ddictPtrCount * DDICT_HASHSET_MAX_LOAD_FACTOR_COUNT_MULT / hashSet->ddictPtrTableSize * DDICT_HASHSET_MAX_LOAD_FACTOR_SIZE_MULT != 0) { + FORWARD_IF_ERROR(ZSTD_DDictHashSet_expand(hashSet, customMem), ""); + } + FORWARD_IF_ERROR(ZSTD_DDictHashSet_emplaceDDict(hashSet, ddict), ""); + return 0; +} + +/*-************************************************************* +* Context management +***************************************************************/ +size_t ZSTD_sizeof_DCtx (const ZSTD_DCtx* dctx) +{ + if (dctx==NULL) return 0; /* support sizeof NULL */ + return sizeof(*dctx) + + ZSTD_sizeof_DDict(dctx->ddictLocal) + + dctx->inBuffSize + dctx->outBuffSize; +} + +size_t ZSTD_estimateDCtxSize(void) { return sizeof(ZSTD_DCtx); } + + +static size_t ZSTD_startingInputLength(ZSTD_format_e format) +{ + size_t const startingInputLength = ZSTD_FRAMEHEADERSIZE_PREFIX(format); + /* only supports formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless */ + assert( (format == ZSTD_f_zstd1) || (format == ZSTD_f_zstd1_magicless) ); + return startingInputLength; +} + +static void ZSTD_DCtx_resetParameters(ZSTD_DCtx* dctx) +{ + assert(dctx->streamStage == zdss_init); + dctx->format = ZSTD_f_zstd1; + dctx->maxWindowSize = ZSTD_MAXWINDOWSIZE_DEFAULT; + dctx->outBufferMode = ZSTD_bm_buffered; + dctx->forceIgnoreChecksum = ZSTD_d_validateChecksum; + dctx->refMultipleDDicts = ZSTD_rmd_refSingleDDict; + dctx->disableHufAsm = 0; + dctx->maxBlockSizeParam = 0; +} + +static void ZSTD_initDCtx_internal(ZSTD_DCtx* dctx) +{ + dctx->staticSize = 0; + dctx->ddict = NULL; + dctx->ddictLocal = NULL; + dctx->dictEnd = NULL; + dctx->ddictIsCold = 0; + dctx->dictUses = ZSTD_dont_use; + dctx->inBuff = NULL; + dctx->inBuffSize = 0; + dctx->outBuffSize = 0; + dctx->streamStage = zdss_init; +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) + dctx->legacyContext = NULL; + dctx->previousLegacyVersion = 0; +#endif + dctx->noForwardProgress = 0; + dctx->oversizedDuration = 0; + dctx->isFrameDecompression = 1; +#if DYNAMIC_BMI2 + dctx->bmi2 = ZSTD_cpuSupportsBmi2(); +#endif + dctx->ddictSet = NULL; + ZSTD_DCtx_resetParameters(dctx); +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + dctx->dictContentEndForFuzzing = NULL; +#endif +} + +ZSTD_DCtx* ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize) +{ + ZSTD_DCtx* const dctx = (ZSTD_DCtx*) workspace; + + if ((size_t)workspace & 7) return NULL; /* 8-aligned */ + if (workspaceSize < sizeof(ZSTD_DCtx)) return NULL; /* minimum size */ + + ZSTD_initDCtx_internal(dctx); + dctx->staticSize = workspaceSize; + dctx->inBuff = (char*)(dctx+1); + return dctx; +} + +static ZSTD_DCtx* ZSTD_createDCtx_internal(ZSTD_customMem customMem) { + if ((!customMem.customAlloc) ^ (!customMem.customFree)) return NULL; + + { ZSTD_DCtx* const dctx = (ZSTD_DCtx*)ZSTD_customMalloc(sizeof(*dctx), customMem); + if (!dctx) return NULL; + dctx->customMem = customMem; + ZSTD_initDCtx_internal(dctx); + return dctx; + } +} + +ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem) +{ + return ZSTD_createDCtx_internal(customMem); +} + +ZSTD_DCtx* ZSTD_createDCtx(void) +{ + DEBUGLOG(3, "ZSTD_createDCtx"); + return ZSTD_createDCtx_internal(ZSTD_defaultCMem); +} + +static void ZSTD_clearDict(ZSTD_DCtx* dctx) +{ + ZSTD_freeDDict(dctx->ddictLocal); + dctx->ddictLocal = NULL; + dctx->ddict = NULL; + dctx->dictUses = ZSTD_dont_use; +} + +size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx) +{ + if (dctx==NULL) return 0; /* support free on NULL */ + RETURN_ERROR_IF(dctx->staticSize, memory_allocation, "not compatible with static DCtx"); + { ZSTD_customMem const cMem = dctx->customMem; + ZSTD_clearDict(dctx); + ZSTD_customFree(dctx->inBuff, cMem); + dctx->inBuff = NULL; +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) + if (dctx->legacyContext) + ZSTD_freeLegacyStreamContext(dctx->legacyContext, dctx->previousLegacyVersion); +#endif + if (dctx->ddictSet) { + ZSTD_freeDDictHashSet(dctx->ddictSet, cMem); + dctx->ddictSet = NULL; + } + ZSTD_customFree(dctx, cMem); + return 0; + } +} + +/* no longer useful */ +void ZSTD_copyDCtx(ZSTD_DCtx* dstDCtx, const ZSTD_DCtx* srcDCtx) +{ + size_t const toCopy = (size_t)((char*)(&dstDCtx->inBuff) - (char*)dstDCtx); + ZSTD_memcpy(dstDCtx, srcDCtx, toCopy); /* no need to copy workspace */ +} + +/* Given a dctx with a digested frame params, re-selects the correct ZSTD_DDict based on + * the requested dict ID from the frame. If there exists a reference to the correct ZSTD_DDict, then + * accordingly sets the ddict to be used to decompress the frame. + * + * If no DDict is found, then no action is taken, and the ZSTD_DCtx::ddict remains as-is. + * + * ZSTD_d_refMultipleDDicts must be enabled for this function to be called. + */ +static void ZSTD_DCtx_selectFrameDDict(ZSTD_DCtx* dctx) { + assert(dctx->refMultipleDDicts && dctx->ddictSet); + DEBUGLOG(4, "Adjusting DDict based on requested dict ID from frame"); + if (dctx->ddict) { + const ZSTD_DDict* frameDDict = ZSTD_DDictHashSet_getDDict(dctx->ddictSet, dctx->fParams.dictID); + if (frameDDict) { + DEBUGLOG(4, "DDict found!"); + ZSTD_clearDict(dctx); + dctx->dictID = dctx->fParams.dictID; + dctx->ddict = frameDDict; + dctx->dictUses = ZSTD_use_indefinitely; + } + } +} + + +/*-************************************************************* + * Frame header decoding + ***************************************************************/ + +/*! ZSTD_isFrame() : + * Tells if the content of `buffer` starts with a valid Frame Identifier. + * Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. + * Note 2 : Legacy Frame Identifiers are considered valid only if Legacy Support is enabled. + * Note 3 : Skippable Frame Identifiers are considered valid. */ +unsigned ZSTD_isFrame(const void* buffer, size_t size) +{ + if (size < ZSTD_FRAMEIDSIZE) return 0; + { U32 const magic = MEM_readLE32(buffer); + if (magic == ZSTD_MAGICNUMBER) return 1; + if ((magic & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) return 1; + } +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) + if (ZSTD_isLegacy(buffer, size)) return 1; +#endif + return 0; +} + +/*! ZSTD_isSkippableFrame() : + * Tells if the content of `buffer` starts with a valid Frame Identifier for a skippable frame. + * Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. + */ +unsigned ZSTD_isSkippableFrame(const void* buffer, size_t size) +{ + if (size < ZSTD_FRAMEIDSIZE) return 0; + { U32 const magic = MEM_readLE32(buffer); + if ((magic & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) return 1; + } + return 0; +} + +/** ZSTD_frameHeaderSize_internal() : + * srcSize must be large enough to reach header size fields. + * note : only works for formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless. + * @return : size of the Frame Header + * or an error code, which can be tested with ZSTD_isError() */ +static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format) +{ + size_t const minInputSize = ZSTD_startingInputLength(format); + RETURN_ERROR_IF(srcSize < minInputSize, srcSize_wrong, ""); + + { BYTE const fhd = ((const BYTE*)src)[minInputSize-1]; + U32 const dictID= fhd & 3; + U32 const singleSegment = (fhd >> 5) & 1; + U32 const fcsId = fhd >> 6; + return minInputSize + !singleSegment + + ZSTD_did_fieldSize[dictID] + ZSTD_fcs_fieldSize[fcsId] + + (singleSegment && !fcsId); + } +} + +/** ZSTD_frameHeaderSize() : + * srcSize must be >= ZSTD_frameHeaderSize_prefix. + * @return : size of the Frame Header, + * or an error code (if srcSize is too small) */ +size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize) +{ + return ZSTD_frameHeaderSize_internal(src, srcSize, ZSTD_f_zstd1); +} + + +/** ZSTD_getFrameHeader_advanced() : + * decode Frame Header, or require larger `srcSize`. + * note : only works for formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless + * @return : 0, `zfhPtr` is correctly filled, + * >0, `srcSize` is too small, value is wanted `srcSize` amount, +** or an error code, which can be tested using ZSTD_isError() */ +size_t ZSTD_getFrameHeader_advanced(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD_format_e format) +{ + const BYTE* ip = (const BYTE*)src; + size_t const minInputSize = ZSTD_startingInputLength(format); + + DEBUGLOG(5, "ZSTD_getFrameHeader_advanced: minInputSize = %zu, srcSize = %zu", minInputSize, srcSize); + + if (srcSize > 0) { + /* note : technically could be considered an assert(), since it's an invalid entry */ + RETURN_ERROR_IF(src==NULL, GENERIC, "invalid parameter : src==NULL, but srcSize>0"); + } + if (srcSize < minInputSize) { + if (srcSize > 0 && format != ZSTD_f_zstd1_magicless) { + /* when receiving less than @minInputSize bytes, + * control these bytes at least correspond to a supported magic number + * in order to error out early if they don't. + **/ + size_t const toCopy = MIN(4, srcSize); + unsigned char hbuf[4]; MEM_writeLE32(hbuf, ZSTD_MAGICNUMBER); + assert(src != NULL); + ZSTD_memcpy(hbuf, src, toCopy); + if ( MEM_readLE32(hbuf) != ZSTD_MAGICNUMBER ) { + /* not a zstd frame : let's check if it's a skippable frame */ + MEM_writeLE32(hbuf, ZSTD_MAGIC_SKIPPABLE_START); + ZSTD_memcpy(hbuf, src, toCopy); + if ((MEM_readLE32(hbuf) & ZSTD_MAGIC_SKIPPABLE_MASK) != ZSTD_MAGIC_SKIPPABLE_START) { + RETURN_ERROR(prefix_unknown, + "first bytes don't correspond to any supported magic number"); + } } } + return minInputSize; + } + + ZSTD_memset(zfhPtr, 0, sizeof(*zfhPtr)); /* not strictly necessary, but static analyzers may not understand that zfhPtr will be read only if return value is zero, since they are 2 different signals */ + if ( (format != ZSTD_f_zstd1_magicless) + && (MEM_readLE32(src) != ZSTD_MAGICNUMBER) ) { + if ((MEM_readLE32(src) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { + /* skippable frame */ + if (srcSize < ZSTD_SKIPPABLEHEADERSIZE) + return ZSTD_SKIPPABLEHEADERSIZE; /* magic number + frame length */ + ZSTD_memset(zfhPtr, 0, sizeof(*zfhPtr)); + zfhPtr->frameType = ZSTD_skippableFrame; + zfhPtr->dictID = MEM_readLE32(src) - ZSTD_MAGIC_SKIPPABLE_START; + zfhPtr->headerSize = ZSTD_SKIPPABLEHEADERSIZE; + zfhPtr->frameContentSize = MEM_readLE32((const char *)src + ZSTD_FRAMEIDSIZE); + return 0; + } + RETURN_ERROR(prefix_unknown, ""); + } + + /* ensure there is enough `srcSize` to fully read/decode frame header */ + { size_t const fhsize = ZSTD_frameHeaderSize_internal(src, srcSize, format); + if (srcSize < fhsize) return fhsize; + zfhPtr->headerSize = (U32)fhsize; + } + + { BYTE const fhdByte = ip[minInputSize-1]; + size_t pos = minInputSize; + U32 const dictIDSizeCode = fhdByte&3; + U32 const checksumFlag = (fhdByte>>2)&1; + U32 const singleSegment = (fhdByte>>5)&1; + U32 const fcsID = fhdByte>>6; + U64 windowSize = 0; + U32 dictID = 0; + U64 frameContentSize = ZSTD_CONTENTSIZE_UNKNOWN; + RETURN_ERROR_IF((fhdByte & 0x08) != 0, frameParameter_unsupported, + "reserved bits, must be zero"); + + if (!singleSegment) { + BYTE const wlByte = ip[pos++]; + U32 const windowLog = (wlByte >> 3) + ZSTD_WINDOWLOG_ABSOLUTEMIN; + RETURN_ERROR_IF(windowLog > ZSTD_WINDOWLOG_MAX, frameParameter_windowTooLarge, ""); + windowSize = (1ULL << windowLog); + windowSize += (windowSize >> 3) * (wlByte&7); + } + switch(dictIDSizeCode) + { + default: + assert(0); /* impossible */ + ZSTD_FALLTHROUGH; + case 0 : break; + case 1 : dictID = ip[pos]; pos++; break; + case 2 : dictID = MEM_readLE16(ip+pos); pos+=2; break; + case 3 : dictID = MEM_readLE32(ip+pos); pos+=4; break; + } + switch(fcsID) + { + default: + assert(0); /* impossible */ + ZSTD_FALLTHROUGH; + case 0 : if (singleSegment) frameContentSize = ip[pos]; break; + case 1 : frameContentSize = MEM_readLE16(ip+pos)+256; break; + case 2 : frameContentSize = MEM_readLE32(ip+pos); break; + case 3 : frameContentSize = MEM_readLE64(ip+pos); break; + } + if (singleSegment) windowSize = frameContentSize; + + zfhPtr->frameType = ZSTD_frame; + zfhPtr->frameContentSize = frameContentSize; + zfhPtr->windowSize = windowSize; + zfhPtr->blockSizeMax = (unsigned) MIN(windowSize, ZSTD_BLOCKSIZE_MAX); + zfhPtr->dictID = dictID; + zfhPtr->checksumFlag = checksumFlag; + } + return 0; +} + +/** ZSTD_getFrameHeader() : + * decode Frame Header, or require larger `srcSize`. + * note : this function does not consume input, it only reads it. + * @return : 0, `zfhPtr` is correctly filled, + * >0, `srcSize` is too small, value is wanted `srcSize` amount, + * or an error code, which can be tested using ZSTD_isError() */ +size_t ZSTD_getFrameHeader(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize) +{ + return ZSTD_getFrameHeader_advanced(zfhPtr, src, srcSize, ZSTD_f_zstd1); +} + +/** ZSTD_getFrameContentSize() : + * compatible with legacy mode + * @return : decompressed size of the single frame pointed to be `src` if known, otherwise + * - ZSTD_CONTENTSIZE_UNKNOWN if the size cannot be determined + * - ZSTD_CONTENTSIZE_ERROR if an error occurred (e.g. invalid magic number, srcSize too small) */ +unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize) +{ +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) + if (ZSTD_isLegacy(src, srcSize)) { + unsigned long long const ret = ZSTD_getDecompressedSize_legacy(src, srcSize); + return ret == 0 ? ZSTD_CONTENTSIZE_UNKNOWN : ret; + } +#endif + { ZSTD_FrameHeader zfh; + if (ZSTD_getFrameHeader(&zfh, src, srcSize) != 0) + return ZSTD_CONTENTSIZE_ERROR; + if (zfh.frameType == ZSTD_skippableFrame) { + return 0; + } else { + return zfh.frameContentSize; + } } +} + +static size_t readSkippableFrameSize(void const* src, size_t srcSize) +{ + size_t const skippableHeaderSize = ZSTD_SKIPPABLEHEADERSIZE; + U32 sizeU32; + + RETURN_ERROR_IF(srcSize < ZSTD_SKIPPABLEHEADERSIZE, srcSize_wrong, ""); + + sizeU32 = MEM_readLE32((BYTE const*)src + ZSTD_FRAMEIDSIZE); + RETURN_ERROR_IF((U32)(sizeU32 + ZSTD_SKIPPABLEHEADERSIZE) < sizeU32, + frameParameter_unsupported, ""); + { size_t const skippableSize = skippableHeaderSize + sizeU32; + RETURN_ERROR_IF(skippableSize > srcSize, srcSize_wrong, ""); + return skippableSize; + } +} + +/*! ZSTD_readSkippableFrame() : + * Retrieves content of a skippable frame, and writes it to dst buffer. + * + * The parameter magicVariant will receive the magicVariant that was supplied when the frame was written, + * i.e. magicNumber - ZSTD_MAGIC_SKIPPABLE_START. This can be NULL if the caller is not interested + * in the magicVariant. + * + * Returns an error if destination buffer is not large enough, or if this is not a valid skippable frame. + * + * @return : number of bytes written or a ZSTD error. + */ +size_t ZSTD_readSkippableFrame(void* dst, size_t dstCapacity, + unsigned* magicVariant, /* optional, can be NULL */ + const void* src, size_t srcSize) +{ + RETURN_ERROR_IF(srcSize < ZSTD_SKIPPABLEHEADERSIZE, srcSize_wrong, ""); + + { U32 const magicNumber = MEM_readLE32(src); + size_t skippableFrameSize = readSkippableFrameSize(src, srcSize); + size_t skippableContentSize = skippableFrameSize - ZSTD_SKIPPABLEHEADERSIZE; + + /* check input validity */ + RETURN_ERROR_IF(!ZSTD_isSkippableFrame(src, srcSize), frameParameter_unsupported, ""); + RETURN_ERROR_IF(skippableFrameSize < ZSTD_SKIPPABLEHEADERSIZE || skippableFrameSize > srcSize, srcSize_wrong, ""); + RETURN_ERROR_IF(skippableContentSize > dstCapacity, dstSize_tooSmall, ""); + + /* deliver payload */ + if (skippableContentSize > 0 && dst != NULL) + ZSTD_memcpy(dst, (const BYTE *)src + ZSTD_SKIPPABLEHEADERSIZE, skippableContentSize); + if (magicVariant != NULL) + *magicVariant = magicNumber - ZSTD_MAGIC_SKIPPABLE_START; + return skippableContentSize; + } +} + +/** ZSTD_findDecompressedSize() : + * `srcSize` must be the exact length of some number of ZSTD compressed and/or + * skippable frames + * note: compatible with legacy mode + * @return : decompressed size of the frames contained */ +unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize) +{ + unsigned long long totalDstSize = 0; + + while (srcSize >= ZSTD_startingInputLength(ZSTD_f_zstd1)) { + U32 const magicNumber = MEM_readLE32(src); + + if ((magicNumber & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { + size_t const skippableSize = readSkippableFrameSize(src, srcSize); + if (ZSTD_isError(skippableSize)) return ZSTD_CONTENTSIZE_ERROR; + assert(skippableSize <= srcSize); + + src = (const BYTE *)src + skippableSize; + srcSize -= skippableSize; + continue; + } + + { unsigned long long const fcs = ZSTD_getFrameContentSize(src, srcSize); + if (fcs >= ZSTD_CONTENTSIZE_ERROR) return fcs; + + if (totalDstSize + fcs < totalDstSize) + return ZSTD_CONTENTSIZE_ERROR; /* check for overflow */ + totalDstSize += fcs; + } + /* skip to next frame */ + { size_t const frameSrcSize = ZSTD_findFrameCompressedSize(src, srcSize); + if (ZSTD_isError(frameSrcSize)) return ZSTD_CONTENTSIZE_ERROR; + assert(frameSrcSize <= srcSize); + + src = (const BYTE *)src + frameSrcSize; + srcSize -= frameSrcSize; + } + } /* while (srcSize >= ZSTD_frameHeaderSize_prefix) */ + + if (srcSize) return ZSTD_CONTENTSIZE_ERROR; + + return totalDstSize; +} + +/** ZSTD_getDecompressedSize() : + * compatible with legacy mode + * @return : decompressed size if known, 0 otherwise + note : 0 can mean any of the following : + - frame content is empty + - decompressed size field is not present in frame header + - frame header unknown / not supported + - frame header not complete (`srcSize` too small) */ +unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize) +{ + unsigned long long const ret = ZSTD_getFrameContentSize(src, srcSize); + ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_ERROR < ZSTD_CONTENTSIZE_UNKNOWN); + return (ret >= ZSTD_CONTENTSIZE_ERROR) ? 0 : ret; +} + + +/** ZSTD_decodeFrameHeader() : + * `headerSize` must be the size provided by ZSTD_frameHeaderSize(). + * If multiple DDict references are enabled, also will choose the correct DDict to use. + * @return : 0 if success, or an error code, which can be tested using ZSTD_isError() */ +static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t headerSize) +{ + size_t const result = ZSTD_getFrameHeader_advanced(&(dctx->fParams), src, headerSize, dctx->format); + if (ZSTD_isError(result)) return result; /* invalid header */ + RETURN_ERROR_IF(result>0, srcSize_wrong, "headerSize too small"); + + /* Reference DDict requested by frame if dctx references multiple ddicts */ + if (dctx->refMultipleDDicts == ZSTD_rmd_refMultipleDDicts && dctx->ddictSet) { + ZSTD_DCtx_selectFrameDDict(dctx); + } + +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + /* Skip the dictID check in fuzzing mode, because it makes the search + * harder. + */ + RETURN_ERROR_IF(dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID), + dictionary_wrong, ""); +#endif + dctx->validateChecksum = (dctx->fParams.checksumFlag && !dctx->forceIgnoreChecksum) ? 1 : 0; + if (dctx->validateChecksum) XXH64_reset(&dctx->xxhState, 0); + dctx->processedCSize += headerSize; + return 0; +} + +static ZSTD_frameSizeInfo ZSTD_errorFrameSizeInfo(size_t ret) +{ + ZSTD_frameSizeInfo frameSizeInfo; + frameSizeInfo.compressedSize = ret; + frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR; + return frameSizeInfo; +} + +static ZSTD_frameSizeInfo ZSTD_findFrameSizeInfo(const void* src, size_t srcSize, ZSTD_format_e format) +{ + ZSTD_frameSizeInfo frameSizeInfo; + ZSTD_memset(&frameSizeInfo, 0, sizeof(ZSTD_frameSizeInfo)); + +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) + if (format == ZSTD_f_zstd1 && ZSTD_isLegacy(src, srcSize)) + return ZSTD_findFrameSizeInfoLegacy(src, srcSize); +#endif + + if (format == ZSTD_f_zstd1 && (srcSize >= ZSTD_SKIPPABLEHEADERSIZE) + && (MEM_readLE32(src) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { + frameSizeInfo.compressedSize = readSkippableFrameSize(src, srcSize); + assert(ZSTD_isError(frameSizeInfo.compressedSize) || + frameSizeInfo.compressedSize <= srcSize); + return frameSizeInfo; + } else { + const BYTE* ip = (const BYTE*)src; + const BYTE* const ipstart = ip; + size_t remainingSize = srcSize; + size_t nbBlocks = 0; + ZSTD_FrameHeader zfh; + + /* Extract Frame Header */ + { size_t const ret = ZSTD_getFrameHeader_advanced(&zfh, src, srcSize, format); + if (ZSTD_isError(ret)) + return ZSTD_errorFrameSizeInfo(ret); + if (ret > 0) + return ZSTD_errorFrameSizeInfo(ERROR(srcSize_wrong)); + } + + ip += zfh.headerSize; + remainingSize -= zfh.headerSize; + + /* Iterate over each block */ + while (1) { + blockProperties_t blockProperties; + size_t const cBlockSize = ZSTD_getcBlockSize(ip, remainingSize, &blockProperties); + if (ZSTD_isError(cBlockSize)) + return ZSTD_errorFrameSizeInfo(cBlockSize); + + if (ZSTD_blockHeaderSize + cBlockSize > remainingSize) + return ZSTD_errorFrameSizeInfo(ERROR(srcSize_wrong)); + + ip += ZSTD_blockHeaderSize + cBlockSize; + remainingSize -= ZSTD_blockHeaderSize + cBlockSize; + nbBlocks++; + + if (blockProperties.lastBlock) break; + } + + /* Final frame content checksum */ + if (zfh.checksumFlag) { + if (remainingSize < 4) + return ZSTD_errorFrameSizeInfo(ERROR(srcSize_wrong)); + ip += 4; + } + + frameSizeInfo.nbBlocks = nbBlocks; + frameSizeInfo.compressedSize = (size_t)(ip - ipstart); + frameSizeInfo.decompressedBound = (zfh.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN) + ? zfh.frameContentSize + : (unsigned long long)nbBlocks * zfh.blockSizeMax; + return frameSizeInfo; + } +} + +static size_t ZSTD_findFrameCompressedSize_advanced(const void *src, size_t srcSize, ZSTD_format_e format) { + ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize, format); + return frameSizeInfo.compressedSize; +} + +/** ZSTD_findFrameCompressedSize() : + * See docs in zstd.h + * Note: compatible with legacy mode */ +size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize) +{ + return ZSTD_findFrameCompressedSize_advanced(src, srcSize, ZSTD_f_zstd1); +} + +/** ZSTD_decompressBound() : + * compatible with legacy mode + * `src` must point to the start of a ZSTD frame or a skippable frame + * `srcSize` must be at least as large as the frame contained + * @return : the maximum decompressed size of the compressed source + */ +unsigned long long ZSTD_decompressBound(const void* src, size_t srcSize) +{ + unsigned long long bound = 0; + /* Iterate over each frame */ + while (srcSize > 0) { + ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize, ZSTD_f_zstd1); + size_t const compressedSize = frameSizeInfo.compressedSize; + unsigned long long const decompressedBound = frameSizeInfo.decompressedBound; + if (ZSTD_isError(compressedSize) || decompressedBound == ZSTD_CONTENTSIZE_ERROR) + return ZSTD_CONTENTSIZE_ERROR; + assert(srcSize >= compressedSize); + src = (const BYTE*)src + compressedSize; + srcSize -= compressedSize; + bound += decompressedBound; + } + return bound; +} + +size_t ZSTD_decompressionMargin(void const* src, size_t srcSize) +{ + size_t margin = 0; + unsigned maxBlockSize = 0; + + /* Iterate over each frame */ + while (srcSize > 0) { + ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize, ZSTD_f_zstd1); + size_t const compressedSize = frameSizeInfo.compressedSize; + unsigned long long const decompressedBound = frameSizeInfo.decompressedBound; + ZSTD_FrameHeader zfh; + + FORWARD_IF_ERROR(ZSTD_getFrameHeader(&zfh, src, srcSize), ""); + if (ZSTD_isError(compressedSize) || decompressedBound == ZSTD_CONTENTSIZE_ERROR) + return ERROR(corruption_detected); + + if (zfh.frameType == ZSTD_frame) { + /* Add the frame header to our margin */ + margin += zfh.headerSize; + /* Add the checksum to our margin */ + margin += zfh.checksumFlag ? 4 : 0; + /* Add 3 bytes per block */ + margin += 3 * frameSizeInfo.nbBlocks; + + /* Compute the max block size */ + maxBlockSize = MAX(maxBlockSize, zfh.blockSizeMax); + } else { + assert(zfh.frameType == ZSTD_skippableFrame); + /* Add the entire skippable frame size to our margin. */ + margin += compressedSize; + } + + assert(srcSize >= compressedSize); + src = (const BYTE*)src + compressedSize; + srcSize -= compressedSize; + } + + /* Add the max block size back to the margin. */ + margin += maxBlockSize; + + return margin; +} + +/*-************************************************************* + * Frame decoding + ***************************************************************/ + +/** ZSTD_insertBlock() : + * insert `src` block into `dctx` history. Useful to track uncompressed blocks. */ +size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize) +{ + DEBUGLOG(5, "ZSTD_insertBlock: %u bytes", (unsigned)blockSize); + ZSTD_checkContinuity(dctx, blockStart, blockSize); + dctx->previousDstEnd = (const char*)blockStart + blockSize; + return blockSize; +} + + +static size_t ZSTD_copyRawBlock(void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + DEBUGLOG(5, "ZSTD_copyRawBlock"); + RETURN_ERROR_IF(srcSize > dstCapacity, dstSize_tooSmall, ""); + if (dst == NULL) { + if (srcSize == 0) return 0; + RETURN_ERROR(dstBuffer_null, ""); + } + ZSTD_memmove(dst, src, srcSize); + return srcSize; +} + +static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity, + BYTE b, + size_t regenSize) +{ + RETURN_ERROR_IF(regenSize > dstCapacity, dstSize_tooSmall, ""); + if (dst == NULL) { + if (regenSize == 0) return 0; + RETURN_ERROR(dstBuffer_null, ""); + } + ZSTD_memset(dst, b, regenSize); + return regenSize; +} + +static void ZSTD_DCtx_trace_end(ZSTD_DCtx const* dctx, U64 uncompressedSize, U64 compressedSize, int streaming) +{ +#if ZSTD_TRACE + if (dctx->traceCtx && ZSTD_trace_decompress_end != NULL) { + ZSTD_Trace trace; + ZSTD_memset(&trace, 0, sizeof(trace)); + trace.version = ZSTD_VERSION_NUMBER; + trace.streaming = streaming; + if (dctx->ddict) { + trace.dictionaryID = ZSTD_getDictID_fromDDict(dctx->ddict); + trace.dictionarySize = ZSTD_DDict_dictSize(dctx->ddict); + trace.dictionaryIsCold = dctx->ddictIsCold; + } + trace.uncompressedSize = (size_t)uncompressedSize; + trace.compressedSize = (size_t)compressedSize; + trace.dctx = dctx; + ZSTD_trace_decompress_end(dctx->traceCtx, &trace); + } +#else + (void)dctx; + (void)uncompressedSize; + (void)compressedSize; + (void)streaming; +#endif +} + + +/*! ZSTD_decompressFrame() : + * @dctx must be properly initialized + * will update *srcPtr and *srcSizePtr, + * to make *srcPtr progress by one frame. */ +static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void** srcPtr, size_t *srcSizePtr) +{ + const BYTE* const istart = (const BYTE*)(*srcPtr); + const BYTE* ip = istart; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = dstCapacity != 0 ? ostart + dstCapacity : ostart; + BYTE* op = ostart; + size_t remainingSrcSize = *srcSizePtr; + + DEBUGLOG(4, "ZSTD_decompressFrame (srcSize:%i)", (int)*srcSizePtr); + + /* check */ + RETURN_ERROR_IF( + remainingSrcSize < ZSTD_FRAMEHEADERSIZE_MIN(dctx->format)+ZSTD_blockHeaderSize, + srcSize_wrong, ""); + + /* Frame Header */ + { size_t const frameHeaderSize = ZSTD_frameHeaderSize_internal( + ip, ZSTD_FRAMEHEADERSIZE_PREFIX(dctx->format), dctx->format); + if (ZSTD_isError(frameHeaderSize)) return frameHeaderSize; + RETURN_ERROR_IF(remainingSrcSize < frameHeaderSize+ZSTD_blockHeaderSize, + srcSize_wrong, ""); + FORWARD_IF_ERROR( ZSTD_decodeFrameHeader(dctx, ip, frameHeaderSize) , ""); + ip += frameHeaderSize; remainingSrcSize -= frameHeaderSize; + } + + /* Shrink the blockSizeMax if enabled */ + if (dctx->maxBlockSizeParam != 0) + dctx->fParams.blockSizeMax = MIN(dctx->fParams.blockSizeMax, (unsigned)dctx->maxBlockSizeParam); + + /* Loop on each block */ + while (1) { + BYTE* oBlockEnd = oend; + size_t decodedSize; + blockProperties_t blockProperties; + size_t const cBlockSize = ZSTD_getcBlockSize(ip, remainingSrcSize, &blockProperties); + if (ZSTD_isError(cBlockSize)) return cBlockSize; + + ip += ZSTD_blockHeaderSize; + remainingSrcSize -= ZSTD_blockHeaderSize; + RETURN_ERROR_IF(cBlockSize > remainingSrcSize, srcSize_wrong, ""); + + if (ip >= op && ip < oBlockEnd) { + /* We are decompressing in-place. Limit the output pointer so that we + * don't overwrite the block that we are currently reading. This will + * fail decompression if the input & output pointers aren't spaced + * far enough apart. + * + * This is important to set, even when the pointers are far enough + * apart, because ZSTD_decompressBlock_internal() can decide to store + * literals in the output buffer, after the block it is decompressing. + * Since we don't want anything to overwrite our input, we have to tell + * ZSTD_decompressBlock_internal to never write past ip. + * + * See ZSTD_allocateLiteralsBuffer() for reference. + */ + oBlockEnd = op + (ip - op); + } + + switch(blockProperties.blockType) + { + case bt_compressed: + assert(dctx->isFrameDecompression == 1); + decodedSize = ZSTD_decompressBlock_internal(dctx, op, (size_t)(oBlockEnd-op), ip, cBlockSize, not_streaming); + break; + case bt_raw : + /* Use oend instead of oBlockEnd because this function is safe to overlap. It uses memmove. */ + decodedSize = ZSTD_copyRawBlock(op, (size_t)(oend-op), ip, cBlockSize); + break; + case bt_rle : + decodedSize = ZSTD_setRleBlock(op, (size_t)(oBlockEnd-op), *ip, blockProperties.origSize); + break; + case bt_reserved : + default: + RETURN_ERROR(corruption_detected, "invalid block type"); + } + FORWARD_IF_ERROR(decodedSize, "Block decompression failure"); + DEBUGLOG(5, "Decompressed block of dSize = %u", (unsigned)decodedSize); + if (dctx->validateChecksum) { + XXH64_update(&dctx->xxhState, op, decodedSize); + } + if (decodedSize) /* support dst = NULL,0 */ { + op += decodedSize; + } + assert(ip != NULL); + ip += cBlockSize; + remainingSrcSize -= cBlockSize; + if (blockProperties.lastBlock) break; + } + + if (dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN) { + RETURN_ERROR_IF((U64)(op-ostart) != dctx->fParams.frameContentSize, + corruption_detected, ""); + } + if (dctx->fParams.checksumFlag) { /* Frame content checksum verification */ + RETURN_ERROR_IF(remainingSrcSize<4, checksum_wrong, ""); + if (!dctx->forceIgnoreChecksum) { + U32 const checkCalc = (U32)XXH64_digest(&dctx->xxhState); + U32 checkRead; + checkRead = MEM_readLE32(ip); + RETURN_ERROR_IF(checkRead != checkCalc, checksum_wrong, ""); + } + ip += 4; + remainingSrcSize -= 4; + } + ZSTD_DCtx_trace_end(dctx, (U64)(op-ostart), (U64)(ip-istart), /* streaming */ 0); + /* Allow caller to get size read */ + DEBUGLOG(4, "ZSTD_decompressFrame: decompressed frame of size %i, consuming %i bytes of input", (int)(op-ostart), (int)(ip - (const BYTE*)*srcPtr)); + *srcPtr = ip; + *srcSizePtr = remainingSrcSize; + return (size_t)(op-ostart); +} + +static +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const void* dict, size_t dictSize, + const ZSTD_DDict* ddict) +{ + void* const dststart = dst; + int moreThan1Frame = 0; + + DEBUGLOG(5, "ZSTD_decompressMultiFrame"); + assert(dict==NULL || ddict==NULL); /* either dict or ddict set, not both */ + + if (ddict) { + dict = ZSTD_DDict_dictContent(ddict); + dictSize = ZSTD_DDict_dictSize(ddict); + } + + while (srcSize >= ZSTD_startingInputLength(dctx->format)) { + +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) + if (dctx->format == ZSTD_f_zstd1 && ZSTD_isLegacy(src, srcSize)) { + size_t decodedSize; + size_t const frameSize = ZSTD_findFrameCompressedSizeLegacy(src, srcSize); + if (ZSTD_isError(frameSize)) return frameSize; + RETURN_ERROR_IF(dctx->staticSize, memory_allocation, + "legacy support is not compatible with static dctx"); + + decodedSize = ZSTD_decompressLegacy(dst, dstCapacity, src, frameSize, dict, dictSize); + if (ZSTD_isError(decodedSize)) return decodedSize; + + { + unsigned long long const expectedSize = ZSTD_getFrameContentSize(src, srcSize); + RETURN_ERROR_IF(expectedSize == ZSTD_CONTENTSIZE_ERROR, corruption_detected, "Corrupted frame header!"); + if (expectedSize != ZSTD_CONTENTSIZE_UNKNOWN) { + RETURN_ERROR_IF(expectedSize != decodedSize, corruption_detected, + "Frame header size does not match decoded size!"); + } + } + + assert(decodedSize <= dstCapacity); + dst = (BYTE*)dst + decodedSize; + dstCapacity -= decodedSize; + + src = (const BYTE*)src + frameSize; + srcSize -= frameSize; + + continue; + } +#endif + + if (dctx->format == ZSTD_f_zstd1 && srcSize >= 4) { + U32 const magicNumber = MEM_readLE32(src); + DEBUGLOG(5, "reading magic number %08X", (unsigned)magicNumber); + if ((magicNumber & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { + /* skippable frame detected : skip it */ + size_t const skippableSize = readSkippableFrameSize(src, srcSize); + FORWARD_IF_ERROR(skippableSize, "invalid skippable frame"); + assert(skippableSize <= srcSize); + + src = (const BYTE *)src + skippableSize; + srcSize -= skippableSize; + continue; /* check next frame */ + } } + + if (ddict) { + /* we were called from ZSTD_decompress_usingDDict */ + FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(dctx, ddict), ""); + } else { + /* this will initialize correctly with no dict if dict == NULL, so + * use this in all cases but ddict */ + FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDict(dctx, dict, dictSize), ""); + } + ZSTD_checkContinuity(dctx, dst, dstCapacity); + + { const size_t res = ZSTD_decompressFrame(dctx, dst, dstCapacity, + &src, &srcSize); + RETURN_ERROR_IF( + (ZSTD_getErrorCode(res) == ZSTD_error_prefix_unknown) + && (moreThan1Frame==1), + srcSize_wrong, + "At least one frame successfully completed, " + "but following bytes are garbage: " + "it's more likely to be a srcSize error, " + "specifying more input bytes than size of frame(s). " + "Note: one could be unlucky, it might be a corruption error instead, " + "happening right at the place where we expect zstd magic bytes. " + "But this is _much_ less likely than a srcSize field error."); + if (ZSTD_isError(res)) return res; + assert(res <= dstCapacity); + if (res != 0) + dst = (BYTE*)dst + res; + dstCapacity -= res; + } + moreThan1Frame = 1; + } /* while (srcSize >= ZSTD_frameHeaderSize_prefix) */ + + RETURN_ERROR_IF(srcSize, srcSize_wrong, "input not entirely consumed"); + + return (size_t)((BYTE*)dst - (BYTE*)dststart); +} + +size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const void* dict, size_t dictSize) +{ + return ZSTD_decompressMultiFrame(dctx, dst, dstCapacity, src, srcSize, dict, dictSize, NULL); +} + + +static ZSTD_DDict const* ZSTD_getDDict(ZSTD_DCtx* dctx) +{ + switch (dctx->dictUses) { + default: + assert(0 /* Impossible */); + ZSTD_FALLTHROUGH; + case ZSTD_dont_use: + ZSTD_clearDict(dctx); + return NULL; + case ZSTD_use_indefinitely: + return dctx->ddict; + case ZSTD_use_once: + dctx->dictUses = ZSTD_dont_use; + return dctx->ddict; + } +} + +size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) +{ + return ZSTD_decompress_usingDDict(dctx, dst, dstCapacity, src, srcSize, ZSTD_getDDict(dctx)); +} + + +size_t ZSTD_decompress(void* dst, size_t dstCapacity, const void* src, size_t srcSize) +{ +#if defined(ZSTD_HEAPMODE) && (ZSTD_HEAPMODE>=1) + size_t regenSize; + ZSTD_DCtx* const dctx = ZSTD_createDCtx_internal(ZSTD_defaultCMem); + RETURN_ERROR_IF(dctx==NULL, memory_allocation, "NULL pointer!"); + regenSize = ZSTD_decompressDCtx(dctx, dst, dstCapacity, src, srcSize); + ZSTD_freeDCtx(dctx); + return regenSize; +#else /* stack mode */ + ZSTD_DCtx dctx; + ZSTD_initDCtx_internal(&dctx); + return ZSTD_decompressDCtx(&dctx, dst, dstCapacity, src, srcSize); +#endif +} + + +/*-************************************** +* Advanced Streaming Decompression API +* Bufferless and synchronous +****************************************/ +size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx) { return dctx->expected; } + +/** + * Similar to ZSTD_nextSrcSizeToDecompress(), but when a block input can be streamed, we + * allow taking a partial block as the input. Currently only raw uncompressed blocks can + * be streamed. + * + * For blocks that can be streamed, this allows us to reduce the latency until we produce + * output, and avoid copying the input. + * + * @param inputSize - The total amount of input that the caller currently has. + */ +static size_t ZSTD_nextSrcSizeToDecompressWithInputSize(ZSTD_DCtx* dctx, size_t inputSize) { + if (!(dctx->stage == ZSTDds_decompressBlock || dctx->stage == ZSTDds_decompressLastBlock)) + return dctx->expected; + if (dctx->bType != bt_raw) + return dctx->expected; + return BOUNDED(1, inputSize, dctx->expected); +} + +ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx* dctx) { + switch(dctx->stage) + { + default: /* should not happen */ + assert(0); + ZSTD_FALLTHROUGH; + case ZSTDds_getFrameHeaderSize: + ZSTD_FALLTHROUGH; + case ZSTDds_decodeFrameHeader: + return ZSTDnit_frameHeader; + case ZSTDds_decodeBlockHeader: + return ZSTDnit_blockHeader; + case ZSTDds_decompressBlock: + return ZSTDnit_block; + case ZSTDds_decompressLastBlock: + return ZSTDnit_lastBlock; + case ZSTDds_checkChecksum: + return ZSTDnit_checksum; + case ZSTDds_decodeSkippableHeader: + ZSTD_FALLTHROUGH; + case ZSTDds_skipFrame: + return ZSTDnit_skippableFrame; + } +} + +static int ZSTD_isSkipFrame(ZSTD_DCtx* dctx) { return dctx->stage == ZSTDds_skipFrame; } + +/** ZSTD_decompressContinue() : + * srcSize : must be the exact nb of bytes expected (see ZSTD_nextSrcSizeToDecompress()) + * @return : nb of bytes generated into `dst` (necessarily <= `dstCapacity) + * or an error code, which can be tested using ZSTD_isError() */ +size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize) +{ + DEBUGLOG(5, "ZSTD_decompressContinue (srcSize:%u)", (unsigned)srcSize); + /* Sanity check */ + RETURN_ERROR_IF(srcSize != ZSTD_nextSrcSizeToDecompressWithInputSize(dctx, srcSize), srcSize_wrong, "not allowed"); + ZSTD_checkContinuity(dctx, dst, dstCapacity); + + dctx->processedCSize += srcSize; + + switch (dctx->stage) + { + case ZSTDds_getFrameHeaderSize : + assert(src != NULL); + if (dctx->format == ZSTD_f_zstd1) { /* allows header */ + assert(srcSize >= ZSTD_FRAMEIDSIZE); /* to read skippable magic number */ + if ((MEM_readLE32(src) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */ + ZSTD_memcpy(dctx->headerBuffer, src, srcSize); + dctx->expected = ZSTD_SKIPPABLEHEADERSIZE - srcSize; /* remaining to load to get full skippable frame header */ + dctx->stage = ZSTDds_decodeSkippableHeader; + return 0; + } } + dctx->headerSize = ZSTD_frameHeaderSize_internal(src, srcSize, dctx->format); + if (ZSTD_isError(dctx->headerSize)) return dctx->headerSize; + ZSTD_memcpy(dctx->headerBuffer, src, srcSize); + dctx->expected = dctx->headerSize - srcSize; + dctx->stage = ZSTDds_decodeFrameHeader; + return 0; + + case ZSTDds_decodeFrameHeader: + assert(src != NULL); + ZSTD_memcpy(dctx->headerBuffer + (dctx->headerSize - srcSize), src, srcSize); + FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(dctx, dctx->headerBuffer, dctx->headerSize), ""); + dctx->expected = ZSTD_blockHeaderSize; + dctx->stage = ZSTDds_decodeBlockHeader; + return 0; + + case ZSTDds_decodeBlockHeader: + { blockProperties_t bp; + size_t const cBlockSize = ZSTD_getcBlockSize(src, ZSTD_blockHeaderSize, &bp); + if (ZSTD_isError(cBlockSize)) return cBlockSize; + RETURN_ERROR_IF(cBlockSize > dctx->fParams.blockSizeMax, corruption_detected, "Block Size Exceeds Maximum"); + dctx->expected = cBlockSize; + dctx->bType = bp.blockType; + dctx->rleSize = bp.origSize; + if (cBlockSize) { + dctx->stage = bp.lastBlock ? ZSTDds_decompressLastBlock : ZSTDds_decompressBlock; + return 0; + } + /* empty block */ + if (bp.lastBlock) { + if (dctx->fParams.checksumFlag) { + dctx->expected = 4; + dctx->stage = ZSTDds_checkChecksum; + } else { + dctx->expected = 0; /* end of frame */ + dctx->stage = ZSTDds_getFrameHeaderSize; + } + } else { + dctx->expected = ZSTD_blockHeaderSize; /* jump to next header */ + dctx->stage = ZSTDds_decodeBlockHeader; + } + return 0; + } + + case ZSTDds_decompressLastBlock: + case ZSTDds_decompressBlock: + DEBUGLOG(5, "ZSTD_decompressContinue: case ZSTDds_decompressBlock"); + { size_t rSize; + switch(dctx->bType) + { + case bt_compressed: + DEBUGLOG(5, "ZSTD_decompressContinue: case bt_compressed"); + assert(dctx->isFrameDecompression == 1); + rSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, is_streaming); + dctx->expected = 0; /* Streaming not supported */ + break; + case bt_raw : + assert(srcSize <= dctx->expected); + rSize = ZSTD_copyRawBlock(dst, dstCapacity, src, srcSize); + FORWARD_IF_ERROR(rSize, "ZSTD_copyRawBlock failed"); + assert(rSize == srcSize); + dctx->expected -= rSize; + break; + case bt_rle : + rSize = ZSTD_setRleBlock(dst, dstCapacity, *(const BYTE*)src, dctx->rleSize); + dctx->expected = 0; /* Streaming not supported */ + break; + case bt_reserved : /* should never happen */ + default: + RETURN_ERROR(corruption_detected, "invalid block type"); + } + FORWARD_IF_ERROR(rSize, ""); + RETURN_ERROR_IF(rSize > dctx->fParams.blockSizeMax, corruption_detected, "Decompressed Block Size Exceeds Maximum"); + DEBUGLOG(5, "ZSTD_decompressContinue: decoded size from block : %u", (unsigned)rSize); + dctx->decodedSize += rSize; + if (dctx->validateChecksum) XXH64_update(&dctx->xxhState, dst, rSize); + dctx->previousDstEnd = (char*)dst + rSize; + + /* Stay on the same stage until we are finished streaming the block. */ + if (dctx->expected > 0) { + return rSize; + } + + if (dctx->stage == ZSTDds_decompressLastBlock) { /* end of frame */ + DEBUGLOG(4, "ZSTD_decompressContinue: decoded size from frame : %u", (unsigned)dctx->decodedSize); + RETURN_ERROR_IF( + dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN + && dctx->decodedSize != dctx->fParams.frameContentSize, + corruption_detected, ""); + if (dctx->fParams.checksumFlag) { /* another round for frame checksum */ + dctx->expected = 4; + dctx->stage = ZSTDds_checkChecksum; + } else { + ZSTD_DCtx_trace_end(dctx, dctx->decodedSize, dctx->processedCSize, /* streaming */ 1); + dctx->expected = 0; /* ends here */ + dctx->stage = ZSTDds_getFrameHeaderSize; + } + } else { + dctx->stage = ZSTDds_decodeBlockHeader; + dctx->expected = ZSTD_blockHeaderSize; + } + return rSize; + } + + case ZSTDds_checkChecksum: + assert(srcSize == 4); /* guaranteed by dctx->expected */ + { + if (dctx->validateChecksum) { + U32 const h32 = (U32)XXH64_digest(&dctx->xxhState); + U32 const check32 = MEM_readLE32(src); + DEBUGLOG(4, "ZSTD_decompressContinue: checksum : calculated %08X :: %08X read", (unsigned)h32, (unsigned)check32); + RETURN_ERROR_IF(check32 != h32, checksum_wrong, ""); + } + ZSTD_DCtx_trace_end(dctx, dctx->decodedSize, dctx->processedCSize, /* streaming */ 1); + dctx->expected = 0; + dctx->stage = ZSTDds_getFrameHeaderSize; + return 0; + } + + case ZSTDds_decodeSkippableHeader: + assert(src != NULL); + assert(srcSize <= ZSTD_SKIPPABLEHEADERSIZE); + assert(dctx->format != ZSTD_f_zstd1_magicless); + ZSTD_memcpy(dctx->headerBuffer + (ZSTD_SKIPPABLEHEADERSIZE - srcSize), src, srcSize); /* complete skippable header */ + dctx->expected = MEM_readLE32(dctx->headerBuffer + ZSTD_FRAMEIDSIZE); /* note : dctx->expected can grow seriously large, beyond local buffer size */ + dctx->stage = ZSTDds_skipFrame; + return 0; + + case ZSTDds_skipFrame: + dctx->expected = 0; + dctx->stage = ZSTDds_getFrameHeaderSize; + return 0; + + default: + assert(0); /* impossible */ + RETURN_ERROR(GENERIC, "impossible to reach"); /* some compilers require default to do something */ + } +} + + +static size_t ZSTD_refDictContent(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) +{ + dctx->dictEnd = dctx->previousDstEnd; + dctx->virtualStart = (const char*)dict - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->prefixStart)); + dctx->prefixStart = dict; + dctx->previousDstEnd = (const char*)dict + dictSize; +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + dctx->dictContentBeginForFuzzing = dctx->prefixStart; + dctx->dictContentEndForFuzzing = dctx->previousDstEnd; +#endif + return 0; +} + +/*! ZSTD_loadDEntropy() : + * dict : must point at beginning of a valid zstd dictionary. + * @return : size of entropy tables read */ +size_t +ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, + const void* const dict, size_t const dictSize) +{ + const BYTE* dictPtr = (const BYTE*)dict; + const BYTE* const dictEnd = dictPtr + dictSize; + + RETURN_ERROR_IF(dictSize <= 8, dictionary_corrupted, "dict is too small"); + assert(MEM_readLE32(dict) == ZSTD_MAGIC_DICTIONARY); /* dict must be valid */ + dictPtr += 8; /* skip header = magic + dictID */ + + ZSTD_STATIC_ASSERT(offsetof(ZSTD_entropyDTables_t, OFTable) == offsetof(ZSTD_entropyDTables_t, LLTable) + sizeof(entropy->LLTable)); + ZSTD_STATIC_ASSERT(offsetof(ZSTD_entropyDTables_t, MLTable) == offsetof(ZSTD_entropyDTables_t, OFTable) + sizeof(entropy->OFTable)); + ZSTD_STATIC_ASSERT(sizeof(entropy->LLTable) + sizeof(entropy->OFTable) + sizeof(entropy->MLTable) >= HUF_DECOMPRESS_WORKSPACE_SIZE); + { void* const workspace = &entropy->LLTable; /* use fse tables as temporary workspace; implies fse tables are grouped together */ + size_t const workspaceSize = sizeof(entropy->LLTable) + sizeof(entropy->OFTable) + sizeof(entropy->MLTable); +#ifdef HUF_FORCE_DECOMPRESS_X1 + /* in minimal huffman, we always use X1 variants */ + size_t const hSize = HUF_readDTableX1_wksp(entropy->hufTable, + dictPtr, dictEnd - dictPtr, + workspace, workspaceSize, /* flags */ 0); +#else + size_t const hSize = HUF_readDTableX2_wksp(entropy->hufTable, + dictPtr, (size_t)(dictEnd - dictPtr), + workspace, workspaceSize, /* flags */ 0); +#endif + RETURN_ERROR_IF(HUF_isError(hSize), dictionary_corrupted, ""); + dictPtr += hSize; + } + + { short offcodeNCount[MaxOff+1]; + unsigned offcodeMaxValue = MaxOff, offcodeLog; + size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, (size_t)(dictEnd-dictPtr)); + RETURN_ERROR_IF(FSE_isError(offcodeHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(offcodeMaxValue > MaxOff, dictionary_corrupted, ""); + RETURN_ERROR_IF(offcodeLog > OffFSELog, dictionary_corrupted, ""); + ZSTD_buildFSETable( entropy->OFTable, + offcodeNCount, offcodeMaxValue, + OF_base, OF_bits, + offcodeLog, + entropy->workspace, sizeof(entropy->workspace), + /* bmi2 */0); + dictPtr += offcodeHeaderSize; + } + + { short matchlengthNCount[MaxML+1]; + unsigned matchlengthMaxValue = MaxML, matchlengthLog; + size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); + RETURN_ERROR_IF(FSE_isError(matchlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(matchlengthMaxValue > MaxML, dictionary_corrupted, ""); + RETURN_ERROR_IF(matchlengthLog > MLFSELog, dictionary_corrupted, ""); + ZSTD_buildFSETable( entropy->MLTable, + matchlengthNCount, matchlengthMaxValue, + ML_base, ML_bits, + matchlengthLog, + entropy->workspace, sizeof(entropy->workspace), + /* bmi2 */ 0); + dictPtr += matchlengthHeaderSize; + } + + { short litlengthNCount[MaxLL+1]; + unsigned litlengthMaxValue = MaxLL, litlengthLog; + size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, (size_t)(dictEnd-dictPtr)); + RETURN_ERROR_IF(FSE_isError(litlengthHeaderSize), dictionary_corrupted, ""); + RETURN_ERROR_IF(litlengthMaxValue > MaxLL, dictionary_corrupted, ""); + RETURN_ERROR_IF(litlengthLog > LLFSELog, dictionary_corrupted, ""); + ZSTD_buildFSETable( entropy->LLTable, + litlengthNCount, litlengthMaxValue, + LL_base, LL_bits, + litlengthLog, + entropy->workspace, sizeof(entropy->workspace), + /* bmi2 */ 0); + dictPtr += litlengthHeaderSize; + } + + RETURN_ERROR_IF(dictPtr+12 > dictEnd, dictionary_corrupted, ""); + { int i; + size_t const dictContentSize = (size_t)(dictEnd - (dictPtr+12)); + for (i=0; i<3; i++) { + U32 const rep = MEM_readLE32(dictPtr); dictPtr += 4; + RETURN_ERROR_IF(rep==0 || rep > dictContentSize, + dictionary_corrupted, ""); + entropy->rep[i] = rep; + } } + + return (size_t)(dictPtr - (const BYTE*)dict); +} + +static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) +{ + if (dictSize < 8) return ZSTD_refDictContent(dctx, dict, dictSize); + { U32 const magic = MEM_readLE32(dict); + if (magic != ZSTD_MAGIC_DICTIONARY) { + return ZSTD_refDictContent(dctx, dict, dictSize); /* pure content mode */ + } } + dctx->dictID = MEM_readLE32((const char*)dict + ZSTD_FRAMEIDSIZE); + + /* load entropy tables */ + { size_t const eSize = ZSTD_loadDEntropy(&dctx->entropy, dict, dictSize); + RETURN_ERROR_IF(ZSTD_isError(eSize), dictionary_corrupted, ""); + dict = (const char*)dict + eSize; + dictSize -= eSize; + } + dctx->litEntropy = dctx->fseEntropy = 1; + + /* reference dictionary content */ + return ZSTD_refDictContent(dctx, dict, dictSize); +} + +size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx) +{ + assert(dctx != NULL); +#if ZSTD_TRACE + dctx->traceCtx = (ZSTD_trace_decompress_begin != NULL) ? ZSTD_trace_decompress_begin(dctx) : 0; +#endif + dctx->expected = ZSTD_startingInputLength(dctx->format); /* dctx->format must be properly set */ + dctx->stage = ZSTDds_getFrameHeaderSize; + dctx->processedCSize = 0; + dctx->decodedSize = 0; + dctx->previousDstEnd = NULL; + dctx->prefixStart = NULL; + dctx->virtualStart = NULL; + dctx->dictEnd = NULL; + dctx->entropy.hufTable[0] = (HUF_DTable)((ZSTD_HUFFDTABLE_CAPACITY_LOG)*0x1000001); /* cover both little and big endian */ + dctx->litEntropy = dctx->fseEntropy = 0; + dctx->dictID = 0; + dctx->bType = bt_reserved; + dctx->isFrameDecompression = 1; + ZSTD_STATIC_ASSERT(sizeof(dctx->entropy.rep) == sizeof(repStartValue)); + ZSTD_memcpy(dctx->entropy.rep, repStartValue, sizeof(repStartValue)); /* initial repcodes */ + dctx->LLTptr = dctx->entropy.LLTable; + dctx->MLTptr = dctx->entropy.MLTable; + dctx->OFTptr = dctx->entropy.OFTable; + dctx->HUFptr = dctx->entropy.hufTable; + return 0; +} + +size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) +{ + FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) , ""); + if (dict && dictSize) + RETURN_ERROR_IF( + ZSTD_isError(ZSTD_decompress_insertDictionary(dctx, dict, dictSize)), + dictionary_corrupted, ""); + return 0; +} + + +/* ====== ZSTD_DDict ====== */ + +size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) +{ + DEBUGLOG(4, "ZSTD_decompressBegin_usingDDict"); + assert(dctx != NULL); + if (ddict) { + const char* const dictStart = (const char*)ZSTD_DDict_dictContent(ddict); + size_t const dictSize = ZSTD_DDict_dictSize(ddict); + const void* const dictEnd = dictStart + dictSize; + dctx->ddictIsCold = (dctx->dictEnd != dictEnd); + DEBUGLOG(4, "DDict is %s", + dctx->ddictIsCold ? "~cold~" : "hot!"); + } + FORWARD_IF_ERROR( ZSTD_decompressBegin(dctx) , ""); + if (ddict) { /* NULL ddict is equivalent to no dictionary */ + ZSTD_copyDDictParameters(dctx, ddict); + } + return 0; +} + +/*! ZSTD_getDictID_fromDict() : + * Provides the dictID stored within dictionary. + * if @return == 0, the dictionary is not conformant with Zstandard specification. + * It can still be loaded, but as a content-only dictionary. */ +unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize) +{ + if (dictSize < 8) return 0; + if (MEM_readLE32(dict) != ZSTD_MAGIC_DICTIONARY) return 0; + return MEM_readLE32((const char*)dict + ZSTD_FRAMEIDSIZE); +} + +/*! ZSTD_getDictID_fromFrame() : + * Provides the dictID required to decompress frame stored within `src`. + * If @return == 0, the dictID could not be decoded. + * This could for one of the following reasons : + * - The frame does not require a dictionary (most common case). + * - The frame was built with dictID intentionally removed. + * Needed dictionary is a hidden piece of information. + * Note : this use case also happens when using a non-conformant dictionary. + * - `srcSize` is too small, and as a result, frame header could not be decoded. + * Note : possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`. + * - This is not a Zstandard frame. + * When identifying the exact failure cause, it's possible to use + * ZSTD_getFrameHeader(), which will provide a more precise error code. */ +unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize) +{ + ZSTD_FrameHeader zfp = { 0, 0, 0, ZSTD_frame, 0, 0, 0, 0, 0 }; + size_t const hError = ZSTD_getFrameHeader(&zfp, src, srcSize); + if (ZSTD_isError(hError)) return 0; + return zfp.dictID; +} + + +/*! ZSTD_decompress_usingDDict() : +* Decompression using a pre-digested Dictionary +* Use dictionary without significant overhead. */ +size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, + const ZSTD_DDict* ddict) +{ + /* pass content and size in case legacy frames are encountered */ + return ZSTD_decompressMultiFrame(dctx, dst, dstCapacity, src, srcSize, + NULL, 0, + ddict); +} + + +/*===================================== +* Streaming decompression +*====================================*/ + +ZSTD_DStream* ZSTD_createDStream(void) +{ + DEBUGLOG(3, "ZSTD_createDStream"); + return ZSTD_createDCtx_internal(ZSTD_defaultCMem); +} + +ZSTD_DStream* ZSTD_initStaticDStream(void *workspace, size_t workspaceSize) +{ + return ZSTD_initStaticDCtx(workspace, workspaceSize); +} + +ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem) +{ + return ZSTD_createDCtx_internal(customMem); +} + +size_t ZSTD_freeDStream(ZSTD_DStream* zds) +{ + return ZSTD_freeDCtx(zds); +} + + +/* *** Initialization *** */ + +size_t ZSTD_DStreamInSize(void) { return ZSTD_BLOCKSIZE_MAX + ZSTD_blockHeaderSize; } +size_t ZSTD_DStreamOutSize(void) { return ZSTD_BLOCKSIZE_MAX; } + +size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx, + const void* dict, size_t dictSize, + ZSTD_dictLoadMethod_e dictLoadMethod, + ZSTD_dictContentType_e dictContentType) +{ + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); + ZSTD_clearDict(dctx); + if (dict && dictSize != 0) { + dctx->ddictLocal = ZSTD_createDDict_advanced(dict, dictSize, dictLoadMethod, dictContentType, dctx->customMem); + RETURN_ERROR_IF(dctx->ddictLocal == NULL, memory_allocation, "NULL pointer!"); + dctx->ddict = dctx->ddictLocal; + dctx->dictUses = ZSTD_use_indefinitely; + } + return 0; +} + +size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) +{ + return ZSTD_DCtx_loadDictionary_advanced(dctx, dict, dictSize, ZSTD_dlm_byRef, ZSTD_dct_auto); +} + +size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize) +{ + return ZSTD_DCtx_loadDictionary_advanced(dctx, dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dct_auto); +} + +size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) +{ + FORWARD_IF_ERROR(ZSTD_DCtx_loadDictionary_advanced(dctx, prefix, prefixSize, ZSTD_dlm_byRef, dictContentType), ""); + dctx->dictUses = ZSTD_use_once; + return 0; +} + +size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize) +{ + return ZSTD_DCtx_refPrefix_advanced(dctx, prefix, prefixSize, ZSTD_dct_rawContent); +} + + +/* ZSTD_initDStream_usingDict() : + * return : expected size, aka ZSTD_startingInputLength(). + * this function cannot fail */ +size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize) +{ + DEBUGLOG(4, "ZSTD_initDStream_usingDict"); + FORWARD_IF_ERROR( ZSTD_DCtx_reset(zds, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_DCtx_loadDictionary(zds, dict, dictSize) , ""); + return ZSTD_startingInputLength(zds->format); +} + +/* note : this variant can't fail */ +size_t ZSTD_initDStream(ZSTD_DStream* zds) +{ + DEBUGLOG(4, "ZSTD_initDStream"); + FORWARD_IF_ERROR(ZSTD_DCtx_reset(zds, ZSTD_reset_session_only), ""); + FORWARD_IF_ERROR(ZSTD_DCtx_refDDict(zds, NULL), ""); + return ZSTD_startingInputLength(zds->format); +} + +/* ZSTD_initDStream_usingDDict() : + * ddict will just be referenced, and must outlive decompression session + * this function cannot fail */ +size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* dctx, const ZSTD_DDict* ddict) +{ + DEBUGLOG(4, "ZSTD_initDStream_usingDDict"); + FORWARD_IF_ERROR( ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only) , ""); + FORWARD_IF_ERROR( ZSTD_DCtx_refDDict(dctx, ddict) , ""); + return ZSTD_startingInputLength(dctx->format); +} + +/* ZSTD_resetDStream() : + * return : expected size, aka ZSTD_startingInputLength(). + * this function cannot fail */ +size_t ZSTD_resetDStream(ZSTD_DStream* dctx) +{ + DEBUGLOG(4, "ZSTD_resetDStream"); + FORWARD_IF_ERROR(ZSTD_DCtx_reset(dctx, ZSTD_reset_session_only), ""); + return ZSTD_startingInputLength(dctx->format); +} + + +size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict) +{ + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); + ZSTD_clearDict(dctx); + if (ddict) { + dctx->ddict = ddict; + dctx->dictUses = ZSTD_use_indefinitely; + if (dctx->refMultipleDDicts == ZSTD_rmd_refMultipleDDicts) { + if (dctx->ddictSet == NULL) { + dctx->ddictSet = ZSTD_createDDictHashSet(dctx->customMem); + if (!dctx->ddictSet) { + RETURN_ERROR(memory_allocation, "Failed to allocate memory for hash set!"); + } + } + assert(!dctx->staticSize); /* Impossible: ddictSet cannot have been allocated if static dctx */ + FORWARD_IF_ERROR(ZSTD_DDictHashSet_addDDict(dctx->ddictSet, ddict, dctx->customMem), ""); + } + } + return 0; +} + +/* ZSTD_DCtx_setMaxWindowSize() : + * note : no direct equivalence in ZSTD_DCtx_setParameter, + * since this version sets windowSize, and the other sets windowLog */ +size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize) +{ + ZSTD_bounds const bounds = ZSTD_dParam_getBounds(ZSTD_d_windowLogMax); + size_t const min = (size_t)1 << bounds.lowerBound; + size_t const max = (size_t)1 << bounds.upperBound; + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); + RETURN_ERROR_IF(maxWindowSize < min, parameter_outOfBound, ""); + RETURN_ERROR_IF(maxWindowSize > max, parameter_outOfBound, ""); + dctx->maxWindowSize = maxWindowSize; + return 0; +} + +size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format) +{ + return ZSTD_DCtx_setParameter(dctx, ZSTD_d_format, (int)format); +} + +ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam) +{ + ZSTD_bounds bounds = { 0, 0, 0 }; + switch(dParam) { + case ZSTD_d_windowLogMax: + bounds.lowerBound = ZSTD_WINDOWLOG_ABSOLUTEMIN; + bounds.upperBound = ZSTD_WINDOWLOG_MAX; + return bounds; + case ZSTD_d_format: + bounds.lowerBound = (int)ZSTD_f_zstd1; + bounds.upperBound = (int)ZSTD_f_zstd1_magicless; + ZSTD_STATIC_ASSERT(ZSTD_f_zstd1 < ZSTD_f_zstd1_magicless); + return bounds; + case ZSTD_d_stableOutBuffer: + bounds.lowerBound = (int)ZSTD_bm_buffered; + bounds.upperBound = (int)ZSTD_bm_stable; + return bounds; + case ZSTD_d_forceIgnoreChecksum: + bounds.lowerBound = (int)ZSTD_d_validateChecksum; + bounds.upperBound = (int)ZSTD_d_ignoreChecksum; + return bounds; + case ZSTD_d_refMultipleDDicts: + bounds.lowerBound = (int)ZSTD_rmd_refSingleDDict; + bounds.upperBound = (int)ZSTD_rmd_refMultipleDDicts; + return bounds; + case ZSTD_d_disableHuffmanAssembly: + bounds.lowerBound = 0; + bounds.upperBound = 1; + return bounds; + case ZSTD_d_maxBlockSize: + bounds.lowerBound = ZSTD_BLOCKSIZE_MAX_MIN; + bounds.upperBound = ZSTD_BLOCKSIZE_MAX; + return bounds; + + default:; + } + bounds.error = ERROR(parameter_unsupported); + return bounds; +} + +/* ZSTD_dParam_withinBounds: + * @return 1 if value is within dParam bounds, + * 0 otherwise */ +static int ZSTD_dParam_withinBounds(ZSTD_dParameter dParam, int value) +{ + ZSTD_bounds const bounds = ZSTD_dParam_getBounds(dParam); + if (ZSTD_isError(bounds.error)) return 0; + if (value < bounds.lowerBound) return 0; + if (value > bounds.upperBound) return 0; + return 1; +} + +#define CHECK_DBOUNDS(p,v) { \ + RETURN_ERROR_IF(!ZSTD_dParam_withinBounds(p, v), parameter_outOfBound, ""); \ +} + +size_t ZSTD_DCtx_getParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int* value) +{ + switch (param) { + case ZSTD_d_windowLogMax: + *value = (int)ZSTD_highbit32((U32)dctx->maxWindowSize); + return 0; + case ZSTD_d_format: + *value = (int)dctx->format; + return 0; + case ZSTD_d_stableOutBuffer: + *value = (int)dctx->outBufferMode; + return 0; + case ZSTD_d_forceIgnoreChecksum: + *value = (int)dctx->forceIgnoreChecksum; + return 0; + case ZSTD_d_refMultipleDDicts: + *value = (int)dctx->refMultipleDDicts; + return 0; + case ZSTD_d_disableHuffmanAssembly: + *value = (int)dctx->disableHufAsm; + return 0; + case ZSTD_d_maxBlockSize: + *value = dctx->maxBlockSizeParam; + return 0; + default:; + } + RETURN_ERROR(parameter_unsupported, ""); +} + +size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter dParam, int value) +{ + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); + switch(dParam) { + case ZSTD_d_windowLogMax: + if (value == 0) value = ZSTD_WINDOWLOG_LIMIT_DEFAULT; + CHECK_DBOUNDS(ZSTD_d_windowLogMax, value); + dctx->maxWindowSize = ((size_t)1) << value; + return 0; + case ZSTD_d_format: + CHECK_DBOUNDS(ZSTD_d_format, value); + dctx->format = (ZSTD_format_e)value; + return 0; + case ZSTD_d_stableOutBuffer: + CHECK_DBOUNDS(ZSTD_d_stableOutBuffer, value); + dctx->outBufferMode = (ZSTD_bufferMode_e)value; + return 0; + case ZSTD_d_forceIgnoreChecksum: + CHECK_DBOUNDS(ZSTD_d_forceIgnoreChecksum, value); + dctx->forceIgnoreChecksum = (ZSTD_forceIgnoreChecksum_e)value; + return 0; + case ZSTD_d_refMultipleDDicts: + CHECK_DBOUNDS(ZSTD_d_refMultipleDDicts, value); + if (dctx->staticSize != 0) { + RETURN_ERROR(parameter_unsupported, "Static dctx does not support multiple DDicts!"); + } + dctx->refMultipleDDicts = (ZSTD_refMultipleDDicts_e)value; + return 0; + case ZSTD_d_disableHuffmanAssembly: + CHECK_DBOUNDS(ZSTD_d_disableHuffmanAssembly, value); + dctx->disableHufAsm = value != 0; + return 0; + case ZSTD_d_maxBlockSize: + if (value != 0) CHECK_DBOUNDS(ZSTD_d_maxBlockSize, value); + dctx->maxBlockSizeParam = value; + return 0; + default:; + } + RETURN_ERROR(parameter_unsupported, ""); +} + +size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset) +{ + if ( (reset == ZSTD_reset_session_only) + || (reset == ZSTD_reset_session_and_parameters) ) { + dctx->streamStage = zdss_init; + dctx->noForwardProgress = 0; + dctx->isFrameDecompression = 1; + } + if ( (reset == ZSTD_reset_parameters) + || (reset == ZSTD_reset_session_and_parameters) ) { + RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong, ""); + ZSTD_clearDict(dctx); + ZSTD_DCtx_resetParameters(dctx); + } + return 0; +} + + +size_t ZSTD_sizeof_DStream(const ZSTD_DStream* dctx) +{ + return ZSTD_sizeof_DCtx(dctx); +} + +static size_t ZSTD_decodingBufferSize_internal(unsigned long long windowSize, unsigned long long frameContentSize, size_t blockSizeMax) +{ + size_t const blockSize = MIN((size_t)MIN(windowSize, ZSTD_BLOCKSIZE_MAX), blockSizeMax); + /* We need blockSize + WILDCOPY_OVERLENGTH worth of buffer so that if a block + * ends at windowSize + WILDCOPY_OVERLENGTH + 1 bytes, we can start writing + * the block at the beginning of the output buffer, and maintain a full window. + * + * We need another blockSize worth of buffer so that we can store split + * literals at the end of the block without overwriting the extDict window. + */ + unsigned long long const neededRBSize = windowSize + (blockSize * 2) + (WILDCOPY_OVERLENGTH * 2); + unsigned long long const neededSize = MIN(frameContentSize, neededRBSize); + size_t const minRBSize = (size_t) neededSize; + RETURN_ERROR_IF((unsigned long long)minRBSize != neededSize, + frameParameter_windowTooLarge, ""); + return minRBSize; +} + +size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSize) +{ + return ZSTD_decodingBufferSize_internal(windowSize, frameContentSize, ZSTD_BLOCKSIZE_MAX); +} + +size_t ZSTD_estimateDStreamSize(size_t windowSize) +{ + size_t const blockSize = MIN(windowSize, ZSTD_BLOCKSIZE_MAX); + size_t const inBuffSize = blockSize; /* no block can be larger */ + size_t const outBuffSize = ZSTD_decodingBufferSize_min(windowSize, ZSTD_CONTENTSIZE_UNKNOWN); + return ZSTD_estimateDCtxSize() + inBuffSize + outBuffSize; +} + +size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize) +{ + U32 const windowSizeMax = 1U << ZSTD_WINDOWLOG_MAX; /* note : should be user-selectable, but requires an additional parameter (or a dctx) */ + ZSTD_FrameHeader zfh; + size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize); + if (ZSTD_isError(err)) return err; + RETURN_ERROR_IF(err>0, srcSize_wrong, ""); + RETURN_ERROR_IF(zfh.windowSize > windowSizeMax, + frameParameter_windowTooLarge, ""); + return ZSTD_estimateDStreamSize((size_t)zfh.windowSize); +} + + +/* ***** Decompression ***** */ + +static int ZSTD_DCtx_isOverflow(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const neededOutBuffSize) +{ + return (zds->inBuffSize + zds->outBuffSize) >= (neededInBuffSize + neededOutBuffSize) * ZSTD_WORKSPACETOOLARGE_FACTOR; +} + +static void ZSTD_DCtx_updateOversizedDuration(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const neededOutBuffSize) +{ + if (ZSTD_DCtx_isOverflow(zds, neededInBuffSize, neededOutBuffSize)) + zds->oversizedDuration++; + else + zds->oversizedDuration = 0; +} + +static int ZSTD_DCtx_isOversizedTooLong(ZSTD_DStream* zds) +{ + return zds->oversizedDuration >= ZSTD_WORKSPACETOOLARGE_MAXDURATION; +} + +/* Checks that the output buffer hasn't changed if ZSTD_obm_stable is used. */ +static size_t ZSTD_checkOutBuffer(ZSTD_DStream const* zds, ZSTD_outBuffer const* output) +{ + ZSTD_outBuffer const expect = zds->expectedOutBuffer; + /* No requirement when ZSTD_obm_stable is not enabled. */ + if (zds->outBufferMode != ZSTD_bm_stable) + return 0; + /* Any buffer is allowed in zdss_init, this must be the same for every other call until + * the context is reset. + */ + if (zds->streamStage == zdss_init) + return 0; + /* The buffer must match our expectation exactly. */ + if (expect.dst == output->dst && expect.pos == output->pos && expect.size == output->size) + return 0; + RETURN_ERROR(dstBuffer_wrong, "ZSTD_d_stableOutBuffer enabled but output differs!"); +} + +/* Calls ZSTD_decompressContinue() with the right parameters for ZSTD_decompressStream() + * and updates the stage and the output buffer state. This call is extracted so it can be + * used both when reading directly from the ZSTD_inBuffer, and in buffered input mode. + * NOTE: You must break after calling this function since the streamStage is modified. + */ +static size_t ZSTD_decompressContinueStream( + ZSTD_DStream* zds, char** op, char* oend, + void const* src, size_t srcSize) { + int const isSkipFrame = ZSTD_isSkipFrame(zds); + if (zds->outBufferMode == ZSTD_bm_buffered) { + size_t const dstSize = isSkipFrame ? 0 : zds->outBuffSize - zds->outStart; + size_t const decodedSize = ZSTD_decompressContinue(zds, + zds->outBuff + zds->outStart, dstSize, src, srcSize); + FORWARD_IF_ERROR(decodedSize, ""); + if (!decodedSize && !isSkipFrame) { + zds->streamStage = zdss_read; + } else { + zds->outEnd = zds->outStart + decodedSize; + zds->streamStage = zdss_flush; + } + } else { + /* Write directly into the output buffer */ + size_t const dstSize = isSkipFrame ? 0 : (size_t)(oend - *op); + size_t const decodedSize = ZSTD_decompressContinue(zds, *op, dstSize, src, srcSize); + FORWARD_IF_ERROR(decodedSize, ""); + *op += decodedSize; + /* Flushing is not needed. */ + zds->streamStage = zdss_read; + assert(*op <= oend); + assert(zds->outBufferMode == ZSTD_bm_stable); + } + return 0; +} + +size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input) +{ + const char* const src = (const char*)input->src; + const char* const istart = input->pos != 0 ? src + input->pos : src; + const char* const iend = input->size != 0 ? src + input->size : src; + const char* ip = istart; + char* const dst = (char*)output->dst; + char* const ostart = output->pos != 0 ? dst + output->pos : dst; + char* const oend = output->size != 0 ? dst + output->size : dst; + char* op = ostart; + U32 someMoreWork = 1; + + DEBUGLOG(5, "ZSTD_decompressStream"); + assert(zds != NULL); + RETURN_ERROR_IF( + input->pos > input->size, + srcSize_wrong, + "forbidden. in: pos: %u vs size: %u", + (U32)input->pos, (U32)input->size); + RETURN_ERROR_IF( + output->pos > output->size, + dstSize_tooSmall, + "forbidden. out: pos: %u vs size: %u", + (U32)output->pos, (U32)output->size); + DEBUGLOG(5, "input size : %u", (U32)(input->size - input->pos)); + FORWARD_IF_ERROR(ZSTD_checkOutBuffer(zds, output), ""); + + while (someMoreWork) { + switch(zds->streamStage) + { + case zdss_init : + DEBUGLOG(5, "stage zdss_init => transparent reset "); + zds->streamStage = zdss_loadHeader; + zds->lhSize = zds->inPos = zds->outStart = zds->outEnd = 0; +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) + zds->legacyVersion = 0; +#endif + zds->hostageByte = 0; + zds->expectedOutBuffer = *output; + ZSTD_FALLTHROUGH; + + case zdss_loadHeader : + DEBUGLOG(5, "stage zdss_loadHeader (srcSize : %u)", (U32)(iend - ip)); +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) + if (zds->legacyVersion) { + RETURN_ERROR_IF(zds->staticSize, memory_allocation, + "legacy support is incompatible with static dctx"); + { size_t const hint = ZSTD_decompressLegacyStream(zds->legacyContext, zds->legacyVersion, output, input); + if (hint==0) zds->streamStage = zdss_init; + return hint; + } } +#endif + { size_t const hSize = ZSTD_getFrameHeader_advanced(&zds->fParams, zds->headerBuffer, zds->lhSize, zds->format); + if (zds->refMultipleDDicts && zds->ddictSet) { + ZSTD_DCtx_selectFrameDDict(zds); + } + if (ZSTD_isError(hSize)) { +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) + U32 const legacyVersion = ZSTD_isLegacy(istart, iend-istart); + if (legacyVersion) { + ZSTD_DDict const* const ddict = ZSTD_getDDict(zds); + const void* const dict = ddict ? ZSTD_DDict_dictContent(ddict) : NULL; + size_t const dictSize = ddict ? ZSTD_DDict_dictSize(ddict) : 0; + DEBUGLOG(5, "ZSTD_decompressStream: detected legacy version v0.%u", legacyVersion); + RETURN_ERROR_IF(zds->staticSize, memory_allocation, + "legacy support is incompatible with static dctx"); + FORWARD_IF_ERROR(ZSTD_initLegacyStream(&zds->legacyContext, + zds->previousLegacyVersion, legacyVersion, + dict, dictSize), ""); + zds->legacyVersion = zds->previousLegacyVersion = legacyVersion; + { size_t const hint = ZSTD_decompressLegacyStream(zds->legacyContext, legacyVersion, output, input); + if (hint==0) zds->streamStage = zdss_init; /* or stay in stage zdss_loadHeader */ + return hint; + } } +#endif + return hSize; /* error */ + } + if (hSize != 0) { /* need more input */ + size_t const toLoad = hSize - zds->lhSize; /* if hSize!=0, hSize > zds->lhSize */ + size_t const remainingInput = (size_t)(iend-ip); + assert(iend >= ip); + if (toLoad > remainingInput) { /* not enough input to load full header */ + if (remainingInput > 0) { + ZSTD_memcpy(zds->headerBuffer + zds->lhSize, ip, remainingInput); + zds->lhSize += remainingInput; + } + input->pos = input->size; + /* check first few bytes */ + FORWARD_IF_ERROR( + ZSTD_getFrameHeader_advanced(&zds->fParams, zds->headerBuffer, zds->lhSize, zds->format), + "First few bytes detected incorrect" ); + /* return hint input size */ + return (MAX((size_t)ZSTD_FRAMEHEADERSIZE_MIN(zds->format), hSize) - zds->lhSize) + ZSTD_blockHeaderSize; /* remaining header bytes + next block header */ + } + assert(ip != NULL); + ZSTD_memcpy(zds->headerBuffer + zds->lhSize, ip, toLoad); zds->lhSize = hSize; ip += toLoad; + break; + } } + + /* check for single-pass mode opportunity */ + if (zds->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN + && zds->fParams.frameType != ZSTD_skippableFrame + && (U64)(size_t)(oend-op) >= zds->fParams.frameContentSize) { + size_t const cSize = ZSTD_findFrameCompressedSize_advanced(istart, (size_t)(iend-istart), zds->format); + if (cSize <= (size_t)(iend-istart)) { + /* shortcut : using single-pass mode */ + size_t const decompressedSize = ZSTD_decompress_usingDDict(zds, op, (size_t)(oend-op), istart, cSize, ZSTD_getDDict(zds)); + if (ZSTD_isError(decompressedSize)) return decompressedSize; + DEBUGLOG(4, "shortcut to single-pass ZSTD_decompress_usingDDict()"); + assert(istart != NULL); + ip = istart + cSize; + op = op ? op + decompressedSize : op; /* can occur if frameContentSize = 0 (empty frame) */ + zds->expected = 0; + zds->streamStage = zdss_init; + someMoreWork = 0; + break; + } } + + /* Check output buffer is large enough for ZSTD_odm_stable. */ + if (zds->outBufferMode == ZSTD_bm_stable + && zds->fParams.frameType != ZSTD_skippableFrame + && zds->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN + && (U64)(size_t)(oend-op) < zds->fParams.frameContentSize) { + RETURN_ERROR(dstSize_tooSmall, "ZSTD_obm_stable passed but ZSTD_outBuffer is too small"); + } + + /* Consume header (see ZSTDds_decodeFrameHeader) */ + DEBUGLOG(4, "Consume header"); + FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(zds, ZSTD_getDDict(zds)), ""); + + if (zds->format == ZSTD_f_zstd1 + && (MEM_readLE32(zds->headerBuffer) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */ + zds->expected = MEM_readLE32(zds->headerBuffer + ZSTD_FRAMEIDSIZE); + zds->stage = ZSTDds_skipFrame; + } else { + FORWARD_IF_ERROR(ZSTD_decodeFrameHeader(zds, zds->headerBuffer, zds->lhSize), ""); + zds->expected = ZSTD_blockHeaderSize; + zds->stage = ZSTDds_decodeBlockHeader; + } + + /* control buffer memory usage */ + DEBUGLOG(4, "Control max memory usage (%u KB <= max %u KB)", + (U32)(zds->fParams.windowSize >>10), + (U32)(zds->maxWindowSize >> 10) ); + zds->fParams.windowSize = MAX(zds->fParams.windowSize, 1U << ZSTD_WINDOWLOG_ABSOLUTEMIN); + RETURN_ERROR_IF(zds->fParams.windowSize > zds->maxWindowSize, + frameParameter_windowTooLarge, ""); + if (zds->maxBlockSizeParam != 0) + zds->fParams.blockSizeMax = MIN(zds->fParams.blockSizeMax, (unsigned)zds->maxBlockSizeParam); + + /* Adapt buffer sizes to frame header instructions */ + { size_t const neededInBuffSize = MAX(zds->fParams.blockSizeMax, 4 /* frame checksum */); + size_t const neededOutBuffSize = zds->outBufferMode == ZSTD_bm_buffered + ? ZSTD_decodingBufferSize_internal(zds->fParams.windowSize, zds->fParams.frameContentSize, zds->fParams.blockSizeMax) + : 0; + + ZSTD_DCtx_updateOversizedDuration(zds, neededInBuffSize, neededOutBuffSize); + + { int const tooSmall = (zds->inBuffSize < neededInBuffSize) || (zds->outBuffSize < neededOutBuffSize); + int const tooLarge = ZSTD_DCtx_isOversizedTooLong(zds); + + if (tooSmall || tooLarge) { + size_t const bufferSize = neededInBuffSize + neededOutBuffSize; + DEBUGLOG(4, "inBuff : from %u to %u", + (U32)zds->inBuffSize, (U32)neededInBuffSize); + DEBUGLOG(4, "outBuff : from %u to %u", + (U32)zds->outBuffSize, (U32)neededOutBuffSize); + if (zds->staticSize) { /* static DCtx */ + DEBUGLOG(4, "staticSize : %u", (U32)zds->staticSize); + assert(zds->staticSize >= sizeof(ZSTD_DCtx)); /* controlled at init */ + RETURN_ERROR_IF( + bufferSize > zds->staticSize - sizeof(ZSTD_DCtx), + memory_allocation, ""); + } else { + ZSTD_customFree(zds->inBuff, zds->customMem); + zds->inBuffSize = 0; + zds->outBuffSize = 0; + zds->inBuff = (char*)ZSTD_customMalloc(bufferSize, zds->customMem); + RETURN_ERROR_IF(zds->inBuff == NULL, memory_allocation, ""); + } + zds->inBuffSize = neededInBuffSize; + zds->outBuff = zds->inBuff + zds->inBuffSize; + zds->outBuffSize = neededOutBuffSize; + } } } + zds->streamStage = zdss_read; + ZSTD_FALLTHROUGH; + + case zdss_read: + DEBUGLOG(5, "stage zdss_read"); + { size_t const neededInSize = ZSTD_nextSrcSizeToDecompressWithInputSize(zds, (size_t)(iend - ip)); + DEBUGLOG(5, "neededInSize = %u", (U32)neededInSize); + if (neededInSize==0) { /* end of frame */ + zds->streamStage = zdss_init; + someMoreWork = 0; + break; + } + if ((size_t)(iend-ip) >= neededInSize) { /* decode directly from src */ + FORWARD_IF_ERROR(ZSTD_decompressContinueStream(zds, &op, oend, ip, neededInSize), ""); + assert(ip != NULL); + ip += neededInSize; + /* Function modifies the stage so we must break */ + break; + } } + if (ip==iend) { someMoreWork = 0; break; } /* no more input */ + zds->streamStage = zdss_load; + ZSTD_FALLTHROUGH; + + case zdss_load: + { size_t const neededInSize = ZSTD_nextSrcSizeToDecompress(zds); + size_t const toLoad = neededInSize - zds->inPos; + int const isSkipFrame = ZSTD_isSkipFrame(zds); + size_t loadedSize; + /* At this point we shouldn't be decompressing a block that we can stream. */ + assert(neededInSize == ZSTD_nextSrcSizeToDecompressWithInputSize(zds, (size_t)(iend - ip))); + if (isSkipFrame) { + loadedSize = MIN(toLoad, (size_t)(iend-ip)); + } else { + RETURN_ERROR_IF(toLoad > zds->inBuffSize - zds->inPos, + corruption_detected, + "should never happen"); + loadedSize = ZSTD_limitCopy(zds->inBuff + zds->inPos, toLoad, ip, (size_t)(iend-ip)); + } + if (loadedSize != 0) { + /* ip may be NULL */ + ip += loadedSize; + zds->inPos += loadedSize; + } + if (loadedSize < toLoad) { someMoreWork = 0; break; } /* not enough input, wait for more */ + + /* decode loaded input */ + zds->inPos = 0; /* input is consumed */ + FORWARD_IF_ERROR(ZSTD_decompressContinueStream(zds, &op, oend, zds->inBuff, neededInSize), ""); + /* Function modifies the stage so we must break */ + break; + } + case zdss_flush: + { + size_t const toFlushSize = zds->outEnd - zds->outStart; + size_t const flushedSize = ZSTD_limitCopy(op, (size_t)(oend-op), zds->outBuff + zds->outStart, toFlushSize); + + op = op ? op + flushedSize : op; + + zds->outStart += flushedSize; + if (flushedSize == toFlushSize) { /* flush completed */ + zds->streamStage = zdss_read; + if ( (zds->outBuffSize < zds->fParams.frameContentSize) + && (zds->outStart + zds->fParams.blockSizeMax > zds->outBuffSize) ) { + DEBUGLOG(5, "restart filling outBuff from beginning (left:%i, needed:%u)", + (int)(zds->outBuffSize - zds->outStart), + (U32)zds->fParams.blockSizeMax); + zds->outStart = zds->outEnd = 0; + } + break; + } } + /* cannot complete flush */ + someMoreWork = 0; + break; + + default: + assert(0); /* impossible */ + RETURN_ERROR(GENERIC, "impossible to reach"); /* some compilers require default to do something */ + } } + + /* result */ + input->pos = (size_t)(ip - (const char*)(input->src)); + output->pos = (size_t)(op - (char*)(output->dst)); + + /* Update the expected output buffer for ZSTD_obm_stable. */ + zds->expectedOutBuffer = *output; + + if ((ip==istart) && (op==ostart)) { /* no forward progress */ + zds->noForwardProgress ++; + if (zds->noForwardProgress >= ZSTD_NO_FORWARD_PROGRESS_MAX) { + RETURN_ERROR_IF(op==oend, noForwardProgress_destFull, ""); + RETURN_ERROR_IF(ip==iend, noForwardProgress_inputEmpty, ""); + assert(0); + } + } else { + zds->noForwardProgress = 0; + } + { size_t nextSrcSizeHint = ZSTD_nextSrcSizeToDecompress(zds); + if (!nextSrcSizeHint) { /* frame fully decoded */ + if (zds->outEnd == zds->outStart) { /* output fully flushed */ + if (zds->hostageByte) { + if (input->pos >= input->size) { + /* can't release hostage (not present) */ + zds->streamStage = zdss_read; + return 1; + } + input->pos++; /* release hostage */ + } /* zds->hostageByte */ + return 0; + } /* zds->outEnd == zds->outStart */ + if (!zds->hostageByte) { /* output not fully flushed; keep last byte as hostage; will be released when all output is flushed */ + input->pos--; /* note : pos > 0, otherwise, impossible to finish reading last block */ + zds->hostageByte=1; + } + return 1; + } /* nextSrcSizeHint==0 */ + nextSrcSizeHint += ZSTD_blockHeaderSize * (ZSTD_nextInputType(zds) == ZSTDnit_block); /* preload header of next block */ + assert(zds->inPos <= nextSrcSizeHint); + nextSrcSizeHint -= zds->inPos; /* part already loaded*/ + return nextSrcSizeHint; + } +} + +size_t ZSTD_decompressStream_simpleArgs ( + ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, size_t* dstPos, + const void* src, size_t srcSize, size_t* srcPos) +{ + ZSTD_outBuffer output; + ZSTD_inBuffer input; + output.dst = dst; + output.size = dstCapacity; + output.pos = *dstPos; + input.src = src; + input.size = srcSize; + input.pos = *srcPos; + { size_t const cErr = ZSTD_decompressStream(dctx, &output, &input); + *dstPos = output.pos; + *srcPos = input.pos; + return cErr; + } +} diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.c b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.c new file mode 100644 index 0000000000..862785a49c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.c @@ -0,0 +1,2209 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* zstd_decompress_block : + * this module takes care of decompressing _compressed_ block */ + +/*-******************************************************* +* Dependencies +*********************************************************/ +#include "../common/zstd_deps.h" /* ZSTD_memcpy, ZSTD_memmove, ZSTD_memset */ +#include "../common/compiler.h" /* prefetch */ +#include "../common/cpu.h" /* bmi2 */ +#include "../common/mem.h" /* low level memory routines */ +#define FSE_STATIC_LINKING_ONLY +#include "../common/fse.h" +#include "../common/huf.h" +#include "../common/zstd_internal.h" +#include "zstd_decompress_internal.h" /* ZSTD_DCtx */ +#include "zstd_ddict.h" /* ZSTD_DDictDictContent */ +#include "zstd_decompress_block.h" +#include "../common/bits.h" /* ZSTD_highbit32 */ + +/*_******************************************************* +* Macros +**********************************************************/ + +/* These two optional macros force the use one way or another of the two + * ZSTD_decompressSequences implementations. You can't force in both directions + * at the same time. + */ +#if defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ + defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) +#error "Cannot force the use of the short and the long ZSTD_decompressSequences variants!" +#endif + + +/*_******************************************************* +* Memory operations +**********************************************************/ +static void ZSTD_copy4(void* dst, const void* src) { ZSTD_memcpy(dst, src, 4); } + + +/*-************************************************************* + * Block decoding + ***************************************************************/ + +static size_t ZSTD_blockSizeMax(ZSTD_DCtx const* dctx) +{ + size_t const blockSizeMax = dctx->isFrameDecompression ? dctx->fParams.blockSizeMax : ZSTD_BLOCKSIZE_MAX; + assert(blockSizeMax <= ZSTD_BLOCKSIZE_MAX); + return blockSizeMax; +} + +/*! ZSTD_getcBlockSize() : + * Provides the size of compressed block from block header `src` */ +size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, + blockProperties_t* bpPtr) +{ + RETURN_ERROR_IF(srcSize < ZSTD_blockHeaderSize, srcSize_wrong, ""); + + { U32 const cBlockHeader = MEM_readLE24(src); + U32 const cSize = cBlockHeader >> 3; + bpPtr->lastBlock = cBlockHeader & 1; + bpPtr->blockType = (blockType_e)((cBlockHeader >> 1) & 3); + bpPtr->origSize = cSize; /* only useful for RLE */ + if (bpPtr->blockType == bt_rle) return 1; + RETURN_ERROR_IF(bpPtr->blockType == bt_reserved, corruption_detected, ""); + return cSize; + } +} + +/* Allocate buffer for literals, either overlapping current dst, or split between dst and litExtraBuffer, or stored entirely within litExtraBuffer */ +static void ZSTD_allocateLiteralsBuffer(ZSTD_DCtx* dctx, void* const dst, const size_t dstCapacity, const size_t litSize, + const streaming_operation streaming, const size_t expectedWriteSize, const unsigned splitImmediately) +{ + size_t const blockSizeMax = ZSTD_blockSizeMax(dctx); + assert(litSize <= blockSizeMax); + assert(dctx->isFrameDecompression || streaming == not_streaming); + assert(expectedWriteSize <= blockSizeMax); + if (streaming == not_streaming && dstCapacity > blockSizeMax + WILDCOPY_OVERLENGTH + litSize + WILDCOPY_OVERLENGTH) { + /* If we aren't streaming, we can just put the literals after the output + * of the current block. We don't need to worry about overwriting the + * extDict of our window, because it doesn't exist. + * So if we have space after the end of the block, just put it there. + */ + dctx->litBuffer = (BYTE*)dst + blockSizeMax + WILDCOPY_OVERLENGTH; + dctx->litBufferEnd = dctx->litBuffer + litSize; + dctx->litBufferLocation = ZSTD_in_dst; + } else if (litSize <= ZSTD_LITBUFFEREXTRASIZE) { + /* Literals fit entirely within the extra buffer, put them there to avoid + * having to split the literals. + */ + dctx->litBuffer = dctx->litExtraBuffer; + dctx->litBufferEnd = dctx->litBuffer + litSize; + dctx->litBufferLocation = ZSTD_not_in_dst; + } else { + assert(blockSizeMax > ZSTD_LITBUFFEREXTRASIZE); + /* Literals must be split between the output block and the extra lit + * buffer. We fill the extra lit buffer with the tail of the literals, + * and put the rest of the literals at the end of the block, with + * WILDCOPY_OVERLENGTH of buffer room to allow for overreads. + * This MUST not write more than our maxBlockSize beyond dst, because in + * streaming mode, that could overwrite part of our extDict window. + */ + if (splitImmediately) { + /* won't fit in litExtraBuffer, so it will be split between end of dst and extra buffer */ + dctx->litBuffer = (BYTE*)dst + expectedWriteSize - litSize + ZSTD_LITBUFFEREXTRASIZE - WILDCOPY_OVERLENGTH; + dctx->litBufferEnd = dctx->litBuffer + litSize - ZSTD_LITBUFFEREXTRASIZE; + } else { + /* initially this will be stored entirely in dst during huffman decoding, it will partially be shifted to litExtraBuffer after */ + dctx->litBuffer = (BYTE*)dst + expectedWriteSize - litSize; + dctx->litBufferEnd = (BYTE*)dst + expectedWriteSize; + } + dctx->litBufferLocation = ZSTD_split; + assert(dctx->litBufferEnd <= (BYTE*)dst + expectedWriteSize); + } +} + +/*! ZSTD_decodeLiteralsBlock() : + * Where it is possible to do so without being stomped by the output during decompression, the literals block will be stored + * in the dstBuffer. If there is room to do so, it will be stored in full in the excess dst space after where the current + * block will be output. Otherwise it will be stored at the end of the current dst blockspace, with a small portion being + * stored in dctx->litExtraBuffer to help keep it "ahead" of the current output write. + * + * @return : nb of bytes read from src (< srcSize ) + * note : symbol not declared but exposed for fullbench */ +static size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, + const void* src, size_t srcSize, /* note : srcSize < BLOCKSIZE */ + void* dst, size_t dstCapacity, const streaming_operation streaming) +{ + DEBUGLOG(5, "ZSTD_decodeLiteralsBlock"); + RETURN_ERROR_IF(srcSize < MIN_CBLOCK_SIZE, corruption_detected, ""); + + { const BYTE* const istart = (const BYTE*) src; + SymbolEncodingType_e const litEncType = (SymbolEncodingType_e)(istart[0] & 3); + size_t const blockSizeMax = ZSTD_blockSizeMax(dctx); + + switch(litEncType) + { + case set_repeat: + DEBUGLOG(5, "set_repeat flag : re-using stats from previous compressed literals block"); + RETURN_ERROR_IF(dctx->litEntropy==0, dictionary_corrupted, ""); + ZSTD_FALLTHROUGH; + + case set_compressed: + RETURN_ERROR_IF(srcSize < 5, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need up to 5 for case 3"); + { size_t lhSize, litSize, litCSize; + U32 singleStream=0; + U32 const lhlCode = (istart[0] >> 2) & 3; + U32 const lhc = MEM_readLE32(istart); + size_t hufSuccess; + size_t expectedWriteSize = MIN(blockSizeMax, dstCapacity); + int const flags = 0 + | (ZSTD_DCtx_get_bmi2(dctx) ? HUF_flags_bmi2 : 0) + | (dctx->disableHufAsm ? HUF_flags_disableAsm : 0); + switch(lhlCode) + { + case 0: case 1: default: /* note : default is impossible, since lhlCode into [0..3] */ + /* 2 - 2 - 10 - 10 */ + singleStream = !lhlCode; + lhSize = 3; + litSize = (lhc >> 4) & 0x3FF; + litCSize = (lhc >> 14) & 0x3FF; + break; + case 2: + /* 2 - 2 - 14 - 14 */ + lhSize = 4; + litSize = (lhc >> 4) & 0x3FFF; + litCSize = lhc >> 18; + break; + case 3: + /* 2 - 2 - 18 - 18 */ + lhSize = 5; + litSize = (lhc >> 4) & 0x3FFFF; + litCSize = (lhc >> 22) + ((size_t)istart[4] << 10); + break; + } + RETURN_ERROR_IF(litSize > 0 && dst == NULL, dstSize_tooSmall, "NULL not handled"); + RETURN_ERROR_IF(litSize > blockSizeMax, corruption_detected, ""); + if (!singleStream) + RETURN_ERROR_IF(litSize < MIN_LITERALS_FOR_4_STREAMS, literals_headerWrong, + "Not enough literals (%zu) for the 4-streams mode (min %u)", + litSize, MIN_LITERALS_FOR_4_STREAMS); + RETURN_ERROR_IF(litCSize + lhSize > srcSize, corruption_detected, ""); + RETURN_ERROR_IF(expectedWriteSize < litSize , dstSize_tooSmall, ""); + ZSTD_allocateLiteralsBuffer(dctx, dst, dstCapacity, litSize, streaming, expectedWriteSize, 0); + + /* prefetch huffman table if cold */ + if (dctx->ddictIsCold && (litSize > 768 /* heuristic */)) { + PREFETCH_AREA(dctx->HUFptr, sizeof(dctx->entropy.hufTable)); + } + + if (litEncType==set_repeat) { + if (singleStream) { + hufSuccess = HUF_decompress1X_usingDTable( + dctx->litBuffer, litSize, istart+lhSize, litCSize, + dctx->HUFptr, flags); + } else { + assert(litSize >= MIN_LITERALS_FOR_4_STREAMS); + hufSuccess = HUF_decompress4X_usingDTable( + dctx->litBuffer, litSize, istart+lhSize, litCSize, + dctx->HUFptr, flags); + } + } else { + if (singleStream) { +#if defined(HUF_FORCE_DECOMPRESS_X2) + hufSuccess = HUF_decompress1X_DCtx_wksp( + dctx->entropy.hufTable, dctx->litBuffer, litSize, + istart+lhSize, litCSize, dctx->workspace, + sizeof(dctx->workspace), flags); +#else + hufSuccess = HUF_decompress1X1_DCtx_wksp( + dctx->entropy.hufTable, dctx->litBuffer, litSize, + istart+lhSize, litCSize, dctx->workspace, + sizeof(dctx->workspace), flags); +#endif + } else { + hufSuccess = HUF_decompress4X_hufOnly_wksp( + dctx->entropy.hufTable, dctx->litBuffer, litSize, + istart+lhSize, litCSize, dctx->workspace, + sizeof(dctx->workspace), flags); + } + } + if (dctx->litBufferLocation == ZSTD_split) + { + assert(litSize > ZSTD_LITBUFFEREXTRASIZE); + ZSTD_memcpy(dctx->litExtraBuffer, dctx->litBufferEnd - ZSTD_LITBUFFEREXTRASIZE, ZSTD_LITBUFFEREXTRASIZE); + ZSTD_memmove(dctx->litBuffer + ZSTD_LITBUFFEREXTRASIZE - WILDCOPY_OVERLENGTH, dctx->litBuffer, litSize - ZSTD_LITBUFFEREXTRASIZE); + dctx->litBuffer += ZSTD_LITBUFFEREXTRASIZE - WILDCOPY_OVERLENGTH; + dctx->litBufferEnd -= WILDCOPY_OVERLENGTH; + assert(dctx->litBufferEnd <= (BYTE*)dst + blockSizeMax); + } + + RETURN_ERROR_IF(HUF_isError(hufSuccess), corruption_detected, ""); + + dctx->litPtr = dctx->litBuffer; + dctx->litSize = litSize; + dctx->litEntropy = 1; + if (litEncType==set_compressed) dctx->HUFptr = dctx->entropy.hufTable; + return litCSize + lhSize; + } + + case set_basic: + { size_t litSize, lhSize; + U32 const lhlCode = ((istart[0]) >> 2) & 3; + size_t expectedWriteSize = MIN(blockSizeMax, dstCapacity); + switch(lhlCode) + { + case 0: case 2: default: /* note : default is impossible, since lhlCode into [0..3] */ + lhSize = 1; + litSize = istart[0] >> 3; + break; + case 1: + lhSize = 2; + litSize = MEM_readLE16(istart) >> 4; + break; + case 3: + lhSize = 3; + RETURN_ERROR_IF(srcSize<3, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need lhSize = 3"); + litSize = MEM_readLE24(istart) >> 4; + break; + } + + RETURN_ERROR_IF(litSize > 0 && dst == NULL, dstSize_tooSmall, "NULL not handled"); + RETURN_ERROR_IF(litSize > blockSizeMax, corruption_detected, ""); + RETURN_ERROR_IF(expectedWriteSize < litSize, dstSize_tooSmall, ""); + ZSTD_allocateLiteralsBuffer(dctx, dst, dstCapacity, litSize, streaming, expectedWriteSize, 1); + if (lhSize+litSize+WILDCOPY_OVERLENGTH > srcSize) { /* risk reading beyond src buffer with wildcopy */ + RETURN_ERROR_IF(litSize+lhSize > srcSize, corruption_detected, ""); + if (dctx->litBufferLocation == ZSTD_split) + { + ZSTD_memcpy(dctx->litBuffer, istart + lhSize, litSize - ZSTD_LITBUFFEREXTRASIZE); + ZSTD_memcpy(dctx->litExtraBuffer, istart + lhSize + litSize - ZSTD_LITBUFFEREXTRASIZE, ZSTD_LITBUFFEREXTRASIZE); + } + else + { + ZSTD_memcpy(dctx->litBuffer, istart + lhSize, litSize); + } + dctx->litPtr = dctx->litBuffer; + dctx->litSize = litSize; + return lhSize+litSize; + } + /* direct reference into compressed stream */ + dctx->litPtr = istart+lhSize; + dctx->litSize = litSize; + dctx->litBufferEnd = dctx->litPtr + litSize; + dctx->litBufferLocation = ZSTD_not_in_dst; + return lhSize+litSize; + } + + case set_rle: + { U32 const lhlCode = ((istart[0]) >> 2) & 3; + size_t litSize, lhSize; + size_t expectedWriteSize = MIN(blockSizeMax, dstCapacity); + switch(lhlCode) + { + case 0: case 2: default: /* note : default is impossible, since lhlCode into [0..3] */ + lhSize = 1; + litSize = istart[0] >> 3; + break; + case 1: + lhSize = 2; + RETURN_ERROR_IF(srcSize<3, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need lhSize+1 = 3"); + litSize = MEM_readLE16(istart) >> 4; + break; + case 3: + lhSize = 3; + RETURN_ERROR_IF(srcSize<4, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here we need lhSize+1 = 4"); + litSize = MEM_readLE24(istart) >> 4; + break; + } + RETURN_ERROR_IF(litSize > 0 && dst == NULL, dstSize_tooSmall, "NULL not handled"); + RETURN_ERROR_IF(litSize > blockSizeMax, corruption_detected, ""); + RETURN_ERROR_IF(expectedWriteSize < litSize, dstSize_tooSmall, ""); + ZSTD_allocateLiteralsBuffer(dctx, dst, dstCapacity, litSize, streaming, expectedWriteSize, 1); + if (dctx->litBufferLocation == ZSTD_split) + { + ZSTD_memset(dctx->litBuffer, istart[lhSize], litSize - ZSTD_LITBUFFEREXTRASIZE); + ZSTD_memset(dctx->litExtraBuffer, istart[lhSize], ZSTD_LITBUFFEREXTRASIZE); + } + else + { + ZSTD_memset(dctx->litBuffer, istart[lhSize], litSize); + } + dctx->litPtr = dctx->litBuffer; + dctx->litSize = litSize; + return lhSize+1; + } + default: + RETURN_ERROR(corruption_detected, "impossible"); + } + } +} + +/* Hidden declaration for fullbench */ +size_t ZSTD_decodeLiteralsBlock_wrapper(ZSTD_DCtx* dctx, + const void* src, size_t srcSize, + void* dst, size_t dstCapacity); +size_t ZSTD_decodeLiteralsBlock_wrapper(ZSTD_DCtx* dctx, + const void* src, size_t srcSize, + void* dst, size_t dstCapacity) +{ + dctx->isFrameDecompression = 0; + return ZSTD_decodeLiteralsBlock(dctx, src, srcSize, dst, dstCapacity, not_streaming); +} + +/* Default FSE distribution tables. + * These are pre-calculated FSE decoding tables using default distributions as defined in specification : + * https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#default-distributions + * They were generated programmatically with following method : + * - start from default distributions, present in /lib/common/zstd_internal.h + * - generate tables normally, using ZSTD_buildFSETable() + * - printout the content of tables + * - prettify output, report below, test with fuzzer to ensure it's correct */ + +/* Default FSE distribution table for Literal Lengths */ +static const ZSTD_seqSymbol LL_defaultDTable[(1<tableLog = 0; + DTableH->fastMode = 0; + + cell->nbBits = 0; + cell->nextState = 0; + assert(nbAddBits < 255); + cell->nbAdditionalBits = nbAddBits; + cell->baseValue = baseValue; +} + + +/* ZSTD_buildFSETable() : + * generate FSE decoding table for one symbol (ll, ml or off) + * cannot fail if input is valid => + * all inputs are presumed validated at this stage */ +FORCE_INLINE_TEMPLATE +void ZSTD_buildFSETable_body(ZSTD_seqSymbol* dt, + const short* normalizedCounter, unsigned maxSymbolValue, + const U32* baseValue, const U8* nbAdditionalBits, + unsigned tableLog, void* wksp, size_t wkspSize) +{ + ZSTD_seqSymbol* const tableDecode = dt+1; + U32 const maxSV1 = maxSymbolValue + 1; + U32 const tableSize = 1 << tableLog; + + U16* symbolNext = (U16*)wksp; + BYTE* spread = (BYTE*)(symbolNext + MaxSeq + 1); + U32 highThreshold = tableSize - 1; + + + /* Sanity Checks */ + assert(maxSymbolValue <= MaxSeq); + assert(tableLog <= MaxFSELog); + assert(wkspSize >= ZSTD_BUILD_FSE_TABLE_WKSP_SIZE); + (void)wkspSize; + /* Init, lay down lowprob symbols */ + { ZSTD_seqSymbol_header DTableH; + DTableH.tableLog = tableLog; + DTableH.fastMode = 1; + { S16 const largeLimit= (S16)(1 << (tableLog-1)); + U32 s; + for (s=0; s= largeLimit) DTableH.fastMode=0; + assert(normalizedCounter[s]>=0); + symbolNext[s] = (U16)normalizedCounter[s]; + } } } + ZSTD_memcpy(dt, &DTableH, sizeof(DTableH)); + } + + /* Spread symbols */ + assert(tableSize <= 512); + /* Specialized symbol spreading for the case when there are + * no low probability (-1 count) symbols. When compressing + * small blocks we avoid low probability symbols to hit this + * case, since header decoding speed matters more. + */ + if (highThreshold == tableSize - 1) { + size_t const tableMask = tableSize-1; + size_t const step = FSE_TABLESTEP(tableSize); + /* First lay down the symbols in order. + * We use a uint64_t to lay down 8 bytes at a time. This reduces branch + * misses since small blocks generally have small table logs, so nearly + * all symbols have counts <= 8. We ensure we have 8 bytes at the end of + * our buffer to handle the over-write. + */ + { + U64 const add = 0x0101010101010101ull; + size_t pos = 0; + U64 sv = 0; + U32 s; + for (s=0; s=0); + pos += (size_t)n; + } + } + /* Now we spread those positions across the table. + * The benefit of doing it in two stages is that we avoid the + * variable size inner loop, which caused lots of branch misses. + * Now we can run through all the positions without any branch misses. + * We unroll the loop twice, since that is what empirically worked best. + */ + { + size_t position = 0; + size_t s; + size_t const unroll = 2; + assert(tableSize % unroll == 0); /* FSE_MIN_TABLELOG is 5 */ + for (s = 0; s < (size_t)tableSize; s += unroll) { + size_t u; + for (u = 0; u < unroll; ++u) { + size_t const uPosition = (position + (u * step)) & tableMask; + tableDecode[uPosition].baseValue = spread[s + u]; + } + position = (position + (unroll * step)) & tableMask; + } + assert(position == 0); + } + } else { + U32 const tableMask = tableSize-1; + U32 const step = FSE_TABLESTEP(tableSize); + U32 s, position = 0; + for (s=0; s highThreshold)) position = (position + step) & tableMask; /* lowprob area */ + } } + assert(position == 0); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ + } + + /* Build Decoding table */ + { + U32 u; + for (u=0; u max, corruption_detected, ""); + { U32 const symbol = *(const BYTE*)src; + U32 const baseline = baseValue[symbol]; + U8 const nbBits = nbAdditionalBits[symbol]; + ZSTD_buildSeqTable_rle(DTableSpace, baseline, nbBits); + } + *DTablePtr = DTableSpace; + return 1; + case set_basic : + *DTablePtr = defaultTable; + return 0; + case set_repeat: + RETURN_ERROR_IF(!flagRepeatTable, corruption_detected, ""); + /* prefetch FSE table if used */ + if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { + const void* const pStart = *DTablePtr; + size_t const pSize = sizeof(ZSTD_seqSymbol) * (SEQSYMBOL_TABLE_SIZE(maxLog)); + PREFETCH_AREA(pStart, pSize); + } + return 0; + case set_compressed : + { unsigned tableLog; + S16 norm[MaxSeq+1]; + size_t const headerSize = FSE_readNCount(norm, &max, &tableLog, src, srcSize); + RETURN_ERROR_IF(FSE_isError(headerSize), corruption_detected, ""); + RETURN_ERROR_IF(tableLog > maxLog, corruption_detected, ""); + ZSTD_buildFSETable(DTableSpace, norm, max, baseValue, nbAdditionalBits, tableLog, wksp, wkspSize, bmi2); + *DTablePtr = DTableSpace; + return headerSize; + } + default : + assert(0); + RETURN_ERROR(GENERIC, "impossible"); + } +} + +size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, + const void* src, size_t srcSize) +{ + const BYTE* const istart = (const BYTE*)src; + const BYTE* const iend = istart + srcSize; + const BYTE* ip = istart; + int nbSeq; + DEBUGLOG(5, "ZSTD_decodeSeqHeaders"); + + /* check */ + RETURN_ERROR_IF(srcSize < MIN_SEQUENCES_SIZE, srcSize_wrong, ""); + + /* SeqHead */ + nbSeq = *ip++; + if (nbSeq > 0x7F) { + if (nbSeq == 0xFF) { + RETURN_ERROR_IF(ip+2 > iend, srcSize_wrong, ""); + nbSeq = MEM_readLE16(ip) + LONGNBSEQ; + ip+=2; + } else { + RETURN_ERROR_IF(ip >= iend, srcSize_wrong, ""); + nbSeq = ((nbSeq-0x80)<<8) + *ip++; + } + } + *nbSeqPtr = nbSeq; + + if (nbSeq == 0) { + /* No sequence : section ends immediately */ + RETURN_ERROR_IF(ip != iend, corruption_detected, + "extraneous data present in the Sequences section"); + return (size_t)(ip - istart); + } + + /* FSE table descriptors */ + RETURN_ERROR_IF(ip+1 > iend, srcSize_wrong, ""); /* minimum possible size: 1 byte for symbol encoding types */ + RETURN_ERROR_IF(*ip & 3, corruption_detected, ""); /* The last field, Reserved, must be all-zeroes. */ + { SymbolEncodingType_e const LLtype = (SymbolEncodingType_e)(*ip >> 6); + SymbolEncodingType_e const OFtype = (SymbolEncodingType_e)((*ip >> 4) & 3); + SymbolEncodingType_e const MLtype = (SymbolEncodingType_e)((*ip >> 2) & 3); + ip++; + + /* Build DTables */ + { size_t const llhSize = ZSTD_buildSeqTable(dctx->entropy.LLTable, &dctx->LLTptr, + LLtype, MaxLL, LLFSELog, + ip, iend-ip, + LL_base, LL_bits, + LL_defaultDTable, dctx->fseEntropy, + dctx->ddictIsCold, nbSeq, + dctx->workspace, sizeof(dctx->workspace), + ZSTD_DCtx_get_bmi2(dctx)); + RETURN_ERROR_IF(ZSTD_isError(llhSize), corruption_detected, "ZSTD_buildSeqTable failed"); + ip += llhSize; + } + + { size_t const ofhSize = ZSTD_buildSeqTable(dctx->entropy.OFTable, &dctx->OFTptr, + OFtype, MaxOff, OffFSELog, + ip, iend-ip, + OF_base, OF_bits, + OF_defaultDTable, dctx->fseEntropy, + dctx->ddictIsCold, nbSeq, + dctx->workspace, sizeof(dctx->workspace), + ZSTD_DCtx_get_bmi2(dctx)); + RETURN_ERROR_IF(ZSTD_isError(ofhSize), corruption_detected, "ZSTD_buildSeqTable failed"); + ip += ofhSize; + } + + { size_t const mlhSize = ZSTD_buildSeqTable(dctx->entropy.MLTable, &dctx->MLTptr, + MLtype, MaxML, MLFSELog, + ip, iend-ip, + ML_base, ML_bits, + ML_defaultDTable, dctx->fseEntropy, + dctx->ddictIsCold, nbSeq, + dctx->workspace, sizeof(dctx->workspace), + ZSTD_DCtx_get_bmi2(dctx)); + RETURN_ERROR_IF(ZSTD_isError(mlhSize), corruption_detected, "ZSTD_buildSeqTable failed"); + ip += mlhSize; + } + } + + return ip-istart; +} + + +typedef struct { + size_t litLength; + size_t matchLength; + size_t offset; +} seq_t; + +typedef struct { + size_t state; + const ZSTD_seqSymbol* table; +} ZSTD_fseState; + +typedef struct { + BIT_DStream_t DStream; + ZSTD_fseState stateLL; + ZSTD_fseState stateOffb; + ZSTD_fseState stateML; + size_t prevOffset[ZSTD_REP_NUM]; +} seqState_t; + +/*! ZSTD_overlapCopy8() : + * Copies 8 bytes from ip to op and updates op and ip where ip <= op. + * If the offset is < 8 then the offset is spread to at least 8 bytes. + * + * Precondition: *ip <= *op + * Postcondition: *op - *op >= 8 + */ +HINT_INLINE void ZSTD_overlapCopy8(BYTE** op, BYTE const** ip, size_t offset) { + assert(*ip <= *op); + if (offset < 8) { + /* close range match, overlap */ + static const U32 dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 }; /* added */ + static const int dec64table[] = { 8, 8, 8, 7, 8, 9,10,11 }; /* subtracted */ + int const sub2 = dec64table[offset]; + (*op)[0] = (*ip)[0]; + (*op)[1] = (*ip)[1]; + (*op)[2] = (*ip)[2]; + (*op)[3] = (*ip)[3]; + *ip += dec32table[offset]; + ZSTD_copy4(*op+4, *ip); + *ip -= sub2; + } else { + ZSTD_copy8(*op, *ip); + } + *ip += 8; + *op += 8; + assert(*op - *ip >= 8); +} + +/*! ZSTD_safecopy() : + * Specialized version of memcpy() that is allowed to READ up to WILDCOPY_OVERLENGTH past the input buffer + * and write up to 16 bytes past oend_w (op >= oend_w is allowed). + * This function is only called in the uncommon case where the sequence is near the end of the block. It + * should be fast for a single long sequence, but can be slow for several short sequences. + * + * @param ovtype controls the overlap detection + * - ZSTD_no_overlap: The source and destination are guaranteed to be at least WILDCOPY_VECLEN bytes apart. + * - ZSTD_overlap_src_before_dst: The src and dst may overlap and may be any distance apart. + * The src buffer must be before the dst buffer. + */ +static void ZSTD_safecopy(BYTE* op, const BYTE* const oend_w, BYTE const* ip, ptrdiff_t length, ZSTD_overlap_e ovtype) { + ptrdiff_t const diff = op - ip; + BYTE* const oend = op + length; + + assert((ovtype == ZSTD_no_overlap && (diff <= -8 || diff >= 8 || op >= oend_w)) || + (ovtype == ZSTD_overlap_src_before_dst && diff >= 0)); + + if (length < 8) { + /* Handle short lengths. */ + while (op < oend) *op++ = *ip++; + return; + } + if (ovtype == ZSTD_overlap_src_before_dst) { + /* Copy 8 bytes and ensure the offset >= 8 when there can be overlap. */ + assert(length >= 8); + ZSTD_overlapCopy8(&op, &ip, diff); + length -= 8; + assert(op - ip >= 8); + assert(op <= oend); + } + + if (oend <= oend_w) { + /* No risk of overwrite. */ + ZSTD_wildcopy(op, ip, length, ovtype); + return; + } + if (op <= oend_w) { + /* Wildcopy until we get close to the end. */ + assert(oend > oend_w); + ZSTD_wildcopy(op, ip, oend_w - op, ovtype); + ip += oend_w - op; + op += oend_w - op; + } + /* Handle the leftovers. */ + while (op < oend) *op++ = *ip++; +} + +/* ZSTD_safecopyDstBeforeSrc(): + * This version allows overlap with dst before src, or handles the non-overlap case with dst after src + * Kept separate from more common ZSTD_safecopy case to avoid performance impact to the safecopy common case */ +static void ZSTD_safecopyDstBeforeSrc(BYTE* op, const BYTE* ip, ptrdiff_t length) { + ptrdiff_t const diff = op - ip; + BYTE* const oend = op + length; + + if (length < 8 || diff > -8) { + /* Handle short lengths, close overlaps, and dst not before src. */ + while (op < oend) *op++ = *ip++; + return; + } + + if (op <= oend - WILDCOPY_OVERLENGTH && diff < -WILDCOPY_VECLEN) { + ZSTD_wildcopy(op, ip, oend - WILDCOPY_OVERLENGTH - op, ZSTD_no_overlap); + ip += oend - WILDCOPY_OVERLENGTH - op; + op += oend - WILDCOPY_OVERLENGTH - op; + } + + /* Handle the leftovers. */ + while (op < oend) *op++ = *ip++; +} + +/* ZSTD_execSequenceEnd(): + * This version handles cases that are near the end of the output buffer. It requires + * more careful checks to make sure there is no overflow. By separating out these hard + * and unlikely cases, we can speed up the common cases. + * + * NOTE: This function needs to be fast for a single long sequence, but doesn't need + * to be optimized for many small sequences, since those fall into ZSTD_execSequence(). + */ +FORCE_NOINLINE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_execSequenceEnd(BYTE* op, + BYTE* const oend, seq_t sequence, + const BYTE** litPtr, const BYTE* const litLimit, + const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) +{ + BYTE* const oLitEnd = op + sequence.litLength; + size_t const sequenceLength = sequence.litLength + sequence.matchLength; + const BYTE* const iLitEnd = *litPtr + sequence.litLength; + const BYTE* match = oLitEnd - sequence.offset; + BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH; + + /* bounds checks : careful of address space overflow in 32-bit mode */ + RETURN_ERROR_IF(sequenceLength > (size_t)(oend - op), dstSize_tooSmall, "last match must fit within dstBuffer"); + RETURN_ERROR_IF(sequence.litLength > (size_t)(litLimit - *litPtr), corruption_detected, "try to read beyond literal buffer"); + assert(op < op + sequenceLength); + assert(oLitEnd < op + sequenceLength); + + /* copy literals */ + ZSTD_safecopy(op, oend_w, *litPtr, sequence.litLength, ZSTD_no_overlap); + op = oLitEnd; + *litPtr = iLitEnd; + + /* copy Match */ + if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { + /* offset beyond prefix */ + RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected, ""); + match = dictEnd - (prefixStart - match); + if (match + sequence.matchLength <= dictEnd) { + ZSTD_memmove(oLitEnd, match, sequence.matchLength); + return sequenceLength; + } + /* span extDict & currentPrefixSegment */ + { size_t const length1 = dictEnd - match; + ZSTD_memmove(oLitEnd, match, length1); + op = oLitEnd + length1; + sequence.matchLength -= length1; + match = prefixStart; + } + } + ZSTD_safecopy(op, oend_w, match, sequence.matchLength, ZSTD_overlap_src_before_dst); + return sequenceLength; +} + +/* ZSTD_execSequenceEndSplitLitBuffer(): + * This version is intended to be used during instances where the litBuffer is still split. It is kept separate to avoid performance impact for the good case. + */ +FORCE_NOINLINE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_execSequenceEndSplitLitBuffer(BYTE* op, + BYTE* const oend, const BYTE* const oend_w, seq_t sequence, + const BYTE** litPtr, const BYTE* const litLimit, + const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) +{ + BYTE* const oLitEnd = op + sequence.litLength; + size_t const sequenceLength = sequence.litLength + sequence.matchLength; + const BYTE* const iLitEnd = *litPtr + sequence.litLength; + const BYTE* match = oLitEnd - sequence.offset; + + + /* bounds checks : careful of address space overflow in 32-bit mode */ + RETURN_ERROR_IF(sequenceLength > (size_t)(oend - op), dstSize_tooSmall, "last match must fit within dstBuffer"); + RETURN_ERROR_IF(sequence.litLength > (size_t)(litLimit - *litPtr), corruption_detected, "try to read beyond literal buffer"); + assert(op < op + sequenceLength); + assert(oLitEnd < op + sequenceLength); + + /* copy literals */ + RETURN_ERROR_IF(op > *litPtr && op < *litPtr + sequence.litLength, dstSize_tooSmall, "output should not catch up to and overwrite literal buffer"); + ZSTD_safecopyDstBeforeSrc(op, *litPtr, sequence.litLength); + op = oLitEnd; + *litPtr = iLitEnd; + + /* copy Match */ + if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { + /* offset beyond prefix */ + RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected, ""); + match = dictEnd - (prefixStart - match); + if (match + sequence.matchLength <= dictEnd) { + ZSTD_memmove(oLitEnd, match, sequence.matchLength); + return sequenceLength; + } + /* span extDict & currentPrefixSegment */ + { size_t const length1 = dictEnd - match; + ZSTD_memmove(oLitEnd, match, length1); + op = oLitEnd + length1; + sequence.matchLength -= length1; + match = prefixStart; + } + } + ZSTD_safecopy(op, oend_w, match, sequence.matchLength, ZSTD_overlap_src_before_dst); + return sequenceLength; +} + +HINT_INLINE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_execSequence(BYTE* op, + BYTE* const oend, seq_t sequence, + const BYTE** litPtr, const BYTE* const litLimit, + const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) +{ + BYTE* const oLitEnd = op + sequence.litLength; + size_t const sequenceLength = sequence.litLength + sequence.matchLength; + BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */ + BYTE* const oend_w = oend - WILDCOPY_OVERLENGTH; /* risk : address space underflow on oend=NULL */ + const BYTE* const iLitEnd = *litPtr + sequence.litLength; + const BYTE* match = oLitEnd - sequence.offset; + + assert(op != NULL /* Precondition */); + assert(oend_w < oend /* No underflow */); + +#if defined(__aarch64__) + /* prefetch sequence starting from match that will be used for copy later */ + PREFETCH_L1(match); +#endif + /* Handle edge cases in a slow path: + * - Read beyond end of literals + * - Match end is within WILDCOPY_OVERLIMIT of oend + * - 32-bit mode and the match length overflows + */ + if (UNLIKELY( + iLitEnd > litLimit || + oMatchEnd > oend_w || + (MEM_32bits() && (size_t)(oend - op) < sequenceLength + WILDCOPY_OVERLENGTH))) + return ZSTD_execSequenceEnd(op, oend, sequence, litPtr, litLimit, prefixStart, virtualStart, dictEnd); + + /* Assumptions (everything else goes into ZSTD_execSequenceEnd()) */ + assert(op <= oLitEnd /* No overflow */); + assert(oLitEnd < oMatchEnd /* Non-zero match & no overflow */); + assert(oMatchEnd <= oend /* No underflow */); + assert(iLitEnd <= litLimit /* Literal length is in bounds */); + assert(oLitEnd <= oend_w /* Can wildcopy literals */); + assert(oMatchEnd <= oend_w /* Can wildcopy matches */); + + /* Copy Literals: + * Split out litLength <= 16 since it is nearly always true. +1.6% on gcc-9. + * We likely don't need the full 32-byte wildcopy. + */ + assert(WILDCOPY_OVERLENGTH >= 16); + ZSTD_copy16(op, (*litPtr)); + if (UNLIKELY(sequence.litLength > 16)) { + ZSTD_wildcopy(op + 16, (*litPtr) + 16, sequence.litLength - 16, ZSTD_no_overlap); + } + op = oLitEnd; + *litPtr = iLitEnd; /* update for next sequence */ + + /* Copy Match */ + if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { + /* offset beyond prefix -> go into extDict */ + RETURN_ERROR_IF(UNLIKELY(sequence.offset > (size_t)(oLitEnd - virtualStart)), corruption_detected, ""); + match = dictEnd + (match - prefixStart); + if (match + sequence.matchLength <= dictEnd) { + ZSTD_memmove(oLitEnd, match, sequence.matchLength); + return sequenceLength; + } + /* span extDict & currentPrefixSegment */ + { size_t const length1 = dictEnd - match; + ZSTD_memmove(oLitEnd, match, length1); + op = oLitEnd + length1; + sequence.matchLength -= length1; + match = prefixStart; + } + } + /* Match within prefix of 1 or more bytes */ + assert(op <= oMatchEnd); + assert(oMatchEnd <= oend_w); + assert(match >= prefixStart); + assert(sequence.matchLength >= 1); + + /* Nearly all offsets are >= WILDCOPY_VECLEN bytes, which means we can use wildcopy + * without overlap checking. + */ + if (LIKELY(sequence.offset >= WILDCOPY_VECLEN)) { + /* We bet on a full wildcopy for matches, since we expect matches to be + * longer than literals (in general). In silesia, ~10% of matches are longer + * than 16 bytes. + */ + ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength, ZSTD_no_overlap); + return sequenceLength; + } + assert(sequence.offset < WILDCOPY_VECLEN); + + /* Copy 8 bytes and spread the offset to be >= 8. */ + ZSTD_overlapCopy8(&op, &match, sequence.offset); + + /* If the match length is > 8 bytes, then continue with the wildcopy. */ + if (sequence.matchLength > 8) { + assert(op < oMatchEnd); + ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength - 8, ZSTD_overlap_src_before_dst); + } + return sequenceLength; +} + +HINT_INLINE +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +size_t ZSTD_execSequenceSplitLitBuffer(BYTE* op, + BYTE* const oend, const BYTE* const oend_w, seq_t sequence, + const BYTE** litPtr, const BYTE* const litLimit, + const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd) +{ + BYTE* const oLitEnd = op + sequence.litLength; + size_t const sequenceLength = sequence.litLength + sequence.matchLength; + BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */ + const BYTE* const iLitEnd = *litPtr + sequence.litLength; + const BYTE* match = oLitEnd - sequence.offset; + + assert(op != NULL /* Precondition */); + assert(oend_w < oend /* No underflow */); + /* Handle edge cases in a slow path: + * - Read beyond end of literals + * - Match end is within WILDCOPY_OVERLIMIT of oend + * - 32-bit mode and the match length overflows + */ + if (UNLIKELY( + iLitEnd > litLimit || + oMatchEnd > oend_w || + (MEM_32bits() && (size_t)(oend - op) < sequenceLength + WILDCOPY_OVERLENGTH))) + return ZSTD_execSequenceEndSplitLitBuffer(op, oend, oend_w, sequence, litPtr, litLimit, prefixStart, virtualStart, dictEnd); + + /* Assumptions (everything else goes into ZSTD_execSequenceEnd()) */ + assert(op <= oLitEnd /* No overflow */); + assert(oLitEnd < oMatchEnd /* Non-zero match & no overflow */); + assert(oMatchEnd <= oend /* No underflow */); + assert(iLitEnd <= litLimit /* Literal length is in bounds */); + assert(oLitEnd <= oend_w /* Can wildcopy literals */); + assert(oMatchEnd <= oend_w /* Can wildcopy matches */); + + /* Copy Literals: + * Split out litLength <= 16 since it is nearly always true. +1.6% on gcc-9. + * We likely don't need the full 32-byte wildcopy. + */ + assert(WILDCOPY_OVERLENGTH >= 16); + ZSTD_copy16(op, (*litPtr)); + if (UNLIKELY(sequence.litLength > 16)) { + ZSTD_wildcopy(op+16, (*litPtr)+16, sequence.litLength-16, ZSTD_no_overlap); + } + op = oLitEnd; + *litPtr = iLitEnd; /* update for next sequence */ + + /* Copy Match */ + if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { + /* offset beyond prefix -> go into extDict */ + RETURN_ERROR_IF(UNLIKELY(sequence.offset > (size_t)(oLitEnd - virtualStart)), corruption_detected, ""); + match = dictEnd + (match - prefixStart); + if (match + sequence.matchLength <= dictEnd) { + ZSTD_memmove(oLitEnd, match, sequence.matchLength); + return sequenceLength; + } + /* span extDict & currentPrefixSegment */ + { size_t const length1 = dictEnd - match; + ZSTD_memmove(oLitEnd, match, length1); + op = oLitEnd + length1; + sequence.matchLength -= length1; + match = prefixStart; + } } + /* Match within prefix of 1 or more bytes */ + assert(op <= oMatchEnd); + assert(oMatchEnd <= oend_w); + assert(match >= prefixStart); + assert(sequence.matchLength >= 1); + + /* Nearly all offsets are >= WILDCOPY_VECLEN bytes, which means we can use wildcopy + * without overlap checking. + */ + if (LIKELY(sequence.offset >= WILDCOPY_VECLEN)) { + /* We bet on a full wildcopy for matches, since we expect matches to be + * longer than literals (in general). In silesia, ~10% of matches are longer + * than 16 bytes. + */ + ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength, ZSTD_no_overlap); + return sequenceLength; + } + assert(sequence.offset < WILDCOPY_VECLEN); + + /* Copy 8 bytes and spread the offset to be >= 8. */ + ZSTD_overlapCopy8(&op, &match, sequence.offset); + + /* If the match length is > 8 bytes, then continue with the wildcopy. */ + if (sequence.matchLength > 8) { + assert(op < oMatchEnd); + ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength-8, ZSTD_overlap_src_before_dst); + } + return sequenceLength; +} + + +static void +ZSTD_initFseState(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD, const ZSTD_seqSymbol* dt) +{ + const void* ptr = dt; + const ZSTD_seqSymbol_header* const DTableH = (const ZSTD_seqSymbol_header*)ptr; + DStatePtr->state = BIT_readBits(bitD, DTableH->tableLog); + DEBUGLOG(6, "ZSTD_initFseState : val=%u using %u bits", + (U32)DStatePtr->state, DTableH->tableLog); + BIT_reloadDStream(bitD); + DStatePtr->table = dt + 1; +} + +FORCE_INLINE_TEMPLATE void +ZSTD_updateFseStateWithDInfo(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD, U16 nextState, U32 nbBits) +{ + size_t const lowBits = BIT_readBits(bitD, nbBits); + DStatePtr->state = nextState + lowBits; +} + +/* We need to add at most (ZSTD_WINDOWLOG_MAX_32 - 1) bits to read the maximum + * offset bits. But we can only read at most STREAM_ACCUMULATOR_MIN_32 + * bits before reloading. This value is the maximum number of bytes we read + * after reloading when we are decoding long offsets. + */ +#define LONG_OFFSETS_MAX_EXTRA_BITS_32 \ + (ZSTD_WINDOWLOG_MAX_32 > STREAM_ACCUMULATOR_MIN_32 \ + ? ZSTD_WINDOWLOG_MAX_32 - STREAM_ACCUMULATOR_MIN_32 \ + : 0) + +typedef enum { ZSTD_lo_isRegularOffset, ZSTD_lo_isLongOffset=1 } ZSTD_longOffset_e; + +/** + * ZSTD_decodeSequence(): + * @p longOffsets : tells the decoder to reload more bit while decoding large offsets + * only used in 32-bit mode + * @return : Sequence (litL + matchL + offset) + */ +FORCE_INLINE_TEMPLATE seq_t +ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets, const int isLastSeq) +{ + seq_t seq; + /* + * ZSTD_seqSymbol is a 64 bits wide structure. + * It can be loaded in one operation + * and its fields extracted by simply shifting or bit-extracting on aarch64. + * GCC doesn't recognize this and generates more unnecessary ldr/ldrb/ldrh + * operations that cause performance drop. This can be avoided by using this + * ZSTD_memcpy hack. + */ +#if defined(__aarch64__) && (defined(__GNUC__) && !defined(__clang__)) + ZSTD_seqSymbol llDInfoS, mlDInfoS, ofDInfoS; + ZSTD_seqSymbol* const llDInfo = &llDInfoS; + ZSTD_seqSymbol* const mlDInfo = &mlDInfoS; + ZSTD_seqSymbol* const ofDInfo = &ofDInfoS; + ZSTD_memcpy(llDInfo, seqState->stateLL.table + seqState->stateLL.state, sizeof(ZSTD_seqSymbol)); + ZSTD_memcpy(mlDInfo, seqState->stateML.table + seqState->stateML.state, sizeof(ZSTD_seqSymbol)); + ZSTD_memcpy(ofDInfo, seqState->stateOffb.table + seqState->stateOffb.state, sizeof(ZSTD_seqSymbol)); +#else + const ZSTD_seqSymbol* const llDInfo = seqState->stateLL.table + seqState->stateLL.state; + const ZSTD_seqSymbol* const mlDInfo = seqState->stateML.table + seqState->stateML.state; + const ZSTD_seqSymbol* const ofDInfo = seqState->stateOffb.table + seqState->stateOffb.state; +#endif + seq.matchLength = mlDInfo->baseValue; + seq.litLength = llDInfo->baseValue; + { U32 const ofBase = ofDInfo->baseValue; + BYTE const llBits = llDInfo->nbAdditionalBits; + BYTE const mlBits = mlDInfo->nbAdditionalBits; + BYTE const ofBits = ofDInfo->nbAdditionalBits; + BYTE const totalBits = llBits+mlBits+ofBits; + + U16 const llNext = llDInfo->nextState; + U16 const mlNext = mlDInfo->nextState; + U16 const ofNext = ofDInfo->nextState; + U32 const llnbBits = llDInfo->nbBits; + U32 const mlnbBits = mlDInfo->nbBits; + U32 const ofnbBits = ofDInfo->nbBits; + + assert(llBits <= MaxLLBits); + assert(mlBits <= MaxMLBits); + assert(ofBits <= MaxOff); + /* + * As gcc has better branch and block analyzers, sometimes it is only + * valuable to mark likeliness for clang, it gives around 3-4% of + * performance. + */ + + /* sequence */ + { size_t offset; + if (ofBits > 1) { + ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1); + ZSTD_STATIC_ASSERT(LONG_OFFSETS_MAX_EXTRA_BITS_32 == 5); + ZSTD_STATIC_ASSERT(STREAM_ACCUMULATOR_MIN_32 > LONG_OFFSETS_MAX_EXTRA_BITS_32); + ZSTD_STATIC_ASSERT(STREAM_ACCUMULATOR_MIN_32 - LONG_OFFSETS_MAX_EXTRA_BITS_32 >= MaxMLBits); + if (MEM_32bits() && longOffsets && (ofBits >= STREAM_ACCUMULATOR_MIN_32)) { + /* Always read extra bits, this keeps the logic simple, + * avoids branches, and avoids accidentally reading 0 bits. + */ + U32 const extraBits = LONG_OFFSETS_MAX_EXTRA_BITS_32; + offset = ofBase + (BIT_readBitsFast(&seqState->DStream, ofBits - extraBits) << extraBits); + BIT_reloadDStream(&seqState->DStream); + offset += BIT_readBitsFast(&seqState->DStream, extraBits); + } else { + offset = ofBase + BIT_readBitsFast(&seqState->DStream, ofBits/*>0*/); /* <= (ZSTD_WINDOWLOG_MAX-1) bits */ + if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); + } + seqState->prevOffset[2] = seqState->prevOffset[1]; + seqState->prevOffset[1] = seqState->prevOffset[0]; + seqState->prevOffset[0] = offset; + } else { + U32 const ll0 = (llDInfo->baseValue == 0); + if (LIKELY((ofBits == 0))) { + offset = seqState->prevOffset[ll0]; + seqState->prevOffset[1] = seqState->prevOffset[!ll0]; + seqState->prevOffset[0] = offset; + } else { + offset = ofBase + ll0 + BIT_readBitsFast(&seqState->DStream, 1); + { size_t temp = (offset==3) ? seqState->prevOffset[0] - 1 : seqState->prevOffset[offset]; + temp -= !temp; /* 0 is not valid: input corrupted => force offset to -1 => corruption detected at execSequence */ + if (offset != 1) seqState->prevOffset[2] = seqState->prevOffset[1]; + seqState->prevOffset[1] = seqState->prevOffset[0]; + seqState->prevOffset[0] = offset = temp; + } } } + seq.offset = offset; + } + + if (mlBits > 0) + seq.matchLength += BIT_readBitsFast(&seqState->DStream, mlBits/*>0*/); + + if (MEM_32bits() && (mlBits+llBits >= STREAM_ACCUMULATOR_MIN_32-LONG_OFFSETS_MAX_EXTRA_BITS_32)) + BIT_reloadDStream(&seqState->DStream); + if (MEM_64bits() && UNLIKELY(totalBits >= STREAM_ACCUMULATOR_MIN_64-(LLFSELog+MLFSELog+OffFSELog))) + BIT_reloadDStream(&seqState->DStream); + /* Ensure there are enough bits to read the rest of data in 64-bit mode. */ + ZSTD_STATIC_ASSERT(16+LLFSELog+MLFSELog+OffFSELog < STREAM_ACCUMULATOR_MIN_64); + + if (llBits > 0) + seq.litLength += BIT_readBitsFast(&seqState->DStream, llBits/*>0*/); + + if (MEM_32bits()) + BIT_reloadDStream(&seqState->DStream); + + DEBUGLOG(6, "seq: litL=%u, matchL=%u, offset=%u", + (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); + + if (!isLastSeq) { + /* don't update FSE state for last Sequence */ + ZSTD_updateFseStateWithDInfo(&seqState->stateLL, &seqState->DStream, llNext, llnbBits); /* <= 9 bits */ + ZSTD_updateFseStateWithDInfo(&seqState->stateML, &seqState->DStream, mlNext, mlnbBits); /* <= 9 bits */ + if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream); /* <= 18 bits */ + ZSTD_updateFseStateWithDInfo(&seqState->stateOffb, &seqState->DStream, ofNext, ofnbBits); /* <= 8 bits */ + BIT_reloadDStream(&seqState->DStream); + } + } + + return seq; +} + +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) +#if DEBUGLEVEL >= 1 +static int ZSTD_dictionaryIsActive(ZSTD_DCtx const* dctx, BYTE const* prefixStart, BYTE const* oLitEnd) +{ + size_t const windowSize = dctx->fParams.windowSize; + /* No dictionary used. */ + if (dctx->dictContentEndForFuzzing == NULL) return 0; + /* Dictionary is our prefix. */ + if (prefixStart == dctx->dictContentBeginForFuzzing) return 1; + /* Dictionary is not our ext-dict. */ + if (dctx->dictEnd != dctx->dictContentEndForFuzzing) return 0; + /* Dictionary is not within our window size. */ + if ((size_t)(oLitEnd - prefixStart) >= windowSize) return 0; + /* Dictionary is active. */ + return 1; +} +#endif + +static void ZSTD_assertValidSequence( + ZSTD_DCtx const* dctx, + BYTE const* op, BYTE const* oend, + seq_t const seq, + BYTE const* prefixStart, BYTE const* virtualStart) +{ +#if DEBUGLEVEL >= 1 + if (dctx->isFrameDecompression) { + size_t const windowSize = dctx->fParams.windowSize; + size_t const sequenceSize = seq.litLength + seq.matchLength; + BYTE const* const oLitEnd = op + seq.litLength; + DEBUGLOG(6, "Checking sequence: litL=%u matchL=%u offset=%u", + (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); + assert(op <= oend); + assert((size_t)(oend - op) >= sequenceSize); + assert(sequenceSize <= ZSTD_blockSizeMax(dctx)); + if (ZSTD_dictionaryIsActive(dctx, prefixStart, oLitEnd)) { + size_t const dictSize = (size_t)((char const*)dctx->dictContentEndForFuzzing - (char const*)dctx->dictContentBeginForFuzzing); + /* Offset must be within the dictionary. */ + assert(seq.offset <= (size_t)(oLitEnd - virtualStart)); + assert(seq.offset <= windowSize + dictSize); + } else { + /* Offset must be within our window. */ + assert(seq.offset <= windowSize); + } + } +#else + (void)dctx, (void)op, (void)oend, (void)seq, (void)prefixStart, (void)virtualStart; +#endif +} +#endif + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG + + +FORCE_INLINE_TEMPLATE size_t +DONT_VECTORIZE +ZSTD_decompressSequences_bodySplitLitBuffer( ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + const BYTE* ip = (const BYTE*)seqStart; + const BYTE* const iend = ip + seqSize; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = ZSTD_maybeNullPtrAdd(ostart, maxDstSize); + BYTE* op = ostart; + const BYTE* litPtr = dctx->litPtr; + const BYTE* litBufferEnd = dctx->litBufferEnd; + const BYTE* const prefixStart = (const BYTE*) (dctx->prefixStart); + const BYTE* const vBase = (const BYTE*) (dctx->virtualStart); + const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd); + DEBUGLOG(5, "ZSTD_decompressSequences_bodySplitLitBuffer (%i seqs)", nbSeq); + + /* Literals are split between internal buffer & output buffer */ + if (nbSeq) { + seqState_t seqState; + dctx->fseEntropy = 1; + { U32 i; for (i=0; ientropy.rep[i]; } + RETURN_ERROR_IF( + ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend-ip)), + corruption_detected, ""); + ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); + ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); + ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); + assert(dst != NULL); + + ZSTD_STATIC_ASSERT( + BIT_DStream_unfinished < BIT_DStream_completed && + BIT_DStream_endOfBuffer < BIT_DStream_completed && + BIT_DStream_completed < BIT_DStream_overflow); + + /* decompress without overrunning litPtr begins */ + { seq_t sequence = {0,0,0}; /* some static analyzer believe that @sequence is not initialized (it necessarily is, since for(;;) loop as at least one iteration) */ + /* Align the decompression loop to 32 + 16 bytes. + * + * zstd compiled with gcc-9 on an Intel i9-9900k shows 10% decompression + * speed swings based on the alignment of the decompression loop. This + * performance swing is caused by parts of the decompression loop falling + * out of the DSB. The entire decompression loop should fit in the DSB, + * when it can't we get much worse performance. You can measure if you've + * hit the good case or the bad case with this perf command for some + * compressed file test.zst: + * + * perf stat -e cycles -e instructions -e idq.all_dsb_cycles_any_uops \ + * -e idq.all_mite_cycles_any_uops -- ./zstd -tq test.zst + * + * If you see most cycles served out of the MITE you've hit the bad case. + * If you see most cycles served out of the DSB you've hit the good case. + * If it is pretty even then you may be in an okay case. + * + * This issue has been reproduced on the following CPUs: + * - Kabylake: Macbook Pro (15-inch, 2019) 2.4 GHz Intel Core i9 + * Use Instruments->Counters to get DSB/MITE cycles. + * I never got performance swings, but I was able to + * go from the good case of mostly DSB to half of the + * cycles served from MITE. + * - Coffeelake: Intel i9-9900k + * - Coffeelake: Intel i7-9700k + * + * I haven't been able to reproduce the instability or DSB misses on any + * of the following CPUS: + * - Haswell + * - Broadwell: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GH + * - Skylake + * + * Alignment is done for each of the three major decompression loops: + * - ZSTD_decompressSequences_bodySplitLitBuffer - presplit section of the literal buffer + * - ZSTD_decompressSequences_bodySplitLitBuffer - postsplit section of the literal buffer + * - ZSTD_decompressSequences_body + * Alignment choices are made to minimize large swings on bad cases and influence on performance + * from changes external to this code, rather than to overoptimize on the current commit. + * + * If you are seeing performance stability this script can help test. + * It tests on 4 commits in zstd where I saw performance change. + * + * https://gist.github.com/terrelln/9889fc06a423fd5ca6e99351564473f4 + */ +#if defined(__GNUC__) && defined(__x86_64__) + __asm__(".p2align 6"); +# if __GNUC__ >= 7 + /* good for gcc-7, gcc-9, and gcc-11 */ + __asm__("nop"); + __asm__(".p2align 5"); + __asm__("nop"); + __asm__(".p2align 4"); +# if __GNUC__ == 8 || __GNUC__ == 10 + /* good for gcc-8 and gcc-10 */ + __asm__("nop"); + __asm__(".p2align 3"); +# endif +# endif +#endif + + /* Handle the initial state where litBuffer is currently split between dst and litExtraBuffer */ + for ( ; nbSeq; nbSeq--) { + sequence = ZSTD_decodeSequence(&seqState, isLongOffset, nbSeq==1); + if (litPtr + sequence.litLength > dctx->litBufferEnd) break; + { size_t const oneSeqSize = ZSTD_execSequenceSplitLitBuffer(op, oend, litPtr + sequence.litLength - WILDCOPY_OVERLENGTH, sequence, &litPtr, litBufferEnd, prefixStart, vBase, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); +#endif + if (UNLIKELY(ZSTD_isError(oneSeqSize))) + return oneSeqSize; + DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); + op += oneSeqSize; + } } + DEBUGLOG(6, "reached: (litPtr + sequence.litLength > dctx->litBufferEnd)"); + + /* If there are more sequences, they will need to read literals from litExtraBuffer; copy over the remainder from dst and update litPtr and litEnd */ + if (nbSeq > 0) { + const size_t leftoverLit = dctx->litBufferEnd - litPtr; + DEBUGLOG(6, "There are %i sequences left, and %zu/%zu literals left in buffer", nbSeq, leftoverLit, sequence.litLength); + if (leftoverLit) { + RETURN_ERROR_IF(leftoverLit > (size_t)(oend - op), dstSize_tooSmall, "remaining lit must fit within dstBuffer"); + ZSTD_safecopyDstBeforeSrc(op, litPtr, leftoverLit); + sequence.litLength -= leftoverLit; + op += leftoverLit; + } + litPtr = dctx->litExtraBuffer; + litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; + dctx->litBufferLocation = ZSTD_not_in_dst; + { size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litBufferEnd, prefixStart, vBase, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); +#endif + if (UNLIKELY(ZSTD_isError(oneSeqSize))) + return oneSeqSize; + DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); + op += oneSeqSize; + } + nbSeq--; + } + } + + if (nbSeq > 0) { + /* there is remaining lit from extra buffer */ + +#if defined(__GNUC__) && defined(__x86_64__) + __asm__(".p2align 6"); + __asm__("nop"); +# if __GNUC__ != 7 + /* worse for gcc-7 better for gcc-8, gcc-9, and gcc-10 and clang */ + __asm__(".p2align 4"); + __asm__("nop"); + __asm__(".p2align 3"); +# elif __GNUC__ >= 11 + __asm__(".p2align 3"); +# else + __asm__(".p2align 5"); + __asm__("nop"); + __asm__(".p2align 3"); +# endif +#endif + + for ( ; nbSeq ; nbSeq--) { + seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset, nbSeq==1); + size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litBufferEnd, prefixStart, vBase, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); +#endif + if (UNLIKELY(ZSTD_isError(oneSeqSize))) + return oneSeqSize; + DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); + op += oneSeqSize; + } + } + + /* check if reached exact end */ + DEBUGLOG(5, "ZSTD_decompressSequences_bodySplitLitBuffer: after decode loop, remaining nbSeq : %i", nbSeq); + RETURN_ERROR_IF(nbSeq, corruption_detected, ""); + DEBUGLOG(5, "bitStream : start=%p, ptr=%p, bitsConsumed=%u", seqState.DStream.start, seqState.DStream.ptr, seqState.DStream.bitsConsumed); + RETURN_ERROR_IF(!BIT_endOfDStream(&seqState.DStream), corruption_detected, ""); + /* save reps for next block */ + { U32 i; for (i=0; ientropy.rep[i] = (U32)(seqState.prevOffset[i]); } + } + + /* last literal segment */ + if (dctx->litBufferLocation == ZSTD_split) { + /* split hasn't been reached yet, first get dst then copy litExtraBuffer */ + size_t const lastLLSize = (size_t)(litBufferEnd - litPtr); + DEBUGLOG(6, "copy last literals from segment : %u", (U32)lastLLSize); + RETURN_ERROR_IF(lastLLSize > (size_t)(oend - op), dstSize_tooSmall, ""); + if (op != NULL) { + ZSTD_memmove(op, litPtr, lastLLSize); + op += lastLLSize; + } + litPtr = dctx->litExtraBuffer; + litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; + dctx->litBufferLocation = ZSTD_not_in_dst; + } + /* copy last literals from internal buffer */ + { size_t const lastLLSize = (size_t)(litBufferEnd - litPtr); + DEBUGLOG(6, "copy last literals from internal buffer : %u", (U32)lastLLSize); + RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); + if (op != NULL) { + ZSTD_memcpy(op, litPtr, lastLLSize); + op += lastLLSize; + } } + + DEBUGLOG(6, "decoded block of size %u bytes", (U32)(op - ostart)); + return (size_t)(op - ostart); +} + +FORCE_INLINE_TEMPLATE size_t +DONT_VECTORIZE +ZSTD_decompressSequences_body(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + const BYTE* ip = (const BYTE*)seqStart; + const BYTE* const iend = ip + seqSize; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = dctx->litBufferLocation == ZSTD_not_in_dst ? ZSTD_maybeNullPtrAdd(ostart, maxDstSize) : dctx->litBuffer; + BYTE* op = ostart; + const BYTE* litPtr = dctx->litPtr; + const BYTE* const litEnd = litPtr + dctx->litSize; + const BYTE* const prefixStart = (const BYTE*)(dctx->prefixStart); + const BYTE* const vBase = (const BYTE*)(dctx->virtualStart); + const BYTE* const dictEnd = (const BYTE*)(dctx->dictEnd); + DEBUGLOG(5, "ZSTD_decompressSequences_body: nbSeq = %d", nbSeq); + + /* Regen sequences */ + if (nbSeq) { + seqState_t seqState; + dctx->fseEntropy = 1; + { U32 i; for (i = 0; i < ZSTD_REP_NUM; i++) seqState.prevOffset[i] = dctx->entropy.rep[i]; } + RETURN_ERROR_IF( + ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend - ip)), + corruption_detected, ""); + ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); + ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); + ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); + assert(dst != NULL); + +#if defined(__GNUC__) && defined(__x86_64__) + __asm__(".p2align 6"); + __asm__("nop"); +# if __GNUC__ >= 7 + __asm__(".p2align 5"); + __asm__("nop"); + __asm__(".p2align 3"); +# else + __asm__(".p2align 4"); + __asm__("nop"); + __asm__(".p2align 3"); +# endif +#endif + + for ( ; nbSeq ; nbSeq--) { + seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset, nbSeq==1); + size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litEnd, prefixStart, vBase, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequence, prefixStart, vBase); +#endif + if (UNLIKELY(ZSTD_isError(oneSeqSize))) + return oneSeqSize; + DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize); + op += oneSeqSize; + } + + /* check if reached exact end */ + assert(nbSeq == 0); + RETURN_ERROR_IF(!BIT_endOfDStream(&seqState.DStream), corruption_detected, ""); + /* save reps for next block */ + { U32 i; for (i=0; ientropy.rep[i] = (U32)(seqState.prevOffset[i]); } + } + + /* last literal segment */ + { size_t const lastLLSize = (size_t)(litEnd - litPtr); + DEBUGLOG(6, "copy last literals : %u", (U32)lastLLSize); + RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); + if (op != NULL) { + ZSTD_memcpy(op, litPtr, lastLLSize); + op += lastLLSize; + } } + + DEBUGLOG(6, "decoded block of size %u bytes", (U32)(op - ostart)); + return (size_t)(op - ostart); +} + +static size_t +ZSTD_decompressSequences_default(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} + +static size_t +ZSTD_decompressSequencesSplitLitBuffer_default(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + return ZSTD_decompressSequences_bodySplitLitBuffer(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT + +FORCE_INLINE_TEMPLATE + +size_t ZSTD_prefetchMatch(size_t prefetchPos, seq_t const sequence, + const BYTE* const prefixStart, const BYTE* const dictEnd) +{ + prefetchPos += sequence.litLength; + { const BYTE* const matchBase = (sequence.offset > prefetchPos) ? dictEnd : prefixStart; + /* note : this operation can overflow when seq.offset is really too large, which can only happen when input is corrupted. + * No consequence though : memory address is only used for prefetching, not for dereferencing */ + const BYTE* const match = ZSTD_wrappedPtrSub(ZSTD_wrappedPtrAdd(matchBase, prefetchPos), sequence.offset); + PREFETCH_L1(match); PREFETCH_L1(match+CACHELINE_SIZE); /* note : it's safe to invoke PREFETCH() on any memory address, including invalid ones */ + } + return prefetchPos + sequence.matchLength; +} + +/* This decoding function employs prefetching + * to reduce latency impact of cache misses. + * It's generally employed when block contains a significant portion of long-distance matches + * or when coupled with a "cold" dictionary */ +FORCE_INLINE_TEMPLATE size_t +ZSTD_decompressSequencesLong_body( + ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + const BYTE* ip = (const BYTE*)seqStart; + const BYTE* const iend = ip + seqSize; + BYTE* const ostart = (BYTE*)dst; + BYTE* const oend = dctx->litBufferLocation == ZSTD_in_dst ? dctx->litBuffer : ZSTD_maybeNullPtrAdd(ostart, maxDstSize); + BYTE* op = ostart; + const BYTE* litPtr = dctx->litPtr; + const BYTE* litBufferEnd = dctx->litBufferEnd; + const BYTE* const prefixStart = (const BYTE*) (dctx->prefixStart); + const BYTE* const dictStart = (const BYTE*) (dctx->virtualStart); + const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd); + + /* Regen sequences */ + if (nbSeq) { +#define STORED_SEQS 8 +#define STORED_SEQS_MASK (STORED_SEQS-1) +#define ADVANCED_SEQS STORED_SEQS + seq_t sequences[STORED_SEQS]; + int const seqAdvance = MIN(nbSeq, ADVANCED_SEQS); + seqState_t seqState; + int seqNb; + size_t prefetchPos = (size_t)(op-prefixStart); /* track position relative to prefixStart */ + + dctx->fseEntropy = 1; + { int i; for (i=0; ientropy.rep[i]; } + assert(dst != NULL); + assert(iend >= ip); + RETURN_ERROR_IF( + ERR_isError(BIT_initDStream(&seqState.DStream, ip, iend-ip)), + corruption_detected, ""); + ZSTD_initFseState(&seqState.stateLL, &seqState.DStream, dctx->LLTptr); + ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr); + ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr); + + /* prepare in advance */ + for (seqNb=0; seqNblitBufferLocation == ZSTD_split && litPtr + sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK].litLength > dctx->litBufferEnd) { + /* lit buffer is reaching split point, empty out the first buffer and transition to litExtraBuffer */ + const size_t leftoverLit = dctx->litBufferEnd - litPtr; + if (leftoverLit) + { + RETURN_ERROR_IF(leftoverLit > (size_t)(oend - op), dstSize_tooSmall, "remaining lit must fit within dstBuffer"); + ZSTD_safecopyDstBeforeSrc(op, litPtr, leftoverLit); + sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK].litLength -= leftoverLit; + op += leftoverLit; + } + litPtr = dctx->litExtraBuffer; + litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; + dctx->litBufferLocation = ZSTD_not_in_dst; + { size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], prefixStart, dictStart); +#endif + if (ZSTD_isError(oneSeqSize)) return oneSeqSize; + + prefetchPos = ZSTD_prefetchMatch(prefetchPos, sequence, prefixStart, dictEnd); + sequences[seqNb & STORED_SEQS_MASK] = sequence; + op += oneSeqSize; + } } + else + { + /* lit buffer is either wholly contained in first or second split, or not split at all*/ + size_t const oneSeqSize = dctx->litBufferLocation == ZSTD_split ? + ZSTD_execSequenceSplitLitBuffer(op, oend, litPtr + sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK].litLength - WILDCOPY_OVERLENGTH, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd) : + ZSTD_execSequence(op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequences[(seqNb - ADVANCED_SEQS) & STORED_SEQS_MASK], prefixStart, dictStart); +#endif + if (ZSTD_isError(oneSeqSize)) return oneSeqSize; + + prefetchPos = ZSTD_prefetchMatch(prefetchPos, sequence, prefixStart, dictEnd); + sequences[seqNb & STORED_SEQS_MASK] = sequence; + op += oneSeqSize; + } + } + RETURN_ERROR_IF(!BIT_endOfDStream(&seqState.DStream), corruption_detected, ""); + + /* finish queue */ + seqNb -= seqAdvance; + for ( ; seqNblitBufferLocation == ZSTD_split && litPtr + sequence->litLength > dctx->litBufferEnd) { + const size_t leftoverLit = dctx->litBufferEnd - litPtr; + if (leftoverLit) { + RETURN_ERROR_IF(leftoverLit > (size_t)(oend - op), dstSize_tooSmall, "remaining lit must fit within dstBuffer"); + ZSTD_safecopyDstBeforeSrc(op, litPtr, leftoverLit); + sequence->litLength -= leftoverLit; + op += leftoverLit; + } + litPtr = dctx->litExtraBuffer; + litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; + dctx->litBufferLocation = ZSTD_not_in_dst; + { size_t const oneSeqSize = ZSTD_execSequence(op, oend, *sequence, &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequences[seqNb&STORED_SEQS_MASK], prefixStart, dictStart); +#endif + if (ZSTD_isError(oneSeqSize)) return oneSeqSize; + op += oneSeqSize; + } + } + else + { + size_t const oneSeqSize = dctx->litBufferLocation == ZSTD_split ? + ZSTD_execSequenceSplitLitBuffer(op, oend, litPtr + sequence->litLength - WILDCOPY_OVERLENGTH, *sequence, &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd) : + ZSTD_execSequence(op, oend, *sequence, &litPtr, litBufferEnd, prefixStart, dictStart, dictEnd); +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE) + assert(!ZSTD_isError(oneSeqSize)); + ZSTD_assertValidSequence(dctx, op, oend, sequences[seqNb&STORED_SEQS_MASK], prefixStart, dictStart); +#endif + if (ZSTD_isError(oneSeqSize)) return oneSeqSize; + op += oneSeqSize; + } + } + + /* save reps for next block */ + { U32 i; for (i=0; ientropy.rep[i] = (U32)(seqState.prevOffset[i]); } + } + + /* last literal segment */ + if (dctx->litBufferLocation == ZSTD_split) { /* first deplete literal buffer in dst, then copy litExtraBuffer */ + size_t const lastLLSize = litBufferEnd - litPtr; + RETURN_ERROR_IF(lastLLSize > (size_t)(oend - op), dstSize_tooSmall, ""); + if (op != NULL) { + ZSTD_memmove(op, litPtr, lastLLSize); + op += lastLLSize; + } + litPtr = dctx->litExtraBuffer; + litBufferEnd = dctx->litExtraBuffer + ZSTD_LITBUFFEREXTRASIZE; + } + { size_t const lastLLSize = litBufferEnd - litPtr; + RETURN_ERROR_IF(lastLLSize > (size_t)(oend-op), dstSize_tooSmall, ""); + if (op != NULL) { + ZSTD_memmove(op, litPtr, lastLLSize); + op += lastLLSize; + } + } + + return (size_t)(op - ostart); +} + +static size_t +ZSTD_decompressSequencesLong_default(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ + + + +#if DYNAMIC_BMI2 + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG +static BMI2_TARGET_ATTRIBUTE size_t +DONT_VECTORIZE +ZSTD_decompressSequences_bmi2(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + return ZSTD_decompressSequences_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +static BMI2_TARGET_ATTRIBUTE size_t +DONT_VECTORIZE +ZSTD_decompressSequencesSplitLitBuffer_bmi2(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + return ZSTD_decompressSequences_bodySplitLitBuffer(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT +static BMI2_TARGET_ATTRIBUTE size_t +ZSTD_decompressSequencesLong_bmi2(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + return ZSTD_decompressSequencesLong_body(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ + +#endif /* DYNAMIC_BMI2 */ + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG +static size_t +ZSTD_decompressSequences(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + DEBUGLOG(5, "ZSTD_decompressSequences"); +#if DYNAMIC_BMI2 + if (ZSTD_DCtx_get_bmi2(dctx)) { + return ZSTD_decompressSequences_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + } +#endif + return ZSTD_decompressSequences_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +static size_t +ZSTD_decompressSequencesSplitLitBuffer(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + DEBUGLOG(5, "ZSTD_decompressSequencesSplitLitBuffer"); +#if DYNAMIC_BMI2 + if (ZSTD_DCtx_get_bmi2(dctx)) { + return ZSTD_decompressSequencesSplitLitBuffer_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + } +#endif + return ZSTD_decompressSequencesSplitLitBuffer_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG */ + + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT +/* ZSTD_decompressSequencesLong() : + * decompression function triggered when a minimum share of offsets is considered "long", + * aka out of cache. + * note : "long" definition seems overloaded here, sometimes meaning "wider than bitstream register", and sometimes meaning "farther than memory cache distance". + * This function will try to mitigate main memory latency through the use of prefetching */ +static size_t +ZSTD_decompressSequencesLong(ZSTD_DCtx* dctx, + void* dst, size_t maxDstSize, + const void* seqStart, size_t seqSize, int nbSeq, + const ZSTD_longOffset_e isLongOffset) +{ + DEBUGLOG(5, "ZSTD_decompressSequencesLong"); +#if DYNAMIC_BMI2 + if (ZSTD_DCtx_get_bmi2(dctx)) { + return ZSTD_decompressSequencesLong_bmi2(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); + } +#endif + return ZSTD_decompressSequencesLong_default(dctx, dst, maxDstSize, seqStart, seqSize, nbSeq, isLongOffset); +} +#endif /* ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT */ + + +/** + * @returns The total size of the history referenceable by zstd, including + * both the prefix and the extDict. At @p op any offset larger than this + * is invalid. + */ +static size_t ZSTD_totalHistorySize(BYTE* op, BYTE const* virtualStart) +{ + return (size_t)(op - virtualStart); +} + +typedef struct { + unsigned longOffsetShare; + unsigned maxNbAdditionalBits; +} ZSTD_OffsetInfo; + +/* ZSTD_getOffsetInfo() : + * condition : offTable must be valid + * @return : "share" of long offsets (arbitrarily defined as > (1<<23)) + * compared to maximum possible of (1< 22) info.longOffsetShare += 1; + } + + assert(tableLog <= OffFSELog); + info.longOffsetShare <<= (OffFSELog - tableLog); /* scale to OffFSELog */ + } + + return info; +} + +/** + * @returns The maximum offset we can decode in one read of our bitstream, without + * reloading more bits in the middle of the offset bits read. Any offsets larger + * than this must use the long offset decoder. + */ +static size_t ZSTD_maxShortOffset(void) +{ + if (MEM_64bits()) { + /* We can decode any offset without reloading bits. + * This might change if the max window size grows. + */ + ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX <= 31); + return (size_t)-1; + } else { + /* The maximum offBase is (1 << (STREAM_ACCUMULATOR_MIN + 1)) - 1. + * This offBase would require STREAM_ACCUMULATOR_MIN extra bits. + * Then we have to subtract ZSTD_REP_NUM to get the maximum possible offset. + */ + size_t const maxOffbase = ((size_t)1 << (STREAM_ACCUMULATOR_MIN + 1)) - 1; + size_t const maxOffset = maxOffbase - ZSTD_REP_NUM; + assert(ZSTD_highbit32((U32)maxOffbase) == STREAM_ACCUMULATOR_MIN); + return maxOffset; + } +} + +size_t +ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, const streaming_operation streaming) +{ /* blockType == blockCompressed */ + const BYTE* ip = (const BYTE*)src; + DEBUGLOG(5, "ZSTD_decompressBlock_internal (cSize : %u)", (unsigned)srcSize); + + /* Note : the wording of the specification + * allows compressed block to be sized exactly ZSTD_blockSizeMax(dctx). + * This generally does not happen, as it makes little sense, + * since an uncompressed block would feature same size and have no decompression cost. + * Also, note that decoder from reference libzstd before < v1.5.4 + * would consider this edge case as an error. + * As a consequence, avoid generating compressed blocks of size ZSTD_blockSizeMax(dctx) + * for broader compatibility with the deployed ecosystem of zstd decoders */ + RETURN_ERROR_IF(srcSize > ZSTD_blockSizeMax(dctx), srcSize_wrong, ""); + + /* Decode literals section */ + { size_t const litCSize = ZSTD_decodeLiteralsBlock(dctx, src, srcSize, dst, dstCapacity, streaming); + DEBUGLOG(5, "ZSTD_decodeLiteralsBlock : cSize=%u, nbLiterals=%zu", (U32)litCSize, dctx->litSize); + if (ZSTD_isError(litCSize)) return litCSize; + ip += litCSize; + srcSize -= litCSize; + } + + /* Build Decoding Tables */ + { + /* Compute the maximum block size, which must also work when !frame and fParams are unset. + * Additionally, take the min with dstCapacity to ensure that the totalHistorySize fits in a size_t. + */ + size_t const blockSizeMax = MIN(dstCapacity, ZSTD_blockSizeMax(dctx)); + size_t const totalHistorySize = ZSTD_totalHistorySize(ZSTD_maybeNullPtrAdd((BYTE*)dst, blockSizeMax), (BYTE const*)dctx->virtualStart); + /* isLongOffset must be true if there are long offsets. + * Offsets are long if they are larger than ZSTD_maxShortOffset(). + * We don't expect that to be the case in 64-bit mode. + * + * We check here to see if our history is large enough to allow long offsets. + * If it isn't, then we can't possible have (valid) long offsets. If the offset + * is invalid, then it is okay to read it incorrectly. + * + * If isLongOffsets is true, then we will later check our decoding table to see + * if it is even possible to generate long offsets. + */ + ZSTD_longOffset_e isLongOffset = (ZSTD_longOffset_e)(MEM_32bits() && (totalHistorySize > ZSTD_maxShortOffset())); + /* These macros control at build-time which decompressor implementation + * we use. If neither is defined, we do some inspection and dispatch at + * runtime. + */ +#if !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ + !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) + int usePrefetchDecoder = dctx->ddictIsCold; +#else + /* Set to 1 to avoid computing offset info if we don't need to. + * Otherwise this value is ignored. + */ + int usePrefetchDecoder = 1; +#endif + int nbSeq; + size_t const seqHSize = ZSTD_decodeSeqHeaders(dctx, &nbSeq, ip, srcSize); + if (ZSTD_isError(seqHSize)) return seqHSize; + ip += seqHSize; + srcSize -= seqHSize; + + RETURN_ERROR_IF((dst == NULL || dstCapacity == 0) && nbSeq > 0, dstSize_tooSmall, "NULL not handled"); + RETURN_ERROR_IF(MEM_64bits() && sizeof(size_t) == sizeof(void*) && (size_t)(-1) - (size_t)dst < (size_t)(1 << 20), dstSize_tooSmall, + "invalid dst"); + + /* If we could potentially have long offsets, or we might want to use the prefetch decoder, + * compute information about the share of long offsets, and the maximum nbAdditionalBits. + * NOTE: could probably use a larger nbSeq limit + */ + if (isLongOffset || (!usePrefetchDecoder && (totalHistorySize > (1u << 24)) && (nbSeq > 8))) { + ZSTD_OffsetInfo const info = ZSTD_getOffsetInfo(dctx->OFTptr, nbSeq); + if (isLongOffset && info.maxNbAdditionalBits <= STREAM_ACCUMULATOR_MIN) { + /* If isLongOffset, but the maximum number of additional bits that we see in our table is small + * enough, then we know it is impossible to have too long an offset in this block, so we can + * use the regular offset decoder. + */ + isLongOffset = ZSTD_lo_isRegularOffset; + } + if (!usePrefetchDecoder) { + U32 const minShare = MEM_64bits() ? 7 : 20; /* heuristic values, correspond to 2.73% and 7.81% */ + usePrefetchDecoder = (info.longOffsetShare >= minShare); + } + } + + dctx->ddictIsCold = 0; + +#if !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ + !defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) + if (usePrefetchDecoder) { +#else + (void)usePrefetchDecoder; + { +#endif +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT + return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); +#endif + } + +#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG + /* else */ + if (dctx->litBufferLocation == ZSTD_split) + return ZSTD_decompressSequencesSplitLitBuffer(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); + else + return ZSTD_decompressSequences(dctx, dst, dstCapacity, ip, srcSize, nbSeq, isLongOffset); +#endif + } +} + + +ZSTD_ALLOW_POINTER_OVERFLOW_ATTR +void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst, size_t dstSize) +{ + if (dst != dctx->previousDstEnd && dstSize > 0) { /* not contiguous */ + dctx->dictEnd = dctx->previousDstEnd; + dctx->virtualStart = (const char*)dst - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->prefixStart)); + dctx->prefixStart = dst; + dctx->previousDstEnd = dst; + } +} + + +size_t ZSTD_decompressBlock_deprecated(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + size_t dSize; + dctx->isFrameDecompression = 0; + ZSTD_checkContinuity(dctx, dst, dstCapacity); + dSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, not_streaming); + FORWARD_IF_ERROR(dSize, ""); + dctx->previousDstEnd = (char*)dst + dSize; + return dSize; +} + + +/* NOTE: Must just wrap ZSTD_decompressBlock_deprecated() */ +size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize) +{ + return ZSTD_decompressBlock_deprecated(dctx, dst, dstCapacity, src, srcSize); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.h b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.h new file mode 100644 index 0000000000..ab152404ba --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_block.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +#ifndef ZSTD_DEC_BLOCK_H +#define ZSTD_DEC_BLOCK_H + +/*-******************************************************* + * Dependencies + *********************************************************/ +#include "../common/zstd_deps.h" /* size_t */ +#include "../zstd.h" /* DCtx, and some public functions */ +#include "../common/zstd_internal.h" /* blockProperties_t, and some public functions */ +#include "zstd_decompress_internal.h" /* ZSTD_seqSymbol */ + + +/* === Prototypes === */ + +/* note: prototypes already published within `zstd.h` : + * ZSTD_decompressBlock() + */ + +/* note: prototypes already published within `zstd_internal.h` : + * ZSTD_getcBlockSize() + * ZSTD_decodeSeqHeaders() + */ + + + /* Streaming state is used to inform allocation of the literal buffer */ +typedef enum { + not_streaming = 0, + is_streaming = 1 +} streaming_operation; + +/* ZSTD_decompressBlock_internal() : + * decompress block, starting at `src`, + * into destination buffer `dst`. + * @return : decompressed block size, + * or an error code (which can be tested using ZSTD_isError()) + */ +size_t ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize, const streaming_operation streaming); + +/* ZSTD_buildFSETable() : + * generate FSE decoding table for one symbol (ll, ml or off) + * this function must be called with valid parameters only + * (dt is large enough, normalizedCounter distribution total is a power of 2, max is within range, etc.) + * in which case it cannot fail. + * The workspace must be 4-byte aligned and at least ZSTD_BUILD_FSE_TABLE_WKSP_SIZE bytes, which is + * defined in zstd_decompress_internal.h. + * Internal use only. + */ +void ZSTD_buildFSETable(ZSTD_seqSymbol* dt, + const short* normalizedCounter, unsigned maxSymbolValue, + const U32* baseValue, const U8* nbAdditionalBits, + unsigned tableLog, void* wksp, size_t wkspSize, + int bmi2); + +/* Internal definition of ZSTD_decompressBlock() to avoid deprecation warnings. */ +size_t ZSTD_decompressBlock_deprecated(ZSTD_DCtx* dctx, + void* dst, size_t dstCapacity, + const void* src, size_t srcSize); + + +#endif /* ZSTD_DEC_BLOCK_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_internal.h b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_internal.h new file mode 100644 index 0000000000..e4bffdbc6c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/decompress/zstd_decompress_internal.h @@ -0,0 +1,240 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/* zstd_decompress_internal: + * objects and definitions shared within lib/decompress modules */ + + #ifndef ZSTD_DECOMPRESS_INTERNAL_H + #define ZSTD_DECOMPRESS_INTERNAL_H + + +/*-******************************************************* + * Dependencies + *********************************************************/ +#include "../common/mem.h" /* BYTE, U16, U32 */ +#include "../common/zstd_internal.h" /* constants : MaxLL, MaxML, MaxOff, LLFSELog, etc. */ + + + +/*-******************************************************* + * Constants + *********************************************************/ +static UNUSED_ATTR const U32 LL_base[MaxLL+1] = { + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 18, 20, 22, 24, 28, 32, 40, + 48, 64, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, + 0x2000, 0x4000, 0x8000, 0x10000 }; + +static UNUSED_ATTR const U32 OF_base[MaxOff+1] = { + 0, 1, 1, 5, 0xD, 0x1D, 0x3D, 0x7D, + 0xFD, 0x1FD, 0x3FD, 0x7FD, 0xFFD, 0x1FFD, 0x3FFD, 0x7FFD, + 0xFFFD, 0x1FFFD, 0x3FFFD, 0x7FFFD, 0xFFFFD, 0x1FFFFD, 0x3FFFFD, 0x7FFFFD, + 0xFFFFFD, 0x1FFFFFD, 0x3FFFFFD, 0x7FFFFFD, 0xFFFFFFD, 0x1FFFFFFD, 0x3FFFFFFD, 0x7FFFFFFD }; + +static UNUSED_ATTR const U8 OF_bits[MaxOff+1] = { + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31 }; + +static UNUSED_ATTR const U32 ML_base[MaxML+1] = { + 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, + 35, 37, 39, 41, 43, 47, 51, 59, + 67, 83, 99, 0x83, 0x103, 0x203, 0x403, 0x803, + 0x1003, 0x2003, 0x4003, 0x8003, 0x10003 }; + + +/*-******************************************************* + * Decompression types + *********************************************************/ + typedef struct { + U32 fastMode; + U32 tableLog; + } ZSTD_seqSymbol_header; + + typedef struct { + U16 nextState; + BYTE nbAdditionalBits; + BYTE nbBits; + U32 baseValue; + } ZSTD_seqSymbol; + + #define SEQSYMBOL_TABLE_SIZE(log) (1 + (1 << (log))) + +#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE (sizeof(S16) * (MaxSeq + 1) + (1u << MaxFSELog) + sizeof(U64)) +#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32 ((ZSTD_BUILD_FSE_TABLE_WKSP_SIZE + sizeof(U32) - 1) / sizeof(U32)) +#define ZSTD_HUFFDTABLE_CAPACITY_LOG 12 + +typedef struct { + ZSTD_seqSymbol LLTable[SEQSYMBOL_TABLE_SIZE(LLFSELog)]; /* Note : Space reserved for FSE Tables */ + ZSTD_seqSymbol OFTable[SEQSYMBOL_TABLE_SIZE(OffFSELog)]; /* is also used as temporary workspace while building hufTable during DDict creation */ + ZSTD_seqSymbol MLTable[SEQSYMBOL_TABLE_SIZE(MLFSELog)]; /* and therefore must be at least HUF_DECOMPRESS_WORKSPACE_SIZE large */ + HUF_DTable hufTable[HUF_DTABLE_SIZE(ZSTD_HUFFDTABLE_CAPACITY_LOG)]; /* can accommodate HUF_decompress4X */ + U32 rep[ZSTD_REP_NUM]; + U32 workspace[ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32]; +} ZSTD_entropyDTables_t; + +typedef enum { ZSTDds_getFrameHeaderSize, ZSTDds_decodeFrameHeader, + ZSTDds_decodeBlockHeader, ZSTDds_decompressBlock, + ZSTDds_decompressLastBlock, ZSTDds_checkChecksum, + ZSTDds_decodeSkippableHeader, ZSTDds_skipFrame } ZSTD_dStage; + +typedef enum { zdss_init=0, zdss_loadHeader, + zdss_read, zdss_load, zdss_flush } ZSTD_dStreamStage; + +typedef enum { + ZSTD_use_indefinitely = -1, /* Use the dictionary indefinitely */ + ZSTD_dont_use = 0, /* Do not use the dictionary (if one exists free it) */ + ZSTD_use_once = 1 /* Use the dictionary once and set to ZSTD_dont_use */ +} ZSTD_dictUses_e; + +/* Hashset for storing references to multiple ZSTD_DDict within ZSTD_DCtx */ +typedef struct { + const ZSTD_DDict** ddictPtrTable; + size_t ddictPtrTableSize; + size_t ddictPtrCount; +} ZSTD_DDictHashSet; + +#ifndef ZSTD_DECODER_INTERNAL_BUFFER +# define ZSTD_DECODER_INTERNAL_BUFFER (1 << 16) +#endif + +#define ZSTD_LBMIN 64 +#define ZSTD_LBMAX (128 << 10) + +/* extra buffer, compensates when dst is not large enough to store litBuffer */ +#define ZSTD_LITBUFFEREXTRASIZE BOUNDED(ZSTD_LBMIN, ZSTD_DECODER_INTERNAL_BUFFER, ZSTD_LBMAX) + +typedef enum { + ZSTD_not_in_dst = 0, /* Stored entirely within litExtraBuffer */ + ZSTD_in_dst = 1, /* Stored entirely within dst (in memory after current output write) */ + ZSTD_split = 2 /* Split between litExtraBuffer and dst */ +} ZSTD_litLocation_e; + +struct ZSTD_DCtx_s +{ + const ZSTD_seqSymbol* LLTptr; + const ZSTD_seqSymbol* MLTptr; + const ZSTD_seqSymbol* OFTptr; + const HUF_DTable* HUFptr; + ZSTD_entropyDTables_t entropy; + U32 workspace[HUF_DECOMPRESS_WORKSPACE_SIZE_U32]; /* space needed when building huffman tables */ + const void* previousDstEnd; /* detect continuity */ + const void* prefixStart; /* start of current segment */ + const void* virtualStart; /* virtual start of previous segment if it was just before current one */ + const void* dictEnd; /* end of previous segment */ + size_t expected; + ZSTD_FrameHeader fParams; + U64 processedCSize; + U64 decodedSize; + blockType_e bType; /* used in ZSTD_decompressContinue(), store blockType between block header decoding and block decompression stages */ + ZSTD_dStage stage; + U32 litEntropy; + U32 fseEntropy; + XXH64_state_t xxhState; + size_t headerSize; + ZSTD_format_e format; + ZSTD_forceIgnoreChecksum_e forceIgnoreChecksum; /* User specified: if == 1, will ignore checksums in compressed frame. Default == 0 */ + U32 validateChecksum; /* if == 1, will validate checksum. Is == 1 if (fParams.checksumFlag == 1) and (forceIgnoreChecksum == 0). */ + const BYTE* litPtr; + ZSTD_customMem customMem; + size_t litSize; + size_t rleSize; + size_t staticSize; + int isFrameDecompression; +#if DYNAMIC_BMI2 + int bmi2; /* == 1 if the CPU supports BMI2 and 0 otherwise. CPU support is determined dynamically once per context lifetime. */ +#endif + + /* dictionary */ + ZSTD_DDict* ddictLocal; + const ZSTD_DDict* ddict; /* set by ZSTD_initDStream_usingDDict(), or ZSTD_DCtx_refDDict() */ + U32 dictID; + int ddictIsCold; /* if == 1 : dictionary is "new" for working context, and presumed "cold" (not in cpu cache) */ + ZSTD_dictUses_e dictUses; + ZSTD_DDictHashSet* ddictSet; /* Hash set for multiple ddicts */ + ZSTD_refMultipleDDicts_e refMultipleDDicts; /* User specified: if == 1, will allow references to multiple DDicts. Default == 0 (disabled) */ + int disableHufAsm; + int maxBlockSizeParam; + + /* streaming */ + ZSTD_dStreamStage streamStage; + char* inBuff; + size_t inBuffSize; + size_t inPos; + size_t maxWindowSize; + char* outBuff; + size_t outBuffSize; + size_t outStart; + size_t outEnd; + size_t lhSize; +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) + void* legacyContext; + U32 previousLegacyVersion; + U32 legacyVersion; +#endif + U32 hostageByte; + int noForwardProgress; + ZSTD_bufferMode_e outBufferMode; + ZSTD_outBuffer expectedOutBuffer; + + /* workspace */ + BYTE* litBuffer; + const BYTE* litBufferEnd; + ZSTD_litLocation_e litBufferLocation; + BYTE litExtraBuffer[ZSTD_LITBUFFEREXTRASIZE + WILDCOPY_OVERLENGTH]; /* literal buffer can be split between storage within dst and within this scratch buffer */ + BYTE headerBuffer[ZSTD_FRAMEHEADERSIZE_MAX]; + + size_t oversizedDuration; + +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + void const* dictContentBeginForFuzzing; + void const* dictContentEndForFuzzing; +#endif + + /* Tracing */ +#if ZSTD_TRACE + ZSTD_TraceCtx traceCtx; +#endif +}; /* typedef'd to ZSTD_DCtx within "zstd.h" */ + +MEM_STATIC int ZSTD_DCtx_get_bmi2(const struct ZSTD_DCtx_s *dctx) { +#if DYNAMIC_BMI2 + return dctx->bmi2; +#else + (void)dctx; + return 0; +#endif +} + +/*-******************************************************* + * Shared internal functions + *********************************************************/ + +/*! ZSTD_loadDEntropy() : + * dict : must point at beginning of a valid zstd dictionary. + * @return : size of dictionary header (size of magic number + dict ID + entropy tables) */ +size_t ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy, + const void* const dict, size_t const dictSize); + +/*! ZSTD_checkContinuity() : + * check if next `dst` follows previous position, where decompression ended. + * If yes, do nothing (continue on current segment). + * If not, classify previous segment as "external dictionary", and start a new segment. + * This function cannot fail. */ +void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst, size_t dstSize); + + +#endif /* ZSTD_DECOMPRESS_INTERNAL_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff.h b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff.h new file mode 100644 index 0000000000..a968245b36 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff.h @@ -0,0 +1,214 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* *************************************************************** +* NOTES/WARNINGS +******************************************************************/ +/* The streaming API defined here is deprecated. + * Consider migrating towards ZSTD_compressStream() API in `zstd.h` + * See 'lib/README.md'. + *****************************************************************/ + + +#if defined (__cplusplus) +extern "C" { +#endif + +#ifndef ZSTD_BUFFERED_H_23987 +#define ZSTD_BUFFERED_H_23987 + +/* ************************************* +* Dependencies +***************************************/ +#include /* size_t */ +#include "../zstd.h" /* ZSTD_CStream, ZSTD_DStream, ZSTDLIB_API */ + + +/* *************************************************************** +* Compiler specifics +*****************************************************************/ +/* Deprecation warnings */ +/* Should these warnings be a problem, + * it is generally possible to disable them, + * typically with -Wno-deprecated-declarations for gcc + * or _CRT_SECURE_NO_WARNINGS in Visual. + * Otherwise, it's also possible to define ZBUFF_DISABLE_DEPRECATE_WARNINGS + */ +#ifdef ZBUFF_DISABLE_DEPRECATE_WARNINGS +# define ZBUFF_DEPRECATED(message) ZSTDLIB_API /* disable deprecation warnings */ +#else +# if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ +# define ZBUFF_DEPRECATED(message) [[deprecated(message)]] ZSTDLIB_API +# elif (defined(GNUC) && (GNUC > 4 || (GNUC == 4 && GNUC_MINOR >= 5))) || defined(__clang__) +# define ZBUFF_DEPRECATED(message) ZSTDLIB_API __attribute__((deprecated(message))) +# elif defined(__GNUC__) && (__GNUC__ >= 3) +# define ZBUFF_DEPRECATED(message) ZSTDLIB_API __attribute__((deprecated)) +# elif defined(_MSC_VER) +# define ZBUFF_DEPRECATED(message) ZSTDLIB_API __declspec(deprecated(message)) +# else +# pragma message("WARNING: You need to implement ZBUFF_DEPRECATED for this compiler") +# define ZBUFF_DEPRECATED(message) ZSTDLIB_API +# endif +#endif /* ZBUFF_DISABLE_DEPRECATE_WARNINGS */ + + +/* ************************************* +* Streaming functions +***************************************/ +/* This is the easier "buffered" streaming API, +* using an internal buffer to lift all restrictions on user-provided buffers +* which can be any size, any place, for both input and output. +* ZBUFF and ZSTD are 100% interoperable, +* frames created by one can be decoded by the other one */ + +typedef ZSTD_CStream ZBUFF_CCtx; +ZBUFF_DEPRECATED("use ZSTD_createCStream") ZBUFF_CCtx* ZBUFF_createCCtx(void); +ZBUFF_DEPRECATED("use ZSTD_freeCStream") size_t ZBUFF_freeCCtx(ZBUFF_CCtx* cctx); + +ZBUFF_DEPRECATED("use ZSTD_initCStream") size_t ZBUFF_compressInit(ZBUFF_CCtx* cctx, int compressionLevel); +ZBUFF_DEPRECATED("use ZSTD_initCStream_usingDict") size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel); + +ZBUFF_DEPRECATED("use ZSTD_compressStream") size_t ZBUFF_compressContinue(ZBUFF_CCtx* cctx, void* dst, size_t* dstCapacityPtr, const void* src, size_t* srcSizePtr); +ZBUFF_DEPRECATED("use ZSTD_flushStream") size_t ZBUFF_compressFlush(ZBUFF_CCtx* cctx, void* dst, size_t* dstCapacityPtr); +ZBUFF_DEPRECATED("use ZSTD_endStream") size_t ZBUFF_compressEnd(ZBUFF_CCtx* cctx, void* dst, size_t* dstCapacityPtr); + +/*-************************************************* +* Streaming compression - howto +* +* A ZBUFF_CCtx object is required to track streaming operation. +* Use ZBUFF_createCCtx() and ZBUFF_freeCCtx() to create/release resources. +* ZBUFF_CCtx objects can be reused multiple times. +* +* Start by initializing ZBUF_CCtx. +* Use ZBUFF_compressInit() to start a new compression operation. +* Use ZBUFF_compressInitDictionary() for a compression which requires a dictionary. +* +* Use ZBUFF_compressContinue() repetitively to consume input stream. +* *srcSizePtr and *dstCapacityPtr can be any size. +* The function will report how many bytes were read or written within *srcSizePtr and *dstCapacityPtr. +* Note that it may not consume the entire input, in which case it's up to the caller to present again remaining data. +* The content of `dst` will be overwritten (up to *dstCapacityPtr) at each call, so save its content if it matters or change @dst . +* @return : a hint to preferred nb of bytes to use as input for next function call (it's just a hint, to improve latency) +* or an error code, which can be tested using ZBUFF_isError(). +* +* At any moment, it's possible to flush whatever data remains within buffer, using ZBUFF_compressFlush(). +* The nb of bytes written into `dst` will be reported into *dstCapacityPtr. +* Note that the function cannot output more than *dstCapacityPtr, +* therefore, some content might still be left into internal buffer if *dstCapacityPtr is too small. +* @return : nb of bytes still present into internal buffer (0 if it's empty) +* or an error code, which can be tested using ZBUFF_isError(). +* +* ZBUFF_compressEnd() instructs to finish a frame. +* It will perform a flush and write frame epilogue. +* The epilogue is required for decoders to consider a frame completed. +* Similar to ZBUFF_compressFlush(), it may not be able to output the entire internal buffer content if *dstCapacityPtr is too small. +* In which case, call again ZBUFF_compressFlush() to complete the flush. +* @return : nb of bytes still present into internal buffer (0 if it's empty) +* or an error code, which can be tested using ZBUFF_isError(). +* +* Hint : _recommended buffer_ sizes (not compulsory) : ZBUFF_recommendedCInSize() / ZBUFF_recommendedCOutSize() +* input : ZBUFF_recommendedCInSize==128 KB block size is the internal unit, use this value to reduce intermediate stages (better latency) +* output : ZBUFF_recommendedCOutSize==ZSTD_compressBound(128 KB) + 3 + 3 : ensures it's always possible to write/flush/end a full block. Skip some buffering. +* By using both, it ensures that input will be entirely consumed, and output will always contain the result, reducing intermediate buffering. +* **************************************************/ + + +typedef ZSTD_DStream ZBUFF_DCtx; +ZBUFF_DEPRECATED("use ZSTD_createDStream") ZBUFF_DCtx* ZBUFF_createDCtx(void); +ZBUFF_DEPRECATED("use ZSTD_freeDStream") size_t ZBUFF_freeDCtx(ZBUFF_DCtx* dctx); + +ZBUFF_DEPRECATED("use ZSTD_initDStream") size_t ZBUFF_decompressInit(ZBUFF_DCtx* dctx); +ZBUFF_DEPRECATED("use ZSTD_initDStream_usingDict") size_t ZBUFF_decompressInitDictionary(ZBUFF_DCtx* dctx, const void* dict, size_t dictSize); + +ZBUFF_DEPRECATED("use ZSTD_decompressStream") size_t ZBUFF_decompressContinue(ZBUFF_DCtx* dctx, + void* dst, size_t* dstCapacityPtr, + const void* src, size_t* srcSizePtr); + +/*-*************************************************************************** +* Streaming decompression howto +* +* A ZBUFF_DCtx object is required to track streaming operations. +* Use ZBUFF_createDCtx() and ZBUFF_freeDCtx() to create/release resources. +* Use ZBUFF_decompressInit() to start a new decompression operation, +* or ZBUFF_decompressInitDictionary() if decompression requires a dictionary. +* Note that ZBUFF_DCtx objects can be re-init multiple times. +* +* Use ZBUFF_decompressContinue() repetitively to consume your input. +* *srcSizePtr and *dstCapacityPtr can be any size. +* The function will report how many bytes were read or written by modifying *srcSizePtr and *dstCapacityPtr. +* Note that it may not consume the entire input, in which case it's up to the caller to present remaining input again. +* The content of `dst` will be overwritten (up to *dstCapacityPtr) at each function call, so save its content if it matters, or change `dst`. +* @return : 0 when a frame is completely decoded and fully flushed, +* 1 when there is still some data left within internal buffer to flush, +* >1 when more data is expected, with value being a suggested next input size (it's just a hint, which helps latency), +* or an error code, which can be tested using ZBUFF_isError(). +* +* Hint : recommended buffer sizes (not compulsory) : ZBUFF_recommendedDInSize() and ZBUFF_recommendedDOutSize() +* output : ZBUFF_recommendedDOutSize== 128 KB block size is the internal unit, it ensures it's always possible to write a full block when decoded. +* input : ZBUFF_recommendedDInSize == 128KB + 3; +* just follow indications from ZBUFF_decompressContinue() to minimize latency. It should always be <= 128 KB + 3 . +* *******************************************************************************/ + + +/* ************************************* +* Tool functions +***************************************/ +ZBUFF_DEPRECATED("use ZSTD_isError") unsigned ZBUFF_isError(size_t errorCode); +ZBUFF_DEPRECATED("use ZSTD_getErrorName") const char* ZBUFF_getErrorName(size_t errorCode); + +/** Functions below provide recommended buffer sizes for Compression or Decompression operations. +* These sizes are just hints, they tend to offer better latency */ +ZBUFF_DEPRECATED("use ZSTD_CStreamInSize") size_t ZBUFF_recommendedCInSize(void); +ZBUFF_DEPRECATED("use ZSTD_CStreamOutSize") size_t ZBUFF_recommendedCOutSize(void); +ZBUFF_DEPRECATED("use ZSTD_DStreamInSize") size_t ZBUFF_recommendedDInSize(void); +ZBUFF_DEPRECATED("use ZSTD_DStreamOutSize") size_t ZBUFF_recommendedDOutSize(void); + +#endif /* ZSTD_BUFFERED_H_23987 */ + + +#ifdef ZBUFF_STATIC_LINKING_ONLY +#ifndef ZBUFF_STATIC_H_30298098432 +#define ZBUFF_STATIC_H_30298098432 + +/* ==================================================================================== + * The definitions in this section are considered experimental. + * They should never be used in association with a dynamic library, as they may change in the future. + * They are provided for advanced usages. + * Use them only in association with static linking. + * ==================================================================================== */ + +/*--- Dependency ---*/ +#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters, ZSTD_customMem */ +#include "../zstd.h" + + +/*--- Custom memory allocator ---*/ +/*! ZBUFF_createCCtx_advanced() : + * Create a ZBUFF compression context using external alloc and free functions */ +ZBUFF_DEPRECATED("use ZSTD_createCStream_advanced") ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem); + +/*! ZBUFF_createDCtx_advanced() : + * Create a ZBUFF decompression context using external alloc and free functions */ +ZBUFF_DEPRECATED("use ZSTD_createDStream_advanced") ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem); + + +/*--- Advanced Streaming Initialization ---*/ +ZBUFF_DEPRECATED("use ZSTD_initDStream_usingDict") size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc, + const void* dict, size_t dictSize, + ZSTD_parameters params, unsigned long long pledgedSrcSize); + + +#endif /* ZBUFF_STATIC_H_30298098432 */ +#endif /* ZBUFF_STATIC_LINKING_ONLY */ + + +#if defined (__cplusplus) +} +#endif diff --git a/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_common.c b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_common.c new file mode 100644 index 0000000000..5a2f2db354 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_common.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/*-************************************* +* Dependencies +***************************************/ +#include "../common/error_private.h" +#include "zbuff.h" + +/*-**************************************** +* ZBUFF Error Management (deprecated) +******************************************/ + +/*! ZBUFF_isError() : +* tells if a return value is an error code */ +unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); } +/*! ZBUFF_getErrorName() : +* provides error code string from function result (useful for debugging) */ +const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); } diff --git a/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_compress.c b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_compress.c new file mode 100644 index 0000000000..1d8682150b --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_compress.c @@ -0,0 +1,167 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + + +/* ************************************* +* Dependencies +***************************************/ +#define ZBUFF_STATIC_LINKING_ONLY +#include "zbuff.h" +#include "../common/error_private.h" + + +/*-*********************************************************** +* Streaming compression +* +* A ZBUFF_CCtx object is required to track streaming operation. +* Use ZBUFF_createCCtx() and ZBUFF_freeCCtx() to create/release resources. +* Use ZBUFF_compressInit() to start a new compression operation. +* ZBUFF_CCtx objects can be reused multiple times. +* +* Use ZBUFF_compressContinue() repetitively to consume your input. +* *srcSizePtr and *dstCapacityPtr can be any size. +* The function will report how many bytes were read or written by modifying *srcSizePtr and *dstCapacityPtr. +* Note that it may not consume the entire input, in which case it's up to the caller to call again the function with remaining input. +* The content of dst will be overwritten (up to *dstCapacityPtr) at each function call, so save its content if it matters or change dst . +* @return : a hint to preferred nb of bytes to use as input for next function call (it's only a hint, to improve latency) +* or an error code, which can be tested using ZBUFF_isError(). +* +* ZBUFF_compressFlush() can be used to instruct ZBUFF to compress and output whatever remains within its buffer. +* Note that it will not output more than *dstCapacityPtr. +* Therefore, some content might still be left into its internal buffer if dst buffer is too small. +* @return : nb of bytes still present into internal buffer (0 if it's empty) +* or an error code, which can be tested using ZBUFF_isError(). +* +* ZBUFF_compressEnd() instructs to finish a frame. +* It will perform a flush and write frame epilogue. +* Similar to ZBUFF_compressFlush(), it may not be able to output the entire internal buffer content if *dstCapacityPtr is too small. +* @return : nb of bytes still present into internal buffer (0 if it's empty) +* or an error code, which can be tested using ZBUFF_isError(). +* +* Hint : recommended buffer sizes (not compulsory) +* input : ZSTD_BLOCKSIZE_MAX (128 KB), internal unit size, it improves latency to use this value. +* output : ZSTD_compressBound(ZSTD_BLOCKSIZE_MAX) + ZSTD_blockHeaderSize + ZBUFF_endFrameSize : ensures it's always possible to write/flush/end a full block at best speed. +* ***********************************************************/ + +ZBUFF_CCtx* ZBUFF_createCCtx(void) +{ + return ZSTD_createCStream(); +} + +ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem) +{ + return ZSTD_createCStream_advanced(customMem); +} + +size_t ZBUFF_freeCCtx(ZBUFF_CCtx* zbc) +{ + return ZSTD_freeCStream(zbc); +} + + +/* ====== Initialization ====== */ + +size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc, + const void* dict, size_t dictSize, + ZSTD_parameters params, unsigned long long pledgedSrcSize) +{ + if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN; /* preserve "0 == unknown" behavior */ + FORWARD_IF_ERROR(ZSTD_CCtx_reset(zbc, ZSTD_reset_session_only), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setPledgedSrcSize(zbc, pledgedSrcSize), ""); + + FORWARD_IF_ERROR(ZSTD_checkCParams(params.cParams), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_windowLog, params.cParams.windowLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_hashLog, params.cParams.hashLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_chainLog, params.cParams.chainLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_searchLog, params.cParams.searchLog), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_minMatch, params.cParams.minMatch), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_targetLength, params.cParams.targetLength), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_strategy, params.cParams.strategy), ""); + + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_contentSizeFlag, params.fParams.contentSizeFlag), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_checksumFlag, params.fParams.checksumFlag), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_dictIDFlag, params.fParams.noDictIDFlag), ""); + + FORWARD_IF_ERROR(ZSTD_CCtx_loadDictionary(zbc, dict, dictSize), ""); + return 0; +} + +size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* zbc, const void* dict, size_t dictSize, int compressionLevel) +{ + FORWARD_IF_ERROR(ZSTD_CCtx_reset(zbc, ZSTD_reset_session_only), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(zbc, ZSTD_c_compressionLevel, compressionLevel), ""); + FORWARD_IF_ERROR(ZSTD_CCtx_loadDictionary(zbc, dict, dictSize), ""); + return 0; +} + +size_t ZBUFF_compressInit(ZBUFF_CCtx* zbc, int compressionLevel) +{ + return ZSTD_initCStream(zbc, compressionLevel); +} + +/* ====== Compression ====== */ + + +size_t ZBUFF_compressContinue(ZBUFF_CCtx* zbc, + void* dst, size_t* dstCapacityPtr, + const void* src, size_t* srcSizePtr) +{ + size_t result; + ZSTD_outBuffer outBuff; + ZSTD_inBuffer inBuff; + outBuff.dst = dst; + outBuff.pos = 0; + outBuff.size = *dstCapacityPtr; + inBuff.src = src; + inBuff.pos = 0; + inBuff.size = *srcSizePtr; + result = ZSTD_compressStream(zbc, &outBuff, &inBuff); + *dstCapacityPtr = outBuff.pos; + *srcSizePtr = inBuff.pos; + return result; +} + + + +/* ====== Finalize ====== */ + +size_t ZBUFF_compressFlush(ZBUFF_CCtx* zbc, void* dst, size_t* dstCapacityPtr) +{ + size_t result; + ZSTD_outBuffer outBuff; + outBuff.dst = dst; + outBuff.pos = 0; + outBuff.size = *dstCapacityPtr; + result = ZSTD_flushStream(zbc, &outBuff); + *dstCapacityPtr = outBuff.pos; + return result; +} + + +size_t ZBUFF_compressEnd(ZBUFF_CCtx* zbc, void* dst, size_t* dstCapacityPtr) +{ + size_t result; + ZSTD_outBuffer outBuff; + outBuff.dst = dst; + outBuff.pos = 0; + outBuff.size = *dstCapacityPtr; + result = ZSTD_endStream(zbc, &outBuff); + *dstCapacityPtr = outBuff.pos; + return result; +} + + + +/* ************************************* +* Tool functions +***************************************/ +size_t ZBUFF_recommendedCInSize(void) { return ZSTD_CStreamInSize(); } +size_t ZBUFF_recommendedCOutSize(void) { return ZSTD_CStreamOutSize(); } diff --git a/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_decompress.c b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_decompress.c new file mode 100644 index 0000000000..12a66af741 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/deprecated/zbuff_decompress.c @@ -0,0 +1,77 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + + +/* ************************************* +* Dependencies +***************************************/ +#define ZSTD_DISABLE_DEPRECATE_WARNINGS /* suppress warning on ZSTD_initDStream_usingDict */ +#include "../zstd.h" /* ZSTD_CStream, ZSTD_DStream, ZSTDLIB_API */ +#define ZBUFF_STATIC_LINKING_ONLY +#include "zbuff.h" + + +ZBUFF_DCtx* ZBUFF_createDCtx(void) +{ + return ZSTD_createDStream(); +} + +ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem) +{ + return ZSTD_createDStream_advanced(customMem); +} + +size_t ZBUFF_freeDCtx(ZBUFF_DCtx* zbd) +{ + return ZSTD_freeDStream(zbd); +} + + +/* *** Initialization *** */ + +size_t ZBUFF_decompressInitDictionary(ZBUFF_DCtx* zbd, const void* dict, size_t dictSize) +{ + return ZSTD_initDStream_usingDict(zbd, dict, dictSize); +} + +size_t ZBUFF_decompressInit(ZBUFF_DCtx* zbd) +{ + return ZSTD_initDStream(zbd); +} + + +/* *** Decompression *** */ + +size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbd, + void* dst, size_t* dstCapacityPtr, + const void* src, size_t* srcSizePtr) +{ + ZSTD_outBuffer outBuff; + ZSTD_inBuffer inBuff; + size_t result; + outBuff.dst = dst; + outBuff.pos = 0; + outBuff.size = *dstCapacityPtr; + inBuff.src = src; + inBuff.pos = 0; + inBuff.size = *srcSizePtr; + result = ZSTD_decompressStream(zbd, &outBuff, &inBuff); + *dstCapacityPtr = outBuff.pos; + *srcSizePtr = inBuff.pos; + return result; +} + + +/* ************************************* +* Tool functions +***************************************/ +size_t ZBUFF_recommendedDInSize(void) { return ZSTD_DStreamInSize(); } +size_t ZBUFF_recommendedDOutSize(void) { return ZSTD_DStreamOutSize(); } diff --git a/cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.c b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.c new file mode 100644 index 0000000000..2ef33c73e5 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.c @@ -0,0 +1,1302 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/* ***************************************************************************** + * Constructs a dictionary using a heuristic based on the following paper: + * + * Liao, Petri, Moffat, Wirth + * Effective Construction of Relative Lempel-Ziv Dictionaries + * Published in WWW 2016. + * + * Adapted from code originally written by @ot (Giuseppe Ottaviano). + ******************************************************************************/ + +/*-************************************* +* Dependencies +***************************************/ +/* qsort_r is an extension. */ +#if defined(__linux) || defined(__linux__) || defined(linux) || defined(__gnu_linux__) || \ + defined(__CYGWIN__) || defined(__MSYS__) +#if !defined(_GNU_SOURCE) && !defined(__ANDROID__) /* NDK doesn't ship qsort_r(). */ +#define _GNU_SOURCE +#endif +#endif + +#include /* fprintf */ +#include /* malloc, free, qsort_r */ + +#include /* memset */ +#include /* clock */ + +#ifndef ZDICT_STATIC_LINKING_ONLY +# define ZDICT_STATIC_LINKING_ONLY +#endif + +#include "../common/mem.h" /* read */ +#include "../common/pool.h" /* POOL_ctx */ +#include "../common/threading.h" /* ZSTD_pthread_mutex_t */ +#include "../common/zstd_internal.h" /* includes zstd.h */ +#include "../common/bits.h" /* ZSTD_highbit32 */ +#include "../zdict.h" +#include "cover.h" + +/*-************************************* +* Constants +***************************************/ +/** +* There are 32bit indexes used to ref samples, so limit samples size to 4GB +* on 64bit builds. +* For 32bit builds we choose 1 GB. +* Most 32bit platforms have 2GB user-mode addressable space and we allocate a large +* contiguous buffer, so 1GB is already a high limit. +*/ +#define COVER_MAX_SAMPLES_SIZE (sizeof(size_t) == 8 ? ((unsigned)-1) : ((unsigned)1 GB)) +#define COVER_DEFAULT_SPLITPOINT 1.0 + +/*-************************************* +* Console display +***************************************/ +#ifndef LOCALDISPLAYLEVEL +static int g_displayLevel = 0; +#endif +#undef DISPLAY +#define DISPLAY(...) \ + { \ + fprintf(stderr, __VA_ARGS__); \ + fflush(stderr); \ + } +#undef LOCALDISPLAYLEVEL +#define LOCALDISPLAYLEVEL(displayLevel, l, ...) \ + if (displayLevel >= l) { \ + DISPLAY(__VA_ARGS__); \ + } /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ +#undef DISPLAYLEVEL +#define DISPLAYLEVEL(l, ...) LOCALDISPLAYLEVEL(g_displayLevel, l, __VA_ARGS__) + +#ifndef LOCALDISPLAYUPDATE +static const clock_t g_refreshRate = CLOCKS_PER_SEC * 15 / 100; +static clock_t g_time = 0; +#endif +#undef LOCALDISPLAYUPDATE +#define LOCALDISPLAYUPDATE(displayLevel, l, ...) \ + if (displayLevel >= l) { \ + if ((clock() - g_time > g_refreshRate) || (displayLevel >= 4)) { \ + g_time = clock(); \ + DISPLAY(__VA_ARGS__); \ + } \ + } +#undef DISPLAYUPDATE +#define DISPLAYUPDATE(l, ...) LOCALDISPLAYUPDATE(g_displayLevel, l, __VA_ARGS__) + +/*-************************************* +* Hash table +*************************************** +* A small specialized hash map for storing activeDmers. +* The map does not resize, so if it becomes full it will loop forever. +* Thus, the map must be large enough to store every value. +* The map implements linear probing and keeps its load less than 0.5. +*/ + +#define MAP_EMPTY_VALUE ((U32)-1) +typedef struct COVER_map_pair_t_s { + U32 key; + U32 value; +} COVER_map_pair_t; + +typedef struct COVER_map_s { + COVER_map_pair_t *data; + U32 sizeLog; + U32 size; + U32 sizeMask; +} COVER_map_t; + +/** + * Clear the map. + */ +static void COVER_map_clear(COVER_map_t *map) { + memset(map->data, MAP_EMPTY_VALUE, map->size * sizeof(COVER_map_pair_t)); +} + +/** + * Initializes a map of the given size. + * Returns 1 on success and 0 on failure. + * The map must be destroyed with COVER_map_destroy(). + * The map is only guaranteed to be large enough to hold size elements. + */ +static int COVER_map_init(COVER_map_t *map, U32 size) { + map->sizeLog = ZSTD_highbit32(size) + 2; + map->size = (U32)1 << map->sizeLog; + map->sizeMask = map->size - 1; + map->data = (COVER_map_pair_t *)malloc(map->size * sizeof(COVER_map_pair_t)); + if (!map->data) { + map->sizeLog = 0; + map->size = 0; + return 0; + } + COVER_map_clear(map); + return 1; +} + +/** + * Internal hash function + */ +static const U32 COVER_prime4bytes = 2654435761U; +static U32 COVER_map_hash(COVER_map_t *map, U32 key) { + return (key * COVER_prime4bytes) >> (32 - map->sizeLog); +} + +/** + * Helper function that returns the index that a key should be placed into. + */ +static U32 COVER_map_index(COVER_map_t *map, U32 key) { + const U32 hash = COVER_map_hash(map, key); + U32 i; + for (i = hash;; i = (i + 1) & map->sizeMask) { + COVER_map_pair_t *pos = &map->data[i]; + if (pos->value == MAP_EMPTY_VALUE) { + return i; + } + if (pos->key == key) { + return i; + } + } +} + +/** + * Returns the pointer to the value for key. + * If key is not in the map, it is inserted and the value is set to 0. + * The map must not be full. + */ +static U32 *COVER_map_at(COVER_map_t *map, U32 key) { + COVER_map_pair_t *pos = &map->data[COVER_map_index(map, key)]; + if (pos->value == MAP_EMPTY_VALUE) { + pos->key = key; + pos->value = 0; + } + return &pos->value; +} + +/** + * Deletes key from the map if present. + */ +static void COVER_map_remove(COVER_map_t *map, U32 key) { + U32 i = COVER_map_index(map, key); + COVER_map_pair_t *del = &map->data[i]; + U32 shift = 1; + if (del->value == MAP_EMPTY_VALUE) { + return; + } + for (i = (i + 1) & map->sizeMask;; i = (i + 1) & map->sizeMask) { + COVER_map_pair_t *const pos = &map->data[i]; + /* If the position is empty we are done */ + if (pos->value == MAP_EMPTY_VALUE) { + del->value = MAP_EMPTY_VALUE; + return; + } + /* If pos can be moved to del do so */ + if (((i - COVER_map_hash(map, pos->key)) & map->sizeMask) >= shift) { + del->key = pos->key; + del->value = pos->value; + del = pos; + shift = 1; + } else { + ++shift; + } + } +} + +/** + * Destroys a map that is inited with COVER_map_init(). + */ +static void COVER_map_destroy(COVER_map_t *map) { + if (map->data) { + free(map->data); + } + map->data = NULL; + map->size = 0; +} + +/*-************************************* +* Context +***************************************/ + +typedef struct { + const BYTE *samples; + size_t *offsets; + const size_t *samplesSizes; + size_t nbSamples; + size_t nbTrainSamples; + size_t nbTestSamples; + U32 *suffix; + size_t suffixSize; + U32 *freqs; + U32 *dmerAt; + unsigned d; +} COVER_ctx_t; + +#if !defined(_GNU_SOURCE) && !defined(__APPLE__) && !defined(_MSC_VER) +/* C90 only offers qsort() that needs a global context. */ +static COVER_ctx_t *g_coverCtx = NULL; +#endif + +/*-************************************* +* Helper functions +***************************************/ + +/** + * Returns the sum of the sample sizes. + */ +size_t COVER_sum(const size_t *samplesSizes, unsigned nbSamples) { + size_t sum = 0; + unsigned i; + for (i = 0; i < nbSamples; ++i) { + sum += samplesSizes[i]; + } + return sum; +} + +/** + * Returns -1 if the dmer at lp is less than the dmer at rp. + * Return 0 if the dmers at lp and rp are equal. + * Returns 1 if the dmer at lp is greater than the dmer at rp. + */ +static int COVER_cmp(COVER_ctx_t *ctx, const void *lp, const void *rp) { + U32 const lhs = *(U32 const *)lp; + U32 const rhs = *(U32 const *)rp; + return memcmp(ctx->samples + lhs, ctx->samples + rhs, ctx->d); +} +/** + * Faster version for d <= 8. + */ +static int COVER_cmp8(COVER_ctx_t *ctx, const void *lp, const void *rp) { + U64 const mask = (ctx->d == 8) ? (U64)-1 : (((U64)1 << (8 * ctx->d)) - 1); + U64 const lhs = MEM_readLE64(ctx->samples + *(U32 const *)lp) & mask; + U64 const rhs = MEM_readLE64(ctx->samples + *(U32 const *)rp) & mask; + if (lhs < rhs) { + return -1; + } + return (lhs > rhs); +} + +/** + * Same as COVER_cmp() except ties are broken by pointer value + */ +#if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__) +static int WIN_CDECL COVER_strict_cmp(void* g_coverCtx, const void* lp, const void* rp) { +#elif defined(_GNU_SOURCE) +static int COVER_strict_cmp(const void *lp, const void *rp, void *g_coverCtx) { +#else /* C90 fallback.*/ +static int COVER_strict_cmp(const void *lp, const void *rp) { +#endif + int result = COVER_cmp((COVER_ctx_t*)g_coverCtx, lp, rp); + if (result == 0) { + result = lp < rp ? -1 : 1; + } + return result; +} +/** + * Faster version for d <= 8. + */ +#if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__) +static int WIN_CDECL COVER_strict_cmp8(void* g_coverCtx, const void* lp, const void* rp) { +#elif defined(_GNU_SOURCE) +static int COVER_strict_cmp8(const void *lp, const void *rp, void *g_coverCtx) { +#else /* C90 fallback.*/ +static int COVER_strict_cmp8(const void *lp, const void *rp) { +#endif + int result = COVER_cmp8((COVER_ctx_t*)g_coverCtx, lp, rp); + if (result == 0) { + result = lp < rp ? -1 : 1; + } + return result; +} + +/** + * Abstract away divergence of qsort_r() parameters. + * Hopefully when C11 become the norm, we will be able + * to clean it up. + */ +static void stableSort(COVER_ctx_t *ctx) { +#if defined(__APPLE__) + qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32), + ctx, + (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp)); +#elif defined(_GNU_SOURCE) + qsort_r(ctx->suffix, ctx->suffixSize, sizeof(U32), + (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp), + ctx); +#elif defined(_WIN32) && defined(_MSC_VER) + qsort_s(ctx->suffix, ctx->suffixSize, sizeof(U32), + (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp), + ctx); +#elif defined(__OpenBSD__) + g_coverCtx = ctx; + mergesort(ctx->suffix, ctx->suffixSize, sizeof(U32), + (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp)); +#else /* C90 fallback.*/ + g_coverCtx = ctx; + /* TODO(cavalcanti): implement a reentrant qsort() when is not available. */ + qsort(ctx->suffix, ctx->suffixSize, sizeof(U32), + (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp)); +#endif +} + +/** + * Returns the first pointer in [first, last) whose element does not compare + * less than value. If no such element exists it returns last. + */ +static const size_t *COVER_lower_bound(const size_t* first, const size_t* last, + size_t value) { + size_t count = (size_t)(last - first); + assert(last >= first); + while (count != 0) { + size_t step = count / 2; + const size_t *ptr = first; + ptr += step; + if (*ptr < value) { + first = ++ptr; + count -= step + 1; + } else { + count = step; + } + } + return first; +} + +/** + * Generic groupBy function. + * Groups an array sorted by cmp into groups with equivalent values. + * Calls grp for each group. + */ +static void +COVER_groupBy(const void *data, size_t count, size_t size, COVER_ctx_t *ctx, + int (*cmp)(COVER_ctx_t *, const void *, const void *), + void (*grp)(COVER_ctx_t *, const void *, const void *)) { + const BYTE *ptr = (const BYTE *)data; + size_t num = 0; + while (num < count) { + const BYTE *grpEnd = ptr + size; + ++num; + while (num < count && cmp(ctx, ptr, grpEnd) == 0) { + grpEnd += size; + ++num; + } + grp(ctx, ptr, grpEnd); + ptr = grpEnd; + } +} + +/*-************************************* +* Cover functions +***************************************/ + +/** + * Called on each group of positions with the same dmer. + * Counts the frequency of each dmer and saves it in the suffix array. + * Fills `ctx->dmerAt`. + */ +static void COVER_group(COVER_ctx_t *ctx, const void *group, + const void *groupEnd) { + /* The group consists of all the positions with the same first d bytes. */ + const U32 *grpPtr = (const U32 *)group; + const U32 *grpEnd = (const U32 *)groupEnd; + /* The dmerId is how we will reference this dmer. + * This allows us to map the whole dmer space to a much smaller space, the + * size of the suffix array. + */ + const U32 dmerId = (U32)(grpPtr - ctx->suffix); + /* Count the number of samples this dmer shows up in */ + U32 freq = 0; + /* Details */ + const size_t *curOffsetPtr = ctx->offsets; + const size_t *offsetsEnd = ctx->offsets + ctx->nbSamples; + /* Once *grpPtr >= curSampleEnd this occurrence of the dmer is in a + * different sample than the last. + */ + size_t curSampleEnd = ctx->offsets[0]; + for (; grpPtr != grpEnd; ++grpPtr) { + /* Save the dmerId for this position so we can get back to it. */ + ctx->dmerAt[*grpPtr] = dmerId; + /* Dictionaries only help for the first reference to the dmer. + * After that zstd can reference the match from the previous reference. + * So only count each dmer once for each sample it is in. + */ + if (*grpPtr < curSampleEnd) { + continue; + } + freq += 1; + /* Binary search to find the end of the sample *grpPtr is in. + * In the common case that grpPtr + 1 == grpEnd we can skip the binary + * search because the loop is over. + */ + if (grpPtr + 1 != grpEnd) { + const size_t *sampleEndPtr = + COVER_lower_bound(curOffsetPtr, offsetsEnd, *grpPtr); + curSampleEnd = *sampleEndPtr; + curOffsetPtr = sampleEndPtr + 1; + } + } + /* At this point we are never going to look at this segment of the suffix + * array again. We take advantage of this fact to save memory. + * We store the frequency of the dmer in the first position of the group, + * which is dmerId. + */ + ctx->suffix[dmerId] = freq; +} + + +/** + * Selects the best segment in an epoch. + * Segments of are scored according to the function: + * + * Let F(d) be the frequency of dmer d. + * Let S_i be the dmer at position i of segment S which has length k. + * + * Score(S) = F(S_1) + F(S_2) + ... + F(S_{k-d+1}) + * + * Once the dmer d is in the dictionary we set F(d) = 0. + */ +static COVER_segment_t COVER_selectSegment(const COVER_ctx_t *ctx, U32 *freqs, + COVER_map_t *activeDmers, U32 begin, + U32 end, + ZDICT_cover_params_t parameters) { + /* Constants */ + const U32 k = parameters.k; + const U32 d = parameters.d; + const U32 dmersInK = k - d + 1; + /* Try each segment (activeSegment) and save the best (bestSegment) */ + COVER_segment_t bestSegment = {0, 0, 0}; + COVER_segment_t activeSegment; + /* Reset the activeDmers in the segment */ + COVER_map_clear(activeDmers); + /* The activeSegment starts at the beginning of the epoch. */ + activeSegment.begin = begin; + activeSegment.end = begin; + activeSegment.score = 0; + /* Slide the activeSegment through the whole epoch. + * Save the best segment in bestSegment. + */ + while (activeSegment.end < end) { + /* The dmerId for the dmer at the next position */ + U32 newDmer = ctx->dmerAt[activeSegment.end]; + /* The entry in activeDmers for this dmerId */ + U32 *newDmerOcc = COVER_map_at(activeDmers, newDmer); + /* If the dmer isn't already present in the segment add its score. */ + if (*newDmerOcc == 0) { + /* The paper suggest using the L-0.5 norm, but experiments show that it + * doesn't help. + */ + activeSegment.score += freqs[newDmer]; + } + /* Add the dmer to the segment */ + activeSegment.end += 1; + *newDmerOcc += 1; + + /* If the window is now too large, drop the first position */ + if (activeSegment.end - activeSegment.begin == dmersInK + 1) { + U32 delDmer = ctx->dmerAt[activeSegment.begin]; + U32 *delDmerOcc = COVER_map_at(activeDmers, delDmer); + activeSegment.begin += 1; + *delDmerOcc -= 1; + /* If this is the last occurrence of the dmer, subtract its score */ + if (*delDmerOcc == 0) { + COVER_map_remove(activeDmers, delDmer); + activeSegment.score -= freqs[delDmer]; + } + } + + /* If this segment is the best so far save it */ + if (activeSegment.score > bestSegment.score) { + bestSegment = activeSegment; + } + } + { + /* Trim off the zero frequency head and tail from the segment. */ + U32 newBegin = bestSegment.end; + U32 newEnd = bestSegment.begin; + U32 pos; + for (pos = bestSegment.begin; pos != bestSegment.end; ++pos) { + U32 freq = freqs[ctx->dmerAt[pos]]; + if (freq != 0) { + newBegin = MIN(newBegin, pos); + newEnd = pos + 1; + } + } + bestSegment.begin = newBegin; + bestSegment.end = newEnd; + } + { + /* Zero out the frequency of each dmer covered by the chosen segment. */ + U32 pos; + for (pos = bestSegment.begin; pos != bestSegment.end; ++pos) { + freqs[ctx->dmerAt[pos]] = 0; + } + } + return bestSegment; +} + +/** + * Check the validity of the parameters. + * Returns non-zero if the parameters are valid and 0 otherwise. + */ +static int COVER_checkParameters(ZDICT_cover_params_t parameters, + size_t maxDictSize) { + /* k and d are required parameters */ + if (parameters.d == 0 || parameters.k == 0) { + return 0; + } + /* k <= maxDictSize */ + if (parameters.k > maxDictSize) { + return 0; + } + /* d <= k */ + if (parameters.d > parameters.k) { + return 0; + } + /* 0 < splitPoint <= 1 */ + if (parameters.splitPoint <= 0 || parameters.splitPoint > 1){ + return 0; + } + return 1; +} + +/** + * Clean up a context initialized with `COVER_ctx_init()`. + */ +static void COVER_ctx_destroy(COVER_ctx_t *ctx) { + if (!ctx) { + return; + } + if (ctx->suffix) { + free(ctx->suffix); + ctx->suffix = NULL; + } + if (ctx->freqs) { + free(ctx->freqs); + ctx->freqs = NULL; + } + if (ctx->dmerAt) { + free(ctx->dmerAt); + ctx->dmerAt = NULL; + } + if (ctx->offsets) { + free(ctx->offsets); + ctx->offsets = NULL; + } +} + +/** + * Prepare a context for dictionary building. + * The context is only dependent on the parameter `d` and can be used multiple + * times. + * Returns 0 on success or error code on error. + * The context must be destroyed with `COVER_ctx_destroy()`. + */ +static size_t COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer, + const size_t *samplesSizes, unsigned nbSamples, + unsigned d, double splitPoint) +{ + const BYTE *const samples = (const BYTE *)samplesBuffer; + const size_t totalSamplesSize = COVER_sum(samplesSizes, nbSamples); + /* Split samples into testing and training sets */ + const unsigned nbTrainSamples = splitPoint < 1.0 ? (unsigned)((double)nbSamples * splitPoint) : nbSamples; + const unsigned nbTestSamples = splitPoint < 1.0 ? nbSamples - nbTrainSamples : nbSamples; + const size_t trainingSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes, nbTrainSamples) : totalSamplesSize; + const size_t testSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes + nbTrainSamples, nbTestSamples) : totalSamplesSize; + /* Checks */ + if (totalSamplesSize < MAX(d, sizeof(U64)) || + totalSamplesSize >= (size_t)COVER_MAX_SAMPLES_SIZE) { + DISPLAYLEVEL(1, "Total samples size is too large (%u MB), maximum size is %u MB\n", + (unsigned)(totalSamplesSize>>20), (COVER_MAX_SAMPLES_SIZE >> 20)); + return ERROR(srcSize_wrong); + } + /* Check if there are at least 5 training samples */ + if (nbTrainSamples < 5) { + DISPLAYLEVEL(1, "Total number of training samples is %u and is invalid.", nbTrainSamples); + return ERROR(srcSize_wrong); + } + /* Check if there's testing sample */ + if (nbTestSamples < 1) { + DISPLAYLEVEL(1, "Total number of testing samples is %u and is invalid.", nbTestSamples); + return ERROR(srcSize_wrong); + } + /* Zero the context */ + memset(ctx, 0, sizeof(*ctx)); + DISPLAYLEVEL(2, "Training on %u samples of total size %u\n", nbTrainSamples, + (unsigned)trainingSamplesSize); + DISPLAYLEVEL(2, "Testing on %u samples of total size %u\n", nbTestSamples, + (unsigned)testSamplesSize); + ctx->samples = samples; + ctx->samplesSizes = samplesSizes; + ctx->nbSamples = nbSamples; + ctx->nbTrainSamples = nbTrainSamples; + ctx->nbTestSamples = nbTestSamples; + /* Partial suffix array */ + ctx->suffixSize = trainingSamplesSize - MAX(d, sizeof(U64)) + 1; + ctx->suffix = (U32 *)malloc(ctx->suffixSize * sizeof(U32)); + /* Maps index to the dmerID */ + ctx->dmerAt = (U32 *)malloc(ctx->suffixSize * sizeof(U32)); + /* The offsets of each file */ + ctx->offsets = (size_t *)malloc((nbSamples + 1) * sizeof(size_t)); + if (!ctx->suffix || !ctx->dmerAt || !ctx->offsets) { + DISPLAYLEVEL(1, "Failed to allocate scratch buffers\n"); + COVER_ctx_destroy(ctx); + return ERROR(memory_allocation); + } + ctx->freqs = NULL; + ctx->d = d; + + /* Fill offsets from the samplesSizes */ + { + U32 i; + ctx->offsets[0] = 0; + for (i = 1; i <= nbSamples; ++i) { + ctx->offsets[i] = ctx->offsets[i - 1] + samplesSizes[i - 1]; + } + } + DISPLAYLEVEL(2, "Constructing partial suffix array\n"); + { + /* suffix is a partial suffix array. + * It only sorts suffixes by their first parameters.d bytes. + * The sort is stable, so each dmer group is sorted by position in input. + */ + U32 i; + for (i = 0; i < ctx->suffixSize; ++i) { + ctx->suffix[i] = i; + } + stableSort(ctx); + } + DISPLAYLEVEL(2, "Computing frequencies\n"); + /* For each dmer group (group of positions with the same first d bytes): + * 1. For each position we set dmerAt[position] = dmerID. The dmerID is + * (groupBeginPtr - suffix). This allows us to go from position to + * dmerID so we can look up values in freq. + * 2. We calculate how many samples the dmer occurs in and save it in + * freqs[dmerId]. + */ + COVER_groupBy(ctx->suffix, ctx->suffixSize, sizeof(U32), ctx, + (ctx->d <= 8 ? &COVER_cmp8 : &COVER_cmp), &COVER_group); + ctx->freqs = ctx->suffix; + ctx->suffix = NULL; + return 0; +} + +void COVER_warnOnSmallCorpus(size_t maxDictSize, size_t nbDmers, int displayLevel) +{ + const double ratio = (double)nbDmers / (double)maxDictSize; + if (ratio >= 10) { + return; + } + LOCALDISPLAYLEVEL(displayLevel, 1, + "WARNING: The maximum dictionary size %u is too large " + "compared to the source size %u! " + "size(source)/size(dictionary) = %f, but it should be >= " + "10! This may lead to a subpar dictionary! We recommend " + "training on sources at least 10x, and preferably 100x " + "the size of the dictionary! \n", (U32)maxDictSize, + (U32)nbDmers, ratio); +} + +COVER_epoch_info_t COVER_computeEpochs(U32 maxDictSize, + U32 nbDmers, U32 k, U32 passes) +{ + const U32 minEpochSize = k * 10; + COVER_epoch_info_t epochs; + epochs.num = MAX(1, maxDictSize / k / passes); + epochs.size = nbDmers / epochs.num; + if (epochs.size >= minEpochSize) { + assert(epochs.size * epochs.num <= nbDmers); + return epochs; + } + epochs.size = MIN(minEpochSize, nbDmers); + epochs.num = nbDmers / epochs.size; + assert(epochs.size * epochs.num <= nbDmers); + return epochs; +} + +/** + * Given the prepared context build the dictionary. + */ +static size_t COVER_buildDictionary(const COVER_ctx_t *ctx, U32 *freqs, + COVER_map_t *activeDmers, void *dictBuffer, + size_t dictBufferCapacity, + ZDICT_cover_params_t parameters) { + BYTE *const dict = (BYTE *)dictBuffer; + size_t tail = dictBufferCapacity; + /* Divide the data into epochs. We will select one segment from each epoch. */ + const COVER_epoch_info_t epochs = COVER_computeEpochs( + (U32)dictBufferCapacity, (U32)ctx->suffixSize, parameters.k, 4); + const size_t maxZeroScoreRun = MAX(10, MIN(100, epochs.num >> 3)); + size_t zeroScoreRun = 0; + size_t epoch; + DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n", + (U32)epochs.num, (U32)epochs.size); + /* Loop through the epochs until there are no more segments or the dictionary + * is full. + */ + for (epoch = 0; tail > 0; epoch = (epoch + 1) % epochs.num) { + const U32 epochBegin = (U32)(epoch * epochs.size); + const U32 epochEnd = epochBegin + epochs.size; + size_t segmentSize; + /* Select a segment */ + COVER_segment_t segment = COVER_selectSegment( + ctx, freqs, activeDmers, epochBegin, epochEnd, parameters); + /* If the segment covers no dmers, then we are out of content. + * There may be new content in other epochs, for continue for some time. + */ + if (segment.score == 0) { + if (++zeroScoreRun >= maxZeroScoreRun) { + break; + } + continue; + } + zeroScoreRun = 0; + /* Trim the segment if necessary and if it is too small then we are done */ + segmentSize = MIN(segment.end - segment.begin + parameters.d - 1, tail); + if (segmentSize < parameters.d) { + break; + } + /* We fill the dictionary from the back to allow the best segments to be + * referenced with the smallest offsets. + */ + tail -= segmentSize; + memcpy(dict + tail, ctx->samples + segment.begin, segmentSize); + DISPLAYUPDATE( + 2, "\r%u%% ", + (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity)); + } + DISPLAYLEVEL(2, "\r%79s\r", ""); + return tail; +} + +ZDICTLIB_STATIC_API size_t ZDICT_trainFromBuffer_cover( + void *dictBuffer, size_t dictBufferCapacity, + const void *samplesBuffer, const size_t *samplesSizes, unsigned nbSamples, + ZDICT_cover_params_t parameters) +{ + BYTE* const dict = (BYTE*)dictBuffer; + COVER_ctx_t ctx; + COVER_map_t activeDmers; + parameters.splitPoint = 1.0; + /* Initialize global data */ + g_displayLevel = (int)parameters.zParams.notificationLevel; + /* Checks */ + if (!COVER_checkParameters(parameters, dictBufferCapacity)) { + DISPLAYLEVEL(1, "Cover parameters incorrect\n"); + return ERROR(parameter_outOfBound); + } + if (nbSamples == 0) { + DISPLAYLEVEL(1, "Cover must have at least one input file\n"); + return ERROR(srcSize_wrong); + } + if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { + DISPLAYLEVEL(1, "dictBufferCapacity must be at least %u\n", + ZDICT_DICTSIZE_MIN); + return ERROR(dstSize_tooSmall); + } + /* Initialize context and activeDmers */ + { + size_t const initVal = COVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, + parameters.d, parameters.splitPoint); + if (ZSTD_isError(initVal)) { + return initVal; + } + } + COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.suffixSize, g_displayLevel); + if (!COVER_map_init(&activeDmers, parameters.k - parameters.d + 1)) { + DISPLAYLEVEL(1, "Failed to allocate dmer map: out of memory\n"); + COVER_ctx_destroy(&ctx); + return ERROR(memory_allocation); + } + + DISPLAYLEVEL(2, "Building dictionary\n"); + { + const size_t tail = + COVER_buildDictionary(&ctx, ctx.freqs, &activeDmers, dictBuffer, + dictBufferCapacity, parameters); + const size_t dictionarySize = ZDICT_finalizeDictionary( + dict, dictBufferCapacity, dict + tail, dictBufferCapacity - tail, + samplesBuffer, samplesSizes, nbSamples, parameters.zParams); + if (!ZSTD_isError(dictionarySize)) { + DISPLAYLEVEL(2, "Constructed dictionary of size %u\n", + (unsigned)dictionarySize); + } + COVER_ctx_destroy(&ctx); + COVER_map_destroy(&activeDmers); + return dictionarySize; + } +} + + + +size_t COVER_checkTotalCompressedSize(const ZDICT_cover_params_t parameters, + const size_t *samplesSizes, const BYTE *samples, + size_t *offsets, + size_t nbTrainSamples, size_t nbSamples, + BYTE *const dict, size_t dictBufferCapacity) { + size_t totalCompressedSize = ERROR(GENERIC); + /* Pointers */ + ZSTD_CCtx *cctx; + ZSTD_CDict *cdict; + void *dst; + /* Local variables */ + size_t dstCapacity; + size_t i; + /* Allocate dst with enough space to compress the maximum sized sample */ + { + size_t maxSampleSize = 0; + i = parameters.splitPoint < 1.0 ? nbTrainSamples : 0; + for (; i < nbSamples; ++i) { + maxSampleSize = MAX(samplesSizes[i], maxSampleSize); + } + dstCapacity = ZSTD_compressBound(maxSampleSize); + dst = malloc(dstCapacity); + } + /* Create the cctx and cdict */ + cctx = ZSTD_createCCtx(); + cdict = ZSTD_createCDict(dict, dictBufferCapacity, + parameters.zParams.compressionLevel); + if (!dst || !cctx || !cdict) { + goto _compressCleanup; + } + /* Compress each sample and sum their sizes (or error) */ + totalCompressedSize = dictBufferCapacity; + i = parameters.splitPoint < 1.0 ? nbTrainSamples : 0; + for (; i < nbSamples; ++i) { + const size_t size = ZSTD_compress_usingCDict( + cctx, dst, dstCapacity, samples + offsets[i], + samplesSizes[i], cdict); + if (ZSTD_isError(size)) { + totalCompressedSize = size; + goto _compressCleanup; + } + totalCompressedSize += size; + } +_compressCleanup: + ZSTD_freeCCtx(cctx); + ZSTD_freeCDict(cdict); + if (dst) { + free(dst); + } + return totalCompressedSize; +} + + +/** + * Initialize the `COVER_best_t`. + */ +void COVER_best_init(COVER_best_t *best) { + if (best==NULL) return; /* compatible with init on NULL */ + (void)ZSTD_pthread_mutex_init(&best->mutex, NULL); + (void)ZSTD_pthread_cond_init(&best->cond, NULL); + best->liveJobs = 0; + best->dict = NULL; + best->dictSize = 0; + best->compressedSize = (size_t)-1; + memset(&best->parameters, 0, sizeof(best->parameters)); +} + +/** + * Wait until liveJobs == 0. + */ +void COVER_best_wait(COVER_best_t *best) { + if (!best) { + return; + } + ZSTD_pthread_mutex_lock(&best->mutex); + while (best->liveJobs != 0) { + ZSTD_pthread_cond_wait(&best->cond, &best->mutex); + } + ZSTD_pthread_mutex_unlock(&best->mutex); +} + +/** + * Call COVER_best_wait() and then destroy the COVER_best_t. + */ +void COVER_best_destroy(COVER_best_t *best) { + if (!best) { + return; + } + COVER_best_wait(best); + if (best->dict) { + free(best->dict); + } + ZSTD_pthread_mutex_destroy(&best->mutex); + ZSTD_pthread_cond_destroy(&best->cond); +} + +/** + * Called when a thread is about to be launched. + * Increments liveJobs. + */ +void COVER_best_start(COVER_best_t *best) { + if (!best) { + return; + } + ZSTD_pthread_mutex_lock(&best->mutex); + ++best->liveJobs; + ZSTD_pthread_mutex_unlock(&best->mutex); +} + +/** + * Called when a thread finishes executing, both on error or success. + * Decrements liveJobs and signals any waiting threads if liveJobs == 0. + * If this dictionary is the best so far save it and its parameters. + */ +void COVER_best_finish(COVER_best_t* best, + ZDICT_cover_params_t parameters, + COVER_dictSelection_t selection) +{ + void* dict = selection.dictContent; + size_t compressedSize = selection.totalCompressedSize; + size_t dictSize = selection.dictSize; + if (!best) { + return; + } + { + size_t liveJobs; + ZSTD_pthread_mutex_lock(&best->mutex); + --best->liveJobs; + liveJobs = best->liveJobs; + /* If the new dictionary is better */ + if (compressedSize < best->compressedSize) { + /* Allocate space if necessary */ + if (!best->dict || best->dictSize < dictSize) { + if (best->dict) { + free(best->dict); + } + best->dict = malloc(dictSize); + if (!best->dict) { + best->compressedSize = ERROR(GENERIC); + best->dictSize = 0; + ZSTD_pthread_cond_signal(&best->cond); + ZSTD_pthread_mutex_unlock(&best->mutex); + return; + } + } + /* Save the dictionary, parameters, and size */ + if (dict) { + memcpy(best->dict, dict, dictSize); + best->dictSize = dictSize; + best->parameters = parameters; + best->compressedSize = compressedSize; + } + } + if (liveJobs == 0) { + ZSTD_pthread_cond_broadcast(&best->cond); + } + ZSTD_pthread_mutex_unlock(&best->mutex); + } +} + +static COVER_dictSelection_t setDictSelection(BYTE* buf, size_t s, size_t csz) +{ + COVER_dictSelection_t ds; + ds.dictContent = buf; + ds.dictSize = s; + ds.totalCompressedSize = csz; + return ds; +} + +COVER_dictSelection_t COVER_dictSelectionError(size_t error) { + return setDictSelection(NULL, 0, error); +} + +unsigned COVER_dictSelectionIsError(COVER_dictSelection_t selection) { + return (ZSTD_isError(selection.totalCompressedSize) || !selection.dictContent); +} + +void COVER_dictSelectionFree(COVER_dictSelection_t selection){ + free(selection.dictContent); +} + +COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBufferCapacity, + size_t dictContentSize, const BYTE* samplesBuffer, const size_t* samplesSizes, unsigned nbFinalizeSamples, + size_t nbCheckSamples, size_t nbSamples, ZDICT_cover_params_t params, size_t* offsets, size_t totalCompressedSize) { + + size_t largestDict = 0; + size_t largestCompressed = 0; + BYTE* customDictContentEnd = customDictContent + dictContentSize; + + BYTE* largestDictbuffer = (BYTE*)malloc(dictBufferCapacity); + BYTE* candidateDictBuffer = (BYTE*)malloc(dictBufferCapacity); + double regressionTolerance = ((double)params.shrinkDictMaxRegression / 100.0) + 1.00; + + if (!largestDictbuffer || !candidateDictBuffer) { + free(largestDictbuffer); + free(candidateDictBuffer); + return COVER_dictSelectionError(dictContentSize); + } + + /* Initial dictionary size and compressed size */ + memcpy(largestDictbuffer, customDictContent, dictContentSize); + dictContentSize = ZDICT_finalizeDictionary( + largestDictbuffer, dictBufferCapacity, customDictContent, dictContentSize, + samplesBuffer, samplesSizes, nbFinalizeSamples, params.zParams); + + if (ZDICT_isError(dictContentSize)) { + free(largestDictbuffer); + free(candidateDictBuffer); + return COVER_dictSelectionError(dictContentSize); + } + + totalCompressedSize = COVER_checkTotalCompressedSize(params, samplesSizes, + samplesBuffer, offsets, + nbCheckSamples, nbSamples, + largestDictbuffer, dictContentSize); + + if (ZSTD_isError(totalCompressedSize)) { + free(largestDictbuffer); + free(candidateDictBuffer); + return COVER_dictSelectionError(totalCompressedSize); + } + + if (params.shrinkDict == 0) { + free(candidateDictBuffer); + return setDictSelection(largestDictbuffer, dictContentSize, totalCompressedSize); + } + + largestDict = dictContentSize; + largestCompressed = totalCompressedSize; + dictContentSize = ZDICT_DICTSIZE_MIN; + + /* Largest dict is initially at least ZDICT_DICTSIZE_MIN */ + while (dictContentSize < largestDict) { + memcpy(candidateDictBuffer, largestDictbuffer, largestDict); + dictContentSize = ZDICT_finalizeDictionary( + candidateDictBuffer, dictBufferCapacity, customDictContentEnd - dictContentSize, dictContentSize, + samplesBuffer, samplesSizes, nbFinalizeSamples, params.zParams); + + if (ZDICT_isError(dictContentSize)) { + free(largestDictbuffer); + free(candidateDictBuffer); + return COVER_dictSelectionError(dictContentSize); + + } + + totalCompressedSize = COVER_checkTotalCompressedSize(params, samplesSizes, + samplesBuffer, offsets, + nbCheckSamples, nbSamples, + candidateDictBuffer, dictContentSize); + + if (ZSTD_isError(totalCompressedSize)) { + free(largestDictbuffer); + free(candidateDictBuffer); + return COVER_dictSelectionError(totalCompressedSize); + } + + if ((double)totalCompressedSize <= (double)largestCompressed * regressionTolerance) { + free(largestDictbuffer); + return setDictSelection( candidateDictBuffer, dictContentSize, totalCompressedSize ); + } + dictContentSize *= 2; + } + dictContentSize = largestDict; + totalCompressedSize = largestCompressed; + free(candidateDictBuffer); + return setDictSelection( largestDictbuffer, dictContentSize, totalCompressedSize ); +} + +/** + * Parameters for COVER_tryParameters(). + */ +typedef struct COVER_tryParameters_data_s { + const COVER_ctx_t *ctx; + COVER_best_t *best; + size_t dictBufferCapacity; + ZDICT_cover_params_t parameters; +} COVER_tryParameters_data_t; + +/** + * Tries a set of parameters and updates the COVER_best_t with the results. + * This function is thread safe if zstd is compiled with multithreaded support. + * It takes its parameters as an *OWNING* opaque pointer to support threading. + */ +static void COVER_tryParameters(void *opaque) +{ + /* Save parameters as local variables */ + COVER_tryParameters_data_t *const data = (COVER_tryParameters_data_t*)opaque; + const COVER_ctx_t *const ctx = data->ctx; + const ZDICT_cover_params_t parameters = data->parameters; + size_t dictBufferCapacity = data->dictBufferCapacity; + size_t totalCompressedSize = ERROR(GENERIC); + /* Allocate space for hash table, dict, and freqs */ + COVER_map_t activeDmers; + BYTE* const dict = (BYTE*)malloc(dictBufferCapacity); + COVER_dictSelection_t selection = COVER_dictSelectionError(ERROR(GENERIC)); + U32* const freqs = (U32*)malloc(ctx->suffixSize * sizeof(U32)); + if (!COVER_map_init(&activeDmers, parameters.k - parameters.d + 1)) { + DISPLAYLEVEL(1, "Failed to allocate dmer map: out of memory\n"); + goto _cleanup; + } + if (!dict || !freqs) { + DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n"); + goto _cleanup; + } + /* Copy the frequencies because we need to modify them */ + memcpy(freqs, ctx->freqs, ctx->suffixSize * sizeof(U32)); + /* Build the dictionary */ + { + const size_t tail = COVER_buildDictionary(ctx, freqs, &activeDmers, dict, + dictBufferCapacity, parameters); + selection = COVER_selectDict(dict + tail, dictBufferCapacity, dictBufferCapacity - tail, + ctx->samples, ctx->samplesSizes, (unsigned)ctx->nbTrainSamples, ctx->nbTrainSamples, ctx->nbSamples, parameters, ctx->offsets, + totalCompressedSize); + + if (COVER_dictSelectionIsError(selection)) { + DISPLAYLEVEL(1, "Failed to select dictionary\n"); + goto _cleanup; + } + } +_cleanup: + free(dict); + COVER_best_finish(data->best, parameters, selection); + free(data); + COVER_map_destroy(&activeDmers); + COVER_dictSelectionFree(selection); + free(freqs); +} + +ZDICTLIB_STATIC_API size_t ZDICT_optimizeTrainFromBuffer_cover( + void* dictBuffer, size_t dictBufferCapacity, const void* samplesBuffer, + const size_t* samplesSizes, unsigned nbSamples, + ZDICT_cover_params_t* parameters) +{ + /* constants */ + const unsigned nbThreads = parameters->nbThreads; + const double splitPoint = + parameters->splitPoint <= 0.0 ? COVER_DEFAULT_SPLITPOINT : parameters->splitPoint; + const unsigned kMinD = parameters->d == 0 ? 6 : parameters->d; + const unsigned kMaxD = parameters->d == 0 ? 8 : parameters->d; + const unsigned kMinK = parameters->k == 0 ? 50 : parameters->k; + const unsigned kMaxK = parameters->k == 0 ? 2000 : parameters->k; + const unsigned kSteps = parameters->steps == 0 ? 40 : parameters->steps; + const unsigned kStepSize = MAX((kMaxK - kMinK) / kSteps, 1); + const unsigned kIterations = + (1 + (kMaxD - kMinD) / 2) * (1 + (kMaxK - kMinK) / kStepSize); + const unsigned shrinkDict = 0; + /* Local variables */ + const int displayLevel = parameters->zParams.notificationLevel; + unsigned iteration = 1; + unsigned d; + unsigned k; + COVER_best_t best; + POOL_ctx *pool = NULL; + int warned = 0; + + /* Checks */ + if (splitPoint <= 0 || splitPoint > 1) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect parameters\n"); + return ERROR(parameter_outOfBound); + } + if (kMinK < kMaxD || kMaxK < kMinK) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect parameters\n"); + return ERROR(parameter_outOfBound); + } + if (nbSamples == 0) { + DISPLAYLEVEL(1, "Cover must have at least one input file\n"); + return ERROR(srcSize_wrong); + } + if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { + DISPLAYLEVEL(1, "dictBufferCapacity must be at least %u\n", + ZDICT_DICTSIZE_MIN); + return ERROR(dstSize_tooSmall); + } + if (nbThreads > 1) { + pool = POOL_create(nbThreads, 1); + if (!pool) { + return ERROR(memory_allocation); + } + } + /* Initialization */ + COVER_best_init(&best); + /* Turn down global display level to clean up display at level 2 and below */ + g_displayLevel = displayLevel == 0 ? 0 : displayLevel - 1; + /* Loop through d first because each new value needs a new context */ + LOCALDISPLAYLEVEL(displayLevel, 2, "Trying %u different sets of parameters\n", + kIterations); + for (d = kMinD; d <= kMaxD; d += 2) { + /* Initialize the context for this value of d */ + COVER_ctx_t ctx; + LOCALDISPLAYLEVEL(displayLevel, 3, "d=%u\n", d); + { + const size_t initVal = COVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, d, splitPoint); + if (ZSTD_isError(initVal)) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to initialize context\n"); + COVER_best_destroy(&best); + POOL_free(pool); + return initVal; + } + } + if (!warned) { + COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.suffixSize, displayLevel); + warned = 1; + } + /* Loop through k reusing the same context */ + for (k = kMinK; k <= kMaxK; k += kStepSize) { + /* Prepare the arguments */ + COVER_tryParameters_data_t *data = (COVER_tryParameters_data_t *)malloc( + sizeof(COVER_tryParameters_data_t)); + LOCALDISPLAYLEVEL(displayLevel, 3, "k=%u\n", k); + if (!data) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to allocate parameters\n"); + COVER_best_destroy(&best); + COVER_ctx_destroy(&ctx); + POOL_free(pool); + return ERROR(memory_allocation); + } + data->ctx = &ctx; + data->best = &best; + data->dictBufferCapacity = dictBufferCapacity; + data->parameters = *parameters; + data->parameters.k = k; + data->parameters.d = d; + data->parameters.splitPoint = splitPoint; + data->parameters.steps = kSteps; + data->parameters.shrinkDict = shrinkDict; + data->parameters.zParams.notificationLevel = g_displayLevel; + /* Check the parameters */ + if (!COVER_checkParameters(data->parameters, dictBufferCapacity)) { + DISPLAYLEVEL(1, "Cover parameters incorrect\n"); + free(data); + continue; + } + /* Call the function and pass ownership of data to it */ + COVER_best_start(&best); + if (pool) { + POOL_add(pool, &COVER_tryParameters, data); + } else { + COVER_tryParameters(data); + } + /* Print status */ + LOCALDISPLAYUPDATE(displayLevel, 2, "\r%u%% ", + (unsigned)((iteration * 100) / kIterations)); + ++iteration; + } + COVER_best_wait(&best); + COVER_ctx_destroy(&ctx); + } + LOCALDISPLAYLEVEL(displayLevel, 2, "\r%79s\r", ""); + /* Fill the output buffer and parameters with output of the best parameters */ + { + const size_t dictSize = best.dictSize; + if (ZSTD_isError(best.compressedSize)) { + const size_t compressedSize = best.compressedSize; + COVER_best_destroy(&best); + POOL_free(pool); + return compressedSize; + } + *parameters = best.parameters; + memcpy(dictBuffer, best.dict, dictSize); + COVER_best_destroy(&best); + POOL_free(pool); + return dictSize; + } +} diff --git a/cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.h b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.h new file mode 100644 index 0000000000..a5d7506ef6 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/cover.h @@ -0,0 +1,152 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZDICT_STATIC_LINKING_ONLY +# define ZDICT_STATIC_LINKING_ONLY +#endif + +#include "../common/threading.h" /* ZSTD_pthread_mutex_t */ +#include "../common/mem.h" /* U32, BYTE */ +#include "../zdict.h" + +/** + * COVER_best_t is used for two purposes: + * 1. Synchronizing threads. + * 2. Saving the best parameters and dictionary. + * + * All of the methods except COVER_best_init() are thread safe if zstd is + * compiled with multithreaded support. + */ +typedef struct COVER_best_s { + ZSTD_pthread_mutex_t mutex; + ZSTD_pthread_cond_t cond; + size_t liveJobs; + void *dict; + size_t dictSize; + ZDICT_cover_params_t parameters; + size_t compressedSize; +} COVER_best_t; + +/** + * A segment is a range in the source as well as the score of the segment. + */ +typedef struct { + U32 begin; + U32 end; + U32 score; +} COVER_segment_t; + +/** + *Number of epochs and size of each epoch. + */ +typedef struct { + U32 num; + U32 size; +} COVER_epoch_info_t; + +/** + * Struct used for the dictionary selection function. + */ +typedef struct COVER_dictSelection { + BYTE* dictContent; + size_t dictSize; + size_t totalCompressedSize; +} COVER_dictSelection_t; + +/** + * Computes the number of epochs and the size of each epoch. + * We will make sure that each epoch gets at least 10 * k bytes. + * + * The COVER algorithms divide the data up into epochs of equal size and + * select one segment from each epoch. + * + * @param maxDictSize The maximum allowed dictionary size. + * @param nbDmers The number of dmers we are training on. + * @param k The parameter k (segment size). + * @param passes The target number of passes over the dmer corpus. + * More passes means a better dictionary. + */ +COVER_epoch_info_t COVER_computeEpochs(U32 maxDictSize, U32 nbDmers, + U32 k, U32 passes); + +/** + * Warns the user when their corpus is too small. + */ +void COVER_warnOnSmallCorpus(size_t maxDictSize, size_t nbDmers, int displayLevel); + +/** + * Checks total compressed size of a dictionary + */ +size_t COVER_checkTotalCompressedSize(const ZDICT_cover_params_t parameters, + const size_t *samplesSizes, const BYTE *samples, + size_t *offsets, + size_t nbTrainSamples, size_t nbSamples, + BYTE *const dict, size_t dictBufferCapacity); + +/** + * Returns the sum of the sample sizes. + */ +size_t COVER_sum(const size_t *samplesSizes, unsigned nbSamples) ; + +/** + * Initialize the `COVER_best_t`. + */ +void COVER_best_init(COVER_best_t *best); + +/** + * Wait until liveJobs == 0. + */ +void COVER_best_wait(COVER_best_t *best); + +/** + * Call COVER_best_wait() and then destroy the COVER_best_t. + */ +void COVER_best_destroy(COVER_best_t *best); + +/** + * Called when a thread is about to be launched. + * Increments liveJobs. + */ +void COVER_best_start(COVER_best_t *best); + +/** + * Called when a thread finishes executing, both on error or success. + * Decrements liveJobs and signals any waiting threads if liveJobs == 0. + * If this dictionary is the best so far save it and its parameters. + */ +void COVER_best_finish(COVER_best_t *best, ZDICT_cover_params_t parameters, + COVER_dictSelection_t selection); +/** + * Error function for COVER_selectDict function. Checks if the return + * value is an error. + */ +unsigned COVER_dictSelectionIsError(COVER_dictSelection_t selection); + + /** + * Error function for COVER_selectDict function. Returns a struct where + * return.totalCompressedSize is a ZSTD error. + */ +COVER_dictSelection_t COVER_dictSelectionError(size_t error); + +/** + * Always call after selectDict is called to free up used memory from + * newly created dictionary. + */ +void COVER_dictSelectionFree(COVER_dictSelection_t selection); + +/** + * Called to finalize the dictionary and select one based on whether or not + * the shrink-dict flag was enabled. If enabled the dictionary used is the + * smallest dictionary within a specified regression of the compressed size + * from the largest dictionary. + */ + COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBufferCapacity, + size_t dictContentSize, const BYTE* samplesBuffer, const size_t* samplesSizes, unsigned nbFinalizeSamples, + size_t nbCheckSamples, size_t nbSamples, ZDICT_cover_params_t params, size_t* offsets, size_t totalCompressedSize); diff --git a/cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.c b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.c new file mode 100644 index 0000000000..a2870fb3ba --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.c @@ -0,0 +1,1913 @@ +/* + * divsufsort.c for libdivsufsort-lite + * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/*- Compiler specifics -*/ +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wshorten-64-to-32" +#endif + +#if defined(_MSC_VER) +# pragma warning(disable : 4244) +# pragma warning(disable : 4127) /* C4127 : Condition expression is constant */ +#endif + + +/*- Dependencies -*/ +#include +#include +#include + +#include "divsufsort.h" + +/*- Constants -*/ +#if defined(INLINE) +# undef INLINE +#endif +#if !defined(INLINE) +# define INLINE __inline +#endif +#if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1) +# undef ALPHABET_SIZE +#endif +#if !defined(ALPHABET_SIZE) +# define ALPHABET_SIZE (256) +#endif +#define BUCKET_A_SIZE (ALPHABET_SIZE) +#define BUCKET_B_SIZE (ALPHABET_SIZE * ALPHABET_SIZE) +#if defined(SS_INSERTIONSORT_THRESHOLD) +# if SS_INSERTIONSORT_THRESHOLD < 1 +# undef SS_INSERTIONSORT_THRESHOLD +# define SS_INSERTIONSORT_THRESHOLD (1) +# endif +#else +# define SS_INSERTIONSORT_THRESHOLD (8) +#endif +#if defined(SS_BLOCKSIZE) +# if SS_BLOCKSIZE < 0 +# undef SS_BLOCKSIZE +# define SS_BLOCKSIZE (0) +# elif 32768 <= SS_BLOCKSIZE +# undef SS_BLOCKSIZE +# define SS_BLOCKSIZE (32767) +# endif +#else +# define SS_BLOCKSIZE (1024) +#endif +/* minstacksize = log(SS_BLOCKSIZE) / log(3) * 2 */ +#if SS_BLOCKSIZE == 0 +# define SS_MISORT_STACKSIZE (96) +#elif SS_BLOCKSIZE <= 4096 +# define SS_MISORT_STACKSIZE (16) +#else +# define SS_MISORT_STACKSIZE (24) +#endif +#define SS_SMERGE_STACKSIZE (32) +#define TR_INSERTIONSORT_THRESHOLD (8) +#define TR_STACKSIZE (64) + + +/*- Macros -*/ +#ifndef SWAP +# define SWAP(_a, _b) do { t = (_a); (_a) = (_b); (_b) = t; } while(0) +#endif /* SWAP */ +#ifndef MIN +# define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b)) +#endif /* MIN */ +#ifndef MAX +# define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b)) +#endif /* MAX */ +#define STACK_PUSH(_a, _b, _c, _d)\ + do {\ + assert(ssize < STACK_SIZE);\ + stack[ssize].a = (_a), stack[ssize].b = (_b),\ + stack[ssize].c = (_c), stack[ssize++].d = (_d);\ + } while(0) +#define STACK_PUSH5(_a, _b, _c, _d, _e)\ + do {\ + assert(ssize < STACK_SIZE);\ + stack[ssize].a = (_a), stack[ssize].b = (_b),\ + stack[ssize].c = (_c), stack[ssize].d = (_d), stack[ssize++].e = (_e);\ + } while(0) +#define STACK_POP(_a, _b, _c, _d)\ + do {\ + assert(0 <= ssize);\ + if(ssize == 0) { return; }\ + (_a) = stack[--ssize].a, (_b) = stack[ssize].b,\ + (_c) = stack[ssize].c, (_d) = stack[ssize].d;\ + } while(0) +#define STACK_POP5(_a, _b, _c, _d, _e)\ + do {\ + assert(0 <= ssize);\ + if(ssize == 0) { return; }\ + (_a) = stack[--ssize].a, (_b) = stack[ssize].b,\ + (_c) = stack[ssize].c, (_d) = stack[ssize].d, (_e) = stack[ssize].e;\ + } while(0) +#define BUCKET_A(_c0) bucket_A[(_c0)] +#if ALPHABET_SIZE == 256 +#define BUCKET_B(_c0, _c1) (bucket_B[((_c1) << 8) | (_c0)]) +#define BUCKET_BSTAR(_c0, _c1) (bucket_B[((_c0) << 8) | (_c1)]) +#else +#define BUCKET_B(_c0, _c1) (bucket_B[(_c1) * ALPHABET_SIZE + (_c0)]) +#define BUCKET_BSTAR(_c0, _c1) (bucket_B[(_c0) * ALPHABET_SIZE + (_c1)]) +#endif + + +/*- Private Functions -*/ + +static const int lg_table[256]= { + -1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 +}; + +#if (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) + +static INLINE +int +ss_ilg(int n) { +#if SS_BLOCKSIZE == 0 + return (n & 0xffff0000) ? + ((n & 0xff000000) ? + 24 + lg_table[(n >> 24) & 0xff] : + 16 + lg_table[(n >> 16) & 0xff]) : + ((n & 0x0000ff00) ? + 8 + lg_table[(n >> 8) & 0xff] : + 0 + lg_table[(n >> 0) & 0xff]); +#elif SS_BLOCKSIZE < 256 + return lg_table[n]; +#else + return (n & 0xff00) ? + 8 + lg_table[(n >> 8) & 0xff] : + 0 + lg_table[(n >> 0) & 0xff]; +#endif +} + +#endif /* (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) */ + +#if SS_BLOCKSIZE != 0 + +static const int sqq_table[256] = { + 0, 16, 22, 27, 32, 35, 39, 42, 45, 48, 50, 53, 55, 57, 59, 61, + 64, 65, 67, 69, 71, 73, 75, 76, 78, 80, 81, 83, 84, 86, 87, 89, + 90, 91, 93, 94, 96, 97, 98, 99, 101, 102, 103, 104, 106, 107, 108, 109, +110, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, +128, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, +143, 144, 144, 145, 146, 147, 148, 149, 150, 150, 151, 152, 153, 154, 155, 155, +156, 157, 158, 159, 160, 160, 161, 162, 163, 163, 164, 165, 166, 167, 167, 168, +169, 170, 170, 171, 172, 173, 173, 174, 175, 176, 176, 177, 178, 178, 179, 180, +181, 181, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 189, 189, 190, 191, +192, 192, 193, 193, 194, 195, 195, 196, 197, 197, 198, 199, 199, 200, 201, 201, +202, 203, 203, 204, 204, 205, 206, 206, 207, 208, 208, 209, 209, 210, 211, 211, +212, 212, 213, 214, 214, 215, 215, 216, 217, 217, 218, 218, 219, 219, 220, 221, +221, 222, 222, 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, 229, 230, +230, 231, 231, 232, 232, 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, +239, 240, 240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 247, +247, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, 254, 254, 255 +}; + +static INLINE +int +ss_isqrt(int x) { + int y, e; + + if(x >= (SS_BLOCKSIZE * SS_BLOCKSIZE)) { return SS_BLOCKSIZE; } + e = (x & 0xffff0000) ? + ((x & 0xff000000) ? + 24 + lg_table[(x >> 24) & 0xff] : + 16 + lg_table[(x >> 16) & 0xff]) : + ((x & 0x0000ff00) ? + 8 + lg_table[(x >> 8) & 0xff] : + 0 + lg_table[(x >> 0) & 0xff]); + + if(e >= 16) { + y = sqq_table[x >> ((e - 6) - (e & 1))] << ((e >> 1) - 7); + if(e >= 24) { y = (y + 1 + x / y) >> 1; } + y = (y + 1 + x / y) >> 1; + } else if(e >= 8) { + y = (sqq_table[x >> ((e - 6) - (e & 1))] >> (7 - (e >> 1))) + 1; + } else { + return sqq_table[x] >> 4; + } + + return (x < (y * y)) ? y - 1 : y; +} + +#endif /* SS_BLOCKSIZE != 0 */ + + +/*---------------------------------------------------------------------------*/ + +/* Compares two suffixes. */ +static INLINE +int +ss_compare(const unsigned char *T, + const int *p1, const int *p2, + int depth) { + const unsigned char *U1, *U2, *U1n, *U2n; + + for(U1 = T + depth + *p1, + U2 = T + depth + *p2, + U1n = T + *(p1 + 1) + 2, + U2n = T + *(p2 + 1) + 2; + (U1 < U1n) && (U2 < U2n) && (*U1 == *U2); + ++U1, ++U2) { + } + + return U1 < U1n ? + (U2 < U2n ? *U1 - *U2 : 1) : + (U2 < U2n ? -1 : 0); +} + + +/*---------------------------------------------------------------------------*/ + +#if (SS_BLOCKSIZE != 1) && (SS_INSERTIONSORT_THRESHOLD != 1) + +/* Insertionsort for small size groups */ +static +void +ss_insertionsort(const unsigned char *T, const int *PA, + int *first, int *last, int depth) { + int *i, *j; + int t; + int r; + + for(i = last - 2; first <= i; --i) { + for(t = *i, j = i + 1; 0 < (r = ss_compare(T, PA + t, PA + *j, depth));) { + do { *(j - 1) = *j; } while((++j < last) && (*j < 0)); + if(last <= j) { break; } + } + if(r == 0) { *j = ~*j; } + *(j - 1) = t; + } +} + +#endif /* (SS_BLOCKSIZE != 1) && (SS_INSERTIONSORT_THRESHOLD != 1) */ + + +/*---------------------------------------------------------------------------*/ + +#if (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) + +static INLINE +void +ss_fixdown(const unsigned char *Td, const int *PA, + int *SA, int i, int size) { + int j, k; + int v; + int c, d, e; + + for(v = SA[i], c = Td[PA[v]]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { + d = Td[PA[SA[k = j++]]]; + if(d < (e = Td[PA[SA[j]]])) { k = j; d = e; } + if(d <= c) { break; } + } + SA[i] = v; +} + +/* Simple top-down heapsort. */ +static +void +ss_heapsort(const unsigned char *Td, const int *PA, int *SA, int size) { + int i, m; + int t; + + m = size; + if((size % 2) == 0) { + m--; + if(Td[PA[SA[m / 2]]] < Td[PA[SA[m]]]) { SWAP(SA[m], SA[m / 2]); } + } + + for(i = m / 2 - 1; 0 <= i; --i) { ss_fixdown(Td, PA, SA, i, m); } + if((size % 2) == 0) { SWAP(SA[0], SA[m]); ss_fixdown(Td, PA, SA, 0, m); } + for(i = m - 1; 0 < i; --i) { + t = SA[0], SA[0] = SA[i]; + ss_fixdown(Td, PA, SA, 0, i); + SA[i] = t; + } +} + + +/*---------------------------------------------------------------------------*/ + +/* Returns the median of three elements. */ +static INLINE +int * +ss_median3(const unsigned char *Td, const int *PA, + int *v1, int *v2, int *v3) { + int *t; + if(Td[PA[*v1]] > Td[PA[*v2]]) { SWAP(v1, v2); } + if(Td[PA[*v2]] > Td[PA[*v3]]) { + if(Td[PA[*v1]] > Td[PA[*v3]]) { return v1; } + else { return v3; } + } + return v2; +} + +/* Returns the median of five elements. */ +static INLINE +int * +ss_median5(const unsigned char *Td, const int *PA, + int *v1, int *v2, int *v3, int *v4, int *v5) { + int *t; + if(Td[PA[*v2]] > Td[PA[*v3]]) { SWAP(v2, v3); } + if(Td[PA[*v4]] > Td[PA[*v5]]) { SWAP(v4, v5); } + if(Td[PA[*v2]] > Td[PA[*v4]]) { SWAP(v2, v4); SWAP(v3, v5); } + if(Td[PA[*v1]] > Td[PA[*v3]]) { SWAP(v1, v3); } + if(Td[PA[*v1]] > Td[PA[*v4]]) { SWAP(v1, v4); SWAP(v3, v5); } + if(Td[PA[*v3]] > Td[PA[*v4]]) { return v4; } + return v3; +} + +/* Returns the pivot element. */ +static INLINE +int * +ss_pivot(const unsigned char *Td, const int *PA, int *first, int *last) { + int *middle; + int t; + + t = last - first; + middle = first + t / 2; + + if(t <= 512) { + if(t <= 32) { + return ss_median3(Td, PA, first, middle, last - 1); + } else { + t >>= 2; + return ss_median5(Td, PA, first, first + t, middle, last - 1 - t, last - 1); + } + } + t >>= 3; + first = ss_median3(Td, PA, first, first + t, first + (t << 1)); + middle = ss_median3(Td, PA, middle - t, middle, middle + t); + last = ss_median3(Td, PA, last - 1 - (t << 1), last - 1 - t, last - 1); + return ss_median3(Td, PA, first, middle, last); +} + + +/*---------------------------------------------------------------------------*/ + +/* Binary partition for substrings. */ +static INLINE +int * +ss_partition(const int *PA, + int *first, int *last, int depth) { + int *a, *b; + int t; + for(a = first - 1, b = last;;) { + for(; (++a < b) && ((PA[*a] + depth) >= (PA[*a + 1] + 1));) { *a = ~*a; } + for(; (a < --b) && ((PA[*b] + depth) < (PA[*b + 1] + 1));) { } + if(b <= a) { break; } + t = ~*b; + *b = *a; + *a = t; + } + if(first < a) { *first = ~*first; } + return a; +} + +/* Multikey introsort for medium size groups. */ +static +void +ss_mintrosort(const unsigned char *T, const int *PA, + int *first, int *last, + int depth) { +#define STACK_SIZE SS_MISORT_STACKSIZE + struct { int *a, *b, c; int d; } stack[STACK_SIZE]; + const unsigned char *Td; + int *a, *b, *c, *d, *e, *f; + int s, t; + int ssize; + int limit; + int v, x = 0; + + for(ssize = 0, limit = ss_ilg(last - first);;) { + + if((last - first) <= SS_INSERTIONSORT_THRESHOLD) { +#if 1 < SS_INSERTIONSORT_THRESHOLD + if(1 < (last - first)) { ss_insertionsort(T, PA, first, last, depth); } +#endif + STACK_POP(first, last, depth, limit); + continue; + } + + Td = T + depth; + if(limit-- == 0) { ss_heapsort(Td, PA, first, last - first); } + if(limit < 0) { + for(a = first + 1, v = Td[PA[*first]]; a < last; ++a) { + if((x = Td[PA[*a]]) != v) { + if(1 < (a - first)) { break; } + v = x; + first = a; + } + } + if(Td[PA[*first] - 1] < v) { + first = ss_partition(PA, first, a, depth); + } + if((a - first) <= (last - a)) { + if(1 < (a - first)) { + STACK_PUSH(a, last, depth, -1); + last = a, depth += 1, limit = ss_ilg(a - first); + } else { + first = a, limit = -1; + } + } else { + if(1 < (last - a)) { + STACK_PUSH(first, a, depth + 1, ss_ilg(a - first)); + first = a, limit = -1; + } else { + last = a, depth += 1, limit = ss_ilg(a - first); + } + } + continue; + } + + /* choose pivot */ + a = ss_pivot(Td, PA, first, last); + v = Td[PA[*a]]; + SWAP(*first, *a); + + /* partition */ + for(b = first; (++b < last) && ((x = Td[PA[*b]]) == v);) { } + if(((a = b) < last) && (x < v)) { + for(; (++b < last) && ((x = Td[PA[*b]]) <= v);) { + if(x == v) { SWAP(*b, *a); ++a; } + } + } + for(c = last; (b < --c) && ((x = Td[PA[*c]]) == v);) { } + if((b < (d = c)) && (x > v)) { + for(; (b < --c) && ((x = Td[PA[*c]]) >= v);) { + if(x == v) { SWAP(*c, *d); --d; } + } + } + for(; b < c;) { + SWAP(*b, *c); + for(; (++b < c) && ((x = Td[PA[*b]]) <= v);) { + if(x == v) { SWAP(*b, *a); ++a; } + } + for(; (b < --c) && ((x = Td[PA[*c]]) >= v);) { + if(x == v) { SWAP(*c, *d); --d; } + } + } + + if(a <= d) { + c = b - 1; + + if((s = a - first) > (t = b - a)) { s = t; } + for(e = first, f = b - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } + if((s = d - c) > (t = last - d - 1)) { s = t; } + for(e = b, f = last - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } + + a = first + (b - a), c = last - (d - c); + b = (v <= Td[PA[*a] - 1]) ? a : ss_partition(PA, a, c, depth); + + if((a - first) <= (last - c)) { + if((last - c) <= (c - b)) { + STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); + STACK_PUSH(c, last, depth, limit); + last = a; + } else if((a - first) <= (c - b)) { + STACK_PUSH(c, last, depth, limit); + STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); + last = a; + } else { + STACK_PUSH(c, last, depth, limit); + STACK_PUSH(first, a, depth, limit); + first = b, last = c, depth += 1, limit = ss_ilg(c - b); + } + } else { + if((a - first) <= (c - b)) { + STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); + STACK_PUSH(first, a, depth, limit); + first = c; + } else if((last - c) <= (c - b)) { + STACK_PUSH(first, a, depth, limit); + STACK_PUSH(b, c, depth + 1, ss_ilg(c - b)); + first = c; + } else { + STACK_PUSH(first, a, depth, limit); + STACK_PUSH(c, last, depth, limit); + first = b, last = c, depth += 1, limit = ss_ilg(c - b); + } + } + } else { + limit += 1; + if(Td[PA[*first] - 1] < v) { + first = ss_partition(PA, first, last, depth); + limit = ss_ilg(last - first); + } + depth += 1; + } + } +#undef STACK_SIZE +} + +#endif /* (SS_BLOCKSIZE == 0) || (SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE) */ + + +/*---------------------------------------------------------------------------*/ + +#if SS_BLOCKSIZE != 0 + +static INLINE +void +ss_blockswap(int *a, int *b, int n) { + int t; + for(; 0 < n; --n, ++a, ++b) { + t = *a, *a = *b, *b = t; + } +} + +static INLINE +void +ss_rotate(int *first, int *middle, int *last) { + int *a, *b, t; + int l, r; + l = middle - first, r = last - middle; + for(; (0 < l) && (0 < r);) { + if(l == r) { ss_blockswap(first, middle, l); break; } + if(l < r) { + a = last - 1, b = middle - 1; + t = *a; + do { + *a-- = *b, *b-- = *a; + if(b < first) { + *a = t; + last = a; + if((r -= l + 1) <= l) { break; } + a -= 1, b = middle - 1; + t = *a; + } + } while(1); + } else { + a = first, b = middle; + t = *a; + do { + *a++ = *b, *b++ = *a; + if(last <= b) { + *a = t; + first = a + 1; + if((l -= r + 1) <= r) { break; } + a += 1, b = middle; + t = *a; + } + } while(1); + } + } +} + + +/*---------------------------------------------------------------------------*/ + +static +void +ss_inplacemerge(const unsigned char *T, const int *PA, + int *first, int *middle, int *last, + int depth) { + const int *p; + int *a, *b; + int len, half; + int q, r; + int x; + + for(;;) { + if(*(last - 1) < 0) { x = 1; p = PA + ~*(last - 1); } + else { x = 0; p = PA + *(last - 1); } + for(a = first, len = middle - first, half = len >> 1, r = -1; + 0 < len; + len = half, half >>= 1) { + b = a + half; + q = ss_compare(T, PA + ((0 <= *b) ? *b : ~*b), p, depth); + if(q < 0) { + a = b + 1; + half -= (len & 1) ^ 1; + } else { + r = q; + } + } + if(a < middle) { + if(r == 0) { *a = ~*a; } + ss_rotate(a, middle, last); + last -= middle - a; + middle = a; + if(first == middle) { break; } + } + --last; + if(x != 0) { while(*--last < 0) { } } + if(middle == last) { break; } + } +} + + +/*---------------------------------------------------------------------------*/ + +/* Merge-forward with internal buffer. */ +static +void +ss_mergeforward(const unsigned char *T, const int *PA, + int *first, int *middle, int *last, + int *buf, int depth) { + int *a, *b, *c, *bufend; + int t; + int r; + + bufend = buf + (middle - first) - 1; + ss_blockswap(buf, first, middle - first); + + for(t = *(a = first), b = buf, c = middle;;) { + r = ss_compare(T, PA + *b, PA + *c, depth); + if(r < 0) { + do { + *a++ = *b; + if(bufend <= b) { *bufend = t; return; } + *b++ = *a; + } while(*b < 0); + } else if(r > 0) { + do { + *a++ = *c, *c++ = *a; + if(last <= c) { + while(b < bufend) { *a++ = *b, *b++ = *a; } + *a = *b, *b = t; + return; + } + } while(*c < 0); + } else { + *c = ~*c; + do { + *a++ = *b; + if(bufend <= b) { *bufend = t; return; } + *b++ = *a; + } while(*b < 0); + + do { + *a++ = *c, *c++ = *a; + if(last <= c) { + while(b < bufend) { *a++ = *b, *b++ = *a; } + *a = *b, *b = t; + return; + } + } while(*c < 0); + } + } +} + +/* Merge-backward with internal buffer. */ +static +void +ss_mergebackward(const unsigned char *T, const int *PA, + int *first, int *middle, int *last, + int *buf, int depth) { + const int *p1, *p2; + int *a, *b, *c, *bufend; + int t; + int r; + int x; + + bufend = buf + (last - middle) - 1; + ss_blockswap(buf, middle, last - middle); + + x = 0; + if(*bufend < 0) { p1 = PA + ~*bufend; x |= 1; } + else { p1 = PA + *bufend; } + if(*(middle - 1) < 0) { p2 = PA + ~*(middle - 1); x |= 2; } + else { p2 = PA + *(middle - 1); } + for(t = *(a = last - 1), b = bufend, c = middle - 1;;) { + r = ss_compare(T, p1, p2, depth); + if(0 < r) { + if(x & 1) { do { *a-- = *b, *b-- = *a; } while(*b < 0); x ^= 1; } + *a-- = *b; + if(b <= buf) { *buf = t; break; } + *b-- = *a; + if(*b < 0) { p1 = PA + ~*b; x |= 1; } + else { p1 = PA + *b; } + } else if(r < 0) { + if(x & 2) { do { *a-- = *c, *c-- = *a; } while(*c < 0); x ^= 2; } + *a-- = *c, *c-- = *a; + if(c < first) { + while(buf < b) { *a-- = *b, *b-- = *a; } + *a = *b, *b = t; + break; + } + if(*c < 0) { p2 = PA + ~*c; x |= 2; } + else { p2 = PA + *c; } + } else { + if(x & 1) { do { *a-- = *b, *b-- = *a; } while(*b < 0); x ^= 1; } + *a-- = ~*b; + if(b <= buf) { *buf = t; break; } + *b-- = *a; + if(x & 2) { do { *a-- = *c, *c-- = *a; } while(*c < 0); x ^= 2; } + *a-- = *c, *c-- = *a; + if(c < first) { + while(buf < b) { *a-- = *b, *b-- = *a; } + *a = *b, *b = t; + break; + } + if(*b < 0) { p1 = PA + ~*b; x |= 1; } + else { p1 = PA + *b; } + if(*c < 0) { p2 = PA + ~*c; x |= 2; } + else { p2 = PA + *c; } + } + } +} + +/* D&C based merge. */ +static +void +ss_swapmerge(const unsigned char *T, const int *PA, + int *first, int *middle, int *last, + int *buf, int bufsize, int depth) { +#define STACK_SIZE SS_SMERGE_STACKSIZE +#define GETIDX(a) ((0 <= (a)) ? (a) : (~(a))) +#define MERGE_CHECK(a, b, c)\ + do {\ + if(((c) & 1) ||\ + (((c) & 2) && (ss_compare(T, PA + GETIDX(*((a) - 1)), PA + *(a), depth) == 0))) {\ + *(a) = ~*(a);\ + }\ + if(((c) & 4) && ((ss_compare(T, PA + GETIDX(*((b) - 1)), PA + *(b), depth) == 0))) {\ + *(b) = ~*(b);\ + }\ + } while(0) + struct { int *a, *b, *c; int d; } stack[STACK_SIZE]; + int *l, *r, *lm, *rm; + int m, len, half; + int ssize; + int check, next; + + for(check = 0, ssize = 0;;) { + if((last - middle) <= bufsize) { + if((first < middle) && (middle < last)) { + ss_mergebackward(T, PA, first, middle, last, buf, depth); + } + MERGE_CHECK(first, last, check); + STACK_POP(first, middle, last, check); + continue; + } + + if((middle - first) <= bufsize) { + if(first < middle) { + ss_mergeforward(T, PA, first, middle, last, buf, depth); + } + MERGE_CHECK(first, last, check); + STACK_POP(first, middle, last, check); + continue; + } + + for(m = 0, len = MIN(middle - first, last - middle), half = len >> 1; + 0 < len; + len = half, half >>= 1) { + if(ss_compare(T, PA + GETIDX(*(middle + m + half)), + PA + GETIDX(*(middle - m - half - 1)), depth) < 0) { + m += half + 1; + half -= (len & 1) ^ 1; + } + } + + if(0 < m) { + lm = middle - m, rm = middle + m; + ss_blockswap(lm, middle, m); + l = r = middle, next = 0; + if(rm < last) { + if(*rm < 0) { + *rm = ~*rm; + if(first < lm) { for(; *--l < 0;) { } next |= 4; } + next |= 1; + } else if(first < lm) { + for(; *r < 0; ++r) { } + next |= 2; + } + } + + if((l - first) <= (last - r)) { + STACK_PUSH(r, rm, last, (next & 3) | (check & 4)); + middle = lm, last = l, check = (check & 3) | (next & 4); + } else { + if((next & 2) && (r == middle)) { next ^= 6; } + STACK_PUSH(first, lm, l, (check & 3) | (next & 4)); + first = r, middle = rm, check = (next & 3) | (check & 4); + } + } else { + if(ss_compare(T, PA + GETIDX(*(middle - 1)), PA + *middle, depth) == 0) { + *middle = ~*middle; + } + MERGE_CHECK(first, last, check); + STACK_POP(first, middle, last, check); + } + } +#undef STACK_SIZE +} + +#endif /* SS_BLOCKSIZE != 0 */ + + +/*---------------------------------------------------------------------------*/ + +/* Substring sort */ +static +void +sssort(const unsigned char *T, const int *PA, + int *first, int *last, + int *buf, int bufsize, + int depth, int n, int lastsuffix) { + int *a; +#if SS_BLOCKSIZE != 0 + int *b, *middle, *curbuf; + int j, k, curbufsize, limit; +#endif + int i; + + if(lastsuffix != 0) { ++first; } + +#if SS_BLOCKSIZE == 0 + ss_mintrosort(T, PA, first, last, depth); +#else + if((bufsize < SS_BLOCKSIZE) && + (bufsize < (last - first)) && + (bufsize < (limit = ss_isqrt(last - first)))) { + if(SS_BLOCKSIZE < limit) { limit = SS_BLOCKSIZE; } + buf = middle = last - limit, bufsize = limit; + } else { + middle = last, limit = 0; + } + for(a = first, i = 0; SS_BLOCKSIZE < (middle - a); a += SS_BLOCKSIZE, ++i) { +#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE + ss_mintrosort(T, PA, a, a + SS_BLOCKSIZE, depth); +#elif 1 < SS_BLOCKSIZE + ss_insertionsort(T, PA, a, a + SS_BLOCKSIZE, depth); +#endif + curbufsize = last - (a + SS_BLOCKSIZE); + curbuf = a + SS_BLOCKSIZE; + if(curbufsize <= bufsize) { curbufsize = bufsize, curbuf = buf; } + for(b = a, k = SS_BLOCKSIZE, j = i; j & 1; b -= k, k <<= 1, j >>= 1) { + ss_swapmerge(T, PA, b - k, b, b + k, curbuf, curbufsize, depth); + } + } +#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE + ss_mintrosort(T, PA, a, middle, depth); +#elif 1 < SS_BLOCKSIZE + ss_insertionsort(T, PA, a, middle, depth); +#endif + for(k = SS_BLOCKSIZE; i != 0; k <<= 1, i >>= 1) { + if(i & 1) { + ss_swapmerge(T, PA, a - k, a, middle, buf, bufsize, depth); + a -= k; + } + } + if(limit != 0) { +#if SS_INSERTIONSORT_THRESHOLD < SS_BLOCKSIZE + ss_mintrosort(T, PA, middle, last, depth); +#elif 1 < SS_BLOCKSIZE + ss_insertionsort(T, PA, middle, last, depth); +#endif + ss_inplacemerge(T, PA, first, middle, last, depth); + } +#endif + + if(lastsuffix != 0) { + /* Insert last type B* suffix. */ + int PAi[2]; PAi[0] = PA[*(first - 1)], PAi[1] = n - 2; + for(a = first, i = *(first - 1); + (a < last) && ((*a < 0) || (0 < ss_compare(T, &(PAi[0]), PA + *a, depth))); + ++a) { + *(a - 1) = *a; + } + *(a - 1) = i; + } +} + + +/*---------------------------------------------------------------------------*/ + +static INLINE +int +tr_ilg(int n) { + return (n & 0xffff0000) ? + ((n & 0xff000000) ? + 24 + lg_table[(n >> 24) & 0xff] : + 16 + lg_table[(n >> 16) & 0xff]) : + ((n & 0x0000ff00) ? + 8 + lg_table[(n >> 8) & 0xff] : + 0 + lg_table[(n >> 0) & 0xff]); +} + + +/*---------------------------------------------------------------------------*/ + +/* Simple insertionsort for small size groups. */ +static +void +tr_insertionsort(const int *ISAd, int *first, int *last) { + int *a, *b; + int t, r; + + for(a = first + 1; a < last; ++a) { + for(t = *a, b = a - 1; 0 > (r = ISAd[t] - ISAd[*b]);) { + do { *(b + 1) = *b; } while((first <= --b) && (*b < 0)); + if(b < first) { break; } + } + if(r == 0) { *b = ~*b; } + *(b + 1) = t; + } +} + + +/*---------------------------------------------------------------------------*/ + +static INLINE +void +tr_fixdown(const int *ISAd, int *SA, int i, int size) { + int j, k; + int v; + int c, d, e; + + for(v = SA[i], c = ISAd[v]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { + d = ISAd[SA[k = j++]]; + if(d < (e = ISAd[SA[j]])) { k = j; d = e; } + if(d <= c) { break; } + } + SA[i] = v; +} + +/* Simple top-down heapsort. */ +static +void +tr_heapsort(const int *ISAd, int *SA, int size) { + int i, m; + int t; + + m = size; + if((size % 2) == 0) { + m--; + if(ISAd[SA[m / 2]] < ISAd[SA[m]]) { SWAP(SA[m], SA[m / 2]); } + } + + for(i = m / 2 - 1; 0 <= i; --i) { tr_fixdown(ISAd, SA, i, m); } + if((size % 2) == 0) { SWAP(SA[0], SA[m]); tr_fixdown(ISAd, SA, 0, m); } + for(i = m - 1; 0 < i; --i) { + t = SA[0], SA[0] = SA[i]; + tr_fixdown(ISAd, SA, 0, i); + SA[i] = t; + } +} + + +/*---------------------------------------------------------------------------*/ + +/* Returns the median of three elements. */ +static INLINE +int * +tr_median3(const int *ISAd, int *v1, int *v2, int *v3) { + int *t; + if(ISAd[*v1] > ISAd[*v2]) { SWAP(v1, v2); } + if(ISAd[*v2] > ISAd[*v3]) { + if(ISAd[*v1] > ISAd[*v3]) { return v1; } + else { return v3; } + } + return v2; +} + +/* Returns the median of five elements. */ +static INLINE +int * +tr_median5(const int *ISAd, + int *v1, int *v2, int *v3, int *v4, int *v5) { + int *t; + if(ISAd[*v2] > ISAd[*v3]) { SWAP(v2, v3); } + if(ISAd[*v4] > ISAd[*v5]) { SWAP(v4, v5); } + if(ISAd[*v2] > ISAd[*v4]) { SWAP(v2, v4); SWAP(v3, v5); } + if(ISAd[*v1] > ISAd[*v3]) { SWAP(v1, v3); } + if(ISAd[*v1] > ISAd[*v4]) { SWAP(v1, v4); SWAP(v3, v5); } + if(ISAd[*v3] > ISAd[*v4]) { return v4; } + return v3; +} + +/* Returns the pivot element. */ +static INLINE +int * +tr_pivot(const int *ISAd, int *first, int *last) { + int *middle; + int t; + + t = last - first; + middle = first + t / 2; + + if(t <= 512) { + if(t <= 32) { + return tr_median3(ISAd, first, middle, last - 1); + } else { + t >>= 2; + return tr_median5(ISAd, first, first + t, middle, last - 1 - t, last - 1); + } + } + t >>= 3; + first = tr_median3(ISAd, first, first + t, first + (t << 1)); + middle = tr_median3(ISAd, middle - t, middle, middle + t); + last = tr_median3(ISAd, last - 1 - (t << 1), last - 1 - t, last - 1); + return tr_median3(ISAd, first, middle, last); +} + + +/*---------------------------------------------------------------------------*/ + +typedef struct _trbudget_t trbudget_t; +struct _trbudget_t { + int chance; + int remain; + int incval; + int count; +}; + +static INLINE +void +trbudget_init(trbudget_t *budget, int chance, int incval) { + budget->chance = chance; + budget->remain = budget->incval = incval; +} + +static INLINE +int +trbudget_check(trbudget_t *budget, int size) { + if(size <= budget->remain) { budget->remain -= size; return 1; } + if(budget->chance == 0) { budget->count += size; return 0; } + budget->remain += budget->incval - size; + budget->chance -= 1; + return 1; +} + + +/*---------------------------------------------------------------------------*/ + +static INLINE +void +tr_partition(const int *ISAd, + int *first, int *middle, int *last, + int **pa, int **pb, int v) { + int *a, *b, *c, *d, *e, *f; + int t, s; + int x = 0; + + for(b = middle - 1; (++b < last) && ((x = ISAd[*b]) == v);) { } + if(((a = b) < last) && (x < v)) { + for(; (++b < last) && ((x = ISAd[*b]) <= v);) { + if(x == v) { SWAP(*b, *a); ++a; } + } + } + for(c = last; (b < --c) && ((x = ISAd[*c]) == v);) { } + if((b < (d = c)) && (x > v)) { + for(; (b < --c) && ((x = ISAd[*c]) >= v);) { + if(x == v) { SWAP(*c, *d); --d; } + } + } + for(; b < c;) { + SWAP(*b, *c); + for(; (++b < c) && ((x = ISAd[*b]) <= v);) { + if(x == v) { SWAP(*b, *a); ++a; } + } + for(; (b < --c) && ((x = ISAd[*c]) >= v);) { + if(x == v) { SWAP(*c, *d); --d; } + } + } + + if(a <= d) { + c = b - 1; + if((s = a - first) > (t = b - a)) { s = t; } + for(e = first, f = b - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } + if((s = d - c) > (t = last - d - 1)) { s = t; } + for(e = b, f = last - s; 0 < s; --s, ++e, ++f) { SWAP(*e, *f); } + first += (b - a), last -= (d - c); + } + *pa = first, *pb = last; +} + +static +void +tr_copy(int *ISA, const int *SA, + int *first, int *a, int *b, int *last, + int depth) { + /* sort suffixes of middle partition + by using sorted order of suffixes of left and right partition. */ + int *c, *d, *e; + int s, v; + + v = b - SA - 1; + for(c = first, d = a - 1; c <= d; ++c) { + if((0 <= (s = *c - depth)) && (ISA[s] == v)) { + *++d = s; + ISA[s] = d - SA; + } + } + for(c = last - 1, e = d + 1, d = b; e < d; --c) { + if((0 <= (s = *c - depth)) && (ISA[s] == v)) { + *--d = s; + ISA[s] = d - SA; + } + } +} + +static +void +tr_partialcopy(int *ISA, const int *SA, + int *first, int *a, int *b, int *last, + int depth) { + int *c, *d, *e; + int s, v; + int rank, lastrank, newrank = -1; + + v = b - SA - 1; + lastrank = -1; + for(c = first, d = a - 1; c <= d; ++c) { + if((0 <= (s = *c - depth)) && (ISA[s] == v)) { + *++d = s; + rank = ISA[s + depth]; + if(lastrank != rank) { lastrank = rank; newrank = d - SA; } + ISA[s] = newrank; + } + } + + lastrank = -1; + for(e = d; first <= e; --e) { + rank = ISA[*e]; + if(lastrank != rank) { lastrank = rank; newrank = e - SA; } + if(newrank != rank) { ISA[*e] = newrank; } + } + + lastrank = -1; + for(c = last - 1, e = d + 1, d = b; e < d; --c) { + if((0 <= (s = *c - depth)) && (ISA[s] == v)) { + *--d = s; + rank = ISA[s + depth]; + if(lastrank != rank) { lastrank = rank; newrank = d - SA; } + ISA[s] = newrank; + } + } +} + +static +void +tr_introsort(int *ISA, const int *ISAd, + int *SA, int *first, int *last, + trbudget_t *budget) { +#define STACK_SIZE TR_STACKSIZE + struct { const int *a; int *b, *c; int d, e; }stack[STACK_SIZE]; + int *a, *b, *c; + int t; + int v, x = 0; + int incr = ISAd - ISA; + int limit, next; + int ssize, trlink = -1; + + for(ssize = 0, limit = tr_ilg(last - first);;) { + + if(limit < 0) { + if(limit == -1) { + /* tandem repeat partition */ + tr_partition(ISAd - incr, first, first, last, &a, &b, last - SA - 1); + + /* update ranks */ + if(a < last) { + for(c = first, v = a - SA - 1; c < a; ++c) { ISA[*c] = v; } + } + if(b < last) { + for(c = a, v = b - SA - 1; c < b; ++c) { ISA[*c] = v; } + } + + /* push */ + if(1 < (b - a)) { + STACK_PUSH5(NULL, a, b, 0, 0); + STACK_PUSH5(ISAd - incr, first, last, -2, trlink); + trlink = ssize - 2; + } + if((a - first) <= (last - b)) { + if(1 < (a - first)) { + STACK_PUSH5(ISAd, b, last, tr_ilg(last - b), trlink); + last = a, limit = tr_ilg(a - first); + } else if(1 < (last - b)) { + first = b, limit = tr_ilg(last - b); + } else { + STACK_POP5(ISAd, first, last, limit, trlink); + } + } else { + if(1 < (last - b)) { + STACK_PUSH5(ISAd, first, a, tr_ilg(a - first), trlink); + first = b, limit = tr_ilg(last - b); + } else if(1 < (a - first)) { + last = a, limit = tr_ilg(a - first); + } else { + STACK_POP5(ISAd, first, last, limit, trlink); + } + } + } else if(limit == -2) { + /* tandem repeat copy */ + a = stack[--ssize].b, b = stack[ssize].c; + if(stack[ssize].d == 0) { + tr_copy(ISA, SA, first, a, b, last, ISAd - ISA); + } else { + if(0 <= trlink) { stack[trlink].d = -1; } + tr_partialcopy(ISA, SA, first, a, b, last, ISAd - ISA); + } + STACK_POP5(ISAd, first, last, limit, trlink); + } else { + /* sorted partition */ + if(0 <= *first) { + a = first; + do { ISA[*a] = a - SA; } while((++a < last) && (0 <= *a)); + first = a; + } + if(first < last) { + a = first; do { *a = ~*a; } while(*++a < 0); + next = (ISA[*a] != ISAd[*a]) ? tr_ilg(a - first + 1) : -1; + if(++a < last) { for(b = first, v = a - SA - 1; b < a; ++b) { ISA[*b] = v; } } + + /* push */ + if(trbudget_check(budget, a - first)) { + if((a - first) <= (last - a)) { + STACK_PUSH5(ISAd, a, last, -3, trlink); + ISAd += incr, last = a, limit = next; + } else { + if(1 < (last - a)) { + STACK_PUSH5(ISAd + incr, first, a, next, trlink); + first = a, limit = -3; + } else { + ISAd += incr, last = a, limit = next; + } + } + } else { + if(0 <= trlink) { stack[trlink].d = -1; } + if(1 < (last - a)) { + first = a, limit = -3; + } else { + STACK_POP5(ISAd, first, last, limit, trlink); + } + } + } else { + STACK_POP5(ISAd, first, last, limit, trlink); + } + } + continue; + } + + if((last - first) <= TR_INSERTIONSORT_THRESHOLD) { + tr_insertionsort(ISAd, first, last); + limit = -3; + continue; + } + + if(limit-- == 0) { + tr_heapsort(ISAd, first, last - first); + for(a = last - 1; first < a; a = b) { + for(x = ISAd[*a], b = a - 1; (first <= b) && (ISAd[*b] == x); --b) { *b = ~*b; } + } + limit = -3; + continue; + } + + /* choose pivot */ + a = tr_pivot(ISAd, first, last); + SWAP(*first, *a); + v = ISAd[*first]; + + /* partition */ + tr_partition(ISAd, first, first + 1, last, &a, &b, v); + if((last - first) != (b - a)) { + next = (ISA[*a] != v) ? tr_ilg(b - a) : -1; + + /* update ranks */ + for(c = first, v = a - SA - 1; c < a; ++c) { ISA[*c] = v; } + if(b < last) { for(c = a, v = b - SA - 1; c < b; ++c) { ISA[*c] = v; } } + + /* push */ + if((1 < (b - a)) && (trbudget_check(budget, b - a))) { + if((a - first) <= (last - b)) { + if((last - b) <= (b - a)) { + if(1 < (a - first)) { + STACK_PUSH5(ISAd + incr, a, b, next, trlink); + STACK_PUSH5(ISAd, b, last, limit, trlink); + last = a; + } else if(1 < (last - b)) { + STACK_PUSH5(ISAd + incr, a, b, next, trlink); + first = b; + } else { + ISAd += incr, first = a, last = b, limit = next; + } + } else if((a - first) <= (b - a)) { + if(1 < (a - first)) { + STACK_PUSH5(ISAd, b, last, limit, trlink); + STACK_PUSH5(ISAd + incr, a, b, next, trlink); + last = a; + } else { + STACK_PUSH5(ISAd, b, last, limit, trlink); + ISAd += incr, first = a, last = b, limit = next; + } + } else { + STACK_PUSH5(ISAd, b, last, limit, trlink); + STACK_PUSH5(ISAd, first, a, limit, trlink); + ISAd += incr, first = a, last = b, limit = next; + } + } else { + if((a - first) <= (b - a)) { + if(1 < (last - b)) { + STACK_PUSH5(ISAd + incr, a, b, next, trlink); + STACK_PUSH5(ISAd, first, a, limit, trlink); + first = b; + } else if(1 < (a - first)) { + STACK_PUSH5(ISAd + incr, a, b, next, trlink); + last = a; + } else { + ISAd += incr, first = a, last = b, limit = next; + } + } else if((last - b) <= (b - a)) { + if(1 < (last - b)) { + STACK_PUSH5(ISAd, first, a, limit, trlink); + STACK_PUSH5(ISAd + incr, a, b, next, trlink); + first = b; + } else { + STACK_PUSH5(ISAd, first, a, limit, trlink); + ISAd += incr, first = a, last = b, limit = next; + } + } else { + STACK_PUSH5(ISAd, first, a, limit, trlink); + STACK_PUSH5(ISAd, b, last, limit, trlink); + ISAd += incr, first = a, last = b, limit = next; + } + } + } else { + if((1 < (b - a)) && (0 <= trlink)) { stack[trlink].d = -1; } + if((a - first) <= (last - b)) { + if(1 < (a - first)) { + STACK_PUSH5(ISAd, b, last, limit, trlink); + last = a; + } else if(1 < (last - b)) { + first = b; + } else { + STACK_POP5(ISAd, first, last, limit, trlink); + } + } else { + if(1 < (last - b)) { + STACK_PUSH5(ISAd, first, a, limit, trlink); + first = b; + } else if(1 < (a - first)) { + last = a; + } else { + STACK_POP5(ISAd, first, last, limit, trlink); + } + } + } + } else { + if(trbudget_check(budget, last - first)) { + limit = tr_ilg(last - first), ISAd += incr; + } else { + if(0 <= trlink) { stack[trlink].d = -1; } + STACK_POP5(ISAd, first, last, limit, trlink); + } + } + } +#undef STACK_SIZE +} + + + +/*---------------------------------------------------------------------------*/ + +/* Tandem repeat sort */ +static +void +trsort(int *ISA, int *SA, int n, int depth) { + int *ISAd; + int *first, *last; + trbudget_t budget; + int t, skip, unsorted; + + trbudget_init(&budget, tr_ilg(n) * 2 / 3, n); +/* trbudget_init(&budget, tr_ilg(n) * 3 / 4, n); */ + for(ISAd = ISA + depth; -n < *SA; ISAd += ISAd - ISA) { + first = SA; + skip = 0; + unsorted = 0; + do { + if((t = *first) < 0) { first -= t; skip += t; } + else { + if(skip != 0) { *(first + skip) = skip; skip = 0; } + last = SA + ISA[t] + 1; + if(1 < (last - first)) { + budget.count = 0; + tr_introsort(ISA, ISAd, SA, first, last, &budget); + if(budget.count != 0) { unsorted += budget.count; } + else { skip = first - last; } + } else if((last - first) == 1) { + skip = -1; + } + first = last; + } + } while(first < (SA + n)); + if(skip != 0) { *(first + skip) = skip; } + if(unsorted == 0) { break; } + } +} + + +/*---------------------------------------------------------------------------*/ + +/* Sorts suffixes of type B*. */ +static +int +sort_typeBstar(const unsigned char *T, int *SA, + int *bucket_A, int *bucket_B, + int n, int openMP) { + int *PAb, *ISAb, *buf; +#ifdef LIBBSC_OPENMP + int *curbuf; + int l; +#endif + int i, j, k, t, m, bufsize; + int c0, c1; +#ifdef LIBBSC_OPENMP + int d0, d1; +#endif + (void)openMP; + + /* Initialize bucket arrays. */ + for(i = 0; i < BUCKET_A_SIZE; ++i) { bucket_A[i] = 0; } + for(i = 0; i < BUCKET_B_SIZE; ++i) { bucket_B[i] = 0; } + + /* Count the number of occurrences of the first one or two characters of each + type A, B and B* suffix. Moreover, store the beginning position of all + type B* suffixes into the array SA. */ + for(i = n - 1, m = n, c0 = T[n - 1]; 0 <= i;) { + /* type A suffix. */ + do { ++BUCKET_A(c1 = c0); } while((0 <= --i) && ((c0 = T[i]) >= c1)); + if(0 <= i) { + /* type B* suffix. */ + ++BUCKET_BSTAR(c0, c1); + SA[--m] = i; + /* type B suffix. */ + for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) <= c1); --i, c1 = c0) { + ++BUCKET_B(c0, c1); + } + } + } + m = n - m; +/* +note: + A type B* suffix is lexicographically smaller than a type B suffix that + begins with the same first two characters. +*/ + + /* Calculate the index of start/end point of each bucket. */ + for(c0 = 0, i = 0, j = 0; c0 < ALPHABET_SIZE; ++c0) { + t = i + BUCKET_A(c0); + BUCKET_A(c0) = i + j; /* start point */ + i = t + BUCKET_B(c0, c0); + for(c1 = c0 + 1; c1 < ALPHABET_SIZE; ++c1) { + j += BUCKET_BSTAR(c0, c1); + BUCKET_BSTAR(c0, c1) = j; /* end point */ + i += BUCKET_B(c0, c1); + } + } + + if(0 < m) { + /* Sort the type B* suffixes by their first two characters. */ + PAb = SA + n - m; ISAb = SA + m; + for(i = m - 2; 0 <= i; --i) { + t = PAb[i], c0 = T[t], c1 = T[t + 1]; + SA[--BUCKET_BSTAR(c0, c1)] = i; + } + t = PAb[m - 1], c0 = T[t], c1 = T[t + 1]; + SA[--BUCKET_BSTAR(c0, c1)] = m - 1; + + /* Sort the type B* substrings using sssort. */ +#ifdef LIBBSC_OPENMP + if (openMP) + { + buf = SA + m; + c0 = ALPHABET_SIZE - 2, c1 = ALPHABET_SIZE - 1, j = m; +#pragma omp parallel default(shared) private(bufsize, curbuf, k, l, d0, d1) + { + bufsize = (n - (2 * m)) / omp_get_num_threads(); + curbuf = buf + omp_get_thread_num() * bufsize; + k = 0; + for(;;) { + #pragma omp critical(sssort_lock) + { + if(0 < (l = j)) { + d0 = c0, d1 = c1; + do { + k = BUCKET_BSTAR(d0, d1); + if(--d1 <= d0) { + d1 = ALPHABET_SIZE - 1; + if(--d0 < 0) { break; } + } + } while(((l - k) <= 1) && (0 < (l = k))); + c0 = d0, c1 = d1, j = k; + } + } + if(l == 0) { break; } + sssort(T, PAb, SA + k, SA + l, + curbuf, bufsize, 2, n, *(SA + k) == (m - 1)); + } + } + } + else + { + buf = SA + m, bufsize = n - (2 * m); + for(c0 = ALPHABET_SIZE - 2, j = m; 0 < j; --c0) { + for(c1 = ALPHABET_SIZE - 1; c0 < c1; j = i, --c1) { + i = BUCKET_BSTAR(c0, c1); + if(1 < (j - i)) { + sssort(T, PAb, SA + i, SA + j, + buf, bufsize, 2, n, *(SA + i) == (m - 1)); + } + } + } + } +#else + buf = SA + m, bufsize = n - (2 * m); + for(c0 = ALPHABET_SIZE - 2, j = m; 0 < j; --c0) { + for(c1 = ALPHABET_SIZE - 1; c0 < c1; j = i, --c1) { + i = BUCKET_BSTAR(c0, c1); + if(1 < (j - i)) { + sssort(T, PAb, SA + i, SA + j, + buf, bufsize, 2, n, *(SA + i) == (m - 1)); + } + } + } +#endif + + /* Compute ranks of type B* substrings. */ + for(i = m - 1; 0 <= i; --i) { + if(0 <= SA[i]) { + j = i; + do { ISAb[SA[i]] = i; } while((0 <= --i) && (0 <= SA[i])); + SA[i + 1] = i - j; + if(i <= 0) { break; } + } + j = i; + do { ISAb[SA[i] = ~SA[i]] = j; } while(SA[--i] < 0); + ISAb[SA[i]] = j; + } + + /* Construct the inverse suffix array of type B* suffixes using trsort. */ + trsort(ISAb, SA, m, 1); + + /* Set the sorted order of type B* suffixes. */ + for(i = n - 1, j = m, c0 = T[n - 1]; 0 <= i;) { + for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) >= c1); --i, c1 = c0) { } + if(0 <= i) { + t = i; + for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) <= c1); --i, c1 = c0) { } + SA[ISAb[--j]] = ((t == 0) || (1 < (t - i))) ? t : ~t; + } + } + + /* Calculate the index of start/end point of each bucket. */ + BUCKET_B(ALPHABET_SIZE - 1, ALPHABET_SIZE - 1) = n; /* end point */ + for(c0 = ALPHABET_SIZE - 2, k = m - 1; 0 <= c0; --c0) { + i = BUCKET_A(c0 + 1) - 1; + for(c1 = ALPHABET_SIZE - 1; c0 < c1; --c1) { + t = i - BUCKET_B(c0, c1); + BUCKET_B(c0, c1) = i; /* end point */ + + /* Move all type B* suffixes to the correct position. */ + for(i = t, j = BUCKET_BSTAR(c0, c1); + j <= k; + --i, --k) { SA[i] = SA[k]; } + } + BUCKET_BSTAR(c0, c0 + 1) = i - BUCKET_B(c0, c0) + 1; /* start point */ + BUCKET_B(c0, c0) = i; /* end point */ + } + } + + return m; +} + +/* Constructs the suffix array by using the sorted order of type B* suffixes. */ +static +void +construct_SA(const unsigned char *T, int *SA, + int *bucket_A, int *bucket_B, + int n, int m) { + int *i, *j, *k; + int s; + int c0, c1, c2; + + if(0 < m) { + /* Construct the sorted order of type B suffixes by using + the sorted order of type B* suffixes. */ + for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { + /* Scan the suffix array from right to left. */ + for(i = SA + BUCKET_BSTAR(c1, c1 + 1), + j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; + i <= j; + --j) { + if(0 < (s = *j)) { + assert(T[s] == c1); + assert(((s + 1) < n) && (T[s] <= T[s + 1])); + assert(T[s - 1] <= T[s]); + *j = ~s; + c0 = T[--s]; + if((0 < s) && (T[s - 1] > c0)) { s = ~s; } + if(c0 != c2) { + if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } + k = SA + BUCKET_B(c2 = c0, c1); + } + assert(k < j); assert(k != NULL); + *k-- = s; + } else { + assert(((s == 0) && (T[s] == c1)) || (s < 0)); + *j = ~s; + } + } + } + } + + /* Construct the suffix array by using + the sorted order of type B suffixes. */ + k = SA + BUCKET_A(c2 = T[n - 1]); + *k++ = (T[n - 2] < c2) ? ~(n - 1) : (n - 1); + /* Scan the suffix array from left to right. */ + for(i = SA, j = SA + n; i < j; ++i) { + if(0 < (s = *i)) { + assert(T[s - 1] >= T[s]); + c0 = T[--s]; + if((s == 0) || (T[s - 1] < c0)) { s = ~s; } + if(c0 != c2) { + BUCKET_A(c2) = k - SA; + k = SA + BUCKET_A(c2 = c0); + } + assert(i < k); + *k++ = s; + } else { + assert(s < 0); + *i = ~s; + } + } +} + +/* Constructs the burrows-wheeler transformed string directly + by using the sorted order of type B* suffixes. */ +static +int +construct_BWT(const unsigned char *T, int *SA, + int *bucket_A, int *bucket_B, + int n, int m) { + int *i, *j, *k, *orig; + int s; + int c0, c1, c2; + + if(0 < m) { + /* Construct the sorted order of type B suffixes by using + the sorted order of type B* suffixes. */ + for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { + /* Scan the suffix array from right to left. */ + for(i = SA + BUCKET_BSTAR(c1, c1 + 1), + j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; + i <= j; + --j) { + if(0 < (s = *j)) { + assert(T[s] == c1); + assert(((s + 1) < n) && (T[s] <= T[s + 1])); + assert(T[s - 1] <= T[s]); + c0 = T[--s]; + *j = ~((int)c0); + if((0 < s) && (T[s - 1] > c0)) { s = ~s; } + if(c0 != c2) { + if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } + k = SA + BUCKET_B(c2 = c0, c1); + } + assert(k < j); assert(k != NULL); + *k-- = s; + } else if(s != 0) { + *j = ~s; +#ifndef NDEBUG + } else { + assert(T[s] == c1); +#endif + } + } + } + } + + /* Construct the BWTed string by using + the sorted order of type B suffixes. */ + k = SA + BUCKET_A(c2 = T[n - 1]); + *k++ = (T[n - 2] < c2) ? ~((int)T[n - 2]) : (n - 1); + /* Scan the suffix array from left to right. */ + for(i = SA, j = SA + n, orig = SA; i < j; ++i) { + if(0 < (s = *i)) { + assert(T[s - 1] >= T[s]); + c0 = T[--s]; + *i = c0; + if((0 < s) && (T[s - 1] < c0)) { s = ~((int)T[s - 1]); } + if(c0 != c2) { + BUCKET_A(c2) = k - SA; + k = SA + BUCKET_A(c2 = c0); + } + assert(i < k); + *k++ = s; + } else if(s != 0) { + *i = ~s; + } else { + orig = i; + } + } + + return orig - SA; +} + +/* Constructs the burrows-wheeler transformed string directly + by using the sorted order of type B* suffixes. */ +static +int +construct_BWT_indexes(const unsigned char *T, int *SA, + int *bucket_A, int *bucket_B, + int n, int m, + unsigned char * num_indexes, int * indexes) { + int *i, *j, *k, *orig; + int s; + int c0, c1, c2; + + int mod = n / 8; + { + mod |= mod >> 1; mod |= mod >> 2; + mod |= mod >> 4; mod |= mod >> 8; + mod |= mod >> 16; mod >>= 1; + + *num_indexes = (unsigned char)((n - 1) / (mod + 1)); + } + + if(0 < m) { + /* Construct the sorted order of type B suffixes by using + the sorted order of type B* suffixes. */ + for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) { + /* Scan the suffix array from right to left. */ + for(i = SA + BUCKET_BSTAR(c1, c1 + 1), + j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1; + i <= j; + --j) { + if(0 < (s = *j)) { + assert(T[s] == c1); + assert(((s + 1) < n) && (T[s] <= T[s + 1])); + assert(T[s - 1] <= T[s]); + + if ((s & mod) == 0) indexes[s / (mod + 1) - 1] = j - SA; + + c0 = T[--s]; + *j = ~((int)c0); + if((0 < s) && (T[s - 1] > c0)) { s = ~s; } + if(c0 != c2) { + if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } + k = SA + BUCKET_B(c2 = c0, c1); + } + assert(k < j); assert(k != NULL); + *k-- = s; + } else if(s != 0) { + *j = ~s; +#ifndef NDEBUG + } else { + assert(T[s] == c1); +#endif + } + } + } + } + + /* Construct the BWTed string by using + the sorted order of type B suffixes. */ + k = SA + BUCKET_A(c2 = T[n - 1]); + if (T[n - 2] < c2) { + if (((n - 1) & mod) == 0) indexes[(n - 1) / (mod + 1) - 1] = k - SA; + *k++ = ~((int)T[n - 2]); + } + else { + *k++ = n - 1; + } + + /* Scan the suffix array from left to right. */ + for(i = SA, j = SA + n, orig = SA; i < j; ++i) { + if(0 < (s = *i)) { + assert(T[s - 1] >= T[s]); + + if ((s & mod) == 0) indexes[s / (mod + 1) - 1] = i - SA; + + c0 = T[--s]; + *i = c0; + if(c0 != c2) { + BUCKET_A(c2) = k - SA; + k = SA + BUCKET_A(c2 = c0); + } + assert(i < k); + if((0 < s) && (T[s - 1] < c0)) { + if ((s & mod) == 0) indexes[s / (mod + 1) - 1] = k - SA; + *k++ = ~((int)T[s - 1]); + } else + *k++ = s; + } else if(s != 0) { + *i = ~s; + } else { + orig = i; + } + } + + return orig - SA; +} + + +/*---------------------------------------------------------------------------*/ + +/*- Function -*/ + +int +divsufsort(const unsigned char *T, int *SA, int n, int openMP) { + int *bucket_A, *bucket_B; + int m; + int err = 0; + + /* Check arguments. */ + if((T == NULL) || (SA == NULL) || (n < 0)) { return -1; } + else if(n == 0) { return 0; } + else if(n == 1) { SA[0] = 0; return 0; } + else if(n == 2) { m = (T[0] < T[1]); SA[m ^ 1] = 0, SA[m] = 1; return 0; } + + bucket_A = (int *)malloc(BUCKET_A_SIZE * sizeof(int)); + bucket_B = (int *)malloc(BUCKET_B_SIZE * sizeof(int)); + + /* Suffixsort. */ + if((bucket_A != NULL) && (bucket_B != NULL)) { + m = sort_typeBstar(T, SA, bucket_A, bucket_B, n, openMP); + construct_SA(T, SA, bucket_A, bucket_B, n, m); + } else { + err = -2; + } + + free(bucket_B); + free(bucket_A); + + return err; +} + +int +divbwt(const unsigned char *T, unsigned char *U, int *A, int n, unsigned char * num_indexes, int * indexes, int openMP) { + int *B; + int *bucket_A, *bucket_B; + int m, pidx, i; + + /* Check arguments. */ + if((T == NULL) || (U == NULL) || (n < 0)) { return -1; } + else if(n <= 1) { if(n == 1) { U[0] = T[0]; } return n; } + + if((B = A) == NULL) { B = (int *)malloc((size_t)(n + 1) * sizeof(int)); } + bucket_A = (int *)malloc(BUCKET_A_SIZE * sizeof(int)); + bucket_B = (int *)malloc(BUCKET_B_SIZE * sizeof(int)); + + /* Burrows-Wheeler Transform. */ + if((B != NULL) && (bucket_A != NULL) && (bucket_B != NULL)) { + m = sort_typeBstar(T, B, bucket_A, bucket_B, n, openMP); + + if (num_indexes == NULL || indexes == NULL) { + pidx = construct_BWT(T, B, bucket_A, bucket_B, n, m); + } else { + pidx = construct_BWT_indexes(T, B, bucket_A, bucket_B, n, m, num_indexes, indexes); + } + + /* Copy to output string. */ + U[0] = T[n - 1]; + for(i = 0; i < pidx; ++i) { U[i + 1] = (unsigned char)B[i]; } + for(i += 1; i < n; ++i) { U[i] = (unsigned char)B[i]; } + pidx += 1; + } else { + pidx = -2; + } + + free(bucket_B); + free(bucket_A); + if(A == NULL) { free(B); } + + return pidx; +} diff --git a/cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.h b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.h new file mode 100644 index 0000000000..3ed2b287ab --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/divsufsort.h @@ -0,0 +1,57 @@ +/* + * divsufsort.h for libdivsufsort-lite + * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef _DIVSUFSORT_H +#define _DIVSUFSORT_H 1 + +/*- Prototypes -*/ + +/** + * Constructs the suffix array of a given string. + * @param T [0..n-1] The input string. + * @param SA [0..n-1] The output array of suffixes. + * @param n The length of the given string. + * @param openMP enables OpenMP optimization. + * @return 0 if no error occurred, -1 or -2 otherwise. + */ +int +divsufsort(const unsigned char *T, int *SA, int n, int openMP); + +/** + * Constructs the burrows-wheeler transformed string of a given string. + * @param T [0..n-1] The input string. + * @param U [0..n-1] The output string. (can be T) + * @param A [0..n-1] The temporary array. (can be NULL) + * @param n The length of the given string. + * @param num_indexes The length of secondary indexes array. (can be NULL) + * @param indexes The secondary indexes array. (can be NULL) + * @param openMP enables OpenMP optimization. + * @return The primary index if no error occurred, -1 or -2 otherwise. + */ +int +divbwt(const unsigned char *T, unsigned char *U, int *A, int n, unsigned char * num_indexes, int * indexes, int openMP); + +#endif /* _DIVSUFSORT_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/dictBuilder/fastcover.c b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/fastcover.c new file mode 100644 index 0000000000..a958eb337f --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/fastcover.c @@ -0,0 +1,766 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +/*-************************************* +* Dependencies +***************************************/ +#include /* fprintf */ +#include /* malloc, free, qsort */ +#include /* memset */ +#include /* clock */ + +#ifndef ZDICT_STATIC_LINKING_ONLY +# define ZDICT_STATIC_LINKING_ONLY +#endif + +#include "../common/mem.h" /* read */ +#include "../common/pool.h" +#include "../common/threading.h" +#include "../common/zstd_internal.h" /* includes zstd.h */ +#include "../compress/zstd_compress_internal.h" /* ZSTD_hash*() */ +#include "../zdict.h" +#include "cover.h" + + +/*-************************************* +* Constants +***************************************/ +/** +* There are 32bit indexes used to ref samples, so limit samples size to 4GB +* on 64bit builds. +* For 32bit builds we choose 1 GB. +* Most 32bit platforms have 2GB user-mode addressable space and we allocate a large +* contiguous buffer, so 1GB is already a high limit. +*/ +#define FASTCOVER_MAX_SAMPLES_SIZE (sizeof(size_t) == 8 ? ((unsigned)-1) : ((unsigned)1 GB)) +#define FASTCOVER_MAX_F 31 +#define FASTCOVER_MAX_ACCEL 10 +#define FASTCOVER_DEFAULT_SPLITPOINT 0.75 +#define DEFAULT_F 20 +#define DEFAULT_ACCEL 1 + + +/*-************************************* +* Console display +***************************************/ +#ifndef LOCALDISPLAYLEVEL +static int g_displayLevel = 0; +#endif +#undef DISPLAY +#define DISPLAY(...) \ + { \ + fprintf(stderr, __VA_ARGS__); \ + fflush(stderr); \ + } +#undef LOCALDISPLAYLEVEL +#define LOCALDISPLAYLEVEL(displayLevel, l, ...) \ + if (displayLevel >= l) { \ + DISPLAY(__VA_ARGS__); \ + } /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ +#undef DISPLAYLEVEL +#define DISPLAYLEVEL(l, ...) LOCALDISPLAYLEVEL(g_displayLevel, l, __VA_ARGS__) + +#ifndef LOCALDISPLAYUPDATE +static const clock_t g_refreshRate = CLOCKS_PER_SEC * 15 / 100; +static clock_t g_time = 0; +#endif +#undef LOCALDISPLAYUPDATE +#define LOCALDISPLAYUPDATE(displayLevel, l, ...) \ + if (displayLevel >= l) { \ + if ((clock() - g_time > g_refreshRate) || (displayLevel >= 4)) { \ + g_time = clock(); \ + DISPLAY(__VA_ARGS__); \ + } \ + } +#undef DISPLAYUPDATE +#define DISPLAYUPDATE(l, ...) LOCALDISPLAYUPDATE(g_displayLevel, l, __VA_ARGS__) + + +/*-************************************* +* Hash Functions +***************************************/ +/** + * Hash the d-byte value pointed to by p and mod 2^f into the frequency vector + */ +static size_t FASTCOVER_hashPtrToIndex(const void* p, U32 f, unsigned d) { + if (d == 6) { + return ZSTD_hash6Ptr(p, f); + } + return ZSTD_hash8Ptr(p, f); +} + + +/*-************************************* +* Acceleration +***************************************/ +typedef struct { + unsigned finalize; /* Percentage of training samples used for ZDICT_finalizeDictionary */ + unsigned skip; /* Number of dmer skipped between each dmer counted in computeFrequency */ +} FASTCOVER_accel_t; + + +static const FASTCOVER_accel_t FASTCOVER_defaultAccelParameters[FASTCOVER_MAX_ACCEL+1] = { + { 100, 0 }, /* accel = 0, should not happen because accel = 0 defaults to accel = 1 */ + { 100, 0 }, /* accel = 1 */ + { 50, 1 }, /* accel = 2 */ + { 34, 2 }, /* accel = 3 */ + { 25, 3 }, /* accel = 4 */ + { 20, 4 }, /* accel = 5 */ + { 17, 5 }, /* accel = 6 */ + { 14, 6 }, /* accel = 7 */ + { 13, 7 }, /* accel = 8 */ + { 11, 8 }, /* accel = 9 */ + { 10, 9 }, /* accel = 10 */ +}; + + +/*-************************************* +* Context +***************************************/ +typedef struct { + const BYTE *samples; + size_t *offsets; + const size_t *samplesSizes; + size_t nbSamples; + size_t nbTrainSamples; + size_t nbTestSamples; + size_t nbDmers; + U32 *freqs; + unsigned d; + unsigned f; + FASTCOVER_accel_t accelParams; +} FASTCOVER_ctx_t; + + +/*-************************************* +* Helper functions +***************************************/ +/** + * Selects the best segment in an epoch. + * Segments of are scored according to the function: + * + * Let F(d) be the frequency of all dmers with hash value d. + * Let S_i be hash value of the dmer at position i of segment S which has length k. + * + * Score(S) = F(S_1) + F(S_2) + ... + F(S_{k-d+1}) + * + * Once the dmer with hash value d is in the dictionary we set F(d) = 0. + */ +static COVER_segment_t FASTCOVER_selectSegment(const FASTCOVER_ctx_t *ctx, + U32 *freqs, U32 begin, U32 end, + ZDICT_cover_params_t parameters, + U16* segmentFreqs) { + /* Constants */ + const U32 k = parameters.k; + const U32 d = parameters.d; + const U32 f = ctx->f; + const U32 dmersInK = k - d + 1; + + /* Try each segment (activeSegment) and save the best (bestSegment) */ + COVER_segment_t bestSegment = {0, 0, 0}; + COVER_segment_t activeSegment; + + /* Reset the activeDmers in the segment */ + /* The activeSegment starts at the beginning of the epoch. */ + activeSegment.begin = begin; + activeSegment.end = begin; + activeSegment.score = 0; + + /* Slide the activeSegment through the whole epoch. + * Save the best segment in bestSegment. + */ + while (activeSegment.end < end) { + /* Get hash value of current dmer */ + const size_t idx = FASTCOVER_hashPtrToIndex(ctx->samples + activeSegment.end, f, d); + + /* Add frequency of this index to score if this is the first occurrence of index in active segment */ + if (segmentFreqs[idx] == 0) { + activeSegment.score += freqs[idx]; + } + /* Increment end of segment and segmentFreqs*/ + activeSegment.end += 1; + segmentFreqs[idx] += 1; + /* If the window is now too large, drop the first position */ + if (activeSegment.end - activeSegment.begin == dmersInK + 1) { + /* Get hash value of the dmer to be eliminated from active segment */ + const size_t delIndex = FASTCOVER_hashPtrToIndex(ctx->samples + activeSegment.begin, f, d); + segmentFreqs[delIndex] -= 1; + /* Subtract frequency of this index from score if this is the last occurrence of this index in active segment */ + if (segmentFreqs[delIndex] == 0) { + activeSegment.score -= freqs[delIndex]; + } + /* Increment start of segment */ + activeSegment.begin += 1; + } + + /* If this segment is the best so far save it */ + if (activeSegment.score > bestSegment.score) { + bestSegment = activeSegment; + } + } + + /* Zero out rest of segmentFreqs array */ + while (activeSegment.begin < end) { + const size_t delIndex = FASTCOVER_hashPtrToIndex(ctx->samples + activeSegment.begin, f, d); + segmentFreqs[delIndex] -= 1; + activeSegment.begin += 1; + } + + { + /* Zero the frequency of hash value of each dmer covered by the chosen segment. */ + U32 pos; + for (pos = bestSegment.begin; pos != bestSegment.end; ++pos) { + const size_t i = FASTCOVER_hashPtrToIndex(ctx->samples + pos, f, d); + freqs[i] = 0; + } + } + + return bestSegment; +} + + +static int FASTCOVER_checkParameters(ZDICT_cover_params_t parameters, + size_t maxDictSize, unsigned f, + unsigned accel) { + /* k, d, and f are required parameters */ + if (parameters.d == 0 || parameters.k == 0) { + return 0; + } + /* d has to be 6 or 8 */ + if (parameters.d != 6 && parameters.d != 8) { + return 0; + } + /* k <= maxDictSize */ + if (parameters.k > maxDictSize) { + return 0; + } + /* d <= k */ + if (parameters.d > parameters.k) { + return 0; + } + /* 0 < f <= FASTCOVER_MAX_F*/ + if (f > FASTCOVER_MAX_F || f == 0) { + return 0; + } + /* 0 < splitPoint <= 1 */ + if (parameters.splitPoint <= 0 || parameters.splitPoint > 1) { + return 0; + } + /* 0 < accel <= 10 */ + if (accel > 10 || accel == 0) { + return 0; + } + return 1; +} + + +/** + * Clean up a context initialized with `FASTCOVER_ctx_init()`. + */ +static void +FASTCOVER_ctx_destroy(FASTCOVER_ctx_t* ctx) +{ + if (!ctx) return; + + free(ctx->freqs); + ctx->freqs = NULL; + + free(ctx->offsets); + ctx->offsets = NULL; +} + + +/** + * Calculate for frequency of hash value of each dmer in ctx->samples + */ +static void +FASTCOVER_computeFrequency(U32* freqs, const FASTCOVER_ctx_t* ctx) +{ + const unsigned f = ctx->f; + const unsigned d = ctx->d; + const unsigned skip = ctx->accelParams.skip; + const unsigned readLength = MAX(d, 8); + size_t i; + assert(ctx->nbTrainSamples >= 5); + assert(ctx->nbTrainSamples <= ctx->nbSamples); + for (i = 0; i < ctx->nbTrainSamples; i++) { + size_t start = ctx->offsets[i]; /* start of current dmer */ + size_t const currSampleEnd = ctx->offsets[i+1]; + while (start + readLength <= currSampleEnd) { + const size_t dmerIndex = FASTCOVER_hashPtrToIndex(ctx->samples + start, f, d); + freqs[dmerIndex]++; + start = start + skip + 1; + } + } +} + + +/** + * Prepare a context for dictionary building. + * The context is only dependent on the parameter `d` and can be used multiple + * times. + * Returns 0 on success or error code on error. + * The context must be destroyed with `FASTCOVER_ctx_destroy()`. + */ +static size_t +FASTCOVER_ctx_init(FASTCOVER_ctx_t* ctx, + const void* samplesBuffer, + const size_t* samplesSizes, unsigned nbSamples, + unsigned d, double splitPoint, unsigned f, + FASTCOVER_accel_t accelParams) +{ + const BYTE* const samples = (const BYTE*)samplesBuffer; + const size_t totalSamplesSize = COVER_sum(samplesSizes, nbSamples); + /* Split samples into testing and training sets */ + const unsigned nbTrainSamples = splitPoint < 1.0 ? (unsigned)((double)nbSamples * splitPoint) : nbSamples; + const unsigned nbTestSamples = splitPoint < 1.0 ? nbSamples - nbTrainSamples : nbSamples; + const size_t trainingSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes, nbTrainSamples) : totalSamplesSize; + const size_t testSamplesSize = splitPoint < 1.0 ? COVER_sum(samplesSizes + nbTrainSamples, nbTestSamples) : totalSamplesSize; + + /* Checks */ + if (totalSamplesSize < MAX(d, sizeof(U64)) || + totalSamplesSize >= (size_t)FASTCOVER_MAX_SAMPLES_SIZE) { + DISPLAYLEVEL(1, "Total samples size is too large (%u MB), maximum size is %u MB\n", + (unsigned)(totalSamplesSize >> 20), (FASTCOVER_MAX_SAMPLES_SIZE >> 20)); + return ERROR(srcSize_wrong); + } + + /* Check if there are at least 5 training samples */ + if (nbTrainSamples < 5) { + DISPLAYLEVEL(1, "Total number of training samples is %u and is invalid\n", nbTrainSamples); + return ERROR(srcSize_wrong); + } + + /* Check if there's testing sample */ + if (nbTestSamples < 1) { + DISPLAYLEVEL(1, "Total number of testing samples is %u and is invalid.\n", nbTestSamples); + return ERROR(srcSize_wrong); + } + + /* Zero the context */ + memset(ctx, 0, sizeof(*ctx)); + DISPLAYLEVEL(2, "Training on %u samples of total size %u\n", nbTrainSamples, + (unsigned)trainingSamplesSize); + DISPLAYLEVEL(2, "Testing on %u samples of total size %u\n", nbTestSamples, + (unsigned)testSamplesSize); + + ctx->samples = samples; + ctx->samplesSizes = samplesSizes; + ctx->nbSamples = nbSamples; + ctx->nbTrainSamples = nbTrainSamples; + ctx->nbTestSamples = nbTestSamples; + ctx->nbDmers = trainingSamplesSize - MAX(d, sizeof(U64)) + 1; + ctx->d = d; + ctx->f = f; + ctx->accelParams = accelParams; + + /* The offsets of each file */ + ctx->offsets = (size_t*)calloc((nbSamples + 1), sizeof(size_t)); + if (ctx->offsets == NULL) { + DISPLAYLEVEL(1, "Failed to allocate scratch buffers \n"); + FASTCOVER_ctx_destroy(ctx); + return ERROR(memory_allocation); + } + + /* Fill offsets from the samplesSizes */ + { U32 i; + ctx->offsets[0] = 0; + assert(nbSamples >= 5); + for (i = 1; i <= nbSamples; ++i) { + ctx->offsets[i] = ctx->offsets[i - 1] + samplesSizes[i - 1]; + } + } + + /* Initialize frequency array of size 2^f */ + ctx->freqs = (U32*)calloc(((U64)1 << f), sizeof(U32)); + if (ctx->freqs == NULL) { + DISPLAYLEVEL(1, "Failed to allocate frequency table \n"); + FASTCOVER_ctx_destroy(ctx); + return ERROR(memory_allocation); + } + + DISPLAYLEVEL(2, "Computing frequencies\n"); + FASTCOVER_computeFrequency(ctx->freqs, ctx); + + return 0; +} + + +/** + * Given the prepared context build the dictionary. + */ +static size_t +FASTCOVER_buildDictionary(const FASTCOVER_ctx_t* ctx, + U32* freqs, + void* dictBuffer, size_t dictBufferCapacity, + ZDICT_cover_params_t parameters, + U16* segmentFreqs) +{ + BYTE *const dict = (BYTE *)dictBuffer; + size_t tail = dictBufferCapacity; + /* Divide the data into epochs. We will select one segment from each epoch. */ + const COVER_epoch_info_t epochs = COVER_computeEpochs( + (U32)dictBufferCapacity, (U32)ctx->nbDmers, parameters.k, 1); + const size_t maxZeroScoreRun = 10; + size_t zeroScoreRun = 0; + size_t epoch; + DISPLAYLEVEL(2, "Breaking content into %u epochs of size %u\n", + (U32)epochs.num, (U32)epochs.size); + /* Loop through the epochs until there are no more segments or the dictionary + * is full. + */ + for (epoch = 0; tail > 0; epoch = (epoch + 1) % epochs.num) { + const U32 epochBegin = (U32)(epoch * epochs.size); + const U32 epochEnd = epochBegin + epochs.size; + size_t segmentSize; + /* Select a segment */ + COVER_segment_t segment = FASTCOVER_selectSegment( + ctx, freqs, epochBegin, epochEnd, parameters, segmentFreqs); + + /* If the segment covers no dmers, then we are out of content. + * There may be new content in other epochs, for continue for some time. + */ + if (segment.score == 0) { + if (++zeroScoreRun >= maxZeroScoreRun) { + break; + } + continue; + } + zeroScoreRun = 0; + + /* Trim the segment if necessary and if it is too small then we are done */ + segmentSize = MIN(segment.end - segment.begin + parameters.d - 1, tail); + if (segmentSize < parameters.d) { + break; + } + + /* We fill the dictionary from the back to allow the best segments to be + * referenced with the smallest offsets. + */ + tail -= segmentSize; + memcpy(dict + tail, ctx->samples + segment.begin, segmentSize); + DISPLAYUPDATE( + 2, "\r%u%% ", + (unsigned)(((dictBufferCapacity - tail) * 100) / dictBufferCapacity)); + } + DISPLAYLEVEL(2, "\r%79s\r", ""); + return tail; +} + +/** + * Parameters for FASTCOVER_tryParameters(). + */ +typedef struct FASTCOVER_tryParameters_data_s { + const FASTCOVER_ctx_t* ctx; + COVER_best_t* best; + size_t dictBufferCapacity; + ZDICT_cover_params_t parameters; +} FASTCOVER_tryParameters_data_t; + + +/** + * Tries a set of parameters and updates the COVER_best_t with the results. + * This function is thread safe if zstd is compiled with multithreaded support. + * It takes its parameters as an *OWNING* opaque pointer to support threading. + */ +static void FASTCOVER_tryParameters(void* opaque) +{ + /* Save parameters as local variables */ + FASTCOVER_tryParameters_data_t *const data = (FASTCOVER_tryParameters_data_t*)opaque; + const FASTCOVER_ctx_t *const ctx = data->ctx; + const ZDICT_cover_params_t parameters = data->parameters; + size_t dictBufferCapacity = data->dictBufferCapacity; + size_t totalCompressedSize = ERROR(GENERIC); + /* Initialize array to keep track of frequency of dmer within activeSegment */ + U16* segmentFreqs = (U16*)calloc(((U64)1 << ctx->f), sizeof(U16)); + /* Allocate space for hash table, dict, and freqs */ + BYTE *const dict = (BYTE*)malloc(dictBufferCapacity); + COVER_dictSelection_t selection = COVER_dictSelectionError(ERROR(GENERIC)); + U32* freqs = (U32*) malloc(((U64)1 << ctx->f) * sizeof(U32)); + if (!segmentFreqs || !dict || !freqs) { + DISPLAYLEVEL(1, "Failed to allocate buffers: out of memory\n"); + goto _cleanup; + } + /* Copy the frequencies because we need to modify them */ + memcpy(freqs, ctx->freqs, ((U64)1 << ctx->f) * sizeof(U32)); + /* Build the dictionary */ + { const size_t tail = FASTCOVER_buildDictionary(ctx, freqs, dict, dictBufferCapacity, + parameters, segmentFreqs); + + const unsigned nbFinalizeSamples = (unsigned)(ctx->nbTrainSamples * ctx->accelParams.finalize / 100); + selection = COVER_selectDict(dict + tail, dictBufferCapacity, dictBufferCapacity - tail, + ctx->samples, ctx->samplesSizes, nbFinalizeSamples, ctx->nbTrainSamples, ctx->nbSamples, parameters, ctx->offsets, + totalCompressedSize); + + if (COVER_dictSelectionIsError(selection)) { + DISPLAYLEVEL(1, "Failed to select dictionary\n"); + goto _cleanup; + } + } +_cleanup: + free(dict); + COVER_best_finish(data->best, parameters, selection); + free(data); + free(segmentFreqs); + COVER_dictSelectionFree(selection); + free(freqs); +} + + +static void +FASTCOVER_convertToCoverParams(ZDICT_fastCover_params_t fastCoverParams, + ZDICT_cover_params_t* coverParams) +{ + coverParams->k = fastCoverParams.k; + coverParams->d = fastCoverParams.d; + coverParams->steps = fastCoverParams.steps; + coverParams->nbThreads = fastCoverParams.nbThreads; + coverParams->splitPoint = fastCoverParams.splitPoint; + coverParams->zParams = fastCoverParams.zParams; + coverParams->shrinkDict = fastCoverParams.shrinkDict; +} + + +static void +FASTCOVER_convertToFastCoverParams(ZDICT_cover_params_t coverParams, + ZDICT_fastCover_params_t* fastCoverParams, + unsigned f, unsigned accel) +{ + fastCoverParams->k = coverParams.k; + fastCoverParams->d = coverParams.d; + fastCoverParams->steps = coverParams.steps; + fastCoverParams->nbThreads = coverParams.nbThreads; + fastCoverParams->splitPoint = coverParams.splitPoint; + fastCoverParams->f = f; + fastCoverParams->accel = accel; + fastCoverParams->zParams = coverParams.zParams; + fastCoverParams->shrinkDict = coverParams.shrinkDict; +} + + +ZDICTLIB_STATIC_API size_t +ZDICT_trainFromBuffer_fastCover(void* dictBuffer, size_t dictBufferCapacity, + const void* samplesBuffer, + const size_t* samplesSizes, unsigned nbSamples, + ZDICT_fastCover_params_t parameters) +{ + BYTE* const dict = (BYTE*)dictBuffer; + FASTCOVER_ctx_t ctx; + ZDICT_cover_params_t coverParams; + FASTCOVER_accel_t accelParams; + /* Initialize global data */ + g_displayLevel = (int)parameters.zParams.notificationLevel; + /* Assign splitPoint and f if not provided */ + parameters.splitPoint = 1.0; + parameters.f = parameters.f == 0 ? DEFAULT_F : parameters.f; + parameters.accel = parameters.accel == 0 ? DEFAULT_ACCEL : parameters.accel; + /* Convert to cover parameter */ + memset(&coverParams, 0 , sizeof(coverParams)); + FASTCOVER_convertToCoverParams(parameters, &coverParams); + /* Checks */ + if (!FASTCOVER_checkParameters(coverParams, dictBufferCapacity, parameters.f, + parameters.accel)) { + DISPLAYLEVEL(1, "FASTCOVER parameters incorrect\n"); + return ERROR(parameter_outOfBound); + } + if (nbSamples == 0) { + DISPLAYLEVEL(1, "FASTCOVER must have at least one input file\n"); + return ERROR(srcSize_wrong); + } + if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { + DISPLAYLEVEL(1, "dictBufferCapacity must be at least %u\n", + ZDICT_DICTSIZE_MIN); + return ERROR(dstSize_tooSmall); + } + /* Assign corresponding FASTCOVER_accel_t to accelParams*/ + accelParams = FASTCOVER_defaultAccelParameters[parameters.accel]; + /* Initialize context */ + { + size_t const initVal = FASTCOVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, + coverParams.d, parameters.splitPoint, parameters.f, + accelParams); + if (ZSTD_isError(initVal)) { + DISPLAYLEVEL(1, "Failed to initialize context\n"); + return initVal; + } + } + COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.nbDmers, g_displayLevel); + /* Build the dictionary */ + DISPLAYLEVEL(2, "Building dictionary\n"); + { + /* Initialize array to keep track of frequency of dmer within activeSegment */ + U16* segmentFreqs = (U16 *)calloc(((U64)1 << parameters.f), sizeof(U16)); + const size_t tail = FASTCOVER_buildDictionary(&ctx, ctx.freqs, dictBuffer, + dictBufferCapacity, coverParams, segmentFreqs); + const unsigned nbFinalizeSamples = (unsigned)(ctx.nbTrainSamples * ctx.accelParams.finalize / 100); + const size_t dictionarySize = ZDICT_finalizeDictionary( + dict, dictBufferCapacity, dict + tail, dictBufferCapacity - tail, + samplesBuffer, samplesSizes, nbFinalizeSamples, coverParams.zParams); + if (!ZSTD_isError(dictionarySize)) { + DISPLAYLEVEL(2, "Constructed dictionary of size %u\n", + (unsigned)dictionarySize); + } + FASTCOVER_ctx_destroy(&ctx); + free(segmentFreqs); + return dictionarySize; + } +} + + +ZDICTLIB_STATIC_API size_t +ZDICT_optimizeTrainFromBuffer_fastCover( + void* dictBuffer, size_t dictBufferCapacity, + const void* samplesBuffer, + const size_t* samplesSizes, unsigned nbSamples, + ZDICT_fastCover_params_t* parameters) +{ + ZDICT_cover_params_t coverParams; + FASTCOVER_accel_t accelParams; + /* constants */ + const unsigned nbThreads = parameters->nbThreads; + const double splitPoint = + parameters->splitPoint <= 0.0 ? FASTCOVER_DEFAULT_SPLITPOINT : parameters->splitPoint; + const unsigned kMinD = parameters->d == 0 ? 6 : parameters->d; + const unsigned kMaxD = parameters->d == 0 ? 8 : parameters->d; + const unsigned kMinK = parameters->k == 0 ? 50 : parameters->k; + const unsigned kMaxK = parameters->k == 0 ? 2000 : parameters->k; + const unsigned kSteps = parameters->steps == 0 ? 40 : parameters->steps; + const unsigned kStepSize = MAX((kMaxK - kMinK) / kSteps, 1); + const unsigned kIterations = + (1 + (kMaxD - kMinD) / 2) * (1 + (kMaxK - kMinK) / kStepSize); + const unsigned f = parameters->f == 0 ? DEFAULT_F : parameters->f; + const unsigned accel = parameters->accel == 0 ? DEFAULT_ACCEL : parameters->accel; + const unsigned shrinkDict = 0; + /* Local variables */ + const int displayLevel = (int)parameters->zParams.notificationLevel; + unsigned iteration = 1; + unsigned d; + unsigned k; + COVER_best_t best; + POOL_ctx *pool = NULL; + int warned = 0; + /* Checks */ + if (splitPoint <= 0 || splitPoint > 1) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect splitPoint\n"); + return ERROR(parameter_outOfBound); + } + if (accel == 0 || accel > FASTCOVER_MAX_ACCEL) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect accel\n"); + return ERROR(parameter_outOfBound); + } + if (kMinK < kMaxD || kMaxK < kMinK) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Incorrect k\n"); + return ERROR(parameter_outOfBound); + } + if (nbSamples == 0) { + LOCALDISPLAYLEVEL(displayLevel, 1, "FASTCOVER must have at least one input file\n"); + return ERROR(srcSize_wrong); + } + if (dictBufferCapacity < ZDICT_DICTSIZE_MIN) { + LOCALDISPLAYLEVEL(displayLevel, 1, "dictBufferCapacity must be at least %u\n", + ZDICT_DICTSIZE_MIN); + return ERROR(dstSize_tooSmall); + } + if (nbThreads > 1) { + pool = POOL_create(nbThreads, 1); + if (!pool) { + return ERROR(memory_allocation); + } + } + /* Initialization */ + COVER_best_init(&best); + memset(&coverParams, 0 , sizeof(coverParams)); + FASTCOVER_convertToCoverParams(*parameters, &coverParams); + accelParams = FASTCOVER_defaultAccelParameters[accel]; + /* Turn down global display level to clean up display at level 2 and below */ + g_displayLevel = displayLevel == 0 ? 0 : displayLevel - 1; + /* Loop through d first because each new value needs a new context */ + LOCALDISPLAYLEVEL(displayLevel, 2, "Trying %u different sets of parameters\n", + kIterations); + for (d = kMinD; d <= kMaxD; d += 2) { + /* Initialize the context for this value of d */ + FASTCOVER_ctx_t ctx; + LOCALDISPLAYLEVEL(displayLevel, 3, "d=%u\n", d); + { + size_t const initVal = FASTCOVER_ctx_init(&ctx, samplesBuffer, samplesSizes, nbSamples, d, splitPoint, f, accelParams); + if (ZSTD_isError(initVal)) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to initialize context\n"); + COVER_best_destroy(&best); + POOL_free(pool); + return initVal; + } + } + if (!warned) { + COVER_warnOnSmallCorpus(dictBufferCapacity, ctx.nbDmers, displayLevel); + warned = 1; + } + /* Loop through k reusing the same context */ + for (k = kMinK; k <= kMaxK; k += kStepSize) { + /* Prepare the arguments */ + FASTCOVER_tryParameters_data_t *data = (FASTCOVER_tryParameters_data_t *)malloc( + sizeof(FASTCOVER_tryParameters_data_t)); + LOCALDISPLAYLEVEL(displayLevel, 3, "k=%u\n", k); + if (!data) { + LOCALDISPLAYLEVEL(displayLevel, 1, "Failed to allocate parameters\n"); + COVER_best_destroy(&best); + FASTCOVER_ctx_destroy(&ctx); + POOL_free(pool); + return ERROR(memory_allocation); + } + data->ctx = &ctx; + data->best = &best; + data->dictBufferCapacity = dictBufferCapacity; + data->parameters = coverParams; + data->parameters.k = k; + data->parameters.d = d; + data->parameters.splitPoint = splitPoint; + data->parameters.steps = kSteps; + data->parameters.shrinkDict = shrinkDict; + data->parameters.zParams.notificationLevel = (unsigned)g_displayLevel; + /* Check the parameters */ + if (!FASTCOVER_checkParameters(data->parameters, dictBufferCapacity, + data->ctx->f, accel)) { + DISPLAYLEVEL(1, "FASTCOVER parameters incorrect\n"); + free(data); + continue; + } + /* Call the function and pass ownership of data to it */ + COVER_best_start(&best); + if (pool) { + POOL_add(pool, &FASTCOVER_tryParameters, data); + } else { + FASTCOVER_tryParameters(data); + } + /* Print status */ + LOCALDISPLAYUPDATE(displayLevel, 2, "\r%u%% ", + (unsigned)((iteration * 100) / kIterations)); + ++iteration; + } + COVER_best_wait(&best); + FASTCOVER_ctx_destroy(&ctx); + } + LOCALDISPLAYLEVEL(displayLevel, 2, "\r%79s\r", ""); + /* Fill the output buffer and parameters with output of the best parameters */ + { + const size_t dictSize = best.dictSize; + if (ZSTD_isError(best.compressedSize)) { + const size_t compressedSize = best.compressedSize; + COVER_best_destroy(&best); + POOL_free(pool); + return compressedSize; + } + FASTCOVER_convertToFastCoverParams(best.parameters, parameters, f, accel); + memcpy(dictBuffer, best.dict, dictSize); + COVER_best_destroy(&best); + POOL_free(pool); + return dictSize; + } + +} diff --git a/cpp/third_party/zstd-1.5.7/lib/dictBuilder/zdict.c b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/zdict.c new file mode 100644 index 0000000000..d5e60a4da3 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dictBuilder/zdict.c @@ -0,0 +1,1133 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/*-************************************** +* Tuning parameters +****************************************/ +#define MINRATIO 4 /* minimum nb of apparition to be selected in dictionary */ +#define ZDICT_MAX_SAMPLES_SIZE (2000U << 20) +#define ZDICT_MIN_SAMPLES_SIZE (ZDICT_CONTENTSIZE_MIN * MINRATIO) + + +/*-************************************** +* Compiler Options +****************************************/ +/* Unix Large Files support (>4GB) */ +#define _FILE_OFFSET_BITS 64 +#if (defined(__sun__) && (!defined(__LP64__))) /* Sun Solaris 32-bits requires specific definitions */ +# ifndef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE +# endif +#elif ! defined(__LP64__) /* No point defining Large file for 64 bit */ +# ifndef _LARGEFILE64_SOURCE +# define _LARGEFILE64_SOURCE +# endif +#endif + + +/*-************************************* +* Dependencies +***************************************/ +#include /* malloc, free */ +#include /* memset */ +#include /* fprintf, fopen, ftello64 */ +#include /* clock */ + +#ifndef ZDICT_STATIC_LINKING_ONLY +# define ZDICT_STATIC_LINKING_ONLY +#endif + +#include "../common/mem.h" /* read */ +#include "../common/fse.h" /* FSE_normalizeCount, FSE_writeNCount */ +#include "../common/huf.h" /* HUF_buildCTable, HUF_writeCTable */ +#include "../common/zstd_internal.h" /* includes zstd.h */ +#include "../common/xxhash.h" /* XXH64 */ +#include "../compress/zstd_compress_internal.h" /* ZSTD_loadCEntropy() */ +#include "../zdict.h" +#include "divsufsort.h" +#include "../common/bits.h" /* ZSTD_NbCommonBytes */ + + +/*-************************************* +* Constants +***************************************/ +#define KB *(1 <<10) +#define MB *(1 <<20) +#define GB *(1U<<30) + +#define DICTLISTSIZE_DEFAULT 10000 + +#define NOISELENGTH 32 + +static const U32 g_selectivity_default = 9; + + +/*-************************************* +* Console display +***************************************/ +#undef DISPLAY +#define DISPLAY(...) do { fprintf(stderr, __VA_ARGS__); fflush( stderr ); } while (0) +#undef DISPLAYLEVEL +#define DISPLAYLEVEL(l, ...) do { if (notificationLevel>=l) { DISPLAY(__VA_ARGS__); } } while (0) /* 0 : no display; 1: errors; 2: default; 3: details; 4: debug */ + +static clock_t ZDICT_clockSpan(clock_t nPrevious) { return clock() - nPrevious; } + +static void ZDICT_printHex(const void* ptr, size_t length) +{ + const BYTE* const b = (const BYTE*)ptr; + size_t u; + for (u=0; u126) c = '.'; /* non-printable char */ + DISPLAY("%c", c); + } +} + + +/*-******************************************************** +* Helper functions +**********************************************************/ +unsigned ZDICT_isError(size_t errorCode) { return ERR_isError(errorCode); } + +const char* ZDICT_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); } + +unsigned ZDICT_getDictID(const void* dictBuffer, size_t dictSize) +{ + if (dictSize < 8) return 0; + if (MEM_readLE32(dictBuffer) != ZSTD_MAGIC_DICTIONARY) return 0; + return MEM_readLE32((const char*)dictBuffer + 4); +} + +size_t ZDICT_getDictHeaderSize(const void* dictBuffer, size_t dictSize) +{ + size_t headerSize; + if (dictSize <= 8 || MEM_readLE32(dictBuffer) != ZSTD_MAGIC_DICTIONARY) return ERROR(dictionary_corrupted); + + { ZSTD_compressedBlockState_t* bs = (ZSTD_compressedBlockState_t*)malloc(sizeof(ZSTD_compressedBlockState_t)); + U32* wksp = (U32*)malloc(HUF_WORKSPACE_SIZE); + if (!bs || !wksp) { + headerSize = ERROR(memory_allocation); + } else { + ZSTD_reset_compressedBlockState(bs); + headerSize = ZSTD_loadCEntropy(bs, wksp, dictBuffer, dictSize); + } + + free(bs); + free(wksp); + } + + return headerSize; +} + +/*-******************************************************** +* Dictionary training functions +**********************************************************/ +/*! ZDICT_count() : + Count the nb of common bytes between 2 pointers. + Note : this function presumes end of buffer followed by noisy guard band. +*/ +static size_t ZDICT_count(const void* pIn, const void* pMatch) +{ + const char* const pStart = (const char*)pIn; + for (;;) { + size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn); + if (!diff) { + pIn = (const char*)pIn+sizeof(size_t); + pMatch = (const char*)pMatch+sizeof(size_t); + continue; + } + pIn = (const char*)pIn+ZSTD_NbCommonBytes(diff); + return (size_t)((const char*)pIn - pStart); + } +} + + +typedef struct { + U32 pos; + U32 length; + U32 savings; +} dictItem; + +static void ZDICT_initDictItem(dictItem* d) +{ + d->pos = 1; + d->length = 0; + d->savings = (U32)(-1); +} + + +#define LLIMIT 64 /* heuristic determined experimentally */ +#define MINMATCHLENGTH 7 /* heuristic determined experimentally */ +static dictItem ZDICT_analyzePos( + BYTE* doneMarks, + const int* suffix, U32 start, + const void* buffer, U32 minRatio, U32 notificationLevel) +{ + U32 lengthList[LLIMIT] = {0}; + U32 cumulLength[LLIMIT] = {0}; + U32 savings[LLIMIT] = {0}; + const BYTE* b = (const BYTE*)buffer; + size_t maxLength = LLIMIT; + size_t pos = (size_t)suffix[start]; + U32 end = start; + dictItem solution; + + /* init */ + memset(&solution, 0, sizeof(solution)); + doneMarks[pos] = 1; + + /* trivial repetition cases */ + if ( (MEM_read16(b+pos+0) == MEM_read16(b+pos+2)) + ||(MEM_read16(b+pos+1) == MEM_read16(b+pos+3)) + ||(MEM_read16(b+pos+2) == MEM_read16(b+pos+4)) ) { + /* skip and mark segment */ + U16 const pattern16 = MEM_read16(b+pos+4); + U32 u, patternEnd = 6; + while (MEM_read16(b+pos+patternEnd) == pattern16) patternEnd+=2 ; + if (b[pos+patternEnd] == b[pos+patternEnd-1]) patternEnd++; + for (u=1; u= MINMATCHLENGTH); + } + + /* look backward */ + { size_t length; + do { + length = ZDICT_count(b + pos, b + *(suffix+start-1)); + if (length >=MINMATCHLENGTH) start--; + } while(length >= MINMATCHLENGTH); + } + + /* exit if not found a minimum nb of repetitions */ + if (end-start < minRatio) { + U32 idx; + for(idx=start; idx= %i at pos %7u ", (unsigned)(end-start), MINMATCHLENGTH, (unsigned)pos); + DISPLAYLEVEL(4, "\n"); + + for (mml = MINMATCHLENGTH ; ; mml++) { + BYTE currentChar = 0; + U32 currentCount = 0; + U32 currentID = refinedStart; + U32 id; + U32 selectedCount = 0; + U32 selectedID = currentID; + for (id =refinedStart; id < refinedEnd; id++) { + if (b[suffix[id] + mml] != currentChar) { + if (currentCount > selectedCount) { + selectedCount = currentCount; + selectedID = currentID; + } + currentID = id; + currentChar = b[ suffix[id] + mml]; + currentCount = 0; + } + currentCount ++; + } + if (currentCount > selectedCount) { /* for last */ + selectedCount = currentCount; + selectedID = currentID; + } + + if (selectedCount < minRatio) + break; + refinedStart = selectedID; + refinedEnd = refinedStart + selectedCount; + } + + /* evaluate gain based on new dict */ + start = refinedStart; + pos = suffix[refinedStart]; + end = start; + memset(lengthList, 0, sizeof(lengthList)); + + /* look forward */ + { size_t length; + do { + end++; + length = ZDICT_count(b + pos, b + suffix[end]); + if (length >= LLIMIT) length = LLIMIT-1; + lengthList[length]++; + } while (length >=MINMATCHLENGTH); + } + + /* look backward */ + { size_t length = MINMATCHLENGTH; + while ((length >= MINMATCHLENGTH) & (start > 0)) { + length = ZDICT_count(b + pos, b + suffix[start - 1]); + if (length >= LLIMIT) length = LLIMIT - 1; + lengthList[length]++; + if (length >= MINMATCHLENGTH) start--; + } + } + + /* largest useful length */ + memset(cumulLength, 0, sizeof(cumulLength)); + cumulLength[maxLength-1] = lengthList[maxLength-1]; + for (i=(int)(maxLength-2); i>=0; i--) + cumulLength[i] = cumulLength[i+1] + lengthList[i]; + + for (i=LLIMIT-1; i>=MINMATCHLENGTH; i--) if (cumulLength[i]>=minRatio) break; + maxLength = i; + + /* reduce maxLength in case of final into repetitive data */ + { U32 l = (U32)maxLength; + BYTE const c = b[pos + maxLength-1]; + while (b[pos+l-2]==c) l--; + maxLength = l; + } + if (maxLength < MINMATCHLENGTH) return solution; /* skip : no long-enough solution */ + + /* calculate savings */ + savings[5] = 0; + for (i=MINMATCHLENGTH; i<=(int)maxLength; i++) + savings[i] = savings[i-1] + (lengthList[i] * (i-3)); + + DISPLAYLEVEL(4, "Selected dict at position %u, of length %u : saves %u (ratio: %.2f) \n", + (unsigned)pos, (unsigned)maxLength, (unsigned)savings[maxLength], (double)savings[maxLength] / (double)maxLength); + + solution.pos = (U32)pos; + solution.length = (U32)maxLength; + solution.savings = savings[maxLength]; + + /* mark positions done */ + { U32 id; + for (id=start; id solution.length) length = solution.length; + } + pEnd = (U32)(testedPos + length); + for (p=testedPos; ppos; + const U32 eltEnd = elt.pos + elt.length; + const char* const buf = (const char*) buffer; + + /* tail overlap */ + U32 u; for (u=1; u elt.pos) && (table[u].pos <= eltEnd)) { /* overlap, existing > new */ + /* append */ + U32 const addedLength = table[u].pos - elt.pos; + table[u].length += addedLength; + table[u].pos = elt.pos; + table[u].savings += elt.savings * addedLength / elt.length; /* rough approx */ + table[u].savings += elt.length / 8; /* rough approx bonus */ + elt = table[u]; + /* sort : improve rank */ + while ((u>1) && (table[u-1].savings < elt.savings)) + table[u] = table[u-1], u--; + table[u] = elt; + return u; + } } + + /* front overlap */ + for (u=1; u= elt.pos) && (table[u].pos < elt.pos)) { /* overlap, existing < new */ + /* append */ + int const addedLength = (int)eltEnd - (int)(table[u].pos + table[u].length); + table[u].savings += elt.length / 8; /* rough approx bonus */ + if (addedLength > 0) { /* otherwise, elt fully included into existing */ + table[u].length += addedLength; + table[u].savings += elt.savings * addedLength / elt.length; /* rough approx */ + } + /* sort : improve rank */ + elt = table[u]; + while ((u>1) && (table[u-1].savings < elt.savings)) + table[u] = table[u-1], u--; + table[u] = elt; + return u; + } + + if (MEM_read64(buf + table[u].pos) == MEM_read64(buf + elt.pos + 1)) { + if (isIncluded(buf + table[u].pos, buf + elt.pos + 1, table[u].length)) { + size_t const addedLength = MAX( (int)elt.length - (int)table[u].length , 1 ); + table[u].pos = elt.pos; + table[u].savings += (U32)(elt.savings * addedLength / elt.length); + table[u].length = MIN(elt.length, table[u].length + 1); + return u; + } + } + } + + return 0; +} + + +static void ZDICT_removeDictItem(dictItem* table, U32 id) +{ + /* convention : table[0].pos stores nb of elts */ + U32 const max = table[0].pos; + U32 u; + if (!id) return; /* protection, should never happen */ + for (u=id; upos--; +} + + +static void ZDICT_insertDictItem(dictItem* table, U32 maxSize, dictItem elt, const void* buffer) +{ + /* merge if possible */ + U32 mergeId = ZDICT_tryMerge(table, elt, 0, buffer); + if (mergeId) { + U32 newMerge = 1; + while (newMerge) { + newMerge = ZDICT_tryMerge(table, table[mergeId], mergeId, buffer); + if (newMerge) ZDICT_removeDictItem(table, mergeId); + mergeId = newMerge; + } + return; + } + + /* insert */ + { U32 current; + U32 nextElt = table->pos; + if (nextElt >= maxSize) nextElt = maxSize-1; + current = nextElt-1; + while (table[current].savings < elt.savings) { + table[current+1] = table[current]; + current--; + } + table[current+1] = elt; + table->pos = nextElt+1; + } +} + + +static U32 ZDICT_dictSize(const dictItem* dictList) +{ + U32 u, dictSize = 0; + for (u=1; u=l) { \ + if (ZDICT_clockSpan(displayClock) > refreshRate) { \ + displayClock = clock(); \ + DISPLAY(__VA_ARGS__); \ + } \ + if (notificationLevel>=4) fflush(stderr); \ + } \ + } while (0) + + /* init */ + DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */ + if (!suffix0 || !reverseSuffix || !doneMarks || !filePos) { + result = ERROR(memory_allocation); + goto _cleanup; + } + if (minRatio < MINRATIO) minRatio = MINRATIO; + memset(doneMarks, 0, bufferSize+16); + + /* limit sample set size (divsufsort limitation)*/ + if (bufferSize > ZDICT_MAX_SAMPLES_SIZE) DISPLAYLEVEL(3, "sample set too large : reduced to %u MB ...\n", (unsigned)(ZDICT_MAX_SAMPLES_SIZE>>20)); + while (bufferSize > ZDICT_MAX_SAMPLES_SIZE) bufferSize -= fileSizes[--nbFiles]; + + /* sort */ + DISPLAYLEVEL(2, "sorting %u files of total size %u MB ...\n", nbFiles, (unsigned)(bufferSize>>20)); + { int const divSuftSortResult = divsufsort((const unsigned char*)buffer, suffix, (int)bufferSize, 0); + if (divSuftSortResult != 0) { result = ERROR(GENERIC); goto _cleanup; } + } + suffix[bufferSize] = (int)bufferSize; /* leads into noise */ + suffix0[0] = (int)bufferSize; /* leads into noise */ + /* build reverse suffix sort */ + { size_t pos; + for (pos=0; pos < bufferSize; pos++) + reverseSuffix[suffix[pos]] = (U32)pos; + /* note filePos tracks borders between samples. + It's not used at this stage, but planned to become useful in a later update */ + filePos[0] = 0; + for (pos=1; pos> 21); + } +} + + +typedef struct +{ + ZSTD_CDict* dict; /* dictionary */ + ZSTD_CCtx* zc; /* working context */ + void* workPlace; /* must be ZSTD_BLOCKSIZE_MAX allocated */ +} EStats_ress_t; + +#define MAXREPOFFSET 1024 + +static void ZDICT_countEStats(EStats_ress_t esr, const ZSTD_parameters* params, + unsigned* countLit, unsigned* offsetcodeCount, unsigned* matchlengthCount, unsigned* litlengthCount, U32* repOffsets, + const void* src, size_t srcSize, + U32 notificationLevel) +{ + size_t const blockSizeMax = MIN (ZSTD_BLOCKSIZE_MAX, 1 << params->cParams.windowLog); + size_t cSize; + + if (srcSize > blockSizeMax) srcSize = blockSizeMax; /* protection vs large samples */ + { size_t const errorCode = ZSTD_compressBegin_usingCDict_deprecated(esr.zc, esr.dict); + if (ZSTD_isError(errorCode)) { DISPLAYLEVEL(1, "warning : ZSTD_compressBegin_usingCDict failed \n"); return; } + + } + cSize = ZSTD_compressBlock_deprecated(esr.zc, esr.workPlace, ZSTD_BLOCKSIZE_MAX, src, srcSize); + if (ZSTD_isError(cSize)) { DISPLAYLEVEL(3, "warning : could not compress sample size %u \n", (unsigned)srcSize); return; } + + if (cSize) { /* if == 0; block is not compressible */ + const SeqStore_t* const seqStorePtr = ZSTD_getSeqStore(esr.zc); + + /* literals stats */ + { const BYTE* bytePtr; + for(bytePtr = seqStorePtr->litStart; bytePtr < seqStorePtr->lit; bytePtr++) + countLit[*bytePtr]++; + } + + /* seqStats */ + { U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); + ZSTD_seqToCodes(seqStorePtr); + + { const BYTE* codePtr = seqStorePtr->ofCode; + U32 u; + for (u=0; umlCode; + U32 u; + for (u=0; ullCode; + U32 u; + for (u=0; u= 2) { /* rep offsets */ + const SeqDef* const seq = seqStorePtr->sequencesStart; + U32 offset1 = seq[0].offBase - ZSTD_REP_NUM; + U32 offset2 = seq[1].offBase - ZSTD_REP_NUM; + if (offset1 >= MAXREPOFFSET) offset1 = 0; + if (offset2 >= MAXREPOFFSET) offset2 = 0; + repOffsets[offset1] += 3; + repOffsets[offset2] += 1; + } } } +} + +static size_t ZDICT_totalSampleSize(const size_t* fileSizes, unsigned nbFiles) +{ + size_t total=0; + unsigned u; + for (u=0; u0; u--) { + offsetCount_t tmp; + if (table[u-1].count >= table[u].count) break; + tmp = table[u-1]; + table[u-1] = table[u]; + table[u] = tmp; + } +} + +/* ZDICT_flatLit() : + * rewrite `countLit` to contain a mostly flat but still compressible distribution of literals. + * necessary to avoid generating a non-compressible distribution that HUF_writeCTable() cannot encode. + */ +static void ZDICT_flatLit(unsigned* countLit) +{ + int u; + for (u=1; u<256; u++) countLit[u] = 2; + countLit[0] = 4; + countLit[253] = 1; + countLit[254] = 1; +} + +#define OFFCODE_MAX 30 /* only applicable to first block */ +static size_t ZDICT_analyzeEntropy(void* dstBuffer, size_t maxDstSize, + int compressionLevel, + const void* srcBuffer, const size_t* fileSizes, unsigned nbFiles, + const void* dictBuffer, size_t dictBufferSize, + unsigned notificationLevel) +{ + unsigned countLit[256]; + HUF_CREATE_STATIC_CTABLE(hufTable, 255); + unsigned offcodeCount[OFFCODE_MAX+1]; + short offcodeNCount[OFFCODE_MAX+1]; + U32 offcodeMax = ZSTD_highbit32((U32)(dictBufferSize + 128 KB)); + unsigned matchLengthCount[MaxML+1]; + short matchLengthNCount[MaxML+1]; + unsigned litLengthCount[MaxLL+1]; + short litLengthNCount[MaxLL+1]; + U32 repOffset[MAXREPOFFSET]; + offsetCount_t bestRepOffset[ZSTD_REP_NUM+1]; + EStats_ress_t esr = { NULL, NULL, NULL }; + ZSTD_parameters params; + U32 u, huffLog = 11, Offlog = OffFSELog, mlLog = MLFSELog, llLog = LLFSELog, total; + size_t pos = 0, errorCode; + size_t eSize = 0; + size_t const totalSrcSize = ZDICT_totalSampleSize(fileSizes, nbFiles); + size_t const averageSampleSize = totalSrcSize / (nbFiles + !nbFiles); + BYTE* dstPtr = (BYTE*)dstBuffer; + U32 wksp[HUF_CTABLE_WORKSPACE_SIZE_U32]; + + /* init */ + DEBUGLOG(4, "ZDICT_analyzeEntropy"); + if (offcodeMax>OFFCODE_MAX) { eSize = ERROR(dictionaryCreation_failed); goto _cleanup; } /* too large dictionary */ + for (u=0; u<256; u++) countLit[u] = 1; /* any character must be described */ + for (u=0; u<=offcodeMax; u++) offcodeCount[u] = 1; + for (u=0; u<=MaxML; u++) matchLengthCount[u] = 1; + for (u=0; u<=MaxLL; u++) litLengthCount[u] = 1; + memset(repOffset, 0, sizeof(repOffset)); + repOffset[1] = repOffset[4] = repOffset[8] = 1; + memset(bestRepOffset, 0, sizeof(bestRepOffset)); + if (compressionLevel==0) compressionLevel = ZSTD_CLEVEL_DEFAULT; + params = ZSTD_getParams(compressionLevel, averageSampleSize, dictBufferSize); + + esr.dict = ZSTD_createCDict_advanced(dictBuffer, dictBufferSize, ZSTD_dlm_byRef, ZSTD_dct_rawContent, params.cParams, ZSTD_defaultCMem); + esr.zc = ZSTD_createCCtx(); + esr.workPlace = malloc(ZSTD_BLOCKSIZE_MAX); + if (!esr.dict || !esr.zc || !esr.workPlace) { + eSize = ERROR(memory_allocation); + DISPLAYLEVEL(1, "Not enough memory \n"); + goto _cleanup; + } + + /* collect stats on all samples */ + for (u=0; u= 4) { + /* writeStats */ + DISPLAYLEVEL(4, "Offset Code Frequencies : \n"); + for (u=0; u<=offcodeMax; u++) { + DISPLAYLEVEL(4, "%2u :%7u \n", u, offcodeCount[u]); + } } + + /* analyze, build stats, starting with literals */ + { size_t maxNbBits = HUF_buildCTable_wksp(hufTable, countLit, 255, huffLog, wksp, sizeof(wksp)); + if (HUF_isError(maxNbBits)) { + eSize = maxNbBits; + DISPLAYLEVEL(1, " HUF_buildCTable error \n"); + goto _cleanup; + } + if (maxNbBits==8) { /* not compressible : will fail on HUF_writeCTable() */ + DISPLAYLEVEL(2, "warning : pathological dataset : literals are not compressible : samples are noisy or too regular \n"); + ZDICT_flatLit(countLit); /* replace distribution by a fake "mostly flat but still compressible" distribution, that HUF_writeCTable() can encode */ + maxNbBits = HUF_buildCTable_wksp(hufTable, countLit, 255, huffLog, wksp, sizeof(wksp)); + assert(maxNbBits==9); + } + huffLog = (U32)maxNbBits; + } + + /* looking for most common first offsets */ + { U32 offset; + for (offset=1; offset dictBufferCapacity) { + dictContentSize = dictBufferCapacity - hSize; + } + + /* Pad the dictionary content with zeros if it is too small */ + if (dictContentSize < minContentSize) { + RETURN_ERROR_IF(hSize + minContentSize > dictBufferCapacity, dstSize_tooSmall, + "dictBufferCapacity too small to fit max repcode"); + paddingSize = minContentSize - dictContentSize; + } else { + paddingSize = 0; + } + + { + size_t const dictSize = hSize + paddingSize + dictContentSize; + + /* The dictionary consists of the header, optional padding, and the content. + * The padding comes before the content because the "best" position in the + * dictionary is the last byte. + */ + BYTE* const outDictHeader = (BYTE*)dictBuffer; + BYTE* const outDictPadding = outDictHeader + hSize; + BYTE* const outDictContent = outDictPadding + paddingSize; + + assert(dictSize <= dictBufferCapacity); + assert(outDictContent + dictContentSize == (BYTE*)dictBuffer + dictSize); + + /* First copy the customDictContent into its final location. + * `customDictContent` and `dictBuffer` may overlap, so we must + * do this before any other writes into the output buffer. + * Then copy the header & padding into the output buffer. + */ + memmove(outDictContent, customDictContent, dictContentSize); + memcpy(outDictHeader, header, hSize); + memset(outDictPadding, 0, paddingSize); + + return dictSize; + } +} + + +static size_t ZDICT_addEntropyTablesFromBuffer_advanced( + void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity, + const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples, + ZDICT_params_t params) +{ + int const compressionLevel = (params.compressionLevel == 0) ? ZSTD_CLEVEL_DEFAULT : params.compressionLevel; + U32 const notificationLevel = params.notificationLevel; + size_t hSize = 8; + + /* calculate entropy tables */ + DISPLAYLEVEL(2, "\r%70s\r", ""); /* clean display line */ + DISPLAYLEVEL(2, "statistics ... \n"); + { size_t const eSize = ZDICT_analyzeEntropy((char*)dictBuffer+hSize, dictBufferCapacity-hSize, + compressionLevel, + samplesBuffer, samplesSizes, nbSamples, + (char*)dictBuffer + dictBufferCapacity - dictContentSize, dictContentSize, + notificationLevel); + if (ZDICT_isError(eSize)) return eSize; + hSize += eSize; + } + + /* add dictionary header (after entropy tables) */ + MEM_writeLE32(dictBuffer, ZSTD_MAGIC_DICTIONARY); + { U64 const randomID = XXH64((char*)dictBuffer + dictBufferCapacity - dictContentSize, dictContentSize, 0); + U32 const compliantID = (randomID % ((1U<<31)-32768)) + 32768; + U32 const dictID = params.dictID ? params.dictID : compliantID; + MEM_writeLE32((char*)dictBuffer+4, dictID); + } + + if (hSize + dictContentSize < dictBufferCapacity) + memmove((char*)dictBuffer + hSize, (char*)dictBuffer + dictBufferCapacity - dictContentSize, dictContentSize); + return MIN(dictBufferCapacity, hSize+dictContentSize); +} + +/*! ZDICT_trainFromBuffer_unsafe_legacy() : +* Warning : `samplesBuffer` must be followed by noisy guard band !!! +* @return : size of dictionary, or an error code which can be tested with ZDICT_isError() +*/ +static size_t ZDICT_trainFromBuffer_unsafe_legacy( + void* dictBuffer, size_t maxDictSize, + const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples, + ZDICT_legacy_params_t params) +{ + U32 const dictListSize = MAX(MAX(DICTLISTSIZE_DEFAULT, nbSamples), (U32)(maxDictSize/16)); + dictItem* const dictList = (dictItem*)malloc(dictListSize * sizeof(*dictList)); + unsigned const selectivity = params.selectivityLevel == 0 ? g_selectivity_default : params.selectivityLevel; + unsigned const minRep = (selectivity > 30) ? MINRATIO : nbSamples >> selectivity; + size_t const targetDictSize = maxDictSize; + size_t const samplesBuffSize = ZDICT_totalSampleSize(samplesSizes, nbSamples); + size_t dictSize = 0; + U32 const notificationLevel = params.zParams.notificationLevel; + + /* checks */ + if (!dictList) return ERROR(memory_allocation); + if (maxDictSize < ZDICT_DICTSIZE_MIN) { free(dictList); return ERROR(dstSize_tooSmall); } /* requested dictionary size is too small */ + if (samplesBuffSize < ZDICT_MIN_SAMPLES_SIZE) { free(dictList); return ERROR(dictionaryCreation_failed); } /* not enough source to create dictionary */ + + /* init */ + ZDICT_initDictItem(dictList); + + /* build dictionary */ + ZDICT_trainBuffer_legacy(dictList, dictListSize, + samplesBuffer, samplesBuffSize, + samplesSizes, nbSamples, + minRep, notificationLevel); + + /* display best matches */ + if (params.zParams.notificationLevel>= 3) { + unsigned const nb = MIN(25, dictList[0].pos); + unsigned const dictContentSize = ZDICT_dictSize(dictList); + unsigned u; + DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", (unsigned)dictList[0].pos-1, dictContentSize); + DISPLAYLEVEL(3, "list %u best segments \n", nb-1); + for (u=1; u samplesBuffSize) || ((pos + length) > samplesBuffSize)) { + free(dictList); + return ERROR(GENERIC); /* should never happen */ + } + DISPLAYLEVEL(3, "%3u:%3u bytes at pos %8u, savings %7u bytes |", + u, length, pos, (unsigned)dictList[u].savings); + ZDICT_printHex((const char*)samplesBuffer+pos, printedLength); + DISPLAYLEVEL(3, "| \n"); + } } + + + /* create dictionary */ + { unsigned dictContentSize = ZDICT_dictSize(dictList); + if (dictContentSize < ZDICT_CONTENTSIZE_MIN) { free(dictList); return ERROR(dictionaryCreation_failed); } /* dictionary content too small */ + if (dictContentSize < targetDictSize/4) { + DISPLAYLEVEL(2, "! warning : selected content significantly smaller than requested (%u < %u) \n", dictContentSize, (unsigned)maxDictSize); + if (samplesBuffSize < 10 * targetDictSize) + DISPLAYLEVEL(2, "! consider increasing the number of samples (total size : %u MB)\n", (unsigned)(samplesBuffSize>>20)); + if (minRep > MINRATIO) { + DISPLAYLEVEL(2, "! consider increasing selectivity to produce larger dictionary (-s%u) \n", selectivity+1); + DISPLAYLEVEL(2, "! note : larger dictionaries are not necessarily better, test its efficiency on samples \n"); + } + } + + if ((dictContentSize > targetDictSize*3) && (nbSamples > 2*MINRATIO) && (selectivity>1)) { + unsigned proposedSelectivity = selectivity-1; + while ((nbSamples >> proposedSelectivity) <= MINRATIO) { proposedSelectivity--; } + DISPLAYLEVEL(2, "! note : calculated dictionary significantly larger than requested (%u > %u) \n", dictContentSize, (unsigned)maxDictSize); + DISPLAYLEVEL(2, "! consider increasing dictionary size, or produce denser dictionary (-s%u) \n", proposedSelectivity); + DISPLAYLEVEL(2, "! always test dictionary efficiency on real samples \n"); + } + + /* limit dictionary size */ + { U32 const max = dictList->pos; /* convention : nb of useful elts within dictList */ + U32 currentSize = 0; + U32 n; for (n=1; n targetDictSize) { currentSize -= dictList[n].length; break; } + } + dictList->pos = n; + dictContentSize = currentSize; + } + + /* build dict content */ + { U32 u; + BYTE* ptr = (BYTE*)dictBuffer + maxDictSize; + for (u=1; upos; u++) { + U32 l = dictList[u].length; + ptr -= l; + if (ptr<(BYTE*)dictBuffer) { free(dictList); return ERROR(GENERIC); } /* should not happen */ + memcpy(ptr, (const char*)samplesBuffer+dictList[u].pos, l); + } } + + dictSize = ZDICT_addEntropyTablesFromBuffer_advanced(dictBuffer, dictContentSize, maxDictSize, + samplesBuffer, samplesSizes, nbSamples, + params.zParams); + } + + /* clean up */ + free(dictList); + return dictSize; +} + + +/* ZDICT_trainFromBuffer_legacy() : + * issue : samplesBuffer need to be followed by a noisy guard band. + * work around : duplicate the buffer, and add the noise */ +size_t ZDICT_trainFromBuffer_legacy(void* dictBuffer, size_t dictBufferCapacity, + const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples, + ZDICT_legacy_params_t params) +{ + size_t result; + void* newBuff; + size_t const sBuffSize = ZDICT_totalSampleSize(samplesSizes, nbSamples); + if (sBuffSize < ZDICT_MIN_SAMPLES_SIZE) return 0; /* not enough content => no dictionary */ + + newBuff = malloc(sBuffSize + NOISELENGTH); + if (!newBuff) return ERROR(memory_allocation); + + memcpy(newBuff, samplesBuffer, sBuffSize); + ZDICT_fillNoise((char*)newBuff + sBuffSize, NOISELENGTH); /* guard band, for end of buffer condition */ + + result = + ZDICT_trainFromBuffer_unsafe_legacy(dictBuffer, dictBufferCapacity, newBuff, + samplesSizes, nbSamples, params); + free(newBuff); + return result; +} + + +size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity, + const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples) +{ + ZDICT_fastCover_params_t params; + DEBUGLOG(3, "ZDICT_trainFromBuffer"); + memset(¶ms, 0, sizeof(params)); + params.d = 8; + params.steps = 4; + /* Use default level since no compression level information is available */ + params.zParams.compressionLevel = ZSTD_CLEVEL_DEFAULT; +#if defined(DEBUGLEVEL) && (DEBUGLEVEL>=1) + params.zParams.notificationLevel = DEBUGLEVEL; +#endif + return ZDICT_optimizeTrainFromBuffer_fastCover(dictBuffer, dictBufferCapacity, + samplesBuffer, samplesSizes, nbSamples, + ¶ms); +} + +size_t ZDICT_addEntropyTablesFromBuffer(void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity, + const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples) +{ + ZDICT_params_t params; + memset(¶ms, 0, sizeof(params)); + return ZDICT_addEntropyTablesFromBuffer_advanced(dictBuffer, dictContentSize, dictBufferCapacity, + samplesBuffer, samplesSizes, nbSamples, + params); +} diff --git a/cpp/third_party/zstd-1.5.7/lib/dll/example/Makefile b/cpp/third_party/zstd-1.5.7/lib/dll/example/Makefile new file mode 100644 index 0000000000..86cf6906e5 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dll/example/Makefile @@ -0,0 +1,48 @@ +# ################################################################ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under both the BSD-style license (found in the +# LICENSE file in the root directory of this source tree) and the GPLv2 (found +# in the COPYING file in the root directory of this source tree). +# You may select, at your option, one of the above-listed licenses. +# ################################################################ + +VOID := /dev/null +ZSTDDIR := ../include +LIBDIR := ../static +DLLDIR := ../dll + +CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make +CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum \ + -Wdeclaration-after-statement -Wstrict-prototypes \ + -Wpointer-arith -Wstrict-aliasing=1 +CFLAGS += $(MOREFLAGS) +CPPFLAGS:= -I$(ZSTDDIR) -DXXH_NAMESPACE=ZSTD_ +FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) + + +# Define *.exe as extension for Windows systems +ifneq (,$(filter Windows%,$(OS))) +EXT =.exe +else +EXT = +endif + +.PHONY: default fullbench-dll fullbench-lib + + +default: all + +all: fullbench-dll fullbench-lib + + +fullbench-lib: fullbench.c datagen.c + $(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/libzstd_static.lib + +fullbench-dll: fullbench.c datagen.c + $(CC) $(FLAGS) $^ -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(DLLDIR)/libzstd.dll + +clean: + @$(RM) fullbench-dll$(EXT) fullbench-lib$(EXT) \ + @echo Cleaning completed diff --git a/cpp/third_party/zstd-1.5.7/lib/dll/example/README.md b/cpp/third_party/zstd-1.5.7/lib/dll/example/README.md new file mode 100644 index 0000000000..46aec79800 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dll/example/README.md @@ -0,0 +1,63 @@ +# ZSTD Windows binary package + +## The package contents + +- `zstd.exe` : Command Line Utility, supporting gzip-like arguments +- `dll\libzstd.dll` : The ZSTD dynamic library (DLL) +- `dll\libzstd.lib` : The import library of the ZSTD dynamic library (DLL) for Visual C++ +- `example\` : The example of usage of the ZSTD library +- `include\` : Header files required by the ZSTD library +- `static\libzstd_static.lib` : The static ZSTD library (LIB) + +## Usage of Command Line Interface + +Command Line Interface (CLI) supports gzip-like arguments. +By default CLI takes an input file and compresses it to an output file: + + Usage: zstd [arg] [input] [output] + +The full list of commands for CLI can be obtained with `-h` or `-H`. The ratio can +be improved with commands from `-3` to `-16` but higher levels also have slower +compression. CLI includes in-memory compression benchmark module with compression +levels starting from `-b` and ending with `-e` with iteration time of `-i` seconds. +CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined +into `-b1e18i1`. + +## The example of usage of static and dynamic ZSTD libraries with gcc/MinGW + +Use `cd example` and `make` to build `fullbench-dll` and `fullbench-lib`. +`fullbench-dll` uses a dynamic ZSTD library from the `dll` directory. +`fullbench-lib` uses a static ZSTD library from the `lib` directory. + +## Using ZSTD DLL with gcc/MinGW + +The header files from `include\` and the dynamic library `dll\libzstd.dll` +are required to compile a project using gcc/MinGW. +The dynamic library has to be added to linking options. +It means that if a project that uses ZSTD consists of a single `test-dll.c` +file it should be linked with `dll\libzstd.dll`. For example: + + gcc $(CFLAGS) -Iinclude\ test-dll.c -o test-dll dll\libzstd.dll + +The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`. + +## The example of usage of static and dynamic ZSTD libraries with Visual C++ + +Open `example\fullbench-dll.sln` to compile `fullbench-dll` that uses a +dynamic ZSTD library from the `dll` directory. The solution works with Visual C++ +2010 or newer. When one will open the solution with Visual C++ newer than 2010 +then the solution will be upgraded to the current version. + +## Using ZSTD DLL with Visual C++ + +The header files from `include\` and the import library `dll\libzstd.lib` +are required to compile a project using Visual C++. + +1. The path to header files should be added to `Additional Include Directories` that can + be found in project properties `C/C++` then `General`. +2. The import library has to be added to `Additional Dependencies` that can + be found in project properties `Linker` then `Input`. + If one will provide only the name `libzstd.lib` without a full path to the library + the directory has to be added to `Linker\General\Additional Library Directories`. + +The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`. diff --git a/cpp/third_party/zstd-1.5.7/lib/dll/example/build_package.bat b/cpp/third_party/zstd-1.5.7/lib/dll/example/build_package.bat new file mode 100644 index 0000000000..8baabc7b2c --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dll/example/build_package.bat @@ -0,0 +1,20 @@ +@ECHO OFF +MKDIR bin\dll bin\static bin\example bin\include +COPY tests\fullbench.c bin\example\ +COPY programs\datagen.c bin\example\ +COPY programs\datagen.h bin\example\ +COPY programs\util.h bin\example\ +COPY programs\platform.h bin\example\ +COPY lib\common\mem.h bin\example\ +COPY lib\common\zstd_internal.h bin\example\ +COPY lib\common\error_private.h bin\example\ +COPY lib\common\xxhash.h bin\example\ +COPY lib\libzstd.a bin\static\libzstd_static.lib +COPY lib\dll\libzstd.* bin\dll\ +COPY lib\dll\example\Makefile bin\example\ +COPY lib\dll\example\fullbench-dll.* bin\example\ +COPY lib\dll\example\README.md bin\ +COPY lib\zstd.h bin\include\ +COPY lib\common\zstd_errors.h bin\include\ +COPY lib\dictBuilder\zdict.h bin\include\ +COPY programs\zstd.exe bin\zstd.exe diff --git a/cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.sln b/cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.sln new file mode 100644 index 0000000000..72e302e7f5 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2012 for Windows Desktop +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullbench-dll", "fullbench-dll.vcxproj", "{13992FD2-077E-4954-B065-A428198201A9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {13992FD2-077E-4954-B065-A428198201A9}.Debug|Win32.Build.0 = Debug|Win32 + {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.ActiveCfg = Debug|x64 + {13992FD2-077E-4954-B065-A428198201A9}.Debug|x64.Build.0 = Debug|x64 + {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.ActiveCfg = Release|Win32 + {13992FD2-077E-4954-B065-A428198201A9}.Release|Win32.Build.0 = Release|Win32 + {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.ActiveCfg = Release|x64 + {13992FD2-077E-4954-B065-A428198201A9}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.vcxproj b/cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.vcxproj new file mode 100644 index 0000000000..44bbaf788e --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/dll/example/fullbench-dll.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {00000000-1CC8-4FD7-9281-6B8DBB9D3DF8} + Win32Proj + fullbench-dll + $(SolutionDir)bin\$(Platform)_$(Configuration)\ + $(SolutionDir)bin\obj\$(RootNamespace)_$(Platform)_$(Configuration)\ + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + true + $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); + false + + + true + $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); + false + + + false + $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); + false + + + false + $(IncludePath);$(SolutionDir)..\..\lib;$(SolutionDir)..\..\programs;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\common;$(UniversalCRT_IncludePath); + false + + + + + + Level4 + Disabled + WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) + true + false + ..\include + + + Console + true + $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) + libzstd.lib;%(AdditionalDependencies) + false + + + + + + + Level4 + Disabled + WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) + true + false + ..\include + + + Console + true + $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) + libzstd.lib;%(AdditionalDependencies) + + + + + Level4 + + + MaxSpeed + true + true + WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) + false + ..\include + false + MultiThreaded + + + Console + true + true + true + $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) + libzstd.lib;%(AdditionalDependencies) + false + + + + + Level4 + + + MaxSpeed + true + true + WIN32;_DEBUG;_CONSOLE;ZSTD_DLL_IMPORT=1;%(PreprocessorDefinitions) + false + false + ..\include + MultiThreaded + + + Console + true + true + true + $(SolutionDir)..\dll;%(AdditionalLibraryDirectories) + libzstd.lib;%(AdditionalDependencies) + + + + + + + + + + + + + \ No newline at end of file diff --git a/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_legacy.h b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_legacy.h new file mode 100644 index 0000000000..7a8a04e593 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_legacy.h @@ -0,0 +1,452 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_LEGACY_H +#define ZSTD_LEGACY_H + +#if defined (__cplusplus) +extern "C" { +#endif + +/* ************************************* +* Includes +***************************************/ +#include "../common/mem.h" /* MEM_STATIC */ +#include "../common/error_private.h" /* ERROR */ +#include "../common/zstd_internal.h" /* ZSTD_inBuffer, ZSTD_outBuffer, ZSTD_frameSizeInfo */ + +#if !defined (ZSTD_LEGACY_SUPPORT) || (ZSTD_LEGACY_SUPPORT == 0) +# undef ZSTD_LEGACY_SUPPORT +# define ZSTD_LEGACY_SUPPORT 8 +#endif + +#if (ZSTD_LEGACY_SUPPORT <= 1) +# include "zstd_v01.h" +#endif +#if (ZSTD_LEGACY_SUPPORT <= 2) +# include "zstd_v02.h" +#endif +#if (ZSTD_LEGACY_SUPPORT <= 3) +# include "zstd_v03.h" +#endif +#if (ZSTD_LEGACY_SUPPORT <= 4) +# include "zstd_v04.h" +#endif +#if (ZSTD_LEGACY_SUPPORT <= 5) +# include "zstd_v05.h" +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) +# include "zstd_v06.h" +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) +# include "zstd_v07.h" +#endif + +/** ZSTD_isLegacy() : + @return : > 0 if supported by legacy decoder. 0 otherwise. + return value is the version. +*/ +MEM_STATIC unsigned ZSTD_isLegacy(const void* src, size_t srcSize) +{ + U32 magicNumberLE; + if (srcSize<4) return 0; + magicNumberLE = MEM_readLE32(src); + switch(magicNumberLE) + { +#if (ZSTD_LEGACY_SUPPORT <= 1) + case ZSTDv01_magicNumberLE:return 1; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 2) + case ZSTDv02_magicNumber : return 2; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 3) + case ZSTDv03_magicNumber : return 3; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 4) + case ZSTDv04_magicNumber : return 4; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 5) + case ZSTDv05_MAGICNUMBER : return 5; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) + case ZSTDv06_MAGICNUMBER : return 6; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) + case ZSTDv07_MAGICNUMBER : return 7; +#endif + default : return 0; + } +} + + +MEM_STATIC unsigned long long ZSTD_getDecompressedSize_legacy(const void* src, size_t srcSize) +{ + U32 const version = ZSTD_isLegacy(src, srcSize); + if (version < 5) return 0; /* no decompressed size in frame header, or not a legacy format */ +#if (ZSTD_LEGACY_SUPPORT <= 5) + if (version==5) { + ZSTDv05_parameters fParams; + size_t const frResult = ZSTDv05_getFrameParams(&fParams, src, srcSize); + if (frResult != 0) return 0; + return fParams.srcSize; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) + if (version==6) { + ZSTDv06_frameParams fParams; + size_t const frResult = ZSTDv06_getFrameParams(&fParams, src, srcSize); + if (frResult != 0) return 0; + return fParams.frameContentSize; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) + if (version==7) { + ZSTDv07_frameParams fParams; + size_t const frResult = ZSTDv07_getFrameParams(&fParams, src, srcSize); + if (frResult != 0) return 0; + return fParams.frameContentSize; + } +#endif + return 0; /* should not be possible */ +} + + +MEM_STATIC size_t ZSTD_decompressLegacy( + void* dst, size_t dstCapacity, + const void* src, size_t compressedSize, + const void* dict,size_t dictSize) +{ + U32 const version = ZSTD_isLegacy(src, compressedSize); + char x; + /* Avoid passing NULL to legacy decoding. */ + if (dst == NULL) { + assert(dstCapacity == 0); + dst = &x; + } + if (src == NULL) { + assert(compressedSize == 0); + src = &x; + } + if (dict == NULL) { + assert(dictSize == 0); + dict = &x; + } + (void)dst; (void)dstCapacity; (void)dict; (void)dictSize; /* unused when ZSTD_LEGACY_SUPPORT >= 8 */ + switch(version) + { +#if (ZSTD_LEGACY_SUPPORT <= 1) + case 1 : + return ZSTDv01_decompress(dst, dstCapacity, src, compressedSize); +#endif +#if (ZSTD_LEGACY_SUPPORT <= 2) + case 2 : + return ZSTDv02_decompress(dst, dstCapacity, src, compressedSize); +#endif +#if (ZSTD_LEGACY_SUPPORT <= 3) + case 3 : + return ZSTDv03_decompress(dst, dstCapacity, src, compressedSize); +#endif +#if (ZSTD_LEGACY_SUPPORT <= 4) + case 4 : + return ZSTDv04_decompress(dst, dstCapacity, src, compressedSize); +#endif +#if (ZSTD_LEGACY_SUPPORT <= 5) + case 5 : + { size_t result; + ZSTDv05_DCtx* const zd = ZSTDv05_createDCtx(); + if (zd==NULL) return ERROR(memory_allocation); + result = ZSTDv05_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); + ZSTDv05_freeDCtx(zd); + return result; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) + case 6 : + { size_t result; + ZSTDv06_DCtx* const zd = ZSTDv06_createDCtx(); + if (zd==NULL) return ERROR(memory_allocation); + result = ZSTDv06_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); + ZSTDv06_freeDCtx(zd); + return result; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) + case 7 : + { size_t result; + ZSTDv07_DCtx* const zd = ZSTDv07_createDCtx(); + if (zd==NULL) return ERROR(memory_allocation); + result = ZSTDv07_decompress_usingDict(zd, dst, dstCapacity, src, compressedSize, dict, dictSize); + ZSTDv07_freeDCtx(zd); + return result; + } +#endif + default : + return ERROR(prefix_unknown); + } +} + +MEM_STATIC ZSTD_frameSizeInfo ZSTD_findFrameSizeInfoLegacy(const void *src, size_t srcSize) +{ + ZSTD_frameSizeInfo frameSizeInfo; + U32 const version = ZSTD_isLegacy(src, srcSize); + switch(version) + { +#if (ZSTD_LEGACY_SUPPORT <= 1) + case 1 : + ZSTDv01_findFrameSizeInfoLegacy(src, srcSize, + &frameSizeInfo.compressedSize, + &frameSizeInfo.decompressedBound); + break; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 2) + case 2 : + ZSTDv02_findFrameSizeInfoLegacy(src, srcSize, + &frameSizeInfo.compressedSize, + &frameSizeInfo.decompressedBound); + break; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 3) + case 3 : + ZSTDv03_findFrameSizeInfoLegacy(src, srcSize, + &frameSizeInfo.compressedSize, + &frameSizeInfo.decompressedBound); + break; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 4) + case 4 : + ZSTDv04_findFrameSizeInfoLegacy(src, srcSize, + &frameSizeInfo.compressedSize, + &frameSizeInfo.decompressedBound); + break; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 5) + case 5 : + ZSTDv05_findFrameSizeInfoLegacy(src, srcSize, + &frameSizeInfo.compressedSize, + &frameSizeInfo.decompressedBound); + break; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) + case 6 : + ZSTDv06_findFrameSizeInfoLegacy(src, srcSize, + &frameSizeInfo.compressedSize, + &frameSizeInfo.decompressedBound); + break; +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) + case 7 : + ZSTDv07_findFrameSizeInfoLegacy(src, srcSize, + &frameSizeInfo.compressedSize, + &frameSizeInfo.decompressedBound); + break; +#endif + default : + frameSizeInfo.compressedSize = ERROR(prefix_unknown); + frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR; + break; + } + if (!ZSTD_isError(frameSizeInfo.compressedSize) && frameSizeInfo.compressedSize > srcSize) { + frameSizeInfo.compressedSize = ERROR(srcSize_wrong); + frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR; + } + /* In all cases, decompressedBound == nbBlocks * ZSTD_BLOCKSIZE_MAX. + * So we can compute nbBlocks without having to change every function. + */ + if (frameSizeInfo.decompressedBound != ZSTD_CONTENTSIZE_ERROR) { + assert((frameSizeInfo.decompressedBound & (ZSTD_BLOCKSIZE_MAX - 1)) == 0); + frameSizeInfo.nbBlocks = (size_t)(frameSizeInfo.decompressedBound / ZSTD_BLOCKSIZE_MAX); + } + return frameSizeInfo; +} + +MEM_STATIC size_t ZSTD_findFrameCompressedSizeLegacy(const void *src, size_t srcSize) +{ + ZSTD_frameSizeInfo frameSizeInfo = ZSTD_findFrameSizeInfoLegacy(src, srcSize); + return frameSizeInfo.compressedSize; +} + +MEM_STATIC size_t ZSTD_freeLegacyStreamContext(void* legacyContext, U32 version) +{ + switch(version) + { + default : + case 1 : + case 2 : + case 3 : + (void)legacyContext; + return ERROR(version_unsupported); +#if (ZSTD_LEGACY_SUPPORT <= 4) + case 4 : return ZBUFFv04_freeDCtx((ZBUFFv04_DCtx*)legacyContext); +#endif +#if (ZSTD_LEGACY_SUPPORT <= 5) + case 5 : return ZBUFFv05_freeDCtx((ZBUFFv05_DCtx*)legacyContext); +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) + case 6 : return ZBUFFv06_freeDCtx((ZBUFFv06_DCtx*)legacyContext); +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) + case 7 : return ZBUFFv07_freeDCtx((ZBUFFv07_DCtx*)legacyContext); +#endif + } +} + + +MEM_STATIC size_t ZSTD_initLegacyStream(void** legacyContext, U32 prevVersion, U32 newVersion, + const void* dict, size_t dictSize) +{ + char x; + /* Avoid passing NULL to legacy decoding. */ + if (dict == NULL) { + assert(dictSize == 0); + dict = &x; + } + DEBUGLOG(5, "ZSTD_initLegacyStream for v0.%u", newVersion); + if (prevVersion != newVersion) ZSTD_freeLegacyStreamContext(*legacyContext, prevVersion); + switch(newVersion) + { + default : + case 1 : + case 2 : + case 3 : + (void)dict; (void)dictSize; + return 0; +#if (ZSTD_LEGACY_SUPPORT <= 4) + case 4 : + { + ZBUFFv04_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv04_createDCtx() : (ZBUFFv04_DCtx*)*legacyContext; + if (dctx==NULL) return ERROR(memory_allocation); + ZBUFFv04_decompressInit(dctx); + ZBUFFv04_decompressWithDictionary(dctx, dict, dictSize); + *legacyContext = dctx; + return 0; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 5) + case 5 : + { + ZBUFFv05_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv05_createDCtx() : (ZBUFFv05_DCtx*)*legacyContext; + if (dctx==NULL) return ERROR(memory_allocation); + ZBUFFv05_decompressInitDictionary(dctx, dict, dictSize); + *legacyContext = dctx; + return 0; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) + case 6 : + { + ZBUFFv06_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv06_createDCtx() : (ZBUFFv06_DCtx*)*legacyContext; + if (dctx==NULL) return ERROR(memory_allocation); + ZBUFFv06_decompressInitDictionary(dctx, dict, dictSize); + *legacyContext = dctx; + return 0; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) + case 7 : + { + ZBUFFv07_DCtx* dctx = (prevVersion != newVersion) ? ZBUFFv07_createDCtx() : (ZBUFFv07_DCtx*)*legacyContext; + if (dctx==NULL) return ERROR(memory_allocation); + ZBUFFv07_decompressInitDictionary(dctx, dict, dictSize); + *legacyContext = dctx; + return 0; + } +#endif + } +} + + + +MEM_STATIC size_t ZSTD_decompressLegacyStream(void* legacyContext, U32 version, + ZSTD_outBuffer* output, ZSTD_inBuffer* input) +{ + static char x; + /* Avoid passing NULL to legacy decoding. */ + if (output->dst == NULL) { + assert(output->size == 0); + output->dst = &x; + } + if (input->src == NULL) { + assert(input->size == 0); + input->src = &x; + } + DEBUGLOG(5, "ZSTD_decompressLegacyStream for v0.%u", version); + switch(version) + { + default : + case 1 : + case 2 : + case 3 : + (void)legacyContext; (void)output; (void)input; + return ERROR(version_unsupported); +#if (ZSTD_LEGACY_SUPPORT <= 4) + case 4 : + { + ZBUFFv04_DCtx* dctx = (ZBUFFv04_DCtx*) legacyContext; + const void* src = (const char*)input->src + input->pos; + size_t readSize = input->size - input->pos; + void* dst = (char*)output->dst + output->pos; + size_t decodedSize = output->size - output->pos; + size_t const hintSize = ZBUFFv04_decompressContinue(dctx, dst, &decodedSize, src, &readSize); + output->pos += decodedSize; + input->pos += readSize; + return hintSize; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 5) + case 5 : + { + ZBUFFv05_DCtx* dctx = (ZBUFFv05_DCtx*) legacyContext; + const void* src = (const char*)input->src + input->pos; + size_t readSize = input->size - input->pos; + void* dst = (char*)output->dst + output->pos; + size_t decodedSize = output->size - output->pos; + size_t const hintSize = ZBUFFv05_decompressContinue(dctx, dst, &decodedSize, src, &readSize); + output->pos += decodedSize; + input->pos += readSize; + return hintSize; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 6) + case 6 : + { + ZBUFFv06_DCtx* dctx = (ZBUFFv06_DCtx*) legacyContext; + const void* src = (const char*)input->src + input->pos; + size_t readSize = input->size - input->pos; + void* dst = (char*)output->dst + output->pos; + size_t decodedSize = output->size - output->pos; + size_t const hintSize = ZBUFFv06_decompressContinue(dctx, dst, &decodedSize, src, &readSize); + output->pos += decodedSize; + input->pos += readSize; + return hintSize; + } +#endif +#if (ZSTD_LEGACY_SUPPORT <= 7) + case 7 : + { + ZBUFFv07_DCtx* dctx = (ZBUFFv07_DCtx*) legacyContext; + const void* src = (const char*)input->src + input->pos; + size_t readSize = input->size - input->pos; + void* dst = (char*)output->dst + output->pos; + size_t decodedSize = output->size - output->pos; + size_t const hintSize = ZBUFFv07_decompressContinue(dctx, dst, &decodedSize, src, &readSize); + output->pos += decodedSize; + input->pos += readSize; + return hintSize; + } +#endif + } +} + + +#if defined (__cplusplus) +} +#endif + +#endif /* ZSTD_LEGACY_H */ diff --git a/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.c b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.c new file mode 100644 index 0000000000..ad3c9330ef --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.c @@ -0,0 +1,2127 @@ +/* + * Copyright (c) Yann Collet, Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +/****************************************** +* Includes +******************************************/ +#include /* size_t, ptrdiff_t */ +#include "zstd_v01.h" +#include "../common/compiler.h" +#include "../common/error_private.h" + + +/****************************************** +* Static allocation +******************************************/ +/* You can statically allocate FSE CTable/DTable as a table of unsigned using below macro */ +#define FSE_DTABLE_SIZE_U32(maxTableLog) (1 + (1<2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) +* Increasing memory usage improves compression ratio +* Reduced memory usage can improve speed, due to cache effect +* Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ +#define FSE_MAX_MEMORY_USAGE 14 +#define FSE_DEFAULT_MEMORY_USAGE 13 + +/* FSE_MAX_SYMBOL_VALUE : +* Maximum symbol value authorized. +* Required for proper stack allocation */ +#define FSE_MAX_SYMBOL_VALUE 255 + + +/**************************************************************** +* template functions type & suffix +****************************************************************/ +#define FSE_FUNCTION_TYPE BYTE +#define FSE_FUNCTION_EXTENSION + + +/**************************************************************** +* Byte symbol type +****************************************************************/ +typedef struct +{ + unsigned short newState; + unsigned char symbol; + unsigned char nbBits; +} FSE_decode_t; /* size == U32 */ + + + +/**************************************************************** +* Compiler specifics +****************************************************************/ +#ifdef _MSC_VER /* Visual Studio */ +# define FORCE_INLINE static __forceinline +# include /* For Visual 2005 */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */ +#else +# define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# ifdef __GNUC__ +# define FORCE_INLINE static inline __attribute__((always_inline)) +# else +# define FORCE_INLINE static inline +# endif +# else +# define FORCE_INLINE static +# endif /* __STDC_VERSION__ */ +#endif + + +/**************************************************************** +* Includes +****************************************************************/ +#include /* malloc, free, qsort */ +#include /* memcpy, memset */ +#include /* printf (debug) */ + + +#ifndef MEM_ACCESS_MODULE +#define MEM_ACCESS_MODULE +/**************************************************************** +* Basic Types +*****************************************************************/ +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# include +typedef uint8_t BYTE; +typedef uint16_t U16; +typedef int16_t S16; +typedef uint32_t U32; +typedef int32_t S32; +typedef uint64_t U64; +typedef int64_t S64; +#else +typedef unsigned char BYTE; +typedef unsigned short U16; +typedef signed short S16; +typedef unsigned int U32; +typedef signed int S32; +typedef unsigned long long U64; +typedef signed long long S64; +#endif + +#endif /* MEM_ACCESS_MODULE */ + +/**************************************************************** +* Memory I/O +*****************************************************************/ + +static unsigned FSE_32bits(void) +{ + return sizeof(void*)==4; +} + +static unsigned FSE_isLittleEndian(void) +{ + const union { U32 i; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ + return one.c[0]; +} + +static U16 FSE_read16(const void* memPtr) +{ + U16 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +static U32 FSE_read32(const void* memPtr) +{ + U32 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +static U64 FSE_read64(const void* memPtr) +{ + U64 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +static U16 FSE_readLE16(const void* memPtr) +{ + if (FSE_isLittleEndian()) + return FSE_read16(memPtr); + else + { + const BYTE* p = (const BYTE*)memPtr; + return (U16)(p[0] + (p[1]<<8)); + } +} + +static U32 FSE_readLE32(const void* memPtr) +{ + if (FSE_isLittleEndian()) + return FSE_read32(memPtr); + else + { + const BYTE* p = (const BYTE*)memPtr; + return (U32)((U32)p[0] + ((U32)p[1]<<8) + ((U32)p[2]<<16) + ((U32)p[3]<<24)); + } +} + + +static U64 FSE_readLE64(const void* memPtr) +{ + if (FSE_isLittleEndian()) + return FSE_read64(memPtr); + else + { + const BYTE* p = (const BYTE*)memPtr; + return (U64)((U64)p[0] + ((U64)p[1]<<8) + ((U64)p[2]<<16) + ((U64)p[3]<<24) + + ((U64)p[4]<<32) + ((U64)p[5]<<40) + ((U64)p[6]<<48) + ((U64)p[7]<<56)); + } +} + +static size_t FSE_readLEST(const void* memPtr) +{ + if (FSE_32bits()) + return (size_t)FSE_readLE32(memPtr); + else + return (size_t)FSE_readLE64(memPtr); +} + + + +/**************************************************************** +* Constants +*****************************************************************/ +#define FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) +#define FSE_MAX_TABLESIZE (1U< FSE_TABLELOG_ABSOLUTE_MAX +#error "FSE_MAX_TABLELOG > FSE_TABLELOG_ABSOLUTE_MAX is not supported" +#endif + + +/**************************************************************** +* Error Management +****************************************************************/ +#define FSE_STATIC_ASSERT(c) { enum { FSE_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ + + +/**************************************************************** +* Complex types +****************************************************************/ +typedef struct +{ + int deltaFindState; + U32 deltaNbBits; +} FSE_symbolCompressionTransform; /* total 8 bytes */ + +typedef U32 DTable_max_t[FSE_DTABLE_SIZE_U32(FSE_MAX_TABLELOG)]; + +/**************************************************************** +* Internal functions +****************************************************************/ +FORCE_INLINE unsigned FSE_highbit32 (U32 val) +{ +# if defined(_MSC_VER) /* Visual */ + unsigned long r; + return _BitScanReverse(&r, val) ? (unsigned)r : 0; +# elif defined(__GNUC__) && (GCC_VERSION >= 304) /* GCC Intrinsic */ + return __builtin_clz (val) ^ 31; +# else /* Software version */ + static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; + U32 v = val; + unsigned r; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + r = DeBruijnClz[ (U32) (v * 0x07C4ACDDU) >> 27]; + return r; +# endif +} + + +/**************************************************************** +* Templates +****************************************************************/ +/* + designed to be included + for type-specific functions (template emulation in C) + Objective is to write these functions only once, for improved maintenance +*/ + +/* safety checks */ +#ifndef FSE_FUNCTION_EXTENSION +# error "FSE_FUNCTION_EXTENSION must be defined" +#endif +#ifndef FSE_FUNCTION_TYPE +# error "FSE_FUNCTION_TYPE must be defined" +#endif + +/* Function names */ +#define FSE_CAT(X,Y) X##Y +#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) +#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) + + + +static U32 FSE_tableStep(U32 tableSize) { return (tableSize>>1) + (tableSize>>3) + 3; } + +#define FSE_DECODE_TYPE FSE_decode_t + + +typedef struct { + U16 tableLog; + U16 fastMode; +} FSE_DTableHeader; /* sizeof U32 */ + +static size_t FSE_buildDTable +(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) +{ + void* ptr = dt; + FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; + FSE_DECODE_TYPE* const tableDecode = (FSE_DECODE_TYPE*)(ptr) + 1; /* because dt is unsigned, 32-bits aligned on 32-bits */ + const U32 tableSize = 1 << tableLog; + const U32 tableMask = tableSize-1; + const U32 step = FSE_tableStep(tableSize); + U16 symbolNext[FSE_MAX_SYMBOL_VALUE+1]; + U32 position = 0; + U32 highThreshold = tableSize-1; + const S16 largeLimit= (S16)(1 << (tableLog-1)); + U32 noLarge = 1; + U32 s; + + /* Sanity Checks */ + if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return (size_t)-FSE_ERROR_maxSymbolValue_tooLarge; + if (tableLog > FSE_MAX_TABLELOG) return (size_t)-FSE_ERROR_tableLog_tooLarge; + + /* Init, lay down lowprob symbols */ + DTableH[0].tableLog = (U16)tableLog; + for (s=0; s<=maxSymbolValue; s++) + { + if (normalizedCounter[s]==-1) + { + tableDecode[highThreshold--].symbol = (FSE_FUNCTION_TYPE)s; + symbolNext[s] = 1; + } + else + { + if (normalizedCounter[s] >= largeLimit) noLarge=0; + symbolNext[s] = normalizedCounter[s]; + } + } + + /* Spread symbols */ + for (s=0; s<=maxSymbolValue; s++) + { + int i; + for (i=0; i highThreshold) position = (position + step) & tableMask; /* lowprob area */ + } + } + + if (position!=0) return (size_t)-FSE_ERROR_GENERIC; /* position must reach all cells once, otherwise normalizedCounter is incorrect */ + + /* Build Decoding table */ + { + U32 i; + for (i=0; ifastMode = (U16)noLarge; + return 0; +} + + +/****************************************** +* FSE byte symbol +******************************************/ +#ifndef FSE_COMMONDEFS_ONLY + +static unsigned FSE_isError(size_t code) { return (code > (size_t)(-FSE_ERROR_maxCode)); } + +static short FSE_abs(short a) +{ + return a<0? -a : a; +} + + +/**************************************************************** +* Header bitstream management +****************************************************************/ +static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, + const void* headerBuffer, size_t hbSize) +{ + const BYTE* const istart = (const BYTE*) headerBuffer; + const BYTE* const iend = istart + hbSize; + const BYTE* ip = istart; + int nbBits; + int remaining; + int threshold; + U32 bitStream; + int bitCount; + unsigned charnum = 0; + int previous0 = 0; + + if (hbSize < 4) return (size_t)-FSE_ERROR_srcSize_wrong; + bitStream = FSE_readLE32(ip); + nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ + if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return (size_t)-FSE_ERROR_tableLog_tooLarge; + bitStream >>= 4; + bitCount = 4; + *tableLogPtr = nbBits; + remaining = (1<1) && (charnum<=*maxSVPtr)) + { + if (previous0) + { + unsigned n0 = charnum; + while ((bitStream & 0xFFFF) == 0xFFFF) + { + n0+=24; + if (ip < iend-5) + { + ip+=2; + bitStream = FSE_readLE32(ip) >> bitCount; + } + else + { + bitStream >>= 16; + bitCount+=16; + } + } + while ((bitStream & 3) == 3) + { + n0+=3; + bitStream>>=2; + bitCount+=2; + } + n0 += bitStream & 3; + bitCount += 2; + if (n0 > *maxSVPtr) return (size_t)-FSE_ERROR_maxSymbolValue_tooSmall; + while (charnum < n0) normalizedCounter[charnum++] = 0; + if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) + { + ip += bitCount>>3; + bitCount &= 7; + bitStream = FSE_readLE32(ip) >> bitCount; + } + else + bitStream >>= 2; + } + { + const short max = (short)((2*threshold-1)-remaining); + short count; + + if ((bitStream & (threshold-1)) < (U32)max) + { + count = (short)(bitStream & (threshold-1)); + bitCount += nbBits-1; + } + else + { + count = (short)(bitStream & (2*threshold-1)); + if (count >= threshold) count -= max; + bitCount += nbBits; + } + + count--; /* extra accuracy */ + remaining -= FSE_abs(count); + normalizedCounter[charnum++] = count; + previous0 = !count; + while (remaining < threshold) + { + nbBits--; + threshold >>= 1; + } + + { + if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) + { + ip += bitCount>>3; + bitCount &= 7; + } + else + { + bitCount -= (int)(8 * (iend - 4 - ip)); + ip = iend - 4; + } + bitStream = FSE_readLE32(ip) >> (bitCount & 31); + } + } + } + if (remaining != 1) return (size_t)-FSE_ERROR_GENERIC; + *maxSVPtr = charnum-1; + + ip += (bitCount+7)>>3; + if ((size_t)(ip-istart) > hbSize) return (size_t)-FSE_ERROR_srcSize_wrong; + return ip-istart; +} + + +/********************************************************* +* Decompression (Byte symbols) +*********************************************************/ +static size_t FSE_buildDTable_rle (FSE_DTable* dt, BYTE symbolValue) +{ + void* ptr = dt; + FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; + FSE_decode_t* const cell = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ + + DTableH->tableLog = 0; + DTableH->fastMode = 0; + + cell->newState = 0; + cell->symbol = symbolValue; + cell->nbBits = 0; + + return 0; +} + + +static size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits) +{ + void* ptr = dt; + FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; + FSE_decode_t* const dinfo = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ + const unsigned tableSize = 1 << nbBits; + const unsigned tableMask = tableSize - 1; + const unsigned maxSymbolValue = tableMask; + unsigned s; + + /* Sanity checks */ + if (nbBits < 1) return (size_t)-FSE_ERROR_GENERIC; /* min size */ + + /* Build Decoding Table */ + DTableH->tableLog = (U16)nbBits; + DTableH->fastMode = 1; + for (s=0; s<=maxSymbolValue; s++) + { + dinfo[s].newState = 0; + dinfo[s].symbol = (BYTE)s; + dinfo[s].nbBits = (BYTE)nbBits; + } + + return 0; +} + + +/* FSE_initDStream + * Initialize a FSE_DStream_t. + * srcBuffer must point at the beginning of an FSE block. + * The function result is the size of the FSE_block (== srcSize). + * If srcSize is too small, the function will return an errorCode; + */ +static size_t FSE_initDStream(FSE_DStream_t* bitD, const void* srcBuffer, size_t srcSize) +{ + if (srcSize < 1) return (size_t)-FSE_ERROR_srcSize_wrong; + + if (srcSize >= sizeof(size_t)) + { + U32 contain32; + bitD->start = (const char*)srcBuffer; + bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(size_t); + bitD->bitContainer = FSE_readLEST(bitD->ptr); + contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; + if (contain32 == 0) return (size_t)-FSE_ERROR_GENERIC; /* stop bit not present */ + bitD->bitsConsumed = 8 - FSE_highbit32(contain32); + } + else + { + U32 contain32; + bitD->start = (const char*)srcBuffer; + bitD->ptr = bitD->start; + bitD->bitContainer = *(const BYTE*)(bitD->start); + switch(srcSize) + { + case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16); + /* fallthrough */ + case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24); + /* fallthrough */ + case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32); + /* fallthrough */ + case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; + /* fallthrough */ + case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; + /* fallthrough */ + case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) << 8; + /* fallthrough */ + default:; + } + contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; + if (contain32 == 0) return (size_t)-FSE_ERROR_GENERIC; /* stop bit not present */ + bitD->bitsConsumed = 8 - FSE_highbit32(contain32); + bitD->bitsConsumed += (U32)(sizeof(size_t) - srcSize)*8; + } + + return srcSize; +} + + +/*!FSE_lookBits + * Provides next n bits from the bitContainer. + * bitContainer is not modified (bits are still present for next read/look) + * On 32-bits, maxNbBits==25 + * On 64-bits, maxNbBits==57 + * return : value extracted. + */ +static size_t FSE_lookBits(FSE_DStream_t* bitD, U32 nbBits) +{ + const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; + return ((bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> 1) >> ((bitMask-nbBits) & bitMask); +} + +static size_t FSE_lookBitsFast(FSE_DStream_t* bitD, U32 nbBits) /* only if nbBits >= 1 !! */ +{ + const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; + return (bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> (((bitMask+1)-nbBits) & bitMask); +} + +static void FSE_skipBits(FSE_DStream_t* bitD, U32 nbBits) +{ + bitD->bitsConsumed += nbBits; +} + + +/*!FSE_readBits + * Read next n bits from the bitContainer. + * On 32-bits, don't read more than maxNbBits==25 + * On 64-bits, don't read more than maxNbBits==57 + * Use the fast variant *only* if n >= 1. + * return : value extracted. + */ +static size_t FSE_readBits(FSE_DStream_t* bitD, U32 nbBits) +{ + size_t value = FSE_lookBits(bitD, nbBits); + FSE_skipBits(bitD, nbBits); + return value; +} + +static size_t FSE_readBitsFast(FSE_DStream_t* bitD, U32 nbBits) /* only if nbBits >= 1 !! */ +{ + size_t value = FSE_lookBitsFast(bitD, nbBits); + FSE_skipBits(bitD, nbBits); + return value; +} + +static unsigned FSE_reloadDStream(FSE_DStream_t* bitD) +{ + if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) /* should never happen */ + return FSE_DStream_tooFar; + + if (bitD->ptr >= bitD->start + sizeof(bitD->bitContainer)) + { + bitD->ptr -= bitD->bitsConsumed >> 3; + bitD->bitsConsumed &= 7; + bitD->bitContainer = FSE_readLEST(bitD->ptr); + return FSE_DStream_unfinished; + } + if (bitD->ptr == bitD->start) + { + if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return FSE_DStream_endOfBuffer; + return FSE_DStream_completed; + } + { + U32 nbBytes = bitD->bitsConsumed >> 3; + U32 result = FSE_DStream_unfinished; + if (bitD->ptr - nbBytes < bitD->start) + { + nbBytes = (U32)(bitD->ptr - bitD->start); /* ptr > start */ + result = FSE_DStream_endOfBuffer; + } + bitD->ptr -= nbBytes; + bitD->bitsConsumed -= nbBytes*8; + bitD->bitContainer = FSE_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD) */ + return result; + } +} + + +static void FSE_initDState(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD, const FSE_DTable* dt) +{ + const void* ptr = dt; + const FSE_DTableHeader* const DTableH = (const FSE_DTableHeader*)ptr; + DStatePtr->state = FSE_readBits(bitD, DTableH->tableLog); + FSE_reloadDStream(bitD); + DStatePtr->table = dt + 1; +} + +static BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD) +{ + const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + const U32 nbBits = DInfo.nbBits; + BYTE symbol = DInfo.symbol; + size_t lowBits = FSE_readBits(bitD, nbBits); + + DStatePtr->state = DInfo.newState + lowBits; + return symbol; +} + +static BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, FSE_DStream_t* bitD) +{ + const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + const U32 nbBits = DInfo.nbBits; + BYTE symbol = DInfo.symbol; + size_t lowBits = FSE_readBitsFast(bitD, nbBits); + + DStatePtr->state = DInfo.newState + lowBits; + return symbol; +} + +/* FSE_endOfDStream + Tells if bitD has reached end of bitStream or not */ + +static unsigned FSE_endOfDStream(const FSE_DStream_t* bitD) +{ + return ((bitD->ptr == bitD->start) && (bitD->bitsConsumed == sizeof(bitD->bitContainer)*8)); +} + +static unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr) +{ + return DStatePtr->state == 0; +} + + +FORCE_INLINE size_t FSE_decompress_usingDTable_generic( + void* dst, size_t maxDstSize, + const void* cSrc, size_t cSrcSize, + const FSE_DTable* dt, const unsigned fast) +{ + BYTE* const ostart = (BYTE*) dst; + BYTE* op = ostart; + BYTE* const omax = op + maxDstSize; + BYTE* const olimit = omax-3; + + FSE_DStream_t bitD; + FSE_DState_t state1; + FSE_DState_t state2; + size_t errorCode; + + /* Init */ + errorCode = FSE_initDStream(&bitD, cSrc, cSrcSize); /* replaced last arg by maxCompressed Size */ + if (FSE_isError(errorCode)) return errorCode; + + FSE_initDState(&state1, &bitD, dt); + FSE_initDState(&state2, &bitD, dt); + +#define FSE_GETSYMBOL(statePtr) fast ? FSE_decodeSymbolFast(statePtr, &bitD) : FSE_decodeSymbol(statePtr, &bitD) + + /* 4 symbols per loop */ + for ( ; (FSE_reloadDStream(&bitD)==FSE_DStream_unfinished) && (op sizeof(bitD.bitContainer)*8) /* This test must be static */ + FSE_reloadDStream(&bitD); + + op[1] = FSE_GETSYMBOL(&state2); + + if (FSE_MAX_TABLELOG*4+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ + { if (FSE_reloadDStream(&bitD) > FSE_DStream_unfinished) { op+=2; break; } } + + op[2] = FSE_GETSYMBOL(&state1); + + if (FSE_MAX_TABLELOG*2+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ + FSE_reloadDStream(&bitD); + + op[3] = FSE_GETSYMBOL(&state2); + } + + /* tail */ + /* note : FSE_reloadDStream(&bitD) >= FSE_DStream_partiallyFilled; Ends at exactly FSE_DStream_completed */ + while (1) + { + if ( (FSE_reloadDStream(&bitD)>FSE_DStream_completed) || (op==omax) || (FSE_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state1))) ) + break; + + *op++ = FSE_GETSYMBOL(&state1); + + if ( (FSE_reloadDStream(&bitD)>FSE_DStream_completed) || (op==omax) || (FSE_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state2))) ) + break; + + *op++ = FSE_GETSYMBOL(&state2); + } + + /* end ? */ + if (FSE_endOfDStream(&bitD) && FSE_endOfDState(&state1) && FSE_endOfDState(&state2)) + return op-ostart; + + if (op==omax) return (size_t)-FSE_ERROR_dstSize_tooSmall; /* dst buffer is full, but cSrc unfinished */ + + return (size_t)-FSE_ERROR_corruptionDetected; +} + + +static size_t FSE_decompress_usingDTable(void* dst, size_t originalSize, + const void* cSrc, size_t cSrcSize, + const FSE_DTable* dt) +{ + FSE_DTableHeader DTableH; + memcpy(&DTableH, dt, sizeof(DTableH)); /* memcpy() into local variable, to avoid strict aliasing warning */ + + /* select fast mode (static) */ + if (DTableH.fastMode) return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 1); + return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 0); +} + + +static size_t FSE_decompress(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize) +{ + const BYTE* const istart = (const BYTE*)cSrc; + const BYTE* ip = istart; + short counting[FSE_MAX_SYMBOL_VALUE+1]; + DTable_max_t dt; /* Static analyzer seems unable to understand this table will be properly initialized later */ + unsigned tableLog; + unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; + size_t errorCode; + + if (cSrcSize<2) return (size_t)-FSE_ERROR_srcSize_wrong; /* too small input size */ + + /* normal FSE decoding mode */ + errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); + if (FSE_isError(errorCode)) return errorCode; + if (errorCode >= cSrcSize) return (size_t)-FSE_ERROR_srcSize_wrong; /* too small input size */ + ip += errorCode; + cSrcSize -= errorCode; + + errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog); + if (FSE_isError(errorCode)) return errorCode; + + /* always return, even if it is an error code */ + return FSE_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, dt); +} + + + +/* ******************************************************* +* Huff0 : Huffman block compression +*********************************************************/ +#define HUF_MAX_SYMBOL_VALUE 255 +#define HUF_DEFAULT_TABLELOG 12 /* used by default, when not specified */ +#define HUF_MAX_TABLELOG 12 /* max possible tableLog; for allocation purpose; can be modified */ +#define HUF_ABSOLUTEMAX_TABLELOG 16 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ +#if (HUF_MAX_TABLELOG > HUF_ABSOLUTEMAX_TABLELOG) +# error "HUF_MAX_TABLELOG is too large !" +#endif + +typedef struct HUF_CElt_s { + U16 val; + BYTE nbBits; +} HUF_CElt ; + +typedef struct nodeElt_s { + U32 count; + U16 parent; + BYTE byte; + BYTE nbBits; +} nodeElt; + + +/* ******************************************************* +* Huff0 : Huffman block decompression +*********************************************************/ +typedef struct { + BYTE byte; + BYTE nbBits; +} HUF_DElt; + +static size_t HUF_readDTable (U16* DTable, const void* src, size_t srcSize) +{ + BYTE huffWeight[HUF_MAX_SYMBOL_VALUE + 1]; + U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; /* large enough for values from 0 to 16 */ + U32 weightTotal; + U32 maxBits; + const BYTE* ip = (const BYTE*) src; + size_t iSize; + size_t oSize; + U32 n; + U32 nextRankStart; + void* ptr = DTable+1; + HUF_DElt* const dt = (HUF_DElt*)ptr; + + if (!srcSize) return (size_t)-FSE_ERROR_srcSize_wrong; + iSize = ip[0]; + + FSE_STATIC_ASSERT(sizeof(HUF_DElt) == sizeof(U16)); /* if compilation fails here, assertion is false */ + //memset(huffWeight, 0, sizeof(huffWeight)); /* should not be necessary, but some analyzer complain ... */ + if (iSize >= 128) /* special header */ + { + if (iSize >= (242)) /* RLE */ + { + static int l[14] = { 1, 2, 3, 4, 7, 8, 15, 16, 31, 32, 63, 64, 127, 128 }; + oSize = l[iSize-242]; + memset(huffWeight, 1, sizeof(huffWeight)); + iSize = 0; + } + else /* Incompressible */ + { + oSize = iSize - 127; + iSize = ((oSize+1)/2); + if (iSize+1 > srcSize) return (size_t)-FSE_ERROR_srcSize_wrong; + ip += 1; + for (n=0; n> 4; + huffWeight[n+1] = ip[n/2] & 15; + } + } + } + else /* header compressed with FSE (normal case) */ + { + if (iSize+1 > srcSize) return (size_t)-FSE_ERROR_srcSize_wrong; + oSize = FSE_decompress(huffWeight, HUF_MAX_SYMBOL_VALUE, ip+1, iSize); /* max 255 values decoded, last one is implied */ + if (FSE_isError(oSize)) return oSize; + } + + /* collect weight stats */ + memset(rankVal, 0, sizeof(rankVal)); + weightTotal = 0; + for (n=0; n= HUF_ABSOLUTEMAX_TABLELOG) return (size_t)-FSE_ERROR_corruptionDetected; + rankVal[huffWeight[n]]++; + weightTotal += (1 << huffWeight[n]) >> 1; + } + if (weightTotal == 0) return (size_t)-FSE_ERROR_corruptionDetected; + + /* get last non-null symbol weight (implied, total must be 2^n) */ + maxBits = FSE_highbit32(weightTotal) + 1; + if (maxBits > DTable[0]) return (size_t)-FSE_ERROR_tableLog_tooLarge; /* DTable is too small */ + DTable[0] = (U16)maxBits; + { + U32 total = 1 << maxBits; + U32 rest = total - weightTotal; + U32 verif = 1 << FSE_highbit32(rest); + U32 lastWeight = FSE_highbit32(rest) + 1; + if (verif != rest) return (size_t)-FSE_ERROR_corruptionDetected; /* last value must be a clean power of 2 */ + huffWeight[oSize] = (BYTE)lastWeight; + rankVal[lastWeight]++; + } + + /* check tree construction validity */ + if ((rankVal[1] < 2) || (rankVal[1] & 1)) return (size_t)-FSE_ERROR_corruptionDetected; /* by construction : at least 2 elts of rank 1, must be even */ + + /* Prepare ranks */ + nextRankStart = 0; + for (n=1; n<=maxBits; n++) + { + U32 current = nextRankStart; + nextRankStart += (rankVal[n] << (n-1)); + rankVal[n] = current; + } + + /* fill DTable */ + for (n=0; n<=oSize; n++) + { + const U32 w = huffWeight[n]; + const U32 length = (1 << w) >> 1; + U32 i; + HUF_DElt D; + D.byte = (BYTE)n; D.nbBits = (BYTE)(maxBits + 1 - w); + for (i = rankVal[w]; i < rankVal[w] + length; i++) + dt[i] = D; + rankVal[w] += length; + } + + return iSize+1; +} + + +static BYTE HUF_decodeSymbol(FSE_DStream_t* Dstream, const HUF_DElt* dt, const U32 dtLog) +{ + const size_t val = FSE_lookBitsFast(Dstream, dtLog); /* note : dtLog >= 1 */ + const BYTE c = dt[val].byte; + FSE_skipBits(Dstream, dt[val].nbBits); + return c; +} + +static size_t HUF_decompress_usingDTable( /* -3% slower when non static */ + void* dst, size_t maxDstSize, + const void* cSrc, size_t cSrcSize, + const U16* DTable) +{ + if (cSrcSize < 6) return (size_t)-FSE_ERROR_srcSize_wrong; + { + BYTE* const ostart = (BYTE*) dst; + BYTE* op = ostart; + BYTE* const omax = op + maxDstSize; + BYTE* const olimit = maxDstSize < 15 ? op : omax-15; + + const void* ptr = DTable; + const HUF_DElt* const dt = (const HUF_DElt*)(ptr)+1; + const U32 dtLog = DTable[0]; + size_t errorCode; + U32 reloadStatus; + + /* Init */ + + const U16* jumpTable = (const U16*)cSrc; + const size_t length1 = FSE_readLE16(jumpTable); + const size_t length2 = FSE_readLE16(jumpTable+1); + const size_t length3 = FSE_readLE16(jumpTable+2); + const size_t length4 = cSrcSize - 6 - length1 - length2 - length3; /* check coherency !! */ + const char* const start1 = (const char*)(cSrc) + 6; + const char* const start2 = start1 + length1; + const char* const start3 = start2 + length2; + const char* const start4 = start3 + length3; + FSE_DStream_t bitD1, bitD2, bitD3, bitD4; + + if (length1+length2+length3+6 >= cSrcSize) return (size_t)-FSE_ERROR_srcSize_wrong; + + errorCode = FSE_initDStream(&bitD1, start1, length1); + if (FSE_isError(errorCode)) return errorCode; + errorCode = FSE_initDStream(&bitD2, start2, length2); + if (FSE_isError(errorCode)) return errorCode; + errorCode = FSE_initDStream(&bitD3, start3, length3); + if (FSE_isError(errorCode)) return errorCode; + errorCode = FSE_initDStream(&bitD4, start4, length4); + if (FSE_isError(errorCode)) return errorCode; + + reloadStatus=FSE_reloadDStream(&bitD2); + + /* 16 symbols per loop */ + for ( ; (reloadStatus12)) FSE_reloadDStream(&Dstream) + + #define HUF_DECODE_SYMBOL_2(n, Dstream) \ + op[n] = HUF_decodeSymbol(&Dstream, dt, dtLog); \ + if (FSE_32bits()) FSE_reloadDStream(&Dstream) + + HUF_DECODE_SYMBOL_1( 0, bitD1); + HUF_DECODE_SYMBOL_1( 1, bitD2); + HUF_DECODE_SYMBOL_1( 2, bitD3); + HUF_DECODE_SYMBOL_1( 3, bitD4); + HUF_DECODE_SYMBOL_2( 4, bitD1); + HUF_DECODE_SYMBOL_2( 5, bitD2); + HUF_DECODE_SYMBOL_2( 6, bitD3); + HUF_DECODE_SYMBOL_2( 7, bitD4); + HUF_DECODE_SYMBOL_1( 8, bitD1); + HUF_DECODE_SYMBOL_1( 9, bitD2); + HUF_DECODE_SYMBOL_1(10, bitD3); + HUF_DECODE_SYMBOL_1(11, bitD4); + HUF_DECODE_SYMBOL_0(12, bitD1); + HUF_DECODE_SYMBOL_0(13, bitD2); + HUF_DECODE_SYMBOL_0(14, bitD3); + HUF_DECODE_SYMBOL_0(15, bitD4); + } + + if (reloadStatus!=FSE_DStream_completed) /* not complete : some bitStream might be FSE_DStream_unfinished */ + return (size_t)-FSE_ERROR_corruptionDetected; + + /* tail */ + { + /* bitTail = bitD1; */ /* *much* slower : -20% !??! */ + FSE_DStream_t bitTail; + bitTail.ptr = bitD1.ptr; + bitTail.bitsConsumed = bitD1.bitsConsumed; + bitTail.bitContainer = bitD1.bitContainer; /* required in case of FSE_DStream_endOfBuffer */ + bitTail.start = start1; + for ( ; (FSE_reloadDStream(&bitTail) < FSE_DStream_completed) && (op= cSrcSize) return (size_t)-FSE_ERROR_srcSize_wrong; + ip += errorCode; + cSrcSize -= errorCode; + + return HUF_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, DTable); +} + + +#endif /* FSE_COMMONDEFS_ONLY */ + +/* + zstd - standard compression library + Copyright (C) 2014-2015, Yann Collet. + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - zstd source repository : https://github.com/Cyan4973/zstd + - ztsd public forum : https://groups.google.com/forum/#!forum/lz4c +*/ + +/**************************************************************** +* Tuning parameters +*****************************************************************/ +/* MEMORY_USAGE : +* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) +* Increasing memory usage improves compression ratio +* Reduced memory usage can improve speed, due to cache effect */ +#define ZSTD_MEMORY_USAGE 17 + + +/************************************** + CPU Feature Detection +**************************************/ +/* + * Automated efficient unaligned memory access detection + * Based on known hardware architectures + * This list will be updated thanks to feedbacks + */ +#if defined(CPU_HAS_EFFICIENT_UNALIGNED_MEMORY_ACCESS) \ + || defined(__ARM_FEATURE_UNALIGNED) \ + || defined(__i386__) || defined(__x86_64__) \ + || defined(_M_IX86) || defined(_M_X64) \ + || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_8__) \ + || (defined(_M_ARM) && (_M_ARM >= 7)) +# define ZSTD_UNALIGNED_ACCESS 1 +#else +# define ZSTD_UNALIGNED_ACCESS 0 +#endif + + +/******************************************************** +* Includes +*********************************************************/ +#include /* calloc */ +#include /* memcpy, memmove */ +#include /* debug : printf */ + + +/******************************************************** +* Compiler specifics +*********************************************************/ +#ifdef __AVX2__ +# include /* AVX2 intrinsics */ +#endif + +#ifdef _MSC_VER /* Visual Studio */ +# include /* For Visual 2005 */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +# pragma warning(disable : 4324) /* disable: C4324: padded structure */ +#endif + + +#ifndef MEM_ACCESS_MODULE +#define MEM_ACCESS_MODULE +/******************************************************** +* Basic Types +*********************************************************/ +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif +typedef uint8_t BYTE; +typedef uint16_t U16; +typedef int16_t S16; +typedef uint32_t U32; +typedef int32_t S32; +typedef uint64_t U64; +#else +typedef unsigned char BYTE; +typedef unsigned short U16; +typedef signed short S16; +typedef unsigned int U32; +typedef signed int S32; +typedef unsigned long long U64; +#endif + +#endif /* MEM_ACCESS_MODULE */ + + +/******************************************************** +* Constants +*********************************************************/ +static const U32 ZSTD_magicNumber = 0xFD2FB51E; /* 3rd version : seqNb header */ + +#define HASH_LOG (ZSTD_MEMORY_USAGE - 2) +#define HASH_TABLESIZE (1 << HASH_LOG) +#define HASH_MASK (HASH_TABLESIZE - 1) + +#define KNUTH 2654435761 + +#define BIT7 128 +#define BIT6 64 +#define BIT5 32 +#define BIT4 16 + +#define KB *(1 <<10) +#define MB *(1 <<20) +#define GB *(1U<<30) + +#define BLOCKSIZE (128 KB) /* define, for static allocation */ + +#define WORKPLACESIZE (BLOCKSIZE*3) +#define MINMATCH 4 +#define MLbits 7 +#define LLbits 6 +#define Offbits 5 +#define MaxML ((1<>3]; +#else + U32 hashTable[HASH_TABLESIZE]; +#endif + BYTE buffer[WORKPLACESIZE]; +} cctxi_t; + + + + +/************************************** +* Error Management +**************************************/ +/* published entry point */ +unsigned ZSTDv01_isError(size_t code) { return ERR_isError(code); } + + +/************************************** +* Tool functions +**************************************/ +#define ZSTD_VERSION_MAJOR 0 /* for breaking interface changes */ +#define ZSTD_VERSION_MINOR 1 /* for new (non-breaking) interface capabilities */ +#define ZSTD_VERSION_RELEASE 3 /* for tweaks, bug-fixes, or development */ +#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) + +/************************************************************** +* Decompression code +**************************************************************/ + +static size_t ZSTDv01_getcBlockSize(const void* src, size_t srcSize, blockProperties_t* bpPtr) +{ + const BYTE* const in = (const BYTE* const)src; + BYTE headerFlags; + U32 cSize; + + if (srcSize < 3) return ERROR(srcSize_wrong); + + headerFlags = *in; + cSize = in[2] + (in[1]<<8) + ((in[0] & 7)<<16); + + bpPtr->blockType = (blockType_t)(headerFlags >> 6); + bpPtr->origSize = (bpPtr->blockType == bt_rle) ? cSize : 0; + + if (bpPtr->blockType == bt_end) return 0; + if (bpPtr->blockType == bt_rle) return 1; + return cSize; +} + + +static size_t ZSTD_copyUncompressedBlock(void* dst, size_t maxDstSize, const void* src, size_t srcSize) +{ + if (srcSize > maxDstSize) return ERROR(dstSize_tooSmall); + if (srcSize > 0) { + memcpy(dst, src, srcSize); + } + return srcSize; +} + + +static size_t ZSTD_decompressLiterals(void* ctx, + void* dst, size_t maxDstSize, + const void* src, size_t srcSize) +{ + BYTE* op = (BYTE*)dst; + BYTE* const oend = op + maxDstSize; + const BYTE* ip = (const BYTE*)src; + size_t errorCode; + size_t litSize; + + /* check : minimum 2, for litSize, +1, for content */ + if (srcSize <= 3) return ERROR(corruption_detected); + + litSize = ip[1] + (ip[0]<<8); + litSize += ((ip[-3] >> 3) & 7) << 16; /* mmmmh.... */ + op = oend - litSize; + + (void)ctx; + if (litSize > maxDstSize) return ERROR(dstSize_tooSmall); + errorCode = HUF_decompress(op, litSize, ip+2, srcSize-2); + if (FSE_isError(errorCode)) return ERROR(GENERIC); + return litSize; +} + + +static size_t ZSTDv01_decodeLiteralsBlock(void* ctx, + void* dst, size_t maxDstSize, + const BYTE** litStart, size_t* litSize, + const void* src, size_t srcSize) +{ + const BYTE* const istart = (const BYTE* const)src; + const BYTE* ip = istart; + BYTE* const ostart = (BYTE* const)dst; + BYTE* const oend = ostart + maxDstSize; + blockProperties_t litbp; + + size_t litcSize = ZSTDv01_getcBlockSize(src, srcSize, &litbp); + if (ZSTDv01_isError(litcSize)) return litcSize; + if (litcSize > srcSize - ZSTD_blockHeaderSize) return ERROR(srcSize_wrong); + ip += ZSTD_blockHeaderSize; + + switch(litbp.blockType) + { + case bt_raw: + *litStart = ip; + ip += litcSize; + *litSize = litcSize; + break; + case bt_rle: + { + size_t rleSize = litbp.origSize; + if (rleSize>maxDstSize) return ERROR(dstSize_tooSmall); + if (!srcSize) return ERROR(srcSize_wrong); + if (rleSize > 0) { + memset(oend - rleSize, *ip, rleSize); + } + *litStart = oend - rleSize; + *litSize = rleSize; + ip++; + break; + } + case bt_compressed: + { + size_t decodedLitSize = ZSTD_decompressLiterals(ctx, dst, maxDstSize, ip, litcSize); + if (ZSTDv01_isError(decodedLitSize)) return decodedLitSize; + *litStart = oend - decodedLitSize; + *litSize = decodedLitSize; + ip += litcSize; + break; + } + case bt_end: + default: + return ERROR(GENERIC); + } + + return ip-istart; +} + + +static size_t ZSTDv01_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, + FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb, + const void* src, size_t srcSize) +{ + const BYTE* const istart = (const BYTE* const)src; + const BYTE* ip = istart; + const BYTE* const iend = istart + srcSize; + U32 LLtype, Offtype, MLtype; + U32 LLlog, Offlog, MLlog; + size_t dumpsLength; + + /* check */ + if (srcSize < 5) return ERROR(srcSize_wrong); + + /* SeqHead */ + *nbSeq = ZSTD_readLE16(ip); ip+=2; + LLtype = *ip >> 6; + Offtype = (*ip >> 4) & 3; + MLtype = (*ip >> 2) & 3; + if (*ip & 2) + { + dumpsLength = ip[2]; + dumpsLength += ip[1] << 8; + ip += 3; + } + else + { + dumpsLength = ip[1]; + dumpsLength += (ip[0] & 1) << 8; + ip += 2; + } + *dumpsPtr = ip; + ip += dumpsLength; + *dumpsLengthPtr = dumpsLength; + + /* check */ + if (ip > iend-3) return ERROR(srcSize_wrong); /* min : all 3 are "raw", hence no header, but at least xxLog bits per type */ + + /* sequences */ + { + S16 norm[MaxML+1]; /* assumption : MaxML >= MaxLL and MaxOff */ + size_t headerSize; + + /* Build DTables */ + switch(LLtype) + { + case bt_rle : + LLlog = 0; + FSE_buildDTable_rle(DTableLL, *ip++); break; + case bt_raw : + LLlog = LLbits; + FSE_buildDTable_raw(DTableLL, LLbits); break; + default : + { U32 max = MaxLL; + headerSize = FSE_readNCount(norm, &max, &LLlog, ip, iend-ip); + if (FSE_isError(headerSize)) return ERROR(GENERIC); + if (LLlog > LLFSELog) return ERROR(corruption_detected); + ip += headerSize; + FSE_buildDTable(DTableLL, norm, max, LLlog); + } } + + switch(Offtype) + { + case bt_rle : + Offlog = 0; + if (ip > iend-2) return ERROR(srcSize_wrong); /* min : "raw", hence no header, but at least xxLog bits */ + FSE_buildDTable_rle(DTableOffb, *ip++); break; + case bt_raw : + Offlog = Offbits; + FSE_buildDTable_raw(DTableOffb, Offbits); break; + default : + { U32 max = MaxOff; + headerSize = FSE_readNCount(norm, &max, &Offlog, ip, iend-ip); + if (FSE_isError(headerSize)) return ERROR(GENERIC); + if (Offlog > OffFSELog) return ERROR(corruption_detected); + ip += headerSize; + FSE_buildDTable(DTableOffb, norm, max, Offlog); + } } + + switch(MLtype) + { + case bt_rle : + MLlog = 0; + if (ip > iend-2) return ERROR(srcSize_wrong); /* min : "raw", hence no header, but at least xxLog bits */ + FSE_buildDTable_rle(DTableML, *ip++); break; + case bt_raw : + MLlog = MLbits; + FSE_buildDTable_raw(DTableML, MLbits); break; + default : + { U32 max = MaxML; + headerSize = FSE_readNCount(norm, &max, &MLlog, ip, iend-ip); + if (FSE_isError(headerSize)) return ERROR(GENERIC); + if (MLlog > MLFSELog) return ERROR(corruption_detected); + ip += headerSize; + FSE_buildDTable(DTableML, norm, max, MLlog); + } } } + + return ip-istart; +} + + +typedef struct { + size_t litLength; + size_t offset; + size_t matchLength; +} seq_t; + +typedef struct { + FSE_DStream_t DStream; + FSE_DState_t stateLL; + FSE_DState_t stateOffb; + FSE_DState_t stateML; + size_t prevOffset; + const BYTE* dumps; + const BYTE* dumpsEnd; +} seqState_t; + + +static void ZSTD_decodeSequence(seq_t* seq, seqState_t* seqState) +{ + size_t litLength; + size_t prevOffset; + size_t offset; + size_t matchLength; + const BYTE* dumps = seqState->dumps; + const BYTE* const de = seqState->dumpsEnd; + + /* Literal length */ + litLength = FSE_decodeSymbol(&(seqState->stateLL), &(seqState->DStream)); + prevOffset = litLength ? seq->offset : seqState->prevOffset; + seqState->prevOffset = seq->offset; + if (litLength == MaxLL) + { + const U32 add = dumpsstateOffb), &(seqState->DStream)); + if (ZSTD_32bits()) FSE_reloadDStream(&(seqState->DStream)); + nbBits = offsetCode - 1; + if (offsetCode==0) nbBits = 0; /* cmove */ + offset = ((size_t)1 << (nbBits & ((sizeof(offset)*8)-1))) + FSE_readBits(&(seqState->DStream), nbBits); + if (ZSTD_32bits()) FSE_reloadDStream(&(seqState->DStream)); + if (offsetCode==0) offset = prevOffset; + } + + /* MatchLength */ + matchLength = FSE_decodeSymbol(&(seqState->stateML), &(seqState->DStream)); + if (matchLength == MaxML) + { + const U32 add = dumpslitLength = litLength; + seq->offset = offset; + seq->matchLength = matchLength; + seqState->dumps = dumps; +} + + +static size_t ZSTD_execSequence(BYTE* op, + seq_t sequence, + const BYTE** litPtr, const BYTE* const litLimit, + BYTE* const base, BYTE* const oend) +{ + static const int dec32table[] = {0, 1, 2, 1, 4, 4, 4, 4}; /* added */ + static const int dec64table[] = {8, 8, 8, 7, 8, 9,10,11}; /* subtracted */ + const BYTE* const ostart = op; + BYTE* const oLitEnd = op + sequence.litLength; + const size_t litLength = sequence.litLength; + BYTE* const endMatch = op + litLength + sequence.matchLength; /* risk : address space overflow (32-bits) */ + const BYTE* const litEnd = *litPtr + litLength; + + /* checks */ + size_t const seqLength = sequence.litLength + sequence.matchLength; + + if (seqLength > (size_t)(oend - op)) return ERROR(dstSize_tooSmall); + if (sequence.litLength > (size_t)(litLimit - *litPtr)) return ERROR(corruption_detected); + /* Now we know there are no overflow in literal nor match lengths, can use pointer checks */ + if (sequence.offset > (U32)(oLitEnd - base)) return ERROR(corruption_detected); + + if (endMatch > oend) return ERROR(dstSize_tooSmall); /* overwrite beyond dst buffer */ + if (litEnd > litLimit) return ERROR(corruption_detected); /* overRead beyond lit buffer */ + if (sequence.matchLength > (size_t)(*litPtr-op)) return ERROR(dstSize_tooSmall); /* overwrite literal segment */ + + /* copy Literals */ + ZSTD_memmove(op, *litPtr, sequence.litLength); /* note : v0.1 seems to allow scenarios where output or input are close to end of buffer */ + + op += litLength; + *litPtr = litEnd; /* update for next sequence */ + + /* check : last match must be at a minimum distance of 8 from end of dest buffer */ + if (oend-op < 8) return ERROR(dstSize_tooSmall); + + /* copy Match */ + { + const U32 overlapRisk = (((size_t)(litEnd - endMatch)) < 12); + const BYTE* match = op - sequence.offset; /* possible underflow at op - offset ? */ + size_t qutt = 12; + U64 saved[2]; + + /* check */ + if (match < base) return ERROR(corruption_detected); + if (sequence.offset > (size_t)base) return ERROR(corruption_detected); + + /* save beginning of literal sequence, in case of write overlap */ + if (overlapRisk) + { + if ((endMatch + qutt) > oend) qutt = oend-endMatch; + memcpy(saved, endMatch, qutt); + } + + if (sequence.offset < 8) + { + const int dec64 = dec64table[sequence.offset]; + op[0] = match[0]; + op[1] = match[1]; + op[2] = match[2]; + op[3] = match[3]; + match += dec32table[sequence.offset]; + ZSTD_copy4(op+4, match); + match -= dec64; + } else { ZSTD_copy8(op, match); } + op += 8; match += 8; + + if (endMatch > oend-(16-MINMATCH)) + { + if (op < oend-8) + { + ZSTD_wildcopy(op, match, (oend-8) - op); + match += (oend-8) - op; + op = oend-8; + } + while (opLLTable; + U32* DTableML = dctx->MLTable; + U32* DTableOffb = dctx->OffTable; + BYTE* const base = (BYTE*) (dctx->base); + + /* Build Decoding Tables */ + errorCode = ZSTDv01_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, + DTableLL, DTableML, DTableOffb, + ip, iend-ip); + if (ZSTDv01_isError(errorCode)) return errorCode; + ip += errorCode; + + /* Regen sequences */ + { + seq_t sequence; + seqState_t seqState; + + memset(&sequence, 0, sizeof(sequence)); + seqState.dumps = dumps; + seqState.dumpsEnd = dumps + dumpsLength; + seqState.prevOffset = 1; + errorCode = FSE_initDStream(&(seqState.DStream), ip, iend-ip); + if (FSE_isError(errorCode)) return ERROR(corruption_detected); + FSE_initDState(&(seqState.stateLL), &(seqState.DStream), DTableLL); + FSE_initDState(&(seqState.stateOffb), &(seqState.DStream), DTableOffb); + FSE_initDState(&(seqState.stateML), &(seqState.DStream), DTableML); + + for ( ; (FSE_reloadDStream(&(seqState.DStream)) <= FSE_DStream_completed) && (nbSeq>0) ; ) + { + size_t oneSeqSize; + nbSeq--; + ZSTD_decodeSequence(&sequence, &seqState); + oneSeqSize = ZSTD_execSequence(op, sequence, &litPtr, litEnd, base, oend); + if (ZSTDv01_isError(oneSeqSize)) return oneSeqSize; + op += oneSeqSize; + } + + /* check if reached exact end */ + if ( !FSE_endOfDStream(&(seqState.DStream)) ) return ERROR(corruption_detected); /* requested too much : data is corrupted */ + if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrupted */ + + /* last literal segment */ + { + size_t lastLLSize = litEnd - litPtr; + if (op+lastLLSize > oend) return ERROR(dstSize_tooSmall); + if (lastLLSize > 0) { + if (op != litPtr) memmove(op, litPtr, lastLLSize); + op += lastLLSize; + } + } + } + + return op-ostart; +} + + +static size_t ZSTD_decompressBlock( + void* ctx, + void* dst, size_t maxDstSize, + const void* src, size_t srcSize) +{ + /* blockType == blockCompressed, srcSize is trusted */ + const BYTE* ip = (const BYTE*)src; + const BYTE* litPtr = NULL; + size_t litSize = 0; + size_t errorCode; + + /* Decode literals sub-block */ + errorCode = ZSTDv01_decodeLiteralsBlock(ctx, dst, maxDstSize, &litPtr, &litSize, src, srcSize); + if (ZSTDv01_isError(errorCode)) return errorCode; + ip += errorCode; + srcSize -= errorCode; + + return ZSTD_decompressSequences(ctx, dst, maxDstSize, ip, srcSize, litPtr, litSize); +} + + +size_t ZSTDv01_decompressDCtx(void* ctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize) +{ + const BYTE* ip = (const BYTE*)src; + const BYTE* iend = ip + srcSize; + BYTE* const ostart = (BYTE* const)dst; + BYTE* op = ostart; + BYTE* const oend = ostart + maxDstSize; + size_t remainingSize = srcSize; + U32 magicNumber; + size_t errorCode=0; + blockProperties_t blockProperties; + + /* Frame Header */ + if (srcSize < ZSTD_frameHeaderSize+ZSTD_blockHeaderSize) return ERROR(srcSize_wrong); + magicNumber = ZSTD_readBE32(src); + if (magicNumber != ZSTD_magicNumber) return ERROR(prefix_unknown); + ip += ZSTD_frameHeaderSize; remainingSize -= ZSTD_frameHeaderSize; + + /* Loop on each block */ + while (1) + { + size_t blockSize = ZSTDv01_getcBlockSize(ip, iend-ip, &blockProperties); + if (ZSTDv01_isError(blockSize)) return blockSize; + + ip += ZSTD_blockHeaderSize; + remainingSize -= ZSTD_blockHeaderSize; + if (blockSize > remainingSize) return ERROR(srcSize_wrong); + + switch(blockProperties.blockType) + { + case bt_compressed: + errorCode = ZSTD_decompressBlock(ctx, op, oend-op, ip, blockSize); + break; + case bt_raw : + errorCode = ZSTD_copyUncompressedBlock(op, oend-op, ip, blockSize); + break; + case bt_rle : + return ERROR(GENERIC); /* not yet supported */ + break; + case bt_end : + /* end of frame */ + if (remainingSize) return ERROR(srcSize_wrong); + break; + default: + return ERROR(GENERIC); + } + if (blockSize == 0) break; /* bt_end */ + + if (ZSTDv01_isError(errorCode)) return errorCode; + op += errorCode; + ip += blockSize; + remainingSize -= blockSize; + } + + return op-ostart; +} + +size_t ZSTDv01_decompress(void* dst, size_t maxDstSize, const void* src, size_t srcSize) +{ + dctx_t ctx; + ctx.base = dst; + return ZSTDv01_decompressDCtx(&ctx, dst, maxDstSize, src, srcSize); +} + +/* ZSTD_errorFrameSizeInfoLegacy() : + assumes `cSize` and `dBound` are _not_ NULL */ +static void ZSTD_errorFrameSizeInfoLegacy(size_t* cSize, unsigned long long* dBound, size_t ret) +{ + *cSize = ret; + *dBound = ZSTD_CONTENTSIZE_ERROR; +} + +void ZSTDv01_findFrameSizeInfoLegacy(const void *src, size_t srcSize, size_t* cSize, unsigned long long* dBound) +{ + const BYTE* ip = (const BYTE*)src; + size_t remainingSize = srcSize; + size_t nbBlocks = 0; + U32 magicNumber; + blockProperties_t blockProperties; + + /* Frame Header */ + if (srcSize < ZSTD_frameHeaderSize+ZSTD_blockHeaderSize) { + ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(srcSize_wrong)); + return; + } + magicNumber = ZSTD_readBE32(src); + if (magicNumber != ZSTD_magicNumber) { + ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(prefix_unknown)); + return; + } + ip += ZSTD_frameHeaderSize; remainingSize -= ZSTD_frameHeaderSize; + + /* Loop on each block */ + while (1) + { + size_t blockSize = ZSTDv01_getcBlockSize(ip, remainingSize, &blockProperties); + if (ZSTDv01_isError(blockSize)) { + ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, blockSize); + return; + } + + ip += ZSTD_blockHeaderSize; + remainingSize -= ZSTD_blockHeaderSize; + if (blockSize > remainingSize) { + ZSTD_errorFrameSizeInfoLegacy(cSize, dBound, ERROR(srcSize_wrong)); + return; + } + + if (blockSize == 0) break; /* bt_end */ + + ip += blockSize; + remainingSize -= blockSize; + nbBlocks++; + } + + *cSize = ip - (const BYTE*)src; + *dBound = nbBlocks * BLOCKSIZE; +} + +/******************************* +* Streaming Decompression API +*******************************/ + +size_t ZSTDv01_resetDCtx(ZSTDv01_Dctx* dctx) +{ + dctx->expected = ZSTD_frameHeaderSize; + dctx->phase = 0; + dctx->previousDstEnd = NULL; + dctx->base = NULL; + return 0; +} + +ZSTDv01_Dctx* ZSTDv01_createDCtx(void) +{ + ZSTDv01_Dctx* dctx = (ZSTDv01_Dctx*)malloc(sizeof(ZSTDv01_Dctx)); + if (dctx==NULL) return NULL; + ZSTDv01_resetDCtx(dctx); + return dctx; +} + +size_t ZSTDv01_freeDCtx(ZSTDv01_Dctx* dctx) +{ + free(dctx); + return 0; +} + +size_t ZSTDv01_nextSrcSizeToDecompress(ZSTDv01_Dctx* dctx) +{ + return ((dctx_t*)dctx)->expected; +} + +size_t ZSTDv01_decompressContinue(ZSTDv01_Dctx* dctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize) +{ + dctx_t* ctx = (dctx_t*)dctx; + + /* Sanity check */ + if (srcSize != ctx->expected) return ERROR(srcSize_wrong); + if (dst != ctx->previousDstEnd) /* not contiguous */ + ctx->base = dst; + + /* Decompress : frame header */ + if (ctx->phase == 0) + { + /* Check frame magic header */ + U32 magicNumber = ZSTD_readBE32(src); + if (magicNumber != ZSTD_magicNumber) return ERROR(prefix_unknown); + ctx->phase = 1; + ctx->expected = ZSTD_blockHeaderSize; + return 0; + } + + /* Decompress : block header */ + if (ctx->phase == 1) + { + blockProperties_t bp; + size_t blockSize = ZSTDv01_getcBlockSize(src, ZSTD_blockHeaderSize, &bp); + if (ZSTDv01_isError(blockSize)) return blockSize; + if (bp.blockType == bt_end) + { + ctx->expected = 0; + ctx->phase = 0; + } + else + { + ctx->expected = blockSize; + ctx->bType = bp.blockType; + ctx->phase = 2; + } + + return 0; + } + + /* Decompress : block content */ + { + size_t rSize; + switch(ctx->bType) + { + case bt_compressed: + rSize = ZSTD_decompressBlock(ctx, dst, maxDstSize, src, srcSize); + break; + case bt_raw : + rSize = ZSTD_copyUncompressedBlock(dst, maxDstSize, src, srcSize); + break; + case bt_rle : + return ERROR(GENERIC); /* not yet handled */ + break; + case bt_end : /* should never happen (filtered at phase 1) */ + rSize = 0; + break; + default: + return ERROR(GENERIC); + } + ctx->phase = 1; + ctx->expected = ZSTD_blockHeaderSize; + if (ZSTDv01_isError(rSize)) return rSize; + ctx->previousDstEnd = (void*)( ((char*)dst) + rSize); + return rSize; + } + +} diff --git a/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.h b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.h new file mode 100644 index 0000000000..6ac876954d --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v01.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) Yann Collet, Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + +#ifndef ZSTD_V01_H_28739879432 +#define ZSTD_V01_H_28739879432 + +#if defined (__cplusplus) +extern "C" { +#endif + +/* ************************************* +* Includes +***************************************/ +#include /* size_t */ + + +/* ************************************* +* Simple one-step function +***************************************/ +/** +ZSTDv01_decompress() : decompress ZSTD frames compliant with v0.1.x format + compressedSize : is the exact source size + maxOriginalSize : is the size of the 'dst' buffer, which must be already allocated. + It must be equal or larger than originalSize, otherwise decompression will fail. + return : the number of bytes decompressed into destination buffer (originalSize) + or an errorCode if it fails (which can be tested using ZSTDv01_isError()) +*/ +size_t ZSTDv01_decompress( void* dst, size_t maxOriginalSize, + const void* src, size_t compressedSize); + + /** + ZSTDv01_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.1.x format + srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src' + cSize (output parameter) : the number of bytes that would be read to decompress this frame + or an error code if it fails (which can be tested using ZSTDv01_isError()) + dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame + or ZSTD_CONTENTSIZE_ERROR if an error occurs + + note : assumes `cSize` and `dBound` are _not_ NULL. + */ +void ZSTDv01_findFrameSizeInfoLegacy(const void *src, size_t srcSize, + size_t* cSize, unsigned long long* dBound); + +/** +ZSTDv01_isError() : tells if the result of ZSTDv01_decompress() is an error +*/ +unsigned ZSTDv01_isError(size_t code); + + +/* ************************************* +* Advanced functions +***************************************/ +typedef struct ZSTDv01_Dctx_s ZSTDv01_Dctx; +ZSTDv01_Dctx* ZSTDv01_createDCtx(void); +size_t ZSTDv01_freeDCtx(ZSTDv01_Dctx* dctx); + +size_t ZSTDv01_decompressDCtx(void* ctx, + void* dst, size_t maxOriginalSize, + const void* src, size_t compressedSize); + +/* ************************************* +* Streaming functions +***************************************/ +size_t ZSTDv01_resetDCtx(ZSTDv01_Dctx* dctx); + +size_t ZSTDv01_nextSrcSizeToDecompress(ZSTDv01_Dctx* dctx); +size_t ZSTDv01_decompressContinue(ZSTDv01_Dctx* dctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize); +/** + Use above functions alternatively. + ZSTD_nextSrcSizeToDecompress() tells how much bytes to provide as 'srcSize' to ZSTD_decompressContinue(). + ZSTD_decompressContinue() will use previous data blocks to improve compression if they are located prior to current block. + Result is the number of bytes regenerated within 'dst'. + It can be zero, which is not an error; it just means ZSTD_decompressContinue() has decoded some header. +*/ + +/* ************************************* +* Prefix - version detection +***************************************/ +#define ZSTDv01_magicNumber 0xFD2FB51E /* Big Endian version */ +#define ZSTDv01_magicNumberLE 0x1EB52FFD /* Little Endian version */ + + +#if defined (__cplusplus) +} +#endif + +#endif /* ZSTD_V01_H_28739879432 */ diff --git a/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v02.c b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v02.c new file mode 100644 index 0000000000..d1e00385a2 --- /dev/null +++ b/cpp/third_party/zstd-1.5.7/lib/legacy/zstd_v02.c @@ -0,0 +1,3465 @@ +/* + * Copyright (c) Yann Collet, Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). + * You may select, at your option, one of the above-listed licenses. + */ + + +#include /* size_t, ptrdiff_t */ +#include "zstd_v02.h" +#include "../common/compiler.h" +#include "../common/error_private.h" + + +/****************************************** +* Compiler-specific +******************************************/ +#if defined(_MSC_VER) /* Visual Studio */ +# include /* _byteswap_ulong */ +# include /* _byteswap_* */ +#endif + + +/* ****************************************************************** + mem.h + low-level memory access routines + Copyright (C) 2013-2015, Yann Collet. + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + - Public forum : https://groups.google.com/forum/#!forum/lz4c +****************************************************************** */ +#ifndef MEM_H_MODULE +#define MEM_H_MODULE + +#if defined (__cplusplus) +extern "C" { +#endif + +/****************************************** +* Includes +******************************************/ +#include /* size_t, ptrdiff_t */ +#include /* memcpy */ + + +/**************************************************************** +* Basic Types +*****************************************************************/ +#if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# if defined(_AIX) +# include +# else +# include /* intptr_t */ +# endif + typedef uint8_t BYTE; + typedef uint16_t U16; + typedef int16_t S16; + typedef uint32_t U32; + typedef int32_t S32; + typedef uint64_t U64; + typedef int64_t S64; +#else + typedef unsigned char BYTE; + typedef unsigned short U16; + typedef signed short S16; + typedef unsigned int U32; + typedef signed int S32; + typedef unsigned long long U64; + typedef signed long long S64; +#endif + + +/**************************************************************** +* Memory I/O +*****************************************************************/ + +MEM_STATIC unsigned MEM_32bits(void) { return sizeof(void*)==4; } +MEM_STATIC unsigned MEM_64bits(void) { return sizeof(void*)==8; } + +MEM_STATIC unsigned MEM_isLittleEndian(void) +{ + const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ + return one.c[0]; +} + +MEM_STATIC U16 MEM_read16(const void* memPtr) +{ + U16 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +MEM_STATIC U32 MEM_read32(const void* memPtr) +{ + U32 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +MEM_STATIC U64 MEM_read64(const void* memPtr) +{ + U64 val; memcpy(&val, memPtr, sizeof(val)); return val; +} + +MEM_STATIC void MEM_write16(void* memPtr, U16 value) +{ + memcpy(memPtr, &value, sizeof(value)); +} + +MEM_STATIC U16 MEM_readLE16(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_read16(memPtr); + else + { + const BYTE* p = (const BYTE*)memPtr; + return (U16)(p[0] + (p[1]<<8)); + } +} + +MEM_STATIC void MEM_writeLE16(void* memPtr, U16 val) +{ + if (MEM_isLittleEndian()) + { + MEM_write16(memPtr, val); + } + else + { + BYTE* p = (BYTE*)memPtr; + p[0] = (BYTE)val; + p[1] = (BYTE)(val>>8); + } +} + +MEM_STATIC U32 MEM_readLE24(const void* memPtr) +{ + return MEM_readLE16(memPtr) + (((const BYTE*)memPtr)[2] << 16); +} + +MEM_STATIC U32 MEM_readLE32(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_read32(memPtr); + else + { + const BYTE* p = (const BYTE*)memPtr; + return (U32)((U32)p[0] + ((U32)p[1]<<8) + ((U32)p[2]<<16) + ((U32)p[3]<<24)); + } +} + + +MEM_STATIC U64 MEM_readLE64(const void* memPtr) +{ + if (MEM_isLittleEndian()) + return MEM_read64(memPtr); + else + { + const BYTE* p = (const BYTE*)memPtr; + return (U64)((U64)p[0] + ((U64)p[1]<<8) + ((U64)p[2]<<16) + ((U64)p[3]<<24) + + ((U64)p[4]<<32) + ((U64)p[5]<<40) + ((U64)p[6]<<48) + ((U64)p[7]<<56)); + } +} + + +MEM_STATIC size_t MEM_readLEST(const void* memPtr) +{ + if (MEM_32bits()) + return (size_t)MEM_readLE32(memPtr); + else + return (size_t)MEM_readLE64(memPtr); +} + +#if defined (__cplusplus) +} +#endif + +#endif /* MEM_H_MODULE */ + + +/* ****************************************************************** + bitstream + Part of NewGen Entropy library + header file (to include) + Copyright (C) 2013-2015, Yann Collet. + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + - Public forum : https://groups.google.com/forum/#!forum/lz4c +****************************************************************** */ +#ifndef BITSTREAM_H_MODULE +#define BITSTREAM_H_MODULE + +#if defined (__cplusplus) +extern "C" { +#endif + + +/* +* This API consists of small unitary functions, which highly benefit from being inlined. +* Since link-time-optimization is not available for all compilers, +* these functions are defined into a .h to be included. +*/ + + +/********************************************** +* bitStream decompression API (read backward) +**********************************************/ +typedef struct +{ + size_t bitContainer; + unsigned bitsConsumed; + const char* ptr; + const char* start; +} BIT_DStream_t; + +typedef enum { BIT_DStream_unfinished = 0, + BIT_DStream_endOfBuffer = 1, + BIT_DStream_completed = 2, + BIT_DStream_overflow = 3 } BIT_DStream_status; /* result of BIT_reloadDStream() */ + /* 1,2,4,8 would be better for bitmap combinations, but slows down performance a bit ... :( */ + +MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize); +MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits); +MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD); +MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* bitD); + + +/****************************************** +* unsafe API +******************************************/ +MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits); +/* faster, but works only if nbBits >= 1 */ + + + +/**************************************************************** +* Helper functions +****************************************************************/ +MEM_STATIC unsigned BIT_highbit32 (U32 val) +{ +# if defined(_MSC_VER) /* Visual */ + unsigned long r; + return _BitScanReverse(&r, val) ? (unsigned)r : 0; +# elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */ + return __builtin_clz (val) ^ 31; +# else /* Software version */ + static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; + U32 v = val; + unsigned r; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + r = DeBruijnClz[ (U32) (v * 0x07C4ACDDU) >> 27]; + return r; +# endif +} + + + +/********************************************************** +* bitStream decoding +**********************************************************/ + +/*!BIT_initDStream +* Initialize a BIT_DStream_t. +* @bitD : a pointer to an already allocated BIT_DStream_t structure +* @srcBuffer must point at the beginning of a bitStream +* @srcSize must be the exact size of the bitStream +* @result : size of stream (== srcSize) or an errorCode if a problem is detected +*/ +MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize) +{ + if (srcSize < 1) { memset(bitD, 0, sizeof(*bitD)); return ERROR(srcSize_wrong); } + + if (srcSize >= sizeof(size_t)) /* normal case */ + { + U32 contain32; + bitD->start = (const char*)srcBuffer; + bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(size_t); + bitD->bitContainer = MEM_readLEST(bitD->ptr); + contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; + if (contain32 == 0) return ERROR(GENERIC); /* endMark not present */ + bitD->bitsConsumed = 8 - BIT_highbit32(contain32); + } + else + { + U32 contain32; + bitD->start = (const char*)srcBuffer; + bitD->ptr = bitD->start; + bitD->bitContainer = *(const BYTE*)(bitD->start); + switch(srcSize) + { + case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16); + /* fallthrough */ + case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24); + /* fallthrough */ + case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32); + /* fallthrough */ + case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; + /* fallthrough */ + case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; + /* fallthrough */ + case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) << 8; + /* fallthrough */ + default:; + } + contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; + if (contain32 == 0) return ERROR(GENERIC); /* endMark not present */ + bitD->bitsConsumed = 8 - BIT_highbit32(contain32); + bitD->bitsConsumed += (U32)(sizeof(size_t) - srcSize)*8; + } + + return srcSize; +} + +MEM_STATIC size_t BIT_lookBits(BIT_DStream_t* bitD, U32 nbBits) +{ + const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; + return ((bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> 1) >> ((bitMask-nbBits) & bitMask); +} + +/*! BIT_lookBitsFast : +* unsafe version; only works if nbBits >= 1 */ +MEM_STATIC size_t BIT_lookBitsFast(BIT_DStream_t* bitD, U32 nbBits) +{ + const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; + return (bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> (((bitMask+1)-nbBits) & bitMask); +} + +MEM_STATIC void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits) +{ + bitD->bitsConsumed += nbBits; +} + +MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits) +{ + size_t value = BIT_lookBits(bitD, nbBits); + BIT_skipBits(bitD, nbBits); + return value; +} + +/*!BIT_readBitsFast : +* unsafe version; only works if nbBits >= 1 */ +MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits) +{ + size_t value = BIT_lookBitsFast(bitD, nbBits); + BIT_skipBits(bitD, nbBits); + return value; +} + +MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD) +{ + if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) /* should never happen */ + return BIT_DStream_overflow; + + if (bitD->ptr >= bitD->start + sizeof(bitD->bitContainer)) + { + bitD->ptr -= bitD->bitsConsumed >> 3; + bitD->bitsConsumed &= 7; + bitD->bitContainer = MEM_readLEST(bitD->ptr); + return BIT_DStream_unfinished; + } + if (bitD->ptr == bitD->start) + { + if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return BIT_DStream_endOfBuffer; + return BIT_DStream_completed; + } + { + U32 nbBytes = bitD->bitsConsumed >> 3; + BIT_DStream_status result = BIT_DStream_unfinished; + if (bitD->ptr - nbBytes < bitD->start) + { + nbBytes = (U32)(bitD->ptr - bitD->start); /* ptr > start */ + result = BIT_DStream_endOfBuffer; + } + bitD->ptr -= nbBytes; + bitD->bitsConsumed -= nbBytes*8; + bitD->bitContainer = MEM_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD) */ + return result; + } +} + +/*! BIT_endOfDStream +* @return Tells if DStream has reached its exact end +*/ +MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* DStream) +{ + return ((DStream->ptr == DStream->start) && (DStream->bitsConsumed == sizeof(DStream->bitContainer)*8)); +} + +#if defined (__cplusplus) +} +#endif + +#endif /* BITSTREAM_H_MODULE */ +/* ****************************************************************** + Error codes and messages + Copyright (C) 2013-2015, Yann Collet + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + - Public forum : https://groups.google.com/forum/#!forum/lz4c +****************************************************************** */ +#ifndef ERROR_H_MODULE +#define ERROR_H_MODULE + +#if defined (__cplusplus) +extern "C" { +#endif + + +/****************************************** +* Compiler-specific +******************************************/ +#if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# define ERR_STATIC static inline +#elif defined(_MSC_VER) +# define ERR_STATIC static __inline +#elif defined(__GNUC__) +# define ERR_STATIC static __attribute__((unused)) +#else +# define ERR_STATIC static /* this version may generate warnings for unused static functions; disable the relevant warning */ +#endif + + +/****************************************** +* Error Management +******************************************/ +#define PREFIX(name) ZSTD_error_##name + +#define ERROR(name) (size_t)-PREFIX(name) + +#define ERROR_LIST(ITEM) \ + ITEM(PREFIX(No_Error)) ITEM(PREFIX(GENERIC)) \ + ITEM(PREFIX(dstSize_tooSmall)) ITEM(PREFIX(srcSize_wrong)) \ + ITEM(PREFIX(prefix_unknown)) ITEM(PREFIX(corruption_detected)) \ + ITEM(PREFIX(tableLog_tooLarge)) ITEM(PREFIX(maxSymbolValue_tooLarge)) ITEM(PREFIX(maxSymbolValue_tooSmall)) \ + ITEM(PREFIX(maxCode)) + +#define ERROR_GENERATE_ENUM(ENUM) ENUM, +typedef enum { ERROR_LIST(ERROR_GENERATE_ENUM) } ERR_codes; /* enum is exposed, to detect & handle specific errors; compare function result to -enum value */ + +#define ERROR_CONVERTTOSTRING(STRING) #STRING, +#define ERROR_GENERATE_STRING(EXPR) ERROR_CONVERTTOSTRING(EXPR) +static const char* ERR_strings[] = { ERROR_LIST(ERROR_GENERATE_STRING) }; + +ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); } + +ERR_STATIC const char* ERR_getErrorName(size_t code) +{ + static const char* codeError = "Unspecified error code"; + if (ERR_isError(code)) return ERR_strings[-(int)(code)]; + return codeError; +} + + +#if defined (__cplusplus) +} +#endif + +#endif /* ERROR_H_MODULE */ +/* +Constructor and Destructor of type FSE_CTable + Note that its size depends on 'tableLog' and 'maxSymbolValue' */ +typedef unsigned FSE_CTable; /* don't allocate that. It's just a way to be more restrictive than void* */ +typedef unsigned FSE_DTable; /* don't allocate that. It's just a way to be more restrictive than void* */ + + +/* ****************************************************************** + FSE : Finite State Entropy coder + header file for static linking (only) + Copyright (C) 2013-2015, Yann Collet + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + - Public forum : https://groups.google.com/forum/#!forum/lz4c +****************************************************************** */ +#if defined (__cplusplus) +extern "C" { +#endif + + +/****************************************** +* Static allocation +******************************************/ +/* FSE buffer bounds */ +#define FSE_NCOUNTBOUND 512 +#define FSE_BLOCKBOUND(size) (size + (size>>7)) +#define FSE_COMPRESSBOUND(size) (FSE_NCOUNTBOUND + FSE_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ + +/* You can statically allocate FSE CTable/DTable as a table of unsigned using below macro */ +#define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<(maxTableLog-1)) + ((maxSymbolValue+1)*2)) +#define FSE_DTABLE_SIZE_U32(maxTableLog) (1 + (1<= 1 (otherwise, result will be corrupted) */ + + +/****************************************** +* Implementation of inline functions +******************************************/ + +/* decompression */ + +typedef struct { + U16 tableLog; + U16 fastMode; +} FSE_DTableHeader; /* sizeof U32 */ + +typedef struct +{ + unsigned short newState; + unsigned char symbol; + unsigned char nbBits; +} FSE_decode_t; /* size == U32 */ + +MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt) +{ + FSE_DTableHeader DTableH; + memcpy(&DTableH, dt, sizeof(DTableH)); + DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog); + BIT_reloadDStream(bitD); + DStatePtr->table = dt + 1; +} + +MEM_STATIC BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) +{ + const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + const U32 nbBits = DInfo.nbBits; + BYTE symbol = DInfo.symbol; + size_t lowBits = BIT_readBits(bitD, nbBits); + + DStatePtr->state = DInfo.newState + lowBits; + return symbol; +} + +MEM_STATIC BYTE FSE_decodeSymbolFast(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD) +{ + const FSE_decode_t DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state]; + const U32 nbBits = DInfo.nbBits; + BYTE symbol = DInfo.symbol; + size_t lowBits = BIT_readBitsFast(bitD, nbBits); + + DStatePtr->state = DInfo.newState + lowBits; + return symbol; +} + +MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr) +{ + return DStatePtr->state == 0; +} + + +#if defined (__cplusplus) +} +#endif +/* ****************************************************************** + Huff0 : Huffman coder, part of New Generation Entropy library + header file for static linking (only) + Copyright (C) 2013-2015, Yann Collet + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - Source repository : https://github.com/Cyan4973/FiniteStateEntropy + - Public forum : https://groups.google.com/forum/#!forum/lz4c +****************************************************************** */ + +#if defined (__cplusplus) +extern "C" { +#endif + +/****************************************** +* Static allocation macros +******************************************/ +/* Huff0 buffer bounds */ +#define HUF_CTABLEBOUND 129 +#define HUF_BLOCKBOUND(size) (size + (size>>8) + 8) /* only true if incompressible pre-filtered with fast heuristic */ +#define HUF_COMPRESSBOUND(size) (HUF_CTABLEBOUND + HUF_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ + +/* static allocation of Huff0's DTable */ +#define HUF_DTABLE_SIZE(maxTableLog) (1 + (1< /* size_t */ + + +/* ************************************* +* Version +***************************************/ +#define ZSTD_VERSION_MAJOR 0 /* for breaking interface changes */ +#define ZSTD_VERSION_MINOR 2 /* for new (non-breaking) interface capabilities */ +#define ZSTD_VERSION_RELEASE 2 /* for tweaks, bug-fixes, or development */ +#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) + + +/* ************************************* +* Advanced functions +***************************************/ +typedef struct ZSTD_CCtx_s ZSTD_CCtx; /* incomplete type */ + +#if defined (__cplusplus) +} +#endif +/* + zstd - standard compression library + Header File for static linking only + Copyright (C) 2014-2015, Yann Collet. + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - zstd source repository : https://github.com/Cyan4973/zstd + - ztsd public forum : https://groups.google.com/forum/#!forum/lz4c +*/ + +/* The objects defined into this file should be considered experimental. + * They are not labelled stable, as their prototype may change in the future. + * You can use them for tests, provide feedback, or if you can endure risk of future changes. + */ + +#if defined (__cplusplus) +extern "C" { +#endif + +/* ************************************* +* Streaming functions +***************************************/ + +typedef struct ZSTDv02_Dctx_s ZSTD_DCtx; + +/* + Use above functions alternatively. + ZSTD_nextSrcSizeToDecompress() tells how much bytes to provide as 'srcSize' to ZSTD_decompressContinue(). + ZSTD_decompressContinue() will use previous data blocks to improve compression if they are located prior to current block. + Result is the number of bytes regenerated within 'dst'. + It can be zero, which is not an error; it just means ZSTD_decompressContinue() has decoded some header. +*/ + +/* ************************************* +* Prefix - version detection +***************************************/ +#define ZSTD_magicNumber 0xFD2FB522 /* v0.2 (current)*/ + + +#if defined (__cplusplus) +} +#endif +/* ****************************************************************** + FSE : Finite State Entropy coder + Copyright (C) 2013-2015, Yann Collet. + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy + - Public forum : https://groups.google.com/forum/#!forum/lz4c +****************************************************************** */ + +#ifndef FSE_COMMONDEFS_ONLY + +/**************************************************************** +* Tuning parameters +****************************************************************/ +/* MEMORY_USAGE : +* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) +* Increasing memory usage improves compression ratio +* Reduced memory usage can improve speed, due to cache effect +* Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ +#define FSE_MAX_MEMORY_USAGE 14 +#define FSE_DEFAULT_MEMORY_USAGE 13 + +/* FSE_MAX_SYMBOL_VALUE : +* Maximum symbol value authorized. +* Required for proper stack allocation */ +#define FSE_MAX_SYMBOL_VALUE 255 + + +/**************************************************************** +* template functions type & suffix +****************************************************************/ +#define FSE_FUNCTION_TYPE BYTE +#define FSE_FUNCTION_EXTENSION + + +/**************************************************************** +* Byte symbol type +****************************************************************/ +#endif /* !FSE_COMMONDEFS_ONLY */ + + +/**************************************************************** +* Compiler specifics +****************************************************************/ +#ifdef _MSC_VER /* Visual Studio */ +# define FORCE_INLINE static __forceinline +# include /* For Visual 2005 */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */ +#else +# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# ifdef __GNUC__ +# define FORCE_INLINE static inline __attribute__((always_inline)) +# else +# define FORCE_INLINE static inline +# endif +# else +# define FORCE_INLINE static +# endif /* __STDC_VERSION__ */ +#endif + + +/**************************************************************** +* Includes +****************************************************************/ +#include /* malloc, free, qsort */ +#include /* memcpy, memset */ +#include /* printf (debug) */ + +/**************************************************************** +* Constants +*****************************************************************/ +#define FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) +#define FSE_MAX_TABLESIZE (1U< FSE_TABLELOG_ABSOLUTE_MAX +#error "FSE_MAX_TABLELOG > FSE_TABLELOG_ABSOLUTE_MAX is not supported" +#endif + + +/**************************************************************** +* Error Management +****************************************************************/ +#define FSE_STATIC_ASSERT(c) { enum { FSE_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ + + +/**************************************************************** +* Complex types +****************************************************************/ +typedef U32 DTable_max_t[FSE_DTABLE_SIZE_U32(FSE_MAX_TABLELOG)]; + + +/**************************************************************** +* Templates +****************************************************************/ +/* + designed to be included + for type-specific functions (template emulation in C) + Objective is to write these functions only once, for improved maintenance +*/ + +/* safety checks */ +#ifndef FSE_FUNCTION_EXTENSION +# error "FSE_FUNCTION_EXTENSION must be defined" +#endif +#ifndef FSE_FUNCTION_TYPE +# error "FSE_FUNCTION_TYPE must be defined" +#endif + +/* Function names */ +#define FSE_CAT(X,Y) X##Y +#define FSE_FUNCTION_NAME(X,Y) FSE_CAT(X,Y) +#define FSE_TYPE_NAME(X,Y) FSE_CAT(X,Y) + + +/* Function templates */ + +#define FSE_DECODE_TYPE FSE_decode_t + +static U32 FSE_tableStep(U32 tableSize) { return (tableSize>>1) + (tableSize>>3) + 3; } + +static size_t FSE_buildDTable +(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) +{ + void* ptr = dt+1; + FSE_DECODE_TYPE* const tableDecode = (FSE_DECODE_TYPE*)ptr; + FSE_DTableHeader DTableH; + const U32 tableSize = 1 << tableLog; + const U32 tableMask = tableSize-1; + const U32 step = FSE_tableStep(tableSize); + U16 symbolNext[FSE_MAX_SYMBOL_VALUE+1]; + U32 position = 0; + U32 highThreshold = tableSize-1; + const S16 largeLimit= (S16)(1 << (tableLog-1)); + U32 noLarge = 1; + U32 s; + + /* Sanity Checks */ + if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); + if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); + + /* Init, lay down lowprob symbols */ + DTableH.tableLog = (U16)tableLog; + for (s=0; s<=maxSymbolValue; s++) + { + if (normalizedCounter[s]==-1) + { + tableDecode[highThreshold--].symbol = (FSE_FUNCTION_TYPE)s; + symbolNext[s] = 1; + } + else + { + if (normalizedCounter[s] >= largeLimit) noLarge=0; + symbolNext[s] = normalizedCounter[s]; + } + } + + /* Spread symbols */ + for (s=0; s<=maxSymbolValue; s++) + { + int i; + for (i=0; i highThreshold) position = (position + step) & tableMask; /* lowprob area */ + } + } + + if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ + + /* Build Decoding table */ + { + U32 i; + for (i=0; i FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge); + bitStream >>= 4; + bitCount = 4; + *tableLogPtr = nbBits; + remaining = (1<1) && (charnum<=*maxSVPtr)) + { + if (previous0) + { + unsigned n0 = charnum; + while ((bitStream & 0xFFFF) == 0xFFFF) + { + n0+=24; + if (ip < iend-5) + { + ip+=2; + bitStream = MEM_readLE32(ip) >> bitCount; + } + else + { + bitStream >>= 16; + bitCount+=16; + } + } + while ((bitStream & 3) == 3) + { + n0+=3; + bitStream>>=2; + bitCount+=2; + } + n0 += bitStream & 3; + bitCount += 2; + if (n0 > *maxSVPtr) return ERROR(maxSymbolValue_tooSmall); + while (charnum < n0) normalizedCounter[charnum++] = 0; + if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) + { + ip += bitCount>>3; + bitCount &= 7; + bitStream = MEM_readLE32(ip) >> bitCount; + } + else + bitStream >>= 2; + } + { + const short max = (short)((2*threshold-1)-remaining); + short count; + + if ((bitStream & (threshold-1)) < (U32)max) + { + count = (short)(bitStream & (threshold-1)); + bitCount += nbBits-1; + } + else + { + count = (short)(bitStream & (2*threshold-1)); + if (count >= threshold) count -= max; + bitCount += nbBits; + } + + count--; /* extra accuracy */ + remaining -= FSE_abs(count); + normalizedCounter[charnum++] = count; + previous0 = !count; + while (remaining < threshold) + { + nbBits--; + threshold >>= 1; + } + + { + if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) + { + ip += bitCount>>3; + bitCount &= 7; + } + else + { + bitCount -= (int)(8 * (iend - 4 - ip)); + ip = iend - 4; + } + bitStream = MEM_readLE32(ip) >> (bitCount & 31); + } + } + } + if (remaining != 1) return ERROR(GENERIC); + *maxSVPtr = charnum-1; + + ip += (bitCount+7)>>3; + if ((size_t)(ip-istart) > hbSize) return ERROR(srcSize_wrong); + return ip-istart; +} + + +/********************************************************* +* Decompression (Byte symbols) +*********************************************************/ +static size_t FSE_buildDTable_rle (FSE_DTable* dt, BYTE symbolValue) +{ + void* ptr = dt; + FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; + FSE_decode_t* const cell = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ + + DTableH->tableLog = 0; + DTableH->fastMode = 0; + + cell->newState = 0; + cell->symbol = symbolValue; + cell->nbBits = 0; + + return 0; +} + + +static size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits) +{ + void* ptr = dt; + FSE_DTableHeader* const DTableH = (FSE_DTableHeader*)ptr; + FSE_decode_t* const dinfo = (FSE_decode_t*)(ptr) + 1; /* because dt is unsigned */ + const unsigned tableSize = 1 << nbBits; + const unsigned tableMask = tableSize - 1; + const unsigned maxSymbolValue = tableMask; + unsigned s; + + /* Sanity checks */ + if (nbBits < 1) return ERROR(GENERIC); /* min size */ + + /* Build Decoding Table */ + DTableH->tableLog = (U16)nbBits; + DTableH->fastMode = 1; + for (s=0; s<=maxSymbolValue; s++) + { + dinfo[s].newState = 0; + dinfo[s].symbol = (BYTE)s; + dinfo[s].nbBits = (BYTE)nbBits; + } + + return 0; +} + +FORCE_INLINE size_t FSE_decompress_usingDTable_generic( + void* dst, size_t maxDstSize, + const void* cSrc, size_t cSrcSize, + const FSE_DTable* dt, const unsigned fast) +{ + BYTE* const ostart = (BYTE*) dst; + BYTE* op = ostart; + BYTE* const omax = op + maxDstSize; + BYTE* const olimit = omax-3; + + BIT_DStream_t bitD; + FSE_DState_t state1; + FSE_DState_t state2; + size_t errorCode; + + /* Init */ + errorCode = BIT_initDStream(&bitD, cSrc, cSrcSize); /* replaced last arg by maxCompressed Size */ + if (FSE_isError(errorCode)) return errorCode; + + FSE_initDState(&state1, &bitD, dt); + FSE_initDState(&state2, &bitD, dt); + +#define FSE_GETSYMBOL(statePtr) fast ? FSE_decodeSymbolFast(statePtr, &bitD) : FSE_decodeSymbol(statePtr, &bitD) + + /* 4 symbols per loop */ + for ( ; (BIT_reloadDStream(&bitD)==BIT_DStream_unfinished) && (op sizeof(bitD.bitContainer)*8) /* This test must be static */ + BIT_reloadDStream(&bitD); + + op[1] = FSE_GETSYMBOL(&state2); + + if (FSE_MAX_TABLELOG*4+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ + { if (BIT_reloadDStream(&bitD) > BIT_DStream_unfinished) { op+=2; break; } } + + op[2] = FSE_GETSYMBOL(&state1); + + if (FSE_MAX_TABLELOG*2+7 > sizeof(bitD.bitContainer)*8) /* This test must be static */ + BIT_reloadDStream(&bitD); + + op[3] = FSE_GETSYMBOL(&state2); + } + + /* tail */ + /* note : BIT_reloadDStream(&bitD) >= FSE_DStream_partiallyFilled; Ends at exactly BIT_DStream_completed */ + while (1) + { + if ( (BIT_reloadDStream(&bitD)>BIT_DStream_completed) || (op==omax) || (BIT_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state1))) ) + break; + + *op++ = FSE_GETSYMBOL(&state1); + + if ( (BIT_reloadDStream(&bitD)>BIT_DStream_completed) || (op==omax) || (BIT_endOfDStream(&bitD) && (fast || FSE_endOfDState(&state2))) ) + break; + + *op++ = FSE_GETSYMBOL(&state2); + } + + /* end ? */ + if (BIT_endOfDStream(&bitD) && FSE_endOfDState(&state1) && FSE_endOfDState(&state2)) + return op-ostart; + + if (op==omax) return ERROR(dstSize_tooSmall); /* dst buffer is full, but cSrc unfinished */ + + return ERROR(corruption_detected); +} + + +static size_t FSE_decompress_usingDTable(void* dst, size_t originalSize, + const void* cSrc, size_t cSrcSize, + const FSE_DTable* dt) +{ + FSE_DTableHeader DTableH; + memcpy(&DTableH, dt, sizeof(DTableH)); + + /* select fast mode (static) */ + if (DTableH.fastMode) return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 1); + return FSE_decompress_usingDTable_generic(dst, originalSize, cSrc, cSrcSize, dt, 0); +} + + +static size_t FSE_decompress(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize) +{ + const BYTE* const istart = (const BYTE*)cSrc; + const BYTE* ip = istart; + short counting[FSE_MAX_SYMBOL_VALUE+1]; + DTable_max_t dt; /* Static analyzer seems unable to understand this table will be properly initialized later */ + unsigned tableLog; + unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; + size_t errorCode; + + if (cSrcSize<2) return ERROR(srcSize_wrong); /* too small input size */ + + /* normal FSE decoding mode */ + errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); + if (FSE_isError(errorCode)) return errorCode; + if (errorCode >= cSrcSize) return ERROR(srcSize_wrong); /* too small input size */ + ip += errorCode; + cSrcSize -= errorCode; + + errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog); + if (FSE_isError(errorCode)) return errorCode; + + /* always return, even if it is an error code */ + return FSE_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, dt); +} + + + +#endif /* FSE_COMMONDEFS_ONLY */ +/* ****************************************************************** + Huff0 : Huffman coder, part of New Generation Entropy library + Copyright (C) 2013-2015, Yann Collet. + + BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - FSE+Huff0 source repository : https://github.com/Cyan4973/FiniteStateEntropy + - Public forum : https://groups.google.com/forum/#!forum/lz4c +****************************************************************** */ + +/**************************************************************** +* Compiler specifics +****************************************************************/ +#if defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +/* inline is defined */ +#elif defined(_MSC_VER) +# define inline __inline +#else +# define inline /* disable inline */ +#endif + + +#ifdef _MSC_VER /* Visual Studio */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +#endif + + +/**************************************************************** +* Includes +****************************************************************/ +#include /* malloc, free, qsort */ +#include /* memcpy, memset */ +#include /* printf (debug) */ + +/**************************************************************** +* Error Management +****************************************************************/ +#define HUF_STATIC_ASSERT(c) { enum { HUF_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ + + +/****************************************** +* Helper functions +******************************************/ +static unsigned HUF_isError(size_t code) { return ERR_isError(code); } + +#define HUF_ABSOLUTEMAX_TABLELOG 16 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ +#define HUF_MAX_TABLELOG 12 /* max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG */ +#define HUF_DEFAULT_TABLELOG HUF_MAX_TABLELOG /* tableLog by default, when not specified */ +#define HUF_MAX_SYMBOL_VALUE 255 +#if (HUF_MAX_TABLELOG > HUF_ABSOLUTEMAX_TABLELOG) +# error "HUF_MAX_TABLELOG is too large !" +#endif + + + +/********************************************************* +* Huff0 : Huffman block decompression +*********************************************************/ +typedef struct { BYTE byte; BYTE nbBits; } HUF_DEltX2; /* single-symbol decoding */ + +typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX4; /* double-symbols decoding */ + +typedef struct { BYTE symbol; BYTE weight; } sortedSymbol_t; + +/*! HUF_readStats + Read compact Huffman tree, saved by HUF_writeCTable + @huffWeight : destination buffer + @return : size read from `src` +*/ +static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats, + U32* nbSymbolsPtr, U32* tableLogPtr, + const void* src, size_t srcSize) +{ + U32 weightTotal; + U32 tableLog; + const BYTE* ip = (const BYTE*) src; + size_t iSize; + size_t oSize; + U32 n; + + if (!srcSize) return ERROR(srcSize_wrong); + iSize = ip[0]; + //memset(huffWeight, 0, hwSize); /* is not necessary, even though some analyzer complain ... */ + + if (iSize >= 128) /* special header */ + { + if (iSize >= (242)) /* RLE */ + { + static int l[14] = { 1, 2, 3, 4, 7, 8, 15, 16, 31, 32, 63, 64, 127, 128 }; + oSize = l[iSize-242]; + memset(huffWeight, 1, hwSize); + iSize = 0; + } + else /* Incompressible */ + { + oSize = iSize - 127; + iSize = ((oSize+1)/2); + if (iSize+1 > srcSize) return ERROR(srcSize_wrong); + if (oSize >= hwSize) return ERROR(corruption_detected); + ip += 1; + for (n=0; n> 4; + huffWeight[n+1] = ip[n/2] & 15; + } + } + } + else /* header compressed with FSE (normal case) */ + { + if (iSize+1 > srcSize) return ERROR(srcSize_wrong); + oSize = FSE_decompress(huffWeight, hwSize-1, ip+1, iSize); /* max (hwSize-1) values decoded, as last one is implied */ + if (FSE_isError(oSize)) return oSize; + } + + /* collect weight stats */ + memset(rankStats, 0, (HUF_ABSOLUTEMAX_TABLELOG + 1) * sizeof(U32)); + weightTotal = 0; + for (n=0; n= HUF_ABSOLUTEMAX_TABLELOG) return ERROR(corruption_detected); + rankStats[huffWeight[n]]++; + weightTotal += (1 << huffWeight[n]) >> 1; + } + if (weightTotal == 0) return ERROR(corruption_detected); + + /* get last non-null symbol weight (implied, total must be 2^n) */ + tableLog = BIT_highbit32(weightTotal) + 1; + if (tableLog > HUF_ABSOLUTEMAX_TABLELOG) return ERROR(corruption_detected); + { + U32 total = 1 << tableLog; + U32 rest = total - weightTotal; + U32 verif = 1 << BIT_highbit32(rest); + U32 lastWeight = BIT_highbit32(rest) + 1; + if (verif != rest) return ERROR(corruption_detected); /* last value must be a clean power of 2 */ + huffWeight[oSize] = (BYTE)lastWeight; + rankStats[lastWeight]++; + } + + /* check tree construction validity */ + if ((rankStats[1] < 2) || (rankStats[1] & 1)) return ERROR(corruption_detected); /* by construction : at least 2 elts of rank 1, must be even */ + + /* results */ + *nbSymbolsPtr = (U32)(oSize+1); + *tableLogPtr = tableLog; + return iSize+1; +} + + +/**************************/ +/* single-symbol decoding */ +/**************************/ + +static size_t HUF_readDTableX2 (U16* DTable, const void* src, size_t srcSize) +{ + BYTE huffWeight[HUF_MAX_SYMBOL_VALUE + 1]; + U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; /* large enough for values from 0 to 16 */ + U32 tableLog = 0; + const BYTE* ip = (const BYTE*) src; + size_t iSize = ip[0]; + U32 nbSymbols = 0; + U32 n; + U32 nextRankStart; + void* ptr = DTable+1; + HUF_DEltX2* const dt = (HUF_DEltX2*)ptr; + + HUF_STATIC_ASSERT(sizeof(HUF_DEltX2) == sizeof(U16)); /* if compilation fails here, assertion is false */ + //memset(huffWeight, 0, sizeof(huffWeight)); /* is not necessary, even though some analyzer complain ... */ + + iSize = HUF_readStats(huffWeight, HUF_MAX_SYMBOL_VALUE + 1, rankVal, &nbSymbols, &tableLog, src, srcSize); + if (HUF_isError(iSize)) return iSize; + + /* check result */ + if (tableLog > DTable[0]) return ERROR(tableLog_tooLarge); /* DTable is too small */ + DTable[0] = (U16)tableLog; /* maybe should separate sizeof DTable, as allocated, from used size of DTable, in case of DTable re-use */ + + /* Prepare ranks */ + nextRankStart = 0; + for (n=1; n<=tableLog; n++) + { + U32 current = nextRankStart; + nextRankStart += (rankVal[n] << (n-1)); + rankVal[n] = current; + } + + /* fill DTable */ + for (n=0; n> 1; + U32 i; + HUF_DEltX2 D; + D.byte = (BYTE)n; D.nbBits = (BYTE)(tableLog + 1 - w); + for (i = rankVal[w]; i < rankVal[w] + length; i++) + dt[i] = D; + rankVal[w] += length; + } + + return iSize; +} + +static BYTE HUF_decodeSymbolX2(BIT_DStream_t* Dstream, const HUF_DEltX2* dt, const U32 dtLog) +{ + const size_t val = BIT_lookBitsFast(Dstream, dtLog); /* note : dtLog >= 1 */ + const BYTE c = dt[val].byte; + BIT_skipBits(Dstream, dt[val].nbBits); + return c; +} + +#define HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) \ + *ptr++ = HUF_decodeSymbolX2(DStreamPtr, dt, dtLog) + +#define HUF_DECODE_SYMBOLX2_1(ptr, DStreamPtr) \ + if (MEM_64bits() || (HUF_MAX_TABLELOG<=12)) \ + HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) + +#define HUF_DECODE_SYMBOLX2_2(ptr, DStreamPtr) \ + if (MEM_64bits()) \ + HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) + +static inline size_t HUF_decodeStreamX2(BYTE* p, BIT_DStream_t* const bitDPtr, BYTE* const pEnd, const HUF_DEltX2* const dt, const U32 dtLog) +{ + BYTE* const pStart = p; + + /* up to 4 symbols at a time */ + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p <= pEnd-4)) + { + HUF_DECODE_SYMBOLX2_2(p, bitDPtr); + HUF_DECODE_SYMBOLX2_1(p, bitDPtr); + HUF_DECODE_SYMBOLX2_2(p, bitDPtr); + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + } + + /* closer to the end */ + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p < pEnd)) + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + + /* no more data to retrieve from bitstream, hence no need to reload */ + while (p < pEnd) + HUF_DECODE_SYMBOLX2_0(p, bitDPtr); + + return pEnd-pStart; +} + + +static size_t HUF_decompress4X2_usingDTable( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const U16* DTable) +{ + if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ + + { + const BYTE* const istart = (const BYTE*) cSrc; + BYTE* const ostart = (BYTE*) dst; + BYTE* const oend = ostart + dstSize; + + const void* ptr = DTable; + const HUF_DEltX2* const dt = ((const HUF_DEltX2*)ptr) +1; + const U32 dtLog = DTable[0]; + size_t errorCode; + + /* Init */ + BIT_DStream_t bitD1; + BIT_DStream_t bitD2; + BIT_DStream_t bitD3; + BIT_DStream_t bitD4; + const size_t length1 = MEM_readLE16(istart); + const size_t length2 = MEM_readLE16(istart+2); + const size_t length3 = MEM_readLE16(istart+4); + size_t length4; + const BYTE* const istart1 = istart + 6; /* jumpTable */ + const BYTE* const istart2 = istart1 + length1; + const BYTE* const istart3 = istart2 + length2; + const BYTE* const istart4 = istart3 + length3; + const size_t segmentSize = (dstSize+3) / 4; + BYTE* const opStart2 = ostart + segmentSize; + BYTE* const opStart3 = opStart2 + segmentSize; + BYTE* const opStart4 = opStart3 + segmentSize; + BYTE* op1 = ostart; + BYTE* op2 = opStart2; + BYTE* op3 = opStart3; + BYTE* op4 = opStart4; + U32 endSignal; + + length4 = cSrcSize - (length1 + length2 + length3 + 6); + if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ + errorCode = BIT_initDStream(&bitD1, istart1, length1); + if (HUF_isError(errorCode)) return errorCode; + errorCode = BIT_initDStream(&bitD2, istart2, length2); + if (HUF_isError(errorCode)) return errorCode; + errorCode = BIT_initDStream(&bitD3, istart3, length3); + if (HUF_isError(errorCode)) return errorCode; + errorCode = BIT_initDStream(&bitD4, istart4, length4); + if (HUF_isError(errorCode)) return errorCode; + + /* 16-32 symbols per loop (4-8 symbols per stream) */ + endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); + for ( ; (endSignal==BIT_DStream_unfinished) && (op4<(oend-7)) ; ) + { + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_1(op1, &bitD1); + HUF_DECODE_SYMBOLX2_1(op2, &bitD2); + HUF_DECODE_SYMBOLX2_1(op3, &bitD3); + HUF_DECODE_SYMBOLX2_1(op4, &bitD4); + HUF_DECODE_SYMBOLX2_2(op1, &bitD1); + HUF_DECODE_SYMBOLX2_2(op2, &bitD2); + HUF_DECODE_SYMBOLX2_2(op3, &bitD3); + HUF_DECODE_SYMBOLX2_2(op4, &bitD4); + HUF_DECODE_SYMBOLX2_0(op1, &bitD1); + HUF_DECODE_SYMBOLX2_0(op2, &bitD2); + HUF_DECODE_SYMBOLX2_0(op3, &bitD3); + HUF_DECODE_SYMBOLX2_0(op4, &bitD4); + + endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); + } + + /* check corruption */ + if (op1 > opStart2) return ERROR(corruption_detected); + if (op2 > opStart3) return ERROR(corruption_detected); + if (op3 > opStart4) return ERROR(corruption_detected); + /* note : op4 supposed already verified within main loop */ + + /* finish bitStreams one by one */ + HUF_decodeStreamX2(op1, &bitD1, opStart2, dt, dtLog); + HUF_decodeStreamX2(op2, &bitD2, opStart3, dt, dtLog); + HUF_decodeStreamX2(op3, &bitD3, opStart4, dt, dtLog); + HUF_decodeStreamX2(op4, &bitD4, oend, dt, dtLog); + + /* check */ + endSignal = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); + if (!endSignal) return ERROR(corruption_detected); + + /* decoded size */ + return dstSize; + } +} + + +static size_t HUF_decompress4X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize) +{ + HUF_CREATE_STATIC_DTABLEX2(DTable, HUF_MAX_TABLELOG); + const BYTE* ip = (const BYTE*) cSrc; + size_t errorCode; + + errorCode = HUF_readDTableX2 (DTable, cSrc, cSrcSize); + if (HUF_isError(errorCode)) return errorCode; + if (errorCode >= cSrcSize) return ERROR(srcSize_wrong); + ip += errorCode; + cSrcSize -= errorCode; + + return HUF_decompress4X2_usingDTable (dst, dstSize, ip, cSrcSize, DTable); +} + + +/***************************/ +/* double-symbols decoding */ +/***************************/ + +static void HUF_fillDTableX4Level2(HUF_DEltX4* DTable, U32 sizeLog, const U32 consumed, + const U32* rankValOrigin, const int minWeight, + const sortedSymbol_t* sortedSymbols, const U32 sortedListSize, + U32 nbBitsBaseline, U16 baseSeq) +{ + HUF_DEltX4 DElt; + U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; + U32 s; + + /* get pre-calculated rankVal */ + memcpy(rankVal, rankValOrigin, sizeof(rankVal)); + + /* fill skipped values */ + if (minWeight>1) + { + U32 i, skipSize = rankVal[minWeight]; + MEM_writeLE16(&(DElt.sequence), baseSeq); + DElt.nbBits = (BYTE)(consumed); + DElt.length = 1; + for (i = 0; i < skipSize; i++) + DTable[i] = DElt; + } + + /* fill DTable */ + for (s=0; s= 1 */ + + rankVal[weight] += length; + } +} + +typedef U32 rankVal_t[HUF_ABSOLUTEMAX_TABLELOG][HUF_ABSOLUTEMAX_TABLELOG + 1]; + +static void HUF_fillDTableX4(HUF_DEltX4* DTable, const U32 targetLog, + const sortedSymbol_t* sortedList, const U32 sortedListSize, + const U32* rankStart, rankVal_t rankValOrigin, const U32 maxWeight, + const U32 nbBitsBaseline) +{ + U32 rankVal[HUF_ABSOLUTEMAX_TABLELOG + 1]; + const int scaleLog = nbBitsBaseline - targetLog; /* note : targetLog >= srcLog, hence scaleLog <= 1 */ + const U32 minBits = nbBitsBaseline - maxWeight; + U32 s; + + memcpy(rankVal, rankValOrigin, sizeof(rankVal)); + + /* fill DTable */ + for (s=0; s= minBits) /* enough room for a second symbol */ + { + U32 sortedRank; + int minWeight = nbBits + scaleLog; + if (minWeight < 1) minWeight = 1; + sortedRank = rankStart[minWeight]; + HUF_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, + rankValOrigin[nbBits], minWeight, + sortedList+sortedRank, sortedListSize-sortedRank, + nbBitsBaseline, symbol); + } + else + { + U32 i; + const U32 end = start + length; + HUF_DEltX4 DElt; + + MEM_writeLE16(&(DElt.sequence), symbol); + DElt.nbBits = (BYTE)(nbBits); + DElt.length = 1; + for (i = start; i < end; i++) + DTable[i] = DElt; + } + rankVal[weight] += length; + } +} + +static size_t HUF_readDTableX4 (U32* DTable, const void* src, size_t srcSize) +{ + BYTE weightList[HUF_MAX_SYMBOL_VALUE + 1]; + sortedSymbol_t sortedSymbol[HUF_MAX_SYMBOL_VALUE + 1]; + U32 rankStats[HUF_ABSOLUTEMAX_TABLELOG + 1] = { 0 }; + U32 rankStart0[HUF_ABSOLUTEMAX_TABLELOG + 2] = { 0 }; + U32* const rankStart = rankStart0+1; + rankVal_t rankVal; + U32 tableLog, maxW, sizeOfSort, nbSymbols; + const U32 memLog = DTable[0]; + const BYTE* ip = (const BYTE*) src; + size_t iSize = ip[0]; + void* ptr = DTable; + HUF_DEltX4* const dt = ((HUF_DEltX4*)ptr) + 1; + + HUF_STATIC_ASSERT(sizeof(HUF_DEltX4) == sizeof(U32)); /* if compilation fails here, assertion is false */ + if (memLog > HUF_ABSOLUTEMAX_TABLELOG) return ERROR(tableLog_tooLarge); + //memset(weightList, 0, sizeof(weightList)); /* is not necessary, even though some analyzer complain ... */ + + iSize = HUF_readStats(weightList, HUF_MAX_SYMBOL_VALUE + 1, rankStats, &nbSymbols, &tableLog, src, srcSize); + if (HUF_isError(iSize)) return iSize; + + /* check result */ + if (tableLog > memLog) return ERROR(tableLog_tooLarge); /* DTable can't fit code depth */ + + /* find maxWeight */ + for (maxW = tableLog; rankStats[maxW]==0; maxW--) + {if (!maxW) return ERROR(GENERIC); } /* necessarily finds a solution before maxW==0 */ + + /* Get start index of each weight */ + { + U32 w, nextRankStart = 0; + for (w=1; w<=maxW; w++) + { + U32 current = nextRankStart; + nextRankStart += rankStats[w]; + rankStart[w] = current; + } + rankStart[0] = nextRankStart; /* put all 0w symbols at the end of sorted list*/ + sizeOfSort = nextRankStart; + } + + /* sort symbols by weight */ + { + U32 s; + for (s=0; s> consumed; + } + } + } + + HUF_fillDTableX4(dt, memLog, + sortedSymbol, sizeOfSort, + rankStart0, rankVal, maxW, + tableLog+1); + + return iSize; +} + + +static U32 HUF_decodeSymbolX4(void* op, BIT_DStream_t* DStream, const HUF_DEltX4* dt, const U32 dtLog) +{ + const size_t val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ + memcpy(op, dt+val, 2); + BIT_skipBits(DStream, dt[val].nbBits); + return dt[val].length; +} + +static U32 HUF_decodeLastSymbolX4(void* op, BIT_DStream_t* DStream, const HUF_DEltX4* dt, const U32 dtLog) +{ + const size_t val = BIT_lookBitsFast(DStream, dtLog); /* note : dtLog >= 1 */ + memcpy(op, dt+val, 1); + if (dt[val].length==1) BIT_skipBits(DStream, dt[val].nbBits); + else + { + if (DStream->bitsConsumed < (sizeof(DStream->bitContainer)*8)) + { + BIT_skipBits(DStream, dt[val].nbBits); + if (DStream->bitsConsumed > (sizeof(DStream->bitContainer)*8)) + DStream->bitsConsumed = (sizeof(DStream->bitContainer)*8); /* ugly hack; works only because it's the last symbol. Note : can't easily extract nbBits from just this symbol */ + } + } + return 1; +} + + +#define HUF_DECODE_SYMBOLX4_0(ptr, DStreamPtr) \ + ptr += HUF_decodeSymbolX4(ptr, DStreamPtr, dt, dtLog) + +#define HUF_DECODE_SYMBOLX4_1(ptr, DStreamPtr) \ + if (MEM_64bits() || (HUF_MAX_TABLELOG<=12)) \ + ptr += HUF_decodeSymbolX4(ptr, DStreamPtr, dt, dtLog) + +#define HUF_DECODE_SYMBOLX4_2(ptr, DStreamPtr) \ + if (MEM_64bits()) \ + ptr += HUF_decodeSymbolX4(ptr, DStreamPtr, dt, dtLog) + +static inline size_t HUF_decodeStreamX4(BYTE* p, BIT_DStream_t* bitDPtr, BYTE* const pEnd, const HUF_DEltX4* const dt, const U32 dtLog) +{ + BYTE* const pStart = p; + + /* up to 8 symbols at a time */ + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p < pEnd-7)) + { + HUF_DECODE_SYMBOLX4_2(p, bitDPtr); + HUF_DECODE_SYMBOLX4_1(p, bitDPtr); + HUF_DECODE_SYMBOLX4_2(p, bitDPtr); + HUF_DECODE_SYMBOLX4_0(p, bitDPtr); + } + + /* closer to the end */ + while ((BIT_reloadDStream(bitDPtr) == BIT_DStream_unfinished) && (p <= pEnd-2)) + HUF_DECODE_SYMBOLX4_0(p, bitDPtr); + + while (p <= pEnd-2) + HUF_DECODE_SYMBOLX4_0(p, bitDPtr); /* no need to reload : reached the end of DStream */ + + if (p < pEnd) + p += HUF_decodeLastSymbolX4(p, bitDPtr, dt, dtLog); + + return p-pStart; +} + + + +static size_t HUF_decompress4X4_usingDTable( + void* dst, size_t dstSize, + const void* cSrc, size_t cSrcSize, + const U32* DTable) +{ + if (cSrcSize < 10) return ERROR(corruption_detected); /* strict minimum : jump table + 1 byte per stream */ + + { + const BYTE* const istart = (const BYTE*) cSrc; + BYTE* const ostart = (BYTE*) dst; + BYTE* const oend = ostart + dstSize; + + const void* ptr = DTable; + const HUF_DEltX4* const dt = ((const HUF_DEltX4*)ptr) +1; + const U32 dtLog = DTable[0]; + size_t errorCode; + + /* Init */ + BIT_DStream_t bitD1; + BIT_DStream_t bitD2; + BIT_DStream_t bitD3; + BIT_DStream_t bitD4; + const size_t length1 = MEM_readLE16(istart); + const size_t length2 = MEM_readLE16(istart+2); + const size_t length3 = MEM_readLE16(istart+4); + size_t length4; + const BYTE* const istart1 = istart + 6; /* jumpTable */ + const BYTE* const istart2 = istart1 + length1; + const BYTE* const istart3 = istart2 + length2; + const BYTE* const istart4 = istart3 + length3; + const size_t segmentSize = (dstSize+3) / 4; + BYTE* const opStart2 = ostart + segmentSize; + BYTE* const opStart3 = opStart2 + segmentSize; + BYTE* const opStart4 = opStart3 + segmentSize; + BYTE* op1 = ostart; + BYTE* op2 = opStart2; + BYTE* op3 = opStart3; + BYTE* op4 = opStart4; + U32 endSignal; + + length4 = cSrcSize - (length1 + length2 + length3 + 6); + if (length4 > cSrcSize) return ERROR(corruption_detected); /* overflow */ + errorCode = BIT_initDStream(&bitD1, istart1, length1); + if (HUF_isError(errorCode)) return errorCode; + errorCode = BIT_initDStream(&bitD2, istart2, length2); + if (HUF_isError(errorCode)) return errorCode; + errorCode = BIT_initDStream(&bitD3, istart3, length3); + if (HUF_isError(errorCode)) return errorCode; + errorCode = BIT_initDStream(&bitD4, istart4, length4); + if (HUF_isError(errorCode)) return errorCode; + + /* 16-32 symbols per loop (4-8 symbols per stream) */ + endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); + for ( ; (endSignal==BIT_DStream_unfinished) && (op4<(oend-7)) ; ) + { + HUF_DECODE_SYMBOLX4_2(op1, &bitD1); + HUF_DECODE_SYMBOLX4_2(op2, &bitD2); + HUF_DECODE_SYMBOLX4_2(op3, &bitD3); + HUF_DECODE_SYMBOLX4_2(op4, &bitD4); + HUF_DECODE_SYMBOLX4_1(op1, &bitD1); + HUF_DECODE_SYMBOLX4_1(op2, &bitD2); + HUF_DECODE_SYMBOLX4_1(op3, &bitD3); + HUF_DECODE_SYMBOLX4_1(op4, &bitD4); + HUF_DECODE_SYMBOLX4_2(op1, &bitD1); + HUF_DECODE_SYMBOLX4_2(op2, &bitD2); + HUF_DECODE_SYMBOLX4_2(op3, &bitD3); + HUF_DECODE_SYMBOLX4_2(op4, &bitD4); + HUF_DECODE_SYMBOLX4_0(op1, &bitD1); + HUF_DECODE_SYMBOLX4_0(op2, &bitD2); + HUF_DECODE_SYMBOLX4_0(op3, &bitD3); + HUF_DECODE_SYMBOLX4_0(op4, &bitD4); + + endSignal = BIT_reloadDStream(&bitD1) | BIT_reloadDStream(&bitD2) | BIT_reloadDStream(&bitD3) | BIT_reloadDStream(&bitD4); + } + + /* check corruption */ + if (op1 > opStart2) return ERROR(corruption_detected); + if (op2 > opStart3) return ERROR(corruption_detected); + if (op3 > opStart4) return ERROR(corruption_detected); + /* note : op4 supposed already verified within main loop */ + + /* finish bitStreams one by one */ + HUF_decodeStreamX4(op1, &bitD1, opStart2, dt, dtLog); + HUF_decodeStreamX4(op2, &bitD2, opStart3, dt, dtLog); + HUF_decodeStreamX4(op3, &bitD3, opStart4, dt, dtLog); + HUF_decodeStreamX4(op4, &bitD4, oend, dt, dtLog); + + /* check */ + endSignal = BIT_endOfDStream(&bitD1) & BIT_endOfDStream(&bitD2) & BIT_endOfDStream(&bitD3) & BIT_endOfDStream(&bitD4); + if (!endSignal) return ERROR(corruption_detected); + + /* decoded size */ + return dstSize; + } +} + + +static size_t HUF_decompress4X4 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize) +{ + HUF_CREATE_STATIC_DTABLEX4(DTable, HUF_MAX_TABLELOG); + const BYTE* ip = (const BYTE*) cSrc; + + size_t hSize = HUF_readDTableX4 (DTable, cSrc, cSrcSize); + if (HUF_isError(hSize)) return hSize; + if (hSize >= cSrcSize) return ERROR(srcSize_wrong); + ip += hSize; + cSrcSize -= hSize; + + return HUF_decompress4X4_usingDTable (dst, dstSize, ip, cSrcSize, DTable); +} + + +/**********************************/ +/* quad-symbol decoding */ +/**********************************/ +typedef struct { BYTE nbBits; BYTE nbBytes; } HUF_DDescX6; +typedef union { BYTE byte[4]; U32 sequence; } HUF_DSeqX6; + +/* recursive, up to level 3; may benefit from

q;_Tl*iLEN5h^v9K6jA++6)&QPrg%%o^r){THLF@t*i4#E!@4^waocVb$`s~ncQDaw z(F%XpOYu^x-^#OTr;W{4de}s?>v6Uv+YRF_P9I+I0%g*VuF3Qi-8&xFnsC^ub~tJ# z1{_k2!!6aVzA~hOiDh$vl%0Fg)cpMP>^>Wb2&#}O>$)=h;Lrq=pED(9BaoB`e2;_u zbB7O2Ee89|#&A+nEQi6Du3);bQg(|qZm+W?;I_I^R;)@g;LOqu(I!&J4eVF~9Ul{yF^r*yFeTx3xW%)MR@4kTnk~(*=~bt*wimNLK0ZFEdqZ*AOZV|`I;tGc zIoJzF*HLL>WMCF!zG2AWTc8}9Q6)CPiU~O~9!?Dy8?_Au8c&N4^QW<$lI4V_OXg?J zaBfD%^P!sOz}%R7hNt7EEerOGUV~dOHoBUIq~R16vSKp01@#iQf|;o?6#VE6MoH4C zZ!N3(nPGcjTWD^9Q}ctDh0(H>Xt}&n4Xg;Rjcln*js!CpWQeeuGrhvmrOwJ$E;=bO z^w{W#R({7wJ`M>`Eg0tGO@l|)c^cv9t;wEkvM{zuaXmlTGpOtx4-*r?!I?udi-8Q6 z?V4q;s?1(81)+Bh)SItJi+W(SU?edQ@h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gr%pr?8 zXZ%E;Lu`C96du+L;6)7#?fi2Hv+3xH>6glJK8bkvL8(>Mp0Hqip-FS{5=6m;YJ!4pR5UKYSJ&J0#g zl#Dzrhs+O)jmcdvZzm1S^P1UwlrFFnMPvEqn=~+-pe-2FkQ~cjVB)yrEjrksoWH>w zyT0l>8?nf6B;4$j4GGPCVFA13f(^N=JumA)H6J1Z@2u|){6`ix!#Hjo$q5TEk=KyZ zKoaX)i#%CVc_@28xNw;*K=S&Wze5(Wd3@6Z{6lg^5`gx+;Rc<1J$4Ag?t zcqH(xvmNB+G%d^=JW@Ej1Gj@46Ik}x%&ZA-R{Rh>p^q_*`&u>yEKq8_K{5w$G!_+m z84R(M>m!P+6YTDxk4GhZ5Kl-ts5o0~^_n7eKGlG*wIC2+o~|58`zq;8grG)pOK<)3 zmR*@5?}7y9)AuW%H22sni+As_sRez@!KWOn`cGSZa-4*vOCogJvgld(*wXr-q*{E! z>~l|k+J0x((U=!TuOR$$8O7H~q*`d&6>yX?7-S=%{mY9`pFZeguf@enn literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/pl.po b/cpp/third_party/xz-5.8.3/po/pl.po new file mode 100644 index 0000000000..4a74b938c7 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/pl.po @@ -0,0 +1,1266 @@ +# SPDX-License-Identifier: 0BSD +# +# Polish translation for xz. +# This file is published under the BSD Zero Clause License. +# Jakub Bogusz , 2011-2025. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-02-08 08:02+0100\n" +"Last-Translator: Jakub Bogusz \n" +"Language-Team: Polish \n" +"Language: pl\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=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Błędny argument dla --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Zbyt dużo argumentów dla --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "W --block-list brakuje rozmiaru bloku po numerze łańcucha filtrów „%c:”" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 w --block-list może być użyte wyłącznie jako ostatni element" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Nieznany typ formatu pliku" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Nieobsługiwany typ kontroli spójności" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Wraz z opcją „--files” lub „--files0” można podać tylko jeden plik." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Zmienna środowiskowa %s zawiera zbyt dużo argumentów" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Obsługa kompresji została wyłączona na etapie budowania" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Obsługa dekompresji została wyłączona na etapie budowania" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Kompresja plików lzip (.lz) nie jest obsługiwana" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list jest ignorowane poza kompresją do formatu .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Przy użyciu --format=raw i zapisie do pliku wymagana jest opcja --suffix=.ROZ" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Maksymalna liczba filtrów to cztery" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Błąd w opcji --filters%s=FILTRY:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Limit użycia pamięci jest zbyt mały dla podanej konfiguracji filtra." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "łańcuch filtrów %u użyty w --block-list, ale nie podany przez --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Używanie ustawień predefiniowanych w trybie surowym jest odradzane." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Dokładne opcje ustawień predefiniowanych mogą różnić się między wersjami oprogramowania." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Format .lzma obsługuje tylko filtr LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 nie może być używany z formatem .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Łańcuch filtrów %u jest niezgodny z --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Przełączanie w tryb jednowątkowy z powodu --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Nieobsługiwane opcje w łańcuchu filtrów %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Maksymalna liczba używanych wątków: %." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Nieobsługiwany łańcuch filtrów lub opcje filtra" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Dekompresja będzie wymagała %s MiB pamięci." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Zmniejszono liczbę wątków z %s do %s, aby nie przekroczyć limitu użycia pamięci %s MiB" + +#: src/xz/coder.c +#, 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 "Zmniejszono liczbę wątków z %s do jednego. Automatyczny limit użycia pamięci %s MiB jest nadal przekroczony - wymagane jest %s MiB. Kontynuacja mimo to." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Przełączenie w tryb jednowątkowy, aby nie przekroczyć limitu użycia pamięci %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB" +msgstr "Skorygowano rozmiar słownika LZMA%c z %s MiB do %s MiB aby nie przekroczyć limitu użycia pamięci %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Skorygowano rozmiar słownika LZMA%c dla --filters%u z %s MiB do %s MiB, aby nie przekroczyć limitu użycia pamięci %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Błąd podczas zmiany w łańcuchu filtrów %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Błąd tworzenia potoku: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() nie powiodło się: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Plik wygląda na przeniesiony, nie zostanie usunięty" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Nie można usunąć: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Nie można ustawić właściciela pliku: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Nie można ustawić grupy pliku: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Nie można ustawić uprawnień pliku: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Synchronizacja pliku nie powiodła się: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Synchronizacja katalogu z plikiem nie powiodła się: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wejścia: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Jest dowiązaniem symbolicznym, pominięto" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Jest katalogiem, pominięto" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Nie jest zwykłym plikiem, pominięto" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Plik ma ustawiony bit setuid lub setgid, pominięto" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Plik ma ustawiony bit sticky, pominięto" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Plik wejściowy ma więcej niż jedno dowiązanie zwykłe, pominięto" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Pusta nazwa pliku, pominięto" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Błąd podczas odtwarzania flag stanu dla standardowego wejścia: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wyjścia: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Otwarcie katalogu nie powiodło się: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Cel nie jest zwykłym plikiem" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Błąd podczas odtwarzania flagi O_APPEND dla standardowego wyjścia: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Zamknięcie pliku nie powiodło się: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Zmiana pozycji nie powiodła się podczas próby utworzenia pliku rzadkiego: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Błąd odczytu: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Błąd podczas zmiany pozycji w pliku: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Nieoczekiwany koniec pliku" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Błąd zapisu: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Wyłączony" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Rozmiar pamięci fizycznej (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Liczba wątków procesora:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Kompresja:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Dekompresja:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Dekompresja wielowątkowa:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Domyślnie dla -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Informacje o sprzęcie:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Limity użycia pamięci" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Strumienie:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Bloki:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Rozmiar spakowany:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Rozmiar rozpakowany:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Współczynnik:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Kontrola spójności:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Wyrównanie strumienia:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Wymagana pamięć:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Rozmiar w nagłówkach:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Liczba plików:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Strumień" + +#: src/xz/list.c +msgid "Block" +msgstr "Blok" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Bloki" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "Offset spak." + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "Offset rozp." + +#: src/xz/list.c +msgid "CompSize" +msgstr "Rozm.spak." + +#: src/xz/list.c +msgid "UncompSize" +msgstr "Rozm.rozp." + +#: src/xz/list.c +msgid "TotalSize" +msgstr "Rozm.całk." + +#: src/xz/list.c +msgid "Ratio" +msgstr "Wsp." + +#: src/xz/list.c +msgid "Check" +msgstr "Kontrola" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "S.kontr." + +#: src/xz/list.c +msgid "Padding" +msgstr "Wyrównanie" + +#: src/xz/list.c +msgid "Header" +msgstr "Nagłówek" + +#: src/xz/list.c +msgid "Flags" +msgstr "Flagi" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "Uż.pamięci" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtry" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Brak" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Nieznany-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Nieznany-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Nieznany-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Nieznany-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Nieznany-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Nieznany-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Nieznany-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Nieznany11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Nieznany12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Nieznany13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Nieznany14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Nieznany15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Plik jest pusty" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Za mały na poprawny plik .xz" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Strum. Bloki Spakowany Rozpakowany Wsp. Kontrola Nazwa pliku" + +#: src/xz/list.c +msgid "Yes" +msgstr "Tak" + +#: src/xz/list.c +msgid "No" +msgstr "Nie" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Minimalna wersja XZ Utils:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s plik\n" +msgstr[1] "%s pliki\n" +msgstr[2] "%s plików\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Sumarycznie:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list działa tylko z plikami .xz (--format=xz lub --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Proszę spróbować „lzmainfo” z plikami .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list nie obsługuje odczytu ze standardowego wejścia" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Błąd odczytu nazw plików: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Nieoczekiwany koniec wejścia podczas odczytu nazw plików" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Napotkano znak NUL podczas odczytu nazw plików; może miało być „--files0” zamiast „--files”?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Kompresja i dekompresja z opcją --robot nie jest jeszcze obsługiwana." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Nie można odczytać danych ze standardowego wejścia przy czytaniu nazw plików ze standardowego wejścia" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Błąd wewnętrzny" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Nie można ustawić obsługi sygnałów" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Brak kontroli spójności; poprawność plików nie będzie weryfikowana" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Nieobsługiwany typ kontroli spójności; poprawność plików nie będzie weryfikowana" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Osiągnięto limit użycia pamięci" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Nie rozpoznany format pliku" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Nieobsługiwane opcje" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Dane skompresowane są uszkodzone" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Nieoczekiwany koniec wejścia" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "Wymagane jest %s MiB pamięci. Limit jest wyłączony." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "Wymagane jest %s MiB pamięci. Limit to %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Łańcuch filtrów: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Polecenie „%s --help” pokaże więcej informacji." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Błąd podczas wypisywania tekstu pomocy (kod błędu %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Składnia: %s [OPCJA]... [PLIK]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Kompresja lub dekompresja PLIKÓW w formacie .xz." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Argumenty obowiązkowe dla opcji długich są obowiązkowe również dla opcji krótkich." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Tryb pracy:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "wymuszenie kompresji" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "wymuszenie dekompresji" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "sprawdzenie integralności plików skompresowanych" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "wypisanie informacji o plikach .xz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Modyfikatory operacji:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "zachowanie (nieusuwanie) plików wejściowych" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "nadpisywanie plików wyjściowych i (de)kompresja dowiązań" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "zapis na standardowe wyjście, nieusuwanie plików wejściowych" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "bez synchronizacji plików wyjściowych na urządzenie przechowujące przed usunięciem pliku wejściowego" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "dekompresja tylko pierwszego strumienia, ciche zignorowanie pozostałych danych wejściowych" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "nietworzenie plików rzadkich podczas dekompresji" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".ROZ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "użycie rozszerzenia „.ROZ” dla plików skompresowanych" + +#: src/xz/message.c +msgid "FILE" +msgstr "PLIK" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "odczyt nazw plików do przetworzenia z PLIKU; jeśli PLIK nie został podany, nazwy są czytane ze standardowego wejścia; muszą być zakończone znakiem nowej linii" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "podobnie do --files, ale znakiem kończącym musi być NUL" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Podstawowe opcje formatu pliku i kompresji:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMAT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "format pliku do kodowania lub dekodowania; możliwe to „auto” (domyślny), „xz”, „lzma”, „lzip” i „raw”" + +#: src/xz/message.c +msgid "NAME" +msgstr "NAZWA" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "typ kontroli spójności: „none” (ostrożnie!), „crc32”, „crc64” (domyślny) lub „sha256”" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "bez kontroli sprawdzania integralności przy dekompresji" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "predefiniowane opcje kompresji; domyślna to 6; przed użyciem wartości 7-9 należy wziąć pod uwagę wykorzystanie pamięci przy kompresji *oraz* dekompresji!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "próba poprawy współczynnika kompresji z użyciem większej ilości czasu procesora; nie wpływa na wymagania pamięciowe dekompresora" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "ILE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "użycie maksymalnie ILU wątków; domyślnie 0, co oznacza tyle, ile jest rdzeni procesorów" + +#: src/xz/message.c +msgid "SIZE" +msgstr "ROZMIAR" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "rozpoczęcie nowego bloku .xz co ROZMIAR bajtów wejścia; opcja służy do ustawienia rozmiaru bloku dla kompresji wielowątkowej" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOKI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "rozpoczęcie nowego bloku .xz po rozdzielonych przecinkiem przedziałach danych nieskompresowanych; opcjonalnie można podać numer łańcucha filtrów (0-9) ze znakiem „:” przed rozmiarem danych nieskompresowanych" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "przy kompresji, jeśli minęło więcej niż CZAS milisekund ostatniego zapisu bloku, a odczyt kolejnych danych byłby blokujący, wszystkie gotowe dane są zapisywane" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "LIMIT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "ustawienie limitu użycia pamięci dla kompresji, dekompresji, dekompresji wielowątkowej lub wszystkich; LIMIT jest w bajtach, % RAM lub 0 dla limitów domyślnych" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "jeśli ustawienia kompresji przekraczają limit użycia pamięci, zostanie zgłoszony błąd zamiast zmniejszania ustawień" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Łańcuch własnych filtrów do kompresji (alternatywa do używania ustawień predefiniowanych):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTRY" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "ustawienie łańcucha filtrów przy użyciu składni łańcucha filtrów liblzma; więcej informacji z opcją --filters-help" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "ustawienie dodatkowego łańcucha filtrów przy użyciu składni łańcucha filtrów liblzma do użycia w opcji --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "więcej informacji o składni lańcuchów filtrów libzma i zakończenie" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPCJE" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 lub LZMA2; OPCJE to oddzielona przecinkami lista zera lub większej liczby następujących opcji (wartości poprawne; domyślne):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "PRE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "ustawienie opcji na predefiniowaną" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "rozmiar słownika" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "liczba bitów kontekstu literału" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "liczba bitów pozycji literału" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "liczba bitów pozycji" + +#: src/xz/message.c +msgid "MODE" +msgstr "TRYB" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "tryb kompresji" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "długość dopasowania" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "dopasowywacz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "maksymalna głębokość szukania; 0=automatyczna (domyślne)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "Filtr BCJ x86 (32-bitowy lub 64-bitowy)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "Filtr BCJ ARM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "Filtr BCJ ARM-Thumb" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "Filtr BCJ ARM64" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "Filtr BCJ PowerPC (tylko big-endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "Filtr BCJ IA-64 (Itanium)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "Filtr BCJ SPARC" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "Filtr BCJ RISC-V" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Poprawne OPCJE dla wszystkich filtrów BCJ:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "offset początku konwersji (domyślnie=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Filtr delta; poprawne OPCJE (poprawne wartości; domyślne):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "odległość między bajtami odejmowanymi od siebie" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Inne opcje:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "pominięcie ostrzeżeń; dwukrotne podanie pomija też błędy" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "więcej informacji; dwukrotne podanie to jeszcze więcej" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "ustawienie, że ostrzeżenia nie mają wpływu na status zakończenia" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "komunikaty w formacie dla maszyny (przydatne do skryptów)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "wyświetlenie całkowitej ilości pamięci RAM oraz obecnie aktywnych limitów pamięci i zakończenie pracy" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "wyświetlenie krótkiego opisu (tylko podstawowe opcje)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "wyświetlenie tego długiego opisu i zakończenie" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "wyświetlenie tego krótkiego opisu i zakończenie" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "wyświetlenie długiego opisu (także opcje zaawansowane)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "wyświetlenie numeru wersji i zakończenie" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Jeśli nie podano PLIKU lub PLIK to -, czytane jest standardowe wejście." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Błędy prosimy zgłaszać na adres <%s> (w języku angielskim lub fińskim).\n" +"Błędy w tłumaczeniu prosimy zgłaszać na adres ." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "Strona domowa %s: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "TA WERSJA JEST ROZWOJOWA, NIE PRZEZNACZONA DO UŻYTKU PRODUKCYJNEGO." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Łańcuchy filtrów ustawia się przy użyciu --filters=FILTRY lub --filters1=FILTRY ... --filters9=FILTRY. Każdy filtr w łańcuchu może być rozdzielony spacjami lub „--”. Alternatywnie zamiast łańcucha filtrów można podać predefiniowane %s." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Obsługiwane filtry i ich opcje to:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Opcje muszą być parami „nazwa=wartość” rozdzielonymi przecinkami" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Błędna nazwa opcji" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Błędna wartość opcji" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Nieobsługiwane ustawienie predefiniowane LZMA1/LZMA2: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Suma lc i lp nie może przekroczyć 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Nazwa pliku ma nieznane rozszerzenie, pominięto" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Plik już ma rozszerzenie „%s”, pominięto" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Błędne rozszerzenie nazwy pliku" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Wartość nie jest nieujemną liczbą całkowitą" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Błędny przyrostek mnożnika" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Poprawne przyrostki to „KiB” (2^10), „MiB” (2^20) i „GiB” (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Wartość opcji „%s” musi być w przedziale [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Dane skompresowane nie mogą być czytane z terminala" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Dane skompresowane nie mogą być zapisywane na terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Składnia: %s [--help] [--version] [PLIK]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Wyświetlanie informacji zapisanych w nagłówku pliku .lzma." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Plik jest za mały, aby był plikiem .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "To nie jest plik .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Zapis na standardowe wyjście nie powiódł się" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Nieznany błąd" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Nieobsługiwane ustawienie predefiniowane" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Nieobsługiwana flaga w ustawieniu predefiniowanym" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Nieznana nazwa opcji" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Wartość opcji nie może być pusta" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Wartość spoza zakresu" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Ta opcja nie obsługuje żadnych przyrostków mnożników" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Błędny przyrostek mnożnika (KiB, MiB lub GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Nieznana nazwa filtra" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Ten filtr nie może być używany w formacie .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Nie udało się przydzielić pamięci" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Łańcuch pusty nie jest dozwolony, jeśli potrzebna jest wartość domyślna, proszę spróbować „6”" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Maksymalna liczba filtrów to cztery" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Brak nazwy filtra" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Błędny łańcuch filtrów (brak „lzma2” na końcu?)" diff --git a/cpp/third_party/xz-5.8.3/po/pt.gmo b/cpp/third_party/xz-5.8.3/po/pt.gmo new file mode 100644 index 0000000000000000000000000000000000000000..506bb9612066c31bccbbc3a532c88d01d59f379f GIT binary patch literal 28796 zcmb`P349$_eeWk^0}~(w$ig}iQ6wjp@D?YLV`9aTV-Z^tmYfX&8R?FsiSNC0bLU=f zkC#H(>0>QRN-1er3nfrqAcZ_0n|M$Pv;|tAg-0n+%GR=#t+deZ?|;rLSCSp4pWcs; zezTnY{I~Nz|M6GPIO$a<1VL~Lf7XLH-9HE-u3vU~5ZsUZho9;2Ja8RJzgL38;H$tb z;K#r-z+ZWM@L54{68GnVr-0{!j{t|jbHN=RV{m}`=Yx*}-v#!Af9dak3O<(mN1Po5 z7l50=CxA}}mG7nCL&5j@=br%AasP8r?VWcHWxx^eJTL_x1-=q|4EQG?O$2`dJ{tTM z7=kB0(&2gFBKKpU%D)rTI6n`LfZqZ&{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;Nc;_k&Whe-=Wo+I@7 zg5~O7>O{w(&Slhd#>;s*G{D@KqDLIzh9(oFfnJL7X!x{@2t2(M$DmMYHpKuVB= z^qL)slivqLxNWZ;0wDgXO$GU(`)W>?-T-{fn&R)-r>+`*zsfqwy_*N(BgiCy2iH0xfj`P!VM&;Ha5<~e zMCMg-cxz1Av-D(brU&FM#)1sm`trT>|8nfR(f|nDmY1qnBi2mace@8;7wfs6Z8EF&7qoqZ_y$en+% zAW?`P%WF`E;dPR0!K%y`uO|w{RkVCMCBXfJ740Gom$%A*3!~bIA-BK^9W2$2ThF|) z%>7Y(rRA3dW`&@kyn!o|yW6O6;tG}JJ}j^U42c^)z2&O{Z(>#lTImrBm=R=7zg!@# zAH024VE&pFqQ!q+;7(PYxI4BH&W_n-&TT%X!Tgbd)PsrE(lDUkxmeY_TS-m{e3)D# zW)I+wwiMx~c-tOBJtsLM7@S}(PK?hG_{Lh4pG#!_JucrU(HE*HSjncXV3xEUNJX$6 z%THT$rr>GeXq$o!_GPSslWi_N=THw{qp%hT3V#H^@XVH+tH-Vvxg>PH`bD<5YF-}Q zranr*_=^-^K^*phScfo(DEh^DB5e&W-NP}NYqIja0;Lr*;-Yi)xq?MC<}++(w0?@S z0GlkI@wTY52tu_%^SJ{5l`dyvNHc=T`JNQ>kM@wavz1q?Q+9e{(;r(2l(hG|Yps^l1pr9mM zOw9-jQ0hWulOxcro1?|669M*c6E@$MG>GXqTKh0uQppMP1Bf2Qs}t3pxOw{FM! X^qjA(ZtV3|cruU^^u9U-tg`, 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.8.0-pre1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-03-16 17:37+0000\n" +"Last-Translator: Pedro Albuquerque \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.5\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: argumento inválido para --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: demasiados argumentos para --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "Em --block-list, falta o tamanho do bloco após filtrar o número da cadeia \"%c:\"" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 só pode ser usado como o último elemento em --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: tipo de formato de ficheiro desconhecido" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: tipo de verificação de integridade não suportado" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Só pode especificar um ficheiro com \"--files\" ou \"--files0\"." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "A variável de ambiente %s contém demasiados argumentos" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "O suporte a compressão foi desactivado ao compilar" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "O suporte a descompressão foi desactivado ao compilar" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "A compressão de ficheiros lzip (.lz) não é suportada" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list é ignorado a não ser que comprima para formato .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Com --format=raw, --suffix=.SUF é requerido, a menos que seja escrito em stdout" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "O número máximo de filtros é quatro" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Erro na opção --filters%s=FILTERS:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "O limite de uso de memória é baixo demais para a configuração de filtro dada." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "cadeia de filtro %u usada por --block-list mas não especificada com --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "O uso de uma predefinição em modo bruto é desencorajado." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "As opções exactas de predefinições podem variar entre versões do programa." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "O formato .lzma tem só suporta o filtro LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "Impossível utilizar LZMA1 com o formato .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "A cadeia de filtragem %u é incompatível com --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "A mudar para o modo de linha única devido a --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Opções não suportadas na cadeia de filtragem %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "A usar até % linhas." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Opções de filtro ou cadeia de filtros não suportadas" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "A descompressão precisará de %s MiB de memória." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Número de linhas reduzido de %s de %s para não exceder o limite de uso de memória de %s MiB" + +#: src/xz/coder.c +#, 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 "Número de linhas reduzido de %s para uma. O limite automático de utilização de memória de %s MiB ainda continua excedido. Necessita de %s MiB. A continuar mesmo assim." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "A mudar para o modo de linha única para não exceder o limite de uso de memória de %s MiB" + +#: src/xz/coder.c +#, 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 "Ajustado o tamanho de dicionário de LZMA%c de %s MiB para %s MiB para não exceder o limite de uso de memória de %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Ajustado o tamanho de dicionário de LZMA%c para --filters%u de %s MiB para %s MiB para não exceder o limite de uso de memória de %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Erro ao mudar para a cadeia de filtragem %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Erro ao criar um túnel: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() falhou: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: o ficheiro parece ter sido movido, não será eliminado" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: impossível remover: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: impossível definir o proprietário do ficheiro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: impossível definir o grupo do ficheiro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: impossível definir as permissões do ficheiro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: falha ao sincronizar o ficheiro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: falha ao sincronizar a pasta do ficheiro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Erro ao obter as bandeiras de estado da entrada padrão: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: é uma ligação simbólica, a ignorar" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: é uma pasta, a ignorar" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: não é um ficheiro normal, a ignorar" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: o ficheiro tem o bit setuid ou setgid definido, a ignorar" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: o ficheiro tem o bit sticky definido, a ignorar" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: o ficheiro de entrada tem mais de uma ligação absoluta, a ignorar" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Nome de ficheiro vazio, a ignorar" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Erro ao restaurar as bandeiras de estado para a entrada padrão: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Erro ao obter as bandeiras de estado do ficheiro da saída padrão: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: falha ao abrir a pasta: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: o destino não é um ficheiro normal" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Erro ao restaurar a bandeira O_APPEND para a saída padrão: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: falha ao fechar o ficheiro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: falha na procura ao tentar criar um ficheiro escasso: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: erro de leitura: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: erro ao procurar o ficheiro: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: fim de ficheiro inesperado" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: erro de escrita: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Desactivado" + +# Espaços adicionados para manter alinhamento com mensagens adjacentes -- Rafael +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Total de memória física (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Número de linhas do processador:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Compressão:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Descompressão:" + +# Espaços reduzidos para manter alinhamento com mensagens adjacentes -- Rafael +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Descompressão multi-linha:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Pré-definição para -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Informação do equipamento:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Limites de uso de memória:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Fluxos:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blocos:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Tamanho comprimido:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Tamanho descomprimido:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Proporção:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Verificar:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Espaço do fluxo:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Memória requerida:" + +# Espaço adicionado para promover alinhamento, vide "xz -lvv foo.xz" +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Tamanho em cabeçalhos:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Número de ficheiros:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Fluxo" + +#: src/xz/list.c +msgid "Block" +msgstr "Bloco" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blocos" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "DesvComp" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "DesvDescomp" + +#: src/xz/list.c +msgid "CompSize" +msgstr "TamComp" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "TamDescomp" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "Total" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Proporção" + +#: src/xz/list.c +msgid "Check" +msgstr "Verificar" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "ValVerif" + +#: src/xz/list.c +msgid "Padding" +msgstr "Espaço" + +#: src/xz/list.c +msgid "Header" +msgstr "Cabeçalho" + +#: src/xz/list.c +msgid "Flags" +msgstr "Bandeiras" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "UsoMem" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtros" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Nenhum" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "SemNome-2" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-3" +msgstr "SemNome-3" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-5" +msgstr "SemNome-5" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-6" +msgstr "SemNome-6" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-7" +msgstr "SemNome-7" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-8" +msgstr "SemNome-8" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-9" +msgstr "SemNome-9" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-11" +msgstr "SemNome-11" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-12" +msgstr "SemNome-12" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-13" +msgstr "SemNome-13" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-14" +msgstr "SemNome-14" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-15" +msgstr "SemNome-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: o ficheiro está vazio" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: muito pequeno para um ficheiro .xz válido" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Fluxos Blocos Comprimido Descomprimido Rácio Verif. Nome de ficheiro" + +#: src/xz/list.c +msgid "Yes" +msgstr "Sim" + +#: src/xz/list.c +msgid "No" +msgstr "Não" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Versão mínima do XZ Utils:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s ficheiro\n" +msgstr[1] "%s ficheiros\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Totais:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list só funciona em ficheiros .xz (--format=xz ou --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Tentar \"lzmainfo\" com ficheiros .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list não suporta a leitura da entrada padrão" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: erro ao ler nomes de ficheiro: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: fim de entrada inesperado ao ler nomes de ficheiros" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: encontrado carácter nulo ao ler nomes de ficheiro; talvez queira usar \"--files0\" em vez de \"--files\"?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Compressão e descompressão com --robot ainda não são suportadas." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Impossível ler dados da entrada padrão ao ler nomes de ficheiro da entrada padrão" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Erro interno (erro)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Impossível estabelecer gestores de sinais" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Sem teste de integridade; a integridade do ficheiro não será verificada" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Tipo de verificação de integridade não suportada; a integridade do ficheiro não será verificada" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Limite de uso de memória alcançado" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Formato de ficheiro não reconhecido" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Opções não suportadas" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Os dados comprimidos estão corrompidos" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Fim de entrada inesperado" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "São necessários %s MiB de memória. O limitador está desactivado." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "São necessários %s MiB de memória. O limite é %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: cadeia de filtros: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Tente \"%s --help\" para mais informações." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Erro ao imprimir o texto de ajuda (erro: %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Uso: %s [OPÇÃO]... FICHEIRO...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Comprimir ou descomprimir FICHEIROs no formato .xz." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Argumentos obrigatórios para opções longas são também obrigatórios para opções curtas." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Modo de operação:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "forçar compressão" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "forçar descompressão" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "testar integridade do ficheiro comprimido" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "listar informação sobre ficheiros .xz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Modificadores de operação:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "manter (não eliminar) ficheiros de entrada" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "forçar substituição de ficheiros de saída e ligações de (des)compressão" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "escrever na saída padrão e não eliminar ficheiros de entrada" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "não sincronizar o ficheiro de saída com o dispositivo de armazenamento antes de remover o ficheiro de entrada" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "descomprimir só o primeiro fluxo e ignoras silenciosamente possíveis dados de entrada restantes" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "não criar ficheiros esparsos ao descomprimir" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "usar o sufixo \".SUF\" em ficheiros comprimidos" + +#: src/xz/message.c +msgid "FILE" +msgstr "FICH" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "ler nomes de ficheiro a processar de FICH; se FICH for omitido, os nomes serão lidos da entrada padrão; os nomes de ficheiro devem terminar com o carácter de nova linha" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "como --files, mas usa o carácter nulo como terminador" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Opções básicas de formato e compressão de ficheiro:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMATO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "formato de ficheiro a codificar/descodificar; os valores possíveis são \"auto\" (pré-definição), \"xz\", \"lzma\", \"lzip\", e \"raw\"" + +#: src/xz/message.c +msgid "NAME" +msgstr "NOME" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "tipo de teste de integridade: 'none' (use com cautela), 'crc32', 'crc64' (pré-definição), ou 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "não verificar a integridade ao descomprimir" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "pré-definição de compressão; a pré-definição é 6; ter em conta o uso de memória do compressor *e* descompressor antes de usar 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "tentar melhorar o rácio de compressão usando mais tempo de CPU; não afecta os requisitos de memória do descompressor" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "NÚM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "usa no máximo NÚM linhas; a pré-definição é 1; defina para 0 para usar tantas linhas como núcleos de processadores haja" + +#: src/xz/message.c +msgid "SIZE" +msgstr "TAMANHO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "iniciar novo bloco .xz após cada TAM bytes de entrada; use para definir o tamanho de bloco para compressão com linhas" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOCOS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "iniciar um bloco .xz após os intervalos de dados descomprimidos indicados, separados por vírgulas; optionalmente, especifique umnúmero de cadeia de filtro (0-9) seguido de ':' antes do tamanho descomprimido" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "ao comprimir, se mais de NÚM milissegundos tiverem passado desde o despejo anterior e ler mais dados daentrada bloquearia, todos os dados pendentes serão despejados" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "LIMITE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "definir limite de uso da memória para compressão, decompressão, descompressão em linhas, ou todos; LIMITE em bytes, % de RAM, ou 0 para pré-definições" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "se as configurações de compressão excederem o limite de uso de memória, devolve um erro em vez de reduzir as configurações" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Cadeia de filtragem personalizada para compressão (alternativa às pré-definições):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTROS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "definir a cadeia de filtros usando a sintaxe da cadeia de filtragem liblzma; use --filters-help para mais informação" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "definir cadeias de filtros adicionais usando a sintaxe da cadeia de filtragem liblzma com --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "mostrar mais informação sobre a sintaxe da cadeia de filtragem liblzma e sair" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPÇS" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 ou LZMA2; OPÇS é uma lista separada por vírgulas de zero ou mais das seguintes opções (valores válidos; pré-definição):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "PRE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "repor opções numa pré-definição" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "tamanho do dicionário" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "número de bits de contexto literais" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "número de bits de posição literais" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "número de bits de posição" + +#: src/xz/message.c +msgid "MODE" +msgstr "MODO" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "modo de compressão" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "tamanho simpático duma correspondência" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "localizador de correspondências" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "profundidade máxima de procura; 0=automática (pré-definição)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "filtro x86 BCJ (32-bit e 64-bit)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "filtro ARM BCJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "filtro ARM-Thumb BCJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "filtro ARM64 BCJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "Filtro PowerPC BCJ (só big endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "filtro IA-64 (Itanium) BCJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "Filtro SPARC BCJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "Filtro RISC-V BCJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "OPÇS válidas para todos os filtros BCJ:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "desvio inicial para conversões (pré-definição=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Filtro Delta; OPTS válidas (valores válidos; pré-definição):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "distância entre bytes subtraídos uns dos outros" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Outras opções:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "suprimir avisos; especificar duas vezes para suprimir também os erros" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "ser verboso; especificar duas vezes para ainda mais detalhes" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "fazer avisos não afecta o estado da saída" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "usar mensagens analisáveis por máquina (útil para scripts)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "mostra a quantidade total de RAM e os limites de uso de memória actualmente activos e sai" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "mostrar a ajuda curta (lista só as opções básicas)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "mostrar a ajuda longa e sair" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "mostrar esta ajuda curta e sair" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "mostrar a ajuda longa (lista também as opções avançadas)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "mostrar o número da versão e sai" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Sem FICH, ou quando FICH é -, lê da entrada padrão." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Relatar erros em <%s> (em inglês ou finlandês)." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "Página inicial %s: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ESTA É UMA VERSÃO DE DESENVOLVIMENTO NÃO DESTINADA A USO EM PRODUÇÃO." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "As cadeias de filtragem são definidas com --filters=FILTERS ou --filters1=FILTERS ... --filters9=FILTERS. Cada filtro na cadeia pode ser separado por espaços ou '--'. Como alternativa, pode especificar uma pré-definição %s em vez da cadeia de filtragem." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Os filtros suportados e respectivas opções são:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "As opções devem ser pares \"nome=valor\" separados por vírgulas" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: nome de opção inválido" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Valor de opção inválido" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Predefinição LZMA1/LZMA2 não suportada: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "A soma de lc e lp não deve exceder 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: nome de ficheiro com sufixo desconhecido, a ignorar" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: o ficheiro já tem o sufixo \"%s\", a ignorar" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: sufixo de nome de ficheiro inválido" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "O valor não é um inteiro decimal não-negativo" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: sufixo multiplicador inválido" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Sufixos válidos são \"KiB\" (2^10), \"MiB\" (2^20) e \"GiB\" (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "O valor da opção \"%s\" deve estar no intervalo [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Dados comprimidos não podem ser lidos de um terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Dados comprimidos não podem ser escritos num terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Uso: %s [--help] [--version] [FICH]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Mostrar informação no cabeçalho do ficheiro .lzma." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "O ficheiro é muito pequeno para um ficheiro .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Não é um ficheiro .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "A escrita para a saída padrão falhou" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Erro desconhecido" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Pré-definição não suportada" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Bandeira não suportada na pré-definição" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Nome de opção desconhecido" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "O valor da opção não pode estar vazio" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Valor fora do intervalo" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Esta opção não suporta sufixos de multiplicação" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Sufixo multiplicador inválido (KiB, MiB, ou GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Nome de filtro desconhecido" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Impossível utilizar este filtro com o formato .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Falha ao alocar memória" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Não são permitidas cadeias vazias, tente \"6\" se precisa de uma pré-definição" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "O número máximo de filtros é quatro" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Nome de filtro em falta" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Cadeia de filtragem inválida ('lzma2' em falta no fim?)" diff --git a/cpp/third_party/xz-5.8.3/po/pt_BR.gmo b/cpp/third_party/xz-5.8.3/po/pt_BR.gmo new file mode 100644 index 0000000000000000000000000000000000000000..82858f7617876e6fbcea8675aacd016043573bf1 GIT binary patch literal 15660 zcmb`NdvG0BeaDx?JYqtC5D2fpse+K*=qj@8IF1|}%eIuL*pjeh1EEg5x_2dQeDB?x z-Mg~ohC(5b@M;pCg~GHB?SzzO=rqH?z_gu?+AtKzwDgab4u!TuQ#viv2h%bz%+SyG zoU`}tmE;%G9i98#$9ewV=Xdm-t2ce*89@+yf-+1Ao*4vx4gBR5L2w!P%I7&81b0w$ zeG(i3KLzdtzYbmvUVc>&Yyw{bJ_~#W_+qdR`~`5A$2-6Qp6>-;4gQYDKLcOI^Y_4C z1TTMn5Znk3f&Ji};0wX~{QHlBgFHV8YMdW}JHRVm5CpFQ_kyngtKfCu+rVqVPl2xl zKMxx4n;w4%F7bQ~gJ?Z(1xLY$z}JFb1J&<;gD(fKrP2sE0;<0V)c1FQF9IJ0HLov& zw}O8KZU?X8;~sE7DEhq}Y=d6_YvABDZe9#A4RJ~mc zrh0q9=YZqjW^l?szZo3jc^GU^{uE^C!MDLN@CV>9c;ic4{S)AoJUud>*v)1b6X#Esb`9Goa>mKdA4I zfIGmifLi}gL9KTaoif#6GpKbNZ~`0vAxY2#w}9^iC4avUYJN|Fn)ly;w}4NB8qe^f zcDq5z%M2(TXo6bzJ>Vwr5m4)W)Z-UH@&Bu!*7Y=~d0vn3X`VNLn%_3?4saLv2>2lo zQ3`g_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RiVKO3p)E>dD3&VBf?sjMYi%A^CM}jT8ZqVn;H)2iFNa-oB&Y@NuG^pH5s5h~%PS zdiJl2&zU`&p`|~YvB8P)GHXK>V=Q-!vEdE%3TNf5T`(q})U*?{EYP-{(U`2`6VY;0 zB!R=s59QFOwWjQ%JJBBc=V0>q?Ch9fhkNw!m_4&uedjdiIQ-3yPaT^+bd1E`)ZFx- znQ|Xy=O(Ad4vv|bu_I%g-%OkF!|p_9^?oW0VPHDu%AQ8A-JZA|2TsQu5u3@!*6S2! z^{mob&>(Eg$5xAw6m5@JAJY!S{W~2TarP+~!{ll|FJm5^=6_i9MLBhsXz^d9eHafN z5|M&qs~yRbWJPkSIO9=dmT_pPE;!lYr{$E5~tCo&;WE{QqVwWb`7U8s) zNex%JwZW^Ehr-C#B;wj(cQ=OJJ+yO7HJRkXX-_t*t55Jx2knIOp3=ie`C)tcVMqDl zrqV;XNx4P2&dyT(n@jh*O82+OGIrRD=`J4xmGfJ)g$eY14*|gWQY4@N%LcISUsw8b pPMnTR=G#Xs?BpPosD9D-6Trg5U;6nShj+(&`QPp9(ivcT`#+F=Jx2fl literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/pt_BR.po b/cpp/third_party/xz-5.8.3/po/pt_BR.po new file mode 100644 index 0000000000..07b3d73adc --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/pt_BR.po @@ -0,0 +1,1683 @@ +# SPDX-License-Identifier: 0BSD +# +# Brazilian Portuguese translations for xz package +# Traduções em português brasileiro para o pacote xz. +# This file is published under the BSD Zero Clause License. +# Rafael Fontenelle , 2019-2024. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.6.0-pre2\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2024-09-22 23:10-0300\n" +"Last-Translator: Rafael Fontenelle \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\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=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 46.1\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Argumento inválido para --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Argumentos demais para --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "Em --block-list, está faltando o tamanho do bloco após o número da cadeia de filtros \"%c:\"" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 só pode ser usado como o último elemento em --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Tipo de formato de arquivo desconhecido" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Tipo de verificação de integridade sem suporte" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Somente um arquivo pode ser especificado com \"--files\" ou \"--files0\"." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "A variável de ambiente %s contém argumentos demais" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Suporte a compressão foi desabilitado em tempo de compilação" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Suporte a descompressão foi desabilitado em tempo de compilação" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "A compactação de arquivos lzip (.lz) não é suportada" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list é ignorado a menos que seja compactado para o formato .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Com --format=raw, --suffix=.SUF é exigido, a menos que esteja escrevendo para stdout" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "O número máximo de filtros é quatro" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Erro na opção --filters%s=FILTROS:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "O limite de uso de memória é baixo demais para a configuração de filtro dada." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "cadeia de filtros %u usada por --block-list, mas não especificada com --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "O uso de uma predefinição em modo bruto é desencorajado." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "As opções exatas de predefinições podem variar entre versões do software." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "O formato .lzma possui suporte apenas ao filtro LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 não pode ser usado com o formato .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "A cadeia de filtros %u é incompatível com --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Alternando para o modo de thread única por causa de --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Opções sem suporte na cadeia de filtros %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Usando até % threads." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Opções de filtro ou cadeia de filtros sem suporte" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "A descompressão precisará de %s MiB de memória." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %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 +#, 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 "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 +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %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 +#, 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 "Ajustado o tamanho de dicionário de LZMA%c de %s MiB para %s MiB para não exceder o limite de uso de memória de %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Tamanho do dicionário LZMA%c ajustado para --filters%u de %s MiB para %s MiB para não exceder o limite de uso de memória de %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Erro ao alterar para a cadeia de filtros %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Erro ao criar um pipe: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() falhou: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: O arquivo parece ter sido movido, não será removido" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Não foi possível remover: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Não foi possível definir o dono do arquivo: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Não foi possível definir o grupo do arquivo: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Não foi possível definir as permissões do arquivo: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Fechamento do arquivo falhou: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Fechamento do arquivo falhou: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Erro ao obter os sinalizadores de status da entrada padrão: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: É um link simbólico, ignorando" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: É um diretório, ignorando" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Não é um arquivo comum, ignorando" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: O arquivo possui o bit setuid ou setgid definido, ignorando" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: O arquivo possui o bit sticky definido, ignorando" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: O arquivo de entrada possui mais de um link físico, ignorando" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Nome de arquivo vazio, ignorando" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Erro ao restaurar os sinalizadores de status para entrada padrão: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Erro ao obter os sinalizadores de status de arquivo da saída padrão: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Fechamento do arquivo falhou: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s: Não é um arquivo comum, ignorando" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Erro ao restaurar o sinalizador O_APPEND para a saída padrão: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Fechamento do arquivo falhou: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Busca falhou ao tentar criar um arquivo esparso: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Erro de leitura: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Erro ao buscar o arquivo: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Fim de arquivo inesperado" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Erro de escrita: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Desabilitado" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Quantidade total de memória física (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Número de threads de processador:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Compactação:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Descompactação:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Descompactação com várias threads:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Padrão para -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Informações de hardware:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Memory usage limits:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Fluxos:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blocos:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Tamanho compactado:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Tamanho não compactado:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Proporção:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Verificação:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Ajuste do fluxo:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Memória exigida:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Tamanhos nos cabeçalhos:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Número de arquivos:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Fluxo" + +#: src/xz/list.c +msgid "Block" +msgstr "Bloco" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blocos" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "DeslocComp" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "DeslocDescomp" + +#: src/xz/list.c +msgid "CompSize" +msgstr "TamComp" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "TamDescomp" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "TamTotal" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Proporção" + +#: src/xz/list.c +msgid "Check" +msgstr "Verificação" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "ValorVerific." + +#: src/xz/list.c +msgid "Padding" +msgstr "Preench." + +#: src/xz/list.c +msgid "Header" +msgstr "Cabeçalho" + +#: src/xz/list.c +msgid "Flags" +msgstr "Sinalizadores" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "UsoMem" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtros" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Nenhuma" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Incógnito2" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Incógnito3" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Incógnito5" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Incógnito6" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Incógnito7" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Incógnito8" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Incógnito9" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Incógnito11" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Incógnito12" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Incógnito13" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Incógnito14" + +# Não exceder 10 caracteres e espaços não são permitidos -- Rafael +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Incógnito15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: O arquivo está vazio" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Pequeno demais para ser um arquivo .xz válido" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Fluxos Blocos Comprimido Descomprimid Propo Verif Nome de Arquivo" + +#: src/xz/list.c +msgid "Yes" +msgstr "Sim" + +#: src/xz/list.c +msgid "No" +msgstr "Não" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +msgstr " Versão mínima do 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s arquivo\n" +msgstr[1] "%s arquivos\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Totais:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list funciona apenas em arquivos .xz (--format=xz ou --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Tente 'lzmainfo' com arquivos .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list não possui suporte a leitura da entrada padrão" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Erro ao ler nomes de arquivo: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Fim da entrada inesperado ao ler nomes de arquivos" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Caractere nulo encontrado ao ler nomes de arquivos; talvez você queria usar \"--files0\" em vez de \"--files\"?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Ainda não há suporte a compressão e descompressão com --robot." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Não é possível ler dados da entrada padrão ao ler nomes de arquivos da entrada padrão" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Erro interno (bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Não foi possível estabelecer manipuladores de sinais" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Sem verificação de integridade; não será verificada a integridade do arquivo" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Tipo de verificação de integridade sem suporte; não será verificada a integridade do arquivo" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Limite de uso de memória alcançado" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Formato de arquivo não reconhecido" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Opções sem suporte" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Os dados comprimidos estão corrompidos" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Fim da entrada inesperado" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB de memória é necessário. O limitador está desabilitado." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB de memória é necessário. O limite é %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Cadeia de filtros: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Tente \"%s --help\" para mais informações." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"Uso: %s [OPÇÕES]... [ARQUIVO]...\n" +"Comprime e descomprime ARQUIVOs no formato .xz.\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Argumentos obrigatórios para opções longas também o são para opções curtas.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " Modo de operação:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force compression" +msgstr "Descompactação:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force decompression" +msgstr "Descompactação:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +" Modificadores de opções:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "A escrita para a saída padrão falhou" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --single-stream decompress only the first stream, and silently\n" +#| " ignore possible remaining input data" +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" +" --single-stream descomprime apenas o primeiro fluxo, e ignora de forma\n" +" silenciosa possíveis dados de entrada restantes" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +" Opções básicas de formato de arquivo e compressão:\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --ignore-check don't verify the integrity check when decompressing" +msgid "don't verify the integrity check when decompressing" +msgstr " --ignore-check não faz a verificação de integridade ao descomprimir" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 ... -9 predefinição de compressão; padrão é 6; leve o uso de\n" +" memória do compressor *e* descompressor em conta\n" +" antes de usar 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme tenta melhorar a proporção de compressão usando mais\n" +" tempo de CPU; não afeta os requisitos de memória do\n" +" descompressor" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n" +#| " as many threads as there are processor cores" +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +" -T, --threads=NÚM usa no máximo NÚM threads; o padrão é 0 que usa\n" +" o máximo de threads que há de núcleos de processador" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-size=SIZE\n" +#| " start a new .xz block after every SIZE bytes of input;\n" +#| " use this to set the block size for threaded compression" +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" +" --block-size=TAM\n" +" inicia novo bloco .xz após cada TAM bytes de entrada;\n" +" use isso para definido o tamanho de bloco para\n" +" compressão com threads" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-list=BLOCKS\n" +#| " start a new .xz block after the given comma-separated\n" +#| " intervals of uncompressed data; optionally, specify a\n" +#| " filter chain number (0-9) followed by a ':' before the\n" +#| " uncompressed data size" +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" +" --block-list=BLOCOS\n" +" inicia um novo bloco .xz após os intervalos dados,\n" +" separados por vírgula, de dados descomprimidos;\n" +" opcionalmente, especifique um número de cadeia de\n" +" filtros (0-9) seguido por um ':' antes do tamanho\n" +" dos dados descompactados" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --flush-timeout=TIMEOUT\n" +#| " when compressing, if more than TIMEOUT milliseconds has\n" +#| " passed since the previous flush and reading more input\n" +#| " would block, all pending data is flushed out" +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" +" --flush-timeout=TEMPO-LIMITE\n" +" ao comprimir, se mais de TEMPO-LIMITE milissegundos\n" +" tiverem passado desde a liberação anterior e a leitura\n" +" de mais entrada bloquearia, todos os dados pendentes\n" +" serão liberados" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" +" --no-adjust se configurações de compressão exceder o limite\n" +" de uso de memória, fornece um erro em vez de\n" +" ajustar as configurações para baixo" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +" Cadeia de filtros personalizada para compressão (alternativa à predefinição):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " --filters=FILTERS set the filter chain using the liblzma filter string\n" +#| " syntax; use --filters-help for more information" +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" +"\n" +" --filters=FILTROS define a cadeia de filtros usando a sintaxe de filtro\n" +" do liblzma; use --filters-help para mais informações" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters1=FILTERS ... --filters9=FILTERS\n" +#| " set additional filter chains using the liblzma filter\n" +#| " string syntax to use with --block-list" +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" +"--filters1=FILTROS ... --filters9=FILTROS\n" +" define cadeias de filtros adicionais usando a sintaxe\n" +" de filtro liblzma para usar com --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters-help display more information about the liblzma filter string\n" +#| " syntax and exit." +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" +" --filters-help exibe mais informações sobre a sintaxe de filtro liblzma\n" +" e sai." + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Number of processor threads:" +msgid "number of position bits" +msgstr "Número de threads de processador:" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "compression mode" +msgstr "Descompactação:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" Outras opções:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr " -Q, --no-warn faz os avisos não afetarem o status de saída" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr " --robot usa mensagens analisáveis por máquina (útil p/ scripts)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" +" --info-memory exibe a quantidade total de RAM e os limites de uso\n" +" de memória atualmente ativos e sai" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version exibe o número de versão e sai" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"Sem ARQUIVO, ou quando ARQUIVO é -, lê da entrada padrão.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Relate erros para <%s> (em inglês ou finlandês).\n" +"Relate erros de tradução para .\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "Site do %s: <%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ESSA É UMA VERSÃO DE DESENVOLVIMENTO, NÃO DESTINADA PARA USO EM PRODUÇÃO." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy, c-format +#| 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" +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" +"As cadeias de filtros são definidas usando as opções --filters=FILTROS ou\n" +"--filters1=FILTROS ... --filters9=FILTROS. Cada filtro na cadeia pode ser\n" +"separado por espaços ou \"--\". Alternativamente, uma predefinição <0-9>[e]\n" +"pode ser especificada em vez de uma cadeia de filtros.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Os filtros suportados e suas opções são:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be 'name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: As opções devem ser pares \"nome=valor\" separados por vírgulas" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Nome de opção inválido" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s: Valor de opção inválido" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Predefinição LZMA1/LZMA2 sem suporte: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "A soma de lc e lp não deve exceder 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: O nome de arquivo tem um sufixo desconhecido, ignorando" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: O arquivo já tem o sufixo \"%s\", ignorando" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Sufixo de nome de arquivo inválido" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s: O valor não é um inteiro integral decimal" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Sufixo multiplicador inválido" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Sufixos válidos são \"KiB\" (2^10), \"MiB\" (2^20) e \"GiB\" (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "O valor da opção \"%s\" deve estar no intervalo [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Dados comprimidos não podem ser lidos de um terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Dados comprimidos não podem ser escrito para um terminal" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" +"Uso: %s [--help] [--version] [ARQUIVO]...\n" +"Mostra informações armazenadas no cabeçalho do arquivo .lzma" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Show information stored in the .lzma file header." +msgstr "" +"Uso: %s [--help] [--version] [ARQUIVO]...\n" +"Mostra informações armazenadas no cabeçalho do arquivo .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Arquivo é pequeno demais para ser um arquivo .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Não é um arquivo .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "A escrita para a saída padrão falhou" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Erro desconhecido" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Opções sem suporte" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Opções de filtro ou cadeia de filtros sem suporte" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s: Nome de opção inválido" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s: Sufixo multiplicador inválido" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s: Tipo de formato de arquivo desconhecido" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "LZMA1 não pode ser usado com o formato .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "O número máximo de filtros é quatro" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress força a compressão\n" +#~ " -d, --decompress força a descompressão\n" +#~ " -t, --test testa a integridade do arquivo comprimido\n" +#~ " -l, --list lista informações sobre arquivos .xz" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep mantém (não exclui) os arquivos de entrada\n" +#~ " -f, --force força a sobrescrita do arquivo de entrada e a \n" +#~ " (des)compressão de links\n" +#~ " -c, --stdout escreve a entrada padrão e não exclui os arquivos\n" +#~ " de entrada" + +#~ 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" +#~ msgstr "" +#~ " --no-sparse não cria arquivos esparsos ao descomprimir\n" +#~ " -S, --suffix=.SUF usa o sufixo \".SUF\" em arquivos comprimidos\n" +#~ " --files[=ARQUIVO]\n" +#~ " lê nomes de arquivos para processar de ARQUIVO;\n" +#~ " se ARQUIVO for omitido, nomes de arquivos são\n" +#~ " lidos da entrada padrão; nomes de arquivos devem\n" +#~ " terminar com o caractere de nova linha\n" +#~ " --files0[=ARQUIVO]\n" +#~ " similar a --files, mas usa o caractere nulo como\n" +#~ " terminador" + +#~ 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'" +#~ msgstr "" +#~ " -F, --format=FMT formato de arquivo para codificar ou decodificar;\n" +#~ " valores possíveis são\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\"" + +#, no-c-format +#~ msgid "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ 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, compactação em threads ou todas essas;\n" +#~ " LIMITE é em bytes, % de RAM ou 0 para padrões" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ "--lzma1[=OPÇÕES] LZMA1/LZMA2; OPÇÕES é uma lista separada por vírgula de\n" +#~ "--lzma2[=OPÇÕES] zero ou + das opções abaixo (valores válidos, padrão):\n" +#~ " preset=PRE redefine opções para predefinição (0-9[e])\n" +#~ " dict=NÚM tam. de dicionário (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NÚM núm. de bits de contexto literal (0-4; 3)\n" +#~ " lp=NÚM núm. de bits de posição literal (0-4; 0)\n" +#~ " pb=NÚM núm. de bits de posição (0-4; 2)\n" +#~ " mode=MODO modo de compressão (fast, normal; normal)\n" +#~ " nice=NÚM tam. de nice de correspondência (2-273; 64)\n" +#~ " mf=NOME localizador de correspondência\n" +#~ " (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM máximo de profundidade de pesquisa;\n" +#~ " 0=automatic (padrão)" + +#~ 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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ 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" +#~ " --sparc[=OPÇÕES] filtro BCJ SPARC\n" +#~ " --riscv[=OPÇÕES] filtro BCJ RISC-V\n" +#~ " OPÇÕES válidas para todos os filtros BCJ:\n" +#~ " start=NUM deslocamento inicial para conversões\n" +#~ " (padrão=0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=OPÇÕES] filtro delta; OPÇÕES válidas (valores válidos, padrão):\n" +#~ " dist=NÚM distância entre bytes sendo subtraído\n" +#~ " de cada um (1-256; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet suprime avisos, use duas vezes para suprimir erros também\n" +#~ " -v, --verbose ser detalhado; use duas vezes para ainda mais detalhes" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help exibe a ajuda curto (lista apenas as opções básicas)\n" +#~ " -H, --long-help exibe essa ajuda longa e sai" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help exibe essa ajuda curta e sai\n" +#~ " -H, --long-help exibe a ajuda longa (lista também as opções avançadas)" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "Falha ao habilitar o sandbox" + +#~ 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: " + +#~ msgid " Streams: %s\n" +#~ msgstr " Fluxos: %s\n" + +#~ msgid " Blocks: %s\n" +#~ msgstr " Blocos: %s\n" + +#~ msgid " Ratio: %s\n" +#~ msgstr " Proporção: %s\n" + +#~ msgid " Check: %s\n" +#~ msgstr " Verificação: %s\n" + +#~ msgid "" +#~ " Streams:\n" +#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" +#~ msgstr "" +#~ " Fluxos:\n" +#~ " Fluxo Blocos DeslocComp DeslocDescomp TamanhoComp TamanhoDescomp Propo Verif Ajuste" + +#~ msgid "" +#~ " Blocks:\n" +#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check" +#~ msgstr "" +#~ " Blocos:\n" +#~ " Fluxo Bloco DeslocComp DeslocDescomp TamanhoTotal TamanhoDecomp Propo Verif" + +#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" +#~ msgstr " ValVerif %*s Cabeç Sinaliz TamComp UsoMem Filtros" + +#~ msgid "The selected match finder requires at least nice=%" +#~ msgstr "O localizador de correspondência selecionado requer pelo menos nice=%" diff --git a/cpp/third_party/xz-5.8.3/po/quot.sed b/cpp/third_party/xz-5.8.3/po/quot.sed new file mode 100644 index 0000000000..eb0e08dad0 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/quot.sed @@ -0,0 +1,17 @@ +# Sed script that converts quotations, by replacing ASCII quotation marks +# with Unicode quotation marks. +# +# Copyright (C) 2001 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# This file is offered as-is, without any warranty. +# +# Written by Bruno Haible , 2001. +# +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff --git a/cpp/third_party/xz-5.8.3/po/remove-potcdate.sed b/cpp/third_party/xz-5.8.3/po/remove-potcdate.sed new file mode 100644 index 0000000000..8c70dfbf14 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/remove-potcdate.sed @@ -0,0 +1,25 @@ +# Sed script that removes the POT-Creation-Date line in the header entry +# from a POT file. +# +# Copyright (C) 2002 Free Software Foundation, Inc. +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/cpp/third_party/xz-5.8.3/po/ro.gmo b/cpp/third_party/xz-5.8.3/po/ro.gmo new file mode 100644 index 0000000000000000000000000000000000000000..0c8bdccbe18406a1b2944915ed7e46156c1b7b9f GIT binary patch literal 30418 zcmb`P3w&i&eebut9TkuQBEB}rkObz$%!2_kj1V#zh|DB$k{K06JvnD5vzhY>xjYptSKw7y%twcp==t+mfSNytF2 z=QAt6{akyk|N6hzT66Dd$G!0pQ52oPpCRytCq+@2@CBfryBT~e_+fwjbKn}ze-7$<=RKZxz+vz_un9f^d;|C-@J~TL5&bpz zMDW{S3?6&7!}Gx1oR5Ke|NWr)c{ex=ej8N(&!JMa=h@)-;EkZ3e+S4T(HFpV;6H)- z&RP7?{fofg0gR3XTJU|K+Vl4yLmu4+j)0Fi*Nw+0$dE=UxCuN2ioTx$MgL!c;+J!t3QfTYQ1pET zD0+Vq6kYBF)&DPo>d%)!z5mak`0F%Iz6V|fA_CDmm_hH2gQDLvL5=UTK-E(RRZkmK ze{Tjgj`x7#llwun>&fT4>(_wCbN)iGADjahz?(s}Q$ln#a6AYJq6tuRSpY?s1EA>l zd*G$uAA$P**Fk;vXQ1fxC@P0_qSc`49R-gCuLh3+w}Bd$Nq_$)P~-7(kADEds?odr z{llQ>{dw>d@B{`^-#Zi3a~Fc5`_-V@_YzRwdp&p}_y!P?Mz?{I^G}1K!`_J3#g4Yal8j z`Vn{qcp8HQsiSFd7<@6Parh{xdVdU#fhQm&7lGSA@%u|b@y+cZO^DtNo(ldAxBz|^ zoCdE&sh$G9AG{j;B&cybk-<@YmxH^&4v1(+e+jC6KLlg&R36gvYe9xGNDxYb`4V5v%$B4`pz#v-9L*?$KV8r=tNCWeDP*b z^mzw(CU_U9akvlE`zIpYj|2O_+rY~~$@SlX&jWu3z7Cv*xK;3*U<14g<@jgdM?igV z0imTS(Ji3rzY9#kAA)7@+RaW+eH_&I{s4Rv_;`dw?f(EMe)*2@7u8)JT zO4I_kg13X>r~5(C?RXFteLMj!O}ub}#M z1%q({c(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bh}JXrBdy-V@ndUQnn^@(bx6yLD5faXY2$Pq*cgc_ zZYLOXg>DHas%cpChNQW}QtY`ttYsU;Z%1C|m=a~Op`m#w2+?#K!z^c*yAOVA7y$r! zvR5@fr0_{uJ%tZ$rIgRU+orK#7o6>*ojptUb93BwgTY2r8X#kE=lkok9kL1LQ~5Mw z%M$#~F$+YdQ#nhAm_mEY7GgG;l{z(>I&)^lR`3zUq&TZy9fk#fN~abhFXv+vB{(W3 zI&fNTf=@fp$O|)WG=uTWbKolkghOkjCVLYn<@TL#ca&LFkKA5VYok-CC92*{KT9u! z*|?r|nUl^ayMPF+8VjYy~k7wu34H z^>KAj;Ni^loY^4hHJ8`V$ApG>YN<)cE?eCA&#bM5szX}`2qKiF(fmd$#Z=Q~%wE2{ zH`E2EOHWvmDl6fsNVk;P>uQN469%6skqKqFHB_}(@33JaiOj8BKA)g3c3q|i@t90f z-2z>0f^$3HB-nb}_P%k#?zbJ|o%QPsHuC@9XvQS=|948*j2QlB6Sor=g<;#HSNh*d eum#s?Ql>a+h1A, 2022 - 2025. +# +# Cronologia traducerii fișierului „xz”: +# Traducerea inițială, făcută de R-GC, pentru versiunea xz 5.2.5. +# Actualizare a traducerii pentru versiunea 5.2.6 (nepublicată în TP), făcută de R-GC, 2022. +# Actualizare a algoritmului formelor de plural (de la „trei” la „patru” experimental). +# Actualizare a traducerii pentru versiunea 5.4.0-pre1, făcută de R-GC, noi-2022. +# Actualizare a traducerii pentru versiunea 5.4.0-pre2, făcută de R-GC, dec-2022. +# Actualizare a traducerii pentru versiunea 5.4.3, făcută de R-GC, mai-2023. +# Actualizare a traducerii pentru versiunea 5.4.4-pre1, făcută de R-GC, iul-2023. +# Actualizare a traducerii pentru versiunea 5.6.0-pre1, făcută de R-GC, feb-2024. +# Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024. +# Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025. +# Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025. +# Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul). +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.8.0-pre1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-03-09 19:21+0100\n" +"Last-Translator: Remus-Gabriel Chelu \n" +"Language-Team: Romanian \n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=((n==1) ? 0 : (n==2) ? 1 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 2 : 3);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.5\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Argument nevalid pentru opțiunea „--block-list”" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Prea multe argumente pentru opțiunea „--block-list”" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "În „--block-list”, dimensiunea blocului lipsește după numărul lanțului de filtrare „%c”:" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 poate fi folosit doar ca ultimul element din opțiunea „--block-list”" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Tip de format de fișier necunoscut" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Tip de verificare a integrității neacceptat" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Numai un fișier poate fi specificat cu „--files” sau „--files0”." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Variabila de mediu „%s” conține prea multe argumente" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Suportul de comprimare a fost dezactivat în timpul construirii" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Suportul de decomprimare a fost dezactivat în timpul construirii" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Comprimarea fișierelor lzip (.lz) nu este acceptată" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "opțiunea „--block-list” este ignorată dacă nu se comprimă în formatul .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Cu opțiunea „--format=raw”, este necesară opțiunea „--suffix=.SUF”, cu excepția cazului în care se scrie la ieșirea standard" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Numărul maxim de filtre este patru" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Eroare în opțiunea „--filters%s=FILTRE”:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Limita de utilizare a memoriei este prea mică pentru configurarea dată filtrului." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "lanțul de filtre %u este utilizat de „--block-list”, dar nu este specificat cu „--filters%u=”" + +# Notă: +# cu toate că sunt împotriva americanismelor, am preferat folosirea cuvîntului american, „românizat”, pentru a avea o traducere fluidă, fără construcții încărcate și inecesare... +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Utilizarea unei presetări în modul brut este descurajată." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Opțiunile exacte ale presetărilor pot varia între versiunile de software." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Formatul .lzma acceptă numai filtrul LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 nu poate fi utilizat cu formatul .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Lanțul de filtre %u este incompatibil cu opțiunea „--flush-timeout”" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Se trece la modul cu un singur fir de execuție datorită opțiunii „--flush-timeout”" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Opțiuni neacceptate în lanțul de filtre %u" + +# NOTĂ: +# - să intru în contact cu dezvoltatorii, pentru ai ruga să introducă a doua formă de plural +# (necesară cel puțin pentru limba română): +# „Se utilizează până la % de fire.” +# **** +# construcție necesară pentru mașini cu +# procesoare/nuclee > 10 +# === +# cred că deja au apărut astfel de „monștrii” +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Se utilizează până la % fire de execuție." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Lanț de filtre sau opțiuni de filtrare neacceptate" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Decomprimarea va avea nevoie de %sMio de memorie." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Numărul de fire de execuție a fost redus de la %s la %s pentru a nu se depăși limita de utilizare a memoriei de %sMio" + +#: src/xz/coder.c +#, 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-a redus numărul de fire de execuție de la %s la unul. Limita automată de utilizare a memoriei de %sMio este încă depășită. Sunt necesari %sMio de memorie. Se continuă în ciuda acestui lucru." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "S-a trecut la modul cu un singur-fir de execuție pentru a nu se depăși limita de utilizare a memoriei de %sMio" + +#: src/xz/coder.c +#, 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 "S-a ajustat dimensiunea dicționarului LZMA%c de la %sMio la %sMio pentru a nu se depăși limita de utilizare a memoriei de %sMio" + +#: src/xz/coder.c +#, c-format +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 "S-a ajustat dimensiunea dicționarului LZMA%c pentru „--filters%u” de la %sMio la %sMio pentru a nu depăși limita de utilizare a memoriei de %sMio" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Eroare la schimbarea lanțului de filtrare %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Eroare la crearea unei conducte: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() a eșuat: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Fișierul pare să fi fost mutat, nu eliminat" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Nu se poate elimina: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Nu se poate configura proprietarul fișierului: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Nu se poate configura grupul proprietar al fișierului: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Nu se pot configura permisiunile fișierului: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Sincronizarea fișierului a eșuat: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Sincronizarea directorului fișierului a eșuat: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Eroare la obținerea indicatorilor de stare a fișierului de la intrarea standard: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Este o legătură simbolică, se omite" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Este un director, se omite" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Nu este un fișier obișnuit, se omite" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Fișierul are activați biții «setuid» sau «setgid», se omite" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Fișierul are activat bitul lipicios(sticky), se omite" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Fișierul de intrare are mai mult de o legătură dură, se omite" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Numele fișierului este gol, se omite" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Eroare la restabilirea indicatorilor de stare la intrarea standard: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Eroare la obținerea indicatorilor de stare a fișierului de la ieșirea standard: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Deschiderea directorului a eșuat: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Destinația nu este un fișier obișnuit" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Eroare la restabilirea indicatorului O_APPEND la ieșirea standard: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Închiderea fișierului a eșuat: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Căutarea a eșuat când se încerca crearea unui fișier dispers(sparse): %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Eroare de citire: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Eroare la explorarea fișierului: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Sfârșit neașteptat al fișierului" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Eroare de scriere: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Dezactivat" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Cantitatea totală de memorie fizică (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Numărul de fire de execuție ale procesorului:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Comprimare:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Decomprimare:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Decomprimare cu multiple-fire de execuție:" + +# R-GC, scrie: +# ATENȚIE: +# este vorba de: +# T0 = momentul 0, și nu de: +# TO = la, către. pe, în... +# **** +# probabil tipul de literă folosit de mine în Poedit, să +# nu diferențieze prea mult O de 0... +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Implicit pentru -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Informații despre componentele mașinii:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Limitele de utilizare a memoriei:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Fluxuri:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Blocuri:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Dimensiune comprimată:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Dimensiune decomprimată:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Raport:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Verificare:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Completare flux:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Memorie necesară:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Dim. în antete:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Numărul de fișiere:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Flux" + +#: src/xz/list.c +msgid "Block" +msgstr "Bloc" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Blocuri" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "PozițieComprim" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "PozițieDecomprim" + +#: src/xz/list.c +msgid "CompSize" +msgstr "DimComp" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "DimDecomp" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "DimTotală" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Raport" + +#: src/xz/list.c +msgid "Check" +msgstr "Verificare" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "ValVerificare" + +#: src/xz/list.c +msgid "Padding" +msgstr "Completare" + +#: src/xz/list.c +msgid "Header" +msgstr "Antet" + +#: src/xz/list.c +msgid "Flags" +msgstr "Indicatori" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "UtilizareMem" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filtre" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Nici una" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Necunos-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Necunos-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Necunos-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Necunos-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Necunos-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Necunos-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Necunos-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Necunos-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Necunos-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Necunos-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Necunos-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Necunos-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Fișierul este gol" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Prea mic pentru a fi un fișier .xz valid" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Fluxuri Blocuri Comprimare Decomprimare Raport Verificare Nume fișier" + +#: src/xz/list.c +msgid "Yes" +msgstr "Da" + +#: src/xz/list.c +msgid "No" +msgstr "Nu" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Versiunea minimă XZ Utils:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "un fișier\n" +msgstr[1] "două fișiere\n" +msgstr[2] "%s fișiere\n" +msgstr[3] "%s de fișiere\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Totaluri:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "„--list” funcționează numai pe fișierele .xz („--format=xz” sau „--format=auto”)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Încercați «lzmainfo» cu fișiere .lzma ." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "„--list” nu acceptă citirea de la intrarea standard" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Eroare la citirea numelor de fișiere: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Sfârșit neașteptat al intrării la citirea numelor de fișiere" + +# Adaptînd sugestia făcută de Daniel Șerbănescu asupra traducerii cuvîntului „null”, am modificat +# traducerea de la:„Caracter nul găsit...”, la: +# „Caracter nul(null) găsit...” +# Sugestia făcută de el în baza obiecției că în pagina web, «dexonline» definiția cuvîntului nul, este un pic ambiguă; nu are o bază prea solidă, +# din următoarele motive: +# - pagina în cauză e construită, alimentată și menținută de persoane voluntare, precum noi ca traducători de software. +# - intrările pentru definiția cuvîntului „nul”, sînt extrase din dicționare de uz general; niciuna dintre ele, nu a ieșit dintr-un dicționar tehnic, cu atît mai puțin unul de informatică. +# - utilizatorul software-ului «xz», direct de la linia de comandă, mă îndoiesc că va fi un utilizator ce nu este familiarizat cu nomenclatura din informatică (pentru restul utilizatorilor, acest mesaj nu va fi vizibil, pentru că-l vor utiliza din spatele unui software „IGU” «InterfațăGrafică(de)Utilizator» +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Caracter nul(null) găsit la citirea numelor de fișiere; poate ați vrut să utilizați „--files0” în loc de „--files”?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Comprimarea și decomprimarea cu „--robot” nu sunt încă acceptate." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Nu se pot citi date de la intrarea standard atunci când se citesc numele de fișiere de la intrarea standard" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Eroare internă (bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Nu se pot stabili gestionarii de semnal" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Fără verificare a integrității; nu se verifică integritatea fișierului" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Tip neacceptat de verificare a integrității; nu se verifică integritatea fișierului" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Limita de utilizare a memoriei a fost atinsă" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Formatul fișierului nu este recunoscut" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Opțiuni neacceptate" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Datele comprimate sunt corupte" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Sfârșit neașteptat al intrării" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "Se necesită %sMio de memorie. Limitarea este dezactivată." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "Se necesită %sMio de memorie. Limita este de %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Lanț de filtre: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Încercați «%s --help» pentru mai multe informații." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Eroare la afișarea textului de ajutor (cod de eroare %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Utilizare: %s [OPȚIUNE]... [FIȘIER]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Comprimă sau decomprimă FIȘIER(e) în formatul .xz ." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Argumentele obligatorii pentru opțiunile lungi sunt de asemenea obligatorii pentru opțiunile scurte." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Mod de operare:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "forțează comprimarea" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "forțează decomprimarea" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "testează integritatea fișierului comprimat" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "listează informații despre fișierele .xz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Modificatori operație:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "păstrează (nu șterge) fișierele de intrare" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "forțează suprascrierea fișierului de ieșire și (de)comprimă legăturile" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "scrie la ieșirea standard și nu șterge fișierele de intrare" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "nu sincronizează fișierul de ieșire cu dispozitivul de stocare înainte de a elimina fișierul de intrare" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "decomprimă doar primul flux și ignoră în tăcere posibilele date de intrare rămase" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "nu creează fișiere disperse când decomprimă" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "utilizează sufixul „.SUF” pentru fișierele comprimate" + +#: src/xz/message.c +msgid "FILE" +msgstr "FIȘIER" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "citește numele fișierelor de procesat din FIȘIER; dacă FIȘIER este omis, numele de fișiere sunt citite de la intrarea standard; numele de fișiere trebuie să fie terminate cu caracterul de linie nouă" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "ca „--files”, dar folosește caracterul null ca terminator" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Formatul de bază al fișierului și opțiunile de comprimare:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMAT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "formatul de fișier pentru codificare sau decodificare; valorile posibile sunt „auto” (implicit), „xz”, „lzma”, „lzip” și „raw”" + +#: src/xz/message.c +msgid "NAME" +msgstr "NUME" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "tip de verificare a integrității: „none” (utilizați cu precauție), „crc32”, „crc64” (implicit) sau „sha256”" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "nu se efectuează verificarea integrității la decomprimare" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "presetare comprimare; valoarea implicită este 6; luați în considerare memoria utilizată de instrumentul de comprimare *și* de instrumentul de decomprimare, înainte de a utiliza presetările 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "încearcă să îmbunătățească raportul de comprimare folosind mai mult timp CPU-ul; nu afectează cerințele de memorie ale instrumentului de decomprimare" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "NUMĂR" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "utilizează cel mult NUMĂR fire de execuție; valoarea implicită este 0, care utilizează atâtea fire de execuție câte nuclee există în procesor" + +#: src/xz/message.c +msgid "SIZE" +msgstr "DIM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "începe un nou bloc .xz după fiecare DIM octeți de intrare utilizați acest lucru pentru a stabili dimensiunea blocului pentru comprimarea cu fire de execuție" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOCURI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "începe un nou bloc .xz după intervalele specificate separate prin virgule, de date necomprimate; opțional, specificați un număr de lanț de filtrare (0-9) urmat de „:” înainte de dimensiunea datelor necomprimate" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "la comprimare, dacă au trecut mai mult de NUMĂR de milisecunde de la curățarea anterioară și citirea mai multor intrări s-ar bloca, toate datele în așteptare sunt eliminate" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "LIMITA" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "stabilește limita de utilizare a memoriei pentru comprimare, decomprimare, decomprimare cu fire sau toate acestea; LIMITA este în octeți, % din RAM sau 0 pentru valorile implicite" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "dacă valorile de comprimare depășesc limita de utilizare a memoriei, dă o eroare în loc să reducă val. stabilite" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Lanț de filtrare personalizat pentru comprimare (alternativă la utilizarea presetărilor):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTRE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "definește lanțul de filtre folosind sintaxa șirului de filtre liblzma; utilizați „--filters-help” pentru mai multe informații" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "definește lanțuri de filtre suplimentare folosind sintaxa șirului de filtre liblzma pentru a fi utilizate cu opțiunea „--block-list”" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "afișează mai multe informații despre sintaxa șirului de filtre liblzma și iese" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPȚI" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 sau LZMA2; OPȚI este o listă separată prin virgule, de niciuna sau de mai multe dintre următoarele opțiuni (între paranteze: valorile valide, și cele implicite)" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "PRE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "restabilește opțiunile la o presetare" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "dimensiunea dicționarului" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "numărul de biți de context literal" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "numărul de biți de poziție literală" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "numărul de biți de poziție" + +#: src/xz/message.c +msgid "MODE" +msgstr "MOD" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "modul de comprimare" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "lungimea „drăguță” a unei potriviri" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "găsitor de potriviri" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "adâncimea maximă de căutare; 0=automată (valoarea implicită)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "filtru BCJ x86 (32-biți și 64-biți)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "filtru BCJ ARM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "filtru BCJ ARM-Thumb" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "filtru ARM64 BCJ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "filtru BCJ PowerPC (numai big endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "filtru BCJ IA-64 (Itanium)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "filtru BCJ SPARC" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "filtru BCJ RISC-V" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "OPȚIUNI valide pentru toate filtrele BCJ:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "poziția de pornire a conversiilor (implicit=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Filtru delta; OPȚI valabile (valori valabile; implicit):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "distanța dintre octeți fiind dedusă scăzând un octet din celălalt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Alte opțiuni:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "suprimă avertismentele; specificați-o de două ori pentru a suprima și erorile" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "descriere detaliată; specificați-o de două ori pentru și mai multe detalii" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "face ca avertismentele să nu afecteze starea de ieșire" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "utilizează mesaje analizabile de mașină (utile pentru scripturi)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "afișează cantitatea totală de memorie RAM și limitele de utilizare a memoriei active în prezent, și iese" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "afișează ajutorul scurt (enumeră doar opțiunile de bază)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "afișează acest ajutor lung(detaliat) și iese" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "afișează acest scurt mesaj de ajutor, și iese" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "afișează mesajul detaliat de ajutor (afișează și opțiunile avansate)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "afișează numărul versiunii, și iese" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Fără FIȘIER, sau când FIȘIER este „-”, citește de la intrarea standard." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Raportați erorile la <%s> (în engleză sau finlandeză).\n" +"Raportați erorile de traducere la " + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "Pagina principală a %s: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ACEASTA ESTE O VERSIUNE DE DEZVOLTARE, NEDESTINATĂ UTILIZĂRII ÎN PRODUCȚIE." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Lanțurile de filtre sunt definite cu ajutorul opțiunilor „--filters=FILTRE” sau „--filters1=FILTRE ... --filters9=FILTRE”. Fiecare filtru din lanț poate fi separat prin spații sau „--”. Alternativ, se poate specifica o presetare %s în locul unui lanț de filtre." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Filtrele acceptate și opțiunile acestora sunt:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Opțiunile trebuie să fie perechi „nume=valoare” separate prin virgule" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Nume de opțiune nevalid" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Valoare nevalidă a opțiunii" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Presetare LZMA1/LZMA2 neacceptată: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Suma de lc și lp nu trebuie să depășească 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Numele fișierului are un sufix necunoscut, se omite" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Fișierul are deja sufixul „%s”, se omite" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Sufixul numelui de fișier nu este valid" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Valoarea nu este un număr întreg zecimal nenegativ" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Sufix multiplicator nevalid" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Sufixele valide sunt „KiB” (2^10), „MiB” (2^20) și „GiB” (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Valoarea opțiunii „%s” trebuie să fie în intervalul [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Datele comprimate nu pot fi citite de pe un terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Datele comprimate nu pot fi scrise pe un terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Utilizare: %s [--help] [--version] [FIȘIER]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Afișează informațiile stocate în antetul fișierului .lzma ." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Prea mic pentru a fi un fișier .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Nu este un fișier .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Scrierea la ieșirea standard a eșuat" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Eroare necunoscută" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Presetare neacceptată" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Fanion neadmis în presetare" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Nume de opțiune necunoscut" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Valoarea opțiunii nu poate fi vidă" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Valoare în afara intervalului" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Această opțiune nu acceptă sufixe de multiplicare" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Sufix multiplicator nevalid (KiB, MiB, sau GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Nume de filtru necunoscut" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Acest filtru nu poate fi utilizat în formatul .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Alocarea memoriei a eșuat" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Șirul vid nu este permis, încercați „6” dacă este necesară o valoare implicită" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Numărul maxim de filtre este patru" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Lipsește numele filtrului" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Lanț de filtre nevalid (lipsește, „lzma2”, la sfârșit?)" diff --git a/cpp/third_party/xz-5.8.3/po/sr.gmo b/cpp/third_party/xz-5.8.3/po/sr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..979a12df0c607f81cddcea580692232631134086 GIT binary patch literal 36503 zcmcJY37lM2o$oJ*puq(Z5jVUbO?P9u?IaMOLx2zhM95;gg9xHjx~r2i)m3dRS&+d% z*mMSo0i+QKt2%GSrCAzcfJV`A-Uy@BuH*91aU4XQ8GZUt-y7%ozQ6xDcdM#S0uTGc z$*=Cc=brOF|NZ>$t>USJ_q%bQAPDy7pFZ%SmjpqM&)W_Pf_*tYSS^cmwz*Z~|nC;A`L; z!Kc9xe9`M29tE!BcnPTcKMQJ|-vs-?r$Md%2nH2B=YdCqmxAj536L(qSHZd9zk-_Q zF#gf?6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e5GSWA-9q`*1mM3G`*KHAWu`)hRG{4L_ixWbUmld+eK#!40M z^b1AyMO3Xh9>zEz`*vr||JqP!^ZibXSWxrIgACui__v@#3V9N**dw)(`nUyO%~dT4 z9%38z)eSyNBO;$6gHa8GH-lj4Bx)M1!m@uZ!)X~F>6+!Z{J5JLl}X3>P#JWjGqOQw zkex?bJnhQI3?^S>CLg`HZiVP+ z_RvIdMPDZrTR(BeX{P)IOJ;2RxaeX6bN3R1c>?)&8SkSqFK-57uMY|{Rr5tC>tj4g z-rW}y+17faU#v@eQv2OHxf3L2Yv;G?qC3IC4Te=wksF*nh^NB11>A_ER Ol@91FlM6a*#{UOZ=`;)g literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/sr.po b/cpp/third_party/xz-5.8.3/po/sr.po new file mode 100644 index 0000000000..8c4d98726f --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/sr.po @@ -0,0 +1,1264 @@ +# SPDX-License-Identifier: 0BSD +# +# Serbian translation of xz. +# This file is published under the BSD Zero Clause License. +# Мирослав Николић , 2020-2025. +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-02-03 07:28+0100\n" +"Last-Translator: Мирослав Николић \n" +"Language-Team: Serbian <(nothing)>\n" +"Language: sr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.5\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Неисправан аргумент за „--block-list“" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Превише аргумената за „--block-list“" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "У „--block-list“, величина блока недостаје након ланца филтера број „%c:“" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 се може користити само као последњи елемент у „--block-list“-у" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Непозната врста формата датотеке" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Неподржана врста провере целовитости" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Само једну датотеку можете навести са „--files“ или „--files0“." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Променљива окружења „%s“ садржи превише аргумената" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Подршка запакивања је искључена у време изградње" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Подршка распакивања је искључена у време изградње" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Запакивање „lzip“ датотека (.lz) није подржано" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "„--block-list“ се занемарује осим ако се пакује у „.xz“ формат" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Са „--format=raw“, „--suffix=.SUF“ је потребно осим ако се пише на стандардни излаз" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Највећи број филтера је четири" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Грешка у опцији „--filters%s=ФИЛТЕРИ“:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Ограничење коришћења меморије је премало за дато подешавање филтера." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "ланац филтера „%u“ је коришћен од „--block-list“ али није наведен са „--filters%u=“" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Коришћење претподешавања у сировом режиму је обесхрабрујуће." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Тачне опције претподешавања се могу разликовати од издања до издања софтвера." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Формат „.lzma“ подржава само „LZMA1“ филтер" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "Не можете користити „LZMA1“ са „.xz“ форматом" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Ланац филтера „%u“ није сагласан са „--flush-timeout“" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Пребацујем се на режим једне нити због „--flush-timeout“" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Неподржане опције у ланцу филтера %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Користим до % нити." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Неподржан ланац филтера или опције филтера" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "За распакивање ће бити потребно %s MiB меморије." + +#: src/xz/coder.c +#, 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 +#, 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 на једну. Аутоматско ограничење коришћења меморије од %s MiB је ипак премашено. %s MiB меморије је потребно. Ипак настављам." + +#: src/xz/coder.c +#, 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 +#, 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 на %s да се неби прекорачило ограничење коришћења меморије од %s MiB" + +#: src/xz/coder.c +#, c-format +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“ речника је промењена за „--filters%u“ са %s MiB на %s MiB да се не прекорачи ограничење коришћења меморије од %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Грешка промене на ланац филтера „%u“: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Грешка стварања спојке: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: „poll()“ није успело: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Изгледа да је датотека премештена, не уклањам" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Не могу да уклоним: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Не могу да поставим власника датотеке: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Не могу да поставим групу датотеке: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Не могу да поставим овлашћења датотеке: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Усклађивање датотеке није успело: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Усклађивање директоријума датотеке није успело: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Грешка добављања заставица стања датотеке са стандардног улаза: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Јесте симболичка веза прескачем" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Јесте директоријум, прескачем" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Није обична датотека, прескачем" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Датотека има постављен „setuid“ или „setgid“ бит, прескачем" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Датотека има постављен лепљиви бит, прескачем" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Улазна датотека има више од једне чврсте везе, прескачем" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Празан назив датотеке, прескачем" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Грешка повраћаја заставица стања на стандардни улаз: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Грешка добављања заставица стања датотеке са стандардног излаза: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Отварање директоријума није успело: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Одредиште није обична датотека" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Грешка повраћаја заставице „O_APPEND“ на стандардни излаз: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Затварање датотеке није успело: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Премотавање није успело приликом покушаја прављења оскудне датотеке: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Грешка читања: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Грешка приликом претраге датотеке: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Неочекиван крај датотеке" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Грешка писања: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Искључено" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Укупна количина физичке меморије (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Број нити процесора:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Запакивање:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Распакивање:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Вишенитно распакивање:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Основно за „-T0“:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "О хардверу:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Ограничење коришћења меморије:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Токови:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Блокови:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Величина сажетог:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Величина несажетог:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Однос:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Провери:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Попуна тока:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Потребна меморија:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Величине у заглављима:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Број датотека:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Ток" + +#: src/xz/list.c +msgid "Block" +msgstr "Блок" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Блокови" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "ПомерЗапак" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "ПомерНсжтог" + +#: src/xz/list.c +msgid "CompSize" +msgstr "ВлчнаЗапак" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "ВлчнаНсжтог" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "УкупнаВлчна" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Однос" + +#: src/xz/list.c +msgid "Check" +msgstr "Провери" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "ПровериВредн" + +#: src/xz/list.c +msgid "Padding" +msgstr "Попуна" + +#: src/xz/list.c +msgid "Header" +msgstr "Заглавље" + +#: src/xz/list.c +msgid "Flags" +msgstr "Заставице" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "КоришћМемор" + +#: src/xz/list.c +msgid "Filters" +msgstr "Филтери" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Ништа" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Незнано-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Незнано-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Незнано-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Незнано-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Незнано-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Незнано-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Незнано-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Незнано-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Незнано-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Незнано-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Незнано-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Незнано-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Датотека је празна" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Премало је да би било исправна „.xz“ датотека" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Токови Блокови Запаковано Распаковано Однос Провера Датотека" + +#: src/xz/list.c +msgid "Yes" +msgstr "Да" + +#: src/xz/list.c +msgid "No" +msgstr "Не" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Најмање издање XZ помагала:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s датотека\n" +msgstr[1] "%s датотеке\n" +msgstr[2] "%s датотека\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Укупно:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "„--list“ ради само над „.xz“ датотекама (--format=xz или --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Пробајте „lzmainfo“ са „.lzma“ датотекама." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "„--list“ не подржава читање са стандардног улаза" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Грешка читања назива датотека: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Неочекивани крај улаза приликом читања назива датотека" + +#: src/xz/main.c +#, c-format +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 +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Запакивање и распакивање са „--robot“ није још подржано." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Не могу да читам податке са стандардног улаза приликом читања назива датотека са стандардног улаза" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Унутрашња грешка (бубица)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Не могу да успоставим руковаоце сигналом" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Нема провере целовитости; не проверавам целовитост датотеке" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Неподржана врста провере целовитости; не проверавам целовитост датотеке" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Ограничење коришћења меморије је достигнуто" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Није препознат формат датотеке" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Неподржане опције" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Запаковани подаци су оштећени" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Неочекиван крај улаза" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB меморије је потребно. Ограничавач је онемогућен." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB меморије је потребно. Ограничење је %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Ланац филтера: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Пробајте „%s --help“ за више података." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Грешка исписивања текста помоћи (код грешке %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Коришћење: %s [ОПЦИЈА]... [ДАТОТЕКА]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Пакује или распакује ДАТОТЕКЕ у „.xz“ формату." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Обавезни аргументи за дуге опције су такође обавезни и за кратке опције." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Режим рада:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "приморава запакивање" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "приморава распакивање" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "испробава целовитост запаковане датотеке" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "исписује информације о „.xz“ даттотекама" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Измењивачи рада:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "задржава (не брише) улазне датотеке" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "приморава преписивање излазне датотеке и (рас)пакује везе" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "пише на стандардни излаз и не брише улазне датотеке" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "не усклађује излазну датотеку са смештајним уређајем пре уклањања улазне датотеке" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "распакује само први ток, и тихо занемарује могуће преостале улазне податке" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "не ствара привидне датотеке када распакује" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "користи суфикс „.SUF“ на запакованим датотекама" + +#: src/xz/message.c +msgid "FILE" +msgstr "ДАТОТЕКА" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "чита називе датотека процесу из ДАТОТЕКА; ако је ДАТОТЕКА изостављено, називи датотека се читају са стандардног улаза; називи датотека се морају завршавати знаком новог реда" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "исто као „--files“ али користи знак ништице као окончавач" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Основне опције формата датотеке и запакивања:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "ФОРМАТ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "формат датотеке за шифровање или дешифровање; могуће вредности су „auto“ (основно), xz, lzma, lzip, и raw" + +#: src/xz/message.c +msgid "NAME" +msgstr "НАЗИВ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "врста провере целовитости: „none“ (користите уз опрез), „crc32“, „crc64“ (основно), или „sha256“" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "не потврђује проверу целовитости приликом распакивања" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "претподешавање запакивања; основно је 6; узмите у обзир коришћење меморије запакивања *и* распакивања пре него ли употребите 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "покушава да побољша однос запакивања користећи више времена процесора; не утиче на потребе меморије распакивача" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "БРОЈ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "користи највише БРОЈ нити; основно је 0 за коришћење онолико нити колико има језгара процесора" + +#: src/xz/message.c +msgid "SIZE" +msgstr "ВЕЛИЧИНА" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "започиње нови „.xz“ блок након свака ВЕЛИЧИНА бајта улаза; користите ово да поставите величину блока за нитирано запакивање" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "БЛОКОВИ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "започиње нови „.xz“ блок након датих зарезом одвојених интервала несажетих података; изборно, наводи број ланца филтера (0-9) за којим следе „:“ пре величине несажетих података" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "приликом запакивања, ако је прошло више од ВРЕМЕ_ИСТЕКА милисекунди до претходног убацивања и читања још улаза блокираће, сви подаци на чекању се истискују ван" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "ОГРАНИЧЕЊЕ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "поставља ограничење коришћења меморије за запакивање, распакивање, распакивање нити или за све ово; ОГРАНИЧЕЊЕ је у бајтовима, % РАМ-а или 0 за основно" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "ако подешавања запакивања пређу ограничење коришћења меморије, даје грешку уместо дотеривања подешавања" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Произвољни ланац филтера за запакивање (алтернатива за коришћење предподешавања):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "ФИЛТЕРИ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "поставља ланац филтера користећи синтаксу ниске „liblzma“ филтера; користите „--filters-help“ за више информација" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "поставља додатне ланце филтера користећи синтаксу ниске „liblzma“ филтера за коришћење са „--block-list“" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "приказује више информација о синтакси ниске „liblzma“ филтера и излази" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "ОПЦИЈЕ" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 или LZMA2; ОПЦИЈЕ је зарезом раздвојен списак нула или више следећих опција (исправне вредности; основно):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "ПРЕ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "враћа опције на предподешеност" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "величина речника" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "број битова контекста литерала" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "број битова положаја литерала" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "број битова положаја" + +#: src/xz/message.c +msgid "MODE" +msgstr "РЕЖИМ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "режим запакивања" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "фина дужина поклапања" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "поклапа налазача" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "највећа дубина претраге; 0=аутоматски (основно)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ филтер (32-бита и 64-бита)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ филтер" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ филтер" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ филтер" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ филтер (само велика крајност)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ филтер" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ филтер" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ филтер" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Исправне ОПЦИЈЕ за све BCJ филтере:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "померај почетка за претварање (основно=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Делта филтер; исправне ОПЦИЈЕ (исправне вредности; основно):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "растојање између бајтова који су одузети један од другог" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Остале опције:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "потискује упозорења; наведите два пута да би потискивао и грешке" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "бива опширан; наведите два пута за још више опширности" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "чини да упозорења не делују на стање излаза" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "користи поруке обрадиве рачунаром (корисно за скрипте)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "приказује укупан износ РАМ-а и тренутно ограничење коришћења активне меморије, и излази" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "приказује кратку помоћ (исписује само основне опције)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "приказује ову опширну помоћ и излази" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "приказује ову кратку помоћ и излази" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "приказује дугу помоћ (исписује такође и напредне опције)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "приказује број издања и излази" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Без ДАТОТЕКЕ, или када је ДАТОТЕКА -, чита стандардни улаз." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Грешке пријавите на <%s> (на енглеском или финском)." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "„%s“ матична страница: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ОВО ЈЕ РАЗВОЈНО ИЗДАЊЕ И НИЈЕ НАМЕЊЕНО ЗА ПРОФЕСИОНАЛНУ УПОТРЕБУ." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Ланци филтера су постављени са опцијама „--filters=ФИЛТЕРИ“ или „--filters1=ФИЛТЕРИ“ ... „--filters9=ФИЛТЕРИ“. Сваки филтер у ланцу се може одвојити размацима или „--“. Или предподешеност „%s“ се може навести уместо ланца филтера." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Подржани филтери и њихове опције су:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Опције морају бити парови „назив=вредност“ раздвојени зарезима" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Неисправан назив опције" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Неисправна вредност опције" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Неподржано претподешавање „LZMA1/LZMA2“: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Збир „lc“ и „lp“ не сме премашити 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Назив датотеке има непознат суфикс, прескачем" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Датотека већ има суфикс „%s“, прескачем" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Неисправан суфикс назива датотеке" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Вредност није не-негативан децимални цео број" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Неисправан суфикс умножавача" + +#: src/xz/util.c +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 +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Вредност опције „%s“ мора бити у опсегу [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Запаковани подаци се не могу читати из терминала" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Запаковани подаци се не могу писати на терминал" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Коришћење: %s [--help] [--version] [ДАТОТЕКА]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Приказује информације смештене у заглављу „.lzma“ датотеке." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Датотека је премала да би била „.lzma“ датотека" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Није „.lzma“ датотека" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Писање на стандардни излаз није успело" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Непозната грешка" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Неподржано предподешавање" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Неподржана заставица у предподешавању" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Непознат назив опције" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Вредност опције не може бити празна" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Вредност је ван опсега" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Ова опција не подржава никакве суфиксе умножавача" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Неисправан суфикс умножавача (KiB, MiB, или GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Непознат назив филтера" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Филтер се не може користити у „.xz“ формату" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Додела меморије није успела" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Празна ниска није дозвољена, пробајте 6 ако је основна вредност потребна" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Највећи број филтера је четири" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Недостаје назив филтера" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Неисправан ланац филтера („lzma2“ недостаје на крају?)" diff --git a/cpp/third_party/xz-5.8.3/po/stamp-po b/cpp/third_party/xz-5.8.3/po/stamp-po new file mode 100644 index 0000000000..9788f70238 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/stamp-po @@ -0,0 +1 @@ +timestamp diff --git a/cpp/third_party/xz-5.8.3/po/sv.gmo b/cpp/third_party/xz-5.8.3/po/sv.gmo new file mode 100644 index 0000000000000000000000000000000000000000..93c65cb07b4d799dd3550523065867fe1889096d GIT binary patch literal 28399 zcmb`P3w&Hxedlk;3k-x15(w`bh$1=h2>F>rj!9%&wiR2Fv1BI%Lb%dgNfXW78RpK& zR?3D~0vi?xEfCsW3fp2s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!@MzvGDb6S6=7jWd zymyQidp_nu){9dS@LD0|K&IOMmmrkNiZ>;388aQMvc8;mlTOa?;)GOjPgx_GDXt0` zP09~iHL*NjKyNYf+;YXVjp6E5j?f zK~8?7m|aflNnbwKfX%sVp-yDo)}4Kj63lHAgoqIVjuwpRIkVQ`1c^g%!^+2*f1egB zEW2q&7ip6}Ziib_WWe*o6O;swS0ejN+HTG4G?8Jd*A$6XGa_2PA>{2odZ{D~S;UAr z!^(R1(I;;qTsSNtwpk`7Wy>J~XU8dpZB({LH&syNyudLiYZ8+D6wC5MYQ2vO2{VRP zvgu5RgxOm!AF1fFUSbhA+_Q;npM<(2`-PXC$S!2Ms&lw1$InC*tIxic)3=pzO!vrh zxH+n14W%SY7o+CRxwPzV<)Skc>{rPKqW=m^k!_OF z+BmV&O8Inky>^+a!23v7$NPY!35#RFd?Thmw?KqA$ni0xl36j0C1;$@+c0+GM!iG} zY_<3#v+yzy-?R=Xh`fTzs2Gg_8vL`z7ZKTb!YuYg|R5F^w9i)Mv-dGEJKE zV0J9y6WVq5piPibMhWd2wX(Hw+X`KChrYct#-7p0ndP)=p7k1jQ<+_x0xG%kP+EH# z5yjl+I?4}lr57w}`pOFSxx)&}Zg-wr*KpvPm~)wqf)6xsJ4jYPx|mYz5aVF&99O5h zp9geX*ct6+mdRN&BnO`V=ci0AuUDsjBh_szQzv)xP5$4_1a)VdR8!$(r27nbi^VmU z`Q`&w$u~e!_~nrtK|8VWTSu!Qw+iLUH1qI2fs7{qRbc)$ScCtqv{kQK25CB_jD^leTjI=jy zFxbM6<%>VG&VIR&{S2C4n&^iB?ng-a{{#4+hWvk#f{xH5c05SvvwF~+*RL8u=mZcB PnH%Z&`2p|Ct^a=q!Sc-; literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/sv.po b/cpp/third_party/xz-5.8.3/po/sv.po new file mode 100644 index 0000000000..9dc9da13b6 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/sv.po @@ -0,0 +1,1271 @@ +# SPDX-License-Identifier: 0BSD +# +# Swedish translation for xz. +# Copyright (C) The XZ Utils authors and contributors +# This file is published under the BSD Zero Clause License. +# +# Sebastian Rasmussen , 2019. +# Anders Jonsson , 2024. +# Luna Jernberg , 2022, 2023, 2024, 2025. +# # +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-01-24 11:03+0100\n" +"Last-Translator: Luna Jernberg \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Bugs: Report translation errors to the Language-Team address.\n" +"X-Generator: Poedit 3.5\n" +"X-Poedit-Bookmarks: -1,10,-1,-1,-1,-1,-1,-1,-1,-1\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Ogiltigt argument till --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: För många argument till --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "I --block-list saknas blockstorlek efter filterkedjenummer ”%c:”" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 kan endast användas som det sista elementet i --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Okänd filformatstyp" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Integritetskontrolltyp stöds inte" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Endast en fil kan anges med ”--files” eller ”--files0”." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Miljövariabeln %s innehåller för många argument" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Komprimeringsstöd inaktiverades vid byggtid" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Dekomprimeringsstöd inaktiverades vid byggtid" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Komprimering av lzip-filer (.lz) stöds inte" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list ignoreras såvida du inte komprimerar till .xz-formatet" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Med --format=raw krävs --suffix=.SUF om data inte skrivs till standard ut" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Maximalt antal filter är fyra" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Fel i flagga för --filters%s=FILTER:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Begränsning av minnesanvändning är allt för låg för den angivna filteruppsättningen." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "filterkedja %u används av --block-list men inte specificerad med --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Det avråds från att använda en förinställning i rått läge." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "De exakta flaggorna för förinställningar kan variera mellan programversioner." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Formatet .lzma har endast stöd för LZMA1-filtret" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 kan inte användas tillsammans med .xz-formatet" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Filterkedja %u är inkompatibel med --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Växlar till entrådsläge på grund av --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Flaggor som inte stöds i filterkedjan %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Använder upp till % trådar." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Filterkedja eller filterflaggor stöds inte" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Dekomprimering kommer att kräva %s MiB minne." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Reducerade antalet trådar från %s till %s för att inte överstiga begränsningen av minnesanvändning på %s MiB" + +#: src/xz/coder.c +#, 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 "Reducerade antalet trådar från %s till en. Den automatiska minnesanvändningsgränsen på %s MiB överskrids fortfarande. %s MiB minne krävs. Fortsätter i alla fall." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Ändrar till enkeltrådat läge för att inte överskrida minnesanvändningsgränsen på %s MiB" + +#: src/xz/coder.c +#, 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 "Justerade storlek för LZMA%c-lexikon från %s MiB till %s MiB för att inte överstiga begränsningen av minnesanvändning på %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Justerade storlek för LZMA%c-lexikon för --filters%u från %s MiB till %s MiB för att inte överskrida minnesanvändningsgränsen på %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Fel vid ändring till filterkedja %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Fel vid skapande av rörledning: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() misslyckades: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Filen verkar ha flyttats, tar inte bort" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Kan inte ta bort: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Kan inte sätta filägaren: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Kan inte sätta filgruppen: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Kan inte sätta filrättigheterna: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Synkroniseringen av filen misslyckades: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s:Synkroniseringen av filens katalog misslyckades:: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Fel vid hämtning av filstatusflaggor från standard in: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Är en symbolisk länk, hoppar över" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Är en katalog, hoppar över" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Är inte en vanlig fil, hoppar över" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Filen har setuid- eller setgid-biten satt, hoppar över" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Filen har stickybiten satt, hoppar över" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Indatafilen har mer än en hårdlänk, hoppar över" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Tomt filnamn, hoppar över" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Fel vid återställning av statusflaggorna för standard in: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Fel vid hämtning av filstatusflaggorna från standard ut: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Att öppna katalogen misslyckades: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Destinationen är inte en vanlig fil" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Fel vid återställning av O_APPEND-flaggan till standard ut: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Stängning av filen misslyckades: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Sökning misslyckades vid skapande av gles fil: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Läsfel: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Fel vid sökning i fil: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Oväntat filslut" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Skrivfel: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Inaktiverad" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Totalt mängd fysiskt minne (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Antal processortrådar:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Komprimering:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Dekomprimering:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Flertrådad dekomprimering:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Standard för -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Hårdvaruinformation:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Minnesanvändningsgränser:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Strömmar:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Block:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Komprimerad storlek:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Okomprimerad storlek:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Förhållande:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Kontroll:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Strömfyllnad:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Minne som behövs:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Storlek i huvuden:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Antal filer:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Ström" + +#: src/xz/list.c +msgid "Block" +msgstr "Block" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Block" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "Komprimerad position" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "Okomprimerad position" + +#: src/xz/list.c +msgid "CompSize" +msgstr "Komprimerad storlek" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "Okomprimerad storlek" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "Total storlek" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Förhållande" + +#: src/xz/list.c +msgid "Check" +msgstr "Kontroll" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "Kontrollvärde" + +#: src/xz/list.c +msgid "Padding" +msgstr "Fyllnad" + +#: src/xz/list.c +msgid "Header" +msgstr "Huvud" + +#: src/xz/list.c +msgid "Flags" +msgstr "Flaggor" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "Minnesanvändning" + +#: src/xz/list.c +msgid "Filters" +msgstr "Filters" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Ingen" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Okänd-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Okänd-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Okänd-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Okänd-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Okänd-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Okänd-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Okänd-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Okänd-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Okänd-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Okänd-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Okänd-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Okänd-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Fil är tom" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: För liten för att vara en giltig .xz-fil" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Strmr Block Komprimerd Okomprimerd Förh. Kntrll Filnamn" + +#: src/xz/list.c +msgid "Yes" +msgstr "Ja" + +#: src/xz/list.c +msgid "No" +msgstr "Nej" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Minsta XZ Utils version:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s fil\n" +msgstr[1] "%s filer\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Total:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list fungerar endast med .xz-filer (--format=xz eller --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Pröva ”lzmainfo” med .lzma-filer." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list saknar stöd för att läsa från standard in" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Fel vid läsning av filnamn: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Oväntat slut av indata vid läsning av filnamn" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Nulltecken hittades vid läsning av filnamn; kanske du menade att använda ”--files0” istället för ”--files”?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Komprimering och dekomprimering med --robot stöds inte än." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Kan inte läsa data från standard in när filnamn läses från standard in" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Internt fel" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Kan inte etablera signalhanterare" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Ingen integritetskontroll; kan inte verifiera filintegritet" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Typ av integritetskontroll stöds inte; verifierar inte filintegritet" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Begränsning av minnesanvändning uppnådd" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Filformat okänt" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Flaggor stöds inte" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Komprimerad data är korrupt" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Oväntat avslut av indata" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "%s MiB minne krävs. Begränsaren inaktiverad." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "%s MiB minne krävs. Begränsningen är %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Filterkedja: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Testa ”%s --help” för mer information." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Fel vid utskrift av hjälptexten (felkod %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Användning: %s [ALTERNATIV]... [FIL]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Komprimera eller dekomprimera FILER i formatet .xz." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Obligatoriska argument för långa alternativ är också obligatoriska för korta alternativ." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Operationsläge:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "tvinga komprimering" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "tvinga dekomprimering" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "testa den komprimerade filens integritet" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "lista information om .xz-filer" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Operationsmodifierare:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "behåll (ta inte bort) indatafiler" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "tvinga överskrift av utdatafilen och (av)komprimera länkar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "skriv till standardutdata och ta inte bort indatafiler" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "synkronisera inte utdatafilen till lagringsenheten innan du tar bort indatafilen" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "dekomprimera endast den första strömmen och ignorera eventuellt kvarvarande indata i tysthet" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "skapa inte glesa filer vid dekomprimering" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "använd suffixet '.SUF' på komprimerade filer" + +#: src/xz/message.c +msgid "FILE" +msgstr "FIL" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "läs filnamn att bearbeta från FIL; om FIL utelämnas läses filnamnen från standardinmatningen; filnamn måste avslutas med nyradstecknet" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "som --filer men använd null-tecknet som terminator" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Grundläggande filformat och komprimeringsalternativ:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMAT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "filformat för kodning eller avkodning; möjliga värden är 'auto' (standard), 'xz', 'lzma', 'lzip' och 'raw'" + +#: src/xz/message.c +msgid "NAME" +msgstr "NAMN" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "integritetskontrolltyp: 'ingen' (använd med försiktighet), 'crc32', 'crc64' (standard) eller 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "verifiera inte integritetskontrollen vid dekomprimering" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "förinställd komprimering; standard är 6; ta hänsyn till användningen av kompressor *och* dekomprimeringsminne innan du använder 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "försök att förbättra kompressionsförhållandet genom att använda mer CPU-tid; påverkar inte dekomprimeringsminneskraven" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "NUM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "använd som mest NUM trådar; standard är 0 som använder lika många trådar som det finns processorkärnor" + +#: src/xz/message.c +msgid "SIZE" +msgstr "STORLEK" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "starta ett nytt .xz-block efter varje STORLEK-byte med inmatning; använd detta för att ställa in blockstorleken för flertrådad kompression" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOCK" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "starta ett nytt .xz-block efter de givna kommaseparerade intervallen av okomprimerad data; ange eventuellt ett filterkedjenummer (0-9) följt av ett ':' före den okomprimerade datastorleken" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "vid komprimering, om mer än NUM millisekunder har gått sedan föregående tömning och läsning av mer indata skulle blockeras, rensas all väntande data ut" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "GRÄNSVÄRDE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "ställ in minnesanvändningsgräns för komprimering, dekompression, flertrådad dekompression eller alla dessa; GRÄNSVÄRDE är i byte, % av RAM-minnet eller 0 för standardinställningar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "om komprimeringsinställningarna överskrider minnesanvändningsgränsen, ge ett felmeddelande istället för att justera inställningarna nedåt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Anpassad filterkedja för komprimering (ett alternativ till förinställningar):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTER" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "ställ in filterkedjan med hjälp av liblzma-filtersträngsyntaxen; använd --filters-help för mer information" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "ställ in ytterligare filterkedjor med hjälp av liblzma-filtersträngsyntaxen att använda med --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "visa mer information om liblzma filtersträngsyntax och avsluta" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "ALTERNATIV" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 eller LZMA2; OPTS är en kommaseparerad lista med noll eller fler av följande alternativ (giltiga värden; standard):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "FÖRINSTÄLLNING" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "återställ alternativ till en förinställning" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "ordboksstorlek" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "antal bokstavliga kontextbitar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "antal bokstavliga positionsbitar" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "antal positionsbitar" + +#: src/xz/message.c +msgid "MODE" +msgstr "LÄGE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "komprimeringsläge" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "fin längd på en match" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "träffsökare" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "maximalt sökdjup; 0=automatisk (standard)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ-filter (32-bitars och 64-bitars)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ-filter (endast big endian)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ-filter" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Giltiga ALTERNATIV för alla BCJ-filter:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "startoffset för omvandlingar (standard=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Delta filter; giltiga ALTERNATIV (giltiga värden; standard):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "avståndet mellan byte som subtraheras från varandra" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Andra alternativ:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "dämpa varningar; ange två gånger för att dämpa fel också" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "var utförlig; specificera två gånger för ännu mer utförlighet" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "åt inte varningar påverka avslutningsstatus" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "använd maskintolkningsbara meddelanden (användbara för skript)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "visa den totala mängden RAM och de för närvarande aktiva minnesanvändningsgränserna och avsluta" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "visa den korta hjälpen (visar endast de grundläggande alternativen)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "visa den långa hjälpen och avsluta" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "visa den korta hjälpen och avsluta" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "visa den långa hjälpen (visar även de avancerade alternativen)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "visa versionsnumret och avsluta" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Med FIL, eller när FIL är -, läs standard in." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Rapportera fel till <%s> (på engelska eller finska).\n" +"Rapportera översättningsfel till " + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s hemsida: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "DETTA ÄR EN UTVECKLINGSVERSION SOM INTE ÄR AVSEDD FÖR PRODUKTIONSANVÄNDNING." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Filterkedjor ställs in med alternativen --filters=FILTERS eller --filters1=FILTER ... --filters9=FILTER. Varje filter i kedjan kan separeras med mellanslag eller '--'. Alternativt kan en förinställd %s specificeras istället för en filterkedja." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Filtren som stöds och flaggorna för dem är:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Alternativ måste vara ”namn=värde”-par separerade med kommatecken" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Ogiltigt flaggnamn" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Ogiltigt alternativvärde" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "LZMA1/LZMA2-förinställning stöds inte: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Summan av lc och lp får inte överstiga 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Filnamn har okänd filändelse, hoppar över" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Filen har redan ändelsen ”%s”, hoppar över" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Ogiltig filnamnsändelse" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Värdet är inte ett icke-negativt, decimalt heltal" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Ogiltig multipeländelse" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Giltiga suffix är ”KiB” (2^10), ”MiB” (2^20) och ”GiB” (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Värdet för flaggan ”%s” måste vara inom intervallet [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Komprimerad data kan inte läsas från en terminal" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Komprimerad data kan inte skrivas till en terminal" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Användning: %s [--help] [--version] [FIL]…\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Visa information som lagrats i .lzma-filhuvudet" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Filen är för liten för att vara en giltig .lzma-fil" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Inte en .lzma-fil" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Skrivning till standard ut misslyckades" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Okänt fel" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Förinställning stöds inte" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Flagga som inte stöds i förinställningen" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Okänt alternativnamn" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Alternativvärdet får inte vara tomt" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Värde utanför intervallet" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Det här alternativet stöder inte några multiplikatorsuffix" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Ogiltigt multiplikatorsuffix (KiB, MiB eller GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Okänt filternamn" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Detta filter kan inte användas med .xz-formatet" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Minnesallokering misslyckades" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Tom sträng är inte tillåten, försök '6' om ett standardvärde behövs" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Det maximala antalet filter är fyra" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Filternamn saknas" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Ogiltig filterkedja ('lzma2' saknas på slutet?)" diff --git a/cpp/third_party/xz-5.8.3/po/tr.gmo b/cpp/third_party/xz-5.8.3/po/tr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..80e3501997ad1cd50a5f9478960b7648fbef6419 GIT binary patch literal 28887 zcmb`P3w$I;edpW84_Jc%^D^(Yv5?kY3GKscTk_i8ht?KeNy|!WV-o|dnU>UO9?JC0 z?v5ZP5E93^fPt7-&c_l0*#ro9li<7LHV`6h5(tFjagdP2;S%0l0)+6m3kmuD{#8BQ zGm;kj^T~X+^qcOks;>Ii|6Miv;6>-W>8v0K&g0K8_|iuPLB#jhKQ0K)=K6_Gc6b@M zg`&^B;1KvGa3{D5UIhND#|xhl1m|#l33wj(T<}TYAb1J5*JBL!bA1>1Z14kMANWas z{XOtmTtDgJAh;ad0X`3W38;GafR6`1=W%2Q}UrcrExEa69-Ba2NPJ@EmYEgVy`51}_Bb;1j_+L6$4{ z6|f1u3oL_Ag?J%&C#ZEe4vLPy0iFwf%HRJycs|z;f+6@7a0)!1MNz$5LAAdFggt^X zxCyNK>tmqSZ-W}o-+?T7@HKEZc-EzEJ@$euX^?=U;Lm}g?}tIr|3{$s<&x(> zQ*aU#eeVKA?+<~Z%L=IZ|2e4nd>T~ye+0!}7jf|o@J0|32)4ltYBvswelGyEzPEzv zrwXc{CaC$|18N;V2Z~R=32I!=dak>FGk7l7F9ip{IdBQQ2h=zvL^lEFf{-AX1Vxu6 zP;_a7qTd_AYrtOv_5QyG_1^D;qSFO*4(kMcp!(elJ_5W6JR3X!YF(!M^PdH^9zXB# z%^<8AobbO#R5qu{&dby+9gP_KL!4+fLDPZ2KR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4V#ids~IaibRrU#J@O7W45eQs(6!%ll6R@!B*-Pi?_TQlLxs>ae)t9{1}A7>dDnOmI&# z`MECaHfF^yo~y7y0SARfHGU+4X&`B<)U6A5Y;|pAE$`P%+E^Z(rhMtq1uQK;Vw1va zYd4J=QlT(AQ_-PClSg|MgoXfw)3^~jhm|>PE~r(<>-i<-k_6fBBAj@!Q2a7NEjWGW zeiU(NytREB|0~USYbXCL0$eg5`k&NizfsA4@a}$~<$pxv4ti%lS5vx^UxUD@_9J$V W%-oSDQa0oSmc-{#9#-1HdjAh3uY>vk literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/tr.po b/cpp/third_party/xz-5.8.3/po/tr.po new file mode 100644 index 0000000000..f6d0a7639d --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/tr.po @@ -0,0 +1,1264 @@ +# SPDX-License-Identifier: 0BSD +# +# Turkish translation for xz. +# This file is published under the BSD Zero Clause License. +# +# Emir SARI , 2022-2025. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-01-25 17:00+0300\n" +"Last-Translator: Emir SARI \n" +"Language-Team: Turkish \n" +"Language: tr\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=2; plural=(n > 1);\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: --block-list için geçersiz argüman" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: --block-list için çok fazla argüman" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "--block-list içinde, süzgeç zinciri numarası '%c' sonrası blok boyutu eksik:" + +#: src/xz/args.c +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 +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Bilinmeyen dosya biçimi türü" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Desteklenmeyen bütünlük denetimi türü" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "'--files' veya '--files0' ile yalnızca bir dosya belirtilebilir." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, 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 +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 +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 +msgid "Compression of lzip files (.lz) is not supported" +msgstr "lzip dosyalarının (.lz) sıkıştırılması desteklenmiyor" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr ".xz biçimine sıkıştırılmadığı durumlarda --block-list yok sayılır" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "stdout'a yazılmıyorsa --format-raw ile --suffix=.SUF gereklidir" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Olabilecek en çok süzgeç sayısı dörttür" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "--filters%s=SÜZGEÇLER seçeneğinde hata:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Verilen süzgeç ayarı için bellek kullanım sınırı pek düşük." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "Süzgeç zinciri %u --block-list tarafından kullanılıyor; ancak --filters%u= ile belirtilmemiş." + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Ham kipte bir önayar kullanımı önerilmez." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Önayarların kesin seçenekleri yazılım sürümleri arasında ayrım gösterebilir." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr ".lzma biçimi, yalnızca LZMA1 süzgecini destekler" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1, .xz biçimi ile birlikte kullanılamaz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Süzgeç zinciri %u, --flush-timeout ile uyumsuz" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "--flush-timeout nedeniyle tek iş parçacıklı kipe geçiliyor" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Süzgeç zinciri %u ile desteklenmeyen seçenekler" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "En çok % iş parçacığı kullanılıyor." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Desteklenmeyen süzgeç zinciri veya süzgeç seçenekleri" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Sıkıştırma açma, %s MiB belleğe gereksinim duyacak." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "%3$s MiB bellek kullanımı sınırını aşmamak için iş parçacığı sayısı %1$s -> %2$s olarak ayarlandı" + +#: src/xz/coder.c +#, 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 "İş parçacıklarının sayısı %s -> 1 olarak azaltıldı. %s MiB otomatik bellek sınırı hâlâ aşılıyor. %s MiB belleğe gereksinim var. Yine de sürdürülüyor." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "%s MiB bellek kullanım sınırını aşmamak için tek iş parçacıklı kipe geçiliyor" + +#: src/xz/coder.c +#, 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 "%4$s MiB bellek kullanımı sınırını aşmamak için LZMA%1$c sözlük boyutu %2$s MiB'dan %3$s MiB'e ayarlandı" + +#: src/xz/coder.c +#, c-format +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 "%5$s MiB bellek kullanımı sınırını aşmamak için --filters%2$u için olan LZMA%1$c sözlük boyutu %3$s MiB'den %4$s MiB'a ayarlandı" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Süzgeç zinciri %u olarak değiştirilirken hata: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Veriyolu oluştururken hata: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: poll() başarısız oldu: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Dosya taşınmış gibi görünüyor, kaldırılmıyor" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Kaldırılamıyor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Dosya sahibi ayarlanamıyor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Dosya grubu ayarlanamıyor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Dosya izinleri ayarlanamıyor: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Dosyayı eşzamanlama başarısız: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Dosyanın dizinini eşzamanlama başarısız: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Standart girdi'den dosya durum bayrakları alınırken hata: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Bir sembolik bağ, atlanıyor" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Bir dizin, atlanıyor" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Olağan bir dosya değil, atlanıyor" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Dosyanın setuid'si veya setgid biti ayarlanmış, atlanıyor" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Dosyanın yapışkan bit seti var, atlanıyor" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Girdi dosyasında birden çok sabit bağ var, atlanıyor" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Boş dosya adı, atlanıyor" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Standart girdi'ye durum bayrakları geri yüklenirken hata: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Standart çıktı'dan dosya durum bayrakları alınırken hata: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Dizini açma başarısız: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: Hedef olağan bir dosya değil" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Standart çıktı'dan O_APPEND bayrağı geri yüklenirken hata: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Dosyayı kapatma başarısız: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Bir aralıklı dosya oluşturmaya çalışırken arama başarısız: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Okuma hatası: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Dosyayı ararken hata: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Dosyanın beklenmedik sonu" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Yazma hatası: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Devre dışı" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Fiziksel bellek miktarı (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "İşlemci iş parçacığı sayısı:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Sıkıştırma:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Sıkıştırma açma:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Çok iş parçacıklı sıkıştırma açma:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "-T0 için öntanımlı:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Donanım bilgisi:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Bellek kullanım sınırları:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Akışlar:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Bloklar:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Sıkıştırılmış boyut:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Sıkıştırılmamış boyut:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Oran:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Denetim:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Akış dolgusu:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Gereken bellek:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Üstbilgideki boyut:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Dosya sayısı:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Akış" + +#: src/xz/list.c +msgid "Block" +msgstr "Blok" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Bloklar" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "SkştrOfseti" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "SkştrmmşOfset" + +#: src/xz/list.c +msgid "CompSize" +msgstr "SkştrBoyut" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "SkştrmmşBoyut" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "ToplamBoyut" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Oran" + +#: src/xz/list.c +msgid "Check" +msgstr "Denetim" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "DğrDentm" + +#: src/xz/list.c +msgid "Padding" +msgstr "Dolgu" + +#: src/xz/list.c +msgid "Header" +msgstr "Üstveri" + +#: src/xz/list.c +msgid "Flags" +msgstr "Bayrak" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "BelKullnm" + +#: src/xz/list.c +msgid "Filters" +msgstr "Süzgeçler" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Yok" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "?-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "?-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "?-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "?-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "?-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "?-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "?-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "?-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "?-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "?-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "?-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "?-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Dosya boş" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Geçerli bir .xz dosyası olabilmek için pek küçük" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr " Akış Blok Sıkıştırıl. Sıkıştırmas. Oran Denetim Dosya ad" + +#: src/xz/list.c +msgid "Yes" +msgstr "Evet" + +#: src/xz/list.c +msgid "No" +msgstr "Hayır" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "En düşük XZ Utils sürümü:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s dosya\n" +msgstr[1] "%s dosya\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Toplamlar:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list, yalnızca .xz dosyalarında çalışır (--format=xz veya --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr ".lzma dosyalarıyla 'lzmainfo'yu deneyin." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list, standart girdi'den okumayı desteklemez" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Dosya adları okunurken hata: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Dosya adları okunurken beklenmedik girdi sonu" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Dosya adları okunurken boş karakter bulundu; '--files' yerine '--files0' mı demek istediniz?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "--robot ile sıkıştırma ve sıkıştırma açma henüz desteklenmiyor." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Standart girdi'den dosya adları okunurken standart girdi'den veri okunamıyor" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "İç hata (yazılım hatası)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Sinyal işleyicileri tesis edilemiyor" + +#: src/xz/message.c +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 +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 +msgid "Memory usage limit reached" +msgstr "Bellek kullanım sınırına erişildi" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Dosya biçimi tanımlanamıyor" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Desteklenmeyen seçenekler" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Sıkıştırılmış veri hasarlı" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Beklenmedik girdi sonu" + +#: src/xz/message.c +#, 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 +#, 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 +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Süzgeç zinciri: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Daha fazla bilgi için '%s --help' deneyin." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Yardım metni yazdırılırken hata (hata kodu %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Kullanım: %s [SEÇENEK]... [DOSYA]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr ".xz biçimindeki DOSYAları sıkıştır veya sıkıştırmasını aç." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Uzun seçenekler için zorunlu olan argümanlar kısalar için de öyledir." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "İşlem kipi:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "sıkıştırmayı zorla" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "sıkıştırma açmayı zorla" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "sıkıştırılmış dosya bütünlüğünü sına" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr ".xz dosyaları hakkında bilgi ver" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "İşlem niteleyicileri:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "girdi dosyalarını tut (silme)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "çıktı dosyalarının üzerine yazılmasını zorla ve bağlantıları çöz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "standart çıktıya yaz ve girdi dosyalarını silme" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "girdi dosyasını kaldırmadan önce çıktı dosyasını depolama aygıtına eşzamanlama" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "yalnızca ilk akışı çöz ve kalan olası girdi verisini sessizce yok say" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "sıkıştırma çözerken seyrek dosyalar oluşturma" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "sıkıştırılmış dosyalarda '.SUF' sonekini kullan" + +#: src/xz/message.c +msgid "FILE" +msgstr "DOSYA" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "DOSYA'dan işlemek için dosya adlarını oku; DOSYA verilmemişse dosya adları standart girdiden okunur; dosya adları, yenisatır karakteriyle sonlandırılmalıdır" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "--files gibi; ancak sonlandırıcı olarak boş karakterini kullanır" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Temel dosya biçimi ve sıkıştırma seçenekleri:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "BİÇİM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "kodlamak veya çözmek için dosya biçimi; olası değerler: 'auto' (öntanımlı), 'xz', 'lzma', 'lzip' ve 'raw'" + +#: src/xz/message.c +msgid "NAME" +msgstr "AD" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "bütünlük denetimi türü: 'none' (dikkatlı kullanın), 'crc32', 'crc64' (öntanımlı) veya 'sha256'" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "sıkıştırmayı açarken bütünlük denetimini doğrulama" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "sıkıştırma önayarı; öntanımlı 6'dır; 7-9 kullanmadan önce sıkıştırıcı *ve* açıcı bellek kullanımını dikkate alın" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "daha çok CPU zamanı kullanarak sıkıştırma oranını iyileştirmeye çalış; sıkıştırma açıcı bellek gereksinimlerini etkilemez" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "SAYI" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "en çok SAYI iş parçacığı kullan; öntanımlı 1; var olan işlemci çekirdeği kadar iş parçacığı kullanmak için 0'a ayarlayın" + +#: src/xz/message.c +msgid "SIZE" +msgstr "BOYUT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "her BOYUT bayt girdiden sonra yeni bir .xz bloku başlat; iş parçacığı kullanan sıkıştırma için blok boyutunu ayarlamak için bunu kullanın" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOKLAR" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "verilen virgülle ayrılmış sıkıştırılmamış veri aralığından sonra yeni bir .xz bloku başlat; isteğe bağlı olarak, sıkıştırılmamış veri boyutundan önce bir süzgeç zinciri numarası belirtin (0-9, sonrasında ':' gelir)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "sıkıştırırken, bir önceki floştan SAYI milisaniyeden daha çok zaman geçtiyse ve daha çok okuma engelleyecekse tüm bekleyen veri floşlanır" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "SINIR" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "sıkıştırma, sıkıştırma açma, çok iş parçacıklı sıkıştırma açma veya bunların tümü için için bellek kullanımı sınırı ayarla; SINIR; bayt, bellek yüzdesi veya öntanımlılar için 0 olabilir" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "sıkıştırma ayarları bellek kullanımı sınırını aşıyorsa ayarı aşağı doğru çekmek yerine bir hata ver" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Sıkıştırma için özel süzgeç zinciri (önayar kullanımı alternatifi):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "SÜZGEÇLER" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "süzgeç zincirini liblzma süzgeç zinciri sözdizimi kullanarak ayarla; daha fazla bilgi için --filters-help kullanın" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "--block-list ile kullanmak üzere liblzma süzgeç dizisi sözdizimi kullanarak ek süzgeç zincirleri ayarla" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "liblzma süzgeç dizisi sözdizimi hakkında daha fazla bilgi görüntüle ve çık" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "SÇNK" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 veya LZMA2; SÇNK (seçenekler), aşağıdaki seçeneklerin hiçbirini veya bir sayısını içeren virgülle ayrılmış bir listedir (geçerli değerler; öntanımlı):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "ÖN" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "seçenekleri bir önayara sıfırla" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "sözlük boyutu" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "düz bağlam bitleri sayısı" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "düz konum bitleri sayısı" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "konum bitleri sayısı" + +#: src/xz/message.c +msgid "MODE" +msgstr "KİP" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "sıkıştırma kipi" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "eşleşmenin öncelik uzunluğu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "eşleşme bulucusu" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "en çok arama derinliği; 0=kendiliğinden (öntanımlı)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ süzgeci (32 ve 64 bit)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ süzgeci" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ süzgeci" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ süzgeci" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ süzgeci (yalnızca son büyük haneli)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ süzgeci" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ süzgeci" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ süzgeci" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Tüm BCJ süzgeçleri için geçerli SÇNK:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "dönüşümler için başlangıç ofseti (öntanımlı)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "Fark süzgeci; geçerli SÇNK (geçerli değerler; öntanımlı):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "birbirinden çıkarılan baytlar arasındaki uzaklık" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Diğer seçenekler:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "uyarıları sustur; hataları susturmak için iki kez belirt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "ayrıntılı ol; daha da ayrıntı için iki kez belirt" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "uyarıların çıkış durumunu etkilemesine izin verme" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "makine tarafından ayrıştırılabilir iletiler kullan (betikler için yararlı)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "toplam RAM miktarını ve şu anki bellek kullanımı sınırlarını görüntüle ve çık" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "kısa yardımı görüntüle (yalnızca temel seçenekleri listeler)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "bu uzun yardımı görüntüle ve çık" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "bu kısa yardımı görüntüle ve çık" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "bu uzun yardımı görüntüle (ayrıca gelişmiş seçenekleri listeler)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "sürüm numarasını görüntüle ve çık" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "DOSYA olmadan veya DOSYA - iken standart girdi'yi oku." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Hataları <%s> adresine bildir (İngilizce veya Fince)." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s ana sayfası: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +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." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Süzgeç zincirleri --filters=SÜZGEÇLER veya --filters1=SÜZGEÇLER ... --filters9=SÜZGEÇLER seçenekleri kullanılarak ayarlanır. Zincirdeki her bir seçenek boşluklar veya '--' ile ayrılabilir. Alternatif olarak, bir süzgeç zinciri yerine bir %s önayarı da belirtilebilir." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Desteklenmeyen süzgeçler ve onların seçenekleri:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "Seçenekler, virgülle ayrılmış 'ad=değer' çiftleri olmalıdır" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Geçersiz seçenek adı" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Geçersiz seçenek değeri" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Desteklenmeyen LZMA1/LZMA2 önayarı: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "lc ve lp'nin toplamı 4'ü geçmemelidir" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Dosya adında bilinmeyen sonek var, atlanıyor" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Dosyada '%s' soneki halihazırda var, atlanıyor" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Geçersiz dosya adı soneki" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "Değer, bir negatif olmayan ondalık tamsayı" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Geçersiz çoklayıcı soneki" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Geçerli sonekler: 'KiB' (2^10), 'MiB' (2^20) ve 'GiB' (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "'%s' seçeneği değeri erimde olmalıdır [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Bir uçbirimden sıkıştırılmış veri okunamaz" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Bir uçbirime sıkıştırılmış veri yazılamaz" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Kullanım: %s [--help] [--version] [DOSYA]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr ".lzma dosya üstbilgisinde depolanan bilgiyi göster." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Geçerli bir .xz dosyası olabilmek için pek küçük" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Bir .lzma dosyası değil" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Standart çıktı'ya yazma başarısız" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Bilinmeyen hata" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Desteklenmeyen önayarlar" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Önayarda desteklenmeyen bayrak" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Geçersiz seçenek adı" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Seçenek değeri boş olamaz" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Değer erim dışında" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "Bu seçenek herhangi bir çoklayıcı soneklerini desteklemiyor" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "Geçersiz çoklayıcı soneki (KiB, MiB veya GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Bilinmeyen süzgeç adı" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Bu süzgeç .xz biçiminde kullanılamaz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Bellek ayırma başarısız" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Boş diziye izin verilmiyor; bir öntanımlı değer gerekiyorsa '6' deneyin" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Olabilecek en çok süzgeç sayısı dörttür" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Süzgeç adı eksik" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Geçersiz süzgeç zinciri (sonda 'lzma2' mi eksik?)" diff --git a/cpp/third_party/xz-5.8.3/po/uk.gmo b/cpp/third_party/xz-5.8.3/po/uk.gmo new file mode 100644 index 0000000000000000000000000000000000000000..5975b6d850ee4f431b8c580879f956523dc7df4d GIT binary patch literal 39005 zcmd6w37nl}eeWL?L4#JL7E!BxLE}syGfoyFOo$Ld0;$=W1t^MoGIJ(5X6BsnELqSZ z5Z0C^U_*i!R#AG3ZT5u(k}F!hYHQC}Yd5cL?Je4RYqhPdx9zR{{{GMNZs(ktB$WHP zJ@Cx$yvwuw_vin-@5#5$KJEUOIOk61PapV!S2$PT`@Ls5_fn2ucaF!mfm12^Yy*42 z`@vb@=fShVe+~FkuXpY=j?V*62j33<4A=vn2hIyv1iLuC6Z|=F7dRRGy>R>^@GTtw z%(>280L}#80lpv9eOtlTf(OF+FM?A!{%27Az3mOu0sFzXffevg;5P8h;BJsE+*iS$ z1)m2a@MUlG_%?7Y$MZqe|1D7S{C%(=d>+*N&!bU|=Q{B1;7y?J{}jkA?#tkG@UK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U+qV}hoJAz_3q;cBFxsgglfU3)kEPF1hgC(!$T6VYl+)N=a+O-QSo~XJNU!b3yJP{>tE4e` zPsCdkV!(_)Pn5>|KC@$R@L6Hu_OTsF+A=#r?-sZ<*$YJ3!_VG$m6u{BvKL~umb8@A zQJYd0t?|=~iauInizM(RGPYl6G!inUbR~tZ2NptkMH`wiPRS-=agL(T+l&-&oMmLo z4pB?o7aEI=xH=rqgDJCP5h+}OrdhEx@oGNFuIpp(Ct`V$NAwigv, 2019, 2022, 2023, 2024, 2025. +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-01-24 13:54+0200\n" +"Last-Translator: Yuri Chornoivan \n" +"Language-Team: Ukrainian \n" +"Language: uk\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=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 23.04.3\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: некоректний аргумент --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: забагато аргументів --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "У --block-list пропущено розмір блоку після номера ланцюжка фільтрів «%c:»" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 можна використовувати лише як останній елемент у --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: невідомий тип формату файлів" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: непідтримуваний тип перевірки цілісності" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Разом із параметрами --files або --files0 можна вказувати лише один файл." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "У змінній середовища %s міститься надто багато аргументів" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Підтримку стискання було вимкнено під час збирання програми" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Підтримку розпаковування було вимкнено під час збирання програми" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Підтримки стискання файлів lzip (.lz) не передбачено" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list буде проігноровано, якщо дані не стискаються до формату .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "" +"Якщо вказано --format=raw, слід вказати і --suffix=.SUF, якщо дані\n" +"виводяться не до стандартного виведення" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Максимальна кількість фільтрів — чотири" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Помилка у параметрі --filters%s=ФІЛЬТРИ:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Обмеження на використання пам'яті є надто жорстким для вказаного налаштування фільтрів." + +#: src/xz/coder.c +#, 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 +msgid "Using a preset in raw mode is discouraged." +msgstr "Не варто користуватися визначенням рівня у режимі без обробки." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Точний перелік параметрів рівнів може залежати від версій програмного забезпечення." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "У форматі .lzma передбачено підтримку лише фільтра LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 не можна використовувати разом із визначенням формату .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Ланцюжок фільтрування %u є несумісним із параметром --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Перемикаємося на однопотоковий режим через використання --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Непідтримувані параметри у ланцюжку фільтрів %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Використовуємо до % потоків обробки." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Непідтримуваний ланцюжок фільтрування або непідтримувані параметри фільтрування" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Для розпаковування знадобляться %s МіБ пам'яті." + +#: src/xz/coder.c +#, 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 МіБ" + +#: src/xz/coder.c +#, 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 до одного. Автоматичне обмеження використання пам'яті у %s МіБ усе ще перевищено. Потрібно %s МіБ пам'яті. Продовжуємо роботу попри це." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Перемикаємося на однопотоковий режим, щоб не перевищувати обмеження щодо використання пам'яті у %s МіБ" + +#: src/xz/coder.c +#, 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 МіБ до %s МіБ, щоб не перевищувати обмеження на використання пам'яті у %s МіБ" + +#: src/xz/coder.c +#, c-format +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 для --filters%u з %s МіБ до %s МіБ, щоб не перевищувати обмеження на використання пам'яті у %s МіБ" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Помилка під час спроби перейти до ланцюжка фільтрів %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Помилка під час створення каналу: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: помилка poll(): %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: здається, файл пересунуто; не вилучаємо" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: не вдалося вилучити: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: не вдалося встановити власника файла: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: не вдалося встановити групу власника файла: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: не вдалося встановити права доступу до файла: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: не вдалося синхронізувати файл: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: не вдалося синхронізувати каталог файла: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Помилка під час спроби отримання прапорців стану файла зі стандартного джерела вхідних даних: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: є символічним посиланням; пропускаємо" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: є каталогом; пропускаємо" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: не є звичайним файлом; пропускаємо" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: для файла встановлено біт setuid або setgid; пропускаємо" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: для файла встановлено липкий біт; пропускаємо" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: виявлено декілька жорстких посилань на файл із вхідними даними; пропускаємо" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Порожня назва файла; пропускаємо" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Помилка під час спроби відновлення прапорців стану для стандартного джерела вхідних даних: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Помилка під час спроби отримання прапорців стану файла зі стандартного виведення: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s: не вдалося відкрити каталог: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s: призначення не є звичайним файлом" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Помилка під час спроби відновлення прапорця O_APPEND для стандартного виведення: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: не вдалося закрити файл: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: помилка позиціювання під час спроби створити розріджений файл: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: помилка читання: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: помилка позиціювання у файлі: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: неочікуваний кінець файла" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: помилка під час спроби запису: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Вимкнено" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Обсяг фізичної пам'яті (RAM): " + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Кількість потоків обробки процесором:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Стискання:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Розпакування:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Багатопотокове розпаковування:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Типове для -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Дані щодо обладнання:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Обмеження на використання пам'яті:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Потоки:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Блоки:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Стиснутий розмір:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Нестиснутий розмір:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Пропорція:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Перевірка:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Доповнення потоку:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Потрібний об'єм пам'яті:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Розмір у заголовках:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Кількість файлів:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Потік" + +#: src/xz/list.c +msgid "Block" +msgstr "Блок" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Блоки" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "СтисЗсув" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "НестисЗсув" + +#: src/xz/list.c +msgid "CompSize" +msgstr "СтисРозмір" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "НестисРозмір" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "Загальний розмір" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Пропорція" + +#: src/xz/list.c +msgid "Check" +msgstr "Перевірка" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "ЗначПерев" + +#: src/xz/list.c +msgid "Padding" +msgstr "Заповн" + +#: src/xz/list.c +msgid "Header" +msgstr "Заголов" + +#: src/xz/list.c +msgid "Flags" +msgstr "Прапор" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "ВикПам" + +#: src/xz/list.c +msgid "Filters" +msgstr "Фільтри" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Немає" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "Невідомо-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "Невідомо-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "Невідомо-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "Невідомо-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "Невідомо-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "Невідомо-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "Невідомо-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "Невідом-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "Невідом-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "Невідом-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "Невідом-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "Невідом-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: файл порожній" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: є надто малим для коректного файла .xz" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Потоки Блоки Стиснуті Нестиснуті Коеф. Перев. Назва файла" + +#: src/xz/list.c +msgid "Yes" +msgstr "Так" + +#: src/xz/list.c +msgid "No" +msgstr "Ні" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "Мінімальна версія програм XZ:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s файл\n" +msgstr[1] "%s файли\n" +msgstr[2] "%s файлів\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Загалом:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list працює лише для файлів .xz (--format=xz або --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Спробуйте «lzmainfo» із файлами .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "Використання --list скасовує підтримку читання зі стандартного джерела вхідних даних" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: помилка під час читання назв файлів: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: неочікуваний кінець вхідних даних під час читання назв файлів" + +#: src/xz/main.c +#, c-format +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 +msgid "Compression and decompression with --robot are not supported yet." +msgstr "У поточній версії ще не передбачено підтримки стискання або розпаковування з параметром --robot." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Читання даних зі стандартного джерела вхідних даних неможливе, якщо зі стандартного джерела даних виконується читання назв файлів standard input" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Внутрішня помилка (вада)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Не вдалося встановити обробники сигналів" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Немає перевірки цілісності; цілісність файлів перевірено не буде" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Непідтримуваний тип перевірки цілісності; перевірки цілісності виконано не буде" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Перевищено обмеження на використання пам'яті" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Формат файла не розпізнано" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Непідтримувані параметри" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Стиснені дані пошкоджено" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Несподіваний кінець вхідних даних" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "Потрібно %s МіБ пам'яті. Обмеження вимкнено." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "Потрібно %s МіБ пам'яті. Маємо обмеження у %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: ланцюжок фільтрування: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Спробуйте «%s --help» для отримання докладнішого опису." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "Помилка при друці тексту довідки (код помилки %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "Використання: %s [ПАРАМЕТР]... [ФАЙЛ]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "Стиснути або розпакувати файли у форматі .xz." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Обов’язкові аргументи для довгих форм запису параметрів є обов’язковими і для скорочених форм." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "Режим роботи:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "примусове стискання" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "примусове розпаковування" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "перевірити цілісність стиснутого файла" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "вивести відомості щодо файлів .xz" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "Модифікатори режиму роботи:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "зберегти (не вилучати) вхідні файли" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "примусово перезаписувати файл-результат і стискати посилання" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "записати до стандартного виведення даних і не вилучати файли вхідних даних" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "не синхронізувати файл-результат з пристроєм сховища даних до вилучення вхідного файла" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "розпакувати лише перший потік і без запитань ігнорувати решту вхідних даних" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "не створювати розріджених файлів при розпаковуванні" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".СУФ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "використати суфікс «.СУФ» для стиснутих файлів" + +#: src/xz/message.c +msgid "FILE" +msgstr "ФАЙЛ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "прочитати назви файлів для обробки з файла ФАЙЛ; якщо ФАЙЛ не вказано, назви буде прочитано зі стандартного джерела вхідних даних; список назв файлів має бути завершено символом нового рядка" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "подібно до --files, але з використанням нуль-символу як роздільника" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "Параметри базового формату файлів та стискання:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "ФОРМАТ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "формат файлів для кодування або декодування; можливі значення: auto (типовий), xz, lzma, lzip і raw" + +#: src/xz/message.c +msgid "NAME" +msgstr "НАЗВА" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "тип перевірки цілісності: none («немає», будьте обережні), crc32, crc64 (типовий) або sha256" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "не виконувати перевірку цілісності при розпаковуванні" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "рівень стискання; типовим є 6; візьміть до уваги параметри використання пам'яті для пакування і розпакування, перш ніж використовувати рівні 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "спробувати поліпшити рівень стискання ширшим використанням процесора; не впливає на вимоги щодо пам'яті для розпаковування" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "ЧИСЛО" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "використовувати не більше N потоків; типовим є значення 0, за якого програма використовує стільки потоків, скільки є ядер у процесора" + +#: src/xz/message.c +msgid "SIZE" +msgstr "РОЗМІР" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "розпочинати новий файл .xz кожні РОЗМІР байтів вхідних даних; цим параметром слід користуватися для встановлення розміру блоку для пакування у декілька потоків" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "БЛОКИ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "розпочинати нові блоки .xz після вказаних інтервалів нестиснених даних; записи відокремлюються комами; можна вказати номер ланцюжка фільтрів (0-9) із завершальною «:» до розміру нестиснених даних" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "під час стискання, якщо з часу попереднього спорожнення буфера і читання додаткового блоку вхідних даних минуло більше за ЧАС_ОЧІКУВАННЯ мілісекунд, витерти усі дані у черзі" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "ОБМЕЖЕННЯ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "встановити обмеження на використання пам'яті для стискання, розпаковування, потокового розпаковування або усіх режимів; ОБМЕЖЕННЯ слід вказувати у байтах, % RAM або вказати 0 (типове значення)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "якщо параметри стискання призводять до перевищення обмежень на пам'ять, вивести помилку і не коригувати параметри" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "Нетиповий ланцюжок фільтрування для стискання (альтернатива використання рівнів):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "ФІЛЬТРИ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "встановити ланцюжок фільтрів за допомогою синтаксису рядків фільтрів liblzma; скористайтеся --filters-help, щоб дізнатися більше" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "встановити додаткові ланцюжки фільтрів за допомогою синтаксису рядків ланцюжка фільтрів liblzma для використання з --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "вивести докладніші відомості щодо синтаксису рядків liblzma і завершити роботу" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "ПАРАМ" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 або LZMA2; ПАРАМ є список відокремлених комами нуля або декількох параметрів (коректні значення; типове):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "НАБ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "скинути параметри до початкового набору" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "розмір словника" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "кількість бітів буквального контексту" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "кількість буквальних позиційних бітів" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "кількість позиційних бітів" + +#: src/xz/message.c +msgid "MODE" +msgstr "РЕЖИМ" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "режим стискання" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "форматована довжина відповідності" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "пошук відповідників" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "максимальна глибина пошуку; 0=автоматична (типове значення)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "фільтр BCJ x86 (32-бітовий і 64-бітовий)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "фільтр BCJ ARM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "фільтр BCJ ARM-Thumb" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "фільтр BCJ ARM64" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "фільтр BCJ PowerPC (лише зі зворотним порядком байтів)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "фільтр BCJ IA-64 (Itanium)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "фільтр BCJ SPARC" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "фільтр BCJ RISC-V" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "Коректні значення ПАРАМ для усіх фільтрів BCJ:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "початковий відступ для перетворень (типовий=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "дельта-фільтр; коректні ПАРАМЕТРИ (значення; типове):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "відстань між байтами, які віднімаються один від одного" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "Інші параметри:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "придушити попередження; вкажіть двічі, щоб придушити і помилки" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "режим докладних повідомлень; вкажіть двічі для збільшення докладності" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "попередження не впливають на стан виходу" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "використовувати повідомлення для обробки комп'ютером (корисно для створення сценаріїв)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "вивести загальні дані щодо оперативної пам'яті і поточних обмежень щодо її використання, потім завершити роботу" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "показати скорочену довідку (лише список основних параметрів)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "показати цю розширену довідку і завершити роботу" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "показати цю коротку довідку і завершити роботу" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "показати розгорнуту довідку (із усіма додатковими параметрами)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "показати дані щодо версії і завершити роботу" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "Якщо вхідний файл не вказано, або якщо вказано символ -, читання буде виконано зі стандартного джерела вхідних даних." + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "Сповіщайте розробників про вади за адресою <%s> (англійською і фінською)." + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "Домашня сторінка %s: <%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ЦЕ ТЕСТОВА ВЕРСІЯ, ЯКУ НЕ ПРИЗНАЧЕНО ДЛЯ ПРОМИСЛОВОГО ВИКОРИСТАННЯ." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "Ланцюжки фільтрування встановлюються за допомогою параметрів --filters=ФІЛЬТРИ або --filters1=ФІЛЬТРИ ... --filters9=ФІЛЬТРИ. Кожен фільтр у ланцюжку можна відокремлювати від інших пробілами або «--». Крім того, можна вказати шаблон %s замість ланцюжка фільтрів." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Підтримувані фільтри та їхні параметри:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "параметри -- пари «назва=значення», відокремлені комами" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: некоректна назва параметра" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "Некоректне значення параметра" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Непідтримуваний рівень стискання LZMA1/LZMA2: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Сума lc і lp не повинна перевищувати 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: назва файла має невідомий суфікс; пропускаємо" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: файл вже має суфікс назви %s; пропускаємо" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: некоректний суфікс назви файла" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "значення не є невід'ємним десятковим цілим" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: некоректний суфікс множника" + +#: src/xz/util.c +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 +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Значення параметра «%s» має належати до діапазону [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Стиснені дані неможливо прочитати з термінала" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Стиснені дані неможливо записати до термінала" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "Користування: %s [--help] [--version] [ФАЙЛ]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "Показати відомості, що зберігаються у заголовку файла .lzma." + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Файл є надто малим, щоб бути файлом .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Не є файлом .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Не вдалося записати дані до стандартного виведення" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Невідома помилка" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "Непідтримуваний набір параметрів" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "Непідтримуваний прапорець у наборі параметрів" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "Невідома назва параметра" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "Значення параметра не може бути порожнім" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "Значення поза діапазоном" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "У цьому параметрі не передбачено використання суфіксів-множників" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "некоректний суфікс множника (KiB, MiB або GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "Невідома назва фільтра" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "Цей фільтр не можна використовувати у форматі .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "Не вдалося отримати місце у пам'яті" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "Не можна використовувати порожній рядок; спробуйте «6», якщо потрібне типове значення" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "Максимальна кількість фільтрів — чотири" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "Пропущено назву фільтра" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "Некоректний ланцюжок фільтрування (пропущено lzma2 у кінці?)" diff --git a/cpp/third_party/xz-5.8.3/po/vi.gmo b/cpp/third_party/xz-5.8.3/po/vi.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6b124fe4c6392b87cf9fa57555365f81b907035e GIT binary patch literal 16808 zcmcJV3y@q@na7V3Ur`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X1TTKVoY@42ZC}Zs>x&Ac&b^)7Y?buBD z60Xr4SE)6k7N}?aNkU3h%u2Rh&?0GiEE{hiptkIU2`}81gOz(SmB0jLdkxc*eFE!{ z%=luLrsw;`O~=blvsD+EF3HkR!l|RgG&Jl$&Thd~3MP4FBjHHExuRWIwOT)?osy7q z+UY!H!x<&bLocz!Cgv`!+*U+$D=a3tJ_!dJJtdfj|3u$e$XH@xnrMfml3CY}m~FMm zL*vG8F>jn4th6Vl;`ppG?euWt%`|}9M@n*vDAwS zG;3+qQtgUln=6wKOOp@F)JDk$5e^;0pd*!~92r`!@qTru@4ar<rUXXxW=maZA({{g6H6CMBn literal 0 HcmV?d00001 diff --git a/cpp/third_party/xz-5.8.3/po/vi.po b/cpp/third_party/xz-5.8.3/po/vi.po new file mode 100644 index 0000000000..c46e1303e8 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/vi.po @@ -0,0 +1,1671 @@ +# SPDX-License-Identifier: 0BSD +# +# Vietnamese translations for xz package +# Bản dịch tiếng Việt cho gói xz. +# This file is published under the BSD Zero Clause License. +# Trần Ngọc Quân , 2014-2024. +# +msgid "" +msgstr "" +"Project-Id-Version: xz 5.6.0-pre2\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2024-02-24 10:23+0700\n" +"Last-Translator: Trần Ngọc Quân \n" +"Language-Team: Vietnamese \n" +"Language: vi\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: Gtranslator 42.0\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s: Đối số cho --block-list không hợp lệ" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s: Quá nhiều đối số cho --block-list" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "Trong --block-list, cỡ khối thiếu sau số mắt xích bộ lọc '%c:'" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 chỉ có thể dùng như là phần tử cuối trong --block-list" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s: Không hiểu kiểu định dạng tập tin" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s: Không hỗ trợ kiểu kiểm tra toàn vẹn" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "Chỉ được đưa ra một tập tin cho “--files” hay “--files0”." + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s: %s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "Biến môi trường %s chứa quá nhiều đối số" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "Hỗ trợ nén đã bị vô hiệu hóa tại thời điểm biên dịch" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "Hỗ trợ giải nén đã bị vô hiệu hóa tại thời điểm biên dịch" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "Nén tệp lzip (.lz) không được hỗ trợ" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list bị bỏ qua trừ khi nén theo định dạng .xz" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "Với --format=raw, --suffix=.SUF được yêu cầu trừ trường hợp ghi ra đầu ra tiêu chuẩn" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "Số lượng bộ lọc tối đa là bốn" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "Có lỗi trong tùy chọn --filters%s=FILTERS:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "Mức giới hạn dùng bộ nhớ là quá thấp cho việc cài đặt bộ lọc đã cho." + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "móc xích lọc %u được sử dụng bởi --block-list nhưng lại chưa đưa ra gì với --filters%u=" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "Dùng hiện tại trong chế độ thô là ngớ ngẩn." + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "Các tùy chọn trích xuất của chỉnh trước có thể biến đổi phụ thuộc vào phiên bản." + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "Định dạng .lzma chỉ hỗ trợ bộ lọc LZMA1" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 không thể được dùng với định dạng .xz" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "Móc xích lọc %u là không tương thích với --flush-timeout" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "Chuyển sang chế độ đơn tuyến trình bởi vì --flush-timeout" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "Các tùy chọn không được hỗ trợ trong chuỗi móc xích %u" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "Dùng đến % tuyến trình." + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "Không hỗ trợ lọc móc xích hay tùy chọn lọc" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "Giải nén sẽ cần %s MiB bộ nhớ." + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "Đã giảm số lượng tuyến trình từ %s xuống %s để không vượt quá giới hạn sử dụng bộ nhớ là %s MiB" + +#: src/xz/coder.c +#, 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 "Đã giảm số lượng tuyến trình từ %s xuống còn một. Giới hạn sử dụng bộ nhớ tự động %s MiB vẫn đang bị vượt quá. Cần có %s MiB bộ nhớ. Vẫn tiếp tục." + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "Chuyển sang chế độ đơn tuyến trình để không vượt quá giới hạn sử dụng bộ nhớ là %sMiB" + +#: src/xz/coder.c +#, 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 "Chỉnh cỡ từ điển LZMA%c từ %s MiB thành %s MiB để không vượt quá giới hạn tiêu dùng bộ nhớ là %s MiB" + +#: src/xz/coder.c +#, c-format +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 "Chỉnh cỡ từ điển LZMA%c cho --filters%u từ %s MiB thành %s MiB để không vượt quá giới hạn tiêu dùng bộ nhớ là %s MiB" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "Gặp lỗi thay đổi chuỗi móc xích lọc %u: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "Gặp lỗi khi tạo một ống dẫn: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s: hàm poll() bị lỗi: %s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s: Tập tin có lẽ đã bị di chuyển, không phải gỡ bỏ" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s: Không thể gỡ bỏ: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s: Không thể đặt chủ sở hữu tập tin: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s: Không thể đặt nhóm tập tin: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s: Không thể đặt chế độ đọc ghi cho tập tin: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s: Gặp lỗi khi đóng tập tin: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s: Gặp lỗi khi đóng tập tin: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "Gặp lỗi khi lấy các cờ trạng thái tập tin từ đầu vào tiêu chuẩn: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s: Là một liên kết mềm nên bỏ qua" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s: Không phải là một thư mục nên bỏ qua" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s: Không phải là tập tin thường nên bỏ qua" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s: Tập tin có đặt bít setuid hoặc setgid nên bỏ qua" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s: Tập tin có bít sticky nên bỏ qua" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s: Tập tin đầu vào có nhiều hơn một liên kết cứng nên bỏ qua" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "Tên tập tin trống rỗng nên bỏ qua" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "Gặp lỗi khi phục hồi các cờ trạng thái tới đầu vào tiêu chuẩn: %s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "Gặp lỗi khi lấy các cờ trạng thái tập tin từ đầu vào tiêu chuẩn: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s: Gặp lỗi khi đóng tập tin: %s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s: Không phải là tập tin thường nên bỏ qua" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "Gặp lỗi khi phục hồi cờ O_APPEND trên đầu ra tiêu chuẩn: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s: Gặp lỗi khi đóng tập tin: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s: Gặp lỗi khi di chuyển vị trí đọc khi cố tạo một tập tin rải rác: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s: Lỗi đọc: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s: Gặp lỗi khi di chuyển vị trí đọc tập tin: %s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s: Kết thúc tập tin bất ngờ" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s: Lỗi ghi: %s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "Bị tắt" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "Tổng dung lượng bộ nhớ vật lý (RAM):" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "Số luồng bộ xử lý:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "Nén:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "Giải nén:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "Giải nén đa luồng:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "Mặc định cho -T0:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "Thông tin phần cứng:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "Đã chạm mốc giới hạn sử dụng bộ nhớ:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "Các luồng dữ liệu:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "Khối:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "Kích cỡ đã nén:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "Kích cỡ đã giải nén:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "Tỉ lệ:" + +#: src/xz/list.c +msgid "Check:" +msgstr "Kiểm tra:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "Đệm luồng dữ liệu:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "Bộ nhớ cần:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "Kích cỡ phần đầu:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "Số lượng tập tin:" + +#: src/xz/list.c +msgid "Stream" +msgstr "Luồng dữ liệu" + +#: src/xz/list.c +msgid "Block" +msgstr "Khối" + +#: src/xz/list.c +msgid "Blocks" +msgstr "Khối" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "BùNén" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "BùGiảiNén" + +#: src/xz/list.c +msgid "CompSize" +msgstr "CỡNén" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "CỡGiảiNén" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "CỡTổng" + +#: src/xz/list.c +msgid "Ratio" +msgstr "Tỷ lệ" + +#: src/xz/list.c +msgid "Check" +msgstr "Kiểm tra" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "Gtr.Kiểm" + +#: src/xz/list.c +msgid "Padding" +msgstr "Đệm" + +#: src/xz/list.c +msgid "Header" +msgstr "Phần đầu" + +#: src/xz/list.c +msgid "Flags" +msgstr "Cờ" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "DùngBộNhớ" + +#: src/xz/list.c +msgid "Filters" +msgstr "Bộ lọc" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "Không" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "ChưaBiết2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "ChưaBiết3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "ChưaBiết5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "ChưaBiết6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "ChưaBiết7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "ChưaBiết8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "ChưaBiết9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "ChưaBiết11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "ChưaBiết12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "ChưaBiết13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "ChưaBiết14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "ChưaBiết15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s: Tập tin trống rỗng" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s: Là quá nhỏ đối với tập tin .xz hợp lệ" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "Luồng Khối Nén Giải nén Tỷ lệ Ktra Tập tin" + +#: src/xz/list.c +msgid "Yes" +msgstr "Có" + +#: src/xz/list.c +msgid "No" +msgstr "Không" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +msgstr " Phiên bản “XZ Utils” tối thiểu: %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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s tập tin\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "Tổng cộng:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list chỉ hoạt động trên các tập tin .xz (--format=xz hay --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "Thử 'lzmainfo' với các tập tin .lzma." + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list không hỗ trợ đọc từ đầu vào tiêu chuẩn" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s: Gặp lỗi khi đọc tên tập tin: %s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s: Gặp kết thúc đầu vào bất ngờ khi đọc các tên tập tin" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "%s: Gặp ký hiệu null khi đọc tên tập tin; có lẽ ý bạn muốn là dùng “--files0” chứ không phải “--files'?" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "Nén và giải nén với --robot vẫn chưa được hỗ trợ." + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "Không thể đọc dữ liệu từ đầu vào tiêu chuẩn khi đọc tập tin từ đầu vào tiêu chuẩn" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s: " + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "Lỗi nội bộ (lỗi)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "Không thể thiết lập bộ xử lý tín hiệu" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "Không có kiểm tra toàn vẹn nên không thể thẩm tra tính toàn vẹn của tập tin" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "Kiểu kiểm tra toàn vẹn chưa được hỗ trợ; nên không thể thẩm tra tính toàn vẹn của tập tin" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "Đã chạm mốc giới hạn sử dụng bộ nhớ" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "Không nhận ra định dạng tập tin" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "Tùy chọn không được hỗ trợ" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "Dữ liệu đã nén bị hỏng" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "Gặp kết thúc đầu vào bất ngờ" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "Yêu cầu cần có %s MiB bộ nhớ. Nhưng giới hạn bị tắt." + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "Yêu cầu cần có %s MiB bộ nhớ. Nhưng giới hạn là %s." + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s: Móc xích lọc: %s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "Hãy chạy lệnh “%s --help” để xem thông tin thêm." + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"Cách dùng: %s [TÙY CHỌN]... [TẬP TIN]...\n" +"Nén hoặc giải nén các TẬP TIN có định dạng .xz.\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "Các tùy chọn dài bắt buộc phải có đối số thì với tùy chọn ngắn cũng vậy.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " Chế độ thao tác:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force compression" +msgstr "Giải nén:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force decompression" +msgstr "Giải nén:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +" Bộ chỉnh sửa thao tác:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "Gặp lỗi khi ghi dữ liệu vào đầu ra tiêu chuẩn" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --single-stream decompress only the first stream, and silently\n" +#| " ignore possible remaining input data" +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" +" --single-stream chỉ giải nén luồng dữ liệu đầu, và bỏ qua\n" +" dữ liệu đầu vào còn lại có thể" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +" Các tùy chọn về định dạng và nén cơ bản:\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --ignore-check don't verify the integrity check when decompressing" +msgid "don't verify the integrity check when decompressing" +msgstr " --ignore-check không thẩm tra tính toàn vẹn khi giải nén" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 ... -9 đặt mức nén; mặc định là 6; tiêu dùng nhiều bộ nhớ khi nén\n" +" và giải nén, nên tính toán trước khi dùng 7-9!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme cố gắng nâng cao mức nén bằng cách dùng nhiều CPU hơn;\n" +" nhưng không yêu cần nhiều bộ nhớ khi giải nén" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n" +#| " as many threads as there are processor cores" +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +" -T, --threads=SỐ dùng tối đa là SỐ tuyến trình; mặc định là 0 ý là\n" +" dùng số lượng bằng số lõi vi xử lý" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-size=SIZE\n" +#| " start a new .xz block after every SIZE bytes of input;\n" +#| " use this to set the block size for threaded compression" +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" +" --block-size=CỠ\n" +" bắt đầu một khối .xz mới sau mỗi CỠ byte của đầu vào;\n" +" dùng tùy chọn này để đặt cỡ khối cho nén tuyến trình" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-list=BLOCKS\n" +#| " start a new .xz block after the given comma-separated\n" +#| " intervals of uncompressed data; optionally, specify a\n" +#| " filter chain number (0-9) followed by a ':' before the\n" +#| " uncompressed data size" +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" +" --block-list=CỠ\n" +" bắt đầu một khối .xz mới sau một danh sách ngăn\n" +" cách bằng dấu phẩy nhịp dữ của dữ liệu chưa nén; tùy chọn\n" +" chỉ định số móc xích bộ lọc (0-9) theo sau là ':' trước\n" +" kích cỡ dữ liệu chưa nén" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --flush-timeout=TIMEOUT\n" +#| " when compressing, if more than TIMEOUT milliseconds has\n" +#| " passed since the previous flush and reading more input\n" +#| " would block, all pending data is flushed out" +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" +" --flush-timeout=THỜI_GIAN_CHỜ\n" +" khi đang nén, nếu đã trải qua hơn THỜI_GIAN_CHỜ milli-giây\n" +" kể từ lần đẩy dữ liệu lên đĩa trước đó và đang đọc thêm\n" +" khối nữa, mọi dữ liệu đang chờ sẽ được ghi lên đĩa" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" +" --no-adjust nếu các cài đặt nén vượt quá giới hạn dùng bộ nhớ,\n" +" đưa ra một lỗi thay vì sửa đổi các cài đặt xuống" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +" Móc xích lọc tùy chỉnh cho nén (thay cho việc dùng chỉnh trước):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " --filters=FILTERS set the filter chain using the liblzma filter string\n" +#| " syntax; use --filters-help for more information" +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" +"\n" +" --filters=CÁC_BỘ_LỌC đặt móc xích bộ lọc sử dụng cú pháp chuỗi bộ lọc\n" +" liblzma dùng để biết thêm chi tiết" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters1=FILTERS ... --filters9=FILTERS\n" +#| " set additional filter chains using the liblzma filter\n" +#| " string syntax to use with --block-list" +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" +" --filters1=CÁC_BỘ_LỌC ... --filters9=CÁC_BỘ_LỌC\n" +" đặt móc xích lọc thêm sử dụng cú pháp chuỗi bộ lọc\n" +" liblzma để dùng với --block-list" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters-help display more information about the liblzma filter string\n" +#| " syntax and exit." +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" +" --filters-help hiển thị thêm thông tin về cú pháp bộ lọc liblzma\n" +" rồi thoát." + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Number of processor threads:" +msgid "number of position bits" +msgstr "Số luồng bộ xử lý:" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "compression mode" +msgstr "Giải nén:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" Tùy chọn khác:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr "" +" -Q, --no-warn làm cho các cảnh báo không ảnh hưởng đến\n" +" trạng thái thoát" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr "" +" --robot dùng các thông báo mà máy có thể phân tích\n" +" (hữu dụng với scripts)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" +" --info-memory hiển thị tổng lượng RAM và mức giới hạn tiêu dùng\n" +" bộ nhớ hiện tại, rồi thoát" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version hiển thị số phiên bản và thoát" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"Không có TẬP_TIN, hoặc TẬP_TIN là “-”, thì đọc đầu vào tiêu chuẩn.\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"Hãy báo cáo lỗi cho <%s> (bằng tiếng Anh hoặc Phần Lan).\n" +"Thông báo lỗi dịch cho: .\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "Trang chủ %s: <%s>.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "ĐÂY LÀ PHIÊN BẢN PHÁT TRIỂN VÀ NÓ KHÔNG PHÙ HỢP VỚI MỤC ĐÍCH SẢN XUẤT." + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy, c-format +#| 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" +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" +"Các móc xích lọc được đặt bằng --filters=CÁC_BỘ_LỌC hoặc các tùy chọn\n" +"--filters1=CÁC_BỘ_LỌC ... --filters9=CÁC_BỘ_LỌC. Mỗi bộ lọc trong chuỗi\n" +"có thể được ngăn cách bằng khoảng trắng hoặc '--'. Cách khác là dùng <0-9>[e]\n" +"để chỉ định thay thay cho móc xích lọc.\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "Các bộ lọc và các tùy chọn của chúng được hỗ trợ là:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be 'name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s: Các tùy chọn phải là các cặp “tên=giá_trị” ngăn cách nhau bằng dấu phẩy" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s: Tên tùy chọn không hợp lệ" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s: Giá trị của tùy chọn không hợp lệ" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "Hiện nay chưa hỗ trợ LZMA1/LZMA2: %s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "Tổng số lượng lc và lp không được vượt quá 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s: Tên tập tin có phần hậu tố chưa biết nên bỏ qua" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s: Tập tin đã sẵn có hậu tố “%s” nên bỏ qua" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s: Hậu tố tên tập tin không hợp lệ" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s: Giá trị không phải là số thập phân nguyên không âm" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s: Hậu tố (đơn vị) nhân tố không hợp lệ" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "Các hậu tố (đơn vị) hợp lệ là “KiB” (2^10), “MiB” (2^20), và “GiB” (2^30)." + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "Giá trị của tùy chọn “%s” phải nằm trong vùng [%, %]" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "Dữ liệu đã nén không thể đọc từ thiết bị cuối" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "Dữ liệu đã nén không thể ghi ra thiết bị cuối" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" +"Cách dùng: %s [--help] [--version] [TẬP TIN]...\n" +"Hiển thị thông tin được lưu trong phần đầu của tập tin .lzma" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Show information stored in the .lzma file header." +msgstr "" +"Cách dùng: %s [--help] [--version] [TẬP TIN]...\n" +"Hiển thị thông tin được lưu trong phần đầu của tập tin .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "Tập tin quá nhỏ để có thể là một tin .lzma" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "Không phải là một tập tin .lzma" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "Gặp lỗi khi ghi dữ liệu vào đầu ra tiêu chuẩn" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "Lỗi chưa biết" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "Tùy chọn không được hỗ trợ" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "Không hỗ trợ lọc móc xích hay tùy chọn lọc" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s: Tên tùy chọn không hợp lệ" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s: Hậu tố (đơn vị) nhân tố không hợp lệ" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s: Không hiểu kiểu định dạng tập tin" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "LZMA1 không thể được dùng với định dạng .xz" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "Số lượng bộ lọc tối đa là bốn" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress ép buộc nén\n" +#~ " -d, --decompress ép buộc giải nén\n" +#~ " -t, --test kiểm tra tính toàn vẹn của tập tin nén\n" +#~ " -l, --list liệt kê các thông tin về tập tin .xz" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep giữ lại (đừng xóa) tập tin đầu vào\n" +#~ " -f, --force buộc ghi đè tập tin đầu ra và (giải) nén các liên kết\n" +#~ " -c, --stdout ghi ra đầu ra tiêu chuẩn và không xóa tập tin đầu vào" + +#~ 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" +#~ msgstr "" +#~ " --no-sparse đừng tạo các tập tin rải rác khi giải nén\n" +#~ " -S, --suffix=.ĐUÔI dùng hậu tố “.ĐUÔI” trên các tập tin nén\n" +#~ " --files[=TẬP-TIN] đọc các tập tin cần xử lý từ TẬP-TIN; nếu không có\n" +#~ " TẬP-TIN thì tên tập tin sẽ được đọc vào từ đầu vào tiêu\n" +#~ " chuẩn; chúng phải được kết thúc bằng ký tự dòng mới\n" +#~ " --files0[=TẬP-TIN] giống --files nhưng ký tự kết thúc là null" + +#~ 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'" +#~ msgstr "" +#~ " -F, --format=ĐDạng định dạng tập tin cần mã hóa hoặc giải mã; giá trị có thể\n" +#~ " là “auto” (mặc định), “xz”, “lzma”, “lzip”, và “raw”\n" +#~ " -C, --check=KIỂM kiểu kiểm tra toàn vẹn: “none” (thận trọng khi dùng),\n" +#~ " “crc32”, “crc64” (mặc định), hay “sha256”" + +#, no-c-format +#~ msgid "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ msgstr "" +#~ " --memlimit-compress=GIỚI_HẠN\n" +#~ " --memlimit-decompress=GIỚI_HẠN\n" +#~ " --memlimit-mt-decompress=GIỚI_HẠN\n" +#~ " -M, --memlimit=GIỚI_HẠN\n" +#~ " đặt mức giới hạn dùng bộ nhớ cho việc nén, giải nén,\n" +#~ " giải nén tuyến trình, hoặc tất cả; GIỚI_HẠN có đơn vị là\n" +#~ " byte, % của RAM, hay 0 cho mặc định" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ " --lzma1[=CTC] LZMA1 hay LZMA2; CÁC-TÙY-CHỌN là danh sách của không hoặc\n" +#~ " --lzma2[=CTC] hơn các tùy chọn sau đây (giá trị hợp lệ; mặc định):\n" +#~ " preset=PRE các tùy chọn tối ưu nén (0-9[e])\n" +#~ " dict=SỐ cỡ từ điển (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=SỐ số bít ngữ cảnh văn bản (0-4; 3)\n" +#~ " lp=SỐ số bít vị trí văn bản (0-4; 0)\n" +#~ " pb=SỐ số bít vị trí (0-4; 2)\n" +#~ " mode=CHẾ_ĐỘ chế độ nén (fast, normal; normal)\n" +#~ " nice=SỐ chiều dài “tốt” của khớp (2-273; 64)\n" +#~ " mf=TÊN bộ tìm khớp (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=SỐ mức sâu tìm kiếm tối đa; 0=tự động (mặc định)" + +#~ 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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ msgstr "" +#~ "\n" +#~ " --x86[=OPTS] bộ lọc x86 BCJ (32-bit và 64-bit)\n" +#~ " --arm[=OPTS] bộ lọc ARM BCJ\n" +#~ " --armthumb[=OPTS] bộ lọc ARM-Thumb BCJ\n" +#~ " --arm64[=OPTS] bộ lọc ARM64 BCJ\n" +#~ " --powerpc[=OPTS] bộ lọc PowerPC BCJ (chỉ big endian)\n" +#~ " --ia64[=OPTS] bộ lọc IA-64 (Itanium) BCJ\n" +#~ " --sparc[=OPTS] bộ lọc SPARC BCJ\n" +#~ " --riscv[=OPTS] bộ lọc RISC-V BCJ\n" +#~ " các tùy chọn hợp lệ cho mọi bộ lọc BCJ:\n" +#~ " start=SỐ khoảng bù khởi đầu cho chuyển đổi (mặc định=0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=OPTS] bộ lọc Delta;\n" +#~ " CÁC-TÙY-CHỌN hợp lệ (giá trị hợp lệ; mặc định):\n" +#~ " dist=SỐ khoảng cách giữa các byte được trừ từ\n" +#~ " những cái khác (1-256; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet không xuất các cảnh báo;\n" +#~ " chỉ định hai lần nến bạn muốn chặn cả báo lỗi\n" +#~ " -v, --verbose thông báo chi tiết; dùng hai lần nếu muốn chi tiết hơn" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help hiển thị trợ giúp dạng ngắn gọn\n" +#~ " (chỉ liệt kê các tùy chọn cơ bản)\n" +#~ " -H, --long-help hiển thị trợ giúp đầy đủ rồi thoát" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help hiển thị trợ giúp dạng ngắn gọn rồi thoát\n" +#~ " -H, --long-help hiển thị trợ giúp đầy đủ\n" +#~ " (liệt kê cả những tùy chọn cấp cao)" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "Không bật được sandbox" + +#~ msgid "Memory usage limit for compression: " +#~ msgstr "Mức giới hạn dùng bộ nhớ cho nén: " + +#~ msgid " Streams: %s\n" +#~ msgstr " Luồng dữ liệu: %s\n" + +#~ msgid " Blocks: %s\n" +#~ msgstr " Khối: %s\n" + +#~ msgid " Ratio: %s\n" +#~ msgstr " Tỷ lệ nén: %s\n" + +#~ msgid " Check: %s\n" +#~ msgstr " Kiểm tra: %s\n" + +#~ msgid "" +#~ " Streams:\n" +#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" +#~ msgstr "" +#~ " Luồng dữ liệu:\n" +#~ " Luồng Khối BùNén BùGiảiNén CỡNén CỡGiảiNén TỷLệ Ktra Đệm" + +#~ msgid "" +#~ " Blocks:\n" +#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check" +#~ msgstr "" +#~ " Khối:\n" +#~ " Luồng Khối BùNén BùGiảiNén CỡTổng CỡGiảiNén TỷLệ Ktra" + +#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" +#~ msgstr " GTrịKiểm %*s Đầu Cờ CỡNén DùngRAM BộLọc" + +#~ msgid "The selected match finder requires at least nice=%" +#~ msgstr "Bộ tìm khớp đã chọn yêu cầu mức “tốt” ít nhất là nice=%" + +#~ msgid "Error setting O_NONBLOCK on standard input: %s" +#~ msgstr "Lỗi cài đặt O_NONBLOCK trên đầu vào tiêu chuẩn: %s" + +#~ msgid "Error setting O_NONBLOCK on standard output: %s" +#~ msgstr "Lỗi cài đặt O_NONBLOCK trên đầu ra tiêu chuẩn: %s" + +#~ msgid "" +#~ " --block-size=SIZE\n" +#~ " when compressing to the .xz format, start a new block\n" +#~ " after every SIZE bytes of input; 0=disabled (default)" +#~ msgstr "" +#~ " --block-size=CỠ\n" +#~ " khi nén thành định dạng .xz, bắt đầu khối mới\n" +#~ " sau mỗi SỐ byte đầu vào; 0=tắt (mặc định)" diff --git a/cpp/third_party/xz-5.8.3/po/xz.pot b/cpp/third_party/xz-5.8.3/po/xz.pot new file mode 100644 index 0000000000..01e8484062 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/xz.pot @@ -0,0 +1,1264 @@ +# 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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: xz 5.8.3\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-27 18:13+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "" + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "" + +#: src/xz/coder.c +#, c-format +msgid "filter chain %u used by --block-list but not specified with --filters%u=" +msgstr "" + +#: src/xz/coder.c +msgid "Using a preset in raw mode is discouraged." +msgstr "" + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "" + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr "" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "" + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "" + +#: src/xz/coder.c +#, c-format +msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" +msgstr "" + +#: src/xz/coder.c +#, 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 "" + +#: src/xz/coder.c +#, c-format +msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB" +msgstr "" + +#: src/xz/coder.c +#, 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 "" + +#: src/xz/coder.c +#, c-format +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 "" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "" + +#: src/xz/list.c +msgid "Streams:" +msgstr "" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "" + +#: src/xz/list.c +msgid "Check:" +msgstr "" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "" + +#: src/xz/list.c +msgid "Stream" +msgstr "" + +#: src/xz/list.c +msgid "Block" +msgstr "" + +#: src/xz/list.c +msgid "Blocks" +msgstr "" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "" + +#: src/xz/list.c +msgid "CompSize" +msgstr "" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "" + +#: src/xz/list.c +msgid "Ratio" +msgstr "" + +#: src/xz/list.c +msgid "Check" +msgstr "" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "" + +#: src/xz/list.c +msgid "Padding" +msgstr "" + +#: src/xz/list.c +msgid "Header" +msgstr "" + +#: src/xz/list.c +msgid "Flags" +msgstr "" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "" + +#: src/xz/list.c +msgid "Filters" +msgstr "" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr "" + +#: src/xz/list.c +msgid "Yes" +msgstr "" + +#: src/xz/list.c +msgid "No" +msgstr "" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "" +msgstr[1] "" + +#: src/xz/list.c +msgid "Totals:" +msgstr "" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "" + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "" + +#: src/xz/main.c +#, c-format +msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?" +msgstr "" + +#: src/xz/main.c +msgid "Compression and decompression with --robot are not supported yet." +msgstr "" + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of position bits" +msgstr "" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "" + +#: src/xz/util.c +msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)." +msgstr "" + +#: src/xz/util.c +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" diff --git a/cpp/third_party/xz-5.8.3/po/xz.pot-header b/cpp/third_party/xz-5.8.3/po/xz.pot-header new file mode 100644 index 0000000000..6d277c90f2 --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po/xz.pot-header @@ -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 , YEAR. +# diff --git a/cpp/third_party/xz-5.8.3/po/zh_CN.gmo b/cpp/third_party/xz-5.8.3/po/zh_CN.gmo new file mode 100644 index 0000000000000000000000000000000000000000..b9206e45833f169c59ad5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U#F^82rI?QG8m4^8dtxUO;LF4s58>z8wt_%HSUn}D!HQ$TJcxq`Ah9f0WNzwgCP z, 2019, 2022, 2023, 2024. +# Mingye Wang , 2024. +# +msgid "" +msgstr "" +"Project-Id-Version: xz-5.6.0-pre2\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2024-08-27 13:08+0800\n" +"Last-Translator: Mingye Wang (Artoria2e5) \n" +"Language-Team: Chinese (simplified) \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"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.4.4\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s:--block-list 的无效参数" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s:--block-list 得到过多参数" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "在 --block-list 中,块大小在过滤器链编号 '%c:' 之后缺失" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 仅可用于 --block-list 的最后一个元素" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s:未知文件格式类型" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s:不支持的完整性检查类型" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "仅可使用 '--files' 或 '--files0' 指定单个文件。" + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s:%s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "环境变量 %s 包含过多参数" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "压缩支持已在构建时禁用" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "解压支持已在构建时禁用" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "不支持对 lzip 文件 (.lz) 的压缩" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "除非压缩为 .xz 格式,--block-list 将被忽略" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "启用 --format-raw 选项时,必须指定 --suffix=.SUF 获知写入至标准输出" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "过滤器最多数量为四" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "在 --filters%s=过滤器 选项中出现错误:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "内存用量限制对指定过滤器设置过低。" + +#: src/xz/coder.c +#, 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 +msgid "Using a preset in raw mode is discouraged." +msgstr "不推荐在 raw 模式使用预设等级。" + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "各个预设等级所使用的准确选项列表在不同软件版本之间可能不同。" + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr ".lzma 格式只支持 LZMA1 过滤器" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 无法用于 .xz 格式" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "过滤器链 %u 和 --flush-timeout 不兼容" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "因 --flush-timeout 而切换至单线程模式" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "过滤器链 %u 中存在不支持的选项" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "使用最多 % 个线程。" + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "不支持的过滤器链或过滤器选项" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "解压缩需要 %s MiB 的内存。" + +#: src/xz/coder.c +#, 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 +#, 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 +#, 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 +#, 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/coder.c +#, c-format +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 "已调整 --filters%2$u LZMA%1$c 字典大小(从 %3$s MiB 调整为 %4$s MiB),以不超出 %5$s MiB 的内存用量限制" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "更改为过滤器链 %u 时出错:%s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "创建管道时出错:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s:poll() 失败:%s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s:文件似乎已移动,不再进行删除操作" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s:无法删除:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s:无法设置文件所有者:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s:无法设置文件所有组:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s:无法设置文件权限:%s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s:关闭文件失败:%s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s:关闭文件失败:%s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "从标准输入获取文件状态标志出错:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s:是符号链接,跳过" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s:是目录,跳过" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s:不是标准文件,跳过" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s:文件有设置用户ID或设置组ID标识,跳过" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s:文件有粘滞位标识,跳过" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s:输入文件有多于一个硬链接,跳过" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "空文件名,跳过" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "回复标准输入的状态标志时出错:%s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "获取标准输出的文件状态标志时出错:%s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Closing the file failed: %s" +msgid "%s: Opening the directory failed: %s" +msgstr "%s:关闭文件失败:%s" + +#: src/xz/file_io.c +#, fuzzy, c-format +#| msgid "%s: Not a regular file, skipping" +msgid "%s: Destination is not a regular file" +msgstr "%s:不是标准文件,跳过" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "恢复标准输出的 O_APPEND 标志时出错:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s:关闭文件失败:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s:尝试创建稀疏文件时 seek 失败:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s:读取错误:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s:seek 文件时出错:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s:未预期的文件结束" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s:写入错误:%s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "已禁用" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "物理内存(RAM)用量:" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "处理器线程数:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "压缩:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "解压缩:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "多线程解压缩:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "-T0 的默认值:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "硬件信息:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "内存使用限制:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "流:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "块:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "压缩后大小:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "解压缩大小:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "比例:" + +#: src/xz/list.c +msgid "Check:" +msgstr "校验:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "流填充大小:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "所需内存:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "头部存放大小:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "文件数量:" + +#: src/xz/list.c +msgid "Stream" +msgstr "流" + +#: src/xz/list.c +msgid "Block" +msgstr "块" + +#: src/xz/list.c +msgid "Blocks" +msgstr "块" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "压缩偏移量" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "解压偏移量" + +#: src/xz/list.c +msgid "CompSize" +msgstr "压缩后大小" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "解压缩大小" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "总大小" + +#: src/xz/list.c +msgid "Ratio" +msgstr "比例" + +#: src/xz/list.c +msgid "Check" +msgstr "校验" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "校验值" + +#: src/xz/list.c +msgid "Padding" +msgstr "填充" + +#: src/xz/list.c +msgid "Header" +msgstr "头部" + +#: src/xz/list.c +msgid "Flags" +msgstr "标志" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "内存用量" + +#: src/xz/list.c +msgid "Filters" +msgstr "过滤器" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "无" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "未知-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "未知-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "未知-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "未知-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "未知-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "未知-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "未知-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "未知-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "未知-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "未知-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "未知-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "未知-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s:文件为空" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s:过小,不可能是有效的 .xz 文件" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr " 流 块 压缩大小 解压大小 比例 校验 文件名" + +#: src/xz/list.c +msgid "Yes" +msgstr "是" + +#: src/xz/list.c +msgid "No" +msgstr "否" + +#: src/xz/list.c +#, fuzzy +#| msgid " Minimum XZ Utils version: %s\n" +msgid "Minimum XZ Utils version:" +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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s 文件\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "总计:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list 仅适用于 .xz 文件(--format=xz 或 --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "试试用“lzmainfo”处理 .lzma 文件。" + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list 不支持从标准输入读取" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s:读取文件名列表时出错:%s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s:读取文件名列表时遇到未预期的输入结束" + +#: src/xz/main.c +#, c-format +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 +msgid "Compression and decompression with --robot are not supported yet." +msgstr "尚不支持带 --robot 的压缩和解压缩。" + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "无法同时从标准输入读取数据和文件名列表" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s:" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "内部错误(bug)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "无法建立信号处理器" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "无完整性检查;将不验证文件完整性" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "不支持的完整性检查类型;将不验证文件完整性" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "达到内存使用限制" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "无法识别文件格式" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "不支持的选项" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "压缩数据已损坏" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "输入意外结束" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "需要 %s MiB 的内存空间。限制已禁用。" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "需要 %s MiB 的内存空间。限制为 %s。" + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s:过滤器链:%s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "请尝试执行 '%s --help' 来获取更多信息。" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "Usage: %s [OPTION]... [FILE]...\n" +#| "Compress or decompress FILEs in the .xz format.\n" +#| "\n" +msgid "Compress or decompress FILEs in the .xz format." +msgstr "" +"用法:%s [选项]... [文件]...\n" +"使用 .xz 格式压缩或解压缩文件。\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Mandatory arguments to long options are mandatory for short options too.\n" +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "必选参数对长短选项同时适用。\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " Operation mode:\n" +msgid "Operation mode:" +msgstr " 操作模式:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force compression" +msgstr "解压缩:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "force decompression" +msgstr "解压缩:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Operation modifiers:\n" +msgid "Operation modifiers:" +msgstr "" +"\n" +" 操作修饰符:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Writing to standard output failed" +msgid "write to standard output and don't delete input files" +msgstr "写入标准输出失败" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --single-stream decompress only the first stream, and silently\n" +#| " ignore possible remaining input data" +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr " --single-stream 仅解压缩第一个流,忽略其后可能继续出现的输入数据" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "" + +#: src/xz/message.c +msgid ".SUF" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "" + +#: src/xz/message.c +msgid "FILE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Basic file format and compression options:\n" +msgid "Basic file format and compression options:" +msgstr "" +"\n" +" 基本文件格式和压缩选项:\n" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "" + +#: src/xz/message.c +msgid "NAME" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --ignore-check don't verify the integrity check when decompressing" +msgid "don't verify the integrity check when decompressing" +msgstr " --ignore-check 解压缩时不要进行完整性检查验证" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -0 ... -9 compression preset; default is 6; take compressor *and*\n" +#| " decompressor memory usage into account before using 7-9!" +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "" +" -0 ... -9 压缩预设等级;默认为 6;使用 7-9 的等级之前,请先考虑\n" +" 压缩和解压缩所需的内存用量!(会占用大量内存空间)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -e, --extreme try to improve compression ratio by using more CPU time;\n" +#| " does not affect decompressor memory requirements" +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "" +" -e, --extreme 尝试使用更多 CPU 时间来改进压缩比率;\n" +" 不会影响解压缩的内存需求量" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n" +#| " as many threads as there are processor cores" +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "" +" -T, --threads=数量 使用最多指定数量的线程;默认值为 0,即\n" +" 可以使用与处理器内核数量相同的线程数" + +#: src/xz/message.c +msgid "SIZE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-size=SIZE\n" +#| " start a new .xz block after every SIZE bytes of input;\n" +#| " use this to set the block size for threaded compression" +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "" +" --block-size=块大小\n" +" 输入每读取指定块大小的数据后即开始一个新的 .xz 块;\n" +" 使用该选项可以设置多线程压缩中的块大小" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --block-list=BLOCKS\n" +#| " start a new .xz block after the given comma-separated\n" +#| " intervals of uncompressed data; optionally, specify a\n" +#| " filter chain number (0-9) followed by a ':' before the\n" +#| " uncompressed data size" +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "" +" --block-list=块大小列表\n" +" 在所给出的未压缩数据间隔大小的数据之后开始一个新的\n" +" .xz 块(使用逗号分隔)\n" +" 可选:在未压缩大小之前提供一个过滤器链号(0-9),用\n" +" “:”和大小分开" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --flush-timeout=TIMEOUT\n" +#| " when compressing, if more than TIMEOUT milliseconds has\n" +#| " passed since the previous flush and reading more input\n" +#| " would block, all pending data is flushed out" +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "" +" --flush-timeout=超时时间\n" +" 进行压缩时,如果从上次刷洗输出之后经过了指定的超时时间\n" +" 且读取更多数据会被阻塞,则刷洗输出所有缓冲数据" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --no-adjust if compression settings exceed the memory usage limit,\n" +#| " give an error instead of adjusting the settings downwards" +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr " --no-adjust 如果压缩设置超出内存用量限制,不调整设置而直接报错" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Custom filter chain for compression (alternative for using presets):" +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "" +"\n" +" 用于压缩的自定义过滤器链(不使用预设等级时的备选用法):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " --filters=FILTERS set the filter chain using the liblzma filter string\n" +#| " syntax; use --filters-help for more information" +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "" +"\n" +"--filters=FILTERS 使用 liblzma 过滤器字符串语法设置过滤器链\n" +" 使用 --filters-help 了解更多信息" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters1=FILTERS ... --filters9=FILTERS\n" +#| " set additional filter chains using the liblzma filter\n" +#| " string syntax to use with --block-list" +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "" +"--filters1=过滤器 ... --filters9=过滤器\n" +" 使用 liblzma 过滤器语法设置其他过滤器链,\n" +" 与 --block-list 一起使用的" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --filters-help display more information about the liblzma filter string\n" +#| " syntax and exit." +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "" +"--filters-help 显示有关 liblzma 过滤器字符串语法的更多信息\n" +" 然后退出。" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal context bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "number of literal position bits" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Number of processor threads:" +msgid "number of position bits" +msgstr "处理器线程数:" + +#: src/xz/message.c +msgid "MODE" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "Decompression:" +msgid "compression mode" +msgstr "解压缩:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| "\n" +#| " Other options:\n" +msgid "Other options:" +msgstr "" +"\n" +" 其它选项:\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -Q, --no-warn make warnings not affect the exit status" +msgid "make warnings not affect the exit status" +msgstr " -Q, --no-warn 使得警告信息不影响程序退出返回值" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " --robot use machine-parsable messages (useful for scripts)" +msgid "use machine-parsable messages (useful for scripts)" +msgstr " --robot 使用机器可解析的信息(对于脚本有用)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid "" +#| " --info-memory display the total amount of RAM and the currently active\n" +#| " memory usage limits, and exit" +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr " --info-memory 显示 RAM 总量和当前配置的内存用量限制,然后退出" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +#| msgid " -V, --version display the version number and exit" +msgid "display the version number and exit" +msgstr " -V, --version 显示软件版本号并退出" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "\n" +#| "With no FILE, or when FILE is -, read standard input.\n" +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "" +"\n" +"如果没有指定文件,或者文件为\"-\",则从标准输入读取。\n" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "Report bugs to <%s> (in English or Finnish).\n" +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "" +"请使用英文或芬兰语向 <%s> 报告软件错误。\n" +"请使用中文向 TP 简体中文翻译团队 \n" +"报告软件的简体中文翻译错误。\n" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "%s home page: <%s>\n" +msgid "%s home page: <%s>" +msgstr "%s 主页:<%s>\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "这是开发版本,不适用于生产环境使用。" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy, c-format +#| 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" +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "" +"设置过滤器链使用 --filters=FILTERS 或\n" +"--filters1=FILTER … --filters9=FILTER选项。链中的每个过滤器\n" +"可以用空格或“--”分隔。或者可以指定预设 <0-9>[e]\n" +"而不是过滤器链。\n" +"\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "支持的筛选器及其选项包括:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Options must be 'name=value' pairs separated with commas" +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "%s:选项必须按照 '名称=值' 的格式成对出现,使用半角逗号分隔" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s:无效的选项名称" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option value" +msgid "Invalid option value" +msgstr "%s:无效的选项值" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "不支持的 LZMA1/LZMA2 预设等级:%s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "lc 和 lp 的和必须不大于 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s:文件名有未知后缀,跳过" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s:文件已有 '%s' 后缀名,跳过" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s:无效的文件名后缀" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Value is not a non-negative decimal integer" +msgid "Value is not a non-negative decimal integer" +msgstr "%s:值不是非负十进制整数" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s:无效的乘数后缀" + +#: src/xz/util.c +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 +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "选项“%s”的值必须位于 [%, %] 范围内" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "压缩数据不能从终端读取" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "压缩数据不能向终端写入" + +#: src/lzmainfo/lzmainfo.c +#, fuzzy, c-format +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "" +"用法:%s [--help] [--version] [文件]...\n" +"显示存储在 .lzma 文件头中的信息" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +#, fuzzy +#| msgid "" +#| "Usage: %s [--help] [--version] [FILE]...\n" +#| "Show information stored in the .lzma file header" +msgid "Show information stored in the .lzma file header." +msgstr "" +"用法:%s [--help] [--version] [文件]...\n" +"显示存储在 .lzma 文件头中的信息" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "%s:过小,不可能是有效的 .lzma 文件" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "不是 .lzma 文件" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "写入标准输出失败" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "未知错误" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported options" +msgid "Unsupported preset" +msgstr "不支持的选项" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Unsupported filter chain or filter options" +msgid "Unsupported flag in the preset" +msgstr "不支持的过滤器链或过滤器选项" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid option name" +msgid "Unknown option name" +msgstr "%s:无效的选项名称" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Invalid multiplier suffix" +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "%s:无效的乘数后缀" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "%s: Unknown file format type" +msgid "Unknown filter name" +msgstr "%s:未知文件格式类型" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "LZMA1 cannot be used with the .xz format" +msgid "This filter cannot be used in the .xz format" +msgstr "LZMA1 无法用于 .xz 格式" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "" + +#: src/liblzma/common/string_conversion.c +#, fuzzy +#| msgid "Maximum number of filters is four" +msgid "The maximum number of filters is four" +msgstr "过滤器最多数量为四" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "" + +#~ msgid "" +#~ " -z, --compress force compression\n" +#~ " -d, --decompress force decompression\n" +#~ " -t, --test test compressed file integrity\n" +#~ " -l, --list list information about .xz files" +#~ msgstr "" +#~ " -z, --compress 强制压缩\n" +#~ " -d, --decompress 强制解压缩\n" +#~ " -t, --test 测试压缩文件完整性\n" +#~ " -l, --list 列出 .xz 文件的信息" + +#~ msgid "" +#~ " -k, --keep keep (don't delete) input files\n" +#~ " -f, --force force overwrite of output file and (de)compress links\n" +#~ " -c, --stdout write to standard output and don't delete input files" +#~ msgstr "" +#~ " -k, --keep 保留(不要删除)输入文件\n" +#~ " -f, --force 强制覆写输出文件和(解)压缩链接\n" +#~ " -c, --stdout 向标准输出写入,同时不要删除输入文件" + +#~ 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" +#~ msgstr "" +#~ " --no-sparse 解压缩时不要创建稀疏文件\n" +#~ " -S, --suffix=.SUF 压缩文件使用指定的“.SUF”后缀名\n" +#~ " --files[=文件] 从指定文件读取要处理的文件名列表;如果省略了指定文件名,\n" +#~ " 将从标准输入读取文件名列表;文件名必须使用换行符分隔、终止\n" +#~ " --files0[=文件] 类似 --files,但使用空(\\0)字符进行分隔" + +#~ 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'" +#~ msgstr "" +#~ " -F, --format=格式 要编码或解码的文件格式;可能的值包括\n" +#~ " “auto”(默认)、“xz”、“lzma”、\n" +#~ " “lzip”和“raw”\n" +#~ " -C, --check=类型 完整性检查类型:“none”(请谨慎使用)、\n" +#~ " “crc32”、“crc64”(默认)或“sha256”" + +#, no-c-format +#~ msgid "" +#~ " --memlimit-compress=LIMIT\n" +#~ " --memlimit-decompress=LIMIT\n" +#~ " --memlimit-mt-decompress=LIMIT\n" +#~ " -M, --memlimit=LIMIT\n" +#~ " set memory usage limit for compression, decompression,\n" +#~ " threaded decompression, or all of these; LIMIT is in\n" +#~ " bytes, % of RAM, or 0 for defaults" +#~ msgstr "" +#~ " --memlimit-compress=限制用量\n" +#~ " --memlimit-decompress=限制用量\n" +#~ " --memlimit-mt-decompress=限制用量\n" +#~ " -M, --memlimit=限制用量\n" +#~ " 设置压缩、解压缩、多线程解压缩或者共同的内存用量限制;\n" +#~ " 所指定限制量单位为字节,或以百分号 % 结尾表示内存比例,\n" +#~ " 或者指定 0 取软件默认值" + +#~ msgid "" +#~ "\n" +#~ " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" +#~ " --lzma2[=OPTS] more of the following options (valid values; default):\n" +#~ " preset=PRE reset options to a preset (0-9[e])\n" +#~ " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=NUM number of literal context bits (0-4; 3)\n" +#~ " lp=NUM number of literal position bits (0-4; 0)\n" +#~ " pb=NUM number of position bits (0-4; 2)\n" +#~ " mode=MODE compression mode (fast, normal; normal)\n" +#~ " nice=NUM nice length of a match (2-273; 64)\n" +#~ " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=NUM maximum search depth; 0=automatic (default)" +#~ msgstr "" +#~ "\n" +#~ " --lzma1[=选项] LZMA1 或 LZMA2;指定选项是用逗号分隔的下列选项的组合,\n" +#~ " --lzma2[=选项] 值应当为零或大于零(有效值;默认值):\n" +#~ " preset=PRE 将选项重置为预设配置 (0-9[e])\n" +#~ " dict=数字 字典大小 (4KiB - 1536MiB; 8MiB)\n" +#~ " lc=数字 literal context 位的数量 (0-4; 3)\n" +#~ " lp=数字 literal position 位的数量 (0-4; 0)\n" +#~ " pb=数字 position 位的数量 (0-4; 2)\n" +#~ " mode=模式 压缩模式 (fast, normal; normal)\n" +#~ " nice=数字 匹配的 nice 值 (2-273; 64)\n" +#~ " mf=名称 匹配搜索器 match finder\n" +#~ " (hc3, hc4, bt2, bt3, bt4; bt4)\n" +#~ " depth=数字 最大搜索深度; 0=自动(默认)" + +#~ 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" +#~ " --riscv[=OPTS] RISC-V BCJ filter\n" +#~ " Valid OPTS for all BCJ filters:\n" +#~ " start=NUM start offset for conversions (default=0)" +#~ msgstr "" +#~ "\n" +#~ " --x86[=选项] x86 BCJ 过滤器(32 位和 64 位)\n" +#~ " --arm[=选项] ARM BCJ 过滤器\n" +#~ " --armthumb[=选项] ARM-Thumb BCJ 过滤器\n" +#~ " --arm64[=选项] ARM64 BCJ 过滤器\n" +#~ " --powerpc[=选项] PowerPC BCJ 过滤器(仅大端序)\n" +#~ " --ia64[=选项] IA-64 (Itanium,安腾) BCJ 过滤器\n" +#~ " --sparc[=选项] SPARC BCJ 过滤器\n" +#~ " --riscv[=选项] RISC-V BCJ 过滤器\n" +#~ " 所有过滤器可用选项:\n" +#~ " start=数字 转换的起始偏移量(默认=0)" + +#~ msgid "" +#~ "\n" +#~ " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" +#~ " dist=NUM distance between bytes being subtracted\n" +#~ " from each other (1-256; 1)" +#~ msgstr "" +#~ "\n" +#~ " --delta[=选项] 增量过滤器;有效选项(有效值;默认值):\n" +#~ " dist=NUM 相减的字节之间的距离 (1-256; 1)" + +#~ msgid "" +#~ " -q, --quiet suppress warnings; specify twice to suppress errors too\n" +#~ " -v, --verbose be verbose; specify twice for even more verbose" +#~ msgstr "" +#~ " -q, --quiet 不显示警告信息;指定两次可不显示错误信息\n" +#~ " -v, --verbose 输出详细信息;指定两次可以输出更详细的信息" + +#~ msgid "" +#~ " -h, --help display the short help (lists only the basic options)\n" +#~ " -H, --long-help display this long help and exit" +#~ msgstr "" +#~ " -h, --help 显示短帮助信息(仅列出基本选项)\n" +#~ " -H, --long-help 显示本长帮助信息" + +#~ msgid "" +#~ " -h, --help display this short help and exit\n" +#~ " -H, --long-help display the long help (lists also the advanced options)" +#~ msgstr "" +#~ " -h, --help 显示本短帮助信息并退出\n" +#~ " -H, --long-help 显示长帮助信息(同时列出高级选项)" + +#~ msgid "Failed to enable the sandbox" +#~ msgstr "沙盒启用失败" + +#~ msgid "The selected match finder requires at least nice=%" +#~ msgstr "所选中的匹配搜索器(match finder)至少需要 nice=%" + +#~ msgid "Sandbox is disabled due to incompatible command line arguments" +#~ msgstr "沙盒已因不兼容的命令行参数而禁用" + +#~ msgid "Sandbox was successfully enabled" +#~ msgstr "已成功启用沙盒" + +#~ msgid "Memory usage limit for compression: " +#~ msgstr "用于压缩的内存用量限制: " + +#~ msgid " Streams: %s\n" +#~ msgstr " 流: %s\n" + +#~ msgid " Blocks: %s\n" +#~ msgstr " 块: %s\n" + +#~ msgid " Ratio: %s\n" +#~ msgstr " 压缩比: %s\n" + +#~ msgid " Check: %s\n" +#~ msgstr " 校验方式: %s\n" + +#~ msgid "" +#~ " Streams:\n" +#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" +#~ msgstr "" +#~ " 流:\n" +#~ " 流 块 压缩偏移量 解压偏移量 压缩大小 解压大小 比例 校验 填充" + +#~ msgid "" +#~ " Blocks:\n" +#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check" +#~ msgstr "" +#~ " 块:\n" +#~ " 流 块 压缩偏移量 解压偏移量 总计大小 解压大小 比例 校验" + +#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" +#~ msgstr " CheckVal %*s 头部 标记 压缩大小 内存使用 过滤器" diff --git a/cpp/third_party/xz-5.8.3/po/zh_TW.gmo b/cpp/third_party/xz-5.8.3/po/zh_TW.gmo new file mode 100644 index 0000000000000000000000000000000000000000..38ebcdbb81e66d155ca1fec2e3e628c92abfb716 GIT binary patch literal 26773 zcmb`P33yyrdG{{_2zEnQ!d6Pl4ULcumLe}Pi5!PGjzUc0rM4VGAcV0rk_JmNVwQMm z3zBVFa=geS-mQ3F6vt~4$BHf6ZTVW-(iT42Qs`IsSTq|@LMcnXLQ8-DbI!dpBRNiZ zo^PHU{qH^ZtnYcZ^Pb~;>n*R@`YO-!uHjD|c<<{y?_r)l^(N1IHShoMHj5+R4@vqp zzTNX`!NuToa1Hnt@Pfm?17E}Ycfi+yIZ##q6}%C=<{cKRz-rz<488|UfK_0>dp`^Q z9`FAMz90N4cr*B(ciM9E!8h}s0hQkiP6E$?>Td*`2L2~_6L|A)d*1JWjo|Nsoghtm zo4|L2M?fF^g2NH8jrZ5S%hr#Bn&%T>J$MA14t@vJxZg?R?*s1u)n63kllK@n1w0I@ zpRc>`KLc;z{as{gytUx%;N9R}R`B}YxAgrm zD0+Vu6kS$>n*VxG^LZRp{S%=0>#N}R!E4Ec#l4?^syB{7h<+y;tY z7J|2d5m5c_2G#HLpy>1^5SH<>pxV8L&aMGp555|_4%E855!ClPL9IuF!v{cE(`$9# z*MOq;I`EC)Ux4cGYoN;g02JL{&mwDlvq1H?0K67#1R2~6MP8V z2Oa=_35sreU~-M`OQ6R06;S;09Z>Du@Bv%D3e>nJfv*Q|2k!(MK#glHxB$Ei-T}Ue z#>MCJ!4HC;1MddUfh?8xE087d-dkhGF~{Mfp!nn6&g-f(_tbfVY6xAuQteyFl?xGf0L zHPxI0N;Z$RJ-2*HJ?`_q*~8)2`!#;C9|ufg0z#5DM|d0`PmU^1KwN{Eyyg_3cJb{Q6g**5jW*$!`G^|NjWo zJbn(Uoj1&~@=yor{Q>aZ;0n+Ow}FzEa}K`=Y980zW%c$XkSTjj;9J2bL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l3VpfcSO*z4I(8 ziMl#XvG&Cp3|QQ{pCNx+Ul0~6tUnBkS#~m2$Q$=kh9{6U9cVMY@>gq`*$=Zfl8~9x zW*ab5DAsDSVlT0s6VNrZDORMMt8#UfZ0i*F;|c3LA@t!SCxpFvHbRY2u|OkD&P%jh zjZlV6&$D(qW5PAE!{(9*+lGmtU&wG z$+)oM$i*#Kx%|#c#JNn&VZ%5&BPM6pIb`hLgdRbBlF?Wuw|vdD#+1FB=>qy?)(r0J zciRzj1v4D1CRt`YQRxsjd-{xy{f`na)TN5tw$l_d{BO70B7>D5yUnueR8Cn-dJ)MS z3=y6R1}jgZQyBQOcP1=(o#xT~OY9jmBBYOY$!=TY2)wCx zoM^@d;o_O%-pe7QqhK`lz&9X5lskhHOUT*?h}$9P`r@c9f@MhgddzQwRd3p&80k=x zLBuh)ZwL+U{7#NQwPCl0^XS3cp3SEB$8z1LM6>Rv5LC6YZ5RrTTsV{;ysW{nULhr@ z;FQZ_`#4KQ|LayJOCc}g`R4*R)wtqlFcc)~iC>%B^muNlhe8B@Trfe?%AI;TfAn!N z$jHzZs}h}eXKxM-tS)x#Ef?LM(KHY2QnZ49w=V^JJ)Py1frx=*dKaVW`r***<*x(<&+56w_j, 2019, 2023, 2024 +msgid "" +msgstr "" +"Project-Id-Version: xz 5.7.1-dev1\n" +"Report-Msgid-Bugs-To: xz@tukaani.org\n" +"POT-Creation-Date: 2026-03-30 17:13+0300\n" +"PO-Revision-Date: 2025-02-02 00:12+0800\n" +"Last-Translator: Yi-Jyun Pan \n" +"Language-Team: Chinese (traditional) \n" +"Language: zh_TW\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"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.5\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: src/xz/args.c +#, c-format +msgid "%s: Invalid argument to --block-list" +msgstr "%s:傳入 --block-list 的參數無效" + +#: src/xz/args.c +#, c-format +msgid "%s: Too many arguments to --block-list" +msgstr "%s:傳入 --block-list 的參數過多" + +#: src/xz/args.c +#, c-format +msgid "In --block-list, block size is missing after filter chain number '%c:'" +msgstr "在 --block-list 中,編號「%c:」後方遺漏區塊大小" + +#: src/xz/args.c +msgid "0 can only be used as the last element in --block-list" +msgstr "0 只能作為 --block-list 的最後一個元素" + +#: src/xz/args.c +#, c-format +msgid "%s: Unknown file format type" +msgstr "%s:未知檔案格式類型" + +#: src/xz/args.c +#, c-format +msgid "%s: Unsupported integrity check type" +msgstr "%s:不支援的完整性檢查類型" + +#: src/xz/args.c +msgid "Only one file can be specified with '--files' or '--files0'." +msgstr "「--files」或「--files0」只能指定一個檔案。" + +#. TRANSLATORS: This is a translatable +#. string because French needs a space +#. before the colon ("%s : %s"). +#: src/xz/args.c src/xz/coder.c src/xz/file_io.c src/xz/list.c src/xz/options.c +#: src/xz/util.c +#, c-format +msgid "%s: %s" +msgstr "%s:%s" + +#: src/xz/args.c +#, c-format +msgid "The environment variable %s contains too many arguments" +msgstr "%s 環境變數包含過多參數" + +#: src/xz/args.c +msgid "Compression support was disabled at build time" +msgstr "已在編譯時停用壓縮支援" + +#: src/xz/args.c +msgid "Decompression support was disabled at build time" +msgstr "已在編譯時停用解壓縮支援" + +#: src/xz/args.c +msgid "Compression of lzip files (.lz) is not supported" +msgstr "不支援壓縮為 lzip 檔案 (.lz)" + +#: src/xz/args.c +msgid "--block-list is ignored unless compressing to the .xz format" +msgstr "--block-list 只有在壓縮成 .xz 格式時才會生效" + +#: src/xz/args.c +msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout" +msgstr "搭配 --format=raw 時,除非寫入標準輸出,否則需要傳入 --suffix=.SUF" + +#: src/xz/coder.c +msgid "Maximum number of filters is four" +msgstr "最多只能指定 4 個過濾器" + +#: src/xz/coder.c +#, c-format +msgid "Error in --filters%s=FILTERS option:" +msgstr "--filters%s=FILTERS 選項發生錯誤:" + +#: src/xz/coder.c +msgid "Memory usage limit is too low for the given filter setup." +msgstr "記憶體用量限制過低,不足以設定指定的過濾器。" + +#: src/xz/coder.c +#, 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 +msgid "Using a preset in raw mode is discouraged." +msgstr "不建議在 Raw 模式使用設定檔。" + +#: src/xz/coder.c +msgid "The exact options of the presets may vary between software versions." +msgstr "設定檔的選項可能因軟體版本而有異。" + +#: src/xz/coder.c +msgid "The .lzma format supports only the LZMA1 filter" +msgstr ".lzma 格式僅支援 LZMA1 過濾器" + +#: src/xz/coder.c +msgid "LZMA1 cannot be used with the .xz format" +msgstr "LZMA1 不能與 .xz 格式一同使用" + +#: src/xz/coder.c +#, c-format +msgid "Filter chain %u is incompatible with --flush-timeout" +msgstr "過濾鏈 %u 與 --flush-timeout 不相容" + +#: src/xz/coder.c +msgid "Switching to single-threaded mode due to --flush-timeout" +msgstr "因指定 --flush-timeout,因此切換到單執行緒模式" + +#: src/xz/coder.c +#, c-format +msgid "Unsupported options in filter chain %u" +msgstr "過濾鏈 %u 不支援此選項" + +#: src/xz/coder.c +#, c-format +msgid "Using up to % threads." +msgstr "使用最多 % 個執行緒。" + +#: src/xz/coder.c +msgid "Unsupported filter chain or filter options" +msgstr "不支援的或過濾器選項" + +#: src/xz/coder.c +#, c-format +msgid "Decompression will need %s MiB of memory." +msgstr "解壓縮將需要 %s MiB 的記憶體。" + +#: src/xz/coder.c +#, 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 +#, 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 減少至一個,但依然超出 %s MiB 的自動記憶體用量限制。需要 %s MiB 的記憶體。依然繼續執行。" + +#: src/xz/coder.c +#, 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 +#, 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/coder.c +#, c-format +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 "已將 --filters%2$u 的 LZMA%1$c 字典大小,將 %3$s MiB 調整為 %4$s MiB,以避免超過 %5$s MiB 的記憶體用量限制" + +#: src/xz/coder.c +#, c-format +msgid "Error changing to filter chain %u: %s" +msgstr "變更為 %u 時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "Error creating a pipe: %s" +msgstr "建立管線時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: poll() failed: %s" +msgstr "%s:poll() 失敗:%s" + +#. TRANSLATORS: When compression or decompression finishes, +#. and xz is going to remove the source file, xz first checks +#. if the source file still exists, and if it does, does its +#. device and inode numbers match what xz saw when it opened +#. the source file. If these checks fail, this message is +#. shown, %s being the filename, and the file is not deleted. +#. The check for device and inode numbers is there, because +#. 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 +#, c-format +msgid "%s: File seems to have been moved, not removing" +msgstr "%s:檔案似乎已經遷移,不移除" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot remove: %s" +msgstr "%s:無法移除:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file owner: %s" +msgstr "%s:無法設定檔案所有者:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file group: %s" +msgstr "%s:無法設定檔案群組:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Cannot set the file permissions: %s" +msgstr "%s:無法設定檔案權限:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the file failed: %s" +msgstr "%s:同步檔案失敗:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Synchronizing the directory of the file failed: %s" +msgstr "%s:同步檔案目錄失敗:%s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard input: %s" +msgstr "從標準輸入取得檔案狀態旗標時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a symbolic link, skipping" +msgstr "%s:是個符號連結,跳過" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Is a directory, skipping" +msgstr "%s:是個目錄,跳過" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Not a regular file, skipping" +msgstr "%s:不是一般檔案,跳過" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has setuid or setgid bit set, skipping" +msgstr "%s:檔案已設定 setuid 或 setgid 位元,跳過" + +#: src/xz/file_io.c +#, c-format +msgid "%s: File has sticky bit set, skipping" +msgstr "%s:檔案已設定黏性位元(sticky bit),跳過" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Input file has more than one hard link, skipping" +msgstr "%s:輸入檔有超過一個實際連結 (hard link),跳過" + +#: src/xz/file_io.c +msgid "Empty filename, skipping" +msgstr "空檔名,跳過" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the status flags to standard input: %s" +msgstr "將狀態旗標還原到標準輸入時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "Error getting the file status flags from standard output: %s" +msgstr "從標準輸出取得檔案狀態旗標時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Opening the directory failed: %s" +msgstr "%s:開啟目錄失敗:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Destination is not a regular file" +msgstr "%s:目的地不是一般檔案" + +#: src/xz/file_io.c +#, c-format +msgid "Error restoring the O_APPEND flag to standard output: %s" +msgstr "將 O_APPEND 旗標還原到標準輸出時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Closing the file failed: %s" +msgstr "%s:關閉檔案失敗:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Seeking failed when trying to create a sparse file: %s" +msgstr "%s:嘗試建立疏鬆檔案時發生搜尋失敗:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Read error: %s" +msgstr "%s:讀取時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Error seeking the file: %s" +msgstr "%s:搜尋檔案時發生錯誤:%s" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Unexpected end of file" +msgstr "%s:非期望的檔案結尾" + +#: src/xz/file_io.c +#, c-format +msgid "%s: Write error: %s" +msgstr "%s:寫入時發生錯誤:%s" + +#: src/xz/hardware.c +msgid "Disabled" +msgstr "已停用" + +#: src/xz/hardware.c +msgid "Amount of physical memory (RAM):" +msgstr "實體記憶體 (RAM) 數量:" + +#: src/xz/hardware.c +msgid "Number of processor threads:" +msgstr "處理器執行緒的數量:" + +#: src/xz/hardware.c +msgid "Compression:" +msgstr "壓縮:" + +#: src/xz/hardware.c +msgid "Decompression:" +msgstr "解壓縮:" + +#: src/xz/hardware.c +msgid "Multi-threaded decompression:" +msgstr "多執行緒解壓縮:" + +#: src/xz/hardware.c +msgid "Default for -T0:" +msgstr "-T0 的預設值:" + +#: src/xz/hardware.c +msgid "Hardware information:" +msgstr "硬體資訊:" + +#: src/xz/hardware.c +msgid "Memory usage limits:" +msgstr "記憶體用量上限:" + +#: src/xz/list.c +msgid "Streams:" +msgstr "串流:" + +#: src/xz/list.c +msgid "Blocks:" +msgstr "區塊:" + +#: src/xz/list.c +msgid "Compressed size:" +msgstr "壓縮後大小:" + +#: src/xz/list.c +msgid "Uncompressed size:" +msgstr "壓縮前大小:" + +#: src/xz/list.c +msgid "Ratio:" +msgstr "壓縮比:" + +#: src/xz/list.c +msgid "Check:" +msgstr "檢查:" + +#: src/xz/list.c +msgid "Stream Padding:" +msgstr "串流填充:" + +#: src/xz/list.c +msgid "Memory needed:" +msgstr "所需記憶體:" + +#: src/xz/list.c +msgid "Sizes in headers:" +msgstr "檔頭中標示大小:" + +#: src/xz/list.c +msgid "Number of files:" +msgstr "檔案數:" + +#: src/xz/list.c +msgid "Stream" +msgstr "串流" + +#: src/xz/list.c +msgid "Block" +msgstr "區塊" + +#: src/xz/list.c +msgid "Blocks" +msgstr "區塊" + +#: src/xz/list.c +msgid "CompOffset" +msgstr "壓縮偏移" + +#: src/xz/list.c +msgid "UncompOffset" +msgstr "未壓縮偏移" + +#: src/xz/list.c +msgid "CompSize" +msgstr "壓縮大小" + +#: src/xz/list.c +msgid "UncompSize" +msgstr "未壓縮大小" + +#: src/xz/list.c +msgid "TotalSize" +msgstr "總計大小" + +#: src/xz/list.c +msgid "Ratio" +msgstr "比率" + +#: src/xz/list.c +msgid "Check" +msgstr "檢查" + +#: src/xz/list.c +msgid "CheckVal" +msgstr "檢查值" + +#: src/xz/list.c +msgid "Padding" +msgstr "補空" + +#: src/xz/list.c +msgid "Header" +msgstr "檔頭" + +#: src/xz/list.c +msgid "Flags" +msgstr "旗標" + +#: src/xz/list.c +msgid "MemUsage" +msgstr "Mem用量" + +#: src/xz/list.c +msgid "Filters" +msgstr "過濾器" + +#. TRANSLATORS: Indicates that there is no integrity check. +#. 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 +msgid "None" +msgstr "無" + +#. TRANSLATORS: Indicates that integrity check name is not known, +#. 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 +msgid "Unknown-2" +msgstr "未知-2" + +#: src/xz/list.c +msgid "Unknown-3" +msgstr "未知-3" + +#: src/xz/list.c +msgid "Unknown-5" +msgstr "未知-5" + +#: src/xz/list.c +msgid "Unknown-6" +msgstr "未知-6" + +#: src/xz/list.c +msgid "Unknown-7" +msgstr "未知-7" + +#: src/xz/list.c +msgid "Unknown-8" +msgstr "未知-8" + +#: src/xz/list.c +msgid "Unknown-9" +msgstr "未知-9" + +#: src/xz/list.c +msgid "Unknown-11" +msgstr "未知-11" + +#: src/xz/list.c +msgid "Unknown-12" +msgstr "未知-12" + +#: src/xz/list.c +msgid "Unknown-13" +msgstr "未知-13" + +#: src/xz/list.c +msgid "Unknown-14" +msgstr "未知-14" + +#: src/xz/list.c +msgid "Unknown-15" +msgstr "未知-15" + +#: src/xz/list.c +#, c-format +msgid "%s: File is empty" +msgstr "%s:檔案是空的" + +#: src/xz/list.c +#, c-format +msgid "%s: Too small to be a valid .xz file" +msgstr "%s:因過小而不認為是個有效 .xz 檔" + +#. TRANSLATORS: These are column headings. From Strms (Streams) +#. 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 +msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" +msgstr " 串流 區塊 已壓縮 未壓縮 比例 檢驗碼 檔名" + +#: src/xz/list.c +msgid "Yes" +msgstr "是" + +#: src/xz/list.c +msgid "No" +msgstr "否" + +#: src/xz/list.c +msgid "Minimum XZ Utils version:" +msgstr "最小 XZ 工具程式版本:" + +#. 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 +#, c-format +msgid "%s file\n" +msgid_plural "%s files\n" +msgstr[0] "%s 個檔案\n" + +#: src/xz/list.c +msgid "Totals:" +msgstr "總計:" + +#: src/xz/list.c +msgid "--list works only on .xz files (--format=xz or --format=auto)" +msgstr "--list 只能在 .xz 檔使用(--format=xz 或 --format=auto)" + +#: src/xz/list.c +msgid "Try 'lzmainfo' with .lzma files." +msgstr "試試看用「lzmainfo」處理 .lzma 檔案。" + +#: src/xz/list.c +msgid "--list does not support reading from standard input" +msgstr "--list 不支援從標準輸入讀取" + +#: src/xz/main.c +#, c-format +msgid "%s: Error reading filenames: %s" +msgstr "%s:讀取檔名時發生錯誤:%s" + +#: src/xz/main.c +#, c-format +msgid "%s: Unexpected end of input when reading filenames" +msgstr "%s:讀取檔名時遇到非預期的輸入結尾" + +#: src/xz/main.c +#, c-format +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 +msgid "Compression and decompression with --robot are not supported yet." +msgstr "尚未支援搭配 --robot 壓縮和解壓縮。" + +#: src/xz/main.c +msgid "Cannot read data from standard input when reading filenames from standard input" +msgstr "從標準輸入讀取檔名時,無法從標準輸入讀取資料" + +#. TRANSLATORS: This is the program name in the beginning +#. 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 src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s: " +msgstr "%s:" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "Internal error (bug)" +msgstr "內部錯誤(臭蟲)" + +#: src/xz/message.c +msgid "Cannot establish signal handlers" +msgstr "無法確立信號處理器" + +#: src/xz/message.c +msgid "No integrity check; not verifying file integrity" +msgstr "沒有完整性檢查;不驗證檔案完整性" + +#: src/xz/message.c +msgid "Unsupported type of integrity check; not verifying file integrity" +msgstr "未知完整性檢查類型;不驗證檔案完整性" + +#: src/xz/message.c +msgid "Memory usage limit reached" +msgstr "達到記憶體用量上限" + +#: src/xz/message.c +msgid "File format not recognized" +msgstr "無法識別檔案格式" + +#: src/xz/message.c +msgid "Unsupported options" +msgstr "不支援的選項" + +#: src/xz/message.c +msgid "Compressed data is corrupt" +msgstr "壓縮資料是損壞的" + +#: src/xz/message.c +msgid "Unexpected end of input" +msgstr "遇到非預期輸入結尾" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limiter is disabled." +msgstr "需要 %s MiB 的記憶體。已停用記憶體限制器。" + +#: src/xz/message.c +#, c-format +msgid "%s MiB of memory is required. The limit is %s." +msgstr "需要 %s MiB 的記憶體。記憶體限制為 %s。" + +#: src/xz/message.c +#, c-format +msgid "%s: Filter chain: %s\n" +msgstr "%s:過濾鏈:%s\n" + +#: src/xz/message.c +#, c-format +msgid "Try '%s --help' for more information." +msgstr "嘗試「%s --help」取得更多資訊。" + +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Error printing the help text (error code %d)" +msgstr "輸出說明文字時發生錯誤(錯誤碼 %d)" + +#: src/xz/message.c +#, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "用法:%s [OPTION]... [FILE]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Compress or decompress FILEs in the .xz format." +msgstr "用 .xz 格式壓縮,或解壓縮 .xz 格式中的 <檔案>。" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Mandatory arguments to long options are mandatory for short options too." +msgstr "長選項的必填引數,對短選項也是必填。" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation mode:" +msgstr "操作模式:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force compression" +msgstr "強制壓縮" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force decompression" +msgstr "強制解壓縮" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "test compressed file integrity" +msgstr "測試壓縮後檔案的完整性" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "list information about .xz files" +msgstr "列出更多 .xz 檔案的資訊" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Operation modifiers:" +msgstr "操作修飾元:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "keep (don't delete) input files" +msgstr "保留(不要刪除)輸入檔案" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "force overwrite of output file and (de)compress links" +msgstr "強制覆蓋輸出檔案並壓縮/解壓縮連結" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "write to standard output and don't delete input files" +msgstr "輸出到標準輸出,且不刪除輸入檔案" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't synchronize the output file to the storage device before removing the input file" +msgstr "移除輸入檔案前,不要將輸出檔案同步至儲存裝置" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "decompress only the first stream, and silently ignore possible remaining input data" +msgstr "僅解壓縮第一個串流,再安靜地忽略可能剩餘的輸入資料" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "do not create sparse files when decompressing" +msgstr "不要在解壓縮時建立稀疏檔案" + +#: src/xz/message.c +msgid ".SUF" +msgstr ".SUF" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use the suffix '.SUF' on compressed files" +msgstr "在壓縮後的檔案加入「.SUF」後綴" + +#: src/xz/message.c +msgid "FILE" +msgstr "FILE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "read filenames to process from FILE; if FILE is omitted, filenames are read from the standard input; filenames must be terminated with the newline character" +msgstr "從 FILE 讀取要處理的檔案名稱,若未指定 FILE,\t則從標準輸入讀取檔案名稱。檔案名稱必須以換行字元結尾" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "like --files but use the null character as terminator" +msgstr "類似 --files 但使用 null 字元作為終止字元" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Basic file format and compression options:" +msgstr "基本檔案格式與壓縮選項:" + +#: src/xz/message.c +msgid "FORMAT" +msgstr "FORMAT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "file format to encode or decode; possible values are 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'" +msgstr "要編解碼的檔案格式,可以輸入的值有「auto」(預設值)、\t「xz」、「lzma」、「lzip」和「raw」" + +#: src/xz/message.c +msgid "NAME" +msgstr "NAME" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "integrity check type: 'none' (use with caution), 'crc32', 'crc64' (default), or 'sha256'" +msgstr "完整性檢查類型:「none」(小心使用)、「crc32」、\t「crc64」(預設值)或「sha256」" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "don't verify the integrity check when decompressing" +msgstr "解壓縮時不進行完整性檢查" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!" +msgstr "壓縮設定檔。預設值為 6,使用 7-9 壓縮等級前,\t請務必考量壓縮與解壓縮的記憶體用量!" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "try to improve compression ratio by using more CPU time; does not affect decompressor memory requirements" +msgstr "嘗試使用更多 CPU 時間來改善壓縮率\t(不影響解壓縮器的記憶體需求)" + +#. TRANSLATORS: Short for NUMBER. A longer string is fine but +#. wider than 5 columns makes --long-help a few lines longer. +#: src/xz/message.c +msgid "NUM" +msgstr "NUM" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use at most NUM threads; the default is 0 which uses as many threads as there are processor cores" +msgstr "使用最多 NUM 個執行緒。預設為 0,即使用所有的處理器核心" + +#: src/xz/message.c +msgid "SIZE" +msgstr "SIZE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after every SIZE bytes of input; use this to set the block size for threaded compression" +msgstr "每處理 SIZE 位元組的輸入資料後,就開始一個新的 .xz 區塊。\t使用這個設定多執行緒壓縮的區塊大小" + +#: src/xz/message.c +msgid "BLOCKS" +msgstr "BLOCKS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start a new .xz block after the given comma-separated intervals of uncompressed data; optionally, specify a filter chain number (0-9) followed by a ':' before the uncompressed data size" +msgstr "在指定的未壓縮資料間隔(以逗號分隔)後開始新的 .xz 區塊,\t可以選擇在未壓縮資料大小前加上過濾鏈編號(0-9)\t和冒號「:」" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "when compressing, if more than NUM milliseconds has passed since the previous flush and reading more input would block, all pending data is flushed out" +msgstr "壓縮時,若自上次排清後已超過 NUM 毫秒,\t且讀取更多輸入會造成阻塞,則將所有待處理資料排清" + +#: src/xz/message.c +msgid "LIMIT" +msgstr "LIMIT" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, no-c-format +msgid "set memory usage limit for compression, decompression, threaded decompression, or all of these; LIMIT is in bytes, % of RAM, or 0 for defaults" +msgstr "設定壓縮、解壓縮、多執行緒解壓縮或所有這些模式的記憶體\t上限。\tLIMIT 的單位可以是位元組、\t記憶體佔用百分比,\t或 0 表示預設值" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "if compression settings exceed the memory usage limit, give an error instead of adjusting the settings downwards" +msgstr "如果壓縮設定超過記憶體用量上限,請給出錯誤而非下調設定" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Custom filter chain for compression (an alternative to using presets):" +msgstr "自訂壓縮過濾鏈(設定檔以外的替代選項):" + +#: src/xz/message.c +msgid "FILTERS" +msgstr "FILTERS" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set the filter chain using the liblzma filter string syntax; use --filters-help for more information" +msgstr "使用 liblzma 過濾器字串語法設定過濾鏈。輸入 --filters-help 取得更多資訊" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "set additional filter chains using the liblzma filter string syntax to use with --block-list" +msgstr "使用 liblzma 過濾器字串語法設定額外的過濾鏈,以配合 --block-list 使用" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display more information about the liblzma filter string syntax and exit" +msgstr "顯示有關 liblzma 過濾器字串語法的更多資訊後結束" + +#. TRANSLATORS: Short for OPTIONS. +#: src/xz/message.c +msgid "OPTS" +msgstr "OPTS" + +#. TRANSLATORS: Use semicolon (or its fullwidth form) +#. in "(valid values; default)" even if it is weird in +#. your language. There are non-translatable strings +#. that look like "(foo, bar, baz; foo)" which list +#. the supported values and the default value. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "LZMA1 or LZMA2; OPTS is a comma-separated list of zero or more of the following options (valid values; default):" +msgstr "LZMA1 或 LZMA2。OPTS 是個以逗號分隔的列表,內有 0 或多個下述選項(有效值;預設值):" + +#. TRANSLATORS: Short for PRESET. A longer string is +#. fine but wider than 4 columns makes --long-help +#. one line longer. +#: src/xz/message.c +msgid "PRE" +msgstr "PRE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "reset options to a preset" +msgstr "將選項重設為設定檔的值" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "dictionary size" +msgstr "字典大小" + +#. TRANSLATORS: The word "literal" in "literal context +#. bits" means how many "context bits" to use when +#. encoding literals. A literal is a single 8-bit +#. byte. It doesn't mean "literally" here. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +msgid "number of literal context bits" +msgstr "字元上下文位元數" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +msgid "number of literal position bits" +msgstr "字元位置位元數" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, fuzzy +msgid "number of position bits" +msgstr "位置位元的數量" + +#: src/xz/message.c +msgid "MODE" +msgstr "MODE" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "compression mode" +msgstr "壓縮模式" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "nice length of a match" +msgstr "符合項目的最佳長度" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "match finder" +msgstr "比對搜尋器" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "maximum search depth; 0=automatic (default)" +msgstr "最大搜尋深度。0 表示自動(預設值)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "x86 BCJ filter (32-bit and 64-bit)" +msgstr "x86 BCJ 過濾器(32 或 64 位元)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM BCJ filter" +msgstr "ARM BCJ 過濾器" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM-Thumb BCJ filter" +msgstr "ARM-Thumb BCJ 過濾器" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "ARM64 BCJ filter" +msgstr "ARM64 BCJ 過濾器" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "PowerPC BCJ filter (big endian only)" +msgstr "PowerPC BCJ 過濾器(只面向大端序)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "IA-64 (Itanium) BCJ filter" +msgstr "IA-64 (Itanium) BCJ 過濾器" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "SPARC BCJ filter" +msgstr "SPARC BCJ 過濾器" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "RISC-V BCJ filter" +msgstr "RISC-V BCJ 過濾器" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Valid OPTS for all BCJ filters:" +msgstr "對所有 BCJ 過濾器都有效的 OPTS:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "start offset for conversions (default=0)" +msgstr "轉換的起始位移(預設值=0)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Delta filter; valid OPTS (valid values; default):" +msgstr "差異過濾器。有效 OPTS(有效值;預設值):" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "distance between bytes being subtracted from each other" +msgstr "相減位元組之間的距離" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "Other options:" +msgstr "其他選項:" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "suppress warnings; specify twice to suppress errors too" +msgstr "隱藏警告,指定兩次則一併隱藏錯誤" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "be verbose; specify twice for even more verbose" +msgstr "輸出得更詳細,指定兩次則會輸出得更詳細" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "make warnings not affect the exit status" +msgstr "即使有警告也不改變結束狀態碼" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "use machine-parsable messages (useful for scripts)" +msgstr "輸出機器可以解析的訊息(適合用於指令稿)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the total amount of RAM and the currently active memory usage limits, and exit" +msgstr "顯示記憶體總量和目前生效的記憶體用量限制後結束" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the short help (lists only the basic options)" +msgstr "顯示比較短的說明文字(只列出基本選項)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this long help and exit" +msgstr "顯示較長的說明文字後結束" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display this short help and exit" +msgstr "顯示較短的說明文字後結束" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the long help (lists also the advanced options)" +msgstr "顯示比較長的說明文字(一併列出進階選項)" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "display the version number and exit" +msgstr "顯示版本號碼後結束" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +msgid "With no FILE, or when FILE is -, read standard input." +msgstr "如果 FILE 沒有指定或指定為 -,則從標準輸入讀取。" + +#. TRANSLATORS: This message indicates the bug reporting +#. address for this package. Please add another line saying +#. "\nReport translation bugs to <...>." with the email or WWW +#. address for translation bugs. Thanks! +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "Report bugs to <%s> (in English or Finnish)." +msgstr "請回報臭蟲至 <%s>(使用英文或芬蘭語)。" + +#. TRANSLATORS: The first %s is the name of this software. +#. The second <%s> is an URL. +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c src/lzmainfo/lzmainfo.c +#, c-format +msgid "%s home page: <%s>" +msgstr "%s 首頁:<%s>" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." +msgstr "此為開發版本,不打算在生產環境使用。" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +#, c-format +msgid "Filter chains are set using the --filters=FILTERS or --filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain can be separated by spaces or '--'. Alternatively a preset %s can be specified instead of a filter chain." +msgstr "過濾鏈可透過 --filters=FILTERS 或 --filters1=FILTERS ... --filters9=FILTERS 選項來設定。鏈中的每個過濾器可以用空格或 '--' 分隔。您也可以指定 %s 設定檔來取代過濾鏈。" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/xz/message.c +msgid "The supported filters and their options are:" +msgstr "支援的過濾器和選項為:" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Options must be 'name=value' pairs separated with commas" +msgstr "選項必須是以逗號分隔的「name=value」值對" + +#: src/xz/options.c +#, c-format +msgid "%s: Invalid option name" +msgstr "%s:選項名稱無效" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "Invalid option value" +msgstr "選項值無效" + +#: src/xz/options.c +#, c-format +msgid "Unsupported LZMA1/LZMA2 preset: %s" +msgstr "不支援的 LZMA1/LZMA2 設定檔:%s" + +#: src/xz/options.c src/liblzma/common/string_conversion.c +msgid "The sum of lc and lp must not exceed 4" +msgstr "lc 和 lp 的總和不能超過 4" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Filename has an unknown suffix, skipping" +msgstr "%s:檔名有未知後綴,跳過" + +#: src/xz/suffix.c +#, c-format +msgid "%s: File already has '%s' suffix, skipping" +msgstr "%s:檔案已有「%s」後綴,略過" + +#: src/xz/suffix.c +#, c-format +msgid "%s: Invalid filename suffix" +msgstr "%s:檔名後綴無效" + +#: src/xz/util.c src/liblzma/common/string_conversion.c +msgid "Value is not a non-negative decimal integer" +msgstr "數值不是非負數十進位整數" + +#: src/xz/util.c +#, c-format +msgid "%s: Invalid multiplier suffix" +msgstr "%s:乘數後綴無效" + +#: src/xz/util.c +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 +#, c-format +msgid "Value of the option '%s' must be in the range [%, %]" +msgstr "選項「%s」的數值必須落在 [%, %] 範圍內" + +#: src/xz/util.c +msgid "Compressed data cannot be read from a terminal" +msgstr "不能從終端機讀入已壓縮資料" + +#: src/xz/util.c +msgid "Compressed data cannot be written to a terminal" +msgstr "不能將已壓縮資料寫入終端機" + +#: src/lzmainfo/lzmainfo.c +#, c-format +msgid "Usage: %s [--help] [--version] [FILE]...\n" +msgstr "用法:%s [--help] [--version] [FILE]...\n" + +#. This is word wrapped at spaces. The Unicode character U+00A0 works as a non-breaking space. Tab (\t) is interpreted as a zero-width space (the tab itself is not displayed); U+200B is NOT supported. Manual word wrapping with \n is supported but requires care. +#: src/lzmainfo/lzmainfo.c +msgid "Show information stored in the .lzma file header." +msgstr "顯示儲存在 .lzma 檔案標頭中的資訊。" + +#: src/lzmainfo/lzmainfo.c +msgid "File is too small to be a .lzma file" +msgstr "檔案過小,故不是 .lzma 檔案" + +#: src/lzmainfo/lzmainfo.c +msgid "Not a .lzma file" +msgstr "不是 .lzma 檔案" + +#: src/common/tuklib_exit.c +msgid "Writing to standard output failed" +msgstr "寫入標準輸出失敗" + +#: src/common/tuklib_exit.c +msgid "Unknown error" +msgstr "未知錯誤" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported preset" +msgstr "不支援的設定檔" + +#: src/liblzma/common/string_conversion.c +msgid "Unsupported flag in the preset" +msgstr "設定檔中包含不支援的旗標" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown option name" +msgstr "未知選項名稱" + +#: src/liblzma/common/string_conversion.c +msgid "Option value cannot be empty" +msgstr "選項值不能空白" + +#: src/liblzma/common/string_conversion.c +msgid "Value out of range" +msgstr "數值超出範圍" + +#: src/liblzma/common/string_conversion.c +msgid "This option does not support any multiplier suffixes" +msgstr "這個選項不支援任何乘數後綴" + +#. TRANSLATORS: Don't translate the +#. suffixes "KiB", "MiB", or "GiB" +#. because a user can only specify +#. untranslated suffixes. +#: src/liblzma/common/string_conversion.c +msgid "Invalid multiplier suffix (KiB, MiB, or GiB)" +msgstr "乘數後綴無效(KiB、MiB 或 GiB)" + +#: src/liblzma/common/string_conversion.c +msgid "Unknown filter name" +msgstr "未知過濾器名稱" + +#: src/liblzma/common/string_conversion.c +msgid "This filter cannot be used in the .xz format" +msgstr "這個過濾器不能在 .xz 格式中使用" + +#: src/liblzma/common/string_conversion.c +msgid "Memory allocation failed" +msgstr "分配記憶體失敗" + +#: src/liblzma/common/string_conversion.c +msgid "Empty string is not allowed, try '6' if a default value is needed" +msgstr "不允許輸入空白字串,如需預設值請輸入「6」" + +#: src/liblzma/common/string_conversion.c +msgid "The maximum number of filters is four" +msgstr "過濾器最多只能指定 4 個" + +#: src/liblzma/common/string_conversion.c +msgid "Filter name is missing" +msgstr "缺少過濾器名稱" + +#: src/liblzma/common/string_conversion.c +msgid "Invalid filter chain ('lzma2' missing at the end?)" +msgstr "無效的過濾鏈(結尾缺少「lzma2」?)" diff --git a/cpp/third_party/xz-5.8.3/po4a/ar.po b/cpp/third_party/xz-5.8.3/po4a/ar.po new file mode 100644 index 0000000000..7c1822245c --- /dev/null +++ b/cpp/third_party/xz-5.8.3/po4a/ar.po @@ -0,0 +1,3905 @@ +# SPDX-License-Identifier: 0BSD +# Arabic translation for xz-man. +# Copyright (C) The XZ Utils authors and contributors +# This file is published under the BSD Zero Clause License. +# +# Zayed Al-Saidi , 2026. +msgid "" +msgstr "" +"Project-Id-Version: xz-man-5.8.2-pre1\n" +"POT-Creation-Date: 2025-10-31 13:23+0200\n" +"PO-Revision-Date: 2026-02-04 11:05+0400\n" +"Last-Translator: Zayed Al-Saidi \n" +"Language-Team: Arabic <(nothing)>\n" +"Language: ar\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=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100 >= 3 && n%100<=10 ? 3 : n%100 >= 11 && n%100<=99 ? 4 : 5;\n" +"X-Generator: Lokalize 23.08.5\n" + +#. type: TH +#: ../src/xz/xz.1 +#, no-wrap +msgid "XZ" +msgstr "XZ" + +#. type: TH +#: ../src/xz/xz.1 +#, no-wrap +msgid "2025-03-08" +msgstr "2025-03-08" + +#. type: TH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "Tukaani" +msgstr "توكاني" + +#. type: TH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "XZ Utils" +msgstr "أدوات XZ" + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "NAME" +msgstr "الاسم" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma files" +msgstr "xz, unxz, xzcat, lzma, unlzma, lzcat - ضغط أو فك ضغط ملفات .xz و .lzma" + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "SYNOPSIS" +msgstr "موجز" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B [I] [I]" +msgstr "B [I<خيار...>] [I<ملف...>]" + +#. type: SH +#: ../src/xz/xz.1 +#, no-wrap +msgid "COMMAND ALIASES" +msgstr "أسماء مستعارة للأمر" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B يكافئ B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B يكافئ B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B يكافئ B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B يكافئ B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is equivalent to B." +msgstr "B يكافئ B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When writing scripts that need to decompress files, it is recommended to always use the name B with appropriate arguments (B or B) instead of the names B and B." +msgstr "عند كتابة سكربتات تحتاج لفك ضغط الملفات، يُوصى دائماً باستخدام الاسم B مع المعطيات المناسبة (B أو B) بدلاً من الاسمين B و B." + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1 +#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1 +#: ../src/scripts/xzmore.1 +#, no-wrap +msgid "DESCRIPTION" +msgstr "الوصف" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B is a general-purpose data compression tool with command line syntax similar to B(1) and B(1). The native file format is the B<.xz> format, but the legacy B<.lzma> format used by LZMA Utils and raw compressed streams with no container format headers are also supported. In addition, decompression of the B<.lz> format used by B is supported." +msgstr "B أداة ضغط بيانات عامة الأغراض مع صياغة سطر أوامر مشابهة لـ B(1) و B(1). تنسيق الملف الأصلي هو تنسيق B<.xz>، ولكن يدعم أيضاً تنسيق B<.lzma> الموروث المستخدم في LZMA Utils والتدفقات المضغوطة الخام بدون ترويسات تنسيق الحاوية. بالإضافة إلى ذلك، يدعم فك ضغط تنسيق B<.lz> المستخدم بواسطة B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B compresses or decompresses each I according to the selected operation mode. If no I are given or I is B<->, B reads from standard input and writes the processed data to standard output. B will refuse (display an error and skip the I) to write compressed data to standard output if it is a terminal. Similarly, B will refuse to read compressed data from standard input if it is a terminal." +msgstr "يضغط B أو يفك ضغط كل I<ملف> وفقاً لوضع التشغيل المحدد. إذا لم تُعطَ I<ملفات> أو كان I<الملف> هو B<->، يقرأ B من الدخل القياسي ويكتب البيانات المعالجة إلى الخرج القياسي. يرفض B (يعرض خطأ ويتخطى I<الملف>) كتابة البيانات المضغوطة إلى الخرج القياسي إذا كان طرفية. وبالمثل، يرفض B قراءة البيانات المضغوطة من الدخل القياسي إذا كان طرفية." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Unless B<--stdout> is specified, I other than B<-> are written to a new file whose name is derived from the source I name:" +msgstr "ما لم يحدد الخيار B<--stdout>، تُكتب I<الملفات> بخلاف B<-> في ملف جديد يُشتق اسمه من اسم I<ملف> المصدر:" + +#. type: IP +#: ../src/xz/xz.1 +#, no-wrap +msgid "\\(bu" +msgstr "\\(bu" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing, the suffix of the target file format (B<.xz> or B<.lzma>) is appended to the source filename to get the target filename." +msgstr "عند الضغط، يُلحق ملحق تنسيق الملف الهدف (B<.xz> أو B<.lzma>) باسم ملف المصدر للحصول على اسم الملف الهدف." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from the filename to get the target filename. B also recognizes the suffixes B<.txz> and B<.tlz>, and replaces them with the B<.tar> suffix." +msgstr "عند فك الضغط، يُزال الملحق B<.xz> أو B<.lzma> أو B<.lz> من اسم الملف للحصول على اسم الملف الهدف. يتعرف B أيضاً على الملحقات B<.txz> و B<.tlz>، ويستبدلها بالملحق B<.tar>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the target file already exists, an error is displayed and the I is skipped." +msgstr "إذا كان الملف الهدف موجوداً بالفعل، يُعرض خطأ ويتخطى I<الملف>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Unless writing to standard output, B will display a warning and skip the I if any of the following applies:" +msgstr "ما لم يكتب إلى المخرج القياسي، يعرض B تحذيراً ويتخطى I<الملف> في حال انطباق أي مما يلي:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I is not a regular file. Symbolic links are not followed, and thus they are not considered to be regular files." +msgstr "I<الملف> ليس ملفاً عادياً. لا تُتبع الوصلات الرمزية، وبالتالي لا تُعتبر ملفات عادية." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I has more than one hard link." +msgstr "I<الملف> له أكثر من وصلة صلبة واحدة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I has setuid, setgid, or sticky bit set." +msgstr "I<الملف> عُينت له بتات setuid أو setgid أو sticky." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The operation mode is set to compress and the I already has a suffix of the target file format (B<.xz> or B<.txz> when compressing to the B<.xz> format, and B<.lzma> or B<.tlz> when compressing to the B<.lzma> format)." +msgstr "وضع التشغيل مضبوط على الضغط و I<الملف> يمتلك بالفعل ملحقاً لتنسيق الملف الهدف (B<.xz> أو B<.txz> عند الضغط بتنسيق B<.xz>، و B<.lzma> أو B<.tlz> عند الضغط بتنسيق B<.lzma>)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The operation mode is set to decompress and the I doesn't have a suffix of any of the supported file formats (B<.xz>, B<.txz>, B<.lzma>, B<.tlz>, or B<.lz>)." +msgstr "وضع التشغيل مضبوط على فك الضغط و I<الملف> لا يمتلك ملحقاً لأي من تنسيقات الملفات المدعومة (B<.xz> أو B<.txz> أو B<.lzma> أو B<.tlz> أو B<.lz>)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "After successfully compressing or decompressing the I, B copies the owner, group, permissions, access time, and modification time from the source I to the target file. If copying the group fails, the permissions are modified so that the target file doesn't become accessible to users who didn't have permission to access the source I. B doesn't support copying other metadata like access control lists or extended attributes yet." +msgstr "بعد ضغط I<الملف> أو فك ضغطه بنجاح، ينسخ B المالك والمجموعة والأذونات ووقت الوصول ووقت التعديل من I<ملف> المصدر إلى الملف الهدف. إذا فشل نسخ المجموعة، تُعدل الأذونات حتى لا يصبح الملف الهدف متاحاً للمستخدمين الذين لم يمتلكوا إذناً للوصول إلى I<ملف> المصدر. لا يدعم B نسخ البيانات الوصفية الأخرى مثل قوائم التحكم في الوصول أو السمات الممتدة بعد." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Once the target file has been successfully closed, the source I is removed unless B<--keep> was specified. The source I is never removed if the output is written to standard output or if an error occurs." +msgstr "بمجرد إغلاق الملف الهدف بنجاح، يُحذف I<ملف> المصدر ما لم يُحدد الخيار B<--keep>. لا يُحذف I<ملف> المصدر أبداً إذا كُتب المخرج إلى المخرج القياسي أو عند حدوث خطأ." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Sending B or B to the B process makes it print progress information to standard error. This has only limited use since when standard error is a terminal, using B<--verbose> will display an automatically updating progress indicator." +msgstr "إرسال B أو B إلى عملية B يجعلها تطبع معلومات التقدم إلى الخطأ القياسي. هذا له استخدام محدود لأنه عندما يكون الخطأ القياسي هو الطرفية، فإن استخدام B<--verbose> يعرض مؤشر تقدم يحدث آلياً." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Memory usage" +msgstr "استخدام الذاكرة" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The memory usage of B varies from a few hundred kilobytes to several gigabytes depending on the compression settings. The settings used when compressing a file determine the memory requirements of the decompressor. Typically the decompressor needs 5\\ % to 20\\ % of the amount of memory that the compressor needed when creating the file. For example, decompressing a file created with B currently requires 65\\ MiB of memory. Still, it is possible to have B<.xz> files that require several gigabytes of memory to decompress." +msgstr "يختلف استخدام الذاكرة لـ B من بضع مئات الكيلوبايتات إلى عدة جيجابايتات اعتماداً على إعدادات الضغط. تحدد الإعدادات المستخدمة عند ضغط الملف متطلبات الذاكرة لبرنامج فك الضغط. عادةً يحتاج برنامج فك الضغط من 5% إلى 20% من كمية الذاكرة التي احتاج إليها الضاغط عند إنشاء الملف. على سبيل المثال، يتطلب فك ضغط ملف أُنشئ باستخدام B حالياً 65 ميجابايت من الذاكرة. ومع ذلك، من الممكن وجود ملفات B<.xz> تتطلب عدة جيجابايتات من الذاكرة لفك ضغطها." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Especially users of older systems may find the possibility of very large memory usage annoying. To prevent uncomfortable surprises, B has a built-in memory usage limiter, which is disabled by default. While some operating systems provide ways to limit the memory usage of processes, relying on it wasn't deemed to be flexible enough (for example, using B(1) to limit virtual memory tends to cripple B(2))." +msgstr "قد يجد مستخدمو الأنظمة القديمة خصوصاً احتمال استهلاك الذاكرة بشكل كبير جداً أمراً مزعجاً. لمنع المفاجآت غير المريحة، يمتلك B محدد استهلاك ذاكرة مدمجاً، وهو معطل بشكل مبدئي. في حين توفر بعض أنظمة التشغيل طرقاً للحد من استهلاك الذاكرة للعمليات، لم يُعتبر الاعتماد عليها مرناً بما يكفي (على سبيل المثال، استخدام B(1) للحد من الذاكرة الافتراضية يؤدي إلى إضعاف B(2))." + +#. TRANSLATORS: Don't translate the uppercase XZ_DEFAULTS. +#. It's a name of an environment variable. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The memory usage limiter can be enabled with the command line option B<--memlimit=>I. Often it is more convenient to enable the limiter by default by setting the environment variable B, for example, B. It is possible to set the limits separately for compression and decompression by using B<--memlimit-compress=>I and B<--memlimit-decompress=>I. Using these two options outside B is rarely useful because a single run of B cannot do both compression and decompression and B<--memlimit=>I (or B<-M> I) is shorter to type on the command line." +msgstr "يمكن تفعيل محدد استهلاك الذاكرة عبر خيار سطر الأوامر B<--memlimit=>I. غالباً ما يكون من الأنسب تفعيل المحدد بشكل مبدئي عن طريق ضبط متغير البيئة B، مثلاً: B. يمكن ضبط الحدود بشكل منفصل للضغط وفك الضغط باستخدام B<--memlimit-compress=>I و B<--memlimit-decompress=>I. نادراً ما يكون استخدام هذين الخيارين خارج B مفيداً لأن تشغيلاً واحداً لبرنامج B لا يمكنه القيام بالضغط وفك الضغط معاً، كما أن الخيار B<--memlimit=>I (أو B<-M> I) أسهل في الكتابة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the specified memory usage limit is exceeded when decompressing, B will display an error and decompressing the file will fail. If the limit is exceeded when compressing, B will try to scale the settings down so that the limit is no longer exceeded (except when using B<--format=raw> or B<--no-adjust>). This way the operation won't fail unless the limit is very small. The scaling of the settings is done in steps that don't match the compression level presets, for example, if the limit is only slightly less than the amount required for B, the settings will be scaled down only a little, not all the way down to B." +msgstr "إذا تم تجاوز حد استهلاك الذاكرة المحدد عند فك الضغط، يعرض B خطأ ويفشل فك ضغط الملف. إذا تم تجاوز الحد عند الضغط، يحاول B خفض الإعدادات بحيث لا يتم تجاوز الحد (إلا عند استخدام B<--format=raw> أو B<--no-adjust>). بهذه الطريقة لن تفشل العملية إلا إذا كان الحد صغيراً جداً. يتم خفض الإعدادات بخطوات لا تطابق مستويات الضغط المعدة مسبقاً؛ فمثلاً إذا كان الحد أقل بقليل من الكمية المطلوبة للخيار B، تُخفض الإعدادات قليلاً فقط، وليس إلى مستوى B." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Concatenation and padding with .xz files" +msgstr "الدمج والحشو مع ملفات .xz" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "It is possible to concatenate B<.xz> files as is. B will decompress such files as if they were a single B<.xz> file." +msgstr "من الممكن دمج ملفات B<.xz> كما هي. سيفك B ضغط هذه الملفات كما لو كانت ملفاً واحداً بصيغة B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "It is possible to insert padding between the concatenated parts or after the last part. The padding must consist of null bytes and the size of the padding must be a multiple of four bytes. This can be useful, for example, if the B<.xz> file is stored on a medium that measures file sizes in 512-byte blocks." +msgstr "من الممكن إدراج حشو بين الأجزاء المدمجة أو بعد الجزء الأخير. يجب أن يتكون الحشو من بايتات صفرية ويجب أن يكون حجم الحشو مضاعفاً لأربعة بايتات. يمكن أن يكون هذا مفيداً، مثلاً، إذا كان ملف B<.xz> مخزناً على وسيط يقيس أحجام الملفات بكتل سعة 512 بايت." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Concatenation and padding are not allowed with B<.lzma> files or raw streams." +msgstr "الدمج والحشو غير مسموح بهما مع ملفات B<.lzma> أو التدفقات الخام." + +#. type: SH +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "OPTIONS" +msgstr "خيارات" + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Integer suffixes and special values" +msgstr "لواحق الأعداد والقيم الخاصة" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In most places where an integer argument is expected, an optional suffix is supported to easily indicate large integers. There must be no space between the integer and the suffix." +msgstr "في معظم الأماكن التي يُتوقع فيها معامل عددي، تُدعم لاحقة اختيارية للإشارة بسهولة إلى الأعداد الكبيرة. يجب ألا توجد مسافة بين العدد واللاحقة." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Multiply the integer by 1,024 (2^10). B, B, B, B, and B are accepted as synonyms for B." +msgstr "ضرب العدد في 1,024 (2^10). تُقبل B و B و B و B و B كمرادفات لـ B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Multiply the integer by 1,048,576 (2^20). B, B, B, and B are accepted as synonyms for B." +msgstr "ضرب العدد في 1,048,576 (2^20). تُقبل B و B و B و B كمرادفات لـ B." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Multiply the integer by 1,073,741,824 (2^30). B, B, B, and B are accepted as synonyms for B." +msgstr "ضرب العدد في 1,073,741,824 (2^30). تُقبل B و B و B و B كمرادفات لـ B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The special value B can be used to indicate the maximum integer value supported by the option." +msgstr "يمكن استخدام القيمة الخاصة B للإشارة إلى أقصى قيمة عددية يدعمها الخيار." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Operation mode" +msgstr "وضع التشغيل" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If multiple operation mode options are given, the last one takes effect." +msgstr "إذا أُعطيت عدة خيارات لوضع التشغيل، فإن الأخير هو الذي يسري مفعوله." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-z>, B<--compress>" +msgstr "B<-z>, B<--compress>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress. This is the default operation mode when no operation mode option is specified and no other operation mode is implied from the command name (for example, B implies B<--decompress>)." +msgstr "يضغط. هذا هو وضع التشغيل الـ B<مبدئي> عند عدم تحديد خيار وضع تشغيل وعدم استنتاج وضع تشغيل آخر من اسم الأمر (على سبيل المثال، B يقتضي B<--decompress>)." + +#. The DESCRIPTION section already says this but it's good to repeat it +#. here because the default behavior is a bit dangerous and new users +#. in a hurry may skip reading the DESCRIPTION section. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "After successful compression, the source file is removed unless writing to standard output or B<--keep> was specified." +msgstr "بعد الضغط بنجاح، يُحذف ملف المصدر ما لم يُحدد المخرج القياسي أو الخيار B<--keep>." + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-d>, B<--decompress>, B<--uncompress>" +msgstr "B<-d>, B<--decompress>, B<--uncompress>" + +#. The DESCRIPTION section already says this but it's good to repeat it +#. here because the default behavior is a bit dangerous and new users +#. in a hurry may skip reading the DESCRIPTION section. +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Decompress. After successful decompression, the source file is removed unless writing to standard output or B<--keep> was specified." +msgstr "يفك الضغط. بعد فك الضغط بنجاح، يزال الملف المصدر ما لم يكن الكتابة إلى الخرج القياسي أو خيار B<--keep> محدداً." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-t>, B<--test>" +msgstr "B<-t>, B<--test>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Test the integrity of compressed I. This option is equivalent to B<--decompress --stdout> except that the decompressed data is discarded instead of being written to standard output. No files are created or removed." +msgstr "يختبر سلامة I<الملفات> المضغوطة. هذا الخيار يكافئ B<--decompress --stdout> باستثناء أن البيانات المفكوك ضغطها تُهمَل بدلاً من كتابتها إلى الخرج القياسي. لا تُنشأ ولا تُزال أي ملفات." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-l>, B<--list>" +msgstr "B<-l>, B<--list>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Print information about compressed I. No uncompressed output is produced, and no files are created or removed. In list mode, the program cannot read the compressed data from standard input or from other unseekable sources." +msgstr "يطبع معلومات حول I<الملفات> المضغوطة. لا يُنتج أي خرج مفكوك ضغطه، ولا تُنشأ ولا تُزال أي ملفات. في وضع القائمة، لا يستطيع البرنامج قراءة البيانات المضغوطة من الدخل القياسي أو من المصادر الأخرى التي لا تدعم البحث (unseekable)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default listing shows basic information about I, one file per line. To get more detailed information, use also the B<--verbose> option. For even more information, use B<--verbose> twice, but note that this may be slow, because getting all the extra information requires many seeks. The width of verbose output exceeds 80 characters, so piping the output to, for example, B may be convenient if the terminal isn't wide enough." +msgstr "تُظهر القائمة المبدئية معلومات أساسية حول I<الملفات>، بمعدل ملف واحد لكل سطر. للحصول على معلومات أكثر تفصيلاً، استخدم أيضاً الخيار B<--verbose>. لمزيد من المعلومات، استخدم B<--verbose> مرتين، لكن لاحظ أن هذا قد يكون بطيئاً لأن الحصول على كل المعلومات الإضافية يتطلب العديد من عمليات البحث. يتجاوز عرض المخرج التفصيلي 80 حرفاً، لذا قد يكون من المناسب تمرير المخرج إلى B مثلاً إذا لم تكن الطرفية عريضة بما يكفي." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The exact output may vary between B versions and different locales. For machine-readable output, B<--robot --list> should be used." +msgstr "قد يختلف المخرج الدقيق بين إصدارات B والإعدادات المحلية المختلفة. للمخرج القابل للقراءة آلياً، يجب استخدام B<--robot --list>." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Operation modifiers" +msgstr "معدلات العمليات" + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-k>, B<--keep>" +msgstr "B<-k>, B<--keep>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't delete the input files." +msgstr "عدم حذف ملفات المدخلات." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since B 5.2.6, this option also makes B compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file. In earlier versions this was only done with B<--force>." +msgstr "منذ B 5.2.6، يجعل هذا الخيار B يضغط أو يفك الضغط حتى لو كان المدخل وصلاً رمزياً لملف عادي، أو يمتلك أكثر من وصلة صلبة، أو عُينت له بتات setuid أو setgid أو sticky. لا تُنسخ بتات setuid و setgid و sticky إلى الملف الهدف. في الإصدارات الأقدم، كان هذا يتم فقط مع الخيار B<--force>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-f>, B<--force>" +msgstr "B<-f>, B<--force>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option has several effects:" +msgstr "هذا الخيار له عدة تأثيرات:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the target file already exists, delete it before compressing or decompressing." +msgstr "إذا كان الملف الهدف موجوداً بالفعل، يُحذف قبل الضغط أو فك الضغط." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress or decompress even if the input is a symbolic link to a regular file, has more than one hard link, or has the setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file." +msgstr "الضغط أو فك الضغط حتى لو كان المدخل وصلاً رمزياً لملف عادي، أو يمتلك أكثر من وصلة صلبة، أو عُينت له بتات setuid أو setgid أو sticky. لا تُنسخ بتات setuid و setgid و sticky إلى الملف الهدف." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When used with B<--decompress> B<--stdout> and B cannot recognize the type of the source file, copy the source file as is to standard output. This allows B B<--force> to be used like B(1) for files that have not been compressed with B. Note that in future, B might support new compressed file formats, which may make B decompress more types of files instead of copying them as is to standard output. B<--format=>I can be used to restrict B to decompress only a single file format." +msgstr "عند استخدامه مع B<--decompress> و B<--stdout> وتعذر على B التعرف على نوع ملف المصدر، ينسخ ملف المصدر كما هو إلى المخرج القياسي. هذا يسمح باستخدام B B<--force> مثل B(1) للملفات التي لم تُضغط باستخدام B. لاحظ أنه مستقبلاً، قد يدعم B تنسيقات ملفات مضغوطة جديدة، مما قد يجعل B يفك ضغط أنواع أكثر من الملفات بدلاً من نسخها كما هي إلى المخرج القياسي. يمكن استخدام B<--format=>I لقصر B على فك ضغط تنسيق ملف واحد فقط." + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-c>, B<--stdout>, B<--to-stdout>" +msgstr "B<-c>, B<--stdout>, B<--to-stdout>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Write the compressed or decompressed data to standard output instead of a file. This implies B<--keep>." +msgstr "كتابة البيانات المضغوطة أو المفكوكة إلى المخرج القياسي بدلاً من ملف. هذا يتضمن الخيار B<--keep>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--single-stream>" +msgstr "B<--single-stream>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Decompress only the first B<.xz> stream, and silently ignore possible remaining input data following the stream. Normally such trailing garbage makes B display an error." +msgstr "فك ضغط أول تدفق B<.xz> فقط، وتجاهل أي بيانات مدخلات متبقية محتملة تتبع التدفق بصمت. عادة ما تتسبب هذه البيانات الزائدة في عرض خطأ من قبل B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B never decompresses more than one stream from B<.lzma> files or raw streams, but this option still makes B ignore the possible trailing data after the B<.lzma> file or raw stream." +msgstr "لا يقوم B أبداً بفك ضغط أكثر من تدفق واحد من ملفات B<.lzma> أو التدفقات الخام، لكن هذا الخيار لا يزال يجعل B يتجاهل البيانات اللاحقة المحتملة بعد ملف B<.lzma> أو التدفق الخام." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option has no effect if the operation mode is not B<--decompress> or B<--test>." +msgstr "هذا الخيار ليس له تأثير إذا لم يكن وضع التشغيل هو B<--decompress> أو B<--test>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since B 5.7.1alpha, B<--single-stream> implies B<--keep>." +msgstr "منذ B 5.7.1alpha، يتضمن B<--single-stream> الخيار B<--keep>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--no-sparse>" +msgstr "B<--no-sparse>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Disable creation of sparse files. By default, if decompressing into a regular file, B tries to make the file sparse if the decompressed data contains long sequences of binary zeros. It also works when writing to standard output as long as standard output is connected to a regular file and certain additional conditions are met to make it safe. Creating sparse files may save disk space and speed up the decompression by reducing the amount of disk I/O." +msgstr "يعطل إنشاء الملفات المتفرقة. الـ B<مبدئي>، عند فك الضغط إلى ملف عادي، يحاول B جعل الملف متفرقاً إذا كانت البيانات المفكوك ضغطها تحتوي على B<تسلسل>ات طويلة من الأصفار الثنائية. يعمل هذا أيضاً عند الكتابة إلى الخرج القياسي طالما كان الخرج القياسي متصلاً بملف عادي واستيفاء شروط إضافية معينة لضمان الأمان. قد يوفر إنشاء الملفات المتفرقة مساحة القرص ويسرع فك الضغط بتقليل كمية عمليات الإدخال والإخراج للقرص." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-S> I<.suf>, B<--suffix=>I<.suf>" +msgstr "B<-S> I<.suf>, B<--suffix=>I<.suf>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing, use I<.suf> as the suffix for the target file instead of B<.xz> or B<.lzma>. If not writing to standard output and the source file already has the suffix I<.suf>, a warning is displayed and the file is skipped." +msgstr "عند الضغط، استخدم I<.suf> كملحق للملف الهدف بدلاً من B<.xz> أو B<.lzma>. إذا لم تكن الكتابة إلى المخرج القياسي وكان ملف المصدر يمتلك بالفعل الملحق I<.suf>، يُعرض تحذير ويُتخطى الملف." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When decompressing, recognize files with the suffix I<.suf> in addition to files with the B<.xz>, B<.txz>, B<.lzma>, B<.tlz>, or B<.lz> suffix. If the source file has the suffix I<.suf>, the suffix is removed to get the target filename." +msgstr "عند فك الضغط، تعرف على الملفات ذات الملحق I<.suf> بالإضافة إلى الملفات ذات الملحقات B<.xz> أو B<.txz> أو B<.lzma> أو B<.tlz> أو B<.lz>. إذا كان لملف المصدر الملحق I<.suf>، يُزال الملحق للحصول على اسم الملف الهدف." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing or decompressing raw streams (B<--format=raw>), the suffix must always be specified unless writing to standard output, because there is no default suffix for raw streams." +msgstr "عند ضغط أو فك ضغط التدفقات الخام (B<--format=raw>)، يجب دائماً تحديد الملحق ما لم تكن الكتابة إلى المخرج القياسي، لأنه لا يوجد ملحق مبدئي للتدفقات الخام." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--files>[B<=>I]" +msgstr "B<--files>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Read the filenames to process from I; if I is omitted, filenames are read from standard input. Filenames must be terminated with the newline character. A dash (B<->) is taken as a regular filename; it doesn't mean standard input. If filenames are given also as command line arguments, they are processed before the filenames read from I." +msgstr "قراءة أسماء الملفات المطلوب معالجتها من I<ملف>؛ إذا حُذف I<ملف>، تُقرأ أسماء الملفات من المدخل القياسي. يجب إنهاء أسماء الملفات بحرف سطر جديد. تُعامل الشَرطة (B<->) كاسم ملف عادي؛ ولا تعني المدخل القياسي. إذا أُعطيت أسماء ملفات أيضاً كمعاملات لسطر الأوامر، فستتم معالجتها قبل أسماء الملفات المقروءة من I<ملف>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--files0>[B<=>I]" +msgstr "B<--files0>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is identical to B<--files>[B<=>I] except that each filename must be terminated with the null character." +msgstr "هذا مطابق للخيار B<--files>[B<=>I] باستثناء أنه يجب إنهاء كل اسم ملف بالحرف الصفري (null)." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Basic file format and compression options" +msgstr "تنسيق الملف الأساسي وخيارات الضغط" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-F> I, B<--format=>I" +msgstr "B<-F> I, B<--format=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the file I to compress or decompress:" +msgstr "حدد I<تنسيق> الملف للضغط أو فك الضغط:" + +#. TRANSLATORS: Don't translate bold string B. +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is the default. When compressing, B is equivalent to B. When decompressing, the format of the input file is automatically detected. Note that raw streams (created with B<--format=raw>) cannot be auto-detected." +msgstr "هذا هو المبدئي. عند الضغط، يكون B مكافئاً لـ B. عند فك الضغط، يُكتشف تنسيق ملف المدخلات آلياً. لاحظ أن التدفقات الخام (التي تم إنشاؤها باستخدام B<--format=raw>) لا يمكن اكتشافها آلياً." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress to the B<.xz> file format, or accept only B<.xz> files when decompressing." +msgstr "الضغط بتنسيق ملف B<.xz>، أو قبول ملفات B<.xz> فقط عند فك الضغط." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B, B" +msgstr "B, B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files when decompressing. The alternative name B is provided for backwards compatibility with LZMA Utils." +msgstr "الضغط بتنسيق ملف B<.lzma> القديم، أو قبول ملفات B<.lzma> فقط عند فك الضغط. تم توفير الاسم البديل B للتوافق مع الإصدارات السابقة من أدوات LZMA." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Accept only B<.lz> files when decompressing. Compression is not supported." +msgstr "قبول ملفات B<.lz> فقط عند فك الضغط. الضغط غير مدعوم." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The B<.lz> format versions 0 and 1 are supported. Version 0 files were produced by B 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B 1.18. B 1.4 and later create files in the format version 1." +msgstr "تنسيق B<.lz> الإصداران 0 و 1 مدعومان. ملفات الإصدار 0 أُنتجت بواسطة B 1.3 وما قبله. هذه الملفات ليست شائعة ولكن يمكن العثور عليها في أرشيفات الملفات حيث أُصدرت بعض حزم المصدر بهذا التنسيق. قد يمتلك الأشخاص ملفات شخصية قديمة بهذا التنسيق أيضاً. أزيل دعم فك الضغط لتنسيق الإصدار 0 في B 1.18. يقوم B 1.4 والإصدارات الأحدث بإنشاء ملفات بتنسيق الإصدار 1." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compress or uncompress a raw stream (no headers). This is meant for advanced users only. To decode raw streams, you need use B<--format=raw> and explicitly specify the filter chain, which normally would have been stored in the container headers." +msgstr "ضغط أو فك ضغط تدفق خام (بدون ترويسات). هذا مخصص للمستخدمين المتقدمين فقط. لفك ترميز التدفقات الخام، تحتاج لاستخدام B<--format=raw> وتحديد سلسلة المرشحات صراحة، والتي كان من المفترض تخزينها في ترويسات الحاوية بشكل طبيعي." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-C> I, B<--check=>I" +msgstr "B<-C> I, B<--check=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the type of the integrity check. The check is calculated from the uncompressed data and stored in the B<.xz> file. This option has an effect only when compressing into the B<.xz> format; the B<.lzma> format doesn't support integrity checks. The integrity check (if any) is verified when the B<.xz> file is decompressed." +msgstr "حدد نوع فحص السلامة. يتم حساب الفحص من البيانات غير المضغوطة ويُخزن في ملف B<.xz>. هذا الخيار له تأثير فقط عند الضغط بتنسيق B<.xz>؛ تنسيق B<.lzma> لا يدعم فحوصات السلامة. يتم التحقق من فحص السلامة (إن وجد) عند فك ضغط ملف B<.xz>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Supported I types:" +msgstr "أنواع I<الفحص> المدعومة:" + +#. TRANSLATORS: Don't translate the bold strings B, B, +#. B, and B. The command line option --check accepts +#. only the untranslated strings. +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't calculate an integrity check at all. This is usually a bad idea. This can be useful when integrity of the data is verified by other means anyway." +msgstr "عدم حساب فحص السلامة على الإطلاق. عادة ما تكون هذه فكرة سيئة. قد يكون هذا مفيداً عندما يتم التحقق من سلامة البيانات بوسائل أخرى على أي حال." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)." +msgstr "حساب CRC32 باستخدام الحدودية من IEEE-802.3 (إيثرنت)." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Calculate CRC64 using the polynomial from ECMA-182. This is the default, since it is slightly better than CRC32 at detecting damaged files and the speed difference is negligible." +msgstr "حساب CRC64 باستخدام الحدودية من ECMA-182. هذا هو المبدئي، لأنه أفضل قليلاً من CRC32 في اكتشاف الملفات التالفة وفارق السرعة ضئيل." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64." +msgstr "حساب SHA-256. هذا أبطأ نوعاً ما من CRC32 و CRC64." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Integrity of the B<.xz> headers is always verified with CRC32. It is not possible to change or disable it." +msgstr "يتم دائماً التحقق من سلامة ترويسات B<.xz> باستخدام CRC32. لا يمكن تغييره أو تعطيله." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--ignore-check>" +msgstr "B<--ignore-check>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't verify the integrity check of the compressed data when decompressing. The CRC32 values in the B<.xz> headers will still be verified normally." +msgstr "عدم التحقق من فحص سلامة البيانات المضغوطة عند فك الضغط. سيستمر التحقق من قيم CRC32 في ترويسات B<.xz> بشكل طبيعي." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B Possible reasons to use this option:" +msgstr "B<لا تستخدم هذا الخيار إلا إذا كنت تعرف ما تفعله.> الأسباب المحتملة لاستخدام هذا الخيار:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Trying to recover data from a corrupt .xz file." +msgstr "محاولة استعادة البيانات من ملف .xz تالف." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Speeding up decompression. This matters mostly with SHA-256 or with files that have compressed extremely well. It's recommended to not use this option for this purpose unless the file integrity is verified externally in some other way." +msgstr "تسريع فك الضغط. يهم هذا غالباً مع SHA-256 أو مع الملفات التي ضُغطت بشكل جيد للغاية. يوصى بعدم استخدام هذا الخيار لهذا الغرض إلا إذا تم التحقق من سلامة الملف خارجياً بطريقة أخرى." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-0> ... B<-9>" +msgstr "B<-0> ... B<-9>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Select a compression preset level. The default is B<-6>. If multiple preset levels are specified, the last one takes effect. If a custom filter chain was already specified, setting a compression preset level clears the custom filter chain." +msgstr "اختر مستوى ضغط معداً مسبقاً. المستوى المبدئي هو B<-6>. إذا حُددت عدة مستويات معدة مسبقاً، فإن الأخير هو الذي يسري مفعوله. إذا تم تحديد سلسلة مرشحات مخصصة بالفعل، فإن اختيار مستوى ضغط معد مسبقاً يمسح سلسلة المرشحات المخصصة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The differences between the presets are more significant than with B(1) and B(1). The selected compression settings determine the memory requirements of the decompressor, thus using a too high preset level might make it painful to decompress the file on an old system with little RAM. Specifically, B like it often is with B(1) and B(1)." +msgstr "الاختلافات بين الإعدادات المسبقة أكثر وضوحاً مما هي عليه في B(1) و B(1). تحدد إعدادات الضغط المختارة متطلبات الذاكرة لفك الضغط، لذا فإن استخدام مستوى مرتفع جداً قد يجعل فك ضغط الملف مؤلماً على نظام قديم بذاكرة وصول عشوائي قليلة. تحديداً، B<ليست فكرة جيدة استخدام -9 بشكل أعمى لكل شيء> كما هو الحال غالباً مع B(1) و B(1)." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-0> ... B<-3>" +msgstr "B<-0> ... B<-3>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These are somewhat fast presets. B<-0> is sometimes faster than B while compressing much better. The higher ones often have speed comparable to B(1) with comparable or better compression ratio, although the results depend a lot on the type of data being compressed." +msgstr "تُعد هذه عمليات ضبط مسبق سريعة نوعاً ما. يكون المستوى B<-0> أحياناً أسرع من B مع توفير ضغط أفضل بكثير. وغالباً ما تملك المستويات الأعلى سرعة تُضاهي B(1) مع نسبة ضغط مماثلة أو أفضل، رغم أن النتائج تعتمد كثيراً على نوع البيانات الجاري ضغطها." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-4> ... B<-6>" +msgstr "B<-4> ... B<-6>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Good to very good compression while keeping decompressor memory usage reasonable even for old systems. B<-6> is the default, which is usually a good choice for distributing files that need to be decompressible even on systems with only 16\\ MiB RAM. (B<-5e> or B<-6e> may be worth considering too. See B<--extreme>.)" +msgstr "ضغط جيد إلى جيد جداً مع الحفاظ على استهلاك ذاكرة فك الضغط معقولاً حتى للأنظمة القديمة. B<-6> هو المبدئي، وهو عادة خيار جيد لتوزيع الملفات التي يجب أن تكون قابلة لفك الضغط حتى على أنظمة بذاكرة 16\\ ميجابايت فقط. (قد يكون من الجدير بالذكر التفكير في B<-5e> أو B<-6e> أيضاً. انظر B<--extreme>.)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-7 ... -9>" +msgstr "B<-7 ... -9>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These are like B<-6> but with higher compressor and decompressor memory requirements. These are useful only when compressing files bigger than 8\\ MiB, 16\\ MiB, and 32\\ MiB, respectively." +msgstr "هذه تشبه B<-6> ولكن مع متطلبات ذاكرة أعلى للضغط وفك الضغط. هذه مفيدة فقط عند ضغط ملفات أكبر من 8\\ ميجابايت، و 16\\ ميجابايت، و 32\\ ميجابايت على التوالي." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "On the same hardware, the decompression speed is approximately a constant number of bytes of compressed data per second. In other words, the better the compression, the faster the decompression will usually be. This also means that the amount of uncompressed output produced per second can vary a lot." +msgstr "على نفس العتاد، سرعة فك الضغط هي تقريباً عدد ثابت من بايتات البيانات المضغوطة في الثانية. بمعنى آخر، كلما كان الضغط أفضل، كان فك الضغط أسرع عادة. يعني هذا أيضاً أن كمية المخرج غير المضغوط المنتج في الثانية يمكن أن تختلف كثيراً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The following table summarises the features of the presets:" +msgstr "يلخص الجدول التالي مميزات الإعدادات المسبقة:" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Preset" +msgstr "المستوى" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "DictSize" +msgstr "حجم القاموس" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "CompCPU" +msgstr "معالج الضغط" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "CompMem" +msgstr "ذاكرة الضغط" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "DecMem" +msgstr "ذاكرة فك الضغط" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-0" +msgstr "-0" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "256 KiB" +msgstr "256 كيلوبايت" + +#. type: TP +#: ../src/xz/xz.1 ../src/scripts/xzgrep.1 +#, no-wrap +msgid "0" +msgstr "0" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "3 MiB" +msgstr "3 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "1 MiB" +msgstr "1 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-1" +msgstr "-1" + +#. type: TP +#: ../src/xz/xz.1 ../src/scripts/xzgrep.1 +#, no-wrap +msgid "1" +msgstr "1" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "9 MiB" +msgstr "9 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "2 MiB" +msgstr "2 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-2" +msgstr "-2" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "2" +msgstr "2" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "17 MiB" +msgstr "17 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-3" +msgstr "-3" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "4 MiB" +msgstr "4 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "3" +msgstr "3" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "32 MiB" +msgstr "32 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "5 MiB" +msgstr "5 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-4" +msgstr "-4" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "4" +msgstr "4" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "48 MiB" +msgstr "48 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-5" +msgstr "-5" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "8 MiB" +msgstr "8 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "5" +msgstr "5" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "94 MiB" +msgstr "94 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-6" +msgstr "-6" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "6" +msgstr "6" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-7" +msgstr "-7" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "16 MiB" +msgstr "16 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "186 MiB" +msgstr "186 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-8" +msgstr "-8" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "370 MiB" +msgstr "370 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "33 MiB" +msgstr "33 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-9" +msgstr "-9" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "64 MiB" +msgstr "64 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "674 MiB" +msgstr "674 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "65 MiB" +msgstr "65 ميجابايت" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Column descriptions:" +msgstr "وصف الأعمدة:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "DictSize is the LZMA2 dictionary size. It is waste of memory to use a dictionary bigger than the size of the uncompressed file. This is why it is good to avoid using the presets B<-7> ... B<-9> when there's no real need for them. At B<-6> and lower, the amount of memory wasted is usually low enough to not matter." +msgstr "DictSize هو حجم قاموس LZMA2. من هدر الذاكرة استخدام قاموس أكبر من حجم الملف غير المضغوط. لهذا السبب من الجيد تجنب استخدام الإعدادات المسبقة B<-7> ... B<-9> عندما لا تكون هناك حاجة حقيقية لها. في المستوى B<-6> وما دونه، تكون كمية الذاكرة المهدرة عادة منخفضة بما يكفي بحيث لا تهم." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "CompCPU is a simplified representation of the LZMA2 settings that affect compression speed. The dictionary size affects speed too, so while CompCPU is the same for levels B<-6> ... B<-9>, higher levels still tend to be a little slower. To get even slower and thus possibly better compression, see B<--extreme>." +msgstr "CompCPU هو تمثيل مبسط لإعدادات LZMA2 التي تؤثر على سرعة الضغط. يؤثر حجم القاموس على السرعة أيضاً، لذا بينما CompCPU هو نفسه للمستويات B<-6> ... B<-9>، فإن المستويات الأعلى لا تزال تميل إلى أن تكون أبطأ قليلاً. للحصول على ضغط أبطأ وبالتالي ربما أفضل، انظر B<--extreme>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "CompMem contains the compressor memory requirements in the single-threaded mode. It may vary slightly between B versions." +msgstr "CompMem يحتوي على متطلبات ذاكرة الضغط في وضع الخيط الواحد. قد يختلف قليلاً بين إصدارات B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "DecMem contains the decompressor memory requirements. That is, the compression settings determine the memory requirements of the decompressor. The exact decompressor memory usage is slightly more than the LZMA2 dictionary size, but the values in the table have been rounded up to the next full MiB." +msgstr "DecMem يحتوي على متطلبات ذاكرة فك الضغط. أي أن إعدادات الضغط تحدد متطلبات الذاكرة لفك الضغط. استهلاك ذاكرة فك الضغط الفعلي هو أكثر بقليل من حجم قاموس LZMA2، ولكن تم تقريب القيم في الجدول إلى أقرب ميجابايت كاملة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Memory requirements of the multi-threaded mode are significantly higher than that of the single-threaded mode. With the default value of B<--block-size>, each thread needs 3*3*DictSize plus CompMem or DecMem. For example, four threads with preset B<-6> needs 660\\(en670\\ MiB of memory." +msgstr "متطلبات الذاكرة لوضع الخيوط المتعددة أعلى بكثير من وضع الخيط الواحد. مع القيمة المبدئية لـ B<--block-size>، يحتاج كل خيط إلى 3*3*DictSize بالإضافة إلى CompMem أو DecMem. على سبيل المثال، أربعة خيوط مع المستوى B<-6> تحتاج من 660 إلى 670 ميجابايت من الذاكرة." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-e>, B<--extreme>" +msgstr "B<-e>, B<--extreme>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Use a slower variant of the selected compression preset level (B<-0> ... B<-9>) to hopefully get a little bit better compression ratio, but with bad luck this can also make it worse. Decompressor memory usage is not affected, but compressor memory usage increases a little at preset levels B<-0> ... B<-3>." +msgstr "استخدم نوعاً أبطأ من مستوى الضغط المختار (B<-0> ... B<-9>) على أمل الحصول على نسبة ضغط أفضل قليلاً، ولكن مع سوء الحظ قد يجعل هذا الأمر أسوأ. لا يتأثر استهلاك ذاكرة فك الضغط، ولكن استهلاك ذاكرة الضغط يزداد قليلاً في المستويات B<-0> ... B<-3>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since there are two presets with dictionary sizes 4\\ MiB and 8\\ MiB, the presets B<-3e> and B<-5e> use slightly faster settings (lower CompCPU) than B<-4e> and B<-6e>, respectively. That way no two presets are identical." +msgstr "بما أن هناك مستويين بحجم قاموس 4 ميجابايت و 8 ميجابايت، فإن المستويين B<-3e> و B<-5e> يستخدمان إعدادات أسرع قليلاً (CompCPU أقل) من B<-4e> و B<-6e> على التوالي. بهذه الطريقة لا توجد مستويات متطابقة." + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-0e" +msgstr "-0e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "8" +msgstr "8" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-1e" +msgstr "-1e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "13 MiB" +msgstr "13 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-2e" +msgstr "-2e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "25 MiB" +msgstr "25 ميجابايت" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-3e" +msgstr "-3e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "7" +msgstr "7" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-4e" +msgstr "-4e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-5e" +msgstr "-5e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-6e" +msgstr "-6e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-7e" +msgstr "-7e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-8e" +msgstr "-8e" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "-9e" +msgstr "-9e" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For example, there are a total of four presets that use 8\\ MiB dictionary, whose order from the fastest to the slowest is B<-5>, B<-6>, B<-5e>, and B<-6e>." +msgstr "على سبيل المثال، هناك إجمالي أربعة إعدادات مسبقة تستخدم قاموساً بحجم 8 ميجابايت، وترتيبها من الأسرع إلى الأبطأ هو B<-5> و B<-6> و B<-5e> و B<-6e>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--fast>" +msgstr "B<--fast>" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--best>" +msgstr "B<--best>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These are somewhat misleading aliases for B<-0> and B<-9>, respectively. These are provided only for backwards compatibility with LZMA Utils. Avoid using these options." +msgstr "هذه أسماء بديلة مضللة نوعاً ما لـ B<-0> و B<-9> على التوالي. تم توفيرها فقط للتوافق مع الإصدارات السابقة من أدوات LZMA. تجنب استخدام هذه الخيارات." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--block-size=>I" +msgstr "B<--block-size=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing to the B<.xz> format, split the input data into blocks of I bytes. The blocks are compressed independently from each other, which helps with multi-threading and makes limited random-access decompression possible. This option is typically used to override the default block size in multi-threaded mode, but this option can be used in single-threaded mode too." +msgstr "عند الضغط بتنسيق B<.xz>، قم بتقسيم بيانات المدخلات إلى كتل بحجم I بايت. تُضغط الكتل بشكل مستقل عن بعضها البعض، مما يساعد في تعدد الخيوط ويجعل فك الضغط العشوائي المحدود ممكناً. يستخدم هذا الخيار عادةً لتجاوز حجم الكتلة المبدئي في وضع تعدد الخيوط، ولكن يمكن استخدامه في وضع الخيط الواحد أيضاً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In multi-threaded mode about three times I bytes will be allocated in each thread for buffering input and output. The default I is three times the LZMA2 dictionary size or 1 MiB, whichever is more. Typically a good value is 2\\(en4 times the size of the LZMA2 dictionary or at least 1 MiB. Using I less than the LZMA2 dictionary size is waste of RAM because then the LZMA2 dictionary buffer will never get fully used. In multi-threaded mode, the sizes of the blocks are stored in the block headers. This size information is required for multi-threaded decompression." +msgstr "في وضع تعدد الخيوط، يتم تخصيص حوالي ثلاثة أضعاف I بايت في كل خيط لتخزين المدخلات والمخرجات مؤقتاً. الحجم I المبدئي هو ثلاثة أضعاف حجم قاموس LZMA2 أو 1 ميجابايت، أيهما أكثر. عادة ما تكون القيمة الجيدة من 2 إلى 4 أضعاف حجم قاموس LZMA2 أو على الأقل 1 ميجابايت. استخدام حجم I أقل من حجم قاموس LZMA2 هو هدر لذاكرة الوصول العشوائي لأن ذاكرة قاموس LZMA2 المؤقتة لن تُستخدم بالكامل أبداً. في وضع تعدد الخيوط، تُخزن أحجام الكتل في ترويسات الكتل. معلومات الحجم هذه مطلوبة لفك الضغط المتعدد الخيوط." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In single-threaded mode no block splitting is done by default. Setting this option doesn't affect memory usage. No size information is stored in block headers, thus files created in single-threaded mode won't be identical to files created in multi-threaded mode. The lack of size information also means that B won't be able decompress the files in multi-threaded mode." +msgstr "في وضع الخيط الواحد لا يتم تقسيم الكتل بشكل مبدئي. ضبط هذا الخيار لا يؤثر على استهلاك الذاكرة. لا تُخزن معلومات الحجم في ترويسات الكتل، وبالتالي فإن الملفات المنشأة في وضع الخيط الواحد لن تكون متطابقة مع الملفات المنشأة في وضع تعدد الخيوط. نقص معلومات الحجم يعني أيضاً أن B لن يتمكن من فك ضغط الملفات في وضع تعدد الخيوط." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--block-list=>I" +msgstr "B<--block-list=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing to the B<.xz> format, start a new block with an optional custom filter chain after the given intervals of uncompressed data." +msgstr "عند الضغط بتنسيق B<.xz>، ابدأ كتلة جديدة مع سلسلة مرشحات مخصصة اختيارية بعد فواصل زمنية معينة من البيانات غير المضغوطة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I are a comma-separated list. Each item consists of an optional filter chain number between 0 and 9 followed by a colon (B<:>) and a required size of uncompressed data. Omitting an item (two or more consecutive commas) is a shorthand to use the size and filters of the previous item." +msgstr "I<العناصر> هي قائمة مفصولة بفاصلة. يتكون كل عنصر من رقم سلسلة مرشحات اختياري بين 0 و 9 تليها نقطتان (B<:>) وحجم مطلوب للبيانات غير المضغوطة. حذف عنصر (فاصلتان متتاليتان أو أكثر) هو اختصار لاستخدام حجم ومرشحات العنصر السابق." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the input file is bigger than the sum of the sizes in I, the last item is repeated until the end of the file. A special value of B<0> may be used as the last size to indicate that the rest of the file should be encoded as a single block." +msgstr "إذا كان ملف المدخلات أكبر من مجموع الأحجام في I<العناصر>، فسيتم تكرار العنصر الأخير حتى نهاية الملف. يمكن استخدام القيمة الخاصة B<0> كآخر حجم للإشارة إلى وجوب ترميز بقية الملف ككتلة واحدة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "An alternative filter chain for each block can be specified in combination with the B<--filters1=>I \\&...\\& B<--filters9=>I options. These options define filter chains with an identifier between 1\\(en9. Filter chain 0 can be used to refer to the default filter chain, which is the same as not specifying a filter chain. The filter chain identifier can be used before the uncompressed size, followed by a colon (B<:>). For example, if one specifies B<--block-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB> then blocks will be created using:" +msgstr "يمكن تحديد سلسلة مرشحات بديلة لكل كتلة بالاشتراك مع الخيارات B<--filters1=>I \\&...\\& B<--filters9=>I. تعرف هذه الخيارات سلاسل المرشحات بمعرف بين 1 و 9. يمكن استخدام سلسلة المرشحات 0 للإشارة إلى سلسلة المرشحات المبدئية، وهو ما يماثل عدم تحديد سلسلة مرشحات. يمكن استخدام معرف سلسلة المرشحات قبل الحجم غير المضغوط، متبوعاً بنقطتين (B<:>). على سبيل المثال، إذا حدد أحدهم B<--block-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB> فسيتم إنشاء الكتل باستخدام:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The filter chain specified by B<--filters1> and 2 MiB input" +msgstr "سلسلة المرشحات المحددة بواسطة B<--filters1> و 2 ميجابايت من المدخلات" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The filter chain specified by B<--filters3> and 2 MiB input" +msgstr "سلسلة المرشحات المحددة بواسطة B<--filters3> و 2 ميجابايت من المدخلات" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The filter chain specified by B<--filters2> and 4 MiB input" +msgstr "سلسلة المرشحات المحددة بواسطة B<--filters2> و 4 ميجابايت من المدخلات" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default filter chain and 2 MiB input" +msgstr "سلسلة المرشحات المبدئية و 2 ميجابايت من المدخلات" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default filter chain and 4 MiB input for every block until end of input." +msgstr "سلسلة المرشحات المبدئية و 4 ميجابايت من المدخلات لكل كتلة حتى نهاية المدخلات." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If one specifies a size that exceeds the encoder's block size (either the default value in threaded mode or the value specified with B<--block-size=>I), the encoder will create additional blocks while keeping the boundaries specified in I. For example, if one specifies B<--block-size=10MiB> B<--block-list=5MiB,10MiB,8MiB,12MiB,24MiB> and the input file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and 1 MiB." +msgstr "إذا حدد أحدهم حجماً يتجاوز حجم كتلة المرمّز (سواء القيمة المبدئية في وضع تعدد الخيوط أو القيمة المحددة باستخدام B<--block-size=>I)، فسيقوم المرمّز بإنشاء كتل إضافية مع الحفاظ على الحدود المحددة في I<العناصر>. على سبيل المثال، إذا حدد أحدهم B<--block-size=10MiB> و B<--block-list=5MiB,10MiB,8MiB,12MiB,24MiB> وكان ملف المدخلات 80 ميجابايت، فسيحصل على 11 كتلة: 5، 10، 8، 10، 2، 10، 10، 4، 10، 10، و 1 ميجابايت." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In multi-threaded mode the sizes of the blocks are stored in the block headers. This isn't done in single-threaded mode, so the encoded output won't be identical to that of the multi-threaded mode." +msgstr "في وضع تعدد الخيوط تُخزن أحجام الكتل في ترويسات الكتل. لا يتم ذلك في وضع الخيط الواحد، لذا لن يكون المخرج المرمّز مطابقاً لمخرج وضع تعدد الخيوط." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--flush-timeout=>I" +msgstr "B<--flush-timeout=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing, if more than I milliseconds (a positive integer) has passed since the previous flush and reading more input would block, all the pending input data is flushed from the encoder and made available in the output stream. This can be useful if B is used to compress data that is streamed over a network. Small I values make the data available at the receiving end with a small delay, but large I values give better compression ratio." +msgstr "عند الضغط، إذا مر أكثر من I ميلي ثانية (عدد صحيح موجب) منذ التفريغ السابق وكان قراءة المزيد من المدخلات سيؤدي إلى التوقف، فسيتم تفريغ جميع بيانات المدخلات المعلقة من المرمّز وجعلها متاحة في تدفق المخرجات. يمكن أن يكون هذا مفيداً إذا استخدم B لضغط البيانات التي تتدفق عبر الشبكة. تجعل قيم I الصغيرة البيانات متاحة في طرف الاستلام بتأخير بسيط، لكن قيم I الكبيرة تعطي نسبة ضغط أفضل." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This feature is disabled by default. If this option is specified more than once, the last one takes effect. The special I value of B<0> can be used to explicitly disable this feature." +msgstr "هذه الميزة معطلة بشكل مبدئي. إذا حُدد هذا الخيار أكثر من مرة، فإن الأخير هو الذي يسري مفعوله. يمكن استخدام قيمة I الخاصة B<0> لتعطيل هذه الميزة صراحة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This feature is not available on non-POSIX systems." +msgstr "هذه الميزة غير متوفرة في الأنظمة غير المتوافقة مع POSIX." + +#. FIXME +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B Currently B is unsuitable for decompressing the stream in real time due to how B does buffering." +msgstr "B<هذه الميزة لا تزال تجريبية.> حالياً يعد B غير مناسب لفك ضغط التدفق في الوقت الفعلي نظراً لكيفية قيام B بالتخزين المؤقت." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--no-sync>" +msgstr "B<--no-sync>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Do not synchronize the target file and its directory to the storage device before removing the source file. This can improve performance if compressing or decompressing many small files. However, if the system crashes soon after the deletion, it is possible that the target file was not written to the storage device but the delete operation was. In that case neither the original source file nor the target file is available." +msgstr "عدم مزامنة الملف الهدف ودليله مع جهاز التخزين قبل حذف ملف المصدر. يمكن لهذا أن يحسن الأداء عند ضغط أو فك ضغط العديد من الملفات الصغيرة. ومع ذلك، إذا تعطل النظام بعد الحذف بفترة وجيزة، فمن المحتمل ألا يكون الملف الهدف قد كُتب على جهاز التخزين رغم تنفيذ عملية الحذف. في هذه الحالة، لن يتوفر ملف المصدر الأصلي ولا الملف الهدف." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option has an effect only when B is going to remove the source file. In other cases synchronization is never done." +msgstr "هذا الخيار له تأثير فقط عندما يهم B بحذف ملف المصدر. في الحالات الأخرى لا تتم المزامنة أبداً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The synchronization and B<--no-sync> were added in B 5.7.1alpha." +msgstr "أضيفت المزامنة و B<--no-sync> في B 5.7.1alpha." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--memlimit-compress=>I" +msgstr "B<--memlimit-compress=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Set a memory usage limit for compression. If this option is specified multiple times, the last one takes effect." +msgstr "تعيين حد استهلاك الذاكرة للضغط. إذا حُدد هذا الخيار عدة مرات، فإن الأخير هو الذي يسري مفعوله." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the compression settings exceed the I, B will attempt to adjust the settings downwards so that the limit is no longer exceeded and display a notice that automatic adjustment was done. The adjustments are done in this order: reducing the number of threads, switching to single-threaded mode if even one thread in multi-threaded mode exceeds the I, and finally reducing the LZMA2 dictionary size." +msgstr "إذا تجاوزت إعدادات الضغط I<الحد>، فسيحاول B ضبط الإعدادات نحو الأسفل بحيث لا يتم تجاوز الحد وعرض إشعار بأنه تم إجراء ضبط آلي. يتم الضبط بهذا الترتيب: تقليل عدد الخيوط، والتحويل إلى وضع الخيط الواحد إذا كان خيط واحد في وضع تعدد الخيوط يتجاوز I<الحد>، وأخيراً تقليل حجم قاموس LZMA2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When compressing with B<--format=raw> or if B<--no-adjust> has been specified, only the number of threads may be reduced since it can be done without affecting the compressed output." +msgstr "عند الضغط باستخدام B<--format=raw> أو إذا تم تحديد B<--no-adjust>، يمكن فقط تقليل عدد الخيوط لأنه يمكن القيام بذلك دون التأثير على المخرج المضغوط." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If the I cannot be met even with the adjustments described above, an error is displayed and B will exit with exit status 1." +msgstr "إذا تعذر الالتزام بـ I<الحد> حتى مع عمليات الضبط الموضحة أعلاه، فسيُعرض خطأ ويخرج B بحالة الخروج 1." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be specified in multiple ways:" +msgstr "يمكن تحديد I<الحد> بعدة طرق:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be an absolute value in bytes. Using an integer suffix like B can be useful. Example: B<--memlimit-compress=80MiB>" +msgstr "يمكن أن يكون I<الحد> قيمة مطلقة بالبايت. استخدام لاحقة عددية مثل B قد يكون مفيداً. مثال: B<--memlimit-compress=80MiB>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be specified as a percentage of total physical memory (RAM). This can be useful especially when setting the B environment variable in a shell initialization script that is shared between different computers. That way the limit is automatically bigger on systems with more memory. Example: B<--memlimit-compress=70%>" +msgstr "يمكن تحديد I<الحد> كنسبة مئوية من إجمالي الذاكرة الفيزيائية (RAM). يمكن أن يكون هذا مفيداً خاصة عند ضبط متغير البيئة B في نص برمجي لبدء تشغيل الصدفة مشترك بين حواسيب مختلفة. بهذه الطريقة يكون الحد أكبر آلياً على الأنظمة ذات الذاكرة الأكبر. مثال: B<--memlimit-compress=70%>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The I can be reset back to its default value by setting it to B<0>. This is currently equivalent to setting the I to B (no memory usage limit)." +msgstr "يمكن إعادة I<الحد> إلى قيمته المبدئية بضبطه على B<0>. هذا يعادل حالياً ضبط I<الحد> على B (لا يوجد حد لاستهلاك الذاكرة)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For 32-bit B there is a special case: if the I would be over B<4020\\ MiB>, the I is set to B<4020\\ MiB>. On MIPS32 B<2000\\ MiB> is used instead. (The values B<0> and B aren't affected by this. A similar feature doesn't exist for decompression.) This can be helpful when a 32-bit executable has access to 4\\ GiB address space (2 GiB on MIPS32) while hopefully doing no harm in other situations." +msgstr "بالنسبة لنسخة B ذات 32 بت، هناك حالة خاصة: إذا كان I<الحد> سيتجاوز B<4020\\ MiB>، فسيتم ضبط I<الحد> على B<4020\\ MiB>. في MIPS32 يتم استخدام B<2000\\ MiB> بدلاً من ذلك. (القيم B<0> و B لا تتأثر بهذا. لا توجد ميزة مماثلة لفك الضغط). يمكن أن يكون هذا مفيداً عندما يكون لملف تنفيذي 32 بت إمكانية الوصول إلى مساحة عنوان 4 جيجابايت (2 جيجابايت في MIPS32) مع الأمل في عدم إلحاق ضرر في الحالات الأخرى." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "See also the section B." +msgstr "انظر أيضاً قسم B<استهلاك الذاكرة>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--memlimit-decompress=>I" +msgstr "B<--memlimit-decompress=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Set a memory usage limit for decompression. This also affects the B<--list> mode. If the operation is not possible without exceeding the I, B will display an error and decompressing the file will fail. See B<--memlimit-compress=>I for possible ways to specify the I." +msgstr "تعيين حد استهلاك الذاكرة لفك الضغط. يؤثر هذا أيضاً على وضع B<--list>. إذا كانت العملية غير ممكنة دون تجاوز I<الحد>، فسيقوم B بعرض خطأ ويفشل فك ضغط الملف. انظر B<--memlimit-compress=>I للتعرف على الطرق الممكنة لتحديد I<الحد>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--memlimit-mt-decompress=>I" +msgstr "B<--memlimit-mt-decompress=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Set a memory usage limit for multi-threaded decompression. This can only affect the number of threads; this will never make B refuse to decompress a file. If I is too low to allow any multi-threading, the I is ignored and B will continue in single-threaded mode. Note that if also B<--memlimit-decompress> is used, it will always apply to both single-threaded and multi-threaded modes, and so the effective I for multi-threading will never be higher than the limit set with B<--memlimit-decompress>." +msgstr "تعيين حد استهلاك الذاكرة لفك الضغط المتعدد الخيوط. يمكن أن يؤثر هذا فقط على عدد الخيوط؛ لن يجعل هذا B يرفض فك ضغط ملف أبداً. إذا كان I<الحد> منخفضاً جداً بحيث لا يسمح بتعدد الخيوط، فسيتم تجاهل I<الحد> وسيقوم B بالاستمرار في وضع الخيط الواحد. لاحظ أنه في حال استخدام B<--memlimit-decompress> أيضاً، فسيتم تطبيقه دائماً على وضعي الخيط الواحد وتعدد الخيوط، وبالتالي لن يكون I<الحد> الفعلي لتعدد الخيوط أعلى من الحد المحدد بواسطة B<--memlimit-decompress>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "In contrast to the other memory usage limit options, B<--memlimit-mt-decompress=>I has a system-specific default I. B can be used to see the current value." +msgstr "على عكس خيارات حدود استهلاك الذاكرة الأخرى، يمتلك B<--memlimit-mt-decompress=>I حداً مبدئياً خاصاً بالنظام. يمكن استخدام B لرؤية القيمة الحالية." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This option and its default value exist because without any limit the threaded decompressor could end up allocating an insane amount of memory with some input files. If the default I is too low on your system, feel free to increase the I but never set it to a value larger than the amount of usable RAM as with appropriate input files B will attempt to use that amount of memory even with a low number of threads. Running out of memory or swapping will not improve decompression performance." +msgstr "يوجد هذا الخيار وقيمته المبدئية لأنه بدون أي حد يمكن أن ينتهي الأمر ببرنامج فك الضغط المتعدد الخيوط بتخصيص كمية جنونية من الذاكرة مع بعض ملفات المدخلات. إذا كان I<الحد> المبدئي منخفضاً جداً على نظامك، فلا تتردد في زيادة I<الحد> ولكن لا تضبطه أبداً على قيمة أكبر من كمية ذاكرة الوصول العشوائي القابلة للاستخدام، حيث سيحاول B مع ملفات المدخلات المناسبة استخدام تلك الكمية من الذاكرة حتى مع وجود عدد قليل من الخيوط. نفاذ الذاكرة أو استخدام مساحة التبادل لن يحسن أداء فك الضغط." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "See B<--memlimit-compress=>I for possible ways to specify the I. Setting I to B<0> resets the I to the default system-specific value." +msgstr "انظر B<--memlimit-compress=>I للتعرف على الطرق الممكنة لتحديد I<الحد>. ضبط I<الحد> على B<0> يعيد I<الحد> إلى القيمة المبدئية الخاصة بالنظام." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-M> I, B<--memlimit=>I, B<--memory=>I" +msgstr "B<-M> I, B<--memlimit=>I, B<--memory=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "This is equivalent to specifying B<--memlimit-compress=>I B<--memlimit-decompress=>I B<--memlimit-mt-decompress=>I." +msgstr "هذا يعادل تحديد B<--memlimit-compress=>I و B<--memlimit-decompress=>I و B<--memlimit-mt-decompress=>I." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--no-adjust>" +msgstr "B<--no-adjust>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display an error and exit if the memory usage limit cannot be met without adjusting settings that affect the compressed output. That is, this prevents B from switching the encoder from multi-threaded mode to single-threaded mode and from reducing the LZMA2 dictionary size. Even when this option is used the number of threads may be reduced to meet the memory usage limit as that won't affect the compressed output." +msgstr "عرض خطأ والخروج إذا تعذر الالتزام بحد استهلاك الذاكرة دون ضبط الإعدادات التي تؤثر على المخرج المضغوط. أي أن هذا يمنع B من تحويل المرمّز من وضع تعدد الخيوط إلى وضع الخيط الواحد ومن تقليل حجم قاموس LZMA2. حتى عند استخدام هذا الخيار، قد يتم تقليل عدد الخيوط للالتزام بحد استهلاك الذاكرة لأن ذلك لن يؤثر على المخرج المضغوط." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Automatic adjusting is always disabled when creating raw streams (B<--format=raw>)." +msgstr "الضبط الآلي معطل دائماً عند إنشاء تدفقات خام (B<--format=raw>)." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-T> I, B<--threads=>I" +msgstr "B<-T> I, B<--threads=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of worker threads to use. Setting I to a special value B<0> makes B use up to as many threads as the processor(s) on the system support. The actual number of threads can be fewer than I if the input file is not big enough for threading with the given settings or if using more threads would exceed the memory usage limit." +msgstr "حدد عدد خيوط العمل المراد استخدامها. ضبط I على القيمة الخاصة B<0> يجعل B يستخدم عدداً من الخيوط يصل إلى ما يدعمه المعالج (أو المعالجات) في النظام. قد يكون عدد الخيوط الفعلي أقل من I إذا لم يكن ملف المدخلات كبيراً بما يكفي لتعدد الخيوط مع الإعدادات المعطاة أو إذا كان استخدام المزيد من الخيوط سيتجاوز حد استهلاك الذاكرة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The single-threaded and multi-threaded compressors produce different output. Single-threaded compressor will give the smallest file size but only the output from the multi-threaded compressor can be decompressed using multiple threads. Setting I to B<1> will use the single-threaded mode. Setting I to any other value, including B<0>, will use the multi-threaded compressor even if the system supports only one hardware thread. (B 5.2.x used single-threaded mode in this situation.)" +msgstr "ينتج ضاغط الخيط الواحد وضاغط تعدد الخيوط مخرجات مختلفة. سيعطي ضاغط الخيط الواحد أصغر حجم ملف ولكن فقط مخرجات ضاغط تعدد الخيوط يمكن فك ضغطها باستخدام عدة خيوط. ضبط I على B<1> سيستخدم وضع الخيط الواحد. ضبط I على أي قيمة أخرى، بما في ذلك B<0>، سيستخدم ضاغط تعدد الخيوط حتى لو كان النظام يدعم خيطاً عتادياً واحداً فقط. (كان B 5.2.x يستخدم وضع الخيط الواحد في هذه الحالة)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "To use multi-threaded mode with only one thread, set I to B<+1>. The B<+> prefix has no effect with values other than B<1>. A memory usage limit can still make B switch to single-threaded mode unless B<--no-adjust> is used. Support for the B<+> prefix was added in B 5.4.0." +msgstr "لاستخدام وضع تعدد الخيوط مع خيط واحد فقط، اضبط I على B<+1>. السابقة B<+> ليس لها تأثير مع قيم أخرى غير B<1>. لا يزال بإمكان حد استهلاك الذاكرة أن يجعل B يتحول إلى وضع الخيط الواحد ما لم يتم استخدام B<--no-adjust>. أُضيف دعم السابقة B<+> في B 5.4.0." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If an automatic number of threads has been requested and no memory usage limit has been specified, then a system-specific default soft limit will be used to possibly limit the number of threads. It is a soft limit in sense that it is ignored if the number of threads becomes one, thus a soft limit will never stop B from compressing or decompressing. This default soft limit will not make B switch from multi-threaded mode to single-threaded mode. The active limits can be seen with B." +msgstr "إذا تم طلب عدد آلي من الخيوط ولم يتم تحديد حد لاستهلاك الذاكرة، فسيتم استخدام حد مرن مبدئي خاص بالنظام لاحتمال تقليل عدد الخيوط. هو حد مرن بمعنى أنه يتم تجاهله إذا أصبح عدد الخيوط واحداً، وبالتالي فإن الحد المرن لن يمنع B أبداً من الضغط أو فك الضغط. هذا الحد المرن المبدئي لن يجعل B يتحول من وضع تعدد الخيوط إلى وضع الخيط الواحد. يمكن رؤية الحدود النشطة باستخدام B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Currently the only threading method is to split the input into blocks and compress them independently from each other. The default block size depends on the compression level and can be overridden with the B<--block-size=>I option." +msgstr "حالياً الطريقة الوحيدة لتعدد الخيوط هي تقسيم المدخلات إلى كتل وضغطها بشكل مستقل عن بعضها البعض. يعتمد حجم الكتلة المبدئي على مستوى الضغط ويمكن تجاوزه باستخدام الخيار B<--block-size=>I." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Threaded decompression only works on files that contain multiple blocks with size information in block headers. All large enough files compressed in multi-threaded mode meet this condition, but files compressed in single-threaded mode don't even if B<--block-size=>I has been used." +msgstr "يعمل فك الضغط المتعدد الخيوط فقط على الملفات التي تحتوي على كتل متعددة مع معلومات الحجم في ترويسات الكتل. جميع الملفات الكبيرة بما يكفي والمضغوطة في وضع تعدد الخيوط تفي بهذا الشرط، لكن الملفات المضغوطة في وضع الخيط الواحد لا تفي به حتى لو تم استخدام B<--block-size=>I." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default value for I is B<0>. In B 5.4.x and older the default is B<1>." +msgstr "القيمة المبدئية لـ I هي B<0>. في B 5.4.x والإصدارات الأقدم كانت القيمة المبدئية هي B<1>." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Custom compressor filter chains" +msgstr "سلاسل مرشحات ضاغط مخصصة" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A custom filter chain allows specifying the compression settings in detail instead of relying on the settings associated to the presets. When a custom filter chain is specified, preset options (B<-0> \\&...\\& B<-9> and B<--extreme>) earlier on the command line are forgotten. If a preset option is specified after one or more custom filter chain options, the new preset takes effect and the custom filter chain options specified earlier are forgotten." +msgstr "تسمح سلسلة المرشحات المخصصة بتحديد إعدادات الضغط بالتفصيل بدلاً من الاعتماد على الإعدادات المرتبطة بالمستويات المعدة مسبقاً. عند تحديد سلسلة مرشحات مخصصة، يتم نسيان خيارات المستويات المسبقة (B<-0> \\&...\\& B<-9> و B<--extreme>) المذكورة سابقاً في سطر الأوامر. إذا تم تحديد خيار مستوى مسبق بعد واحد أو أكثر من خيارات سلسلة المرشحات المخصصة، فإن المستوى المسبق الجديد يسري مفعوله ويتم نسيان خيارات سلسلة المرشحات المخصصة المحددة سابقاً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A filter chain is comparable to piping on the command line. When compressing, the uncompressed input goes to the first filter, whose output goes to the next filter (if any). The output of the last filter gets written to the compressed file. The maximum number of filters in the chain is four, but typically a filter chain has only one or two filters." +msgstr "سلسلة المرشحات تشبه الأنابيب (piping) في سطر الأوامر. عند الضغط، تذهب المدخلات غير المضغوطة إلى المرشح الأول، والذي يذهب مخرجه إلى المرشح التالي (إن وجد). يُكتب مخرج المرشح الأخير في الملف المضغوط. الحد الأقصى لعدد المرشحات في السلسلة هو أربعة، ولكن عادةً ما تحتوي سلسلة المرشحات على مرشح واحد أو اثنين فقط." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Many filters have limitations on where they can be in the filter chain: some filters can work only as the last filter in the chain, some only as a non-last filter, and some work in any position in the chain. Depending on the filter, this limitation is either inherent to the filter design or exists to prevent security issues." +msgstr "تمتلك العديد من المرشحات قيوداً على مكان وجودها في سلسلة المرشحات: بعض المرشحات يمكن أن تعمل فقط كآخر مرشح في السلسلة، وبعضها فقط كمرشح غير أخير، وبعضها يعمل في أي موضع في السلسلة. اعتماداً على المرشح، يكون هذا القيد إما متأصلاً في تصميم المرشح أو موجوداً لمنع المشكلات الأمنية." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A custom filter chain can be specified in two different ways. The options B<--filters=>I and B<--filters1=>I \\&...\\& B<--filters9=>I allow specifying an entire filter chain in one option using the liblzma filter string syntax. Alternatively, a filter chain can be specified by using one or more individual filter options in the order they are wanted in the filter chain. That is, the order of the individual filter options is significant! When decoding raw streams (B<--format=raw>), the filter chain must be specified in the same order as it was specified when compressing. Any individual filter or preset options specified before the full chain option (B<--filters=>I) will be forgotten. Individual filters specified after the full chain option will reset the filter chain." +msgstr "يمكن تحديد سلسلة مرشحات مخصصة بطريقتين مختلفتين. تسمح الخيارات B<--filters=>I و B<--filters1=>I \\&...\\& B<--filters9=>I بتحديد سلسلة مرشحات كاملة في خيار واحد باستخدام صيغة نص مرشح liblzma. بدلاً من ذلك، يمكن تحديد سلسلة مرشحات باستخدام خيار مرشح فردي واحد أو أكثر بالترتيب المطلوب في سلسلة المرشحات. أي أن ترتيب خيارات المرشحات الفردية مهم! عند فك ترميز التدفقات الخام (B<--format=raw>)، يجب تحديد سلسلة المرشحات بنفس الترتيب الذي حُددت به عند الضغط. سيتم نسيان أي مرشح فردي أو خيارات مستوى مسبق محددة قبل خيار السلسلة الكاملة (B<--filters=>I). المرشحات الفردية المحددة بعد خيار السلسلة الكاملة ستعيد ضبط سلسلة المرشحات." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Both the full and individual filter options take filter-specific I as a comma-separated list. Extra commas in I are ignored. Every option has a default value, so specify those you want to change." +msgstr "تأخذ كل من خيارات المرشح الكاملة والفردية I<خيارات> خاصة بالمرشح كقائمة مفصولة بفاصلة. الفواصل الزائدة في I<الخيارات> يتم تجاهلها. كل خيار له قيمة مبدئية، لذا حدد فقط تلك التي تريد تغييرها." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "To see the whole filter chain and I, use B (that is, use B<--verbose> twice). This works also for viewing the filter chain options used by presets." +msgstr "لرؤية سلسلة المرشحات بالكامل و I<الخيارات>، استخدم B (أي استخدم B<--verbose> مرتين). يعمل هذا أيضاً لعرض خيارات سلسلة المرشحات المستخدمة بواسطة المستويات المسبقة." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--filters=>I" +msgstr "B<--filters=>I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the full filter chain or a preset in a single option. Each filter can be separated by spaces or two dashes (B<-->). I may need to be quoted on the shell command line so it is parsed as a single option. To denote I, use B<:> or B<=>. A preset can be prefixed with a B<-> and followed with zero or more flags. The only supported flag is B to apply the same options as B<--extreme>." +msgstr "حدد سلسلة المرشحات الكاملة أو مستوى مسبقاً في خيار واحد. يمكن فصل كل مرشح بمسافات أو شرطتين (B<-->). قد تحتاج I<المرشحات> لوضعها بين علامتي اقتباس في سطر أوامر الصدفة ليتم تحليلها كخيار واحد. للإشارة إلى I<الخيارات>، استخدم B<:> أو B<=>. يمكن أن يسبق المستوى المسبق B<-> ويتبعه صفر أو أكثر من الأعلام. العلم الوحيد المدعوم هو B لتطبيق نفس خيارات B<--extreme>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--filters1>=I ... B<--filters9>=I" +msgstr "B<--filters1>=I ... B<--filters9>=I" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify up to nine additional filter chains that can be used with B<--block-list>." +msgstr "حدد ما يصل إلى تسع سلاسل مرشحات إضافية يمكن استخدامها مع B<--block-list>." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For example, when compressing an archive with executable files followed by text files, the executable part could use a filter chain with a BCJ filter and the text part only the LZMA2 filter." +msgstr "على سبيل المثال، عند ضغط أرشيف يحتوي على ملفات تنفيذية تليها ملفات نصية، يمكن للجزء التنفيذي استخدام سلسلة مرشحات مع مرشح BCJ والجزء النصي يستخدم مرشح LZMA2 فقط." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--filters-help>" +msgstr "B<--filters-help>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display a help message describing how to specify presets and custom filter chains in the B<--filters> and B<--filters1=>I \\&...\\& B<--filters9=>I options, and exit successfully." +msgstr "عرض رسالة مساعدة تصف كيفية تحديد المستويات المسبقة وسلاسل المرشحات المخصصة في الخيارات B<--filters> و B<--filters1=>I \\&...\\& B<--filters9=>I، والخروج بنجاح." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--lzma1>[B<=>I]" +msgstr "B<--lzma1>[B<=>I]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--lzma2>[B<=>I]" +msgstr "B<--lzma2>[B<=>I]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Add LZMA1 or LZMA2 filter to the filter chain. These filters can be used only as the last filter in the chain." +msgstr "إضافة مرشح LZMA1 أو LZMA2 إلى سلسلة المرشحات. يمكن استخدام هذه المرشحات فقط كآخر مرشح في السلسلة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "LZMA1 is a legacy filter, which is supported almost solely due to the legacy B<.lzma> file format, which supports only LZMA1. LZMA2 is an updated version of LZMA1 to fix some practical issues of LZMA1. The B<.xz> format uses LZMA2 and doesn't support LZMA1 at all. Compression speed and ratios of LZMA1 and LZMA2 are practically the same." +msgstr "LZMA1 هو مرشح قديم، ومدعوم تقريباً فقط بسبب تنسيق ملف B<.lzma> القديم، الذي يدعم LZMA1 فقط. LZMA2 هو نسخة محدثة من LZMA1 لإصلاح بعض المشكلات العملية في LZMA1. يستخدم تنسيق B<.xz> مرشح LZMA2 ولا يدعم LZMA1 على الإطلاق. سرعة ونسب ضغط LZMA1 و LZMA2 متماثلة تقريباً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "LZMA1 and LZMA2 share the same set of I:" +msgstr "يشترك LZMA1 و LZMA2 في نفس مجموعة I<الخيارات>:" + +#. TRANSLATORS: Don't translate bold strings like B, B, +#. B, B, B, or B because those are command line +#. options. On the other hand, do translate the italic strings like +#. I, I, and I, because such italic strings are +#. placeholders which a user replaces with an actual value. +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Reset all LZMA1 or LZMA2 I to I. I consist of an integer, which may be followed by single-letter preset modifiers. The integer can be from B<0> to B<9>, matching the command line options B<-0> \\&...\\& B<-9>. The only supported modifier is currently B, which matches B<--extreme>. If no B is specified, the default values of LZMA1 or LZMA2 I are taken from the preset B<6>." +msgstr "إعادة ضبط جميع I<خيارات> LZMA1 أو LZMA2 إلى I. يتكون I من عدد صحيح، قد يتبعه معدلات مستوى مسبق من حرف واحد. يمكن أن يكون العدد الصحيح من B<0> إلى B<9>، بما يطابق خيارات سطر الأوامر B<-0> \\&...\\& B<-9>. المعدل الوحيد المدعوم حالياً هو B، الذي يطابق B<--extreme>. إذا لم يتم تحديد B، فسيتم أخذ القيم المبدئية لـ I<خيارات> LZMA1 أو LZMA2 من المستوى المسبق B<6>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Dictionary (history buffer) I indicates how many bytes of the recently processed uncompressed data is kept in memory. The algorithm tries to find repeating byte sequences (matches) in the uncompressed data, and replace them with references to the data currently in the dictionary. The bigger the dictionary, the higher is the chance to find a match. Thus, increasing dictionary I usually improves compression ratio, but a dictionary bigger than the uncompressed file is waste of memory." +msgstr "يشير I<حجم> القاموس (مخزن التاريخ المؤقت) إلى عدد بايتات البيانات غير المضغوطة التي تمت معالجتها مؤخراً والمحفوظة في الذاكرة. تحاول الخوارزمية العثور على تسلسلات بايت متكررة (تطابقات) في البيانات غير المضغوطة، واستبدالها بمراجع للبيانات الموجودة حالياً في القاموس. كلما كبر القاموس، زادت فرصة العثور على تطابق. وبالتالي، فإن زيادة I<حجم> القاموس يحسن عادةً نسبة الضغط، ولكن القاموس الأكبر من الملف غير المضغوط هو هدر للذاكرة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Typical dictionary I is from 64\\ KiB to 64\\ MiB. The minimum is 4\\ KiB. The maximum for compression is currently 1.5\\ GiB (1536\\ MiB). The decompressor already supports dictionaries up to one byte less than 4\\ GiB, which is the maximum for the LZMA1 and LZMA2 stream formats." +msgstr "I<حجم> القاموس النموذجي يتراوح من 64\\ كيلوبايت إلى 64\\ ميجابايت. الحد الأدنى هو 4\\ كيلوبايت. الحد الأقصى للضغط حالياً هو 1.5\\ جيجابايت (1536\\ ميجابايت). يدعم برنامج فك الضغط بالفعل قواميس تصل إلى أقل من 4\\ جيجابايت ببايب واحد، وهو الحد الأقصى لتنسيقات تدفق LZMA1 و LZMA2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Dictionary I and match finder (I) together determine the memory usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary I is required for decompressing that was used when compressing, thus the memory usage of the decoder is determined by the dictionary size used when compressing. The B<.xz> headers store the dictionary I either as 2^I or 2^I + 2^(I-1), so these I are somewhat preferred for compression. Other I will get rounded up when stored in the B<.xz> headers." +msgstr "يحدد I<حجم> القاموس وباحث التطابق (I) معاً مقدار استهلاك الذاكرة لمشفر LZMA1 أو LZMA2. يتطلب فك الضغط نفس I<حجم> القاموس (أو أكبر) الذي استُخدم عند الضغط، وبالتالي فإن استهلاك الذاكرة لفك الترميز يحدده حجم القاموس المستخدم أثناء الضغط. تخزن ترويسات B<.xz> I<حجم> القاموس إما كـ 2^I أو 2^I + 2^(I-1)، لذا تُفضل هذه I<الأحجام> نوعاً ما للضغط. الأحجام الأخرى تُقرب للأعلى عند تخزينها في ترويسات B<.xz>." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of literal context bits. The minimum is 0 and the maximum is 4; the default is 3. In addition, the sum of I and I must not exceed 4." +msgstr "حدد عدد بتات سياق الحروف (literal context bits). الحد الأدنى 0 والأقصى 4؛ الإعداد المبدئي هو 3. بالإضافة إلى ذلك، يجب ألا يتجاوز مجموع I و I العدد 4." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "All bytes that cannot be encoded as matches are encoded as literals. That is, literals are simply 8-bit bytes that are encoded one at a time." +msgstr "كل البايتات التي لا يمكن تشفيرها كتطابقات تُشفر كحروف (literals). أي أن الحروف هي ببساطة بايتات من 8 بت تُشفر كل واحدة على حدة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The literal coding makes an assumption that the highest I bits of the previous uncompressed byte correlate with the next byte. For example, in typical English text, an upper-case letter is often followed by a lower-case letter, and a lower-case letter is usually followed by another lower-case letter. In the US-ASCII character set, the highest three bits are 010 for upper-case letters and 011 for lower-case letters. When I is at least 3, the literal coding can take advantage of this property in the uncompressed data." +msgstr "يفترض ترميز الحروف أن أعلى بتات I من البايت السابق غير المضغوط ترتبط بالبايت التالي. على سبيل المثال، في النص الإنجليزي المعتاد، غالباً ما يتبع الحرف الكبير حرف صغير، والحرف الصغير يتبعه عادةً حرف صغير آخر. في مجموعة محارف US-ASCII، أعلى ثلاثة بتات هي 010 للحروف الكبيرة و 011 للحروف الصغيرة. عندما تكون I على الأقل 3، يستفيد ترميز الحروف من هذه الخاصية في البيانات غير المضغوطة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The default value (3) is usually good. If you want maximum compression, test B. Sometimes it helps a little, and sometimes it makes compression worse. If it makes it worse, test B too." +msgstr "القيمة المبدئية (3) جيدة عادةً. إذا أردت أقصى ضغط، اختبر B. أحياناً تساعد قليلاً، وأحياناً تجعل الضغط أسوأ. إذا جعلته أسوأ، اختبر B أيضاً." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of literal position bits. The minimum is 0 and the maximum is 4; the default is 0." +msgstr "حدد عدد بتات موضع الحروف (literal position bits). الحد الأدنى 0 والأقصى 4؛ الإعداد المبدئي هو 0." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I affects what kind of alignment in the uncompressed data is assumed when encoding literals. See I below for more information about alignment." +msgstr "تؤثر I على نوع المحاذاة المفترضة في البيانات غير المضغوطة عند تشفير الحروف. انظر I أدناه لمزيد من المعلومات حول المحاذاة." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the number of position bits. The minimum is 0 and the maximum is 4; the default is 2." +msgstr "حدد عدد بتات الموضع (position bits). الحد الأدنى 0 والأقصى 4؛ الإعداد المبدئي هو 2." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I affects what kind of alignment in the uncompressed data is assumed in general. The default means four-byte alignment (2^I=2^2=4), which is often a good choice when there's no better guess." +msgstr "تؤثر I على نوع المحاذاة المفترضة في البيانات غير المضغوطة بشكل عام. الإعداد المبدئي يعني محاذاة من أربعة بايتات (2^I=2^2=4)، وهو غالباً خيار جيد عند عدم وجود تخمين أفضل." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When the alignment is known, setting I accordingly may reduce the file size a little. For example, with text files having one-byte alignment (US-ASCII, ISO-8859-*, UTF-8), setting B can improve compression slightly. For UTF-16 text, B is a good choice. If the alignment is an odd number like 3 bytes, B might be the best choice." +msgstr "عندما تكون المحاذاة معروفة، فإن ضبط I وفقاً لذلك قد يقلل حجم الملف قليلاً. على سبيل المثال، مع ملفات النصوص ذات محاذاة البايت الواحد (US-ASCII، ISO-8859-*، UTF-8)، فإن ضبط B يحسن الضغط قليلاً. لنصوص UTF-16، يعد B خياراً جيداً. إذا كانت المحاذاة رقماً فردياً مثل 3 بايتات، فقد يكون B هو الخيار الأفضل." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Even though the assumed alignment can be adjusted with I and I, LZMA1 and LZMA2 still slightly favor 16-byte alignment. It might be worth taking into account when designing file formats that are likely to be often compressed with LZMA1 or LZMA2." +msgstr "على الرغم من إمكانية تعديل المحاذاة المفترضة باستخدام I و I، لا يزال LZMA1 و LZMA2 يفضلان قليلاً محاذاة 16 بايت. قد يكون من الجيد أخذ ذلك في الاعتبار عند تصميم تنسيقات الملفات التي يُرجح ضغطها غالباً باستخدام LZMA1 أو LZMA2." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Match finder has a major effect on encoder speed, memory usage, and compression ratio. Usually Hash Chain match finders are faster than Binary Tree match finders. The default depends on the I: 0 uses B, 1\\(en3 use B, and the rest use B." +msgstr "لباحث التطابق تأثير كبير على سرعة المشفر، واستهلاك الذاكرة، ونسبة الضغط. عادةً ما تكون باحثات سلسلة الهاش (Hash Chain) أسرع من باحثات الشجرة الثنائية (Binary Tree). يعتمد الإعداد المبدئي على الإعداد المسبق (I): 0 يستخدم B، ومن 1 إلى 3 تستخدم B، والبقية تستخدم B." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The following match finders are supported. The memory usage formulas below are rough approximations, which are closest to the reality when I is a power of two." +msgstr "باحثات التطابق التالية مدعومة. صيغ استهلاك الذاكرة أدناه هي تقريبات خشنة، تكون أقرب للواقع عندما يكون I أسّاً للعدد اثنين." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Hash Chain with 2- and 3-byte hashing" +msgstr "سلسلة هاش مع هاش 2 و 3 بايت" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum value for I: 3" +msgstr "أقل قيمة لـ I: 3" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Memory usage:" +msgstr "استهلاك الذاكرة:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 7.5 (if I E= 16 MiB);" +msgstr "I * 7.5 (إذا كان I E= 16 ميجابايت)؛" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 5.5 + 64 MiB (if I E 16 MiB)" +msgstr "I * 5.5 + 64 ميجابايت (إذا كان I E 16 ميجابايت)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Hash Chain with 2-, 3-, and 4-byte hashing" +msgstr "سلسلة هاش مع هاش 2 و 3 و 4 بايت" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum value for I: 4" +msgstr "أقل قيمة لـ I: 4" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 7.5 (if I E= 32 MiB);" +msgstr "I * 7.5 (إذا كان I E= 32 ميجابايت)؛" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 6.5 (if I E 32 MiB)" +msgstr "I * 6.5 (إذا كان I E 32 ميجابايت)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Binary Tree with 2-byte hashing" +msgstr "شجرة ثنائية مع هاش 2 بايت" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Minimum value for I: 2" +msgstr "أقل قيمة لـ I: 2" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Memory usage: I * 9.5" +msgstr "استهلاك الذاكرة: I * 9.5" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Binary Tree with 2- and 3-byte hashing" +msgstr "شجرة ثنائية مع هاش 2 و 3 بايت" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 11.5 (if I E= 16 MiB);" +msgstr "I * 11.5 (إذا كان I E= 16 ميجابايت)؛" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 9.5 + 64 MiB (if I E 16 MiB)" +msgstr "I * 9.5 + 64 ميجابايت (إذا كان I E 16 ميجابايت)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Binary Tree with 2-, 3-, and 4-byte hashing" +msgstr "شجرة ثنائية مع هاش 2 و 3 و 4 بايت" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 11.5 (if I E= 32 MiB);" +msgstr "I * 11.5 (إذا كان I E= 32 ميجابايت)؛" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I * 10.5 (if I E 32 MiB)" +msgstr "I * 10.5 (إذا كان I E 32 ميجابايت)" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression I specifies the method to analyze the data produced by the match finder. Supported I are B and B. The default is B for I 0\\(en3 and B for I 4\\(en9." +msgstr "يحدد I<نمط> الضغط طريقة تحليل البيانات الناتجة عن باحث التطابق. الأنماط المدعومة هي B و B. النمط المبدئي هو B للإعدادات المسبقة 0-3 و B للإعدادات المسبقة 4-9." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Usually B is used with Hash Chain match finders and B with Binary Tree match finders. This is also what the I do." +msgstr "عادةً ما يُستخدم B مع باحثات سلسلة الهاش و B مع باحثات الشجرة الثنائية. وهذا ما تفعله الإعدادات المسبقة أيضاً." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify what is considered to be a nice length for a match. Once a match of at least I bytes is found, the algorithm stops looking for possibly better matches." +msgstr "حدد ما يُعتبر طولاً جيداً (nice) للتطابق. بمجرد العثور على تطابق بطول I بايت على الأقل، تتوقف الخوارزمية عن البحث عن تطابقات أفضل محتملة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "I can be 2\\(en273 bytes. Higher values tend to give better compression ratio at the expense of speed. The default depends on the I." +msgstr "يمكن أن يتراوح I بين 2-273 بايت. تميل القيم الأعلى لإعطاء نسبة ضغط أفضل على حساب السرعة. يعتمد الإعداد المبدئي على الإعداد المسبق." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the maximum search depth in the match finder. The default is the special value of 0, which makes the compressor determine a reasonable I from I and I." +msgstr "حدد أقصى عمق للبحث في باحث التطابق. القيمة المبدئية هي القيمة الخاصة 0، التي تجعل الضاغط يحدد عمقاً (I) معقولاً بناءً على I و I." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Reasonable I for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary Trees. Using very high values for I can make the encoder extremely slow with some files. Avoid setting the I over 1000 unless you are prepared to interrupt the compression in case it is taking far too long." +msgstr "العمق (I) المعقول لسلاسل الهاش هو 4-100 وللأشجار الثنائية هو 16-1000. استخدام قيم عالية جداً لـ I قد يجعل المشفر بطيئاً للغاية مع بعض الملفات. تجنب ضبط I فوق 1000 إلا إذا كنت مستعداً لمقاطعة عملية الضغط في حال استغرقت وقتاً طويلاً جداً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary I. LZMA1 needs also I, I, and I." +msgstr "عند فك ترميز التدفقات الخام (B<--format=raw>)، يحتاج LZMA2 فقط إلى I<حجم> القاموس. يحتاج LZMA1 أيضاً إلى I و I و I." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--x86>[B<=>I]" +msgstr "B<--x86>[B<=>I<خيارات>]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--arm>[B<=>I]" +msgstr "B<--arm>[B<=>I<خيارات>]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--armthumb>[B<=>I]" +msgstr "B<--armthumb>[B<=>I<خيارات>]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--arm64>[B<=>I]" +msgstr "B<--arm64>[B<=>I<خيارات>]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--powerpc>[B<=>I]" +msgstr "B<--powerpc>[B<=>I<خيارات>]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--ia64>[B<=>I]" +msgstr "B<--ia64>[B<=>I<خيارات>]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--sparc>[B<=>I]" +msgstr "B<--sparc>[B<=>I<خيارات>]" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--riscv>[B<=>I]" +msgstr "B<--riscv>[B<=>I<خيارات>]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Add a branch/call/jump (BCJ) filter to the filter chain. These filters can be used only as a non-last filter in the filter chain." +msgstr "أضف مرشح فرع/استدعاء/قفز (BCJ) إلى تسلسل المرشحات. يمكن استخدام هذه المرشحات فقط كمرشح غير أخير في تسلسل المرشحات." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "A BCJ filter converts relative addresses in the machine code to their absolute counterparts. This doesn't change the size of the data but it increases redundancy, which can help LZMA2 to produce 0\\(en15\\ % smaller B<.xz> file. The BCJ filters are always reversible, so using a BCJ filter for wrong type of data doesn't cause any data loss, although it may make the compression ratio slightly worse. The BCJ filters are very fast and use an insignificant amount of memory." +msgstr "يقوم مرشح BCJ بتحويل العناوين النسبية في كود الآلة إلى نظرائها المطلقة. هذا لا يغير حجم البيانات ولكنه يزيد التكرار، مما يساعد LZMA2 على إنتاج ملف B<.xz> أصغر بنسبة 0-15%. مرشحات BCJ دائماً قابلة للعكس، لذا فإن استخدام مرشح BCJ لنوع خاطئ من البيانات لا يسبب أي فقدان للبيانات، رغم أنه قد يجعل نسبة الضغط أسوأ قليلاً. مرشحات BCJ سريعة جداً وتستهلك كمية ضئيلة من الذاكرة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "These BCJ filters have known problems related to the compression ratio:" +msgstr "هناك مشاكل معروفة لمرشحات BCJ تتعلق بنسبة الضغط:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Some types of files containing executable code (for example, object files, static libraries, and Linux kernel modules) have the addresses in the instructions filled with filler values. These BCJ filters will still do the address conversion, which will make the compression worse with these files." +msgstr "بعض أنواع الملفات التي تحتوي على كود قابل للتنفيذ (مثل ملفات الكائنات، والمكتبات الساكنة، ووحدات نواة Linux) تحتوي على عناوين في التعليمات مملوءة بقيم حشو. ستستمر مرشحات BCJ هذه في إجراء تحويل العناوين، مما يجعل الضغط أسوأ مع هذه الملفات." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "If a BCJ filter is applied on an archive, it is possible that it makes the compression ratio worse than not using a BCJ filter. For example, if there are similar or even identical executables then filtering will likely make the files less similar and thus compression is worse. The contents of non-executable files in the same archive can matter too. In practice one has to try with and without a BCJ filter to see which is better in each situation." +msgstr "إذا طُبق مرشح BCJ على أرشيف، فمن المحتمل أن يجعل نسبة الضغط أسوأ مما لو لم يُستخدم. على سبيل المثال، إذا كانت هناك ملفات تنفيذية متشابهة أو حتى متطابقة، فإن الترشيح سيجعل الملفات أقل تشابهاً وبالتالي يكون الضغط أسوأ. محتويات الملفات غير القابلة للتنفيذ في نفس الأرشيف قد تؤثر أيضاً. في الممارسة العملية، يجب التجربة مع وبدون مرشح BCJ لمعرفة أيهما أفضل في كل حالة." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Different instruction sets have different alignment: the executable file must be aligned to a multiple of this value in the input data to make the filter work." +msgstr "مجموعات التعليمات المختلفة لها محاذاة مختلفة: يجب محاذاة الملف القابل للتنفيذ إلى مضاعف لهذه القيمة في بيانات الإدخال ليعمل المرشح." + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Filter" +msgstr "المرشح" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Alignment" +msgstr "المحاذاة" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Notes" +msgstr "ملاحظات" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "x86" +msgstr "x86" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "32-bit or 64-bit x86" +msgstr "32-بت أو 64-بت x86" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "ARM" +msgstr "ARM" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "ARM-Thumb" +msgstr "ARM-Thumb" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "ARM64" +msgstr "ARM64" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "4096-byte alignment is best" +msgstr "محاذاة 4096 بايت هي الأفضل" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "PowerPC" +msgstr "PowerPC" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Big endian only" +msgstr "Big endian فقط" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "IA-64" +msgstr "IA-64" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "16" +msgstr "16" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "Itanium" +msgstr "Itanium" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "SPARC" +msgstr "SPARC" + +#. type: tbl table +#: ../src/xz/xz.1 +#, no-wrap +msgid "RISC-V" +msgstr "RISC-V" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Since the BCJ-filtered data is usually compressed with LZMA2, the compression ratio may be improved slightly if the LZMA2 options are set to match the alignment of the selected BCJ filter. Examples:" +msgstr "بما أن البيانات المرشحة بـ BCJ تُضغط عادةً باستخدام LZMA2، فقد تتحسن نسبة الضغط قليلاً إذا ضُبطت خيارات LZMA2 لتناسب محاذاة مرشح BCJ المختار. أمثلة:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "IA-64 filter has 16-byte alignment so B is good with LZMA2 (2^4=16)." +msgstr "مرشح IA-64 له محاذاة 16 بايت، لذا B جيد مع LZMA2 (2^4=16)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "RISC-V code has 2-byte or 4-byte alignment depending on whether the file contains 16-bit compressed instructions (the C extension). When 16-bit instructions are used, B or B is good. When 16-bit instructions aren't present, B is the best. B can be used to check if \"RVC\" appears on the \"Flags\" line." +msgstr "كود RISC-V له محاذاة 2 بايت أو 4 بايت اعتماداً على ما إذا كان الملف يحتوي على تعليمات مضغوطة بـ 16 بت (ملحق C). عند استخدام تعليمات 16 بت، يكون B أو B جيداً. عند عدم وجود تعليمات 16 بت، يكون B هو الأفضل. يمكن استخدام B للتحقق مما إذا كانت \"RVC\" تظهر في سطر \"Flags\"." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "ARM64 is always 4-byte aligned so B is the best." +msgstr "ARM64 دائماً محاذى لـ 4 بايت لذا B هو الأفضل." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The x86 filter is an exception. It's usually good to stick to LZMA2's defaults (B) when compressing x86 executables." +msgstr "مرشح x86 استثناء. من الجيد عادةً الالتزام بإعدادات LZMA2 المبدئية (B) عند ضغط ملفات x86 التنفيذية." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "All BCJ filters support the same I:" +msgstr "كل مرشحات BCJ تدعم نفس الـ I<خيارات>:" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI<إزاحة>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the start I that is used when converting between relative and absolute addresses. The I must be a multiple of the alignment of the filter (see the table above). The default is zero. In practice, the default is good; specifying a custom I is almost never useful." +msgstr "حدد I<إزاحة> البداية المستخدمة عند التحويل بين العناوين النسبية والمطلقة. يجب أن تكون الـ I<إزاحة> مضاعفاً لمحاذاة المرشح (انظر الجدول أعلاه). القيمة المبدئية هي صفر. عملياً، القيمة المبدئية جيدة؛ تحديد I<إزاحة> مخصصة ليس مفيداً تقريباً." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--delta>[B<=>I]" +msgstr "B<--delta>[B<=>I<خيارات>]" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Add the Delta filter to the filter chain. The Delta filter can be only used as a non-last filter in the filter chain." +msgstr "أضف مرشح دلتا إلى تسلسل المرشحات. يمكن استخدام مرشح دلتا فقط كمرشح غير أخير في تسلسل المرشحات." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Currently only simple byte-wise delta calculation is supported. It can be useful when compressing, for example, uncompressed bitmap images or uncompressed PCM audio. However, special purpose algorithms may give significantly better results than Delta + LZMA2. This is true especially with audio, which compresses faster and better, for example, with B(1)." +msgstr "حالياً، الحساب البسيط للدلتا لكل بايت هو المدعوم فقط. يمكن أن يكون مفيداً عند ضغط صور bitmap غير المضغوطة أو صوت PCM غير المضغوط مثلاً. ومع ذلك، قد تعطي خوارزميات مخصصة نتائج أفضل بكثير من دلتا + LZMA2. هذا ينطبق بشكل خاص على الصوت، الذي يُضغط بشكل أسرع وأفضل باستخدام B(1) مثلاً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Supported I:" +msgstr "الـ I<خيارات> المدعومة:" + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "BI" +msgstr "BI<مسافة>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Specify the I of the delta calculation in bytes. I must be 1\\(en256. The default is 1." +msgstr "حدد I<مسافة> حساب الدلتا بالبايت. يجب أن تكون الـ I<مسافة> 1-256. القيمة المبدئية هي 1." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "For example, with B and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the output will be A1 B1 01 02 01 02 01 02." +msgstr "على سبيل المثال، مع B ومدخلات من ثمانية بايتات A1 B1 A2 B3 A3 B5 A4 B7، سيكون المخرج A1 B1 01 02 01 02 01 02." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "Other options" +msgstr "خيارات أخرى" + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-q>, B<--quiet>" +msgstr "B<-q>, B<--quiet>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Suppress warnings and notices. Specify this twice to suppress errors too. This option has no effect on the exit status. That is, even if a warning was suppressed, the exit status to indicate a warning is still used." +msgstr "اكتم التحذيرات والملاحظات. حدد هذا الخيار مرتين لكتم الأخطاء أيضاً. ليس لهذا الخيار تأثير على حالة الخروج. أي أنه حتى لو كُتم التحذير، فستظل حالة الخروج التي تشير لوعود تحذير مستخدمة." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-v>, B<--verbose>" +msgstr "B<-v>, B<--verbose>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Be verbose. If standard error is connected to a terminal, B will display a progress indicator. Specifying B<--verbose> twice will give even more verbose output." +msgstr "كن مسهباً. إذا كان الخطأ القياسي متصلاً بطرفية، سيعرض B مؤشر تقدم. تحديد B<--verbose> مرتين سيعطي مخرجات أكثر إسهاباً." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The progress indicator shows the following information:" +msgstr "يعرض مؤشر التقدم المعلومات التالية:" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Completion percentage is shown if the size of the input file is known. That is, the percentage cannot be shown in pipes." +msgstr "تظهر نسبة الإكمال إذا كان حجم ملف الإدخال معروفاً. أي أن النسبة لا يمكن عرضها في الأنابيب (pipes)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of compressed data produced (compressing) or consumed (decompressing)." +msgstr "كمية البيانات المضغوطة المنتجة (عند الضغط) أو المستهلكة (عند فك الضغط)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Amount of uncompressed data consumed (compressing) or produced (decompressing)." +msgstr "كمية البيانات غير المضغوطة المستهلكة (عند الضغط) أو المنتجة (عند فك الضغط)." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression ratio, which is calculated by dividing the amount of compressed data processed so far by the amount of uncompressed data processed so far." +msgstr "نسبة الضغط، وتُحسب بقسمة كمية البيانات المضغوطة المعالجة حتى الآن على كمية البيانات غير المضغوطة المعالجة حتى الآن." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Compression or decompression speed. This is measured as the amount of uncompressed data consumed (compression) or produced (decompression) per second. It is shown after a few seconds have passed since B started processing the file." +msgstr "سرعة الضغط أو فك الضغط. تُقاس بكمية البيانات غير المضغوطة المستهلكة (ضغط) أو المنتجة (فك ضغط) في الثانية. تظهر بعد مرور بضع ثوانٍ على بدء B في معالجة الملف." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Elapsed time in the format M:SS or H:MM:SS." +msgstr "الوقت المنقضي بتنسيق M:SS أو H:MM:SS." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Estimated remaining time is shown only when the size of the input file is known and a couple of seconds have already passed since B started processing the file. The time is shown in a less precise format which never has any colons, for example, 2 min 30 s." +msgstr "يظهر الوقت المتبقي المقدر فقط عندما يكون حجم ملف الإدخال معروفاً وبعد مرور ثانيتين على بدء B في معالجة الملف. يظهر الوقت بتنسيق أقل دقة لا يحتوي أبداً على نقطتين رأسيتين، مثلاً، 2 min 30 s." + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "When standard error is not a terminal, B<--verbose> will make B print the filename, compressed size, uncompressed size, compression ratio, and possibly also the speed and elapsed time on a single line to standard error after compressing or decompressing the file. The speed and elapsed time are included only when the operation took at least a few seconds. If the operation didn't finish, for example, due to user interruption, also the completion percentage is printed if the size of the input file is known." +msgstr "عندما لا يكون الخطأ القياسي طرفية، سيجعل B<--verbose> أداة B تطبع اسم الملف، والحجم المضغوط، والحجم غير المضغوط، ونسبة الضغط، وربما أيضاً السرعة والوقت المنقضي في سطر واحد إلى الخطأ القياسي بعد ضغط أو فك ضغط الملف. تُدرج السرعة والوقت المنقضي فقط عندما تستغرق العملية بضع ثوانٍ على الأقل. إذا لم تنتهِ العملية، بسبب مقاطعة المستخدم مثلاً، تُطبع أيضاً نسبة الإكمال إذا كان حجم ملف الإدخال معروفاً." + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-Q>, B<--no-warn>" +msgstr "B<-Q>, B<--no-warn>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Don't set the exit status to 2 even if a condition worth a warning was detected. This option doesn't affect the verbosity level, thus both B<--quiet> and B<--no-warn> have to be used to not display warnings and to not alter the exit status." +msgstr "لا تضبط حالة الخروج على 2 حتى لو اكتُشفت حالة تستحق التحذير. لا يؤثر هذا الخيار على مستوى الإسهاب، لذا يجب استخدام كل من B<--quiet> و B<--no-warn> معاً لعدم عرض التحذيرات وعدم تغيير حالة الخروج." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--robot>" +msgstr "B<--robot>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Print messages in a machine-parsable format. This is intended to ease writing frontends that want to use B instead of liblzma, which may be the case with various scripts. The output with this option enabled is meant to be stable across B releases. See the section B for details." +msgstr "اطبع الرسائل بتنسيق قابل للتحليل آلياً. الهدف من ذلك هو تسهيل كتابة واجهات تريد استخدام B بدلاً من liblzma، كما قد يكون الحال مع السكربتات المختلفة. المخرجات مع تمكين هذا الخيار يُفترض أن تكون مستقرة عبر إصدارات B. انظر قسم B للتفاصيل." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<--info-memory>" +msgstr "B<--info-memory>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display, in human-readable format, how much physical memory (RAM) and how many processor threads B thinks the system has and the memory usage limits for compression and decompression, and exit successfully." +msgstr "اعرض، بتنسيق قابل للقراءة البشرية، مقدار الذاكرة الفعلية (RAM) وعدد خيوط المعالج التي يعتقد B أن النظام يمتلكها وحدود استهلاك الذاكرة للضغط وفك الضغط، واخرج بنجاح." + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-h>, B<--help>" +msgstr "B<-h>, B<--help>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display a help message describing the most commonly used options, and exit successfully." +msgstr "اعرض رسالة مساعدة تصف الخيارات الأكثر استخداماً، واخرج بنجاح." + +#. type: TP +#: ../src/xz/xz.1 +#, no-wrap +msgid "B<-H>, B<--long-help>" +msgstr "B<-H>, B<--long-help>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display a help message describing all features of B, and exit successfully" +msgstr "اعرض رسالة مساعدة تصف كافة ميزات B، واخرج بنجاح" + +#. type: TP +#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 +#, no-wrap +msgid "B<-V>, B<--version>" +msgstr "B<-V>, B<--version>" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "Display the version number of B and liblzma in human readable format. To get machine-parsable output, specify B<--robot> before B<--version>." +msgstr "اعرض رقم إصدار B و liblzma بتنسيق قابل للقراءة البشرية. للحصول على مخرج قابل للتحليل آلياً، حدد B<--robot> قبل B<--version>." + +#. type: SH +#: ../src/xz/xz.1 +#, no-wrap +msgid "ROBOT MODE" +msgstr "نمط الروبوت" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "The robot mode is activated with the B<--robot> option. It makes the output of B easier to parse by other programs. Currently B<--robot> is supported only together with B<--list>, B<--filters-help>, B<--info-memory>, and B<--version>. It will be supported for compression and decompression in the future." +msgstr "يُفعل نمط الروبوت باستخدام خيار B<--robot>. فهو يجعل مخرجات B أسهل في التحليل بواسطة البرامج الأخرى. حالياً B<--robot> مدعوم فقط مع B<--list> و B<--filters-help> و B<--info-memory> و B<--version>. وسيُدعم للضغط وفك الضغط مستقبلاً." + +#. type: SS +#: ../src/xz/xz.1 +#, no-wrap +msgid "List mode" +msgstr "نمط القائمة" + +#. type: Plain text +#: ../src/xz/xz.1 +msgid "B uses tab-separated output. The first column of every line has a string that indicates the type of the information found on that line:" +msgstr "تستخدم B مخرجات مفصولة بعلامات جدولة (tabs). يحتوي العمود الأول من كل سطر على سلسلة نصية تشير إلى نوع المعلومات الموجودة في ذلك السطر:" + +#. TRANSLATORS: The bold strings B, B, B, B, +#. B